From dec4922171c0297bae765ce02f196fee5db676c8 Mon Sep 17 00:00:00 2001 From: Hitonabi Date: Thu, 9 Jul 2026 12:29:22 +0200 Subject: [PATCH] Politur: Vollbild-Maximierungs-Modus (fixed overlay) fuer Gedaechnis-Dashboard hinzugefuegt (deaktiviert Box-Einschraenkung) --- ...View-DlGYz4R1.js => GraphView-o6lRHZn6.js} | 2 +- frontend/dist/assets/index-CHmI2uuS.js | 775 ++++++++++++++++++ frontend/dist/assets/index-CunuYLZu.css | 1 - frontend/dist/assets/index-DHhyicLg.css | 1 + frontend/dist/assets/index-P6XXlxiQ.js | 765 ----------------- frontend/dist/index.html | 4 +- frontend/src/views/MemoryView.tsx | 56 +- 7 files changed, 824 insertions(+), 780 deletions(-) rename frontend/dist/assets/{GraphView-DlGYz4R1.js => GraphView-o6lRHZn6.js} (99%) create mode 100644 frontend/dist/assets/index-CHmI2uuS.js delete mode 100644 frontend/dist/assets/index-CunuYLZu.css create mode 100644 frontend/dist/assets/index-DHhyicLg.css delete mode 100644 frontend/dist/assets/index-P6XXlxiQ.js diff --git a/frontend/dist/assets/GraphView-DlGYz4R1.js b/frontend/dist/assets/GraphView-o6lRHZn6.js similarity index 99% rename from frontend/dist/assets/GraphView-DlGYz4R1.js rename to frontend/dist/assets/GraphView-o6lRHZn6.js index 650d1cd..86db7f7 100644 --- a/frontend/dist/assets/GraphView-DlGYz4R1.js +++ b/frontend/dist/assets/GraphView-o6lRHZn6.js @@ -1,4 +1,4 @@ -import{i as Nt,r as Y,R as Ui,c as jn,a as $n,b as Li,o as qi,m as Fn,d as Un,g as Hi,j as Rt,e as Gi}from"./index-P6XXlxiQ.js";function Vi(e,n){let r=0;for(let i of e)(i=+i)&&(r+=i);return r}var Ln=180/Math.PI,en={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Dr(e,n,r,i,o,a){var s,u,f;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(f=e*r+n*i)&&(r-=e*f,i-=n*f),(u=Math.sqrt(r*r+i*i))&&(r/=u,i/=u,f/=u),e*i180?c+=360:c-l>180&&(l+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:Nt(l,c)})):c&&h.push(o(h)+"rotate("+c+i)}function u(l,c,h,d){l!==c?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:Nt(l,c)}):c&&h.push(o(h)+"skewX("+c+i)}function f(l,c,h,d,p,y){if(l!==h||c!==d){var m=p.push(o(p)+"scale(",null,",",null,")");y.push({i:m-4,x:Nt(l,h)},{i:m-2,x:Nt(c,d)})}else(h!==1||d!==1)&&p.push(o(p)+"scale("+h+","+d+")")}return function(l,c){var h=[],d=[];return l=e(l),c=e(c),a(l.translateX,l.translateY,c.translateX,c.translateY,h,d),s(l.rotate,c.rotate,h,d),u(l.skewX,c.skewX,h,d),f(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,d),l=c=null,function(p){for(var y=-1,m=d.length,_;++ye.length)&&(n=e.length);for(var r=0,i=new Array(n);r180?c+=360:c-l>180&&(l+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:Nt(l,c)})):c&&h.push(o(h)+"rotate("+c+i)}function u(l,c,h,d){l!==c?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:Nt(l,c)}):c&&h.push(o(h)+"skewX("+c+i)}function f(l,c,h,d,p,y){if(l!==h||c!==d){var m=p.push(o(p)+"scale(",null,",",null,")");y.push({i:m-4,x:Nt(l,h)},{i:m-2,x:Nt(c,d)})}else(h!==1||d!==1)&&p.push(o(p)+"scale("+h+","+d+")")}return function(l,c){var h=[],d=[];return l=e(l),c=e(c),a(l.translateX,l.translateY,c.translateX,c.translateY,h,d),s(l.rotate,c.rotate,h,d),u(l.skewX,c.skewX,h,d),f(l.scaleX,l.scaleY,c.scaleX,c.scaleY,h,d),l=c=null,function(p){for(var y=-1,m=d.length,_;++ye.length)&&(n=e.length);for(var r=0,i=new Array(n);ra,methodNames:i=[],initPropNames:o=[]}={}){return Y.forwardRef((a,s)=>{const u=Y.useRef(),f=Y.useMemo(()=>{const h=Object.fromEntries(o.filter(d=>a.hasOwnProperty(d)).map(d=>[d,a[d]]));return e(h)},[]);Gn(()=>{f(r(u.current))},Y.useLayoutEffect),Gn(()=>f._destructor instanceof Function?f._destructor:void 0);const l=Y.useCallback((h,...d)=>f[h]instanceof Function?f[h](...d):void 0,[f]),c=Y.useRef({});return Object.keys(fo(a,[...i,...o])).filter(h=>c.current[h]!==a[h]).forEach(h=>l(h,a[h])),c.current=a,Y.useImperativeHandle(s,()=>Object.fromEntries(i.map(h=>[h,(...d)=>l(h,...d)])),[l]),Ui.createElement(n,{ref:u})})}function Gn(e,n=Y.useEffect){const r=Y.useRef(),i=Y.useRef(!1),o=Y.useRef(!1),[a,s]=Y.useState(0);i.current&&(o.current=!0),n(()=>(i.current||(r.current=e(),i.current=!0),s(u=>u+1),()=>{o.current&&(r.current&&r.current(),r.current=void 0,i.current=!1,o.current=!1)}),[])}var rn="http://www.w3.org/1999/xhtml";const Vn={svg:"http://www.w3.org/2000/svg",xhtml:rn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ne(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Vn.hasOwnProperty(n)?{space:Vn[n],local:e}:e}function ho(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===rn&&n.documentElement.namespaceURI===rn?n.createElement(e):n.createElementNS(r,e)}}function po(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fr(e){var n=Ne(e);return(n.local?po:ho)(n)}function go(){}function mn(e){return e==null?go:function(){return this.querySelector(e)}}function yo(e){typeof e!="function"&&(e=mn(e));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o=C&&(C=w+1);!(v=_[C])&&++C=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Lo(e){e||(e=qo);function n(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}for(var r=this._groups,i=r.length,o=new Array(i),a=0;an?1:e>=n?0:NaN}function Ho(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Go(){return Array.from(this)}function Vo(){for(var e=this._groups,n=0,r=e.length;n1?this.each((n==null?na:typeof n=="function"?ia:ra)(e,n,r??"")):Lt(this.node(),e)}function Lt(e,n){return e.style.getPropertyValue(n)||Gr(e).getComputedStyle(e,null).getPropertyValue(n)}function aa(e){return function(){delete this[e]}}function sa(e,n){return function(){this[e]=n}}function ua(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function la(e,n){return arguments.length>1?this.each((n==null?aa:typeof n=="function"?ua:sa)(e,n)):this.node()[e]}function Vr(e){return e.trim().split(/^|\s+/)}function bn(e){return e.classList||new Wr(e)}function Wr(e){this._node=e,this._names=Vr(e.getAttribute("class")||"")}Wr.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Br(e,n){for(var r=bn(e),i=-1,o=n.length;++i=0&&(r=n.slice(i+1),n=n.slice(0,i)),{type:n,name:r}})}function ja(e){return function(){var n=this.__on;if(n){for(var r=0,i=-1,o=n.length,a;r{}};function fe(){for(var e=0,n=arguments.length,r={},i;e=0&&(i=r.slice(o+1),r=r.slice(0,o)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}_e.prototype=fe.prototype={constructor:_e,on:function(e,n){var r=this._,i=Ba(e+"",r),o,a=-1,s=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(o),i=0,o,a;i()=>e;function on(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:s,y:u,dx:f,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}on.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Za(e){return!e.ctrlKey&&!e.button}function Ka(){return this.parentNode}function Qa(e,n){return n??{x:e.x,y:e.y}}function Ja(){return navigator.maxTouchPoints||"ontouchstart"in this}function ts(){var e=Za,n=Ka,r=Qa,i=Ja,o={},a=fe("start","drag","end"),s=0,u,f,l,c,h=0;function d(b){b.on("mousedown.drag",p).filter(i).on("touchstart.drag",_).on("touchmove.drag",g,Ya).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,v){if(!(c||!e.call(this,b,v))){var k=C(this,n.call(this,b,v),b,v,"mouse");k&&(at(b.view).on("mousemove.drag",y,ae).on("mouseup.drag",m,ae),Kr(b.view),He(b),l=!1,u=b.clientX,f=b.clientY,k("start",b))}}function y(b){if(Ut(b),!l){var v=b.clientX-u,k=b.clientY-f;l=v*v+k*k>h}o.mouse("drag",b)}function m(b){at(b.view).on("mousemove.drag mouseup.drag",null),Qr(b.view,l),Ut(b),o.mouse("end",b)}function _(b,v){if(e.call(this,b,v)){var k=b.changedTouches,S=n.call(this,b,v),T=k.length,z,P;for(z=0;z=0&&e._call.call(void 0,n),e=e._next;--qt}function Bn(){jt=(Ce=se.now())+De,qt=Qt=0;try{ns()}finally{qt=0,is(),jt=0}}function rs(){var e=se.now(),n=e-Ce;n>Jr&&(De-=n,Ce=e)}function is(){for(var e,n=Ae,r,i=1/0;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:Ae=r);Jt=e,an(i)}function an(e){if(!qt){Qt&&(Qt=clearTimeout(Qt));var n=e-jt;n>24?(e<1/0&&(Qt=setTimeout(Bn,e-se.now()-De)),Gt&&(Gt=clearInterval(Gt))):(Gt||(Ce=se.now(),Gt=setInterval(rs,Jr)),qt=1,ti(Bn))}}function Xn(e,n,r){var i=new Se;return n=n==null?0:+n,i.restart(o=>{i.stop(),e(o+n)},n,r),i}var os=fe("start","end","cancel","interrupt"),as=[],ei=0,Yn=1,sn=2,ve=3,Zn=4,un=5,me=6;function je(e,n,r,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;ss(e,r,{name:n,index:i,group:o,on:os,tween:as,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ei})}function kn(e,n){var r=ht(e,n);if(r.state>ei)throw new Error("too late; already scheduled");return r}function vt(e,n){var r=ht(e,n);if(r.state>ve)throw new Error("too late; already running");return r}function ht(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function ss(e,n,r){var i=e.__transition,o;i[n]=r,r.timer=wn(a,0,r.time);function a(l){r.state=Yn,r.timer.restart(s,r.delay,r.time),r.delay<=l&&s(l-r.delay)}function s(l){var c,h,d,p;if(r.state!==Yn)return f();for(c in i)if(p=i[c],p.name===r.name){if(p.state===ve)return Xn(s);p.state===Zn?(p.state=me,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[c]):+csn&&i.state=0&&(n=n.slice(0,r)),!n||n==="start"})}function js(e,n,r){var i,o,a=Ds(n)?kn:vt;return function(){var s=a(this,e),u=s.on;u!==i&&(o=(i=u).copy()).on(n,r),s.on=o}}function $s(e,n){var r=this._id;return arguments.length<2?ht(this.node(),r).on.on(e):this.each(js(r,e,n))}function Fs(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function Us(){return this.on("end.remove",Fs(this._id))}function Ls(e){var n=this._name,r=this._id;typeof e!="function"&&(e=mn(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s()=>e;function hu(e,{sourceEvent:n,target:r,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function St(e,n,r){this.k=e,this.x=n,this.y=r}St.prototype={constructor:St,scale:function(e){return e===1?this:new St(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new St(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Cn=new St(1,0,0);dt.prototype=St.prototype;function dt(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Cn;return e.__zoom}function Ge(e){e.stopImmediatePropagation()}function Vt(e){e.preventDefault(),e.stopImmediatePropagation()}function du(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function pu(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Kn(){return this.__zoom||Cn}function gu(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function yu(){return navigator.maxTouchPoints||"ontouchstart"in this}function _u(e,n,r){var i=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],a=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function vu(){var e=du,n=pu,r=_u,i=gu,o=yu,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,f=Ji,l=fe("start","zoom","end"),c,h,d,p=500,y=150,m=0,_=10;function g(A){A.property("__zoom",Kn).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",z).on("dblclick.zoom",P).filter(o).on("touchstart.zoom",E).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",D).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(A,R,M,I){var $=A.selection?A.selection():A;$.property("__zoom",Kn),A!==$?v(A,R,M,I):$.interrupt().each(function(){k(this,arguments).event(I).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},g.scaleBy=function(A,R,M,I){g.scaleTo(A,function(){var $=this.__zoom.k,U=typeof R=="function"?R.apply(this,arguments):R;return $*U},M,I)},g.scaleTo=function(A,R,M,I){g.transform(A,function(){var $=n.apply(this,arguments),U=this.__zoom,F=M==null?b($):typeof M=="function"?M.apply(this,arguments):M,L=U.invert(F),q=typeof R=="function"?R.apply(this,arguments):R;return r(C(w(U,q),F,L),$,s)},M,I)},g.translateBy=function(A,R,M,I){g.transform(A,function(){return r(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof M=="function"?M.apply(this,arguments):M),n.apply(this,arguments),s)},null,I)},g.translateTo=function(A,R,M,I,$){g.transform(A,function(){var U=n.apply(this,arguments),F=this.__zoom,L=I==null?b(U):typeof I=="function"?I.apply(this,arguments):I;return r(Cn.translate(L[0],L[1]).scale(F.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof M=="function"?-M.apply(this,arguments):-M),U,s)},I,$)};function w(A,R){return R=Math.max(a[0],Math.min(a[1],R)),R===A.k?A:new St(R,A.x,A.y)}function C(A,R,M){var I=R[0]-M[0]*A.k,$=R[1]-M[1]*A.k;return I===A.x&&$===A.y?A:new St(A.k,I,$)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function v(A,R,M,I){A.on("start.zoom",function(){k(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(I).end()}).tween("zoom",function(){var $=this,U=arguments,F=k($,U).event(I),L=n.apply($,U),q=M==null?b(L):typeof M=="function"?M.apply($,U):M,Z=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),X=$.__zoom,ut=typeof R=="function"?R.apply($,U):R,mt=f(X.invert(q).concat(Z/X.k),ut.invert(q).concat(Z/ut.k));return function(lt){if(lt===1)lt=ut;else{var bt=mt(lt),qe=Z/bt[2];lt=new St(qe,q[0]-bt[0]*qe,q[1]-bt[1]*qe)}F.zoom(null,lt)}})}function k(A,R,M){return!M&&A.__zooming||new S(A,R)}function S(A,R){this.that=A,this.args=R,this.active=0,this.sourceEvent=null,this.extent=n.apply(A,R),this.taps=0}S.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,R){return this.mouse&&A!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var R=at(this.that).datum();l.call(A,this.that,new hu(A,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:l}),R)}};function T(A,...R){if(!e.apply(this,arguments))return;var M=k(this,R).event(A),I=this.__zoom,$=Math.max(a[0],Math.min(a[1],I.k*Math.pow(2,i.apply(this,arguments)))),U=pt(A);if(M.wheel)(M.mouse[0][0]!==U[0]||M.mouse[0][1]!==U[1])&&(M.mouse[1]=I.invert(M.mouse[0]=U)),clearTimeout(M.wheel);else{if(I.k===$)return;M.mouse=[U,I.invert(U)],be(this),M.start()}Vt(A),M.wheel=setTimeout(F,y),M.zoom("mouse",r(C(w(I,$),M.mouse[0],M.mouse[1]),M.extent,s));function F(){M.wheel=null,M.end()}}function z(A,...R){if(d||!e.apply(this,arguments))return;var M=A.currentTarget,I=k(this,R,!0).event(A),$=at(A.view).on("mousemove.zoom",q,!0).on("mouseup.zoom",Z,!0),U=pt(A,M),F=A.clientX,L=A.clientY;Kr(A.view),Ge(A),I.mouse=[U,this.__zoom.invert(U)],be(this),I.start();function q(X){if(Vt(X),!I.moved){var ut=X.clientX-F,mt=X.clientY-L;I.moved=ut*ut+mt*mt>m}I.event(X).zoom("mouse",r(C(I.that.__zoom,I.mouse[0]=pt(X,M),I.mouse[1]),I.extent,s))}function Z(X){$.on("mousemove.zoom mouseup.zoom",null),Qr(X.view,I.moved),Vt(X),I.event(X).end()}}function P(A,...R){if(e.apply(this,arguments)){var M=this.__zoom,I=pt(A.changedTouches?A.changedTouches[0]:A,this),$=M.invert(I),U=M.k*(A.shiftKey?.5:2),F=r(C(w(M,U),I,$),n.apply(this,R),s);Vt(A),u>0?at(this).transition().duration(u).call(v,F,I,A):at(this).call(g.transform,F,I,A)}}function E(A,...R){if(e.apply(this,arguments)){var M=A.touches,I=M.length,$=k(this,R,A.changedTouches.length===I).event(A),U,F,L,q;for(Ge(A),F=0;F=n||S<0||h&&T>=a}function g(){var k=Ve();if(_(k))return w(k);u=setTimeout(g,m(k))}function w(k){return u=void 0,d&&i?p(k):(i=o=void 0,s)}function C(){u!==void 0&&clearTimeout(u),l=0,i=f=o=u=void 0}function b(){return u===void 0?s:w(Ve())}function v(){var k=Ve(),S=_(k);if(i=arguments,o=this,f=k,S){if(u===void 0)return y(f);if(h)return clearTimeout(u),u=setTimeout(g,n),p(f)}return u===void 0&&(u=setTimeout(g,n)),s}return v.cancel=C,v.flush=b,v}var Gu="Expected a function";function Vu(e,n,r){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(Gu);return Me(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),si(e,n,{leading:i,maxWait:n,trailing:o})}var Dt=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Dt.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?Dt.Bounce.In(e*2)*.5:Dt.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),te=function(){return performance.now()},ui=(function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(n){this._tweens[n.getId()]=n,this._tweensAddedDuringUpdate[n.getId()]=n},e.prototype.remove=function(n){delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]},e.prototype.update=function(n,r){n===void 0&&(n=te()),r===void 0&&(r=!1);var i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o1?a(e[r],e[r-1],r-i):a(e[o],e[o+1>r?r:o+1],i-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},li=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),fn=new ui,er=(function(){function e(n,r){r===void 0&&(r=fn),this._object=n,this._group=r,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Dt.Linear.None,this._interpolationFunction=ln.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=li.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=te()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var a in this._valuesEnd)o[a]=this._valuesEnd[a];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,i,o,a){for(var s in i){var u=n[s],f=Array.isArray(u),l=f?"array":typeof u,c=!f&&Array.isArray(i[s]);if(!(l==="undefined"||l==="function")){if(c){var h=i[s];if(h.length===0)continue;for(var d=[u],p=0,y=h.length;p"u"||a)&&(r[s]=u),f||(r[s]*=1),c?o[s]=i[s].slice().reverse():o[s]=r[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(n){return n===void 0&&(n=te()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this._group&&this._group.remove(this),this)},e.prototype.resume=function(n){return n===void 0&&(n=te()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;ns)return!1;r&&this.start(n,!0)}if(this._goToEnd=!1,nl)return 1;var _=Math.trunc(u/f),g=u-_*f,w=Math.min(g/i._duration,1);return w===0&&u===i._duration?1:w},h=c(),d=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||u>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((u-this._duration)/f)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(a in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]=="string"&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=f*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,m=this._chainedTweens.length;ye.length)&&(n=e.length);for(var r=0,i=Array(n);r=0,a=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return a?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(i=this.toRgbString()),n==="prgb"&&(i=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(i=this.toHexString()),n==="hex3"&&(i=this.toHexString(!0)),n==="hex4"&&(i=this.toHex8String(!0)),n==="hex8"&&(i=this.toHex8String()),n==="name"&&(i=this.toName()),n==="hsl"&&(i=this.toHslString()),n==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},clone:function(){return j(this.toString())},_applyModification:function(n,r){var i=n.apply(null,[this].concat([].slice.call(r)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten:function(){return this._applyModification(fl,arguments)},brighten:function(){return this._applyModification(cl,arguments)},darken:function(){return this._applyModification(hl,arguments)},desaturate:function(){return this._applyModification(sl,arguments)},saturate:function(){return this._applyModification(ul,arguments)},greyscale:function(){return this._applyModification(ll,arguments)},spin:function(){return this._applyModification(dl,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(yl,arguments)},complement:function(){return this._applyCombination(pl,arguments)},monochromatic:function(){return this._applyCombination(_l,arguments)},splitcomplement:function(){return this._applyCombination(gl,arguments)},triad:function(){return this._applyCombination(sr,[3])},tetrad:function(){return this._applyCombination(sr,[4])}};j.fromRatio=function(e,n){if(Pe(e)=="object"){var r={};for(var i in e)e.hasOwnProperty(i)&&(i==="a"?r[i]=e[i]:r[i]=ee(e[i]));e=r}return j(e,n)};function nl(e){var n={r:0,g:0,b:0},r=1,i=null,o=null,a=null,s=!1,u=!1;return typeof e=="string"&&(e=wl(e)),Pe(e)=="object"&&(wt(e.r)&&wt(e.g)&&wt(e.b)?(n=rl(e.r,e.g,e.b),s=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):wt(e.h)&&wt(e.s)&&wt(e.v)?(i=ee(e.s),o=ee(e.v),n=ol(e.h,i,o),s=!0,u="hsv"):wt(e.h)&&wt(e.s)&&wt(e.l)&&(i=ee(e.s),a=ee(e.l),n=il(e.h,i,a),s=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=fi(r),{ok:s,format:e.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function rl(e,n,r){return{r:W(e,255)*255,g:W(n,255)*255,b:W(r,255)*255}}function rr(e,n,r){e=W(e,255),n=W(n,255),r=W(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=(i+o)/2;if(i==o)a=s=0;else{var f=i-o;switch(s=u>.5?f/(2-i-o):f/(i+o),i){case e:a=(n-r)/f+(n1&&(h-=1),h<1/6?l+(c-l)*6*h:h<1/2?c:h<2/3?l+(c-l)*(2/3-h)*6:l}if(n===0)i=o=a=r;else{var u=r<.5?r*(1+n):r+n-r*n,f=2*r-u;i=s(f,u,e+1/3),o=s(f,u,e),a=s(f,u,e-1/3)}return{r:i*255,g:o*255,b:a*255}}function ir(e,n,r){e=W(e,255),n=W(n,255),r=W(r,255);var i=Math.max(e,n,r),o=Math.min(e,n,r),a,s,u=i,f=i-o;if(s=i===0?0:f/i,i==o)a=0;else{switch(i){case e:a=(n-r)/f+(n>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push(j(i));return a}function _l(e,n){n=n||6;for(var r=j(e).toHsv(),i=r.h,o=r.s,a=r.v,s=[],u=1/n;n--;)s.push(j({h:i,s:o,v:a})),a=(a+u)%1;return s}j.mix=function(e,n,r){r=r===0?0:r||50;var i=j(e).toRgb(),o=j(n).toRgb(),a=r/100,s={r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a};return j(s)};j.readability=function(e,n){var r=j(e),i=j(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)};j.isReadable=function(e,n,r){var i=j.readability(e,n),o,a;switch(a=!1,o=kl(r),o.level+o.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7;break}return a};j.mostReadable=function(e,n,r){var i=null,o=0,a,s,u,f;r=r||{},s=r.includeFallbackColors,u=r.level,f=r.size;for(var l=0;lo&&(o=a,i=j(n[l]));return j.isReadable(e,i,{level:u,size:f})||!s?i:(r.includeFallbackColors=!1,j.mostReadable(e,["#fff","#000"],r))};var cn=j.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},vl=j.hexNames=ml(cn);function ml(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function fi(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function W(e,n){bl(e)&&(e="100%");var r=xl(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function $e(e){return Math.min(1,Math.max(0,e))}function nt(e){return parseInt(e,16)}function bl(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function xl(e){return typeof e=="string"&&e.indexOf("%")!=-1}function ct(e){return e.length==1?"0"+e:""+e}function ee(e){return e<=1&&(e=e*100+"%"),e}function ci(e){return Math.round(parseFloat(e)*255).toString(16)}function ur(e){return nt(e)/255}var ft=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function wt(e){return!!ft.CSS_UNIT.exec(e)}function wl(e){e=e.replace(tl,"").replace(el,"").toLowerCase();var n=!1;if(cn[e])e=cn[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=ft.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=ft.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ft.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=ft.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ft.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=ft.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ft.hex8.exec(e))?{r:nt(r[1]),g:nt(r[2]),b:nt(r[3]),a:ur(r[4]),format:n?"name":"hex8"}:(r=ft.hex6.exec(e))?{r:nt(r[1]),g:nt(r[2]),b:nt(r[3]),format:n?"name":"hex"}:(r=ft.hex4.exec(e))?{r:nt(r[1]+""+r[1]),g:nt(r[2]+""+r[2]),b:nt(r[3]+""+r[3]),a:ur(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=ft.hex3.exec(e))?{r:nt(r[1]+""+r[1]),g:nt(r[2]+""+r[2]),b:nt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function kl(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function hn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r{throw TypeError(e)};var T4=(e,t,r)=>t in e?I4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ns=(e,t,r)=>T4(e,typeof t!="symbol"?t+"":t,r),Jp=(e,t,r)=>t.has(e)||mw("Cannot "+r);var R=(e,t,r)=>(Jp(e,t,"read from private field"),r?r.call(e):t.get(e)),De=(e,t,r)=>t.has(e)?mw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ke=(e,t,r,n)=>(Jp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),He=(e,t,r)=>(Jp(e,t,"access private method"),r);var Ed=(e,t,r,n)=>({set _(i){ke(e,t,i,r)},get _(){return R(e,t,n)}});function D4(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Px(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eg={exports:{}},rc={},tg={exports:{}},We={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var pw;function L4(){if(pw)return We;pw=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=p&&D[p]||D["@@iterator"],typeof D=="function"?D:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function k(D,M,Q){this.props=D,this.context=M,this.refs=w,this.updater=Q||b}k.prototype.isReactComponent={},k.prototype.setState=function(D,M){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,M,"setState")},k.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=k.prototype;function E(D,M,Q){this.props=D,this.context=M,this.refs=w,this.updater=Q||b}var C=E.prototype=new N;C.constructor=E,S(C,k.prototype),C.isPureReactComponent=!0;var A=Array.isArray,_=Object.prototype.hasOwnProperty,O={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function B(D,M,Q){var ne,ae={},ee=null,se=null;if(M!=null)for(ne in M.ref!==void 0&&(se=M.ref),M.key!==void 0&&(ee=""+M.key),M)_.call(M,ne)&&!T.hasOwnProperty(ne)&&(ae[ne]=M[ne]);var me=arguments.length-2;if(me===1)ae.children=Q;else if(1>>1,M=X[D];if(0>>1;Di(ae,re))eei(se,ae)?(X[D]=se,X[ee]=re,D=ee):(X[D]=ae,X[ne]=re,D=ne);else if(eei(se,re))X[D]=se,X[ee]=re,D=ee;else break e}}return te}function i(X,te){var re=X.sortIndex-te.sortIndex;return re!==0?re:X.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var f=[],h=[],m=1,p=null,v=3,b=!1,S=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(X){for(var te=r(h);te!==null;){if(te.callback===null)n(h);else if(te.startTime<=X)n(h),te.sortIndex=te.expirationTime,t(f,te);else break;te=r(h)}}function A(X){if(w=!1,C(X),!S)if(r(f)!==null)S=!0,le(_);else{var te=r(h);te!==null&&ie(A,te.startTime-X)}}function _(X,te){S=!1,w&&(w=!1,N(B),B=-1),b=!0;var re=v;try{for(C(te),p=r(f);p!==null&&(!(p.expirationTime>te)||X&&!q());){var D=p.callback;if(typeof D=="function"){p.callback=null,v=p.priorityLevel;var M=D(p.expirationTime<=te);te=e.unstable_now(),typeof M=="function"?p.callback=M:p===r(f)&&n(f),C(te)}else n(f);p=r(f)}if(p!==null)var Q=!0;else{var ne=r(h);ne!==null&&ie(A,ne.startTime-te),Q=!1}return Q}finally{p=null,v=re,b=!1}}var O=!1,T=null,B=-1,z=5,$=-1;function q(){return!(e.unstable_now()-$X||125D?(X.sortIndex=re,t(h,X),r(f)===null&&X===r(h)&&(w?(N(B),B=-1):w=!0,ie(A,re-D))):(X.sortIndex=M,t(f,X),S||b||(S=!0,le(_))),X},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(X){var te=v;return function(){var re=v;v=te;try{return X.apply(this,arguments)}finally{v=re}}}})(ig)),ig}var bw;function F4(){return bw||(bw=1,ng.exports=z4()),ng.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ww;function B4(){if(ww)return Nr;ww=1;var e=el(),t=F4();function r(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},p={};function v(a){return f.call(p,a)?!0:f.call(m,a)?!1:h.test(a)?p[a]=!0:(m[a]=!0,!1)}function b(a,l,d,g){if(d!==null&&d.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return g?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function S(a,l,d,g){if(l===null||typeof l>"u"||b(a,l,d,g))return!0;if(g)return!1;if(d!==null)switch(d.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function w(a,l,d,g,y,j,P){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=g,this.attributeNamespace=y,this.mustUseProperty=d,this.propertyName=a,this.type=l,this.sanitizeURL=j,this.removeEmptyString=P}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){k[a]=new w(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];k[l]=new w(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){k[a]=new w(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){k[a]=new w(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){k[a]=new w(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){k[a]=new w(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){k[a]=new w(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){k[a]=new w(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){k[a]=new w(a,5,!1,a.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function E(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var l=a.replace(N,E);k[l]=new w(l,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var l=a.replace(N,E);k[l]=new w(l,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var l=a.replace(N,E);k[l]=new w(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){k[a]=new w(a,1,!1,a.toLowerCase(),null,!1,!1)}),k.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){k[a]=new w(a,1,!1,a.toLowerCase(),null,!0,!0)});function C(a,l,d,g){var y=k.hasOwnProperty(l)?k[l]:null;(y!==null?y.type!==0:g||!(2I||y[P]!==j[I]){var L=` +`+y[P].replace(" at new "," at ");return a.displayName&&L.includes("")&&(L=L.replace("",a.displayName)),L}while(1<=P&&0<=I);break}}}finally{Q=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?M(a):""}function ae(a){switch(a.tag){case 5:return M(a.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return a=ne(a.type,!1),a;case 11:return a=ne(a.type.render,!1),a;case 1:return a=ne(a.type,!0),a;default:return""}}function ee(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case T:return"Fragment";case O:return"Portal";case z:return"Profiler";case B:return"StrictMode";case ve:return"Suspense";case de:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case q:return(a.displayName||"Context")+".Consumer";case $:return(a._context.displayName||"Context")+".Provider";case W:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case ge:return l=a.displayName||null,l!==null?l:ee(a.type)||"Memo";case le:l=a._payload,a=a._init;try{return ee(a(l))}catch{}}return null}function se(a){var l=a.type;switch(a.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=l.render,a=a.displayName||a.name||"",l.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ee(l);case 8:return l===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function me(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function U(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function ue(a){var l=U(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,l),g=""+a[l];if(!a.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,j=d.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return y.call(this)},set:function(P){g=""+P,j.call(this,P)}}),Object.defineProperty(a,l,{enumerable:d.enumerable}),{getValue:function(){return g},setValue:function(P){g=""+P},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function be(a){a._valueTracker||(a._valueTracker=ue(a))}function oe(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var d=l.getValue(),g="";return a&&(g=U(a)?a.checked?"true":"false":a.value),a=g,a!==d?(l.setValue(a),!0):!1}function Le(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Ue(a,l){var d=l.checked;return re({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function _e(a,l){var d=l.defaultValue==null?"":l.defaultValue,g=l.checked!=null?l.checked:l.defaultChecked;d=me(l.value!=null?l.value:d),a._wrapperState={initialChecked:g,initialValue:d,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function mt(a,l){l=l.checked,l!=null&&C(a,"checked",l,!1)}function tr(a,l){mt(a,l);var d=me(l.value),g=l.type;if(d!=null)g==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(g==="submit"||g==="reset"){a.removeAttribute("value");return}l.hasOwnProperty("value")?Ce(a,l.type,d):l.hasOwnProperty("defaultValue")&&Ce(a,l.type,me(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(a.defaultChecked=!!l.defaultChecked)}function K(a,l,d){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var g=l.type;if(!(g!=="submit"&&g!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+a._wrapperState.initialValue,d||l===a.value||(a.value=l),a.defaultValue=l}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function Ce(a,l,d){(l!=="number"||Le(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var Pe=Array.isArray;function Ze(a,l,d,g){if(a=a.options,l){l={};for(var y=0;y"+l.valueOf().toString()+"",l=it.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}});function xl(a,l){if(l){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=l;return}}a.textContent=l}var yl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},RO=["Webkit","ms","Moz","O"];Object.keys(yl).forEach(function(a){RO.forEach(function(l){l=l+a.charAt(0).toUpperCase()+a.substring(1),yl[l]=yl[a]})});function Py(a,l,d){return l==null||typeof l=="boolean"||l===""?"":d||typeof l!="number"||l===0||yl.hasOwnProperty(a)&&yl[a]?(""+l).trim():l+"px"}function Oy(a,l){a=a.style;for(var d in l)if(l.hasOwnProperty(d)){var g=d.indexOf("--")===0,y=Py(d,l[d],g);d==="float"&&(d="cssFloat"),g?a.setProperty(d,y):a[d]=y}}var $O=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function dm(a,l){if(l){if($O[a]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,a));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function fm(a,l){if(a.indexOf("-")===-1)return typeof l.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hm=null;function mm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var pm=null,Io=null,To=null;function _y(a){if(a=Bl(a)){if(typeof pm!="function")throw Error(r(280));var l=a.stateNode;l&&(l=Bu(l),pm(a.stateNode,a.type,l))}}function My(a){Io?To?To.push(a):To=[a]:Io=a}function Iy(){if(Io){var a=Io,l=To;if(To=Io=null,_y(a),l)for(a=0;a>>=0,a===0?32:31-(QO(a)/YO|0)|0}var ju=64,Su=4194304;function jl(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Nu(a,l){var d=a.pendingLanes;if(d===0)return 0;var g=0,y=a.suspendedLanes,j=a.pingedLanes,P=d&268435455;if(P!==0){var I=P&~y;I!==0?g=jl(I):(j&=P,j!==0&&(g=jl(j)))}else P=d&~y,P!==0?g=jl(P):j!==0&&(g=jl(j));if(g===0)return 0;if(l!==0&&l!==g&&(l&y)===0&&(y=g&-g,j=l&-l,y>=j||y===16&&(j&4194240)!==0))return l;if((g&4)!==0&&(g|=d&16),l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=g;0d;d++)l.push(a);return l}function Sl(a,l,d){a.pendingLanes|=l,l!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,l=31-un(l),a[l]=d}function e_(a,l){var d=a.pendingLanes&~l;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=l,a.mutableReadLanes&=l,a.entangledLanes&=l,l=a.entanglements;var g=a.eventTimes;for(a=a.expirationTimes;0=Ml),sb=" ",lb=!1;function cb(a,l){switch(a){case"keyup":return C_.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ub(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ro=!1;function O_(a,l){switch(a){case"compositionend":return ub(l);case"keypress":return l.which!==32?null:(lb=!0,sb);case"textInput":return a=l.data,a===sb&&lb?null:a;default:return null}}function __(a,l){if(Ro)return a==="compositionend"||!Im&&cb(a,l)?(a=tb(),Ou=Am=Ri=null,Ro=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:d,offset:l-a};a=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=vb(d)}}function yb(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?yb(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function bb(){for(var a=window,l=Le();l instanceof a.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)a=l.contentWindow;else break;l=Le(a.document)}return l}function Lm(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}function F_(a){var l=bb(),d=a.focusedElem,g=a.selectionRange;if(l!==d&&d&&d.ownerDocument&&yb(d.ownerDocument.documentElement,d)){if(g!==null&&Lm(d)){if(l=g.start,a=g.end,a===void 0&&(a=l),"selectionStart"in d)d.selectionStart=l,d.selectionEnd=Math.min(a,d.value.length);else if(a=(l=d.ownerDocument||document)&&l.defaultView||window,a.getSelection){a=a.getSelection();var y=d.textContent.length,j=Math.min(g.start,y);g=g.end===void 0?j:Math.min(g.end,y),!a.extend&&j>g&&(y=g,g=j,j=y),y=xb(d,j);var P=xb(d,g);y&&P&&(a.rangeCount!==1||a.anchorNode!==y.node||a.anchorOffset!==y.offset||a.focusNode!==P.node||a.focusOffset!==P.offset)&&(l=l.createRange(),l.setStart(y.node,y.offset),a.removeAllRanges(),j>g?(a.addRange(l),a.extend(P.node,P.offset)):(l.setEnd(P.node,P.offset),a.addRange(l)))}}for(l=[],a=d;a=a.parentNode;)a.nodeType===1&&l.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d=document.documentMode,$o=null,Rm=null,Ll=null,$m=!1;function wb(a,l,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;$m||$o==null||$o!==Le(g)||(g=$o,"selectionStart"in g&&Lm(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Ll&&Dl(Ll,g)||(Ll=g,g=$u(Rm,"onSelect"),0Wo||(a.current=Ym[Wo],Ym[Wo]=null,Wo--)}function rt(a,l){Wo++,Ym[Wo]=a.current,a.current=l}var Bi={},rr=Fi(Bi),br=Fi(!1),Pa=Bi;function Ho(a,l){var d=a.type.contextTypes;if(!d)return Bi;var g=a.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===l)return g.__reactInternalMemoizedMaskedChildContext;var y={},j;for(j in d)y[j]=l[j];return g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=y),y}function wr(a){return a=a.childContextTypes,a!=null}function Uu(){ot(br),ot(rr)}function Lb(a,l,d){if(rr.current!==Bi)throw Error(r(168));rt(rr,l),rt(br,d)}function Rb(a,l,d){var g=a.stateNode;if(l=l.childContextTypes,typeof g.getChildContext!="function")return d;g=g.getChildContext();for(var y in g)if(!(y in l))throw Error(r(108,se(a)||"Unknown",y));return re({},d,g)}function Wu(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Bi,Pa=rr.current,rt(rr,a),rt(br,br.current),!0}function $b(a,l,d){var g=a.stateNode;if(!g)throw Error(r(169));d?(a=Rb(a,l,Pa),g.__reactInternalMemoizedMergedChildContext=a,ot(br),ot(rr),rt(rr,a)):ot(br),rt(br,d)}var ei=null,Hu=!1,Zm=!1;function zb(a){ei===null?ei=[a]:ei.push(a)}function X_(a){Hu=!0,zb(a)}function Ui(){if(!Zm&&ei!==null){Zm=!0;var a=0,l=Je;try{var d=ei;for(Je=1;a>=P,y-=P,ti=1<<32-un(l)+y|d<$e?(Rt=Te,Te=null):Rt=Te.sibling;var Qe=fe(H,Te,V[$e],xe);if(Qe===null){Te===null&&(Te=Rt);break}a&&Te&&Qe.alternate===null&&l(H,Te),F=j(Qe,F,$e),Ie===null?Oe=Qe:Ie.sibling=Qe,Ie=Qe,Te=Rt}if($e===V.length)return d(H,Te),ut&&_a(H,$e),Oe;if(Te===null){for(;$e$e?(Rt=Te,Te=null):Rt=Te.sibling;var Zi=fe(H,Te,Qe.value,xe);if(Zi===null){Te===null&&(Te=Rt);break}a&&Te&&Zi.alternate===null&&l(H,Te),F=j(Zi,F,$e),Ie===null?Oe=Zi:Ie.sibling=Zi,Ie=Zi,Te=Rt}if(Qe.done)return d(H,Te),ut&&_a(H,$e),Oe;if(Te===null){for(;!Qe.done;$e++,Qe=V.next())Qe=pe(H,Qe.value,xe),Qe!==null&&(F=j(Qe,F,$e),Ie===null?Oe=Qe:Ie.sibling=Qe,Ie=Qe);return ut&&_a(H,$e),Oe}for(Te=g(H,Te);!Qe.done;$e++,Qe=V.next())Qe=we(Te,H,$e,Qe.value,xe),Qe!==null&&(a&&Qe.alternate!==null&&Te.delete(Qe.key===null?$e:Qe.key),F=j(Qe,F,$e),Ie===null?Oe=Qe:Ie.sibling=Qe,Ie=Qe);return a&&Te.forEach(function(M4){return l(H,M4)}),ut&&_a(H,$e),Oe}function jt(H,F,V,xe){if(typeof V=="object"&&V!==null&&V.type===T&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case _:e:{for(var Oe=V.key,Ie=F;Ie!==null;){if(Ie.key===Oe){if(Oe=V.type,Oe===T){if(Ie.tag===7){d(H,Ie.sibling),F=y(Ie,V.props.children),F.return=H,H=F;break e}}else if(Ie.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===le&&Kb(Oe)===Ie.type){d(H,Ie.sibling),F=y(Ie,V.props),F.ref=Ul(H,Ie,V),F.return=H,H=F;break e}d(H,Ie);break}else l(H,Ie);Ie=Ie.sibling}V.type===T?(F=za(V.props.children,H.mode,xe,V.key),F.return=H,H=F):(xe=xd(V.type,V.key,V.props,null,H.mode,xe),xe.ref=Ul(H,F,V),xe.return=H,H=xe)}return P(H);case O:e:{for(Ie=V.key;F!==null;){if(F.key===Ie)if(F.tag===4&&F.stateNode.containerInfo===V.containerInfo&&F.stateNode.implementation===V.implementation){d(H,F.sibling),F=y(F,V.children||[]),F.return=H,H=F;break e}else{d(H,F);break}else l(H,F);F=F.sibling}F=qp(V,H.mode,xe),F.return=H,H=F}return P(H);case le:return Ie=V._init,jt(H,F,Ie(V._payload),xe)}if(Pe(V))return Ne(H,F,V,xe);if(te(V))return Ee(H,F,V,xe);qu(H,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,F!==null&&F.tag===6?(d(H,F.sibling),F=y(F,V),F.return=H,H=F):(d(H,F),F=Vp(V,H.mode,xe),F.return=H,H=F),P(H)):d(H,F)}return jt}var qo=Gb(!0),Vb=Gb(!1),Qu=Fi(null),Yu=null,Qo=null,np=null;function ip(){np=Qo=Yu=null}function ap(a){var l=Qu.current;ot(Qu),a._currentValue=l}function op(a,l,d){for(;a!==null;){var g=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),a===d)break;a=a.return}}function Yo(a,l){Yu=a,np=Qo=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&l)!==0&&(kr=!0),a.firstContext=null)}function Vr(a){var l=a._currentValue;if(np!==a)if(a={context:a,memoizedValue:l,next:null},Qo===null){if(Yu===null)throw Error(r(308));Qo=a,Yu.dependencies={lanes:0,firstContext:a}}else Qo=Qo.next=a;return l}var Ma=null;function sp(a){Ma===null?Ma=[a]:Ma.push(a)}function qb(a,l,d,g){var y=l.interleaved;return y===null?(d.next=d,sp(l)):(d.next=y.next,y.next=d),l.interleaved=d,ni(a,g)}function ni(a,l){a.lanes|=l;var d=a.alternate;for(d!==null&&(d.lanes|=l),d=a,a=a.return;a!==null;)a.childLanes|=l,d=a.alternate,d!==null&&(d.childLanes|=l),d=a,a=a.return;return d.tag===3?d.stateNode:null}var Wi=!1;function lp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qb(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function ii(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function Hi(a,l,d){var g=a.updateQueue;if(g===null)return null;if(g=g.shared,(qe&2)!==0){var y=g.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),g.pending=l,ni(a,d)}return y=g.interleaved,y===null?(l.next=l,sp(g)):(l.next=y.next,y.next=l),g.interleaved=l,ni(a,d)}function Zu(a,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194240)!==0)){var g=l.lanes;g&=a.pendingLanes,d|=g,l.lanes=d,km(a,d)}}function Yb(a,l){var d=a.updateQueue,g=a.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var y=null,j=null;if(d=d.firstBaseUpdate,d!==null){do{var P={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};j===null?y=j=P:j=j.next=P,d=d.next}while(d!==null);j===null?y=j=l:j=j.next=l}else y=j=l;d={baseState:g.baseState,firstBaseUpdate:y,lastBaseUpdate:j,shared:g.shared,effects:g.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=l:a.next=l,d.lastBaseUpdate=l}function Xu(a,l,d,g){var y=a.updateQueue;Wi=!1;var j=y.firstBaseUpdate,P=y.lastBaseUpdate,I=y.shared.pending;if(I!==null){y.shared.pending=null;var L=I,Z=L.next;L.next=null,P===null?j=Z:P.next=Z,P=L;var he=a.alternate;he!==null&&(he=he.updateQueue,I=he.lastBaseUpdate,I!==P&&(I===null?he.firstBaseUpdate=Z:I.next=Z,he.lastBaseUpdate=L))}if(j!==null){var pe=y.baseState;P=0,he=Z=L=null,I=j;do{var fe=I.lane,we=I.eventTime;if((g&fe)===fe){he!==null&&(he=he.next={eventTime:we,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var Ne=a,Ee=I;switch(fe=l,we=d,Ee.tag){case 1:if(Ne=Ee.payload,typeof Ne=="function"){pe=Ne.call(we,pe,fe);break e}pe=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ee.payload,fe=typeof Ne=="function"?Ne.call(we,pe,fe):Ne,fe==null)break e;pe=re({},pe,fe);break e;case 2:Wi=!0}}I.callback!==null&&I.lane!==0&&(a.flags|=64,fe=y.effects,fe===null?y.effects=[I]:fe.push(I))}else we={eventTime:we,lane:fe,tag:I.tag,payload:I.payload,callback:I.callback,next:null},he===null?(Z=he=we,L=pe):he=he.next=we,P|=fe;if(I=I.next,I===null){if(I=y.shared.pending,I===null)break;fe=I,I=fe.next,fe.next=null,y.lastBaseUpdate=fe,y.shared.pending=null}}while(!0);if(he===null&&(L=pe),y.baseState=L,y.firstBaseUpdate=Z,y.lastBaseUpdate=he,l=y.shared.interleaved,l!==null){y=l;do P|=y.lane,y=y.next;while(y!==l)}else j===null&&(y.shared.lanes=0);Da|=P,a.lanes=P,a.memoizedState=pe}}function Zb(a,l,d){if(a=l.effects,l.effects=null,a!==null)for(l=0;ld?d:4,a(!0);var g=hp.transition;hp.transition={};try{a(!1),l()}finally{Je=d,hp.transition=g}}function g1(){return qr().memoizedState}function r4(a,l,d){var g=qi(a);if(d={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null},v1(a))x1(l,d);else if(d=qb(a,l,d,g),d!==null){var y=hr();gn(d,a,g,y),y1(d,l,g)}}function n4(a,l,d){var g=qi(a),y={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null};if(v1(a))x1(l,y);else{var j=a.alternate;if(a.lanes===0&&(j===null||j.lanes===0)&&(j=l.lastRenderedReducer,j!==null))try{var P=l.lastRenderedState,I=j(P,d);if(y.hasEagerState=!0,y.eagerState=I,dn(I,P)){var L=l.interleaved;L===null?(y.next=y,sp(l)):(y.next=L.next,L.next=y),l.interleaved=y;return}}catch{}finally{}d=qb(a,l,y,g),d!==null&&(y=hr(),gn(d,a,g,y),y1(d,l,g))}}function v1(a){var l=a.alternate;return a===gt||l!==null&&l===gt}function x1(a,l){Gl=td=!0;var d=a.pending;d===null?l.next=l:(l.next=d.next,d.next=l),a.pending=l}function y1(a,l,d){if((d&4194240)!==0){var g=l.lanes;g&=a.pendingLanes,d|=g,l.lanes=d,km(a,d)}}var id={readContext:Vr,useCallback:nr,useContext:nr,useEffect:nr,useImperativeHandle:nr,useInsertionEffect:nr,useLayoutEffect:nr,useMemo:nr,useReducer:nr,useRef:nr,useState:nr,useDebugValue:nr,useDeferredValue:nr,useTransition:nr,useMutableSource:nr,useSyncExternalStore:nr,useId:nr,unstable_isNewReconciler:!1},i4={readContext:Vr,useCallback:function(a,l){return On().memoizedState=[a,l===void 0?null:l],a},useContext:Vr,useEffect:l1,useImperativeHandle:function(a,l,d){return d=d!=null?d.concat([a]):null,rd(4194308,4,d1.bind(null,l,a),d)},useLayoutEffect:function(a,l){return rd(4194308,4,a,l)},useInsertionEffect:function(a,l){return rd(4,2,a,l)},useMemo:function(a,l){var d=On();return l=l===void 0?null:l,a=a(),d.memoizedState=[a,l],a},useReducer:function(a,l,d){var g=On();return l=d!==void 0?d(l):l,g.memoizedState=g.baseState=l,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},g.queue=a,a=a.dispatch=r4.bind(null,gt,a),[g.memoizedState,a]},useRef:function(a){var l=On();return a={current:a},l.memoizedState=a},useState:o1,useDebugValue:bp,useDeferredValue:function(a){return On().memoizedState=a},useTransition:function(){var a=o1(!1),l=a[0];return a=t4.bind(null,a[1]),On().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,d){var g=gt,y=On();if(ut){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Lt===null)throw Error(r(349));(Ta&30)!==0||t1(g,l,d)}y.memoizedState=d;var j={value:d,getSnapshot:l};return y.queue=j,l1(n1.bind(null,g,j,a),[a]),g.flags|=2048,Ql(9,r1.bind(null,g,j,d,l),void 0,null),d},useId:function(){var a=On(),l=Lt.identifierPrefix;if(ut){var d=ri,g=ti;d=(g&~(1<<32-un(g)-1)).toString(32)+d,l=":"+l+"R"+d,d=Vl++,0<\/script>",a=a.removeChild(a.firstChild)):typeof g.is=="string"?a=P.createElement(d,{is:g.is}):(a=P.createElement(d),d==="select"&&(P=a,g.multiple?P.multiple=!0:g.size&&(P.size=g.size))):a=P.createElementNS(a,d),a[Cn]=l,a[Fl]=g,z1(a,l,!1,!1),l.stateNode=a;e:{switch(P=fm(d,g),d){case"dialog":at("cancel",a),at("close",a),y=g;break;case"iframe":case"object":case"embed":at("load",a),y=g;break;case"video":case"audio":for(y=0;yts&&(l.flags|=128,g=!0,Yl(j,!1),l.lanes=4194304)}else{if(!g)if(a=Ju(P),a!==null){if(l.flags|=128,g=!0,d=a.updateQueue,d!==null&&(l.updateQueue=d,l.flags|=4),Yl(j,!0),j.tail===null&&j.tailMode==="hidden"&&!P.alternate&&!ut)return ir(l),null}else 2*kt()-j.renderingStartTime>ts&&d!==1073741824&&(l.flags|=128,g=!0,Yl(j,!1),l.lanes=4194304);j.isBackwards?(P.sibling=l.child,l.child=P):(d=j.last,d!==null?d.sibling=P:l.child=P,j.last=P)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=kt(),l.sibling=null,d=pt.current,rt(pt,g?d&1|2:d&1),l):(ir(l),null);case 22:case 23:return Hp(),g=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(Tr&1073741824)!==0&&(ir(l),l.subtreeFlags&6&&(l.flags|=8192)):ir(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function f4(a,l){switch(Jm(l),l.tag){case 1:return wr(l.type)&&Uu(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Zo(),ot(br),ot(rr),fp(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 5:return up(l),null;case 13:if(ot(pt),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Vo()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return ot(pt),null;case 4:return Zo(),null;case 10:return ap(l.type._context),null;case 22:case 23:return Hp(),null;case 24:return null;default:return null}}var ld=!1,ar=!1,h4=typeof WeakSet=="function"?WeakSet:Set,je=null;function Jo(a,l){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(g){xt(a,l,g)}else d.current=null}function Mp(a,l,d){try{d()}catch(g){xt(a,l,g)}}var U1=!1;function m4(a,l){if(Hm=Cu,a=bb(),Lm(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var y=g.anchorOffset,j=g.focusNode;g=g.focusOffset;try{d.nodeType,j.nodeType}catch{d=null;break e}var P=0,I=-1,L=-1,Z=0,he=0,pe=a,fe=null;t:for(;;){for(var we;pe!==d||y!==0&&pe.nodeType!==3||(I=P+y),pe!==j||g!==0&&pe.nodeType!==3||(L=P+g),pe.nodeType===3&&(P+=pe.nodeValue.length),(we=pe.firstChild)!==null;)fe=pe,pe=we;for(;;){if(pe===a)break t;if(fe===d&&++Z===y&&(I=P),fe===j&&++he===g&&(L=P),(we=pe.nextSibling)!==null)break;pe=fe,fe=pe.parentNode}pe=we}d=I===-1||L===-1?null:{start:I,end:L}}else d=null}d=d||{start:0,end:0}}else d=null;for(Km={focusedElem:a,selectionRange:d},Cu=!1,je=l;je!==null;)if(l=je,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,je=a;else for(;je!==null;){l=je;try{var Ne=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Ee=Ne.memoizedProps,jt=Ne.memoizedState,H=l.stateNode,F=H.getSnapshotBeforeUpdate(l.elementType===l.type?Ee:hn(l.type,Ee),jt);H.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var V=l.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(xe){xt(l,l.return,xe)}if(a=l.sibling,a!==null){a.return=l.return,je=a;break}je=l.return}return Ne=U1,U1=!1,Ne}function Zl(a,l,d){var g=l.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var y=g=g.next;do{if((y.tag&a)===a){var j=y.destroy;y.destroy=void 0,j!==void 0&&Mp(l,d,j)}y=y.next}while(y!==g)}}function cd(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&a)===a){var g=d.create;d.destroy=g()}d=d.next}while(d!==l)}}function Ip(a){var l=a.ref;if(l!==null){var d=a.stateNode;switch(a.tag){case 5:a=d;break;default:a=d}typeof l=="function"?l(a):l.current=a}}function W1(a){var l=a.alternate;l!==null&&(a.alternate=null,W1(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&(delete l[Cn],delete l[Fl],delete l[Qm],delete l[Y_],delete l[Z_])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function H1(a){return a.tag===5||a.tag===3||a.tag===4}function K1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||H1(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Tp(a,l,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,l?d.nodeType===8?d.parentNode.insertBefore(a,l):d.insertBefore(a,l):(d.nodeType===8?(l=d.parentNode,l.insertBefore(a,d)):(l=d,l.appendChild(a)),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Fu));else if(g!==4&&(a=a.child,a!==null))for(Tp(a,l,d),a=a.sibling;a!==null;)Tp(a,l,d),a=a.sibling}function Dp(a,l,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,l?d.insertBefore(a,l):d.appendChild(a);else if(g!==4&&(a=a.child,a!==null))for(Dp(a,l,d),a=a.sibling;a!==null;)Dp(a,l,d),a=a.sibling}var Kt=null,mn=!1;function Ki(a,l,d){for(d=d.child;d!==null;)G1(a,l,d),d=d.sibling}function G1(a,l,d){if(An&&typeof An.onCommitFiberUnmount=="function")try{An.onCommitFiberUnmount(ku,d)}catch{}switch(d.tag){case 5:ar||Jo(d,l);case 6:var g=Kt,y=mn;Kt=null,Ki(a,l,d),Kt=g,mn=y,Kt!==null&&(mn?(a=Kt,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Kt.removeChild(d.stateNode));break;case 18:Kt!==null&&(mn?(a=Kt,d=d.stateNode,a.nodeType===8?qm(a.parentNode,d):a.nodeType===1&&qm(a,d),Pl(a)):qm(Kt,d.stateNode));break;case 4:g=Kt,y=mn,Kt=d.stateNode.containerInfo,mn=!0,Ki(a,l,d),Kt=g,mn=y;break;case 0:case 11:case 14:case 15:if(!ar&&(g=d.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){y=g=g.next;do{var j=y,P=j.destroy;j=j.tag,P!==void 0&&((j&2)!==0||(j&4)!==0)&&Mp(d,l,P),y=y.next}while(y!==g)}Ki(a,l,d);break;case 1:if(!ar&&(Jo(d,l),g=d.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=d.memoizedProps,g.state=d.memoizedState,g.componentWillUnmount()}catch(I){xt(d,l,I)}Ki(a,l,d);break;case 21:Ki(a,l,d);break;case 22:d.mode&1?(ar=(g=ar)||d.memoizedState!==null,Ki(a,l,d),ar=g):Ki(a,l,d);break;default:Ki(a,l,d)}}function V1(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new h4),l.forEach(function(g){var y=j4.bind(null,a,g);d.has(g)||(d.add(g),g.then(y,y))})}}function pn(a,l){var d=l.deletions;if(d!==null)for(var g=0;gy&&(y=P),g&=~j}if(g=y,g=kt()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*g4(g/1960))-g,10a?16:a,Vi===null)var g=!1;else{if(a=Vi,Vi=null,md=0,(qe&6)!==0)throw Error(r(331));var y=qe;for(qe|=4,je=a.current;je!==null;){var j=je,P=j.child;if((je.flags&16)!==0){var I=j.deletions;if(I!==null){for(var L=0;Lkt()-$p?Ra(a,0):Rp|=d),Sr(a,l)}function ow(a,l){l===0&&((a.mode&1)===0?l=1:(l=Su,Su<<=1,(Su&130023424)===0&&(Su=4194304)));var d=hr();a=ni(a,l),a!==null&&(Sl(a,l,d),Sr(a,d))}function k4(a){var l=a.memoizedState,d=0;l!==null&&(d=l.retryLane),ow(a,d)}function j4(a,l){var d=0;switch(a.tag){case 13:var g=a.stateNode,y=a.memoizedState;y!==null&&(d=y.retryLane);break;case 19:g=a.stateNode;break;default:throw Error(r(314))}g!==null&&g.delete(l),ow(a,d)}var sw;sw=function(a,l,d){if(a!==null)if(a.memoizedProps!==l.pendingProps||br.current)kr=!0;else{if((a.lanes&d)===0&&(l.flags&128)===0)return kr=!1,u4(a,l,d);kr=(a.flags&131072)!==0}else kr=!1,ut&&(l.flags&1048576)!==0&&Fb(l,Gu,l.index);switch(l.lanes=0,l.tag){case 2:var g=l.type;sd(a,l),a=l.pendingProps;var y=Ho(l,rr.current);Yo(l,d),y=pp(null,l,g,a,y,d);var j=gp();return l.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,wr(g)?(j=!0,Wu(l)):j=!1,l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,lp(l),y.updater=ad,l.stateNode=y,y._reactInternals=l,kp(l,g,a,d),l=Ep(null,l,g,!0,j,d)):(l.tag=0,ut&&j&&Xm(l),fr(null,l,y,d),l=l.child),l;case 16:g=l.elementType;e:{switch(sd(a,l),a=l.pendingProps,y=g._init,g=y(g._payload),l.type=g,y=l.tag=N4(g),a=hn(g,a),y){case 0:l=Np(null,l,g,a,d);break e;case 1:l=I1(null,l,g,a,d);break e;case 11:l=C1(null,l,g,a,d);break e;case 14:l=P1(null,l,g,hn(g.type,a),d);break e}throw Error(r(306,g,""))}return l;case 0:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:hn(g,y),Np(a,l,g,y,d);case 1:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:hn(g,y),I1(a,l,g,y,d);case 3:e:{if(T1(l),a===null)throw Error(r(387));g=l.pendingProps,j=l.memoizedState,y=j.element,Qb(a,l),Xu(l,g,null,d);var P=l.memoizedState;if(g=P.element,j.isDehydrated)if(j={element:g,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},l.updateQueue.baseState=j,l.memoizedState=j,l.flags&256){y=Xo(Error(r(423)),l),l=D1(a,l,g,d,y);break e}else if(g!==y){y=Xo(Error(r(424)),l),l=D1(a,l,g,d,y);break e}else for(Ir=zi(l.stateNode.containerInfo.firstChild),Mr=l,ut=!0,fn=null,d=Vb(l,null,g,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Vo(),g===y){l=ai(a,l,d);break e}fr(a,l,g,d)}l=l.child}return l;case 5:return Xb(l),a===null&&tp(l),g=l.type,y=l.pendingProps,j=a!==null?a.memoizedProps:null,P=y.children,Gm(g,y)?P=null:j!==null&&Gm(g,j)&&(l.flags|=32),M1(a,l),fr(a,l,P,d),l.child;case 6:return a===null&&tp(l),null;case 13:return L1(a,l,d);case 4:return cp(l,l.stateNode.containerInfo),g=l.pendingProps,a===null?l.child=qo(l,null,g,d):fr(a,l,g,d),l.child;case 11:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:hn(g,y),C1(a,l,g,y,d);case 7:return fr(a,l,l.pendingProps,d),l.child;case 8:return fr(a,l,l.pendingProps.children,d),l.child;case 12:return fr(a,l,l.pendingProps.children,d),l.child;case 10:e:{if(g=l.type._context,y=l.pendingProps,j=l.memoizedProps,P=y.value,rt(Qu,g._currentValue),g._currentValue=P,j!==null)if(dn(j.value,P)){if(j.children===y.children&&!br.current){l=ai(a,l,d);break e}}else for(j=l.child,j!==null&&(j.return=l);j!==null;){var I=j.dependencies;if(I!==null){P=j.child;for(var L=I.firstContext;L!==null;){if(L.context===g){if(j.tag===1){L=ii(-1,d&-d),L.tag=2;var Z=j.updateQueue;if(Z!==null){Z=Z.shared;var he=Z.pending;he===null?L.next=L:(L.next=he.next,he.next=L),Z.pending=L}}j.lanes|=d,L=j.alternate,L!==null&&(L.lanes|=d),op(j.return,d,l),I.lanes|=d;break}L=L.next}}else if(j.tag===10)P=j.type===l.type?null:j.child;else if(j.tag===18){if(P=j.return,P===null)throw Error(r(341));P.lanes|=d,I=P.alternate,I!==null&&(I.lanes|=d),op(P,d,l),P=j.sibling}else P=j.child;if(P!==null)P.return=j;else for(P=j;P!==null;){if(P===l){P=null;break}if(j=P.sibling,j!==null){j.return=P.return,P=j;break}P=P.return}j=P}fr(a,l,y.children,d),l=l.child}return l;case 9:return y=l.type,g=l.pendingProps.children,Yo(l,d),y=Vr(y),g=g(y),l.flags|=1,fr(a,l,g,d),l.child;case 14:return g=l.type,y=hn(g,l.pendingProps),y=hn(g.type,y),P1(a,l,g,y,d);case 15:return O1(a,l,l.type,l.pendingProps,d);case 17:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:hn(g,y),sd(a,l),l.tag=1,wr(g)?(a=!0,Wu(l)):a=!1,Yo(l,d),w1(l,g,y),kp(l,g,y,d),Ep(null,l,g,!0,a,d);case 19:return $1(a,l,d);case 22:return _1(a,l,d)}throw Error(r(156,l.tag))};function lw(a,l){return By(a,l)}function S4(a,l,d,g){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(a,l,d,g){return new S4(a,l,d,g)}function Gp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function N4(a){if(typeof a=="function")return Gp(a)?1:0;if(a!=null){if(a=a.$$typeof,a===W)return 11;if(a===ge)return 14}return 2}function Yi(a,l){var d=a.alternate;return d===null?(d=Yr(a.tag,l,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=l,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,l=a.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function xd(a,l,d,g,y,j){var P=2;if(g=a,typeof a=="function")Gp(a)&&(P=1);else if(typeof a=="string")P=5;else e:switch(a){case T:return za(d.children,y,j,l);case B:P=8,y|=8;break;case z:return a=Yr(12,d,l,y|2),a.elementType=z,a.lanes=j,a;case ve:return a=Yr(13,d,l,y),a.elementType=ve,a.lanes=j,a;case de:return a=Yr(19,d,l,y),a.elementType=de,a.lanes=j,a;case ie:return yd(d,y,j,l);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case $:P=10;break e;case q:P=9;break e;case W:P=11;break e;case ge:P=14;break e;case le:P=16,g=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return l=Yr(P,d,l,y),l.elementType=a,l.type=g,l.lanes=j,l}function za(a,l,d,g){return a=Yr(7,a,g,l),a.lanes=d,a}function yd(a,l,d,g){return a=Yr(22,a,g,l),a.elementType=ie,a.lanes=d,a.stateNode={isHidden:!1},a}function Vp(a,l,d){return a=Yr(6,a,null,l),a.lanes=d,a}function qp(a,l,d){return l=Yr(4,a.children!==null?a.children:[],a.key,l),l.lanes=d,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function E4(a,l,d,g,y){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wm(0),this.expirationTimes=wm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wm(0),this.identifierPrefix=g,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Qp(a,l,d,g,y,j,P,I,L){return a=new E4(a,l,d,I,L),l===1?(l=1,j===!0&&(l|=8)):l=0,j=Yr(3,null,null,l),a.current=j,j.stateNode=a,j.memoizedState={element:g,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},lp(j),a}function A4(a,l,d){var g=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rg.exports=B4(),rg.exports}var jw;function U4(){if(jw)return Ad;jw=1;var e=zN();return Ad.createRoot=e.createRoot,Ad.hydrateRoot=e.hydrateRoot,Ad}var W4=U4();const H4=Px(W4);var Jc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},no,oa,As,PN,K4=(PN=class extends Jc{constructor(){super();De(this,no);De(this,oa);De(this,As);ke(this,As,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){R(this,oa)||this.setEventListener(R(this,As))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,oa))==null||t.call(this),ke(this,oa,void 0))}setEventListener(t){var r;ke(this,As,t),(r=R(this,oa))==null||r.call(this),ke(this,oa,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){R(this,no)!==t&&(ke(this,no,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof R(this,no)=="boolean"?R(this,no):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},no=new WeakMap,oa=new WeakMap,As=new WeakMap,PN),_x=new K4,G4={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sa,Cx,ON,V4=(ON=class{constructor(){De(this,sa,G4);De(this,Cx,!1)}setTimeoutProvider(e){ke(this,sa,e)}setTimeout(e,t){return R(this,sa).setTimeout(e,t)}clearTimeout(e){R(this,sa).clearTimeout(e)}setInterval(e,t){return R(this,sa).setInterval(e,t)}clearInterval(e){R(this,sa).clearInterval(e)}},sa=new WeakMap,Cx=new WeakMap,ON),Ya=new V4;function q4(e){setTimeout(e,0)}var Q4=typeof window>"u"||"Deno"in globalThis;function Ar(){}function Y4(e,t){return typeof e=="function"?e(t):e}function rv(e){return typeof e=="number"&&e>=0&&e!==1/0}function FN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pa(e,t){return typeof e=="function"?e(t):e}function Rr(e,t){return typeof e=="function"?e(t):e}function Sw(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:c,stale:u}=e;if(c){if(n){if(t.queryHash!==Mx(c,t.options))return!1}else if(!Ec(t.queryKey,c))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function Nw(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Nc(t.options.mutationKey)!==Nc(o))return!1}else if(!Ec(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Mx(e,t){return((t==null?void 0:t.queryKeyHashFn)||Nc)(e)}function Nc(e){return JSON.stringify(e,(t,r)=>iv(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Ec(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ec(e[r],t[r])):!1}var Z4=Object.prototype.hasOwnProperty;function BN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=Ew(e)&&Ew(t);if(!n&&!(iv(e)&&iv(t)))return t;const o=(n?e:Object.keys(e)).length,c=n?t:Object.keys(t),u=c.length,f=n?new Array(u):{};let h=0;for(let m=0;m{Ya.setTimeout(t,e)})}function av(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?BN(e,t):t}function J4(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function eM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Ix=Symbol();function UN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ix?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function WN(e,t){return typeof e=="function"?e(...t):!!e}function tM(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var Ac=(()=>{let e=()=>Q4;return{isServer(){return e()},setIsServer(t){e=t}}})();function ov(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var rM=q4;function nM(){let e=[],t=0,r=u=>{u()},n=u=>{u()},i=rM;const o=u=>{t?e.push(u):i(()=>{r(u)})},c=()=>{const u=e;e=[],u.length&&i(()=>{n(()=>{u.forEach(f=>{r(f)})})})};return{batch:u=>{let f;t++;try{f=u()}finally{t--,t||c()}return f},batchCalls:u=>(...f)=>{o(()=>{u(...f)})},schedule:o,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u},setScheduler:u=>{i=u}}}var Yt=nM(),Cs,la,Ps,_N,iM=(_N=class extends Jc{constructor(){super();De(this,Cs,!0);De(this,la);De(this,Ps);ke(this,Ps,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){R(this,la)||this.setEventListener(R(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,la))==null||t.call(this),ke(this,la,void 0))}setEventListener(t){var r;ke(this,Ps,t),(r=R(this,la))==null||r.call(this),ke(this,la,t(this.setOnline.bind(this)))}setOnline(t){R(this,Cs)!==t&&(ke(this,Cs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return R(this,Cs)}},Cs=new WeakMap,la=new WeakMap,Ps=new WeakMap,_N),df=new iM;function aM(e){return Math.min(1e3*2**e,3e4)}function HN(e){return(e??"online")==="online"?df.isOnline():!0}var sv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function KN(e){let t=!1,r=0,n;const i=ov(),o=()=>i.status!=="pending",c=w=>{var k;if(!o()){const N=new sv(w);v(N),(k=e.onCancel)==null||k.call(e,N)}},u=()=>{t=!0},f=()=>{t=!1},h=()=>_x.isFocused()&&(e.networkMode==="always"||df.isOnline())&&e.canRun(),m=()=>HN(e.networkMode)&&e.canRun(),p=w=>{o()||(n==null||n(),i.resolve(w))},v=w=>{o()||(n==null||n(),i.reject(w))},b=()=>new Promise(w=>{var k;n=N=>{(o()||h())&&w(N)},(k=e.onPause)==null||k.call(e)}).then(()=>{var w;n=void 0,o()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(o())return;let w;const k=r===0?e.initialPromise:void 0;try{w=k??e.fn()}catch(N){w=Promise.reject(N)}Promise.resolve(w).then(p).catch(N=>{var O;if(o())return;const E=e.retry??(Ac.isServer()?0:3),C=e.retryDelay??aM,A=typeof C=="function"?C(r,N):C,_=E===!0||typeof E=="number"&&rh()?void 0:b()).then(()=>{t?v(N):S()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(n==null||n(),i),cancelRetry:u,continueRetry:f,canStart:m,start:()=>(m()?S():b().then(S),i)}}var io,MN,GN=(MN=class{constructor(){De(this,io)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rv(this.gcTime)&&ke(this,io,Ya.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ac.isServer()?1/0:300*1e3))}clearGcTimeout(){R(this,io)!==void 0&&(Ya.clearTimeout(R(this,io)),ke(this,io,void 0))}},io=new WeakMap,MN);function oM(e){return{onFetch:(t,r)=>{var m,p,v,b,S;const n=t.options,i=(v=(p=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:p.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],c=((S=t.state.data)==null?void 0:S.pageParams)||[];let u={pages:[],pageParams:[]},f=0;const h=async()=>{let w=!1;const k=C=>{tM(C,()=>t.signal,()=>w=!0)},N=UN(t.options,t.fetchOptions),E=async(C,A,_)=>{if(w)return Promise.reject(t.signal.reason);if(A==null&&C.pages.length)return Promise.resolve(C);const T=(()=>{const q={client:t.client,queryKey:t.queryKey,pageParam:A,direction:_?"backward":"forward",meta:t.options.meta};return k(q),q})(),B=await N(T),{maxPages:z}=t.options,$=_?eM:J4;return{pages:$(C.pages,B,z),pageParams:$(C.pageParams,A,z)}};if(i&&o.length){const C=i==="backward",A=C?sM:Cw,_={pages:o,pageParams:c},O=A(n,_);u=await E(_,O,C)}else{const C=e??o.length;do{const A=f===0?c[0]??n.initialPageParam:Cw(n,u);if(f>0&&A==null)break;u=await E(u,A),f++}while(f{var w,k;return(k=(w=t.options).persister)==null?void 0:k.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function Cw(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function sM(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Os,ao,_s,Xr,oo,$t,qc,so,Lr,VN,li,IN,lM=(IN=class extends GN{constructor(t){super();De(this,Lr);De(this,Os);De(this,ao);De(this,_s);De(this,Xr);De(this,oo);De(this,$t);De(this,qc);De(this,so);ke(this,so,!1),ke(this,qc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ke(this,oo,t.client),ke(this,Xr,R(this,oo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ke(this,ao,Ow(this.options)),this.state=t.state??R(this,ao),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return R(this,Os)}get promise(){var t;return(t=R(this,$t))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,qc),...t},t!=null&&t._type&&ke(this,Os,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Ow(this.options);r.data!==void 0&&(this.setState(Pw(r.data,r.dataUpdatedAt)),ke(this,ao,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Xr).remove(this)}setData(t,r){const n=av(this.state.data,t,this.options);return He(this,Lr,li).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){He(this,Lr,li).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=R(this,$t))==null?void 0:n.promise;return(i=R(this,$t))==null||i.cancel(t),r?r.then(Ar).catch(Ar):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return R(this,ao)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Rr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ix||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pa(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!FN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=R(this,$t))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=R(this,$t))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Xr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(R(this,$t)&&(R(this,so)||He(this,Lr,VN).call(this)?R(this,$t).cancel({revert:!0}):R(this,$t).cancelRetry()),this.scheduleGc()),R(this,Xr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||He(this,Lr,li).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,p,v,b,S,w,k,N,E,C;if(this.state.fetchStatus!=="idle"&&((h=R(this,$t))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(R(this,$t))return R(this,$t).continueRetry(),R(this,$t).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(_=>_.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ke(this,so,!0),n.signal)})},o=()=>{const A=UN(this.options,r),O=(()=>{const T={client:R(this,oo),queryKey:this.queryKey,meta:this.meta};return i(T),T})();return ke(this,so,!1),this.options.persister?this.options.persister(A,O,this):A(O)},u=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:R(this,oo),state:this.state,fetchFn:o};return i(A),A})(),f=R(this,Os)==="infinite"?oM(this.options.pages):this.options.behavior;f==null||f.onFetch(u,this),ke(this,_s,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&He(this,Lr,li).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),ke(this,$t,KN({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:A=>{A instanceof sv&&A.revert&&this.setState({...R(this,_s),fetchStatus:"idle"}),n.abort()},onFail:(A,_)=>{He(this,Lr,li).call(this,{type:"failed",failureCount:A,error:_})},onPause:()=>{He(this,Lr,li).call(this,{type:"pause"})},onContinue:()=>{He(this,Lr,li).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const A=await R(this,$t).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(b=(v=R(this,Xr).config).onSuccess)==null||b.call(v,A,this),(w=(S=R(this,Xr).config).onSettled)==null||w.call(S,A,this.state.error,this),A}catch(A){if(A instanceof sv){if(A.silent)return R(this,$t).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw He(this,Lr,li).call(this,{type:"error",error:A}),(N=(k=R(this,Xr).config).onError)==null||N.call(k,A,this),(C=(E=R(this,Xr).config).onSettled)==null||C.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},Os=new WeakMap,ao=new WeakMap,_s=new WeakMap,Xr=new WeakMap,oo=new WeakMap,$t=new WeakMap,qc=new WeakMap,so=new WeakMap,Lr=new WeakSet,VN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},li=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...qN(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...Pw(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ke(this,_s,t.manual?i:void 0),i;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Yt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),R(this,Xr).notify({query:this,type:"updated",action:t})})},IN);function qN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:HN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Pw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ow(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Er,Ge,Qc,mr,lo,Ms,ui,ca,Yc,Is,Ts,co,uo,ua,Ds,Xe,vc,lv,cv,uv,dv,fv,hv,mv,QN,TN,cM=(TN=class extends Jc{constructor(t,r){super();De(this,Xe);De(this,Er);De(this,Ge);De(this,Qc);De(this,mr);De(this,lo);De(this,Ms);De(this,ui);De(this,ca);De(this,Yc);De(this,Is);De(this,Ts);De(this,co);De(this,uo);De(this,ua);De(this,Ds,new Set);this.options=r,ke(this,Er,t),ke(this,ca,null),ke(this,ui,ov()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Ge).addObserver(this),_w(R(this,Ge),this.options)?He(this,Xe,vc).call(this):this.updateResult(),He(this,Xe,dv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pv(R(this,Ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pv(R(this,Ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,He(this,Xe,fv).call(this),He(this,Xe,hv).call(this),R(this,Ge).removeObserver(this)}setOptions(t){const r=this.options,n=R(this,Ge);if(this.options=R(this,Er).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Rr(this.options.enabled,R(this,Ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");He(this,Xe,mv).call(this),R(this,Ge).setOptions(this.options),r._defaulted&&!nv(this.options,r)&&R(this,Er).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Ge),observer:this});const i=this.hasListeners();i&&Mw(R(this,Ge),n,this.options,r)&&He(this,Xe,vc).call(this),this.updateResult(),i&&(R(this,Ge)!==n||Rr(this.options.enabled,R(this,Ge))!==Rr(r.enabled,R(this,Ge))||pa(this.options.staleTime,R(this,Ge))!==pa(r.staleTime,R(this,Ge)))&&He(this,Xe,lv).call(this);const o=He(this,Xe,cv).call(this);i&&(R(this,Ge)!==n||Rr(this.options.enabled,R(this,Ge))!==Rr(r.enabled,R(this,Ge))||o!==R(this,ua))&&He(this,Xe,uv).call(this,o)}getOptimisticResult(t){const r=R(this,Er).getQueryCache().build(R(this,Er),t),n=this.createResult(r,t);return dM(this,n)&&(ke(this,mr,n),ke(this,Ms,this.options),ke(this,lo,R(this,Ge).state)),n}getCurrentResult(){return R(this,mr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,ui).status==="pending"&&R(this,ui).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){R(this,Ds).add(t)}getCurrentQuery(){return R(this,Ge)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=R(this,Er).defaultQueryOptions(t),n=R(this,Er).getQueryCache().build(R(this,Er),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return He(this,Xe,vc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,mr)))}createResult(t,r){var z;const n=R(this,Ge),i=this.options,o=R(this,mr),c=R(this,lo),u=R(this,Ms),h=t!==n?t.state:R(this,Qc),{state:m}=t;let p={...m},v=!1,b;if(r._optimisticResults){const $=this.hasListeners(),q=!$&&_w(t,r),W=$&&Mw(t,n,r,i);(q||W)&&(p={...p,...qN(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:S,errorUpdatedAt:w,status:k}=p;b=p.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&k==="pending"){let $;o!=null&&o.isPlaceholderData&&r.placeholderData===(u==null?void 0:u.placeholderData)?($=o.data,N=!0):$=typeof r.placeholderData=="function"?r.placeholderData((z=R(this,Ts))==null?void 0:z.state.data,R(this,Ts)):r.placeholderData,$!==void 0&&(k="success",b=av(o==null?void 0:o.data,$,r),v=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(c==null?void 0:c.data)&&r.select===R(this,Yc))b=R(this,Is);else try{ke(this,Yc,r.select),b=r.select(b),b=av(o==null?void 0:o.data,b,r),ke(this,Is,b),ke(this,ca,null)}catch($){ke(this,ca,$)}R(this,ca)&&(S=R(this,ca),b=R(this,Is),w=Date.now(),k="error");const E=p.fetchStatus==="fetching",C=k==="pending",A=k==="error",_=C&&E,O=b!==void 0,B={status:k,fetchStatus:p.fetchStatus,isPending:C,isSuccess:k==="success",isError:A,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:p.dataUpdatedAt,error:S,errorUpdatedAt:w,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!C,isLoadingError:A&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:A&&O,isStale:Tx(t,r),refetch:this.refetch,promise:R(this,ui),isEnabled:Rr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=B.data!==void 0,q=B.status==="error"&&!$,W=ge=>{q?ge.reject(B.error):$&&ge.resolve(B.data)},ve=()=>{const ge=ke(this,ui,B.promise=ov());W(ge)},de=R(this,ui);switch(de.status){case"pending":t.queryHash===n.queryHash&&W(de);break;case"fulfilled":(q||B.data!==de.value)&&ve();break;case"rejected":(!q||B.error!==de.reason)&&ve();break}}return B}updateResult(){const t=R(this,mr),r=this.createResult(R(this,Ge),this.options);if(ke(this,lo,R(this,Ge).state),ke(this,Ms,this.options),R(this,lo).data!==void 0&&ke(this,Ts,R(this,Ge)),nv(r,t))return;ke(this,mr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!R(this,Ds).size)return!0;const c=new Set(o??R(this,Ds));return this.options.throwOnError&&c.add("error"),Object.keys(R(this,mr)).some(u=>{const f=u;return R(this,mr)[f]!==t[f]&&c.has(f)})};He(this,Xe,QN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&He(this,Xe,dv).call(this)}},Er=new WeakMap,Ge=new WeakMap,Qc=new WeakMap,mr=new WeakMap,lo=new WeakMap,Ms=new WeakMap,ui=new WeakMap,ca=new WeakMap,Yc=new WeakMap,Is=new WeakMap,Ts=new WeakMap,co=new WeakMap,uo=new WeakMap,ua=new WeakMap,Ds=new WeakMap,Xe=new WeakSet,vc=function(t){He(this,Xe,mv).call(this);let r=R(this,Ge).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ar)),r},lv=function(){He(this,Xe,fv).call(this);const t=pa(this.options.staleTime,R(this,Ge));if(Ac.isServer()||R(this,mr).isStale||!rv(t))return;const n=FN(R(this,mr).dataUpdatedAt,t)+1;ke(this,co,Ya.setTimeout(()=>{R(this,mr).isStale||this.updateResult()},n))},cv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Ge)):this.options.refetchInterval)??!1},uv=function(t){He(this,Xe,hv).call(this),ke(this,ua,t),!(Ac.isServer()||Rr(this.options.enabled,R(this,Ge))===!1||!rv(R(this,ua))||R(this,ua)===0)&&ke(this,uo,Ya.setInterval(()=>{(this.options.refetchIntervalInBackground||_x.isFocused())&&He(this,Xe,vc).call(this)},R(this,ua)))},dv=function(){He(this,Xe,lv).call(this),He(this,Xe,uv).call(this,He(this,Xe,cv).call(this))},fv=function(){R(this,co)!==void 0&&(Ya.clearTimeout(R(this,co)),ke(this,co,void 0))},hv=function(){R(this,uo)!==void 0&&(Ya.clearInterval(R(this,uo)),ke(this,uo,void 0))},mv=function(){const t=R(this,Er).getQueryCache().build(R(this,Er),this.options);if(t===R(this,Ge))return;const r=R(this,Ge);ke(this,Ge,t),ke(this,Qc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},QN=function(t){Yt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(R(this,mr))}),R(this,Er).getQueryCache().notify({query:R(this,Ge),type:"observerResultsUpdated"})})},TN);function uM(e,t){return Rr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Rr(t.retryOnMount,e)===!1)}function _w(e,t){return uM(e,t)||e.state.data!==void 0&&pv(e,t,t.refetchOnMount)}function pv(e,t,r){if(Rr(t.enabled,e)!==!1&&pa(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Tx(e,t)}return!1}function Mw(e,t,r,n){return(e!==t||Rr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Tx(e,r)}function Tx(e,t){return Rr(t.enabled,e)!==!1&&e.isStaleByTime(pa(t.staleTime,e))}function dM(e,t){return!nv(e.getCurrentResult(),t)}var Zc,Ln,or,fo,Rn,ta,DN,fM=(DN=class extends GN{constructor(t){super();De(this,Rn);De(this,Zc);De(this,Ln);De(this,or);De(this,fo);ke(this,Zc,t.client),this.mutationId=t.mutationId,ke(this,or,t.mutationCache),ke(this,Ln,[]),this.state=t.state||hM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,Ln).includes(t)||(R(this,Ln).push(t),this.clearGcTimeout(),R(this,or).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ke(this,Ln,R(this,Ln).filter(r=>r!==t)),this.scheduleGc(),R(this,or).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,Ln).length||(this.state.status==="pending"?this.scheduleGc():R(this,or).remove(this))}continue(){var t;return((t=R(this,fo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,u,f,h,m,p,v,b,S,w,k,N,E,C,A,_,O,T;const r=()=>{He(this,Rn,ta).call(this,{type:"continue"})},n={client:R(this,Zc),meta:this.options.meta,mutationKey:this.options.mutationKey};ke(this,fo,KN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(B,z)=>{He(this,Rn,ta).call(this,{type:"failed",failureCount:B,error:z})},onPause:()=>{He(this,Rn,ta).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,or).canRun(this)}));const i=this.state.status==="pending",o=!R(this,fo).canStart();try{if(i)r();else{He(this,Rn,ta).call(this,{type:"pending",variables:t,isPaused:o}),R(this,or).config.onMutate&&await R(this,or).config.onMutate(t,this,n);const z=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,t,n));z!==this.state.context&&He(this,Rn,ta).call(this,{type:"pending",context:z,variables:t,isPaused:o})}const B=await R(this,fo).start();return await((h=(f=R(this,or).config).onSuccess)==null?void 0:h.call(f,B,t,this.state.context,this,n)),await((p=(m=this.options).onSuccess)==null?void 0:p.call(m,B,t,this.state.context,n)),await((b=(v=R(this,or).config).onSettled)==null?void 0:b.call(v,B,null,this.state.variables,this.state.context,this,n)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,B,null,t,this.state.context,n)),He(this,Rn,ta).call(this,{type:"success",data:B}),B}catch(B){try{await((N=(k=R(this,or).config).onError)==null?void 0:N.call(k,B,t,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((C=(E=this.options).onError)==null?void 0:C.call(E,B,t,this.state.context,n))}catch(z){Promise.reject(z)}try{await((_=(A=R(this,or).config).onSettled)==null?void 0:_.call(A,void 0,B,this.state.variables,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((T=(O=this.options).onSettled)==null?void 0:T.call(O,void 0,B,t,this.state.context,n))}catch(z){Promise.reject(z)}throw He(this,Rn,ta).call(this,{type:"error",error:B}),B}finally{R(this,or).runNext(this)}}},Zc=new WeakMap,Ln=new WeakMap,or=new WeakMap,fo=new WeakMap,Rn=new WeakSet,ta=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Yt.batch(()=>{R(this,Ln).forEach(n=>{n.onMutationUpdate(t)}),R(this,or).notify({mutation:this,type:"updated",action:t})})},DN);function hM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var di,xn,Xc,LN,mM=(LN=class extends Jc{constructor(t={}){super();De(this,di);De(this,xn);De(this,Xc);this.config=t,ke(this,di,new Set),ke(this,xn,new Map),ke(this,Xc,0)}build(t,r,n){const i=new fM({client:t,mutationCache:this,mutationId:++Ed(this,Xc)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){R(this,di).add(t);const r=Cd(t);if(typeof r=="string"){const n=R(this,xn).get(r);n?n.push(t):R(this,xn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,di).delete(t)){const r=Cd(t);if(typeof r=="string"){const n=R(this,xn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&R(this,xn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Cd(t);if(typeof r=="string"){const n=R(this,xn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Cd(t);if(typeof r=="string"){const i=(n=R(this,xn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Yt.batch(()=>{R(this,di).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,di).clear(),R(this,xn).clear()})}getAll(){return Array.from(R(this,di))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Nw(r,n))}findAll(t={}){return this.getAll().filter(r=>Nw(t,r))}notify(t){Yt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Yt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ar))))}},di=new WeakMap,xn=new WeakMap,Xc=new WeakMap,LN);function Cd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var $n,RN,pM=(RN=class extends Jc{constructor(t={}){super();De(this,$n);this.config=t,ke(this,$n,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??Mx(i,r);let c=this.get(o);return c||(c=new lM({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(c)),c}add(t){R(this,$n).has(t.queryHash)||(R(this,$n).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=R(this,$n).get(t.queryHash);r&&(t.destroy(),r===t&&R(this,$n).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Yt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,$n).get(t)}getAll(){return[...R(this,$n).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Sw(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Sw(t,n)):r}notify(t){Yt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Yt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Yt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$n=new WeakMap,RN),yt,da,fa,Ls,Rs,ha,$s,zs,$N,gM=($N=class{constructor(e={}){De(this,yt);De(this,da);De(this,fa);De(this,Ls);De(this,Rs);De(this,ha);De(this,$s);De(this,zs);ke(this,yt,e.queryCache||new pM),ke(this,da,e.mutationCache||new mM),ke(this,fa,e.defaultOptions||{}),ke(this,Ls,new Map),ke(this,Rs,new Map),ke(this,ha,0)}mount(){Ed(this,ha)._++,R(this,ha)===1&&(ke(this,$s,_x.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,yt).onFocus())})),ke(this,zs,df.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,yt).onOnline())})))}unmount(){var e,t;Ed(this,ha)._--,R(this,ha)===0&&((e=R(this,$s))==null||e.call(this),ke(this,$s,void 0),(t=R(this,zs))==null||t.call(this),ke(this,zs,void 0))}isFetching(e){return R(this,yt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,da).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=R(this,yt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=R(this,yt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(pa(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return R(this,yt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=R(this,yt).get(n.queryHash),o=i==null?void 0:i.state.data,c=Y4(t,o);if(c!==void 0)return R(this,yt).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return Yt.batch(()=>R(this,yt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=R(this,yt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=R(this,yt);Yt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=R(this,yt);return Yt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Yt.batch(()=>R(this,yt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Ar).catch(Ar)}invalidateQueries(e,t={}){return Yt.batch(()=>(R(this,yt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Yt.batch(()=>R(this,yt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(Ar)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Ar)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=R(this,yt).build(this,t);return r.isStaleByTime(pa(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ar).catch(Ar)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ar).catch(Ar)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return df.isOnline()?R(this,da).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,yt)}getMutationCache(){return R(this,da)}getDefaultOptions(){return R(this,fa)}setDefaultOptions(e){ke(this,fa,e)}setQueryDefaults(e,t){R(this,Ls).set(Nc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,Ls).values()],r={};return t.forEach(n=>{Ec(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){R(this,Rs).set(Nc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,Rs).values()],r={};return t.forEach(n=>{Ec(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,fa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mx(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ix&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,fa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,yt).clear(),R(this,da).clear()}},yt=new WeakMap,da=new WeakMap,fa=new WeakMap,Ls=new WeakMap,Rs=new WeakMap,ha=new WeakMap,$s=new WeakMap,zs=new WeakMap,$N),YN=x.createContext(void 0),Hr=e=>{const t=x.useContext(YN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vM=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(YN.Provider,{value:e,children:t})),ZN=x.createContext(!1),xM=()=>x.useContext(ZN);ZN.Provider;function yM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bM=x.createContext(yM()),wM=()=>x.useContext(bM),kM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?WN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},jM=e=>{x.useEffect(()=>{e.clearReset()},[e])},SM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||WN(r,[e.error,n])),NM=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},EM=(e,t)=>e.isLoading&&e.isFetching&&!t,AM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Iw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function CM(e,t,r){var b,S,w,k;const n=xM(),i=wM(),o=Hr(),c=o.defaultQueryOptions(e);(S=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||S.call(b,c);const u=o.getQueryCache().get(c.queryHash),f=e.subscribed!==!1;c._optimisticResults=n?"isRestoring":f?"optimistic":void 0,NM(c),kM(c,i,u),jM(i);const h=!o.getQueryCache().get(c.queryHash),[m]=x.useState(()=>new t(o,c)),p=m.getOptimisticResult(c),v=!n&&f;if(x.useSyncExternalStore(x.useCallback(N=>{const E=v?m.subscribe(Yt.batchCalls(N)):Ar;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),x.useEffect(()=>{m.setOptions(c)},[c,m]),AM(c,p))throw Iw(c,m,i);if(SM({result:p,errorResetBoundary:i,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw p.error;if((k=(w=o.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||k.call(w,c,p),c.experimental_prefetchInRender&&!Ac.isServer()&&EM(p,n)){const N=h?Iw(c,m,i):u==null?void 0:u.promise;N==null||N.catch(Ar).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?p:m.trackResult(p)}function vt(e,t){return CM(e,cM)}/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const PM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),XN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var OM={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _M=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:c,...u},f)=>x.createElement("svg",{ref:f,...OM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:XN("lucide",i),...u},[...c.map(([h,m])=>x.createElement(h,m)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ce=(e,t)=>{const r=x.forwardRef(({className:n,...i},o)=>x.createElement(_M,{ref:o,iconNode:t,className:XN(`lucide-${PM(e)}`,n),...i}));return r.displayName=`${e}`,r};/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hh=ce("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JN=ce("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tw=ce("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e5=ce("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wc=ce("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MM=ce("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const IM=ce("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t5=ce("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gv=ce("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TM=ce("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Hn=ce("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DM=ce("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ff=ce("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const LM=ce("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RM=ce("BrainCog",[["path",{d:"M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588 4 4 0 0 0 7.636 2.106 3.2 3.2 0 0 0 .164-.546c.028-.13.306-.13.335 0a3.2 3.2 0 0 0 .163.546 4 4 0 0 0 7.636-2.106 4 4 0 0 0 .556-6.588 4 4 0 0 0-2.526-5.77A3 3 0 1 0 12 5",key:"1kgmhc"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m15.7 10.4-.9.4",key:"ayzo6p"}],["path",{d:"m9.2 13.2-.9.4",key:"1uzb3g"}],["path",{d:"m13.6 15.7-.4-.9",key:"11ifqf"}],["path",{d:"m10.8 9.2-.4-.9",key:"1pmk2v"}],["path",{d:"m15.7 13.5-.9-.4",key:"7ng02m"}],["path",{d:"m9.2 10.9-.9-.4",key:"1x66zd"}],["path",{d:"m10.5 15.7.4-.9",key:"3js94g"}],["path",{d:"m13.1 9.2.4-.9",key:"18n7mc"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sa=ce("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $M=ce("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mt=ce("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tl=ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zM=ce("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Kn=ce("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r5=ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FM=ce("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const n5=ce("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BM=ce("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const UM=ce("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mh=ce("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const WM=ce("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const HM=ce("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fs=ce("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const KM=ce("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vv=ce("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const GM=ce("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xv=ce("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yi=ce("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VM=ce("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bs=ce("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dx=ce("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dw=ce("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cc=ce("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qM=ce("FileDiff",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const i5=ce("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QM=ce("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a5=ce("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o5=ce("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const YM=ce("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZM=ce("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XM=ce("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JM=ce("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ga=ce("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lx=ce("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eI=ce("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const s5=ce("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eu=ce("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ag=ce("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tI=ce("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const og=ce("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l5=ce("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rI=ce("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c5=ce("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nI=ce("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iI=ce("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aI=ce("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oI=ce("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bt=ce("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const u5=ce("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sI=ce("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lI=ce("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cI=ce("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uI=ce("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dI=ce("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fI=ce("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lw=ce("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d5=ce("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hI=ce("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rw=ce("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f5=ce("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pc=ce("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hf=ce("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mI=ce("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const h5=ce("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pI=ce("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gI=ce("Radar",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ho=ce("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vI=ce("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rx=ce("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m5=ce("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xI=ce("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rl=ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yI=ce("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ph=ce("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $w=ce("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $x=ce("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const p5=ce("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bI=ce("ShieldQuestion",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nl=ce("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const g5=ce("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wI=ce("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kI=ce("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const va=ce("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const v5=ce("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jI=ce("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SI=ce("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x5=ce("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Us=ce("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vr=ce("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NI=ce("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tu=ce("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Br=ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wa=ce("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),gs=[{id:"dashboard",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:rI,group:"Operativ"},{id:"auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:eu,group:"Operativ"},{id:"chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:s5,group:"Operativ"},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Sa,group:"Wissen"},{id:"wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:c5,group:"Wissen"},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Pc,group:"Werkzeuge"},{id:"konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:v5,group:"Werkzeuge"},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:BM,group:"Werkzeuge"},{id:"models",label:"Modelle",hint:"Speicher, laden & Rollen",icon:ff,group:"Wartung"},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Hn,group:"Wartung"}];var zw=1,EI=.9,AI=.8,CI=.17,sg=.1,lg=.999,PI=.9999,OI=.99,_I=/[\\\/_+.#"@\[\(\{&]/,MI=/[\\\/_+.#"@\[\(\{&]/g,II=/[\s-]/,y5=/[\s-]/g;function yv(e,t,r,n,i,o,c){if(o===t.length)return i===e.length?zw:OI;var u=`${i},${o}`;if(c[u]!==void 0)return c[u];for(var f=n.charAt(o),h=r.indexOf(f,i),m=0,p,v,b,S;h>=0;)p=yv(e,t,r,n,h+1,o+1,c),p>m&&(h===i?p*=zw:_I.test(e.charAt(h-1))?(p*=AI,b=e.slice(i,h-1).match(MI),b&&i>0&&(p*=Math.pow(lg,b.length))):II.test(e.charAt(h-1))?(p*=EI,S=e.slice(i,h-1).match(y5),S&&i>0&&(p*=Math.pow(lg,S.length))):(p*=CI,i>0&&(p*=Math.pow(lg,h-i))),e.charAt(h)!==t.charAt(o)&&(p*=PI)),(pp&&(p=v*sg)),p>m&&(m=p),h=r.indexOf(f,h+1);return c[u]=m,m}function Fw(e){return e.toLowerCase().replace(y5," ")}function TI(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,yv(e,t,Fw(e),Fw(t),0,0,{})}function xa(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Bw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ws(...e){return t=>{let r=!1;const n=e.map(i=>{const o=Bw(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i{var N;const{scope:v,children:b,...S}=p,w=((N=v==null?void 0:v[e])==null?void 0:N[f])||u,k=x.useMemo(()=>S,Object.values(S));return s.jsx(w.Provider,{value:k,children:b})};h.displayName=o+"Provider";function m(p,v){var w;const b=((w=v==null?void 0:v[e])==null?void 0:w[f])||u,S=x.useContext(b);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[h,m]}const i=()=>{const o=r.map(c=>x.createContext(c));return function(u){const f=(u==null?void 0:u[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,LI(i,...t)]}function LI(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const c=n.reduce((u,{useScope:f,scopeName:h})=>{const p=f(o)[`__scope${h}`];return{...u,...p}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}var Oc=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},RI=fh[" useId ".trim().toString()]||(()=>{}),$I=0;function gi(e){const[t,r]=x.useState(RI());return Oc(()=>{r(n=>n??String($I++))},[e]),t?`radix-${t}`:""}var zI=fh[" useInsertionEffect ".trim().toString()]||Oc;function FI({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,c]=BI({defaultProp:t,onChange:r}),u=e!==void 0,f=u?e:i;{const m=x.useRef(e!==void 0);x.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,n])}const h=x.useCallback(m=>{var p;if(u){const v=UI(m)?m(e):m;v!==e&&((p=c.current)==null||p.call(c,v))}else o(m)},[u,e,o,c]);return[f,h]}function BI({defaultProp:e,onChange:t}){const[r,n]=x.useState(e),i=x.useRef(r),o=x.useRef(t);return zI(()=>{o.current=t},[t]),x.useEffect(()=>{var c;i.current!==r&&((c=o.current)==null||c.call(o,r),i.current=r)},[r,i]),[r,n,o]}function UI(e){return typeof e=="function"}var gh=zN();function b5(e){const t=x.forwardRef((r,n)=>{let{children:i,...o}=r,c=null,u=!1;const f=[];Uw(i)&&typeof Pd=="function"&&(i=Pd(i._payload)),x.Children.forEach(i,v=>{var b;if(VI(v)){u=!0;const S=v;let w="child"in S.props?S.props.child:S.props.children;Uw(w)&&typeof Pd=="function"&&(w=Pd(w._payload)),c=HI(S,w),f.push((b=c==null?void 0:c.props)==null?void 0:b.children)}else f.push(v)}),c?c=x.cloneElement(c,void 0,f):!u&&x.Children.count(i)===1&&x.isValidElement(i)&&(c=i);const h=c?GI(c):void 0,m=Ao(n,h);if(!c){if(i||i===0)throw new Error(u?ZI(e):YI(e));return i}const p=KI(o,c.props??{});return c.type!==x.Fragment&&(p.ref=n?m:h),x.cloneElement(c,p)});return t.displayName=`${e}.Slot`,t}var WI=Symbol.for("radix.slottable"),HI=(e,t)=>{if("child"in e.props){const r=e.props.child;return x.isValidElement(r)?x.cloneElement(r,void 0,e.props.children(r.props.children)):null}return x.isValidElement(t)?t:null};function KI(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...u)=>{const f=o(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function GI(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function VI(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===WI}var qI=Symbol.for("react.lazy");function Uw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===qI&&"_payload"in e&&QI(e._payload)}function QI(e){return typeof e=="object"&&e!==null&&"then"in e}var YI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,ZI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Pd=fh[" use ".trim().toString()],XI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Jt=XI.reduce((e,t)=>{const r=b5(`Primitive.${t}`),n=x.forwardRef((i,o)=>{const{asChild:c,...u}=i,f=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(f,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function JI(e,t){e&&gh.flushSync(()=>e.dispatchEvent(t))}function _c(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function eT(e,t=globalThis==null?void 0:globalThis.document){const r=_c(e);x.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var tT="DismissableLayer",bv="dismissableLayer.update",rT="dismissableLayer.pointerDownOutside",nT="dismissableLayer.focusOutside",Ww,zx=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),w5=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...h}=e,m=x.useContext(zx),[p,v]=x.useState(null),b=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=x.useState({}),w=Ao(t,z=>v(z)),k=Array.from(m.layers),[N]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(N),C=p?k.indexOf(p):-1,A=m.layersWithOutsidePointerEventsDisabled.size>0,_=C>=E,O=x.useRef(!1),T=sT(z=>{const $=z.target;if(!($ instanceof Node))return;const q=[...m.branches].some(W=>W.contains($));!_||q||(o==null||o(z),u==null||u(z),z.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:m.dismissableSurfaces}),B=lT(z=>{if(n&&O.current)return;const $=z.target;[...m.branches].some(W=>W.contains($))||(c==null||c(z),u==null||u(z),z.defaultPrevented||f==null||f())},b);return eT(z=>{C===m.layers.size-1&&(i==null||i(z),!z.defaultPrevented&&f&&(z.preventDefault(),f()))},b),x.useEffect(()=>{if(p)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Ww=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(p)),m.layers.add(p),Hw(),()=>{r&&(m.layersWithOutsidePointerEventsDisabled.delete(p),m.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=Ww))}},[p,b,r,m]),x.useEffect(()=>()=>{p&&(m.layers.delete(p),m.layersWithOutsidePointerEventsDisabled.delete(p),Hw())},[p,m]),x.useEffect(()=>{const z=()=>S({});return document.addEventListener(bv,z),()=>document.removeEventListener(bv,z)},[]),s.jsx(Jt.div,{...h,ref:w,style:{pointerEvents:A?_?"auto":"none":void 0,...e.style},onFocusCapture:xa(e.onFocusCapture,B.onFocusCapture),onBlurCapture:xa(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:xa(e.onPointerDownCapture,T.onPointerDownCapture)})});w5.displayName=tT;var iT="DismissableLayerBranch",aT=x.forwardRef((e,t)=>{const r=x.useContext(zx),n=x.useRef(null),i=Ao(t,n);return x.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),s.jsx(Jt.div,{...e,ref:i})});aT.displayName=iT;function oT(){const e=x.useContext(zx),[t,r]=x.useState(null);return x.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function sT(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,c=_c(e),u=x.useRef(!1),f=x.useRef(!1),h=x.useRef(new Map),m=x.useRef(()=>{});return x.useEffect(()=>{function p(){f.current=!1,i.current=!1,h.current.clear()}function v(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const C=E.target;C instanceof Node&&[...o].some(_=>_.contains(C))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function S(E){f.current&&h.current.set(E.type,!1)}const w=E=>{if(E.target&&!u.current){let C=function(){r.removeEventListener("click",m.current);const _=v();p(),_||k5(rT,c,A,{discrete:!0})};const A={originalEvent:E};f.current=!0,i.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?C():(r.removeEventListener("click",m.current),m.current=C,r.addEventListener("click",m.current,{once:!0}))}else r.removeEventListener("click",m.current),p();u.current=!1},k=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of k)r.addEventListener(E,b,!0),r.addEventListener(E,S);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",w),r.removeEventListener("click",m.current);for(const E of k)r.removeEventListener(E,b,!0),r.removeEventListener(E,S)}},[r,c,n,i,o]),{onPointerDownCapture:()=>u.current=!0}}function lT(e,t=globalThis==null?void 0:globalThis.document){const r=_c(e),n=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!n.current&&k5(nT,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Hw(){const e=new CustomEvent(bv);document.dispatchEvent(e)}function k5(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?JI(i,o):i.dispatchEvent(o)}var cg="focusScope.autoFocusOnMount",ug="focusScope.autoFocusOnUnmount",Kw={bubbles:!1,cancelable:!0},cT="FocusScope",j5=x.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...c}=e,[u,f]=x.useState(null),h=_c(i),m=_c(o),p=x.useRef(null),v=Ao(t,w=>f(w)),b=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let w=function(C){if(b.paused||!u)return;const A=C.target;u.contains(A)?p.current=A:ra(p.current,{select:!0})},k=function(C){if(b.paused||!u)return;const A=C.relatedTarget;A!==null&&(u.contains(A)||ra(p.current,{select:!0}))},N=function(C){if(document.activeElement===document.body)for(const _ of C)_.removedNodes.length>0&&ra(u)};document.addEventListener("focusin",w),document.addEventListener("focusout",k);const E=new MutationObserver(N);return u&&E.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",k),E.disconnect()}}},[n,u,b.paused]),x.useEffect(()=>{if(u){Vw.add(b);const w=document.activeElement;if(!u.contains(w)){const N=new CustomEvent(cg,Kw);u.addEventListener(cg,h),u.dispatchEvent(N),N.defaultPrevented||(uT(pT(S5(u)),{select:!0}),document.activeElement===w&&ra(u))}return()=>{u.removeEventListener(cg,h),setTimeout(()=>{const N=new CustomEvent(ug,Kw);u.addEventListener(ug,m),u.dispatchEvent(N),N.defaultPrevented||ra(w??document.body,{select:!0}),u.removeEventListener(ug,m),Vw.remove(b)},0)}}},[u,h,m,b]);const S=x.useCallback(w=>{if(!r&&!n||b.paused)return;const k=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,N=document.activeElement;if(k&&N){const E=w.currentTarget,[C,A]=dT(E);C&&A?!w.shiftKey&&N===A?(w.preventDefault(),r&&ra(C,{select:!0})):w.shiftKey&&N===C&&(w.preventDefault(),r&&ra(A,{select:!0})):N===E&&w.preventDefault()}},[r,n,b.paused]);return s.jsx(Jt.div,{tabIndex:-1,...c,ref:v,onKeyDown:S})});j5.displayName=cT;function uT(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ra(n,{select:t}),document.activeElement!==r)return}function dT(e){const t=S5(e),r=Gw(t,e),n=Gw(t.reverse(),e);return[r,n]}function S5(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Gw(e,t){for(const r of e)if(!fT(r,{upTo:t}))return r}function fT(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hT(e){return e instanceof HTMLInputElement&&"select"in e}function ra(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&hT(e)&&t&&e.select()}}var Vw=mT();function mT(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=qw(e,t),e.unshift(t)},remove(t){var r;e=qw(e,t),(r=e[0])==null||r.resume()}}}function qw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function pT(e){return e.filter(t=>t.tagName!=="A")}var gT="Portal",N5=x.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=x.useState(!1);Oc(()=>o(!0),[]);const c=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?gh.createPortal(s.jsx(Jt.div,{...n,ref:t}),c):null});N5.displayName=gT;function vT(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var vh=e=>{const{present:t,children:r}=e,n=xT(t),i=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),o=yT(n.ref,bT(i));return typeof r=="function"||n.isPresent?x.cloneElement(i,{ref:o}):null};vh.displayName="Presence";function xT(e){const[t,r]=x.useState(),n=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),c=e?"mounted":"unmounted",[u,f]=vT(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const h=Od(n.current);o.current=u==="mounted"?h:"none"},[u]),Oc(()=>{const h=n.current,m=i.current;if(m!==e){const v=o.current,b=Od(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Oc(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,p=b=>{const w=Od(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&w&&(f("ANIMATION_END"),!i.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},v=b=>{b.target===t&&(o.current=Od(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:x.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function Qw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yT(...e){const t=x.useRef(e);return t.current=e,x.useCallback(r=>{const n=t.current;let i=!1;const o=n.map(c=>{const u=Qw(c,r);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let c=0;c{Mn||(Mn={start:Yw(),end:Yw()});const{start:e,end:t}=Mn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),_d++,()=>{_d===1&&(Mn==null||Mn.start.remove(),Mn==null||Mn.end.remove(),Mn=null),_d=Math.max(0,_d-1)}},[])}function Yw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var zn=function(){return zn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return $T;var t=zT(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},BT=P5(),ks="data-scroll-locked",UT=function(e,t,r,n){var i=e.left,o=e.top,c=e.right,u=e.gap;return r===void 0&&(r="margin"),` + .`.concat(jT,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(u,"px ").concat(n,`; + } + body[`).concat(ks,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(c,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(u,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(u,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(tf,` { + right: `).concat(u,"px ").concat(n,`; + } + + .`).concat(rf,` { + margin-right: `).concat(u,"px ").concat(n,`; + } + + .`).concat(tf," .").concat(tf,` { + right: 0 `).concat(n,`; + } + + .`).concat(rf," .").concat(rf,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(ks,`] { + `).concat(ST,": ").concat(u,`px; + } +`)},Xw=function(){var e=parseInt(document.body.getAttribute(ks)||"0",10);return isFinite(e)?e:0},WT=function(){x.useEffect(function(){return document.body.setAttribute(ks,(Xw()+1).toString()),function(){var e=Xw()-1;e<=0?document.body.removeAttribute(ks):document.body.setAttribute(ks,e.toString())}},[])},HT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;WT();var o=x.useMemo(function(){return FT(i)},[i]);return x.createElement(BT,{styles:UT(o,!t,i,r?"":"!important")})},wv=!1;if(typeof window<"u")try{var Md=Object.defineProperty({},"passive",{get:function(){return wv=!0,!0}});window.addEventListener("test",Md,Md),window.removeEventListener("test",Md,Md)}catch{wv=!1}var is=wv?{passive:!1}:!1,KT=function(e){return e.tagName==="TEXTAREA"},O5=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!KT(e)&&r[t]==="visible")},GT=function(e){return O5(e,"overflowY")},VT=function(e){return O5(e,"overflowX")},Jw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=_5(e,n);if(i){var o=M5(e,n),c=o[1],u=o[2];if(c>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},qT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},QT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},_5=function(e,t){return e==="v"?GT(t):VT(t)},M5=function(e,t){return e==="v"?qT(t):QT(t)},YT=function(e,t){return e==="h"&&t==="rtl"?-1:1},ZT=function(e,t,r,n,i){var o=YT(e,window.getComputedStyle(t).direction),c=o*n,u=r.target,f=t.contains(u),h=!1,m=c>0,p=0,v=0;do{if(!u)break;var b=M5(e,u),S=b[0],w=b[1],k=b[2],N=w-k-o*S;(S||N)&&_5(e,u)&&(p+=N,v+=S);var E=u.parentNode;u=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(v)<1)&&(h=!0),h},Id=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ek=function(e){return[e.deltaX,e.deltaY]},tk=function(e){return e&&"current"in e?e.current:e},XT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},JT=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},eD=0,as=[];function tD(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),i=x.useState(eD++)[0],o=x.useState(P5)[0],c=x.useRef(e);x.useEffect(function(){c.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=kT([e.lockRef.current],(e.shards||[]).map(tk),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=x.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!c.current.allowPinchZoom;var N=Id(w),E=r.current,C="deltaX"in w?w.deltaX:E[0]-N[0],A="deltaY"in w?w.deltaY:E[1]-N[1],_,O=w.target,T=Math.abs(C)>Math.abs(A)?"h":"v";if("touches"in w&&T==="h"&&O.type==="range")return!1;var B=window.getSelection(),z=B&&B.anchorNode,$=z?z===O||z.contains(O):!1;if($)return!1;var q=Jw(T,O);if(!q)return!0;if(q?_=T:(_=T==="v"?"h":"v",q=Jw(T,O)),!q)return!1;if(!n.current&&"changedTouches"in w&&(C||A)&&(n.current=_),!_)return!0;var W=n.current||_;return ZT(W,k,w,W==="h"?C:A)},[]),f=x.useCallback(function(w){var k=w;if(!(!as.length||as[as.length-1]!==o)){var N="deltaY"in k?ek(k):Id(k),E=t.current.filter(function(_){return _.name===k.type&&(_.target===k.target||k.target===_.shadowParent)&&XT(_.delta,N)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var C=(c.current.shards||[]).map(tk).filter(Boolean).filter(function(_){return _.contains(k.target)}),A=C.length>0?u(k,C[0]):!c.current.noIsolation;A&&k.cancelable&&k.preventDefault()}}},[]),h=x.useCallback(function(w,k,N,E){var C={name:w,delta:k,target:N,should:E,shadowParent:rD(N)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(A){return A!==C})},1)},[]),m=x.useCallback(function(w){r.current=Id(w),n.current=void 0},[]),p=x.useCallback(function(w){h(w.type,ek(w),w.target,u(w,e.lockRef.current))},[]),v=x.useCallback(function(w){h(w.type,Id(w),w.target,u(w,e.lockRef.current))},[]);x.useEffect(function(){return as.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",f,is),document.addEventListener("touchmove",f,is),document.addEventListener("touchstart",m,is),function(){as=as.filter(function(w){return w!==o}),document.removeEventListener("wheel",f,is),document.removeEventListener("touchmove",f,is),document.removeEventListener("touchstart",m,is)}},[]);var b=e.removeScrollBar,S=e.inert;return x.createElement(x.Fragment,null,S?x.createElement(o,{styles:JT(i)}):null,b?x.createElement(HT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const nD=_T(C5,tD);var I5=x.forwardRef(function(e,t){return x.createElement(xh,zn({},e,{ref:t,sideCar:nD}))});I5.classNames=xh.classNames;var iD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},os=new WeakMap,Td=new WeakMap,Dd={},mg=0,T5=function(e){return e&&(e.host||T5(e.parentNode))},aD=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=T5(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},oD=function(e,t,r,n){var i=aD(t,Array.isArray(e)?e:[e]);Dd[r]||(Dd[r]=new WeakMap);var o=Dd[r],c=[],u=new Set,f=new Set(i),h=function(p){!p||u.has(p)||(u.add(p),h(p.parentNode))};i.forEach(h);var m=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(v){if(u.has(v))m(v);else try{var b=v.getAttribute(n),S=b!==null&&b!=="false",w=(os.get(v)||0)+1,k=(o.get(v)||0)+1;os.set(v,w),o.set(v,k),c.push(v),w===1&&S&&Td.set(v,!0),k===1&&v.setAttribute(r,"true"),S||v.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",v,N)}})};return m(t),u.clear(),mg++,function(){c.forEach(function(p){var v=os.get(p)-1,b=o.get(p)-1;os.set(p,v),o.set(p,b),v||(Td.has(p)||p.removeAttribute(n),Td.delete(p)),b||p.removeAttribute(r)}),mg--,mg||(os=new WeakMap,os=new WeakMap,Td=new WeakMap,Dd={})}},sD=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=iD(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),oD(n,i,r,"aria-hidden")):function(){return null}},yh="Dialog",[D5]=DI(yh),[lD,Sn]=D5(yh),L5=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:c=!0}=e,u=x.useRef(null),f=x.useRef(null),[h,m]=FI({prop:n,defaultProp:i??!1,onChange:o,caller:yh});return s.jsx(lD,{scope:t,triggerRef:u,contentRef:f,contentId:gi(),titleId:gi(),descriptionId:gi(),open:h,onOpenChange:m,onOpenToggle:x.useCallback(()=>m(p=>!p),[m]),modal:c,children:r})};L5.displayName=yh;var R5="DialogTrigger",cD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(R5,r),o=Ao(t,i.triggerRef);return s.jsx(Jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Bx(i.open),...n,ref:o,onClick:xa(e.onClick,i.onOpenToggle)})});cD.displayName=R5;var Fx="DialogPortal",[uD,$5]=D5(Fx,{forceMount:void 0}),z5=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=Sn(Fx,t);return s.jsx(uD,{scope:t,forceMount:r,children:x.Children.map(n,c=>s.jsx(vh,{present:r||o.open,children:s.jsx(N5,{asChild:!0,container:i,children:c})}))})};z5.displayName=Fx;var mf="DialogOverlay",F5=x.forwardRef((e,t)=>{const r=$5(mf,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=Sn(mf,e.__scopeDialog);return o.modal?s.jsx(vh,{present:n||o.open,children:s.jsx(fD,{...i,ref:t})}):null});F5.displayName=mf;var dD=b5("DialogOverlay.RemoveScroll"),fD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(mf,r),o=oT(),c=Ao(t,o);return s.jsx(I5,{as:dD,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsx(Jt.div,{"data-state":Bx(i.open),...n,ref:c,style:{pointerEvents:"auto",...n.style}})})}),Hs="DialogContent",B5=x.forwardRef((e,t)=>{const r=$5(Hs,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=Sn(Hs,e.__scopeDialog);return s.jsx(vh,{present:n||o.open,children:o.modal?s.jsx(hD,{...i,ref:t}):s.jsx(mD,{...i,ref:t})})});B5.displayName=Hs;var hD=x.forwardRef((e,t)=>{const r=Sn(Hs,e.__scopeDialog),n=x.useRef(null),i=Ao(t,r.contentRef,n);return x.useEffect(()=>{const o=n.current;if(o)return sD(o)},[]),s.jsx(U5,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:xa(e.onCloseAutoFocus,o=>{var c;o.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:xa(e.onPointerDownOutside,o=>{const c=o.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&o.preventDefault()}),onFocusOutside:xa(e.onFocusOutside,o=>o.preventDefault())})}),mD=x.forwardRef((e,t)=>{const r=Sn(Hs,e.__scopeDialog),n=x.useRef(!1),i=x.useRef(!1);return s.jsx(U5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,o),o.defaultPrevented||(n.current||(u=r.triggerRef.current)==null||u.focus(),o.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:o=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),U5=x.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...c}=e,u=Sn(Hs,r);return wT(),s.jsx(s.Fragment,{children:s.jsx(j5,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:s.jsx(w5,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Bx(u.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})}),W5="DialogTitle",pD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(W5,r);return s.jsx(Jt.h2,{id:i.titleId,...n,ref:t})});pD.displayName=W5;var H5="DialogDescription",gD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(H5,r);return s.jsx(Jt.p,{id:i.descriptionId,...n,ref:t})});gD.displayName=H5;var K5="DialogClose",vD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(K5,r);return s.jsx(Jt.button,{type:"button",...n,ref:t,onClick:xa(e.onClick,()=>i.onOpenChange(!1))})});vD.displayName=K5;function Bx(e){return e?"open":"closed"}var nc='[cmdk-group=""]',pg='[cmdk-group-items=""]',xD='[cmdk-group-heading=""]',G5='[cmdk-item=""]',rk=`${G5}:not([aria-disabled="true"])`,kv="cmdk-item-select",vs="data-value",yD=(e,t,r)=>TI(e,t,r),V5=x.createContext(void 0),ru=()=>x.useContext(V5),q5=x.createContext(void 0),Ux=()=>x.useContext(q5),Q5=x.createContext(void 0),Y5=x.forwardRef((e,t)=>{let r=xs(()=>{var M,Q;return{search:"",value:(Q=(M=e.value)!=null?M:e.defaultValue)!=null?Q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=xs(()=>new Set),i=xs(()=>new Map),o=xs(()=>new Map),c=xs(()=>new Set),u=Z5(e),{label:f,children:h,value:m,onValueChange:p,filter:v,shouldFilter:b,loop:S,disablePointerSelection:w=!1,vimBindings:k=!0,...N}=e,E=gi(),C=gi(),A=gi(),_=x.useRef(null),O=OD();xo(()=>{if(m!==void 0){let M=m.trim();r.current.value=M,T.emit()}},[m]),xo(()=>{O(6,ve)},[]);let T=x.useMemo(()=>({subscribe:M=>(c.current.add(M),()=>c.current.delete(M)),snapshot:()=>r.current,setState:(M,Q,ne)=>{var ae,ee,se,me;if(!Object.is(r.current[M],Q)){if(r.current[M]=Q,M==="search")W(),$(),O(1,q);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(A);U?U.focus():(ae=document.getElementById(E))==null||ae.focus()}if(O(7,()=>{var U;r.current.selectedItemId=(U=de())==null?void 0:U.id,T.emit()}),ne||O(5,ve),((ee=u.current)==null?void 0:ee.value)!==void 0){let U=Q??"";(me=(se=u.current).onValueChange)==null||me.call(se,U);return}}T.emit()}},emit:()=>{c.current.forEach(M=>M())}}),[]),B=x.useMemo(()=>({value:(M,Q,ne)=>{var ae;Q!==((ae=o.current.get(M))==null?void 0:ae.value)&&(o.current.set(M,{value:Q,keywords:ne}),r.current.filtered.items.set(M,z(Q,ne)),O(2,()=>{$(),T.emit()}))},item:(M,Q)=>(n.current.add(M),Q&&(i.current.has(Q)?i.current.get(Q).add(M):i.current.set(Q,new Set([M]))),O(3,()=>{W(),$(),r.current.value||q(),T.emit()}),()=>{o.current.delete(M),n.current.delete(M),r.current.filtered.items.delete(M);let ne=de();O(4,()=>{W(),(ne==null?void 0:ne.getAttribute("id"))===M&&q(),T.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{o.current.delete(M),i.current.delete(M)}),filter:()=>u.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:E,inputId:A,labelId:C,listInnerRef:_}),[]);function z(M,Q){var ne,ae;let ee=(ae=(ne=u.current)==null?void 0:ne.filter)!=null?ae:yD;return M?ee(M,r.current.search,Q):0}function $(){if(!r.current.search||u.current.shouldFilter===!1)return;let M=r.current.filtered.items,Q=[];r.current.filtered.groups.forEach(ae=>{let ee=i.current.get(ae),se=0;ee.forEach(me=>{let U=M.get(me);se=Math.max(U,se)}),Q.push([ae,se])});let ne=_.current;ge().sort((ae,ee)=>{var se,me;let U=ae.getAttribute("id"),ue=ee.getAttribute("id");return((se=M.get(ue))!=null?se:0)-((me=M.get(U))!=null?me:0)}).forEach(ae=>{let ee=ae.closest(pg);ee?ee.appendChild(ae.parentElement===ee?ae:ae.closest(`${pg} > *`)):ne.appendChild(ae.parentElement===ne?ae:ae.closest(`${pg} > *`))}),Q.sort((ae,ee)=>ee[1]-ae[1]).forEach(ae=>{var ee;let se=(ee=_.current)==null?void 0:ee.querySelector(`${nc}[${vs}="${encodeURIComponent(ae[0])}"]`);se==null||se.parentElement.appendChild(se)})}function q(){let M=ge().find(ne=>ne.getAttribute("aria-disabled")!=="true"),Q=M==null?void 0:M.getAttribute(vs);T.setState("value",Q||void 0)}function W(){var M,Q,ne,ae;if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ee=0;for(let se of n.current){let me=(Q=(M=o.current.get(se))==null?void 0:M.value)!=null?Q:"",U=(ae=(ne=o.current.get(se))==null?void 0:ne.keywords)!=null?ae:[],ue=z(me,U);r.current.filtered.items.set(se,ue),ue>0&&ee++}for(let[se,me]of i.current)for(let U of me)if(r.current.filtered.items.get(U)>0){r.current.filtered.groups.add(se);break}r.current.filtered.count=ee}function ve(){var M,Q,ne;let ae=de();ae&&(((M=ae.parentElement)==null?void 0:M.firstChild)===ae&&((ne=(Q=ae.closest(nc))==null?void 0:Q.querySelector(xD))==null||ne.scrollIntoView({block:"nearest"})),ae.scrollIntoView({block:"nearest"}))}function de(){var M;return(M=_.current)==null?void 0:M.querySelector(`${G5}[aria-selected="true"]`)}function ge(){var M;return Array.from(((M=_.current)==null?void 0:M.querySelectorAll(rk))||[])}function le(M){let Q=ge()[M];Q&&T.setState("value",Q.getAttribute(vs))}function ie(M){var Q;let ne=de(),ae=ge(),ee=ae.findIndex(me=>me===ne),se=ae[ee+M];(Q=u.current)!=null&&Q.loop&&(se=ee+M<0?ae[ae.length-1]:ee+M===ae.length?ae[0]:ae[ee+M]),se&&T.setState("value",se.getAttribute(vs))}function X(M){let Q=de(),ne=Q==null?void 0:Q.closest(nc),ae;for(;ne&&!ae;)ne=M>0?CD(ne,nc):PD(ne,nc),ae=ne==null?void 0:ne.querySelector(rk);ae?T.setState("value",ae.getAttribute(vs)):ie(M)}let te=()=>le(ge().length-1),re=M=>{M.preventDefault(),M.metaKey?te():M.altKey?X(1):ie(1)},D=M=>{M.preventDefault(),M.metaKey?le(0):M.altKey?X(-1):ie(-1)};return x.createElement(Jt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:M=>{var Q;(Q=N.onKeyDown)==null||Q.call(N,M);let ne=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||ne))switch(M.key){case"n":case"j":{k&&M.ctrlKey&&re(M);break}case"ArrowDown":{re(M);break}case"p":case"k":{k&&M.ctrlKey&&D(M);break}case"ArrowUp":{D(M);break}case"Home":{M.preventDefault(),le(0);break}case"End":{M.preventDefault(),te();break}case"Enter":{M.preventDefault();let ae=de();if(ae){let ee=new Event(kv);ae.dispatchEvent(ee)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:MD},f),bh(e,M=>x.createElement(q5.Provider,{value:T},x.createElement(V5.Provider,{value:B},M))))}),bD=x.forwardRef((e,t)=>{var r,n;let i=gi(),o=x.useRef(null),c=x.useContext(Q5),u=ru(),f=Z5(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:c==null?void 0:c.forceMount;xo(()=>{if(!h)return u.item(i,c==null?void 0:c.id)},[h]);let m=X5(i,o,[e.value,e.children,o],e.keywords),p=Ux(),v=ka(O=>O.value&&O.value===m.current),b=ka(O=>h||u.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);x.useEffect(()=>{let O=o.current;if(!(!O||e.disabled))return O.addEventListener(kv,S),()=>O.removeEventListener(kv,S)},[b,e.onSelect,e.disabled]);function S(){var O,T;w(),(T=(O=f.current).onSelect)==null||T.call(O,m.current)}function w(){p.setState("value",m.current,!0)}if(!b)return null;let{disabled:k,value:N,onSelect:E,forceMount:C,keywords:A,..._}=e;return x.createElement(Jt.div,{ref:Ws(o,t),..._,id:i,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!v,"data-disabled":!!k,"data-selected":!!v,onPointerMove:k||u.getDisablePointerSelection()?void 0:w,onClick:k?void 0:S},e.children)}),wD=x.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,c=gi(),u=x.useRef(null),f=x.useRef(null),h=gi(),m=ru(),p=ka(b=>i||m.filter()===!1?!0:b.search?b.filtered.groups.has(c):!0);xo(()=>m.group(c),[]),X5(c,u,[e.value,e.heading,f]);let v=x.useMemo(()=>({id:c,forceMount:i}),[i]);return x.createElement(Jt.div,{ref:Ws(u,t),...o,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&x.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),bh(e,b=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},x.createElement(Q5.Provider,{value:v},b))))}),kD=x.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=x.useRef(null),o=ka(c=>!c.search);return!r&&!o?null:x.createElement(Jt.div,{ref:Ws(i,t),...n,"cmdk-separator":"",role:"separator"})}),jD=x.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,o=Ux(),c=ka(h=>h.search),u=ka(h=>h.selectedItemId),f=ru();return x.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),x.createElement(Jt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":u,id:f.inputId,type:"text",value:i?e.value:c,onChange:h=>{i||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),SD=x.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=x.useRef(null),c=x.useRef(null),u=ka(h=>h.selectedItemId),f=ru();return x.useEffect(()=>{if(c.current&&o.current){let h=c.current,m=o.current,p,v=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let b=h.offsetHeight;m.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(p),v.unobserve(h)}}},[]),x.createElement(Jt.div,{ref:Ws(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":n,id:f.listId},bh(e,h=>x.createElement("div",{ref:Ws(c,f.listInnerRef),"cmdk-list-sizer":""},h)))}),ND=x.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:c,...u}=e;return x.createElement(L5,{open:r,onOpenChange:n},x.createElement(z5,{container:c},x.createElement(F5,{"cmdk-overlay":"",className:i}),x.createElement(B5,{"aria-label":e.label,"cmdk-dialog":"",className:o},x.createElement(Y5,{ref:t,...u}))))}),ED=x.forwardRef((e,t)=>ka(r=>r.filtered.count===0)?x.createElement(Jt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),AD=x.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...o}=e;return x.createElement(Jt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},bh(e,c=>x.createElement("div",{"aria-hidden":!0},c)))}),ss=Object.assign(Y5,{List:SD,Item:bD,Input:jD,Group:wD,Separator:kD,Dialog:ND,Empty:ED,Loading:AD});function CD(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function PD(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Z5(e){let t=x.useRef(e);return xo(()=>{t.current=e}),t}var xo=typeof window>"u"?x.useEffect:x.useLayoutEffect;function xs(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function ka(e){let t=Ux(),r=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,r,r)}function X5(e,t,r,n=[]){let i=x.useRef(),o=ru();return xo(()=>{var c;let u=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():i.current}})(),f=n.map(h=>h.trim());o.value(e,u,f),(c=t.current)==null||c.setAttribute(vs,u),i.current=u}),i}var OD=()=>{let[e,t]=x.useState(),r=xs(()=>new Map);return xo(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function _D(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function bh({asChild:e,children:t},r){return e&&x.isValidElement(t)?x.cloneElement(_D(t),{ref:t.ref},r(t.props.children)):r(t)}var MD={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function ID({onNavigate:e}){const[t,r]=x.useState(!1);return x.useEffect(()=>{const n=i=>{(i.metaKey||i.ctrlKey)&&i.key.toLowerCase()==="k"&&(i.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),s.jsx(ss.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh] overscroll-contain",onClick:()=>r(!1),children:s.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[s.jsx(ss.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),s.jsxs(ss.List,{className:"max-h-80 overflow-y-auto p-2",children:[s.jsx(ss.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),s.jsx(ss.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:gs.map(n=>s.jsxs(ss.Item,{value:`${n.label} ${n.hint}`,onSelect:()=>{e(n.id),r(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[s.jsx(n.icon,{className:"h-4 w-4 text-primary"}),s.jsx("span",{children:n.label}),s.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const J5="mc_expert_mode",jv="mc-expert-mode-change",TD=()=>{try{return localStorage.getItem(J5)==="true"}catch{return!1}};function DD(e){return window.addEventListener(jv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(jv,e),window.removeEventListener("storage",e)}}function nk(e){localStorage.setItem(J5,String(e)),window.dispatchEvent(new Event(jv))}function Wx(){return x.useSyncExternalStore(DD,TD,()=>!1)}function eE(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=$D(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:c=>{const u=c.split(Hx);return u[0]===""&&u.length!==1&&u.shift(),tE(u,t)||RD(c)},getConflictingClassGroupIds:(c,u)=>{const f=r[c]||[];return u&&n[c]?[...f,...n[c]]:f}}},tE=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?tE(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Hx);return(c=t.validators.find(({validator:u})=>u(o)))==null?void 0:c.classGroupId},ik=/^\[(.+)\]$/,RD=e=>{if(ik.test(e)){const t=ik.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},$D=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return FD(Object.entries(e.classGroups),r).forEach(([o,c])=>{Sv(c,n,o,t)}),n},Sv=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:ak(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(zD(i)){Sv(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,c])=>{Sv(c,ak(t,o),r,n)})})},ak=(e,t)=>{let r=e;return t.split(Hx).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},zD=e=>e.isThemeGetter,FD=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([c,u])=>[t+c,u])):o);return[r,i]}):e,BD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,c)=>{r.set(o,c),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let c=r.get(o);if(c!==void 0)return c;if((c=n.get(o))!==void 0)return i(o,c),c},set(o,c){r.has(o)?r.set(o,c):i(o,c)}}},rE="!",UD=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,c=u=>{const f=[];let h=0,m=0,p;for(let k=0;km?p-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:w}};return r?u=>r({className:u,parseClassName:c}):c},WD=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},HD=e=>({cache:BD(e.cacheSize),parseClassName:UD(e),...LD(e)}),KD=/\s+/,GD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],c=e.trim().split(KD);let u="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{modifiers:m,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:b}=r(h);let S=!!b,w=n(S?v.substring(0,b):v);if(!w){if(!S){u=h+(u.length>0?" "+u:u);continue}if(w=n(v),!w){u=h+(u.length>0?" "+u:u);continue}S=!1}const k=WD(m).join(":"),N=p?k+rE:k,E=N+w;if(o.includes(E))continue;o.push(E);const C=i(w,S);for(let A=0;A0?" "+u:u)}return u};function VD(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;np(m),e());return r=HD(h),n=r.cache.get,i=r.cache.set,o=u,u(f)}function u(f){const h=n(f);if(h)return h;const m=GD(f,r);return i(f,m),m}return function(){return o(VD.apply(null,arguments))}}const st=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},iE=/^\[(?:([a-z-]+):)?(.+)\]$/i,QD=/^\d+\/\d+$/,YD=new Set(["px","full","screen"]),ZD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XD=/\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$/,JD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,si=e=>js(e)||YD.has(e)||QD.test(e),Xi=e=>il(e,"length",cL),js=e=>!!e&&!Number.isNaN(Number(e)),gg=e=>il(e,"number",js),ic=e=>!!e&&Number.isInteger(Number(e)),rL=e=>e.endsWith("%")&&js(e.slice(0,-1)),Fe=e=>iE.test(e),Ji=e=>ZD.test(e),nL=new Set(["length","size","percentage"]),iL=e=>il(e,nL,aE),aL=e=>il(e,"position",aE),oL=new Set(["image","url"]),sL=e=>il(e,oL,dL),lL=e=>il(e,"",uL),ac=()=>!0,il=(e,t,r)=>{const n=iE.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},cL=e=>XD.test(e)&&!JD.test(e),aE=()=>!1,uL=e=>eL.test(e),dL=e=>tL.test(e),fL=()=>{const e=st("colors"),t=st("spacing"),r=st("blur"),n=st("brightness"),i=st("borderColor"),o=st("borderRadius"),c=st("borderSpacing"),u=st("borderWidth"),f=st("contrast"),h=st("grayscale"),m=st("hueRotate"),p=st("invert"),v=st("gap"),b=st("gradientColorStops"),S=st("gradientColorStopPositions"),w=st("inset"),k=st("margin"),N=st("opacity"),E=st("padding"),C=st("saturate"),A=st("scale"),_=st("sepia"),O=st("skew"),T=st("space"),B=st("translate"),z=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",Fe,t],W=()=>[Fe,t],ve=()=>["",si,Xi],de=()=>["auto",js,Fe],ge=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],le=()=>["solid","dashed","dotted","double","none"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",Fe],re=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[js,Fe];return{cacheSize:500,separator:":",theme:{colors:[ac],spacing:[si,Xi],blur:["none","",Ji,Fe],brightness:D(),borderColor:[e],borderRadius:["none","","full",Ji,Fe],borderSpacing:W(),borderWidth:ve(),contrast:D(),grayscale:te(),hueRotate:D(),invert:te(),gap:W(),gradientColorStops:[e],gradientColorStopPositions:[rL,Xi],inset:q(),margin:q(),opacity:D(),padding:W(),saturate:D(),scale:D(),sepia:te(),skew:D(),space:W(),translate:W()},classGroups:{aspect:[{aspect:["auto","square","video",Fe]}],container:["container"],columns:[{columns:[Ji]}],"break-after":[{"break-after":re()}],"break-before":[{"break-before":re()}],"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"],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:[...ge(),Fe]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ic,Fe]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Fe]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",ic,Fe]}],"grid-cols":[{"grid-cols":[ac]}],"col-start-end":[{col:["auto",{span:["full",ic,Fe]},Fe]}],"col-start":[{"col-start":de()}],"col-end":[{"col-end":de()}],"grid-rows":[{"grid-rows":[ac]}],"row-start-end":[{row:["auto",{span:[ic,Fe]},Fe]}],"row-start":[{"row-start":de()}],"row-end":[{"row-end":de()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Fe]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Fe,t]}],"min-w":[{"min-w":[Fe,t,"min","max","fit"]}],"max-w":[{"max-w":[Fe,t,"none","full","min","max","fit","prose",{screen:[Ji]},Ji]}],h:[{h:[Fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ji,Xi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gg]}],"font-family":[{font:[ac]}],"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:["tighter","tight","normal","wide","wider","widest",Fe]}],"line-clamp":[{"line-clamp":["none",js,gg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",si,Fe]}],"list-image":[{"list-image":["none",Fe]}],"list-style-type":[{list:["none","disc","decimal",Fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",si,Xi]}],"underline-offset":[{"underline-offset":["auto",si,Fe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ge(),aL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",iL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...le(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:le()}],"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-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:["",...le()]}],"outline-offset":[{"outline-offset":[si,Fe]}],"outline-w":[{outline:[si,Xi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[si,Xi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ji,lL]}],"shadow-color":[{shadow:[ac]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Ji,Fe]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Fe]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",Fe]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",Fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[ic,Fe]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Fe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Fe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"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-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-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",Fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[si,Xi,gg]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},hL=qD(fL);function J(...e){return hL(nt(e))}function Nv(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function oE(){const e=Wx();return s.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[s.jsxs("button",{onClick:()=>nk(!1),"aria-pressed":!e,className:J("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[s.jsx(va,{className:"h-3.5 w-3.5"})," Einfach"]}),s.jsxs("button",{onClick:()=>nk(!0),"aria-pressed":e,className:J("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[s.jsx(wI,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function ye(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),i=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let m=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,m=!0),i&&!("hf_token"in h)&&(h.hf_token=i,m=!0),m&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),i&&(h.hf_token=i),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const u=await fetch(e,{...t,headers:r,body:o});if(!u.ok)throw new Error(`${u.status} ${u.statusText}`);return u.json()}const sE=(e,t,r=!1,n=!0)=>ye("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),mL=e=>ye("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)}),ze={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],connectHealth:["connect-health"],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"],voiceTrace:["voice-trace"],auftragsbuch:["auftragsbuch"],chronik:["chronik"],wissen:["wissen"],zeitmaschine:["zeitmaschine"],reminders:["reminders"]},lE=(e=8e3)=>vt({queryKey:ze.auftragsbuch,queryFn:()=>ye("/api/auftragsbuch"),refetchInterval:e}),cE=(e=150,t=15e3)=>vt({queryKey:ze.chronik,queryFn:()=>ye(`/api/chronik?limit=${e}`),refetchInterval:t,select:r=>r.items??[]}),pL=()=>vt({queryKey:ze.wissen,queryFn:()=>ye("/api/wissen")}),gL=(e=3e4)=>vt({queryKey:ze.zeitmaschine,queryFn:()=>ye("/api/zeitmaschine"),refetchInterval:e}),vL=(e=2e4)=>vt({queryKey:ze.reminders,queryFn:()=>ye("/api/reminders"),refetchInterval:e,select:t=>t.items??[]}),xL=(e=12,t=4e3)=>vt({queryKey:ze.voiceTrace,queryFn:()=>ye(`/api/voice/trace?limit=${e}`),refetchInterval:t,select:r=>r.turns??[]}),yL=(e=!0)=>vt({queryKey:ze.memoryGraph,queryFn:()=>ye("/api/memory/graph"),enabled:e}),Kx=()=>vt({queryKey:ze.health,queryFn:()=>ye("/api/health"),refetchInterval:1e4}),Co=(e=5e3)=>vt({queryKey:ze.systemStatus,queryFn:()=>ye("/api/system/status"),refetchInterval:e}),uE=(e=3e3)=>vt({queryKey:ze.services,queryFn:()=>ye("/api/system/services"),refetchInterval:e}),Si=(e=4e3)=>vt({queryKey:ze.models,queryFn:()=>ye("/api/models"),refetchInterval:e}),Gx=(e=8e3)=>vt({queryKey:ze.groups,queryFn:()=>ye("/api/groups"),refetchInterval:e}),bL=()=>vt({queryKey:ze.routingPolicy,queryFn:()=>ye("/api/routing/policy")}),wL=(e=2e3)=>vt({queryKey:ze.jobs,queryFn:()=>ye("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),dE=(e=3e3)=>vt({queryKey:ze.tokenStats,queryFn:()=>ye("/api/system/token-stats"),refetchInterval:e}),Vx=(e=5e3)=>vt({queryKey:ze.agentStatus,queryFn:()=>ye("/api/agent/status"),refetchInterval:e}),fE=(e=6e4)=>vt({queryKey:ze.hermesBrain,queryFn:()=>ye("/api/agent/brain"),refetchInterval:e}),wh=e=>vt({queryKey:ze.updates,queryFn:()=>ye("/api/maintenance/updates"),refetchInterval:e}),kL=()=>vt({queryKey:ze.discover,queryFn:()=>ye("/api/discover")}),jL=e=>vt({queryKey:ze.drafts(e),queryFn:()=>ye(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),SL=e=>vt({queryKey:ze.connect(e),queryFn:()=>ye(e?`/api/connect?${e}`:"/api/connect")}),hE=()=>vt({queryKey:ze.connectHealth,queryFn:()=>ye("/api/connect/health"),refetchInterval:15e3}),Ev=e=>vt({queryKey:ze.memory(e==null?void 0:e.q,e==null?void 0:e.category),queryFn:()=>{const t=new URLSearchParams;return e!=null&&e.q&&t.set("q",e.q),e!=null&&e.category&&t.set("category",e.category),ye(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function mE({type:e,title:t,message:r,defaultValue:n,autoValue:i,autoLabel:o,onConfirm:c,onCancel:u}){const f=x.useRef(null);return s.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":t,children:s.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),s.jsx("button",{onClick:u||(()=>c()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.jsx("p",{className:"max-h-72 overflow-y-auto whitespace-pre-line text-xs text-muted-foreground leading-relaxed scrollbar-thin",children:r}),e==="prompt"&&s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{ref:f,type:"text",defaultValue:n,"aria-label":t,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:h=>{var m;h.key==="Enter"&&c((m=f.current)==null?void 0:m.value)}}),i!==void 0&&s.jsx("button",{type:"button",onClick:()=>{f.current&&(f.current.value=i)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:o||"Auto"})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&s.jsx("button",{onClick:u,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),s.jsx("button",{onClick:()=>{var m;const h=e==="prompt"?(m=f.current)==null?void 0:m.value:void 0;c(h)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function Nn(){const[e,t]=x.useState(null),r=x.useCallback(()=>t(null),[]),n=x.useCallback((u,f,h)=>{t({type:"alert",title:u,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),i=x.useCallback((u,f,h,m)=>{t({type:"confirm",title:u,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),m==null||m()}})},[]),o=x.useCallback((u,f,h,m,p,v)=>{t({type:"prompt",title:u,message:f,defaultValue:h,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),m(b)},onCancel:()=>{t(null),p==null||p()}})},[]),c=e?s.jsx(mE,{...e}):null;return{showAlert:n,showConfirm:i,showPrompt:o,close:r,dialogElement:c}}function Jr(e){return(e/1024**3).toFixed(1)}function Av(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function lr(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function NL(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function Cv(e){return e?`${Math.round(e/1024)}k`:"—"}function EL(){const e=Hr(),{data:t=[]}=wL(2e3),{showAlert:r,dialogElement:n}=Nn();async function i(u){try{await ye(`/api/jobs/${u}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:ze.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(u=>u.state==="running"||u.state==="queued"),c=t.filter(u=>u.state!=="running"&&u.state!=="queued").slice(-3);return o.length===0&&c.length===0?null:s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[s.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(u=>s.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[s.jsxs("div",{className:"flex justify-between items-center text-xs",children:[s.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:u.label}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-muted-foreground font-mono",children:[u.progress??0,"% • ",Av(u.done_bytes),"/",Av(u.total_bytes),u.eta_s?` • ETA ${NL(u.eta_s)}`:""]}),s.jsx("button",{onClick:()=>i(u.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),s.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${u.progress??0}%`}})})]},u.id)),c.map(u=>s.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[s.jsx("span",{className:"truncate",children:u.label}),s.jsx("span",{className:J("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",u.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:u.state})]},u.id)),n]})}function Fa({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return s.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function Pv({caps:e}){return e?s.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&s.jsx(Fa,{children:"💻 Code"}),e.vision&&s.jsx(Fa,{children:"👁 Bild"}),e.reasoning&&s.jsx(Fa,{children:"🧠 Reason"}),e.moe&&s.jsxs(Fa,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&s.jsx(Fa,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&s.jsx(Fa,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&s.jsx(Fa,{children:"🔢 Embed"})]}):null}const qx=[{role:"hermes",label:"Lucys Hirn",short:"Hirn",icon:Sa,desc:"Lucys Alltags-Verstand — denkt und redet mit dir. Immer bereit.",tone:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25",protected:!0},{role:"embed",label:"Lucys Gedächtnis",short:"Gedächtnis",icon:t5,desc:"Merkt sich Wichtiges und findet es später wieder.",tone:"bg-emerald-500/15 text-emerald-400 border-emerald-500/25",protected:!0},{role:"reranker",label:"Gedächtnis-Sortierer",short:"Sortierer",icon:aI,desc:"Ordnet gefundene Erinnerungen nach echter Relevanz — die Feinsortierung hinter dem Gedächtnis.",tone:"bg-lime-500/15 text-lime-400 border-lime-500/25"},{role:"vision",label:"Lucys Augen",short:"Augen",icon:Cc,desc:"Sieht Bilder und Screenshots und beschreibt, was drauf ist.",tone:"bg-pink-500/15 text-pink-400 border-pink-500/25"},{role:"heavy",label:"Großes Hirn",short:"Groß",icon:RM,desc:"Das schwere Geschütz — wird für besonders knifflige Fragen dazugeholt.",tone:"bg-amber-500/15 text-amber-400 border-amber-500/25"},{role:"coder-lite",label:"Programmierer (schnell)",short:"Code schnell",icon:Fs,desc:"Schnelles Programmieren im Alltag.",tone:"bg-violet-500/15 text-violet-400 border-violet-500/25"},{role:"coder",label:"Programmierer (gründlich)",short:"Code gründlich",icon:Fs,desc:"Schreibt und prüft Code besonders sorgfältig — für schwere Coding-Aufgaben.",tone:"bg-fuchsia-500/15 text-fuchsia-400 border-fuchsia-500/25"},{role:"scout",label:"Späher",short:"Späher",icon:SI,desc:"Schneller erster Blick und grobe Einschätzung.",tone:"bg-teal-500/15 text-teal-400 border-teal-500/25"},{role:"kritiker",label:"Kritiker",short:"Kritiker",icon:m5,desc:"Die unbestechliche Zweitmeinung — prüft Behauptungen und Patches (anderer Hersteller als das Hirn).",tone:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25"}],AL=qx.map(e=>e.role),ok=Object.fromEntries(qx.map(e=>[e.role,e])),sk=e=>({role:e||"?",label:e||"unbekannt",short:e||"?",icon:Sa,desc:"Rolle ohne hinterlegten Klartext-Namen.",tone:"bg-slate-500/15 text-slate-300 border-slate-500/25"}),CL={fast:"hermes",coder_lite:"coder-lite"};function dt(e){return e&&(ok[e]||ok[CL[e]])||sk(e)}function mo({role:e,dense:t=!1,className:r}){const n=dt(e),i=n.icon;return s.jsxs("span",{className:J("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-semibold border tracking-wide",n.tone,r),title:`${n.desc} (${n.role})`,children:[s.jsx(i,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),t?n.short:n.label]})}function PL({fit:e}){const t={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[e.level];return s.jsxs("span",{className:J("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function pf(e){const t=e.toLowerCase();return t.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:t.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:t.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:t.includes("mistral")||t.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:t.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:t.includes("hermes")||t.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:t.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function pE({model:e,onClose:t,onChanged:r}){var w,k;const{data:n,isLoading:i}=jL(e.gguf_path),[o,c]=x.useState(null),[u,f]=x.useState(""),h=n==null?void 0:n.target_vocab,m=(n==null?void 0:n.drafts)??[],p=m.filter(N=>N.compatible===!0),v=e.spec_draft_model;async function b(N){c(N??"__clear__"),f("");try{await ye(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(E){f(String((E==null?void 0:E.message)||E)),c(null)}}const S=N=>{var E;return N?`${N.pre??"?"} · ${((E=N.n_vocab)==null?void 0:E.toLocaleString())??"?"} Tokens`:"—"};return s.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:s.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[s.jsx(wa,{className:"h-4 w-4"})," Speculative Draft"]}),s.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',s.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),s.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:(w=e.name.split("/").pop())==null?void 0:w.replace(/\.gguf$/i,"")}),s.jsxs("span",{className:"text-foreground",children:["Vocab: ",S(h)]})]}),e.spec_active&&v&&s.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[s.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[s.jsx(Mt,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",v]}),s.jsx("button",{onClick:()=>b(null),disabled:o!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(n!=null&&n.target_exists)&&s.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[s.jsx(vr,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),s.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:i?s.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):m.length===0?s.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",s.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):m.map(N=>{var A,_;const E=N.filename===v,C=N.compatible===!0;return s.jsxs("div",{className:J("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",C?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate flex items-center gap-1.5",children:[N.filename,N.mtp&&s.jsx("span",{className:"shrink-0 rounded bg-indigo-500/15 px-1.5 py-0.5 text-[8px] font-bold uppercase tracking-wider text-indigo-400 border border-indigo-500/25",title:"MTP-Kopf (Multi-Token-Prediction) — by-construction vocab-identisch, höchste Akzeptanzrate",children:"MTP"})]}),s.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[lr(N.size_bytes)," · Vocab: ",S(N.vocab)]})]}),C?E?s.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[s.jsx(Mt,{className:"h-3.5 w-3.5"})," Aktiv"]}):s.jsx("button",{onClick:()=>b(N.path),disabled:o!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):s.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(A=N.vocab)==null?void 0:A.pre}/${(_=N.vocab)==null?void 0:_.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[s.jsx(vr,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!i&&(n==null?void 0:n.target_exists)&&m.length>0&&p.length===0&&s.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",s.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",s.jsx("span",{className:"font-mono",children:(k=h==null?void 0:h.n_vocab)==null?void 0:k.toLocaleString()}),")."]}),u&&s.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:u})]})})}const lk={hermes:{bar:"bg-indigo-500",dot:"bg-indigo-500",text:"text-indigo-400"},embed:{bar:"bg-emerald-500",dot:"bg-emerald-500",text:"text-emerald-400"},vision:{bar:"bg-pink-500",dot:"bg-pink-500",text:"text-pink-400"},heavy:{bar:"bg-amber-500",dot:"bg-amber-500",text:"text-amber-400"},"coder-lite":{bar:"bg-violet-500",dot:"bg-violet-500",text:"text-violet-400"},coder:{bar:"bg-fuchsia-500",dot:"bg-fuchsia-500",text:"text-fuchsia-400"},scout:{bar:"bg-teal-500",dot:"bg-teal-500",text:"text-teal-400"},kritiker:{bar:"bg-cyan-500",dot:"bg-cyan-500",text:"text-cyan-400"},reranker:{bar:"bg-lime-500",dot:"bg-lime-500",text:"text-lime-400"}},OL={fast:"hermes",coder_lite:"coder-lite"},ck={bar:"bg-slate-400",dot:"bg-slate-400",text:"text-slate-300"};function gf(e){return e&&(lk[e]||lk[OL[e]])||ck}const uk=1024**3,dk=e=>{var t;return((t=e.split("/").pop())==null?void 0:t.replace(/\.gguf$/i,""))??e};function _L({running:e,capacityBytes:t,realUsedBytes:r,selected:n,onSelect:i}){const o=t>2*uk?t:124*uk,c=e.reduce((h,m)=>h+(m.size_bytes||0),0),u=Math.max(0,o-c),f=u/o*100;return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("div",{className:"mb-3 flex flex-wrap items-end justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ga,{className:"h-5 w-5 text-primary"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Arbeitsspeicher"}),s.jsxs("div",{className:"font-space text-xl font-bold tracking-tight text-foreground",children:[Jr(o)," GB ",s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"gesamt"})]})]})]}),s.jsxs("div",{className:"text-right text-[11px] font-mono text-muted-foreground",children:[s.jsxs("div",{children:[s.jsxs("span",{className:"font-bold text-foreground",children:[Jr(c)," GB"]})," Modelle geladen"]}),r>0&&s.jsxs("div",{children:[Jr(r)," GB real belegt (inkl. KV-Cache)"]}),s.jsxs("div",{className:"text-emerald-400",children:[Jr(u)," GB frei"]})]})]}),s.jsx("div",{className:"flex h-12 w-full overflow-hidden rounded-xl border border-border/40 bg-background/50 p-1",children:e.length===0?s.jsx("div",{className:"flex w-full items-center justify-center text-[11px] italic text-muted-foreground/60",children:"Kein Modell geladen — Auto-Swap holt bei Anfrage automatisch das passende."}):s.jsxs(s.Fragment,{children:[e.map(h=>{const m=(h.size_bytes||0)/o*100,p=gf(h.role),v=n===h.name;return s.jsxs("button",{onClick:()=>i==null?void 0:i(h.name),style:{width:`${m}%`},title:`${dt(h.role).label} · ${dk(h.name)} · ${lr(h.size_bytes)}`,className:J("group flex h-full min-w-[2.5rem] shrink-0 flex-col justify-center gap-0.5 rounded-lg px-2 text-left text-white transition-all",p.bar,v?"ring-2 ring-white/70":"opacity-90 hover:opacity-100"),children:[s.jsx("span",{className:"truncate font-space text-[10px] font-bold leading-tight tracking-wide",children:dt(h.role).short}),s.jsx("span",{className:"truncate font-mono text-[9px] leading-tight opacity-85",children:lr(h.size_bytes)})]},h.name)}),f>1.5&&s.jsx("div",{style:{width:`${f}%`},className:"flex h-full min-w-[2rem] items-center justify-center rounded-lg text-[9px] font-mono text-muted-foreground/50",title:`${Jr(u)} GB frei`,children:"frei"})]})}),e.length>0&&s.jsxs("div",{className:"mt-3 flex flex-wrap gap-x-4 gap-y-1.5",children:[e.map(h=>{const m=gf(h.role);return s.jsxs("button",{onClick:()=>i==null?void 0:i(h.name),className:"flex items-center gap-1.5 text-[11px] text-muted-foreground transition-colors hover:text-foreground",children:[s.jsx("span",{className:J("h-2.5 w-2.5 rounded-sm",m.dot)}),s.jsx("span",{className:J("font-semibold",m.text),children:dt(h.role).short}),s.jsx("span",{className:"font-mono text-muted-foreground/70",children:dk(h.name)})]},h.name)}),s.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground/60",children:[s.jsx("span",{className:"h-2.5 w-2.5 rounded-sm border border-border/50 bg-background/50"})," frei · ",Jr(u)," GB"]})]})]})}const fk=1024**3,Ga=e=>{var t;return((t=e.split("/").pop())==null?void 0:t.replace(/\.gguf$/i,""))??e};function ML(){var M,Q,ne,ae;const e=Hr(),{data:t,isLoading:r,error:n}=Si(4e3),{data:i}=Co(),{data:o}=Gx(),{showAlert:c,showConfirm:u,showPrompt:f,dialogElement:h}=Nn(),m=Wx(),p=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=ee=>!!dt(ee).protected,S=(M=o==null?void 0:o.groups)==null?void 0:M.brains,w=(S==null?void 0:S.members)??[],k=ee=>w.includes(ee),[N,E]=x.useState(null),[C,A]=x.useState(""),[_,O]=x.useState("all"),[T,B]=x.useState(null),z=()=>{e.invalidateQueries({queryKey:ze.models}),e.invalidateQueries({queryKey:ze.routing}),e.invalidateQueries({queryKey:ze.groups})},$=p.filter(ee=>v.includes(ee.name)),q=((Q=i==null?void 0:i.gpu)==null?void 0:Q.gtt_total)||((ne=i==null?void 0:i.gpu)==null?void 0:ne.vram_total)||0,W=((ae=i==null?void 0:i.gpu)==null?void 0:ae.gtt_used)||0,ve=q>2*fk?q:124*fk,de=x.useMemo(()=>{const ee=C.trim().toLowerCase();return p.filter(se=>_==="in_use"?!!se.role||v.includes(se.name):!0).filter(se=>ee?se.name.toLowerCase().includes(ee):!0).sort((se,me)=>{const U=v.includes(se.name)?0:1,ue=v.includes(me.name)?0:1;return U!==ue?U-ue:Ga(se.name).localeCompare(Ga(me.name))})},[p,v,_,C]),ge=p.find(ee=>ee.name===N)??null;async function le(ee){try{await ye(`/api/models/${encodeURIComponent(ee)}/load`,{method:"POST"}),z()}catch(se){c("Fehler",`Laden fehlgeschlagen: ${se.message||se}`)}}async function ie(ee){const se=w.some(me=>v.includes(me));if(S&&se&&!k(ee)){const me=w.filter(U=>v.includes(U)).map(Ga).join(", ");u("Verdrängt das Hirn?",`„${Ga(ee)}" ist nicht ko-resident. Beim Laden wirft es das warme Hirn (${me}) raus — Lucy verliert Hirn bzw. Augen. + +Trotzdem exklusiv laden?`,()=>le(ee));return}le(ee)}async function X(ee){const se=p.find(me=>me.name===ee);if(se&&b(se.role)){c("Geschützt",`„${dt(se.role).label}" ist lebenswichtig und bleibt geladen.`);return}try{await ye(`/api/models/${encodeURIComponent(ee)}/unload`,{method:"POST"}),z()}catch(me){c("Fehler",`Entladen fehlgeschlagen: ${me.message||me}`)}}async function te(ee,se){try{const me=await ye(`/api/models/${encodeURIComponent(se)}/role`,{method:"POST",body:JSON.stringify({role:ee||null})});z(),me!=null&&me.warning&&c("Rolle gesetzt — Hinweis",me.warning)}catch(me){c("Fehler",`Rolle zuweisen fehlgeschlagen: ${me.message||me}`)}}async function re(ee,se){let me=null;try{me=await ye(`/api/models/${encodeURIComponent(ee)}/ctx/auto`)}catch{}const U=me?`Optimal für dein Setup: ${(me.ctx/1024).toFixed(0)}k (${me.ctx}). »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";f("Kontextlänge anpassen",U,String(se||32768),async ue=>{if(ue)try{await ye(`/api/models/${encodeURIComponent(ee)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(ue,10)})}),z()}catch(be){c("Fehler",`Kontext setzen fehlgeschlagen: ${be.message||be}`)}},void 0,me?{autoValue:String(me.ctx),autoLabel:`Auto (${(me.ctx/1024).toFixed(0)}k)`}:void 0)}async function D(ee){const se=p.find(me=>me.name===ee);if(se&&b(se.role)){c("Geschützt",`„${dt(se.role).label}" kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}u("Modell löschen?",`„${Ga(ee)}" und alle GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await ye(`/api/models/${encodeURIComponent(ee)}`,{method:"DELETE"}),N===ee&&E(null),z()}catch(me){c("Fehler",`Löschen fehlgeschlagen: ${me.message||me}`)}})}return r?s.jsx("div",{className:"py-16 text-center text-xs text-muted-foreground",children:"Werkbank wird geladen …"}):n?s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",String(n),")."]}):s.jsxs("div",{className:"space-y-5",children:[s.jsx(_L,{running:$,capacityBytes:ve,realUsedBytes:W,selected:N,onSelect:E}),s.jsxs("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)]",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(rl,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/60"}),s.jsx("input",{value:C,onChange:ee=>A(ee.target.value),placeholder:"Modell suchen …",className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 pl-8 pr-2 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-primary/50 focus:outline-none"})]}),s.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:["all","in_use"].map(ee=>s.jsx("button",{onClick:()=>O(ee),className:J("rounded-md px-2 py-1 text-[9px] font-bold uppercase transition-all cursor-pointer",_===ee?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:ee==="all"?"Alle":"In Benutzung"},ee))})]}),s.jsx("div",{className:"max-h-[60vh] space-y-1.5 overflow-y-auto scrollbar-thin pr-1",children:de.length===0?s.jsx("div",{className:"rounded-xl border border-dashed border-border/50 p-8 text-center text-xs text-muted-foreground",children:"Keine Modelle."}):de.map(ee=>{const se=v.includes(ee.name),me=N===ee.name,U=pf(ee.name),ue=gf(ee.role);return s.jsxs("button",{onClick:()=>E(ee.name),className:J("flex w-full items-center gap-2.5 rounded-xl border p-2.5 text-left transition-all cursor-pointer",me?"border-primary/60 bg-primary/10":"border-border/40 bg-background/20 hover:border-primary/30 hover:bg-background/40"),children:[s.jsx("span",{className:J("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border text-[10px] font-bold",U.color),children:U.initial}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("div",{className:"truncate font-mono text-xs font-semibold text-foreground",children:Ga(ee.name)}),s.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[ee.role&&s.jsx("span",{className:J("h-2 w-2 rounded-sm",ue.dot)}),s.jsx("span",{className:"text-[10px] text-muted-foreground",children:ee.role?dt(ee.role).short:"keine Rolle"}),s.jsxs("span",{className:"text-[10px] text-muted-foreground/50",children:["· ",lr(ee.size_bytes)]})]})]}),se?s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[9px] font-bold uppercase text-emerald-400",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"warm"]}):ee.incomplete?s.jsx("span",{className:"shrink-0 text-[9px] font-bold uppercase text-amber-400",children:"⚠ fehlt"}):s.jsx("span",{className:"shrink-0 text-[9px] font-semibold uppercase text-muted-foreground/50",children:"bereit"})]},ee.name)})})]}),s.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:ge?s.jsx(IL,{m:ge,warm:v.includes(ge.name),expert:m,protectedRole:b(ge.role),coresident:k(ge.name),onLoad:()=>ie(ge.name),onUnload:()=>X(ge.name),onRole:ee=>te(ee,ge.name),onCtx:()=>re(ge.name,ge.ctx),onSpec:()=>B(ge),onDelete:()=>D(ge.name)}):s.jsxs("div",{className:"flex h-full min-h-[16rem] flex-col items-center justify-center gap-2 text-center text-muted-foreground",children:[s.jsx(yi,{className:"h-8 w-8 opacity-40"}),s.jsx("p",{className:"text-sm font-semibold",children:"Links ein Modell wählen"}),s.jsx("p",{className:"text-xs",children:"Dann verwaltest du es hier — laden, Rolle, Kontext, löschen."})]})})]}),T&&s.jsx(pE,{model:T,onClose:()=>B(null),onChanged:z}),h]})}function IL({m:e,warm:t,expert:r,protectedRole:n,coresident:i,onLoad:o,onUnload:c,onRole:u,onCtx:f,onSpec:h,onDelete:m}){const p=pf(e.name),v=t&&n;return s.jsxs("div",{className:"flex h-full flex-col gap-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{className:J("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border text-sm font-bold",p.color),children:p.initial}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h2",{className:"break-all font-mono text-sm font-bold text-foreground",children:Ga(e.name)}),s.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[e.role?s.jsx(mo,{role:e.role}):s.jsx("span",{className:"rounded border border-dashed border-border/50 px-1.5 py-0.5 text-[10px] text-muted-foreground",children:"keine Rolle"}),n&&s.jsxs("span",{className:"rounded bg-background/40 px-1.5 py-0.5 text-[10px] text-muted-foreground",title:"Lebenswichtig — geschützt",children:[s.jsx(u5,{className:"mr-0.5 inline h-3 w-3"}),"geschützt"]}),i&&s.jsxs("span",{className:"rounded border border-fuchsia-500/30 bg-fuchsia-500/10 px-1.5 py-0.5 text-[10px] font-bold uppercase text-fuchsia-300",children:[s.jsx(Sa,{className:"mr-0.5 inline h-3 w-3"}),"Ko-resident"]}),t&&s.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold uppercase text-emerald-400",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"warm"]})]})]})]}),s.jsxs("button",{onClick:t?c:o,disabled:e.incomplete&&!t||v,className:J("flex h-11 w-full items-center justify-center gap-2 rounded-xl border text-sm font-bold transition-all cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",t?"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20":"border-primary/40 bg-primary/10 text-primary hover:bg-primary/20"),title:v?`„${dt(e.role).label}" bleibt geladen (geschützt).`:void 0,children:[t?s.jsx(mI,{className:"h-4 w-4"}):s.jsx(h5,{className:"h-4 w-4"}),v?"🔒 bleibt geladen":t?"Entladen":"Ins Warm-Set laden"]}),s.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsx("div",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Rolle"}),s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[s.jsx(hk,{active:!e.role,onClick:()=>u(""),dot:"bg-slate-400",label:"keine"}),qx.map(b=>s.jsx(hk,{active:e.role===b.role,onClick:()=>u(b.role),dot:gf(b.role).dot,label:b.short},b.role))]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[s.jsx(TL,{icon:ga,label:"Größe",value:lr(e.size_bytes)}),s.jsxs("button",{onClick:f,className:"group flex items-center gap-2 rounded-lg border border-border/30 bg-background/20 p-2.5 text-left transition-colors hover:border-primary/40 cursor-pointer",children:[s.jsx(f5,{className:"h-4 w-4 text-primary/80"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"Kontext · ändern"}),s.jsx("div",{className:"font-semibold text-foreground",children:Cv(e.ctx)})]})]})]}),s.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Beschleuniger"}),r&&s.jsxs("button",{onClick:h,className:J("flex h-6 items-center gap-1 rounded-lg border px-2 text-[9px] font-bold uppercase transition-colors cursor-pointer",e.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":e.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),children:[s.jsx(wa,{className:"h-3 w-3"})," Spec"]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.spec_active&&s.jsx(Ld,{tone:"emerald",label:"Spec-Decoding aktiv"}),!e.spec_active&&e.spec_draft_model&&s.jsx(Ld,{tone:"amber",label:"Spec inaktiv"}),e.prompt_cache&&s.jsx(Ld,{tone:"cyan",label:"Prompt-Cache"}),e.parallel_slots>1&&s.jsx(Ld,{tone:"violet",label:`${e.parallel_slots} Slots`}),!e.spec_active&&!e.spec_draft_model&&!e.prompt_cache&&e.parallel_slots<=1&&s.jsx("span",{className:"text-[11px] text-muted-foreground/60",children:"keine aktiv"})]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:s.jsx(Pv,{caps:e.capabilities})}),s.jsxs("button",{onClick:m,disabled:n,className:J("mt-auto flex h-9 items-center justify-center gap-1.5 rounded-lg border text-xs font-semibold transition-colors",n?"cursor-not-allowed border-border/30 text-muted-foreground/40":"border-red-500/30 text-red-400 hover:bg-red-500/10 cursor-pointer"),children:[s.jsx(Us,{className:"h-3.5 w-3.5"})," ",n?"geschützt — nicht löschbar":"Modell löschen"]})]})}function hk({active:e,onClick:t,dot:r,label:n}){return s.jsxs("button",{onClick:t,className:J("flex items-center gap-1.5 rounded-lg border px-2 py-1 text-[10px] font-semibold transition-all cursor-pointer",e?"border-primary/60 bg-primary/15 text-foreground":"border-border/40 bg-background/20 text-muted-foreground hover:border-primary/30"),children:[s.jsx("span",{className:J("h-2 w-2 rounded-sm",r)}),n,e&&s.jsx(Mt,{className:"h-3 w-3 text-primary"})]})}function TL({icon:e,label:t,value:r}){return s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/30 bg-background/20 p-2.5",children:[s.jsx(e,{className:"h-4 w-4 text-primary/80"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:t}),s.jsx("div",{className:"font-semibold text-foreground",children:r})]})]})}function Ld({tone:e,label:t}){const r={emerald:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",amber:"bg-amber-500/10 text-amber-400 border-amber-500/20",cyan:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20",violet:"bg-violet-500/10 text-violet-400 border-violet-500/20"}[e];return s.jsx("span",{className:J("rounded border px-1.5 py-0.5 text-[10px] font-semibold",r),children:t})}const DL=[{key:"popular",label:"Beliebt",q:""},{key:"coder",label:"Coder",q:"coder"},{key:"vision",label:"Vision",q:"vision"},{key:"reasoning",label:"Reasoning",q:"reasoning"},{key:"small",label:"Klein (≤4B)",q:"3B"}],LL=["fast","heavy","coder","vision","hermes","scout"],RL=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1});function mk(e){return RL.format(e)}function $L(){const{data:e}=Si(),t=(e==null?void 0:e.models)??[],[r,n]=x.useState(""),[i,o]=x.useState([]),[c,u]=x.useState(!1),[f,h]=x.useState(""),[m,p]=x.useState("popular"),[v,b]=x.useState(""),[S,w]=x.useState(null),[k,N]=x.useState([]),[E,C]=x.useState("Q4_K_M"),[A,_]=x.useState(""),[O,T]=x.useState(null),[B,z]=x.useState(!1),[$,q]=x.useState({});async function W(M){u(!0),h("");try{const Q=await ye(`/api/hf/search?q=${encodeURIComponent(M)}`);o(Q.results),Q.results.length||h("Keine Ergebnisse.")}catch(Q){h(`Suche fehlgeschlagen: ${Q}`)}finally{u(!1)}}x.useEffect(()=>{W("")},[]);function ve(M){p(M.key),n(""),W(M.q)}function de(){p(""),W(r)}async function ge(M,Q,ne){z(!1);try{const ae=await ye(`/api/fit?params_b=0&quant=${encodeURIComponent(Q)}&ctx=8192&name=${encodeURIComponent(M)}&role=${encodeURIComponent(ne)}`);T(ae)}catch{T(null)}}async function le(M){if(S===M){w(null);return}w(M),N([]),T(null),_(""),z(!1),h("Analysiere Repository…");try{const Q=await ye(`/api/hf/quants?repo=${encodeURIComponent(M)}`);N(Q.quants);const ne=Q.quants.includes("Q4_K_M")?"Q4_K_M":Q.quants[0]||"Q4_K_M";C(ne),h(Q.quants.length?"":"Keine GGUF-Dateien in diesem Repo gefunden."),Q.quants.length&&ge(Q.repo,ne,"")}catch(Q){h(`Fehler: ${Q}`)}}function ie(){const M=v.trim();M&&(o(Q=>Q.some(ne=>ne.repo===M)?Q:[{repo:M,downloads:0,likes:0},...Q]),b(""),le(M))}const X=A?t.find(M=>(M.role||"").toLowerCase()===A):void 0;async function te(M){if((O==null?void 0:O.fit.level)==="too_tight"&&!B){z(!0);return}q(Q=>({...Q,[M]:"Starte…"}));try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:M,quant:E,role:A||void 0,jinja:!0})}),q(Q=>({...Q,[M]:"Download läuft"})),z(!1)}catch{q(ne=>({...ne,[M]:"Fehler"}))}}const re=M=>{var ne;const Q=((ne=M.split("/").pop())==null?void 0:ne.toLowerCase().replace(/-gguf$/i,""))||"";return Q.length>3&&t.some(ae=>ae.name.toLowerCase().includes(Q))},D=M=>M==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":M==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(rl,{className:"absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),s.jsx("input",{value:r,onChange:M=>n(M.target.value),onKeyDown:M=>M.key==="Enter"&&de(),"aria-label":"HuggingFace durchsuchen",type:"search",spellCheck:!1,placeholder:"HuggingFace durchsuchen (z.B. Qwen Coder, Llama-3.1, gemma)…",className:"w-full h-10 pl-9 pr-3 rounded-xl border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),s.jsx("button",{onClick:de,className:"h-10 px-5 rounded-xl bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Suchen"})]}),s.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:DL.map(M=>s.jsxs("button",{onClick:()=>ve(M),className:J("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-all cursor-pointer border",m===M.key?"bg-primary/15 text-primary border-primary/30":"border-border/50 text-muted-foreground hover:text-foreground hover:border-border"),children:[M.key==="popular"&&s.jsx(QM,{className:"h-3 w-3"}),M.label]},M.key))}),c?s.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:"Lade GGUF-Modelle von HuggingFace…"}):s.jsxs("div",{className:"space-y-2",children:[i.map(M=>{const Q=S===M.repo,ne=re(M.repo),ae=M.repo.includes("/")?M.repo.split("/")[0]:"—",ee=M.repo.split("/").pop();return s.jsxs("div",{className:J("rounded-xl border bg-card/45 backdrop-blur-md transition-all",Q?"border-primary/40 shadow-lg shadow-primary/5":"border-border/50 hover:border-primary/30"),children:[s.jsxs("button",{onClick:()=>le(M.repo),className:"w-full flex items-center gap-3 p-3.5 text-left cursor-pointer",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"text-xs font-bold font-mono text-foreground truncate max-w-[280px]",title:M.repo,children:ee}),ne&&s.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-1.5 py-0.5 rounded",children:[s.jsx(Mt,{className:"h-2.5 w-2.5"})," installiert"]})]}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-3 mt-0.5 font-mono",children:[s.jsx("span",{children:ae}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Bs,{className:"h-3 w-3"})," ",mk(M.downloads)]}),M.likes>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(eI,{className:"h-3 w-3"})," ",mk(M.likes)]})]})]}),Q?s.jsx(r5,{className:"h-4 w-4 text-muted-foreground shrink-0"}):s.jsx(tl,{className:"h-4 w-4 text-muted-foreground shrink-0"})]}),Q&&s.jsx("div",{className:"border-t border-border/30 p-3.5 space-y-3",children:k.length===0?s.jsx("div",{className:"text-[11px] text-muted-foreground font-mono",children:f||"Lade Quants…"}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Quant"}),s.jsx("select",{value:E,onChange:se=>{C(se.target.value),ge(M.repo,se.target.value,A)},"aria-label":"Quantisierung",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:k.map(se=>s.jsx("option",{value:se,className:"bg-popover text-foreground",children:se},se))}),s.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1",children:"Rolle"}),s.jsxs("select",{value:A,onChange:se=>{_(se.target.value),ge(M.repo,E,se.target.value)},"aria-label":"Rolle",title:"Optional — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:[s.jsx("option",{value:"",className:"bg-popover text-foreground",children:"keine"}),LL.map(se=>s.jsx("option",{value:se,className:"bg-popover text-foreground",children:se},se))]}),s.jsx("button",{onClick:()=>te(M.repo),disabled:!!$[M.repo]&&$[M.repo]==="Download läuft",className:J("h-8 px-3.5 ml-auto rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5",B?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"),children:$[M.repo]?$[M.repo]:B?s.jsxs(s.Fragment,{children:[s.jsx(vr,{className:"h-3.5 w-3.5"})," OOM — trotzdem laden"]}):s.jsxs(s.Fragment,{children:[s.jsx(Bs,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]}),O&&s.jsxs("div",{className:J("flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium",D(O.fit.level)),children:[s.jsx("span",{className:"font-bold uppercase tracking-wide",children:O.fit.text}),s.jsxs("span",{className:"font-mono opacity-90",children:["~",O.params_b,"B · ~",O.fit.req_gb," GB / ",O.sys_ram_gb," GB · ~",O.fit.tps," t/s"]}),O.fit.level!=="too_tight"?s.jsxs("span",{className:"font-mono opacity-80",children:["ctx → ",(O.assigned_ctx/1024).toFixed(0),"k"]}):s.jsx("span",{className:"opacity-90",children:"— passt nicht, würde beim Laden abstürzen (OOM)."})]}),X&&s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-400",children:[s.jsx(vr,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),s.jsxs("span",{children:["Rolle ",s.jsxs("strong",{children:["„",A,'"']})," hält aktuell ",s.jsx("strong",{children:X.name.split("/").pop()})," — wird beim Download übernommen."]})]})]})})]},M.repo)}),!i.length&&!c&&s.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:f||"Keine Ergebnisse."})]}),s.jsxs("div",{className:"border-t border-border/30 pt-4 flex flex-col sm:flex-row gap-2 items-stretch sm:items-center",children:[s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground shrink-0",children:"Direkt:"}),s.jsx("input",{value:v,onChange:M=>b(M.target.value),onKeyDown:M=>M.key==="Enter"&&ie(),"aria-label":"Repository oder URL direkt eingeben",spellCheck:!1,placeholder:"org/repo oder HF-URL (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground font-mono"}),s.jsx("button",{onClick:ie,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Laden"})]})]})}const zL={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:wa},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:Sa},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Fs},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:Cc},hermes:{title:"Lucys Hirn (Agent)",desc:"Lucys dauer-warmes Agent-Hirn mit Tool-Calling — bleibt ko-resident, lädt nie kalt nach.",icon:LM},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:vv},kritiker:{title:"Kritisches Prüf-Hirn",desc:"Schärfer Blick für Fehler, Schwachstellen und Sicherheitslücken — denkt skeptisch, bevor du deployst.",icon:m5},reranker:{title:"Gedächtnis-Sortierer",desc:"Sortiert und gewichtet gespeicherte Fakten nach Relevanz — damit die richtige Info sofort da ist.",icon:rl}};function FL(){const{data:e,isLoading:t,error:r}=kL(),{data:n}=Si(),{data:i}=wh(),o=(n==null?void 0:n.models)??[],c=r?String(r):"",[u,f]=x.useState({}),[h,m]=x.useState({}),[p,v]=x.useState("recommended");async function b(S,w,k,N){f(E=>({...E,[S]:"Starte..."}));try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:S,role:w,quant:k,jinja:N})}),f(E=>({...E,[S]:"Download läuft"}))}catch{f(C=>({...C,[S]:"Fehler"}))}}return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 w-fit",children:[["recommended","Empfohlen"],["browse","Stöbern & Suchen"]].map(([S,w])=>s.jsx("button",{onClick:()=>v(S),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide transition-all cursor-pointer",p===S?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:w},S))}),p==="browse"?s.jsx($L,{}):t?s.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):c||!e?s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",c,")."]}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[s.jsxs("div",{children:["Modell-Registry geladen für ",s.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(jI,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),s.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),s.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(S=>{const w=zL[S.role]||{title:S.title||S.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:l5},k=w.icon,N=o.find(T=>T.role===S.role||(T.aliases||[]).includes(S.role)),E=i==null?void 0:i.model_list.find(T=>T.role===S.role),C=S.models.find(T=>T.repo===S.recommended)||S.models[0];if(!C)return null;const A=u[C.repo],_=S.models.filter(T=>T.repo!==S.recommended),O=!!h[S.role];return s.jsxs("div",{className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:s.jsx(k,{className:"h-5.5 w-5.5"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:w.title}),s.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",S.role]})]})]}),N?s.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):s.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:w.desc}),s.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),s.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[s.jsxs("span",{children:["Größe: ",Av(N.size_bytes||0)]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),s.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:C.name,children:C.name}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[s.jsxs("span",{children:["Ersteller: ",C.author]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Quant: ",C.quant]})]}),s.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:s.jsx(PL,{fit:C.fit})})]})}),s.jsx("div",{className:"pt-1",children:N?E?s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),s.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),s.jsxs("button",{onClick:()=>b(E.repo,S.role,C.quant||"Q4_K_M",C.caps.tools!=="no"),disabled:!!u[E.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[s.jsx(Bs,{className:"h-3.5 w-3.5"}),u[E.repo]||"Auf neue Version aktualisieren"]})]}):s.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[s.jsx(Mt,{className:"h-4 w-4"})," Auf neuestem Stand"]}):s.jsxs("button",{onClick:()=>b(C.repo,S.role,C.quant||"Q4_K_M",C.caps.tools!=="no"),disabled:!!A,className:J("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",A?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[s.jsx(Bs,{className:"h-3.5 w-3.5"}),A||"Optimales Modell einsetzen"]})})]}),_.length>0&&s.jsxs("div",{className:"border-t border-border/20 pt-3",children:[s.jsxs("button",{onClick:()=>m(T=>({...T,[S.role]:!O})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[O?s.jsx(r5,{className:"h-3 w-3"}):s.jsx(tl,{className:"h-3 w-3"}),s.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),O&&s.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(T=>s.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:T.name,children:T.name}),s.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[s.jsxs("span",{children:["Quant: ",T.quant]}),s.jsx("span",{children:"•"}),s.jsx("span",{children:T.fit.text})]})]}),s.jsx("button",{onClick:()=>b(T.repo,S.role,T.quant||"Q4_K_M",T.caps.tools!=="no"),disabled:!!u[T.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:u[T.repo]||"Installieren"})]},T.repo))})]})]},S.role)})})]})]})}function BL(){const[e,t]=x.useState("cockpit");return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),s.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>s.jsx("button",{onClick:()=>t(r),className:J("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Werkbank":"Modelle finden"},r))})]}),s.jsx(EL,{}),s.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?s.jsx(ML,{}):s.jsx(FL,{})})]})}const pk={hermes_desktop:"Hermes Desktop: Browser-Login",kilo:"Kilo: Einstellungen → API Provider",claude_code:"env / Übersetzer"};function vg({line:e,loading:t}){return t||!e?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[s.jsx(Bt,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[s.jsx(n5,{className:"h-3 w-3"})," ",e.detail]}):s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[s.jsx(UM,{className:"h-3 w-3"})," ",e.detail]})}function xg({tool:e,fileName:t,accent:r,copied:n,onCopy:i}){return s.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[s.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),s.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),s.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),s.jsx("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:s.jsx("span",{children:t})}),s.jsxs("button",{onClick:i,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[n?s.jsx(Mt,{className:"h-3.5 w-3.5 text-emerald-400"}):s.jsx(xv,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),s.jsx("pre",{className:J("p-5 overflow-x-auto text-xs font-mono whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",r==="teal"?"text-cyan-200/90":"text-violet-200/90"),children:s.jsx("code",{children:e.snippet})})]})}function gE(){const[e,t]=x.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=x.useState(localStorage.getItem("mc_mcp_path")||""),[i,o]=x.useState("kilo"),[c,u]=x.useState(!1),[f,h]=x.useState(null),m=new URLSearchParams({host:e});r&&m.set("mcp_path",r);const{data:p,error:v}=SL(m.toString()),{data:b,isLoading:S}=hE(),w=v?String(v):"";function k(_){t(_),_&&localStorage.setItem("mc_host",_)}function N(_){n(_),localStorage.setItem("mc_mcp_path",_)}const E=p==null?void 0:p.tools.hermes_desktop,C=p==null?void 0:p.tools[i];async function A(_,O){O&&(await navigator.clipboard.writeText(O),h(_),setTimeout(()=>h(null),1500))}return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.jsx("span",{className:"text-foreground",children:"Hermes Desktop"})," ist die Tür zur Box — einmal verbinden, fertig. Für Spezialfälle gibt es darunter die rohen Leitungen (Gateway /v1 + Gedächtnis-MCP) für sonstige Tools."]})]}),s.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[s.jsx(og,{className:"h-7 w-7 mx-auto text-muted-foreground"}),s.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),s.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Hermes Desktop · Kilo Code · Claude Code …"})]}),s.jsxs("div",{className:"flex flex-col gap-2.5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wc,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[s.jsx(yi,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),s.jsx(vg,{line:b==null?void 0:b.gateway,loading:S})]}),s.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · Lanes chat / coding"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wc,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[s.jsx(Sa,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),s.jsx(vg,{line:b==null?void 0:b.memory,loading:S})]}),s.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wc,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 rounded-xl border border-emerald-500/25 bg-emerald-500/5 px-3.5 py-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-emerald-300",children:[s.jsx(og,{className:"h-3.5 w-3.5"})," Leitung 3 — Desktop-Gateway"]}),s.jsx(vg,{line:b==null?void 0:b.desktop_gateway,loading:S})]}),s.jsx("div",{className:"mt-1 text-[11px] font-mono text-emerald-300/80",children:"Desktop-Gateway · :9119 · API-Status"})]})]})]})]}),s.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",s.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",s.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," und das Desktop-Gateway bietet die Agenten-Schnittstelle — alle drei Leitungen werden unabhängig eingerichtet."]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[s.jsx(XM,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),s.jsx("input",{value:e,onChange:_=>k(_.target.value),"aria-label":"Box LAN IP-Adresse",spellCheck:!1,placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[s.jsx(a5,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",s.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),s.jsx("input",{value:r,onChange:_=>N(_.target.value),"aria-label":"Lokaler MCP-Scriptpfad",spellCheck:!1,placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-violet-500/50 text-foreground"})]})]}),w&&s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",w]}),p&&s.jsxs("div",{className:"space-y-5",children:[E&&s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-emerald-500/70 bg-card/30 p-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[s.jsx(og,{className:"h-4 w-4 text-emerald-400"}),"Hermes Desktop anbinden",s.jsx("span",{className:"text-[10px] font-medium text-emerald-400/90 normal-case",children:"der Hauptweg"})]}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Die Desktop-App dockt remote an die Box an — volle Agent-Oberfläche, Projekte, Review, Gedächtnis inklusive."})]}),E.note&&s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[s.jsx(ag,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),s.jsx("span",{children:E.note})]}),s.jsx(xg,{tool:E,fileName:pk.hermes_desktop,accent:"teal",copied:f==="desktop",onCopy:()=>A("desktop",E.snippet)})]}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/30",children:[s.jsxs("button",{onClick:()=>u(_=>!_),className:"flex w-full items-center gap-2 p-4 text-sm font-space font-bold text-foreground cursor-pointer hover:text-primary transition-colors",children:[c?s.jsx(tl,{className:"h-4 w-4"}):s.jsx(Kn,{className:"h-4 w-4"}),"Sonstige Tools (roher /v1-Zugang + Gedächtnis-MCP)",s.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"Kilo Code · Claude Code · Eigenbau"})]}),c&&s.jsxs("div",{className:"grid gap-5 lg:grid-cols-2 p-4 pt-0",children:[s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-primary/70 bg-card/30 p-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[s.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-primary/15 text-primary text-[11px]",children:"1"}),"Modell anbinden"]}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(p.tools).filter(([_])=>_!=="hermes_desktop").map(([_,O])=>s.jsx("button",{onClick:()=>o(_),className:J("rounded-lg px-3 py-1.5 text-[11px] font-semibold tracking-wide transition-all cursor-pointer",i===_?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"border border-border/50 text-muted-foreground hover:text-foreground"),children:O.label},_))}),C&&s.jsxs(s.Fragment,{children:[C.note&&s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-[11px] text-muted-foreground leading-relaxed",children:[s.jsx(ag,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),s.jsx("span",{children:C.note})]}),s.jsx(xg,{tool:C,fileName:pk[i]||"config.json",accent:"teal",copied:f==="model",onCopy:()=>A("model",C.snippet)})]})]}),s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-violet-500/70 bg-card/30 p-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[s.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-violet-500/15 text-violet-300 text-[11px]",children:"2"}),"Gedächtnis anbinden",s.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),s.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",s.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-violet-500/5 border border-violet-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[s.jsx(ag,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),s.jsx("span",{children:p.memory.note})]}),s.jsx(xg,{tool:p.memory,fileName:"mcp.json",accent:"violet",copied:f==="memory",onCopy:()=>A("memory",p.memory.snippet)})]})]})]})]})]})}const UL="modulepreload",WL=function(e){return"/"+e},gk={},HL=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let c=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=c(r.map(h=>{if(h=WL(h),h in gk)return;gk[h]=!0;const m=h.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":UL,m||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((b,S)=>{v.addEventListener("load",b),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return i.then(c=>{for(const u of c||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};class vk extends x.Component{constructor(){super(...arguments);ns(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?s.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[s.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),s.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const xk=x.lazy(()=>HL(()=>import("./GraphView-o6lRHZn6.js"),[]).then(e=>({default:e.GraphView}))),Rd=["identity","knowledge","rules","events"],yk=new Set(["auto","agent","hermes"]),yg={identity:{label:"Identität",icon:NI,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:nl,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:xI,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:mh,bg:"bg-amber-500/10",text:"text-amber-400"}},bk={label:"Gedächtnis",icon:gv,text:"text-muted-foreground"},KL={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},wk=`Hi Hermes! Lass uns ein kurzes Onboarding machen, damit du dich künftig an mich erinnerst. Stell mir nacheinander ein paar kurze Fragen zu: +1) wer ich bin und woran ich gerade arbeite, +2) wie ich angesprochen werden möchte, +3) meine bevorzugten Tools, Sprachen und Arbeitsweise, +4) wichtige Regeln/Konventionen, die du beachten sollst, +5) meine Infrastruktur (Server, Dienste – ohne Geheimnisse). +Frag immer nur eine sache auf einmal und fass am Ende zusammen, was du dir gemerkt hast.`;function vE(){const[e,t]=x.useState(""),[r,n]=x.useState(""),[i,o]=x.useState(""),[c,u]=x.useState("knowledge"),[f,h]=x.useState(!1),[m,p]=x.useState(!1),[v,b]=x.useState("liste"),[S,w]=x.useState(!1),[k,N]=x.useState(null),[E,C]=x.useState(!1),A=Hr(),{showAlert:_,showConfirm:O,dialogElement:T}=Nn(),{data:B=[]}=Ev({}),{data:z=[],error:$}=Ev({q:r,category:e}),{data:q}=yL(!0),W=$?String($):"";x.useEffect(()=>{if(!E)return;const U=ue=>{ue.key==="Escape"&&C(!1)};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[E]);const ve=()=>{A.invalidateQueries({queryKey:["memory"]}),A.invalidateQueries({queryKey:["memory-graph"]})},de=x.useMemo(()=>{const U=B.length,ue=B.filter(be=>yk.has(be.source)).length;return{total:U,auto:ue,manual:U-ue,cats:new Set(B.map(be=>be.category)).size}},[B]),ge=B.length===0,le=x.useMemo(()=>{const U=q??{nodes:[],edges:[]};if(!r.trim())return U;const ue=r.toLowerCase(),be=U.nodes.filter(Le=>Le.content.toLowerCase().includes(ue)),oe=new Set(be.map(Le=>Le.id));return{nodes:be,edges:U.edges.filter(Le=>oe.has(Le.source)&&oe.has(Le.target))}},[q,r]),ie=x.useMemo(()=>{const U={};return z.forEach(ue=>{var be;(U[be=ue.category]??(U[be]=[])).push(ue)}),U},[z]),X=x.useMemo(()=>z.filter(U=>!Rd.includes(U.category)),[z]);async function te(){i.trim()&&(await ye("/api/memory",{method:"POST",body:JSON.stringify({content:i,category:c,source:"ui"})}),o(""),w(!1),ve())}function re(U){O("Eintrag löschen?","Diesen Gedächtnis-Eintrag dauerhaft entfernen?",async()=>{try{await ye(`/api/memory/${U}`,{method:"DELETE"}),ve()}catch(ue){_("Fehler",`Löschen fehlgeschlagen: ${ue.message||ue}`)}})}async function D(){try{await navigator.clipboard.writeText(wk),p(!0),setTimeout(()=>p(!1),1800)}catch{_("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function M(){D(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function Q(){h(!0);try{const U=await ye("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(U.duplicate_count===0){_("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}const ue=oe=>oe.length>90?oe.slice(0,90)+"…":oe,be=U.groups.slice(0,5).map(oe=>`✓ bleibt: „${ue(oe.keep.content)}" +✗ weg: ${oe.remove.map(Le=>`„${ue(Le.content)}"`).join(", ")}`).join(` + +`)+(U.groups.length>5?` + +… und ${U.groups.length-5} weitere Gruppe(n).`:"");O("Deduplizierung bestätigen",`${U.duplicate_count} Dublette(n) in ${U.groups.length} Gruppe(n) gefunden: + +${be} + +Zusammenführen?`,async()=>{try{await ye("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),ve()}catch(oe){_("Fehler",`Fehler beim Löschen: ${oe.message}`)}})}catch(U){_("Fehler",`Fehler bei der Deduplizierung: ${U.message}`)}finally{h(!1)}}const ne=x.useMemo(()=>z.find(U=>U.id===k),[z,k]),ae=x.useMemo(()=>{if(!ne||!q)return[];const U=new Set([...q.edges.filter(ue=>ue.source===ne.id).map(ue=>ue.target),...q.edges.filter(ue=>ue.target===ne.id).map(ue=>ue.source)]);return z.filter(ue=>U.has(ue.id))},[ne,q,z]),ee={identity:"#00f5ff",knowledge:"#3b82f6",rules:"#d946ef",events:"#fbbf24"},se={identity:"Identität",knowledge:"Wissen",rules:"Regeln",events:"Ereignisse"},me=new Set(["auto","agent","hermes"]);return s.jsxs("div",{className:"space-y-6",children:[ge?s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 sm:p-10 flex flex-col items-center text-center gap-5",children:[s.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:s.jsx(uI,{className:"h-7 w-7 text-primary"})}),s.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[s.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Statt Fakten einzutippen: führ ein kurzes Onboarding-Gespräch mit Hermes. Was ihr besprecht, merkt sich das Gedächtnis automatisch — du musst nichts manuell pflegen."})]}),s.jsxs("div",{className:"w-full max-w-lg text-left",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),s.jsx("button",{onClick:D,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:m?s.jsxs(s.Fragment,{children:[s.jsx(Mt,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):s.jsxs(s.Fragment,{children:[s.jsx(xv,{className:"h-3 w-3"})," Kopieren"]})})]}),s.jsx("pre",{className:"w-full rounded-xl border border-border/60 bg-background/40 p-3.5 text-[11px] leading-relaxed text-foreground/90 whitespace-pre-wrap font-mono",children:wk})]}),s.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[s.jsxs("button",{onClick:M,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer",children:[s.jsx(x5,{className:"h-4 w-4"})," Im Terminal starten"]}),s.jsxs("button",{onClick:D,className:"h-9 px-4 rounded-lg border border-border/60 bg-card text-xs font-semibold hover:border-primary/50 transition-all flex items-center gap-1.5 cursor-pointer",children:[m?s.jsx(Mt,{className:"h-4 w-4 text-emerald-400"}):s.jsx(xv,{className:"h-4 w-4"})," Prompt kopieren"]})]}),s.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[s.jsx(yI,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",s.jsx("button",{onClick:()=>w(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):s.jsxs("div",{className:J("bg-[#030712] overflow-hidden transition-all duration-300 ease-in-out",E?"fixed inset-0 z-50 w-screen h-screen":"relative w-full h-[calc(100vh-8.5rem)] min-h-[620px] rounded-2xl border border-border/60 flex flex-col lg:block"),children:[s.jsx("div",{className:"absolute inset-0 z-0 hidden lg:block",children:s.jsx(vk,{children:s.jsx(x.Suspense,{fallback:s.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:s.jsx(xk,{data:le,selectedNodeId:k,onNodeSelect:N})})})}),s.jsxs("div",{className:J("z-10 flex flex-col transition-all duration-300",E?"lg:absolute lg:left-6 lg:top-6 lg:bottom-6 lg:w-96 lg:rounded-xl lg:border lg:border-border/40 lg:bg-background/65 lg:backdrop-blur-md lg:p-4 lg:shadow-2xl lg:shadow-black/50 lg:h-[calc(100%-3rem)]":"lg:absolute lg:left-4 lg:top-4 lg:bottom-4 lg:w-96 lg:rounded-xl lg:border lg:border-border/40 lg:bg-background/65 lg:backdrop-blur-md lg:p-4 lg:shadow-2xl lg:shadow-black/50 lg:h-[calc(100%-2rem)]","w-full h-full p-4 flex-1 lg:flex-none",v==="graph"&&"hidden lg:flex"),children:[s.jsxs("div",{className:"space-y-3 mb-3 shrink-0",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool"}),s.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed mt-0.5",children:"IDEs & Gateway lesen und lernen hier per MCP."})]}),s.jsx("button",{onClick:()=>C(!E),className:"p-1.5 rounded-lg border border-border/40 bg-card/45 hover:border-primary/50 text-muted-foreground hover:text-foreground transition-all cursor-pointer hidden lg:block",title:E?"Vollbild verlassen (Esc)":"In Vollbild maximieren",children:E?s.jsx(fI,{className:"h-4 w-4"}):s.jsx(sI,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.jsxs("span",{className:"text-[9px] font-semibold bg-primary/10 text-primary border border-primary/20 px-2 py-0.5 rounded-md",children:[de.total," Fakten"]}),s.jsxs("span",{className:"text-[9px] font-semibold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-2 py-0.5 rounded-md",children:[de.auto," auto"]}),s.jsxs("span",{className:"text-[9px] font-semibold bg-card/60 text-muted-foreground border border-border/40 px-2 py-0.5 rounded-md",children:[de.cats," Kat."]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 w-full",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx("input",{value:r,onChange:U=>n(U.target.value),"aria-label":"Gedächtnis durchsuchen",type:"search",placeholder:"Semantisch suchen…",className:"w-full h-8 pl-8 pr-3 rounded-lg border border-border/50 bg-background/40 text-[11px] outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),s.jsx(rl,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),s.jsx("button",{onClick:()=>w(U=>!U),title:"Eintrag hinzufügen",className:"h-8 w-8 shrink-0 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center justify-center cursor-pointer shadow-md shadow-primary/10",children:s.jsx(hf,{className:"h-4 w-4"})}),s.jsx("button",{onClick:Q,disabled:f,title:"Deduplizieren",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/60 bg-card/45 hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50",children:s.jsx(va,{className:"h-3.5 w-3.5 text-primary"})}),s.jsx("div",{className:"flex items-center gap-1 p-0.5 bg-card/30 border border-border/40 rounded-lg lg:hidden",children:[["liste",oI],["graph",$w]].map(([U,ue])=>s.jsx("button",{onClick:()=>b(U),className:J("flex h-7 w-7 items-center justify-center rounded-md transition-all cursor-pointer",v===U?"bg-primary text-primary-foreground":"text-muted-foreground"),children:s.jsx(ue,{className:"h-3.5 w-3.5"})},U))})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1 p-0.5 bg-card/30 border border-border/40 rounded-lg w-full overflow-x-auto shrink-0 scrollbar-none",children:[s.jsx("button",{onClick:()=>t(""),className:J("h-6 px-2 rounded-md text-[9px] font-semibold uppercase tracking-wider transition-all cursor-pointer shrink-0",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),Rd.map(U=>{const ue=yg[U]||bk;return s.jsx("button",{onClick:()=>t(U),className:J("h-6 px-2 rounded-md text-[9px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 shrink-0",e===U?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:ue.label},U)})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto pr-1 scrollbar-thin space-y-4",children:[S&&s.jsxs("div",{className:"rounded-xl border border-border/50 bg-background/50 p-3 space-y-2 shrink-0",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Neuer Eintrag"}),s.jsx("button",{onClick:()=>w(!1),className:"text-muted-foreground hover:text-foreground",children:s.jsx(Br,{className:"h-3.5 w-3.5"})})]}),s.jsx("textarea",{value:i,onChange:U=>o(U.target.value),rows:2,placeholder:"Vorliebe, Regel oder Fakt…",className:"w-full resize-none rounded-lg border border-border/50 bg-background/30 p-2 text-[11px] outline-none focus:ring-1 focus:ring-primary/50 text-foreground leading-relaxed"}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("select",{value:c,onChange:U=>u(U.target.value),className:"h-7 rounded-md border border-border/50 bg-background/50 px-1 text-[10px] outline-none text-foreground cursor-pointer",children:Rd.map(U=>{var ue;return s.jsx("option",{value:U,className:"bg-popover text-foreground",children:((ue=yg[U])==null?void 0:ue.label)||U},U)})}),s.jsx("button",{onClick:te,className:"h-7 px-2.5 rounded-md bg-primary text-primary-foreground text-[10px] font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Speichern"})]})]}),W&&s.jsxs("div",{className:"rounded-lg border border-red-500/20 bg-red-500/5 p-3 text-[10px] text-red-400",children:["Fehler: ",W]}),z.length===0?s.jsx("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/60 rounded-xl p-8 text-center bg-card/10",children:"Keine Einträge gefunden."}):s.jsx("div",{className:"space-y-4",children:[...Rd,"__other"].map(U=>{const ue=U==="__other"?X:ie[U]||[];if(!ue.length)return null;const be=yg[U]||bk,oe=be.icon;return s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-0.5",children:[s.jsx(oe,{className:J("h-3 w-3",be.text)}),s.jsx("span",{className:J("text-[9px] font-bold uppercase tracking-wider",be.text),children:be.label}),s.jsx("span",{className:"text-[9px] font-mono text-muted-foreground/60 bg-card/50 rounded px-1",children:ue.length})]}),s.jsx("div",{className:"space-y-1.5",children:ue.map(Le=>{const Ue=yk.has(Le.source),_e=k===Le.id;return s.jsxs("div",{onClick:()=>N(_e?null:Le.id),className:J("flex items-start justify-between gap-3 p-2.5 rounded-lg border border-l-4 transition-all group cursor-pointer text-left",_e?"bg-primary/10 border-primary shadow-md":"bg-card/45 border-border/40 hover:bg-card/75",KL[Le.category]||"border-l-muted"),children:[s.jsx("span",{className:"text-[11px] text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1 min-w-0",children:Le.content}),s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 self-center",children:[Ue&&s.jsx("span",{title:"Auto gelernt",children:s.jsx(va,{className:"h-2.5 w-2.5 text-emerald-400"})}),s.jsx("button",{onClick:mt=>{mt.stopPropagation(),re(Le.id),k===Le.id&&N(null)},className:"h-5 w-5 rounded-md flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",children:s.jsx(Us,{className:"h-3.5 w-3.5"})})]})]},Le.id)})})]},U)})})]})]}),s.jsx("div",{className:J("w-full h-[500px] relative lg:hidden",v==="liste"&&"hidden"),children:s.jsx(vk,{children:s.jsx(x.Suspense,{fallback:s.jsx("div",{className:"h-full rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:s.jsx(xk,{data:le,selectedNodeId:k,onNodeSelect:N})})})}),ne&&s.jsxs("div",{className:J("z-10 flex flex-col transition-all duration-300",E?"lg:absolute lg:right-6 lg:top-6 lg:bottom-6 lg:w-80 lg:rounded-xl lg:border lg:border-border/40 lg:bg-background/65 lg:backdrop-blur-md lg:p-4 lg:shadow-2xl lg:shadow-black/50 lg:h-[calc(100%-3rem)]":"lg:absolute lg:right-4 lg:top-4 lg:bottom-4 lg:w-80 lg:rounded-xl lg:border lg:border-border/40 lg:bg-background/65 lg:backdrop-blur-md lg:p-4 lg:shadow-2xl lg:shadow-black/50 lg:h-[calc(100%-2rem)]","w-full p-4 border-t border-border/60 bg-card/45 shrink-0 flex flex-col"),children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[s.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{background:ee[ne.category]}}),s.jsx("span",{className:"text-[9px] font-bold uppercase tracking-wider",style:{color:ee[ne.category]},children:se[ne.category]||ne.category}),s.jsxs("span",{className:`ml-auto text-[9px] font-mono flex items-center gap-1 ${me.has(ne.source)?"text-emerald-400":"text-muted-foreground/70"}`,children:[me.has(ne.source)&&s.jsx(va,{className:"h-2.5 w-2.5"}),ne.source]}),s.jsx("button",{onClick:()=>N(null),className:"text-muted-foreground hover:text-foreground ml-1.5 cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto pr-1 scrollbar-thin text-xs text-foreground leading-relaxed mb-4 break-words whitespace-pre-wrap text-left",children:ne.content}),s.jsxs("div",{className:"mt-auto shrink-0 space-y-3 pt-3 border-t border-border/30",children:[s.jsxs("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/70 flex items-center gap-1",children:[s.jsx($w,{className:"h-2.5 w-2.5"})," verwandte Fakten"]}),s.jsx("div",{className:"flex flex-col gap-1 max-h-40 overflow-y-auto scrollbar-none text-left",children:ae.length?ae.map(U=>s.jsxs("button",{onClick:()=>N(U.id),className:"flex items-center gap-2 text-[10px] text-muted-foreground hover:text-foreground text-left transition-colors cursor-pointer py-0.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{background:ee[U.category]}}),s.jsx("span",{className:"truncate",children:U.content})]},U.id)):s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"—"})}),s.jsxs("button",{onClick:()=>{re(ne.id),N(null)},className:"flex w-full items-center justify-center gap-1.5 text-[10px] font-bold text-red-400 border border-red-500/20 rounded-lg py-2 hover:bg-red-500/5 transition-all cursor-pointer",children:[s.jsx(Us,{className:"h-3.5 w-3.5"})," Eintrag vergessen"]})]})]})]}),T]})}const GL=["chat","coding","fast","heavy"];function xE(){const{data:e,error:t}=Vx(5e3),{data:r}=Si(),{showAlert:n,dialogElement:i}=Nn(),o=Hr(),c=t?String(t):"",[u,f]=x.useState(!1),h=(r==null?void 0:r.models)??[];async function m(v){try{await ye("/api/agent/brain",{method:"POST",body:JSON.stringify({model:v})}),n("Erledigt",`Hermes-Hirn zeigt jetzt auf das Alias '${v}'. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:ze.agentStatus}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}async function p(v){try{await ye("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:v})}),n("Erledigt","Agent-Hirn gewechselt (warm gehalten). Gateway wurde neugestartet."),o.invalidateQueries({queryKey:ze.agentStatus}),o.invalidateQueries({queryKey:ze.models}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",s.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.hermes_ui_url)&&s.jsxs("a",{href:Nv(e.hermes_ui_url),target:"_blank",rel:"noopener",className:J("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",e.hermes_ui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[s.jsx(Dx,{className:"h-4 w-4"}),s.jsx("span",{children:"Hermes-GUI öffnen"})]})]}),c&&s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",c,")."]}),e&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[s.jsx(Hn,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Fluss"})]}),s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-stretch gap-3",children:[s.jsxs("button",{onClick:()=>e.hermes_ui_reachable&&window.open(Nv(e.hermes_ui_url),"_blank"),title:e.hermes_ui_reachable?"Hermes-GUI öffnen":"Desktop-Gateway offline",className:"lg:w-40 shrink-0 rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/40 transition-all cursor-pointer flex flex-col justify-center",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(hh,{className:J("h-3.5 w-3.5",e.hermes_ui_reachable?"text-emerald-400":"text-amber-500")}),s.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Desktop & GUI"}),s.jsx("span",{className:J("ml-auto h-1.5 w-1.5 rounded-full animate-pulse",e.hermes_ui_reachable?"bg-emerald-500":"bg-amber-500")})]}),s.jsx("span",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:"Hermes Desktop · Clients"})]}),s.jsx("div",{className:"hidden lg:flex items-center text-muted-foreground text-lg select-none",children:"→"}),s.jsxs("div",{className:"flex-1 flex flex-col gap-2.5",children:[s.jsxs("div",{className:"rounded-xl border border-primary/40 bg-primary/5 px-3.5 py-2.5 flex items-center gap-2",children:[s.jsx(Hn,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-xs font-semibold text-primary",children:"Agent Gateway"}),s.jsx("span",{className:"text-[11px] font-mono text-muted-foreground",children:":8642"}),s.jsxs("span",{className:J("ml-auto inline-flex items-center gap-1.5 text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded-full border",e.gateway_reachable?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-red-500/10 text-red-400 border-red-500/20"),children:[s.jsx("span",{className:J("h-1.5 w-1.5 rounded-full",e.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-red-500")}),e.gateway_reachable?"online":"offline"]})]}),s.jsxs("div",{className:"grid gap-2.5 sm:grid-cols-3",children:[s.jsxs("button",{onClick:()=>f(!0),className:"rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/45 transition-all cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[s.jsx(yi,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Hirn"}),s.jsx("span",{className:"ml-auto text-[9px] text-primary/70 font-bold uppercase",children:"wechseln →"})]}),s.jsx("div",{className:"text-[11px] font-mono font-medium text-foreground truncate mt-1",title:e.brain_model,children:e.brain_model||"chat"})]}),s.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[s.jsx(tu,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),s.jsxs("div",{className:"text-[10px] font-mono mt-1 flex flex-wrap gap-x-2 text-muted-foreground",children:[s.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),s.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),s.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]}),s.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[s.jsx(Lw,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"PC"}),s.jsx("span",{className:J("ml-auto h-1.5 w-1.5 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")})]}),s.jsxs("div",{className:J("text-[11px] font-mono mt-1",e.pc_executor_reachable?"text-emerald-400":"text-muted-foreground"),children:[":7777 ",e.pc_executor_reachable?"verbunden":"offline"]})]})]})]})]})]}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Lw,{className:"h-5 w-5 text-primary"}),s.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:J("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),s.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),s.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("p",{children:["Der ",s.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",s.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),s.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",s.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),s.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?s.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[s.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),s.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",s.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",s.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",s.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),s.jsxs("p",{children:["Starte ",s.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",s.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),s.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!e.gateway_reachable&&s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(nl,{className:"h-5 w-5 text-amber-500"}),s.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),s.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[s.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),s.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",s.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),s.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[s.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),s.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),s.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-builtin-ui"})]}),s.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",s.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),e&&u&&s.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":"Hermes-Hirn konfigurieren",children:s.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[s.jsx(yi,{className:"h-4 w-4"}),s.jsx("span",{children:"Hermes-Hirn konfigurieren"})]}),s.jsx("button",{onClick:()=>f(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Lane / Gateway-Alias"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:GL.map(v=>{const b=e.brain_model===v;return s.jsxs("button",{onClick:()=>m(v),className:J("px-3 py-1.5 rounded-lg text-xs font-mono font-semibold border transition-all cursor-pointer flex items-center gap-1.5",b?"border-primary/40 bg-primary/10 text-primary":"border-border/30 bg-background/20 text-foreground hover:bg-accent"),children:[v,b&&s.jsx(Mt,{className:"h-3.5 w-3.5"})]},v)})}),s.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["Schlank & flexibel: das Hirn folgt dem Lane-Routing (z.B. ",s.jsx("code",{className:"text-primary",children:"chat"})," = fast↔heavy)."]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Installiertes Modell (warm gehalten)"}),s.jsx("div",{className:"space-y-1.5 max-h-56 overflow-y-auto pr-1",children:h.map(v=>{var S;const b=v.role==="hermes";return s.jsxs("button",{onClick:()=>!b&&p(v.name),disabled:b||v.incomplete,className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",b?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":v.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[s.jsxs("div",{className:"flex flex-col min-w-0",children:[s.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(S=v.name.split("/").pop())==null?void 0:S.replace(/\.gguf$/i,"")}),s.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[v.capabilities.params_b?`${v.capabilities.params_b}B`:"?"," · ",v.capabilities.tools!=="no"?"Tools ✓":"ohne Tools",v.role&&` · Rolle: ${v.role}`]})]}),b?s.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[s.jsx(Mt,{className:"h-3.5 w-3.5"})," Aktiv"]}):s.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Warm setzen →"})]},v.name)})})]}),s.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[s.jsx("span",{children:"💡"}),s.jsxs("span",{children:["Für einen ",s.jsx("strong",{children:"Agenten"}),' sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl. Neues Modell? Erst über „Modell-Manager → Modelle finden" laden.']})]})]})}),i]})}function VL(){const{data:e}=Vx(5e3),t=e!=null&&e.box_console_url?Nv(e.box_console_url):void 0,r=e==null?void 0:e.box_console_reachable;return s.jsxs("div",{className:"flex h-full flex-col gap-4",children:[s.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Konsole"}),s.jsx("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:"Direkte Shell auf der Box — wie ein SSH-Fenster, mitten im Browser."})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx("span",{className:J("h-2 w-2 rounded-full",r?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r?"online":"offline"]}),t&&s.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[s.jsx(Dx,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?s.jsxs("div",{className:"relative min-h-[58vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&s.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[s.jsx(vr,{className:"h-8 w-8 text-amber-400"}),s.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Konsole nicht erreichbar"}),s.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",s.jsx("code",{className:"font-mono text-primary",children:"box-console"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",s.jsx("code",{className:"font-mono",children:"systemctl --user restart box-console"}),"."]})]}),s.jsx("iframe",{src:t,title:"Box-Konsole",className:"h-full w-full border-0",style:{minHeight:"58vh"}})]}):s.jsxs("div",{className:"flex min-h-[58vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[s.jsx(v5,{className:"mr-2 h-4 w-4"})," Lade Konsole…"]})]})}const kk=[{id:"grundlagen",label:"Grundlagen"},{id:"moe",label:"MoE & Quant"},{id:"lokal",label:"Lokal betreiben"},{id:"modelle",label:"Modell-Landschaft"},{id:"gateway",label:"Gateway-Trick"},{id:"mcp",label:"MCP"},{id:"skills",label:"Skills"},{id:"memory",label:"Gedächtnis & RAG"},{id:"agents",label:"Agenten"},{id:"ide",label:"IDE anbinden"},{id:"tricks",label:"Tricks & Kniffe"},{id:"wartung",label:"Sicherheit & Wartung"},{id:"ressourcen",label:"Ressourcen"},{id:"troubleshooting",label:"Troubleshooting"}];function qL(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView({behavior:"smooth",block:"start"})}function Dr({id:e,icon:t,color:r,title:n,kicker:i,children:o,wide:c}){return s.jsxs("section",{id:e,className:J("scroll-mt-20 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-3",c&&"md:col-span-2"),children:[s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[s.jsx(t,{className:J("h-5 w-5 shrink-0",r)}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:n}),i&&s.jsx("span",{className:J("text-[9px] font-mono",r),children:i})]})]}),s.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:o})]})}function Ba({children:e}){return s.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[s.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[s.jsx(va,{className:"h-3 w-3"})," Bei dir konkret"]}),s.jsx("div",{className:"text-muted-foreground space-y-1",children:e})]})}function Be({children:e}){return s.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:e})}function St({href:e,name:t,note:r}){return s.jsxs("li",{className:"leading-relaxed",children:[s.jsxs("a",{href:e,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[t,s.jsx(MM,{className:"h-3 w-3 opacity-60"})]}),s.jsxs("span",{className:"text-muted-foreground",children:[" — ",r]})]})}function QL(){const[e,t]=x.useState(!1);return s.jsxs("div",{className:"space-y-7",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 flex items-start gap-4",children:[s.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:s.jsx(gv,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Die AI-Bibel"}),s.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Allgemeines Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",s.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juni 2026."})," ","Das meiste gilt überall; ",s.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),s.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:s.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[s.jsx(vv,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(e?kk:kk.slice(0,9)).map(r=>s.jsx("button",{onClick:()=>qL(r.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:r.label},r.id)),s.jsx("button",{onClick:()=>t(r=>!r),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:e?"weniger":"+ mehr"})]})})}),s.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[s.jsxs(Dr,{id:"grundlagen",icon:yi,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[s.jsxs("p",{children:["Ein LLM ist im Kern ein ",s.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),s.jsxs("li",{children:[s.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",s.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),s.jsxs(Dr,{id:"moe",icon:l5,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",s.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",s.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),s.jsxs("p",{children:[s.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx(Be,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),s.jsxs("li",{children:[s.jsx(Be,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),s.jsxs("li",{children:[s.jsx(Be,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),s.jsxs(Ba,{children:["VRAM/RAM ist die harte Grenze — ",s.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",s.jsx(Be,{children:"Q4_K_M"}),"/",s.jsx(Be,{children:"Q6_K"}),"."]})]}),s.jsxs(Dr,{id:"lokal",icon:ph,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"llama-swap"})," — Proxy, der ",s.jsx("em",{children:"mehrere"})," Modelle hinter ",s.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),s.jsx("ul",{className:"list-disc pl-4 space-y-1",children:s.jsxs("li",{children:[s.jsx(Be,{children:"CUDA"})," NVIDIA · ",s.jsx(Be,{children:"ROCm"})," AMD · ",s.jsx(Be,{children:"Vulkan"})," herstellerübergreifend · ",s.jsx(Be,{children:"Metal"})," Apple"]})}),s.jsxs("p",{className:"pt-1",children:[s.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",s.jsx(Be,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",s.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),s.jsxs(Ba,{children:["Deine Box hat eine AMD-APU (gfx1151). ",s.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",s.jsx(Be,{children:"Vulkan/RADV"})," das offizielle ",s.jsx(Be,{children:"ROCm"})," bei Token-Generierung um ~12–22 % — darum läuft die Engine auf Vulkan.",s.jsx(Be,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",s.jsx(Be,{children:"coder"})," nutzt Spec-Decoding."]})]}),s.jsxs(Dr,{id:"modelle",icon:ff,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{children:s.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Llama"})," (Meta), ",s.jsx("strong",{children:"Gemma"})," (Google), ",s.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"DeepSeek"}),", ",s.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{children:s.jsx("strong",{children:"Frontier (Cloud-API):"})}),s.jsx("ul",{className:"list-disc pl-4 space-y-1",children:s.jsxs("li",{children:[s.jsx("strong",{children:"Claude"})," (Anthropic), ",s.jsx("strong",{children:"GPT"})," (OpenAI), ",s.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),s.jsxs("p",{className:"pt-1",children:[s.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),s.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),s.jsxs(Ba,{children:["Dein Line-up via llama-swap: ",s.jsx(Be,{children:"fast"})," (Alltag/Vision/MoE) · ",s.jsx(Be,{children:"heavy"})," (schwere Logik) ·",s.jsx(Be,{children:"coder"})," · ",s.jsx(Be,{children:"scout"})," · ",s.jsx(Be,{children:"vision"})," · ",s.jsx(Be,{children:"embed"})," (fürs Gedächtnis) ·",s.jsx(Be,{children:"hermes"})," (Agent-Hirn). Verwalten/tauschen im ",s.jsx("strong",{children:"Modell-Manager"}),"-Tab."]})]}),s.jsxs(Dr,{id:"gateway",icon:hI,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[s.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",s.jsx("strong",{children:"OpenAI-Format"})," (",s.jsx(Be,{children:"/v1/chat/completions"}),"). Ein",s.jsx("strong",{children:" Gateway"})," davor gibt dir ",s.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",s.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),s.jsxs("p",{children:["Die ",s.jsx(Be,{children:"model:auto"}),'-Idee: du sagst „auto", das Gateway wählt das passende Modell je nach Anfrage und lädt es bei Bedarf.']}),s.jsxs(Ba,{children:["Dein Gateway: ",s.jsx(Be,{children:"http://192.168.178.151:9001/v1"}),", Model ",s.jsx(Be,{children:"auto"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",s.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),s.jsxs(Dr,{id:"mcp",icon:Pc,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[s.jsxs("p",{children:["Das ",s.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",s.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),s.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),s.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[s.jsx(u5,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),s.jsxs("span",{children:[s.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),s.jsxs(Dr,{id:"skills",icon:pI,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[s.jsxs("p",{children:["Ein ",s.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",s.jsx(Be,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),s.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- +name: tdd-pro +description: Treibt Entwicklung mit strikter TDD-Praxis +--- +# Instructions +...`}),s.jsxs("p",{children:["Suchen & installieren über die ",s.jsx("strong",{children:"skills.sh"}),"-Registry: ",s.jsx(Be,{children:"npx skills find"})," /",s.jsx(Be,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),s.jsxs(Dr,{id:"memory",icon:VM,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:["LLMs sind ",s.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",s.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:["extrahiert Fakten ",s.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),s.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),s.jsxs("li",{children:[s.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",s.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),s.jsxs(Ba,{children:["Dein Gedächtnis (Tab ",s.jsx("strong",{children:"Gedächtnis"}),") ist ",s.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",s.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",s.jsx(Be,{children:"Identität"})," · ",s.jsx(Be,{children:"Wissen"})," · ",s.jsx(Be,{children:"Regeln"})," · ",s.jsx(Be,{children:"Ereignisse"}),"). Einstieg über ein kurzes ",s.jsx("strong",{children:"Hermes-Onboarding-Gespräch"})," im Terminal — der Agent lernt im Hintergrund nach jedem Turn.",s.jsx("br",{}),s.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),s.jsxs(Dr,{id:"agents",icon:Hn,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:["Ein ",s.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",s.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",s.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),s.jsxs(Ba,{children:[s.jsx("strong",{children:"Hermes"})," ist dein Box-Agent (Hirn = ",s.jsx(Be,{children:"fast"}),"). Reden tust du mit ihm im",s.jsx("strong",{children:" Terminal"}),"-Tab (Web-Terminal via ttyd) oder per ",s.jsx("strong",{children:"Telegram"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und ",s.jsx("strong",{children:"PC-Steuerung"})," (Executor auf deinem Windows-PC). Status & Verdrahtung im ",s.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),s.jsxs(Dr,{id:"ide",icon:Fs,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[s.jsxs("p",{children:["Jede ",s.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Cline"})," & ",s.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Continue"}),", ",s.jsx("strong",{children:"aider"})," (CLI), ",s.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),s.jsxs(Ba,{children:["Tipp den Kram nicht ab: der ",s.jsx("strong",{children:"Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",s.jsx(Be,{children:"…:9001/v1"}),", Model ",s.jsx(Be,{children:"auto"}),", Key beliebig."]})]}),s.jsx(Dr,{id:"tricks",icon:iI,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:s.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([r,n])=>s.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[s.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[s.jsx(wa,{className:"h-3 w-3 text-amber-400"})," ",r]}),s.jsx("p",{className:"text-[11px]",children:n})]},r))})}),s.jsx(Dr,{id:"wartung",icon:nl,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[s.jsx(o5,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[s.jsx(tu,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Backup:"})," tägliches Voll-Zustands-Backup, getesteter ",s.jsx(Be,{children:"restore.sh"})," (Doku in ",s.jsx(Be,{children:"docs/BACKUP.md"}),")."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",s.jsx("strong",{children:"Hermes-Update-Button"})," mit anschließendem ",s.jsx("strong",{children:"Gehirn-Check"})," (rot, falls das Update das Gedächtnis zerschießt) + Engine-Update."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),s.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),s.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[s.jsx(vv,{className:"h-5 w-5 text-primary"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),s.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(ff,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),s.jsx(St,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),s.jsx(St,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),s.jsx(St,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),s.jsx(St,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),s.jsx(St,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(Pc,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),s.jsx(St,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),s.jsx(St,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),s.jsx(St,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),s.jsx(St,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(Hn,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),s.jsx(St,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),s.jsx(St,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),s.jsx(St,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),s.jsx(St,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(gv,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),s.jsx(St,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),s.jsx(St,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),s.jsx(St,{href:"https://github.com/mem0ai/mem0",name:"Mem0",note:"die auto-lernende Memory-Schicht hinter deinem Gedächtnis."}),s.jsx(St,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),s.jsx(Dr,{id:"troubleshooting",icon:nI,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:s.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",s.jsx(Be,{children:":9001"}),")? Backend-Status in der ",s.jsx("strong",{children:"Zentrale"})," prüfen."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," In der ",s.jsx("strong",{children:"Zentrale → Dienste"})," schauen, ob ",s.jsx(Be,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session im ",s.jsx("strong",{children:"Terminal"})," starten — meist ist es vollgemüllter Kontext."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort). Leeres Gedächtnis → Hermes-Onboarding starten."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Update hat etwas zerschossen?"})," Genau dafür gibt es Backup & ",s.jsx(Be,{children:"restore.sh"})," — den getesteten Restore fahren, dann Ursache suchen."]})]})})]}),s.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juni 2026 — lebendes Dokument, wächst mit dem Stack."})]})}function YL({title:e,hint:t}){return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold",children:e}),s.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),s.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[s.jsx(GM,{className:"h-8 w-8 text-muted-foreground"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const jk=[{id:"mission-control-2",label:"Mission Control",type:"user",reach:"gateway (integr"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user",reach:"hermes-gateway"},{id:"mem0-service",label:"Mem0 (Gedächtnis)",type:"user",reach:"mem0"},{id:"voice-service",label:"Voice (Sprache)",type:"user",reach:"voice"},{id:"hermes-builtin-ui",label:"Hermes GUI (Desktop-Gateway)",type:"user",reach:"hermes-gui"},{id:"llama-swap",label:"Llama Swap",type:"system",reach:"llama-swap"}];function oc({icon:e,iconClass:t,name:r,status:n,available:i,busy:o,actionLabel:c,onAction:u}){return s.jsxs("div",{className:J("flex items-center gap-3 rounded-lg border px-3 py-2",i?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[s.jsx(e,{className:J("h-4 w-4 shrink-0",t)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs text-foreground truncate",children:r}),s.jsx("div",{className:J("text-[10px] truncate",i?"text-amber-400/90":"text-muted-foreground"),children:n})]}),s.jsx("button",{onClick:u,disabled:!i||o,className:J("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",i?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":c})]})}function ZL({label:e,ok:t,system:r,busy:n,onRestart:i,onLogs:o}){return s.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[s.jsx("span",{className:J("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),s.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&s.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),s.jsx("button",{onClick:i,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:s.jsx(ho,{className:J("h-3.5 w-3.5",n&&"animate-spin")})}),s.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:s.jsx(i5,{className:"h-3.5 w-3.5"})})]})}function bg(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}const XL=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,JL=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function eR(e){return XL.test(e)?"error":JL.test(e)?"warn":"info"}const tR={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function rR({service:e,text:t,loading:r,logStatus:n,onRefresh:i,onOpenSettings:o}){const[c,u]=x.useState(!1),[f,h]=x.useState(""),m=x.useRef(null),p=x.useMemo(()=>t?t.split(` +`).map(k=>({t:k,level:eR(k)})):[],[t]),v=x.useMemo(()=>p.filter(k=>k.level!=="info").length,[p]),b=f.trim().toLowerCase(),S=p.filter(k=>(!c||k.level!=="info")&&(!b||k.t.toLowerCase().includes(b))),w=n==="password_required"||n==="incorrect_password";return s.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[s.jsxs("div",{className:"flex h-10 items-center justify-between gap-2 px-3 border-b border-border/40 bg-black/30 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[s.jsx(x5,{className:"h-3 w-3 text-primary"}),s.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsxs("div",{className:"relative",children:[s.jsx(rl,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{value:f,onChange:k=>h(k.target.value),placeholder:"filtern…",className:"h-7 w-24 sm:w-36 rounded-md border border-border/50 bg-background/40 pl-6 pr-2 text-[10px] text-foreground outline-none focus:border-primary/50"})]}),s.jsxs("button",{onClick:()=>u(k=>!k),title:"Nur Fehler und Warnungen zeigen",className:J("flex h-7 items-center gap-1 rounded-md border px-2 text-[10px] font-semibold transition-colors",c?"border-amber-500/50 bg-amber-500/15 text-amber-300":"border-border/50 bg-background/20 text-muted-foreground hover:text-foreground"),children:[s.jsx(vr,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),s.jsx("button",{onClick:i,disabled:r,title:"Neu laden",className:"flex h-7 w-7 items-center justify-center rounded-md border border-border/50 bg-background/20 text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",children:s.jsx(ho,{className:J("h-3 w-3",r&&"animate-spin")})})]})]}),s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:w?s.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[s.jsx(vr,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),s.jsx("div",{className:"text-xs font-semibold text-amber-300",children:n==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),s.jsxs("p",{className:"max-w-xs text-[10px] leading-normal text-muted-foreground",children:["Für das Auslesen der systemd-Logs von ",e," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),s.jsx("button",{onClick:o,className:"mt-2 rounded-md bg-primary px-3 py-1.5 text-[10px] font-semibold text-primary-foreground transition-colors hover:bg-primary/95",children:"Sudo-Passwort eintragen"})]}):r&&!t?s.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):p.length===0?s.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):S.length===0?s.jsx("span",{className:"text-muted-foreground",children:c?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):S.map((k,N)=>s.jsx("div",{className:J("whitespace-pre-wrap",tR[k.level]),children:k.t||" "},N))})]})}function nR({open:e,showAlert:t}){const[r,n]=x.useState(""),[i,o]=x.useState(""),[c,u]=x.useState(!1),[f,h]=x.useState(!1);return x.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),s.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(nl,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:c?"text":"password",value:r,onChange:m=>n(m.target.value),"aria-label":"Host Sudo-Passwort",name:"sudo-password",autoComplete:"off",spellCheck:!1,placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),s.jsx("button",{type:"button",onClick:()=>u(!c),"aria-label":c?"Passwort verbergen":"Passwort anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:c?s.jsx(Dw,{className:"h-4 w-4","aria-hidden":"true"}):s.jsx(Cc,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(tI,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:f?"text":"password",value:i,onChange:m=>o(m.target.value),"aria-label":"HuggingFace API Token",name:"hf-token",autoComplete:"off",spellCheck:!1,placeholder:"hf_…",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),s.jsx("button",{type:"button",onClick:()=>h(!f),"aria-label":f?"Token verbergen":"Token anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:f?s.jsx(Dw,{className:"h-4 w-4","aria-hidden":"true"}):s.jsx(Cc,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),s.jsxs("div",{className:"flex gap-3 pt-2",children:[s.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",r),localStorage.setItem("mc_hf_token",i),t("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),s.jsx("button",{onClick:()=>{n(""),o(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),t("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Zurücksetzen"})]})]})}function iR({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var f,h;const i=e.data,o={os:{icon:nl,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:ph,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:g5,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:Hn,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],c=o.icon,u=i?e.kind==="os"?(i.count??0)===0:e.kind==="hermes"?(i.behind??0)===0:i.installed_build!=null&&i.latest_build!=null&&i.latest_build<=i.installed_build:!0;return s.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative w-full max-w-lg max-h-[80vh] flex flex-col rounded-2xl border border-border/60 bg-card shadow-2xl font-sans text-foreground",children:[s.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(c,{className:J("h-4.5 w-4.5",o.cls)}),s.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),s.jsx("button",{onClick:r,className:"flex h-7 w-7 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?s.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[s.jsx(ho,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):i!=null&&i.error?s.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:i.error}):s.jsxs(s.Fragment,{children:[(i==null?void 0:i.action_needed)!=null&&s.jsxs("div",{className:J("flex items-start gap-2 rounded-lg border p-3",i.action_needed?"border-amber-500/40 bg-amber-500/10":"border-emerald-500/40 bg-emerald-500/10"),children:[i.action_needed?s.jsx(vr,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):s.jsx(n5,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:J("text-xs font-semibold",i.action_needed?"text-amber-300":"text-emerald-300"),children:["Musst du etwas tun? ",i.action_needed?"Ja":"Nein — die Box regelt das (Fangnetz)"]}),i.action_needed&&i.action_text&&s.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:i.action_text})]})]}),(i==null?void 0:i.summary)&&s.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),s.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:i.summary})]}),e.kind==="os"?s.jsxs(s.Fragment,{children:[((i==null?void 0:i.count)??0)===0?s.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground",children:[i.count," Paket(e) werden aktualisiert:"]}),s.jsx("div",{className:"space-y-1",children:i.packages.map(m=>s.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[s.jsx(Rw,{className:"h-3 w-3 text-cyan-400 shrink-0"}),m.name]}),s.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[s.jsx("span",{children:m.current}),s.jsx(wc,{className:"h-3 w-3"}),s.jsx("span",{className:"text-emerald-400",children:m.candidate})]})]},m.name))})]}),(((f=i==null?void 0:i.held_back)==null?void 0:f.length)??0)>0&&s.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[s.jsx(mh,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),s.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Pakete gäbe es bereits, Ubuntu spielt sie aber gestaffelt aus (Phasen-Rollout) bzw. hält sie kurz zurück. Sie kommen bei einem der nächsten automatischen Läufe von selbst — das ist kein Fehler und nichts hängt fest."}),s.jsx("div",{className:"space-y-1",children:i.held_back.map(m=>s.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/30 bg-background/30 px-2.5 py-1.5",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[s.jsx(Rw,{className:"h-3 w-3 text-muted-foreground shrink-0"}),m.name]}),s.jsx("span",{className:"text-[9px] text-muted-foreground shrink-0",children:m.reason==="phasing"?"Phasen-Rollout":"vorerst zurückgehalten"})]},m.name))})]})]}):e.kind==="engine"||e.kind==="swap"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[s.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",(i==null?void 0:i.installed_build)??"?"]}),s.jsx(wc,{className:"h-3.5 w-3.5 text-muted-foreground"}),s.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",(i==null?void 0:i.latest_build)??"?"]})]}),((i==null?void 0:i.name)||(i==null?void 0:i.latest_tag))&&s.jsxs("div",{className:"text-muted-foreground",children:["Release: ",s.jsx("span",{className:"text-foreground",children:i==null?void 0:i.name}),i!=null&&i.latest_tag?` (${i.latest_tag})`:""]}),(i==null?void 0:i.url)&&s.jsxs("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Original-Release-Notes auf GitHub ",s.jsx(Dx,{className:"h-3 w-3"})]}),(i==null?void 0:i.body)&&s.jsxs("details",{className:"group",children:[s.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),s.jsx("pre",{className:"mt-1.5 whitespace-pre-wrap rounded-lg border border-border/40 bg-background/30 p-3 text-[10px] leading-relaxed text-muted-foreground max-h-60 overflow-y-auto scrollbar-thin",children:i.body})]})]}):(((h=i==null?void 0:i.commits)==null?void 0:h.length)??0)===0?s.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground",children:[i.behind," neue Commit(s) auf ",s.jsxs("span",{className:"font-mono text-foreground",children:["origin/",i.branch]}),":"]}),s.jsx("div",{className:"space-y-1",children:i.commits.map(m=>s.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[s.jsx(ZM,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[11px] truncate",children:m.subject}),s.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[m.hash," · ",m.when]})]})]},m.hash))})]}),e.kind!=="os"&&!u&&s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[s.jsx(p5,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Vor dem Update sichert die Box automatisch den alten Stand. Danach prüft sie den ganzen Stack per echter Anfrage — läuft etwas nicht, rollt sie von selbst zurück",e.kind==="hermes"?" und startet den Gateway neu":"","."]})]})]})}),s.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[s.jsx("button",{onClick:r,className:"h-9 flex-1 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold text-muted-foreground hover:bg-accent transition-colors cursor-pointer",children:"Schließen"}),s.jsx("button",{onClick:n,disabled:e.loading||u||!!t,title:t?`Update läuft bereits: ${t.label}`:void 0,className:"h-9 flex-1 rounded-lg bg-primary text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-40 disabled:cursor-default",children:t?"Update läuft…":"Jetzt aktualisieren"})]})]})]})}function yE({open:e,onClose:t,defaultTab:r="maintenance"}){var Mi,vl;const[n,i]=x.useState(null),[o,c]=x.useState([]),[u,f]=x.useState("llama-swap"),[h,m]=x.useState(""),[p,v]=x.useState(!1),[b,S]=x.useState(null),[w,k]=x.useState({}),[N,E]=x.useState("maintenance"),[C,A]=x.useState(!1),[_,O]=x.useState(""),[T,B]=x.useState(!1),[z,$]=x.useState(null),[q,W]=x.useState([]),[ve,de]=x.useState(!1),[ge,le]=x.useState(null),[ie,X]=x.useState(null);function te(G,Re,it){X({type:"alert",title:G,message:Re,onConfirm:()=>{X(null),it&&it()}})}function re(G,Re,it){X({type:"confirm",title:G,message:Re,onConfirm:()=>{X(null),it()},onCancel:()=>X(null)})}function D(G){return G?new Date(G*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}x.useEffect(()=>{e&&r&&E(r)},[e,r]);function M(){ye("/api/maintenance/updates").then(i).catch(G=>console.error("Error loading updates",G))}function Q(){ye("/api/jobs").then(G=>c(G.jobs||[])).catch(G=>console.error("Error loading jobs",G))}function ne(){ye("/api/system/services").then($).catch(()=>{})}function ae(){ye("/api/system/backups").then(G=>W(G.backups||[])).catch(()=>{})}function ee(G){v(!0),S(null),ye(`/api/maintenance/logs?service=${G}&lines=150`).then(Re=>{Re.ok?m(Re.text):(m(`Fehler beim Laden der Logs: ${Re.err||"Unbekannter Fehler"}`),(Re.status==="incorrect_password"||Re.status==="password_required")&&S(Re.status))}).catch(Re=>m(`Fehler: ${Re.message}`)).finally(()=>v(!1))}x.useEffect(()=>{if(!e)return;M(),Q(),ne(),ae();const G=setInterval(()=>{Q(),M(),ne()},3e3);return()=>clearInterval(G)},[e]),x.useEffect(()=>{!e||N!=="logs"||ee(u)},[e,N,u]);function se(G){return(G==null?void 0:G.status)==="busy"?(te("Update läuft bereits",`Es läuft gerade „${G.running}". Bitte warte, bis es fertig ist.`),Q(),!0):!1}function me(G){return(G==null?void 0:G.status)==="password_required"||(G==null?void 0:G.status)==="incorrect_password"?(te("Box-Passwort nötig",(G.status==="incorrect_password"?"Das gespeicherte Box-Passwort stimmt nicht. ":"Für dieses Update braucht die Box dein Passwort. ")+"Bitte oben im Reiter „Einstellungen“ setzen bzw. korrigieren."),!0):G&&G.ok===!1?(te("Update fehlgeschlagen",G.err||"Unbekannter Fehler."),!0):!1}async function U(){try{const G=await ye("/api/maintenance/os-update",{method:"POST"});if(se(G)||me(G))return;Q(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Starten des OS-Updates: ${G.message}`)}}async function ue(){try{const G=await ye("/api/maintenance/engine-update",{method:"POST"});if(se(G)||me(G))return;Q(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Engine-Update: ${G.message}`)}}async function be(){try{const G=await ye("/api/maintenance/swap-update",{method:"POST"});if(se(G)||me(G))return;Q(),E("maintenance")}catch(G){te("Fehler",`Fehler beim Router-Update: ${G.message}`)}}async function oe(){de(!0);try{const G=await ye("/api/maintenance/hermes-update",{method:"POST"});if(se(G))return;Q()}catch(G){te("Fehler",`Hermes-Update fehlgeschlagen: ${G.message}`)}finally{de(!1)}}async function Le(G){le({kind:G,loading:!0,data:null});try{const Re=await ye(`/api/maintenance/update-details?kind=${G}`);le({kind:G,loading:!1,data:Re})}catch(Re){le({kind:G,loading:!1,data:{kind:G,error:Re.message}})}}function Ue(){const G=ge==null?void 0:ge.kind;le(null),G==="os"?U():G==="engine"?ue():G==="swap"?be():G==="hermes"&&oe()}function _e(){var Re;const G=[n!=null&&n.engine?"Engine":null,n!=null&&n.swap?"Router":null,(Re=n==null?void 0:n.components)!=null&&Re.some(it=>it.update===!0)?"Hermes-Agent":null,n!=null&&n.os?`OS (${n.os} Pakete)`:null].filter(Boolean);re("Alle Updates einspielen?",`Nacheinander in einem Job: ${G.join(" → ")}. Jeder Schritt sichert und prüft sich selbst; schlägt einer fehl, stoppt der Rest. (OS braucht das Box-Passwort aus den Einstellungen — fehlt es, wird OS übersprungen.)`,async()=>{try{const it=await ye("/api/maintenance/update-all",{method:"POST"});if(se(it)||me(it))return;if((it==null?void 0:it.status)==="nothing"){te("Nichts zu tun","Es stehen keine Updates aus.");return}Q(),E("maintenance")}catch(it){te("Fehler",`„Alle aktualisieren" konnte nicht starten: ${it.message}`)}})}async function mt(){A(!0);try{await ye("/api/maintenance/check-updates",{method:"POST"}),Q(),E("maintenance")}catch(G){te("Fehler",`Fehler bei der Update-Suche: ${G.message}`)}finally{A(!1)}}async function tr(G,Re){try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:G,role:Re})}),te("Gestartet",`Modell-Upgrade für '${Re}' (${G}) gestartet.`),Q(),E("maintenance")}catch(it){te("Fehler",`Fehler beim Starten des Modell-Upgrades: ${it.message}`)}}async function K(){re("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await ye("/api/maintenance/reboot",{method:"POST"}),te("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(G){te("Fehler",`Fehler beim Reboot: ${G.message}`)}})}async function Ce(){B(!0),O("Snapshot wird erzeugt...");try{const G=await ye("/api/system/backup",{method:"POST"});O(G.ok?`Snapshot erzeugt: ${G.snapshot} (${G.files.length} Komponenten)`:"Backup fehlgeschlagen."),ae()}catch(G){O(`Fehler: ${G.message}`)}finally{B(!1)}}async function Pe(G){k(Re=>({...Re,[G]:!0}));try{const Re=await ye("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:G})});Re.ok?te("Dienst neu gestartet",`Dienst ${G} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&u===G&&ee(G)}):te("Fehler",`Fehler beim Neustart: ${Re.err||"Unbekannter Fehler"}`)}catch(Re){te("Fehler",`Fehler beim Neustart: ${Re.message}`)}finally{k(Re=>({...Re,[G]:!1}))}}async function Ze(G){try{await ye(`/api/jobs/${G}/cancel`,{method:"POST"}),Q()}catch(Re){te("Fehler",`Fehler beim Abbrechen: ${Re.message}`)}}const et=o.find(G=>(G.state==="running"||G.state==="queued")&&G.group==="maintenance"),dr=(n?(n.os>0?1:0)+(n.engine?1:0)+(n.swap?1:0):0)+(((Mi=n==null?void 0:n.components)==null?void 0:Mi.filter(G=>G.update===!0).length)??0);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:J("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),s.jsxs("div",{className:J("fixed inset-y-0 right-0 w-full sm:w-[640px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",e?"translate-x-0":"translate-x-full"),children:[s.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(yi,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),s.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[s.jsx("button",{onClick:()=>E("maintenance"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),s.jsx("button",{onClick:()=>E("logs"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),s.jsx("button",{onClick:()=>E("settings"),className:J("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),s.jsxs("div",{className:"flex items-center gap-3",children:[dr>0&&s.jsxs("button",{onClick:_e,disabled:!!et,className:"flex items-center gap-1 rounded-md border border-primary/40 bg-primary/10 px-2 py-1 text-[10px] font-bold text-primary transition-colors hover:bg-primary/20 disabled:opacity-50",children:[s.jsx(WM,{className:"h-3 w-3"})," Alle aktualisieren (",dr,")"]}),s.jsxs("button",{onClick:mt,disabled:C||!!et,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[s.jsx(ho,{className:J("h-3 w-3",C&&"animate-spin")})," Nach Updates suchen"]})]})]}),(n==null?void 0:n.last_check)&&s.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",D(n.last_check)]}),et&&s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-300",children:[s.jsx(ho,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),s.jsxs("span",{children:["Update läuft: ",s.jsx("span",{className:"font-semibold",children:et.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(oc,{icon:nl,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(n!=null&&n.os),status:n!=null&&n.os?`${n.os} verfügbar`:"aktuell",actionLabel:"Anzeigen",onAction:()=>Le("os")}),s.jsx(oc,{icon:ph,iconClass:"text-violet-400",name:"Inferenz-Engine (llama.cpp)",available:!!(n!=null&&n.engine),status:n!=null&&n.engine?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>Le("engine")}),s.jsx(oc,{icon:g5,iconClass:"text-fuchsia-400",name:"Router (llama-swap)",available:!!(n!=null&&n.swap),status:n!=null&&n.swap?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>Le("swap")}),(()=>{var Re;const G=(Re=n==null?void 0:n.components)==null?void 0:Re.find(it=>it.key==="hermes_agent");return s.jsx(oc,{icon:Hn,iconClass:"text-amber-400",name:"Hermes-Agent",available:(G==null?void 0:G.update)===!0,busy:ve,status:(G==null?void 0:G.update)===!0?`Update: ${G.latest}`:(G==null?void 0:G.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>Le("hermes")})})(),(vl=n==null?void 0:n.model_list)==null?void 0:vl.map(G=>s.jsx(oc,{icon:DM,iconClass:"text-emerald-400",name:`Modell · ${G.role}`,available:!0,status:G.title,actionLabel:"Upgrade",onAction:()=>tr(G.repo,G.role)},G.role))]})]}),s.jsxs("div",{className:"space-y-2.5",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),s.jsx("div",{className:"space-y-1.5",children:jk.map(G=>{var Re;return s.jsx(ZL,{label:G.label,system:G.type==="system",ok:(Re=z==null?void 0:z.services.find(it=>it.name.toLowerCase().includes(G.reach)))==null?void 0:Re.ok,busy:w[G.id],onRestart:()=>Pe(G.id),onLogs:()=>{f(G.id),E("logs")}},G.id)})})]}),s.jsxs("div",{className:"space-y-2.5",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),s.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs text-foreground truncate",children:q[0]?`Letztes: ${q[0].snapshot}`:"Noch kein Backup"}),s.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[q.length," Snapshots · Restore per CLI (restore.sh)"]})]}),s.jsxs("button",{onClick:Ce,disabled:T,className:"flex items-center gap-1.5 text-[11px] font-semibold rounded-lg px-2.5 py-1 bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shrink-0",children:[s.jsx($M,{className:J("h-3.5 w-3.5",T&&"animate-pulse")})," Snapshot"]})]}),_&&s.jsx("div",{className:"text-[10px] font-mono text-primary bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:_})]}),s.jsxs("div",{className:"space-y-2.5",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),s.jsxs("button",{onClick:K,className:"flex w-full items-center gap-3 p-3 rounded-lg border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[s.jsx(h5,{className:"h-4.5 w-4.5"}),s.jsxs("div",{children:[s.jsx("div",{children:"Host-System neu starten"}),s.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),s.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(G=>G.state==="running"||G.state==="queued").length," Aktiv"]})]}),s.jsx("div",{className:"space-y-3",children:o.length===0?s.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):o.map(G=>{const Re=G.state==="running"||G.state==="queued";return s.jsxs("div",{className:J("p-3 rounded-xl border transition-all duration-300",Re?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Re&&s.jsxs("span",{className:"flex h-2 w-2 relative",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),G.label]}),s.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[s.jsxs("span",{children:["ID: ",G.id]}),s.jsx("span",{children:"•"}),s.jsx("span",{className:J(G.state==="done"&&"text-emerald-400",G.state==="failed"&&"text-red-400",G.state==="running"&&"text-primary",G.state==="queued"&&"text-amber-400",G.state==="canceled"&&"text-muted-foreground"),children:G.state})]})]}),Re&&s.jsx("button",{onClick:()=>Ze(G.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),G.state==="running"&&s.jsxs("div",{className:"mt-3 space-y-1",children:[s.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${G.progress??0}%`}})}),s.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[s.jsxs("span",{children:[G.progress??0,"%"]}),G.done_bytes!=null&&G.total_bytes!=null&&s.jsxs("span",{children:[bg(G.done_bytes)," / ",bg(G.total_bytes),G.rate_bps!=null&&` (${bg(G.rate_bps)}/s)`]}),G.eta_s!=null&&s.jsxs("span",{children:["ETA: ",G.eta_s,"s"]})]})]})]},G.id)})})]})]}),N==="logs"&&s.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("select",{value:u,onChange:G=>f(G.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:jk.map(G=>s.jsxs("option",{value:G.id,children:[G.label," (",G.type==="system"?"systemd-root":"user",")"]},G.id))}),s.jsxs("button",{onClick:()=>Pe(u),disabled:w[u],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[s.jsx(ho,{className:J("h-3.5 w-3.5",w[u]&&"animate-spin")}),"Restart"]})]}),s.jsx(rR,{service:u,text:h,loading:p,logStatus:b,onRefresh:()=>ee(u),onOpenSettings:()=>E("settings")})]}),N==="settings"&&s.jsx(nR,{open:e,showAlert:te})]})]}),ge&&s.jsx(iR,{detail:ge,maintenanceJob:et,onClose:()=>le(null),onApply:Ue}),ie&&s.jsx(mE,{type:ie.type,title:ie.title,message:ie.message,onConfirm:ie.onConfirm,onCancel:ie.onCancel})]})}let Ov=[],_v=[];const Mv=new Set,bE=()=>Mv.forEach(e=>e());function wE(e){return Mv.add(e),()=>{Mv.delete(e)}}function aR(e){Ov=[...Ov,e].slice(-40),bE()}function oR(e){_v=[..._v,e].slice(-40),bE()}const sR=()=>x.useSyncExternalStore(wE,()=>Ov),lR=()=>x.useSyncExternalStore(wE,()=>_v);function cR(){const{data:e,dataUpdatedAt:t}=Co(3e3),{data:r,dataUpdatedAt:n}=dE(3e3),i=x.useRef(null);x.useEffect(()=>{var o,c,u,f;e&&aR({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((c=e.ram)==null?void 0:c.percent)??0,gpu:((u=e.gpu)==null?void 0:u.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),x.useEffect(()=>{if(!r)return;const o=Date.now(),c=r.prompt_tokens,u=r.completion_tokens;if(i.current){const f=Math.max((o-i.current.t)/1e3,.001);oR({t:o,prompt:Math.max(0,(c-i.current.p)/f),completion:Math.max(0,(u-i.current.c)/f)})}i.current={p:c,c:u,t:o}},[n])}function kE(){var A,_,O,T,B,z;const{data:e}=Kx(),{data:t}=uE(),{data:r}=Si(),{data:n}=Co(),i=!!e&&!!t,o=$=>{var q;return(q=t==null?void 0:t.services.find(W=>W.name.toLowerCase().includes($)))==null?void 0:q.ok},c=e==null?void 0:e.engine_reachable,u=(A=e==null?void 0:e.brain)==null?void 0:A.ready,f=((_=e==null?void 0:e.brain)==null?void 0:_.model)||((O=r==null?void 0:r.models.find($=>$.role==="hermes"))==null?void 0:O.name)||"",h=[];h.push((()=>{const $={id:"brain",label:"Lucys Hirn",icon:Sa,critical:!0};return i?c===!1?{...$,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:u===!1?{...$,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:f?{kind:"loadModel",model:f,label:"Hirn aufwecken"}:void 0}:{...$,status:"ok",detail:"Wach und ansprechbar."}:{...$,status:"loading",detail:"Wird geprüft …"}})()),h.push((()=>{const $={id:"vision",label:"Lucys Augen",icon:Cc,critical:!1};if(!i||!r)return{...$,status:"loading",detail:"Wird geprüft …"};const q=r.models.find(ve=>ve.role==="vision");return q?(r.running??[]).includes(q.name)?{...$,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...$,status:"ok",detail:"Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",repair:{kind:"loadModel",model:q.name,label:"Augen wecken"}}:{...$,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),h.push((()=>{const $={id:"memory",label:"Lucys Gedächtnis",icon:t5,critical:!0},q=o("mem0");return!i||q===void 0?{...$,status:"loading",detail:"Wird geprüft …"}:q?{...$,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...$,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gedächtnis antwortet nicht.",repair:{kind:"restart",service:"mem0-service",label:"Gedächtnis neu starten"}}})()),h.push((()=>{const $={id:"gateway",label:"Verbindung (Gateway)",icon:Pc,critical:!0},q=e?e.gateway_reachable:o("integriert");return!i||q===void 0?{...$,status:"loading",detail:"Wird geprüft …"}:q?{...$,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...$,status:"down",detail:"Die Verbindungs-Zentrale antwortet nicht — Apps erreichen Lucy nicht.",repair:{kind:"restart",service:"mission-control-2",label:"Zentrale neu starten"}}})()),h.push((()=>{const $={id:"agent",label:"Lucys Agent (Hermes)",icon:Hn,critical:!0},q=o("hermes-gateway");return!i||q===void 0?{...$,status:"loading",detail:"Wird geprüft …"}:q?{...$,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...$,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),h.push((()=>{const $={id:"voice",label:"Lucys Stimme",icon:dI,critical:!1},q=o("voice");return!i||q===void 0?{...$,status:"loading",detail:"Wird geprüft …"}:q?{...$,status:"ok",detail:"Lucy kann hören und sprechen."}:{...$,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const m=((T=n==null?void 0:n.gpu)==null?void 0:T.gtt_total)||((B=n==null?void 0:n.gpu)==null?void 0:B.vram_total)||0,p=((z=n==null?void 0:n.gpu)==null?void 0:z.gtt_used)||0,v=m>0?Math.min(100,p/m*100):0,b=1024**3,S=m?v>=90?{status:"full",usedGb:p/b,totalGb:m/b,pct:v,text:"Speicher fast voll — Lucy könnte langsamer werden."}:v>=72?{status:"warn",usedGb:p/b,totalGb:m/b,pct:v,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:p/b,totalGb:m/b,pct:v,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},w=h.some($=>$.status==="loading"),k=h.filter($=>$.critical&&$.status==="down"),N=h.filter($=>$.status==="warn"||!$.critical&&$.status==="down"),E=S.status==="full";return{verdict:w&&!k.length?"loading":k.length?"problem":N.length||E?"warn":"gut",checks:h,memory:S,problems:k,warns:N}}const uR={ok:"bg-emerald-500",warn:"bg-amber-500",down:"bg-red-500",loading:"bg-muted-foreground/40"};function dR({frame:e="lucy"}={}){const{verdict:t,checks:r,memory:n,problems:i}=kE(),{showAlert:o,dialogElement:c}=Nn(),u=Hr(),[f,h]=x.useState({});async function m(k,N){h(E=>({...E,[k]:!0}));try{if(N.kind==="loadModel")await ye(`/api/models/${encodeURIComponent(N.model)}/load`,{method:"POST"});else{const E=await ye("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:N.service})});E.ok||o("Reparatur nicht ganz geklappt",(E.err||"Unbekannter Fehler")+(N.needsSudo?` + +Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}u.invalidateQueries({queryKey:ze.health}),u.invalidateQueries({queryKey:ze.services}),u.invalidateQueries({queryKey:ze.models})}catch(E){o("Reparatur fehlgeschlagen",String((E==null?void 0:E.message)||E))}finally{h(E=>({...E,[k]:!1}))}}const p=e==="box"?{loading:"Box wird geprüft …",gut:"Alles okay",warn:"Kleinigkeit an der Box",problem:"Box braucht Hilfe"}:{loading:"Lucy wird geprüft …",gut:"Lucy geht's gut 💚",warn:"Kleinigkeit bei Lucy",problem:"Lucy braucht Hilfe"},v={loading:{ring:"border-border/60 bg-card/45",icon:Bt,iconCls:"text-muted-foreground animate-spin",title:p.loading,sub:"Einen Moment, ich schaue nach dem Rechten."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:Lx,iconCls:"text-emerald-400",title:p.gut,sub:"Alle wichtigen Fähigkeiten laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:vr,iconCls:"text-amber-400",title:p.warn,sub:"Nichts Schlimmes — nur ein Hinweis."},problem:{ring:"border-red-500/50 bg-red-500/5",icon:vr,iconCls:"text-red-400",title:p.problem,sub:`${i.length} wichtige${i.length===1?"s":""} Problem${i.length===1?"":"e"} gefunden.`}}[t],b=v.icon,S={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[n.status],w={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[n.status];return s.jsxs("div",{className:J("rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors",v.ring),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:s.jsx(b,{className:J("h-6 w-6",v.iconCls)})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:v.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:v.sub})]})]}),s.jsxs("div",{className:"mt-4 rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[s.jsx(ga,{className:"h-3.5 w-3.5"})," Speicher"]}),s.jsx("span",{className:J("font-mono font-bold",w),children:n.status==="unknown"?"—":`${n.usedGb.toFixed(0)} / ${n.totalGb.toFixed(0)} GB`})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:s.jsx("div",{className:J("h-full rounded-full transition-all duration-500",S),style:{width:`${n.pct}%`}})}),s.jsx("p",{className:J("mt-1.5 text-[11px]",w),children:n.text})]}),s.jsx("div",{className:"mt-4 space-y-1.5",children:r.map(k=>s.jsx(fR,{c:k,busy:!!f[k.id],onRepair:()=>k.repair&&m(k.id,k.repair)},k.id))}),c]})}function fR({c:e,busy:t,onRepair:r}){const n=e.icon,i=e.status==="down"||e.status==="warn";return s.jsxs("div",{className:J("flex items-center justify-between gap-3 rounded-xl border p-2.5 transition-colors",e.status==="down"?"border-red-500/25 bg-red-500/5":e.status==="warn"?"border-amber-500/20 bg-amber-500/5":"border-border/30 bg-background/15"),children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[s.jsxs("span",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-foreground/80",children:[s.jsx(n,{className:"h-4 w-4"}),s.jsx("span",{className:J("absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full ring-2 ring-black/40",uR[e.status],e.status==="down"&&"animate-pulse")})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold text-foreground",children:[e.label,e.status==="ok"&&s.jsx(Mt,{className:"h-3 w-3 text-emerald-400"}),!e.critical&&s.jsx("span",{className:"rounded bg-background/40 px-1 py-0.5 text-[8px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"optional"})]}),s.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:e.detail})]})]}),i&&e.repair&&s.jsxs("button",{onClick:r,disabled:t,className:J("flex h-8 shrink-0 items-center gap-1.5 rounded-lg border px-2.5 text-[10px] font-bold uppercase tracking-wide transition-all cursor-pointer disabled:opacity-60",e.status==="down"?"border-red-500/40 bg-red-500/10 text-red-300 hover:bg-red-500/20":"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20"),title:e.repair.label,children:[t?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(tu,{className:"h-3.5 w-3.5"}),e.repair.label]}),i&&!e.repair&&s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] font-semibold text-muted-foreground",title:"Keine Auto-Reparatur bekannt",children:[s.jsx(bI,{className:"h-3.5 w-3.5"})," manuell"]})]})}function hR(){const{data:e,error:t}=Co(3e3),r=sR();return{sys:e,hist:r,error:t}}var mR=["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"];function Qx(e){if(typeof e!="string")return!1;var t=mR;return t.includes(e)}var pR=["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"],gR=new Set(pR);function jE(e){return typeof e!="string"?!1:gR.has(e)}function SE(e){return typeof e=="string"&&e.startsWith("data-")}function kn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(jE(r)||SE(r))&&(t[r]=e[r]);return t}function kh(e){if(e==null)return null;if(x.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return kn(t)}return typeof e=="object"&&!Array.isArray(e)?kn(e):null}function nn(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(jE(r)||SE(r)||Qx(r))&&(t[r]=e[r]);return t}function vR(e){return e==null?null:x.isValidElement(e)?nn(e.props):typeof e=="object"&&!Array.isArray(e)?nn(e):null}var xR=["children","width","height","viewBox","className","style","title","desc"];function Iv(){return Iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,i=e.height,o=e.viewBox,c=e.className,u=e.style,f=e.title,h=e.desc,m=yR(e,xR),p=o||{width:n,height:i,x:0,y:0},v=nt("recharts-surface",c);return x.createElement("svg",Iv({},nn(m),{className:v,width:n,height:i,style:u,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:t}),x.createElement("title",null,f),x.createElement("desc",null,h),r)}),wR=["children","className"];function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,i=kR(e,wR),o=nt("recharts-layer",n);return x.createElement("g",Tv({className:o},nn(i),{ref:t}),r)}),SR=x.createContext(null);function bt(e){return function(){return e}}const Dv=Math.PI,Lv=2*Dv,Va=1e-6,NR=Lv-Va;function EE(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return EE;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;iVa)if(!(Math.abs(p*f-h*m)>Va)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-c,S=i-u,w=f*f+h*h,k=b*b+S*S,N=Math.sqrt(w),E=Math.sqrt(v),C=o*Math.tan((Dv-Math.acos((w+v-k)/(2*N*E)))/2),A=C/E,_=C/N;Math.abs(A-1)>Va&&this._append`L${t+A*m},${r+A*p}`,this._append`A${o},${o},0,0,${+(p*b>m*S)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,i,o,c){if(t=+t,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),f=n*Math.sin(i),h=t+u,m=r+f,p=1^c,v=c?i-o:o-i;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>Va||Math.abs(this._y1-m)>Va)&&this._append`L${h},${m}`,n&&(v<0&&(v=v%Lv+Lv),v>NR?this._append`A${n},${n},0,1,${p},${t-u},${r-f}A${n},${n},0,1,${p},${this._x1=h},${this._y1=m}`:v>Va&&this._append`A${n},${n},0,${+(v>=Dv)},${p},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function AE(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new AR(t)}function Yx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function CE(e){this._context=e}CE.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 jh(e){return new CE(e)}function PE(e){return e[0]}function OE(e){return e[1]}function _E(e,t){var r=bt(!0),n=null,i=jh,o=null,c=AE(u);e=typeof e=="function"?e:e===void 0?PE:bt(e),t=typeof t=="function"?t:t===void 0?OE:bt(t);function u(f){var h,m=(f=Yx(f)).length,p,v=!1,b;for(n==null&&(o=i(b=c())),h=0;h<=m;++h)!(h=b;--S)u.point(C[S],A[S]);u.lineEnd(),u.areaEnd()}N&&(C[v]=+e(k,v,p),A[v]=+t(k,v,p),u.point(n?+n(k,v,p):C[v],r?+r(k,v,p):A[v]))}if(E)return u=null,E+""||null}function m(){return _E().defined(i).curve(c).context(o)}return h.x=function(p){return arguments.length?(e=typeof p=="function"?p:bt(+p),n=null,h):e},h.x0=function(p){return arguments.length?(e=typeof p=="function"?p:bt(+p),h):e},h.x1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:bt(+p),h):n},h.y=function(p){return arguments.length?(t=typeof p=="function"?p:bt(+p),r=null,h):t},h.y0=function(p){return arguments.length?(t=typeof p=="function"?p:bt(+p),h):t},h.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:bt(+p),h):r},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(r)},h.lineX1=function(){return m().x(n).y(t)},h.defined=function(p){return arguments.length?(i=typeof p=="function"?p:bt(!!p),h):i},h.curve=function(p){return arguments.length?(c=p,o!=null&&(u=c(o)),h):c},h.context=function(p){return arguments.length?(p==null?o=u=null:u=c(o=p),h):o},h}class ME{constructor(t,r){this._context=t,this._x=r}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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function CR(e){return new ME(e,!0)}function PR(e){return new ME(e,!1)}function vf(){}function xf(e,t,r){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+r)/6)}function IE(e){this._context=e}IE.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:xf(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:xf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function OR(e){return new IE(e)}function TE(e){this._context=e}TE.prototype={areaStart:vf,areaEnd:vf,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:xf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _R(e){return new TE(e)}function DE(e){this._context=e}DE.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:xf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MR(e){return new DE(e)}function LE(e){this._context=e}LE.prototype={areaStart:vf,areaEnd:vf,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 IR(e){return new LE(e)}function Sk(e){return e<0?-1:1}function Nk(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),c=(r-e._y1)/(i||n<0&&-0),u=(o*i+c*n)/(n+i);return(Sk(o)+Sk(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(u))||0}function Ek(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function wg(e,t,r){var n=e._x0,i=e._y0,o=e._x1,c=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,i+u*t,o-u,c-u*r,o,c)}function yf(e){this._context=e}yf.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:wg(this,this._t0,Ek(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 r=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,wg(this,Ek(this,r=Nk(this,e,t)),r);break;default:wg(this,this._t0,r=Nk(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function RE(e){this._context=new $E(e)}(RE.prototype=Object.create(yf.prototype)).point=function(e,t){yf.prototype.point.call(this,t,e)};function $E(e){this._context=e}$E.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,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function TR(e){return new yf(e)}function DR(e){return new RE(e)}function zE(e){this._context=e}zE.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Ak(e),i=Ak(t),o=0,c=1;c=0;--t)i[t]=(c[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function RR(e){return new Sh(e,.5)}function $R(e){return new Sh(e,0)}function zR(e){return new Sh(e,1)}function yo(e,t){if((c=e.length)>1)for(var r=1,n,i,o=e[t[0]],c,u=o.length;r=0;)r[t]=t;return r}function FR(e,t){return e[t]}function BR(e){const t=[];return t.key=e,t}function UR(){var e=bt([]),t=Rv,r=yo,n=FR;function i(o){var c=Array.from(e.apply(this,arguments),BR),u,f=c.length,h=-1,m;for(const p of o)for(u=0,++h;u0){for(var r,n,i=0,o=e[0].length,c;i0){for(var r=0,n=e[t[0]],i,o=n.length;r0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,c;n1&&arguments[1]!==void 0?arguments[1]:VR,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function qt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var u=r[c-1];return typeof u=="string"?i+u+o:u!==void 0?i+ma(u)+o:i+o},"")}var en=e=>e===0?0:e>0?1:-1,Gn=e=>typeof e=="number"&&e!=+e,bo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ae=e=>(typeof e=="number"||e instanceof Number)&&!Gn(e),Vn=e=>Ae(e)||typeof e=="string",qR=0,Mc=e=>{var t=++qR;return"".concat(e||"").concat(t)},ja=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ae(t)&&typeof t!="string")return n;var o;if(bo(t)){if(r==null)return n;var c=t.indexOf("%");o=r*parseFloat(t.slice(0,c))/100}else o=+t;return Gn(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},UE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):Po(n,t))===r)}var Xt=e=>e===null||typeof e>"u",Jx=e=>Xt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Cr(e){return e!=null}function al(){}var HE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,e0=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(x.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Qx(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},QR=(e,t,r)=>n=>(e(t,r,n),null),YR=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];Qx(i)&&typeof o=="function"&&(n||(n={}),n[i]=QR(o,t,r))}),n};function Ck(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ZR(e){for(var t=1;t(c[u]===void 0&&n[u]!==void 0&&(c[u]=n[u]),c),r);return o}function t6(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function t0(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const o6="[object RegExp]",GE="[object String]",VE="[object Number]",qE="[object Boolean]",QE="[object Arguments]",s6="[object Symbol]",l6="[object Date]",c6="[object Map]",u6="[object Set]",d6="[object Array]",f6="[object ArrayBuffer]",h6="[object Object]",m6="[object DataView]",p6="[object Uint8Array]",g6="[object Uint8ClampedArray]",v6="[object Uint16Array]",x6="[object Uint32Array]",y6="[object Int8Array]",b6="[object Int16Array]",w6="[object Int32Array]",k6="[object Float32Array]",j6="[object Float64Array]",Pk=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function S6(e){return typeof Pk.Buffer<"u"&&Pk.Buffer.isBuffer(e)}function N6(e,t){return Za(e,void 0,e,new Map,t)}function Za(e,t,r,n=new Map,i=void 0){const o=i==null?void 0:i(e,t,r,n);if(o!==void 0)return o;if(zv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const c=new Array(e.length);n.set(e,c);for(let u=0;u{}):Fv(e,t,function n(i,o,c,u,f,h){const m=r(i,o,c,u,f,h);return m!==void 0?!!m:Fv(i,o,n,h,!1)},new Map,!0)}function Fv(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return C6(e,t,r,n);case"function":return Object.keys(t).length>0?Fv(e,{...t},r,n,i):nf(e,t);default:return YE(e)&&i?typeof t=="string"?t==="":!0:nf(e,t)}}function C6(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return XE(e,t,r,n);if(t instanceof Map)return P6(e,t,r,n);if(t instanceof Set)return O6(e,t,r,n);const i=Object.keys(t);if(e==null||zv(e))return i.length===0;if(i.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o{})}function _6(e){return e=A6(e),t=>JE(t,e)}function M6(e,t){return N6(e,(r,n,i,o)=>{if(typeof e=="object"){if(t0(e)==="[object Object]"&&typeof e.constructor!="function"){const c={};return o.set(e,c),vn(c,e,i,o),c}switch(Object.prototype.toString.call(e)){case VE:case GE:case qE:{const c=new e.constructor(e==null?void 0:e.valueOf());return vn(c,e),c}case QE:{const c={};return vn(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function I6(e){return M6(e)}const T6=/^(?:0|[1-9]\d*)$/;function eA(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function tA(e){return e!=null&&typeof e!="function"&&z6(e.length)}function F6(e){return typeof e=="object"&&e!==null}function B6(e){return F6(e)&&tA(e)}function Ok(e,t=KE){return B6(e)?t6(Array.from(e),r6($6(t),1)):[]}function U6(e,t,r){return t===!0?Ok(e,r):typeof t=="function"?Ok(e,t):e}var kg={exports:{}},jg={},Sg={exports:{}},Ng={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _k;function W6(){if(_k)return Ng;_k=1;var e=el();function t(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function u(p,v){var b=v(),S=n({inst:{value:b,getSnapshot:v}}),w=S[0].inst,k=S[1];return o(function(){w.value=b,w.getSnapshot=v,f(w)&&k({inst:w})},[p,b,v]),i(function(){return f(w)&&k({inst:w}),p(function(){f(w)&&k({inst:w})})},[p]),c(b),b}function f(p){var v=p.getSnapshot;p=p.value;try{var b=v();return!r(p,b)}catch{return!0}}function h(p,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return Ng.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Ng}var Mk;function H6(){return Mk||(Mk=1,Sg.exports=W6()),Sg.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ik;function K6(){if(Ik)return jg;Ik=1;var e=el(),t=H6();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,c=e.useEffect,u=e.useMemo,f=e.useDebugValue;return jg.useSyncExternalStoreWithSelector=function(h,m,p,v,b){var S=o(null);if(S.current===null){var w={hasValue:!1,value:null};S.current=w}else w=S.current;S=u(function(){function N(O){if(!E){if(E=!0,C=O,O=v(O),b!==void 0&&w.hasValue){var T=w.value;if(b(T,O))return A=T}return A=O}if(T=A,n(C,O))return T;var B=v(O);return b!==void 0&&b(T,B)?(C=O,T):(C=O,A=B)}var E=!1,C,A,_=p===void 0?null:p;return[function(){return N(m())},_===null?void 0:function(){return N(_())}]},[m,p,v,b]);var k=i(h,S[0],S[1]);return c(function(){w.hasValue=!0,w.value=k},[k]),f(k),k},jg}var Tk;function G6(){return Tk||(Tk=1,kg.exports=K6()),kg.exports}var V6=G6(),r0=x.createContext(null),q6=e=>e,At=()=>{var e=x.useContext(r0);return e?e.store.dispatch:q6},af=()=>{},Q6=()=>af,Y6=(e,t)=>e===t;function Me(e){var t=x.useContext(r0),r=x.useMemo(()=>t?n=>{if(n!=null)return e(n)}:af,[t,e]);return V6.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Q6,t?t.store.getState:af,t?t.store.getState:af,r,Y6)}function Z6(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function X6(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Dk=e=>Array.isArray(e)?e:[e];function J6(e){const t=Array.isArray(e[0])?e[0]:e;return X6(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function e$(e,t){const r=[],{length:n}=e;for(let i=0;itypeof WeakRef>"u"?t$:WeakRef,rA=r$(),n$=0,Lk=1;function zd(){return{s:n$,v:void 0,o:null,p:null}}function i$(e){return e instanceof rA?e.deref():e}function nA(e,t={}){let r=zd();const{resultEqualityCheck:n}=t;let i,o=0;function c(){let u=r;const{length:f}=arguments;for(let p=0,v=f;p{r=zd(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}function a$(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,c=0,u,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),Z6(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...f},{memoize:p,memoizeOptions:v=[],argsMemoize:b=nA,argsMemoizeOptions:S=[]}=m,w=Dk(v),k=Dk(S),N=J6(i),E=p(function(){return o++,h.apply(null,arguments)},...w),C=b(function(){c++;const _=e$(N,arguments);return u=E.apply(null,_),u},...k);return Object.assign(C,{resultFunc:h,memoizedResultFunc:E,dependencies:N,dependencyRecomputations:()=>c,resetDependencyRecomputations:()=>{c=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var Y=a$(nA);function o$(e,t=1){const r=[],n=Math.floor(t),i=(o,c)=>{for(let u=0;u{if(e!==t){const n=Rk(e),i=Rk(t);if(n===i&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function iA(e){return typeof e=="symbol"||e instanceof Symbol}const l$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c$=/^\w*$/;function u$(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||iA(e)?!0:typeof e=="string"&&(c$.test(e)||!l$.test(e))||t!=null}function d$(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(u=>String(u));const i=(u,f)=>{let h=u;for(let m=0;mf==null||u==null?f:typeof u=="object"&&"key"in u?Object.hasOwn(f,u.key)?f[u.key]:i(f,u.path):typeof u=="function"?u(f):Array.isArray(u)?i(f,u):typeof f=="object"?f[u]:f,c=t.map(u=>(Array.isArray(u)&&u.length===1&&(u=u[0]),u==null||typeof u=="function"||Array.isArray(u)||u$(u)?u:{key:u,path:Xx(u)}));return e.map(u=>({original:u,criteria:c.map(f=>o(f,u))})).slice().sort((u,f)=>{for(let h=0;hu.original)}function Nh(e,...t){const r=t.length;return r>1&&Bv(e,t[0],t[1])?t=[]:r>2&&Bv(t[0],t[1],t[2])&&(t=[t[0]]),d$(e,o$(t),["asc"])}var aA=e=>e.legend.settings,f$=e=>e.legend.size,h$=e=>e.legend.payload;Y([h$,aA],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?Nh(n,r):n});function m$(e,t){return x$(e)||v$(e,t)||g$(e,t)||p$()}function p$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g$(e,t){if(e){if(typeof e=="string")return $k(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$k(e,t):void 0}}function $k(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rFd||Math.abs(e.left-t.left)>Fd||Math.abs(e.top-t.top)>Fd||Math.abs(e.width-t.width)>Fd}function Fk(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function y$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=x.useState({height:0,left:0,top:0,width:0}),r=m$(t,2),n=r[0],i=r[1],o=x.useRef(null),c=x.useRef(n);c.current=n;var u=x.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=Fk(f);if(zk(h,c.current)&&i(h),typeof ResizeObserver<"u"){var m=new ResizeObserver(()=>{var p=Fk(f);zk(p,c.current)&&i(p)});m.observe(f),o.current=m}}},[...e]);return x.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,u]}function Vt(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 b$=typeof Symbol=="function"&&Symbol.observable||"@@observable",Bk=b$,Eg=()=>Math.random().toString(36).substring(7).split("").join("."),w$={INIT:`@@redux/INIT${Eg()}`,REPLACE:`@@redux/REPLACE${Eg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Eg()}`},bf=w$;function n0(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function oA(e,t,r){if(typeof e!="function")throw new Error(Vt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Vt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Vt(1));return r(oA)(e,t)}let n=e,i=t,o=new Map,c=o,u=0,f=!1;function h(){c===o&&(c=new Map,o.forEach((k,N)=>{c.set(N,k)}))}function m(){if(f)throw new Error(Vt(3));return i}function p(k){if(typeof k!="function")throw new Error(Vt(4));if(f)throw new Error(Vt(5));let N=!0;h();const E=u++;return c.set(E,k),function(){if(N){if(f)throw new Error(Vt(6));N=!1,h(),c.delete(E),o=null}}}function v(k){if(!n0(k))throw new Error(Vt(7));if(typeof k.type>"u")throw new Error(Vt(8));if(typeof k.type!="string")throw new Error(Vt(17));if(f)throw new Error(Vt(9));try{f=!0,i=n(i,k)}finally{f=!1}return(o=c).forEach(E=>{E()}),k}function b(k){if(typeof k!="function")throw new Error(Vt(10));n=k,v({type:bf.REPLACE})}function S(){const k=p;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Vt(11));function E(){const A=N;A.next&&A.next(m())}return E(),{unsubscribe:k(E)}},[Bk](){return this}}}return v({type:bf.INIT}),{dispatch:v,subscribe:p,getState:m,replaceReducer:b,[Bk]:S}}function k$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:bf.INIT})>"u")throw new Error(Vt(12));if(typeof r(void 0,{type:bf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Vt(13))})}function sA(e){const t=Object.keys(e),r={};for(let o=0;o"u")throw u&&u.type,new Error(Vt(14));h[p]=S,f=f||S!==b}return f=f||n.length!==Object.keys(c).length,f?h:c}}function wf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function j$(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(Vt(15))};const c={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},u=e.map(f=>f(c));return o=wf(...u)(i.dispatch),{...i,dispatch:o}}}function lA(e){return n0(e)&&"type"in e&&typeof e.type=="string"}var cA=Symbol.for("immer-nothing"),Uk=Symbol.for("immer-draftable"),xr=Symbol.for("immer-state");function yn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zr=Object,Ks=zr.getPrototypeOf,kf="constructor",Eh="prototype",Uv="configurable",jf="enumerable",of="writable",Ic="value",bi=e=>!!e&&!!e[xr];function jn(e){var t;return e?uA(e)||Ch(e)||!!e[Uk]||!!((t=e[kf])!=null&&t[Uk])||Ph(e)||Oh(e):!1}var S$=zr[Eh][kf].toString(),Wk=new WeakMap;function uA(e){if(!e||!i0(e))return!1;const t=Ks(e);if(t===null||t===zr[Eh])return!0;const r=zr.hasOwnProperty.call(t,kf)&&t[kf];if(r===Object)return!0;if(!ys(r))return!1;let n=Wk.get(r);return n===void 0&&(n=Function.toString.call(r),Wk.set(r,n)),n===S$}function Ah(e,t,r=!0){nu(e)===0?(r?Reflect.ownKeys(e):zr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function nu(e){const t=e[xr];return t?t.type_:Ch(e)?1:Ph(e)?2:Oh(e)?3:0}var Hk=(e,t,r=nu(e))=>r===2?e.has(t):zr[Eh].hasOwnProperty.call(e,t),Wv=(e,t,r=nu(e))=>r===2?e.get(t):e[t],Sf=(e,t,r,n=nu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function N$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ch=Array.isArray,Ph=e=>e instanceof Map,Oh=e=>e instanceof Set,i0=e=>typeof e=="object",ys=e=>typeof e=="function",Ag=e=>typeof e=="boolean";function E$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ci=e=>e.copy_||e.base_,a0=e=>e.modified_?e.copy_:e.base_;function Hv(e,t){if(Ph(e))return new Map(e);if(Oh(e))return new Set(e);if(Ch(e))return Array[Eh].slice.call(e);const r=uA(e);if(t===!0||t==="class_only"&&!r){const n=zr.getOwnPropertyDescriptors(e);delete n[xr];let i=Reflect.ownKeys(n);for(let o=0;o1&&zr.defineProperties(e,{set:Bd,add:Bd,clear:Bd,delete:Bd}),zr.freeze(e),t&&Ah(e,(r,n)=>{o0(n,!0)},!1)),e}function A$(){yn(2)}var Bd={[Ic]:A$};function _h(e){return e===null||!i0(e)?!0:zr.isFrozen(e)}var Nf="MapSet",Kv="Patches",Kk="ArrayMethods",dA={};function wo(e){const t=dA[e];return t||yn(0,e),t}var Gk=e=>!!dA[e],Tc,fA=()=>Tc,C$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Gk(Nf)?wo(Nf):void 0,arrayMethodsPlugin_:Gk(Kk)?wo(Kk):void 0});function Vk(e,t){t&&(e.patchPlugin_=wo(Kv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gv(e){Vv(e),e.drafts_.forEach(P$),e.drafts_=null}function Vv(e){e===Tc&&(Tc=e.parent_)}var qk=e=>Tc=C$(Tc,e);function P$(e){const t=e[xr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Qk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[xr].modified_&&(Gv(t),yn(4)),jn(e)&&(e=Yk(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[xr].base_,e,t)}else e=Yk(t,r);return O$(t,e,!0),Gv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==cA?e:void 0}function Yk(e,t){if(_h(t))return t;const r=t[xr];if(!r)return Ef(t,e.handledSet_,e);if(!Mh(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);pA(r,e)}return r.copy_}function O$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&o0(t,r)}function hA(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Mh=(e,t)=>e.scope_===t,_$=[];function mA(e,t,r,n){const i=ci(e),o=e.type_;if(n!==void 0&&Wv(i,n,o)===t){Sf(i,n,r,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Ah(i,(f,h)=>{if(bi(h)){const m=u.get(h)||[];m.push(f),u.set(h,m)}})}const c=e.draftLocations_.get(t)??_$;for(const u of c)Sf(i,u,r,o)}function M$(e,t,r){e.callbacks_.push(function(i){var u;const o=t;if(!o||!Mh(o,i))return;(u=i.mapSetPlugin_)==null||u.fixSetContents(o);const c=a0(o);mA(e,o.draft_??o,c,r),pA(o,i)})}function pA(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}hA(e)}}function I$(e,t,r){const{scope_:n}=e;if(bi(r)){const i=r[xr];Mh(i,n)&&i.callbacks_.push(function(){sf(e);const c=a0(i);mA(e,r,c,t)})}else jn(r)&&e.callbacks_.push(function(){const o=ci(e);e.type_===3?o.has(r)&&Ef(r,n.handledSet_,n):Wv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ef(Wv(e.copy_,t,e.type_),n.handledSet_,n)})}function Ef(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||bi(e)||t.has(e)||!jn(e)||_h(e)||(t.add(e),Ah(e,(n,i)=>{if(bi(i)){const o=i[xr];if(Mh(o,r)){const c=a0(o);Sf(e,n,c,e.type_),hA(o)}}else jn(i)&&Ef(i,t,r)})),e}function T$(e,t){const r=Ch(e),n={type_:r?1:0,scope_:t?t.scope_:fA(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,o=Af;r&&(i=[n],o=Dc);const{revoke:c,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=c,[u,n]}var Af={get(e,t){if(t===xr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=ci(e);if(!Hk(i,t,e.type_))return D$(e,i,t);const o=i[t];if(e.finalized_||!jn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&E$(t))return o;if(o===Cg(e.base_,t)){sf(e);const c=e.type_===1?+t:t,u=Qv(e.scope_,o,e,c);return e.copy_[c]=u}return o},has(e,t){return t in ci(e)},ownKeys(e){return Reflect.ownKeys(ci(e))},set(e,t,r){const n=gA(ci(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Cg(ci(e),t),o=i==null?void 0:i[xr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(N$(r,i)&&(r!==void 0||Hk(e.base_,t,e.type_)))return!0;sf(e),qv(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),I$(e,t,r)),!0},deleteProperty(e,t){return sf(e),Cg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),qv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ci(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[of]:!0,[Uv]:e.type_!==1||t!=="length",[jf]:n[jf],[Ic]:r[t]}},defineProperty(){yn(11)},getPrototypeOf(e){return Ks(e.base_)},setPrototypeOf(){yn(12)}},Dc={};for(let e in Af){let t=Af[e];Dc[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Dc.deleteProperty=function(e,t){return Dc.set.call(this,e,t,void 0)};Dc.set=function(e,t,r){return Af.set.call(this,e[0],t,r,e[0])};function Cg(e,t){const r=e[xr];return(r?ci(r):e)[t]}function D$(e,t,r){var i;const n=gA(t,r);return n?Ic in n?n[Ic]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function gA(e,t){if(!(t in e))return;let r=Ks(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ks(r)}}function qv(e){e.modified_||(e.modified_=!0,e.parent_&&qv(e.parent_))}function sf(e){e.copy_||(e.assigned_=new Map,e.copy_=Hv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var L$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(ys(r)&&!ys(n)){const c=n;n=r;const u=this;return function(h=c,...m){return u.produce(h,p=>n.call(this,p,...m))}}ys(n)||yn(6),i!==void 0&&!ys(i)&&yn(7);let o;if(jn(r)){const c=qk(this),u=Qv(c,r,void 0);let f=!0;try{o=n(u),f=!1}finally{f?Gv(c):Vv(c)}return Vk(c,i),Qk(o,c)}else if(!r||!i0(r)){if(o=n(r),o===void 0&&(o=r),o===cA&&(o=void 0),this.autoFreeze_&&o0(o,!0),i){const c=[],u=[];wo(Kv).generateReplacementPatches_(r,o,{patches_:c,inversePatches_:u}),i(c,u)}return o}else yn(1,r)},this.produceWithPatches=(r,n)=>{if(ys(r))return(u,...f)=>this.produceWithPatches(u,h=>r(h,...f));let i,o;return[this.produce(r,n,(u,f)=>{i=u,o=f}),i,o]},Ag(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Ag(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Ag(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){jn(t)||yn(8),bi(t)&&(t=tn(t));const r=qk(this),n=Qv(r,t,void 0);return n[xr].isManual_=!0,Vv(r),n}finishDraft(t,r){const n=t&&t[xr];(!n||!n.isManual_)&&yn(9);const{scope_:i}=n;return Vk(i,r),Qk(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const i=wo(Kv).applyPatches_;return bi(t)?i(t,r):this.produce(t,o=>i(o,r))}};function Qv(e,t,r,n){const[i,o]=Ph(t)?wo(Nf).proxyMap_(t,r):Oh(t)?wo(Nf).proxySet_(t,r):T$(t,r);return((r==null?void 0:r.scope_)??fA()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?M$(r,o,n):o.callbacks_.push(function(f){var m;(m=f.mapSetPlugin_)==null||m.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function tn(e){return bi(e)||yn(10,e),vA(e)}function vA(e){if(!jn(e)||_h(e))return e;const t=e[xr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Hv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Hv(e,!0);return Ah(r,(i,o)=>{Sf(r,i,vA(o))},n),t&&(t.finalized_=!1),r}var R$=new L$,xA=R$.produce;function yA(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var $$=yA(),z$=yA,F$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wf:wf.apply(null,arguments)};function Ur(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Fr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>lA(n)&&n.type===e,r}var bA=class xc extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,xc.prototype)}static get[Symbol.species](){return xc}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new xc(...t[0].concat(this)):new xc(...t.concat(this))}};function Zk(e){return jn(e)?xA(e,()=>{}):e}function Ud(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function B$(e){return typeof e=="boolean"}var U$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let c=new bA;return r&&(B$(r)?c.push($$):c.push(z$(r.extraArgument))),c},wA="RTK_autoBatch",lt=()=>e=>({payload:e,meta:{[wA]:!0}}),Xk=e=>t=>{setTimeout(t,e)},W$=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(c),r())},o=e(i),c=setTimeout(i,t)},kA=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,c=!1;const u=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?W$(window.requestAnimationFrame,100):Xk(10):e.type==="callback"?e.queueNotification:Xk(e.timeout),h=()=>{c=!1,o&&(o=!1,u.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){const p=()=>i&&m(),v=n.subscribe(p);return u.add(m),()=>{v(),u.delete(m)}},dispatch(m){var p;try{return i=!((p=m==null?void 0:m.meta)!=null&&p[wA]),o=!i,o&&(c||(c=!0,f(h))),n.dispatch(m)}finally{i=!0}}})},H$=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new bA(e);return n&&i.push(kA(typeof n=="object"?n:void 0)),i};function K$(e){const t=U$(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:c=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(n0(r))u=sA(r);else throw new Error(Fr(1));let f;typeof n=="function"?f=n(t):f=t();let h=wf;i&&(h=F$({trace:!1,...typeof i=="object"&&i}));const m=j$(...f),p=H$(m);let v=typeof c=="function"?c(p):p();const b=h(...v);return oA(u,o,b)}function jA(e){const t={},r=[];let n;const i={addCase(o,c){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Fr(28));if(u in t)throw new Error(Fr(29));return t[u]=c,i},addAsyncThunk(o,c){return c.pending&&(t[o.pending.type]=c.pending),c.rejected&&(t[o.rejected.type]=c.rejected),c.fulfilled&&(t[o.fulfilled.type]=c.fulfilled),c.settled&&r.push({matcher:o.settled,reducer:c.settled}),i},addMatcher(o,c){return r.push({matcher:o,reducer:c}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function G$(e){return typeof e=="function"}function V$(e,t){let[r,n,i]=jA(t),o;if(G$(e))o=()=>Zk(e());else{const u=Zk(e);o=()=>u}function c(u=o(),f){let h=[r[f.type],...n.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,p)=>{if(p)if(bi(m)){const b=p(m,f);return b===void 0?m:b}else{if(jn(m))return xA(m,v=>p(v,f));{const v=p(m,f);if(v===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return m},u)}return c.getInitialState=o,c}var q$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Q$=(e=21)=>{let t="",r=e;for(;r--;)t+=q$[Math.random()*64|0];return t},Y$=Symbol.for("rtk-slice-createasyncthunk");function Z$(e,t){return`${e}/${t}`}function X$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Y$];return function(i){const{name:o,reducerPath:c=o}=i;if(!o)throw new Error(Fr(11));const u=(typeof i.reducers=="function"?i.reducers(ez()):i.reducers)||{},f=Object.keys(u),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(A,_){const O=typeof A=="string"?A:A.type;if(!O)throw new Error(Fr(12));if(O in h.sliceCaseReducersByType)throw new Error(Fr(13));return h.sliceCaseReducersByType[O]=_,m},addMatcher(A,_){return h.sliceMatchers.push({matcher:A,reducer:_}),m},exposeAction(A,_){return h.actionCreators[A]=_,m},exposeCaseReducer(A,_){return h.sliceCaseReducersByName[A]=_,m}};f.forEach(A=>{const _=u[A],O={reducerName:A,type:Z$(o,A),createNotation:typeof i.reducers=="function"};rz(_)?iz(O,_,m,t):tz(O,_,m)});function p(){const[A={},_=[],O=void 0]=typeof i.extraReducers=="function"?jA(i.extraReducers):[i.extraReducers],T={...A,...h.sliceCaseReducersByType};return V$(i.initialState,B=>{for(let z in T)B.addCase(z,T[z]);for(let z of h.sliceMatchers)B.addMatcher(z.matcher,z.reducer);for(let z of _)B.addMatcher(z.matcher,z.reducer);O&&B.addDefaultCase(O)})}const v=A=>A,b=new Map,S=new WeakMap;let w;function k(A,_){return w||(w=p()),w(A,_)}function N(){return w||(w=p()),w.getInitialState()}function E(A,_=!1){function O(B){let z=B[A];return typeof z>"u"&&_&&(z=Ud(S,O,N)),z}function T(B=v){const z=Ud(b,_,()=>new WeakMap);return Ud(z,B,()=>{const $={};for(const[q,W]of Object.entries(i.selectors??{}))$[q]=J$(W,B,()=>Ud(S,B,N),_);return $})}return{reducerPath:A,getSelectors:T,get selectors(){return T(O)},selectSlice:O}}const C={name:o,reducer:k,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...E(c),injectInto(A,{reducerPath:_,...O}={}){const T=_??c;return A.inject({reducerPath:T,reducer:k},O),{...C,...E(T,!0)}}};return C}}function J$(e,t,r,n){function i(o,...c){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...c)}return i.unwrapped=e,i}var ur=X$();function ez(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function tz({type:e,reducerName:t,createNotation:r},n,i){let o,c;if("reducer"in n){if(r&&!nz(n))throw new Error(Fr(17));o=n.reducer,c=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,c?Ur(e,c):Ur(e))}function rz(e){return e._reducerDefinitionType==="asyncThunk"}function nz(e){return e._reducerDefinitionType==="reducerWithPrepare"}function iz({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Fr(18));const{payloadCreator:o,fulfilled:c,pending:u,rejected:f,settled:h,options:m}=r,p=i(e,o,m);n.exposeAction(t,p),c&&n.addCase(p.fulfilled,c),u&&n.addCase(p.pending,u),f&&n.addCase(p.rejected,f),h&&n.addMatcher(p.settled,h),n.exposeCaseReducer(t,{fulfilled:c||Wd,pending:u||Wd,rejected:f||Wd,settled:h||Wd})}function Wd(){}var az="task",SA="listener",NA="completed",s0="cancelled",oz=`task-${s0}`,sz=`task-${NA}`,Yv=`${SA}-${s0}`,lz=`${SA}-${NA}`,Ih=class{constructor(e){ns(this,"code");ns(this,"name","TaskAbortError");ns(this,"message");this.code=e,this.message=`${az} ${s0} (reason: ${e})`}},l0=(e,t)=>{if(typeof e!="function")throw new TypeError(Fr(32))},Cf=()=>{},EA=(e,t=Cf)=>(e.catch(t),e),AA=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),po=e=>{if(e.aborted)throw new Ih(e.reason)};function CA(e,t){let r=Cf;return new Promise((n,i)=>{const o=()=>i(new Ih(e.reason));if(e.aborted){o();return}r=AA(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Cf})}var cz=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Ih?"cancelled":"rejected",error:r}}finally{t==null||t()}},Pf=e=>t=>EA(CA(e,t).then(r=>(po(e),r))),PA=e=>{const t=Pf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Ss}=Object,Jk={},Th="listenerMiddleware",uz=(e,t)=>{const r=n=>AA(e,()=>n.abort(e.reason));return(n,i)=>{l0(n);const o=new AbortController;r(o);const c=cz(async()=>{po(e),po(o.signal);const u=await n({pause:Pf(o.signal),delay:PA(o.signal),signal:o.signal});return po(o.signal),u},()=>o.abort(sz));return i!=null&&i.autoJoin&&t.push(c.catch(Cf)),{result:Pf(e)(c),cancel(){o.abort(oz)}}}},dz=(e,t)=>{const r=async(n,i)=>{po(t);let o=()=>{};const u=[new Promise((f,h)=>{let m=e({predicate:n,effect:(p,v)=>{v.unsubscribe(),f([p,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&u.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await CA(t,Promise.race(u));return po(t),f}finally{o()}};return((n,i)=>EA(r(n,i)))},OA=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=Ur(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Fr(21));return l0(o),{predicate:i,type:t,effect:o}},_A=Ss(e=>{const{type:t,predicate:r,effect:n}=OA(e);return{id:Q$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Fr(22))}}},{withTypes:()=>_A}),ej=(e,t)=>{const{type:r,effect:n,predicate:i}=OA(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},Zv=e=>{e.pending.forEach(t=>{t.abort(Yv)})},fz=(e,t)=>()=>{for(const r of t.keys())Zv(r);e.clear()},tj=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},MA=Ss(Ur(`${Th}/add`),{withTypes:()=>MA}),hz=Ur(`${Th}/removeAll`),IA=Ss(Ur(`${Th}/remove`),{withTypes:()=>IA}),mz=(...e)=>{console.error(`${Th}/error`,...e)},iu=(e={})=>{const t=new Map,r=new Map,n=b=>{const S=r.get(b)??0;r.set(b,S+1)},i=b=>{const S=r.get(b)??1;S===1?r.delete(b):r.set(b,S-1)},{extra:o,onError:c=mz}=e;l0(c);const u=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),S=>{b.unsubscribe(),S!=null&&S.cancelActive&&Zv(b)}),f=(b=>{const S=ej(t,b)??_A(b);return u(S)});Ss(f,{withTypes:()=>f});const h=b=>{const S=ej(t,b);return S&&(S.unsubscribe(),b.cancelActive&&Zv(S)),!!S};Ss(h,{withTypes:()=>h});const m=async(b,S,w,k)=>{const N=new AbortController,E=dz(f,N.signal),C=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(S,Ss({},w,{getOriginalState:k,condition:(A,_)=>E(A,_).then(Boolean),take:E,delay:PA(N.signal),pause:Pf(N.signal),extra:o,signal:N.signal,fork:uz(N.signal,C),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((A,_,O)=>{A!==N&&(A.abort(Yv),O.delete(A))})},cancel:()=>{N.abort(Yv),b.pending.delete(N)},throwIfCancelled:()=>{po(N.signal)}})))}catch(A){A instanceof Ih||tj(c,A,{raisedBy:"effect"})}finally{await Promise.all(C),N.abort(lz),i(b),b.pending.delete(N)}},p=fz(t,r);return{middleware:b=>S=>w=>{if(!lA(w))return S(w);if(MA.match(w))return f(w.payload);if(hz.match(w)){p();return}if(IA.match(w))return h(w.payload);let k=b.getState();const N=()=>{if(k===Jk)throw new Error(Fr(23));return k};let E;try{if(E=S(w),t.size>0){const C=b.getState(),A=Array.from(t.values());for(const _ of A){let O=!1;try{O=_.predicate(w,C,k)}catch(T){O=!1,tj(c,T,{raisedBy:"predicate"})}O&&m(_,w,b,N)}}}finally{k=Jk}return E},startListening:f,stopListening:h,clearListeners:p}};function Fr(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 pz={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},TA=ur({name:"chartLayout",initialState:pz,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),Dh=TA.actions,gz=Dh.setMargin,vz=Dh.setLayout,xz=Dh.setChartSize,yz=Dh.setScale,bz=TA.reducer;function DA(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Ke(e){return Number.isFinite(e)}function qn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function rj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bs(e){for(var t=1;t{if(t&&r){var n=r.width,i=r.height,o=t.align,c=t.verticalAlign,u=t.layout;if((u==="vertical"||u==="horizontal"&&c==="middle")&&o!=="center"&&Ae(e[o]))return bs(bs({},e),{},{[o]:e[o]+(n||0)});if((u==="horizontal"||u==="vertical"&&o==="center")&&c!=="middle"&&Ae(e[c]))return bs(bs({},e),{},{[c]:e[c]+(i||0)})}return e},Zn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",LA=(e,t,r,n)=>{if(n)return e.map(u=>u.coordinate);var i,o,c=e.map(u=>(u.coordinate===t&&(i=!0),u.coordinate===r&&(o=!0),u.coordinate));return i||c.push(t),o||c.push(r),c},RA=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,o=e.range,c=e.scale,u=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,m=e.tickCount,p=e.ticks,v=e.niceTicks,b=e.axisType;if(!c)return null;var S=u==="scaleBand"&&c.bandwidth?c.bandwidth()/2:2,w=i==="category"&&c.bandwidth?c.bandwidth()/S:0;if(w=b==="angleAxis"&&o&&o.length>=2?en(o[0]-o[1])*2*w:w,p||v){var k=(p||v||[]).map((N,E)=>{var C=n?n.indexOf(N):N,A=c.map(C);return Ke(A)?{coordinate:A+w,value:N,offset:w,index:E}:null}).filter(Cr);return k}return f&&h?h.map((N,E)=>{var C=c.map(N);return Ke(C)?{coordinate:C+w,value:N,index:E,offset:w}:null}).filter(Cr):c.ticks&&m!=null?c.ticks(m).map((N,E)=>{var C=c.map(N);return Ke(C)?{coordinate:C+w,value:N,index:E,offset:w}:null}).filter(Cr):c.domain().map((N,E)=>{var C=c.map(N);return Ke(C)?{coordinate:C+w,value:n?n[N]:N,index:E,offset:w}:null}).filter(Cr)},Nz=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(h[0]=o,o+=v,h[1]=o):(h[0]=c,c+=v,h[1]=c)}}}},Ez=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},Az={sign:Nz,expand:WR,none:yo,silhouette:HR,wiggle:KR,positive:Ez},Cz=(e,t,r)=>{var n,i=(n=Az[r])!==null&&n!==void 0?n:yo,o=UR().keys(t).value((u,f)=>Number(Ft(u,f,0))).order(Rv).offset(i),c=o(e);return c.forEach((u,f)=>{u.forEach((h,m)=>{var p=Ft(e[m],t[f],0);Array.isArray(p)&&p.length===2&&Ae(p[0])&&Ae(p[1])&&(h[0]=p[0],h[1]=p[1])})}),c};function Pz(e){return e==null?void 0:String(e)}function nj(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,c=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Xt(i[t.dataKey])){var u=WE(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Ft(i,Xt(c)?t.dataKey:c),h=t.scale.map(f);return Ae(h)?h:null}var Oz=e=>{var t=e.flat(2).filter(Ae);return[Math.min(...t),Math.max(...t)]},_z=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Mz=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return _z(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var c=o.stackedData,u=c.reduce((f,h)=>{var m=DA(h,t,r),p=Oz(m);return!Ke(p[0])||!Ke(p[1])?f:[Math.min(f[0],p[0]),Math.max(f[1],p[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},ij=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,aj=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Of=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Nh(t,m=>m.coordinate),o=1/0,c=1,u=i.length;c{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Tz=(e,t)=>t==="centric"?e.angle:e.radius,Ni=e=>e.layout.width,Ei=e=>e.layout.height,Dz=e=>e.layout.scale,zA=e=>e.layout.margin,Lh=Y(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Rh=Y(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Lz="data-recharts-item-index",Rz="data-recharts-item-id",au=60;function sj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hd(e){for(var t=1;te.brush.height;function Uz(e){var t=Rh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:au;return r+i}return r},0)}function Wz(e){var t=Rh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:au;return r+i}return r},0)}function Hz(e){var t=Lh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Kz(e){var t=Lh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var er=Y([Ni,Ei,zA,Bz,Uz,Wz,Hz,Kz,aA,f$],(e,t,r,n,i,o,c,u,f,h)=>{var m={left:(r.left||0)+i,right:(r.right||0)+o},p={top:(r.top||0)+c,bottom:(r.bottom||0)+u},v=Hd(Hd({},p),m),b=v.bottom;v.bottom+=n,v=Sz(v,f,h);var S=e-v.left-v.right,w=t-v.top-v.bottom;return Hd(Hd({brushBottom:b},v),{},{width:Math.max(S,0),height:Math.max(w,0)})}),Gz=Y(er,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),FA=Y(Ni,Ei,(e,t)=>({x:0,y:0,width:e,height:t})),Vz=x.createContext(null),Or=()=>x.useContext(Vz)!=null,$h=e=>e.brush,zh=Y([$h,er,zA],(e,t,r)=>({height:e.height,x:Ae(e.x)?e.x:t.left,y:Ae(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ae(e.width)?e.width:t.width}));function qz(e,t,{signal:r,edges:n}={}){let i,o=null;const c=n!=null&&n.includes("leading"),u=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(i,o),i=void 0,o=null)},h=()=>{u&&f(),b()};let m=null;const p=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,h()},t)},v=()=>{m!==null&&(clearTimeout(m),m=null)},b=()=>{v(),i=void 0,o=null},S=()=>{f()},w=function(...k){if(r!=null&&r.aborted)return;i=this,o=k;const N=m==null;p(),c&&N&&f()};return w.schedule=p,w.cancel=b,w.flush=S,r==null||r.addEventListener("abort",b,{once:!0}),w}function Qz(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:i=!0,maxWait:o}=r,c=Array(2);n&&(c[0]="leading"),i&&(c[1]="trailing");let u,f=null;const h=qz(function(...v){u=e.apply(this,v),f=null},t,{edges:c}),m=function(...v){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(u=e.apply(this,v),f=Date.now(),h.cancel(),h.schedule(),u):(h.apply(this,v),u)},p=()=>(h.flush(),u);return m.cancel=h.cancel,m.flush=p,m}function Yz(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return Qz(e,t,{leading:n,maxWait:t,trailing:i})}var _f=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;oi[c++]))}},Fn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},BA=(e,t,r)=>{var n=r.width,i=n===void 0?Fn.width:n,o=r.height,c=o===void 0?Fn.height:o,u=r.aspect,f=r.maxHeight,h=bo(i)?e:Number(i),m=bo(c)?t:Number(c);return u&&u>0&&(h?m=h/u:m&&(h=m*u),f&&m!=null&&m>f&&(m=f)),{calculatedWidth:h,calculatedHeight:m}},Zz={width:0,height:0,overflow:"visible"},Xz={width:0,overflowX:"visible"},Jz={height:0,overflowY:"visible"},e8={},t8=e=>{var t=e.width,r=e.height,n=bo(t),i=bo(r);return n&&i?Zz:n?Xz:i?Jz:e8};function r8(e){var t=e.width,r=e.height,n=e.aspect,i=t,o=r;return i===void 0&&o===void 0?(i=Fn.width,o=Fn.height):i===void 0?i=n&&n>0?void 0:Fn.width:o===void 0&&(o=n&&n>0?void 0:Fn.height),{width:i,height:o}}var n8=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Mf(){return Mf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return m8(i)?x.createElement(UA.Provider,{value:i},t):null}var c0=()=>x.useContext(UA),p8=x.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?Fn.initialDimension:n,o=e.width,c=e.height,u=e.minWidth,f=u===void 0?Fn.minWidth:u,h=e.minHeight,m=e.maxHeight,p=e.children,v=e.debounce,b=v===void 0?Fn.debounce:v,S=e.id,w=e.className,k=e.onResize,N=e.style,E=N===void 0?{}:N,C=f8(e,n8),A=x.useRef(null),_=x.useRef();_.current=k,x.useImperativeHandle(t,()=>A.current);var O=x.useState({containerWidth:i.width,containerHeight:i.height}),T=s8(O,2),B=T[0],z=T[1],$=x.useCallback((le,ie)=>{z(X=>{var te=Math.round(le),re=Math.round(ie);return X.containerWidth===te&&X.containerHeight===re?X:{containerWidth:te,containerHeight:re}})},[]);x.useEffect(()=>{if(A.current==null||typeof ResizeObserver>"u")return al;var le=D=>{var M,Q=D[0];if(Q!=null){var ne=Q.contentRect,ae=ne.width,ee=ne.height;$(ae,ee),(M=_.current)===null||M===void 0||M.call(_,ae,ee)}};b>0&&(le=Yz(le,b,{trailing:!0,leading:!1}));var ie=new ResizeObserver(le),X=A.current.getBoundingClientRect(),te=X.width,re=X.height;return $(te,re),ie.observe(A.current),()=>{ie.disconnect()}},[$,b]);var q=B.containerWidth,W=B.containerHeight;_f(!r||r>0,"The aspect(%s) must be greater than zero.",r);var ve=BA(q,W,{width:o,height:c,aspect:r,maxHeight:m}),de=ve.calculatedWidth,ge=ve.calculatedHeight;return _f(q<0||W<0||de!=null&&de>0||ge!=null&&ge>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,de,ge,o,c,f,h,r),x.createElement("div",Mf({id:S?"".concat(S):void 0,className:nt("recharts-responsive-container",w),style:cj(cj({},E),{},{width:o,height:c,minWidth:f,minHeight:h,maxHeight:m}),ref:A},C),x.createElement("div",{style:t8({width:o,height:c})},x.createElement(WA,{width:de,height:ge},p)))}),g8=x.forwardRef((e,t)=>{var r=c0();if(qn(r.width)&&qn(r.height))return e.children;var n=r8({width:e.width,height:e.height,aspect:e.aspect}),i=n.width,o=n.height,c=BA(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),u=c.calculatedWidth,f=c.calculatedHeight;return Ae(u)&&Ae(f)?x.createElement(WA,{width:u,height:f},e.children):x.createElement(p8,Mf({},e,{width:i,height:o,ref:t}))});function u0(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 Fh=()=>{var e,t=Or(),r=Me(Gz),n=Me(zh),i=(e=Me($h))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},v8={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},HA=()=>{var e;return(e=Me(er))!==null&&e!==void 0?e:v8},KA=()=>Me(Ni),GA=()=>Me(Ei),ht=e=>e.layout.layoutType,ol=()=>Me(ht),d0=()=>{var e=ol();if(e==="horizontal"||e==="vertical")return e},VA=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},x8=()=>{var e=ol();return e!==void 0},ou=e=>{var t=At(),r=Or(),n=e.width,i=e.height,o=c0(),c=n,u=i;return o&&(c=o.width>0?o.width:n,u=o.height>0?o.height:i),x.useEffect(()=>{!r&&qn(c)&&qn(u)&&t(xz({width:c,height:u}))},[t,r,c,u]),null},qA=Symbol.for("immer-nothing"),dj=Symbol.for("immer-draftable"),Wr=Symbol.for("immer-state");function bn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lc=Object.getPrototypeOf;function Gs(e){return!!e&&!!e[Wr]}function ko(e){var t;return e?QA(e)||Array.isArray(e)||!!e[dj]||!!((t=e.constructor)!=null&&t[dj])||su(e)||Uh(e):!1}var y8=Object.prototype.constructor.toString(),fj=new WeakMap;function QA(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=fj.get(r);return n===void 0&&(n=Function.toString.call(r),fj.set(r,n)),n===y8}function If(e,t,r=!0){Bh(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Bh(e){const t=e[Wr];return t?t.type_:Array.isArray(e)?1:su(e)?2:Uh(e)?3:0}function Xv(e,t){return Bh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function YA(e,t,r){const n=Bh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function b8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function su(e){return e instanceof Map}function Uh(e){return e instanceof Set}function qa(e){return e.copy_||e.base_}function Jv(e,t){if(su(e))return new Map(e);if(Uh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=QA(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Wr];let i=Reflect.ownKeys(n);for(let o=0;o1&&Object.defineProperties(e,{set:Kd,add:Kd,clear:Kd,delete:Kd}),Object.freeze(e),t&&Object.values(e).forEach(r=>f0(r,!0))),e}function w8(){bn(2)}var Kd={value:w8};function Wh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var k8={};function jo(e){const t=k8[e];return t||bn(0,e),t}var Rc;function ZA(){return Rc}function j8(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function hj(e,t){t&&(jo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ex(e){tx(e),e.drafts_.forEach(S8),e.drafts_=null}function tx(e){e===Rc&&(Rc=e.parent_)}function mj(e){return Rc=j8(Rc,e)}function S8(e){const t=e[Wr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function pj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Wr].modified_&&(ex(t),bn(4)),ko(e)&&(e=Tf(t,e),t.parent_||Df(t,e)),t.patches_&&jo("Patches").generateReplacementPatches_(r[Wr].base_,e,t.patches_,t.inversePatches_)):e=Tf(t,r,[]),ex(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qA?e:void 0}function Tf(e,t,r){if(Wh(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[Wr];if(!i)return If(t,(o,c)=>gj(e,i,t,o,c,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return Df(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let c=o,u=!1;i.type_===3&&(c=new Set(o),o.clear(),u=!0),If(c,(f,h)=>gj(e,i,o,f,h,r,u),n),Df(e,o,!1),r&&e.patches_&&jo("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function gj(e,t,r,n,i,o,c){if(i==null||typeof i!="object"&&!c)return;const u=Wh(i);if(!(u&&!c)){if(Gs(i)){const f=o&&t&&t.type_!==3&&!Xv(t.assigned_,n)?o.concat(n):void 0,h=Tf(e,i,f);if(YA(r,n,h),Gs(h))e.canAutoFreeze_=!1;else return}else c&&r.add(i);if(ko(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&u)return;Tf(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(su(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Df(e,i)}}}function Df(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&f0(t,r)}function N8(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:ZA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=h0;r&&(i=[n],o=$c);const{revoke:c,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=c,u}var h0={get(e,t){if(t===Wr)return e;const r=qa(e);if(!Xv(r,t))return E8(e,r,t);const n=r[t];return e.finalized_||!ko(n)?n:n===Pg(e.base_,t)?(Og(e),e.copy_[t]=nx(n,e)):n},has(e,t){return t in qa(e)},ownKeys(e){return Reflect.ownKeys(qa(e))},set(e,t,r){const n=XA(qa(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Pg(qa(e),t),o=i==null?void 0:i[Wr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(b8(r,i)&&(r!==void 0||Xv(e.base_,t)))return!0;Og(e),rx(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Pg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Og(e),rx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=qa(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){bn(11)},getPrototypeOf(e){return Lc(e.base_)},setPrototypeOf(){bn(12)}},$c={};If(h0,(e,t)=>{$c[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$c.deleteProperty=function(e,t){return $c.set.call(this,e,t,void 0)};$c.set=function(e,t,r){return h0.set.call(this,e[0],t,r,e[0])};function Pg(e,t){const r=e[Wr];return(r?qa(r):e)[t]}function E8(e,t,r){var i;const n=XA(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function XA(e,t){if(!(t in e))return;let r=Lc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Lc(r)}}function rx(e){e.modified_||(e.modified_=!0,e.parent_&&rx(e.parent_))}function Og(e){e.copy_||(e.copy_=Jv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var A8=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const c=this;return function(f=o,...h){return c.produce(f,m=>r.call(this,m,...h))}}typeof r!="function"&&bn(6),n!==void 0&&typeof n!="function"&&bn(7);let i;if(ko(t)){const o=mj(this),c=nx(t,void 0);let u=!0;try{i=r(c),u=!1}finally{u?ex(o):tx(o)}return hj(o,n),pj(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===qA&&(i=void 0),this.autoFreeze_&&f0(i,!0),n){const o=[],c=[];jo("Patches").generateReplacementPatches_(t,i,o,c),n(o,c)}return i}else bn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(c,...u)=>this.produceWithPatches(c,f=>t(f,...u));let n,i;return[this.produce(t,r,(c,u)=>{n=c,i=u}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ko(e)||bn(8),Gs(e)&&(e=C8(e));const t=mj(this),r=nx(e,void 0);return r[Wr].isManual_=!0,tx(t),r}finishDraft(e,t){const r=e&&e[Wr];(!r||!r.isManual_)&&bn(9);const{scope_:n}=r;return hj(n,t),pj(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=jo("Patches").applyPatches_;return Gs(e)?n(e,t):this.produce(e,i=>n(i,t))}};function nx(e,t){const r=su(e)?jo("MapSet").proxyMap_(e,t):Uh(e)?jo("MapSet").proxySet_(e,t):N8(e,t);return(t?t.scope_:ZA()).drafts_.push(r),r}function C8(e){return Gs(e)||bn(10,e),JA(e)}function JA(e){if(!ko(e)||Wh(e))return e;const t=e[Wr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Jv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Jv(e,!0);return If(r,(i,o)=>{YA(r,i,JA(o))},n),t&&(t.finalized_=!1),r}var P8=new A8;P8.produce;var O8={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},eC=ur({name:"legend",initialState:O8,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(t.payload)},prepare:lt()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).payload.indexOf(n);o>-1&&(e.payload[o]=i)},prepare:lt()},removeLegendPayload:{reducer(e,t){var r=tn(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:lt()}}}),lu=eC.actions;lu.setLegendSize;lu.setLegendSettings;var _8=lu.addLegendPayload,M8=lu.replaceLegendPayload,I8=lu.removeLegendPayload,T8=eC.reducer,_g={exports:{}},Mg={};/** + * @license React + * use-sync-external-store-with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vj;function D8(){if(vj)return Mg;vj=1;var e=el();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,c=e.useMemo,u=e.useDebugValue;return Mg.useSyncExternalStoreWithSelector=function(f,h,m,p,v){var b=i(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=c(function(){function k(_){if(!N){if(N=!0,E=_,_=p(_),v!==void 0&&S.hasValue){var O=S.value;if(v(O,_))return C=O}return C=_}if(O=C,r(E,_))return O;var T=p(_);return v!==void 0&&v(O,T)?(E=_,O):(E=_,C=T)}var N=!1,E,C,A=m===void 0?null:m;return[function(){return k(h())},A===null?void 0:function(){return k(A())}]},[h,m,p,v]);var w=n(f,b[0],b[1]);return o(function(){S.hasValue=!0,S.value=w},[w]),u(w),w},Mg}var xj;function L8(){return xj||(xj=1,_g.exports=D8()),_g.exports}L8();function R8(e){e()}function $8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){R8(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var yj={notify(){},get:()=>[]};function z8(e,t){let r,n=yj,i=0,o=!1;function c(w){m();const k=n.subscribe(w);let N=!1;return()=>{N||(N=!0,k(),p())}}function u(){n.notify()}function f(){S.onStateChange&&S.onStateChange()}function h(){return o}function m(){i++,r||(r=e.subscribe(f),n=$8())}function p(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=yj)}function v(){o||(o=!0,m())}function b(){o&&(o=!1,p())}const S={addNestedSub:c,notifyNestedSubs:u,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return S}var F8=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",B8=F8(),U8=()=>typeof navigator<"u"&&navigator.product==="ReactNative",W8=U8(),H8=()=>B8||W8?x.useLayoutEffect:x.useEffect,K8=H8();function bj(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function G8(e,t){if(bj(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i{const f=z8(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),c=x.useMemo(()=>i.getState(),[i]);K8(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),c!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,c]);const u=r||q8;return x.createElement(u.Provider,{value:o},t)}var Y8=Q8,Z8=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function X8(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Hh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(Z8.has(n)){if(e[n]==null&&t[n]==null)continue;if(!G8(e[n],t[n]))return!1}else if(!X8(e[n],t[n]))return!1;return!0}function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.separator,r=t===void 0?ls.separator:t,n=e.contentStyle,i=e.itemStyle,o=e.labelStyle,c=o===void 0?ls.labelStyle:o,u=e.payload,f=e.formatter,h=e.itemSorter,m=e.wrapperClassName,p=e.labelClassName,v=e.label,b=e.labelFormatter,S=e.accessibilityLayer,w=S===void 0?ls.accessibilityLayer:S,k=()=>{if(u&&u.length){var B={padding:0,margin:0},z=lF(u,h),$=z.map((q,W)=>{if(!q||q.type==="none")return null;var ve=q.formatter||f||sF,de=q.value,ge=q.name,le=de,ie=ge;if(ve){var X=ve(de,ge,q,W,u);if(Array.isArray(X)){var te=rF(X,2);le=te[0],ie=te[1]}else if(X!=null)le=X;else return null}var re=sc(sc({},ls.itemStyle),{},{color:q.color||ls.itemStyle.color},i);return x.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(W),style:re},Vn(ie)?x.createElement("span",{className:"recharts-tooltip-item-name"},ie):null,Vn(ie)?x.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,x.createElement("span",{className:"recharts-tooltip-item-value"},le),x.createElement("span",{className:"recharts-tooltip-item-unit"},q.unit||""))});return x.createElement("ul",{className:"recharts-tooltip-item-list",style:B},$)}return null},N=sc(sc({},ls.contentStyle),n),E=sc({margin:0},c),C=!Xt(v),A=C?v:"",_=nt("recharts-default-tooltip",m),O=nt("recharts-tooltip-label",p);C&&b&&u!==void 0&&u!==null&&(A=b(v,u));var T=w?{role:"status","aria-live":"assertive"}:{};return x.createElement("div",ix({className:_,style:N},T),x.createElement("p",{className:O,style:E},x.isValidElement(A)?A:"".concat(A)),k())},lc="recharts-tooltip-wrapper",uF={visibility:"hidden"};function dF(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return nt(lc,{["".concat(lc,"-right")]:Ae(r)&&t&&Ae(t.x)&&r>=t.x,["".concat(lc,"-left")]:Ae(r)&&t&&Ae(t.x)&&r=t.y,["".concat(lc,"-top")]:Ae(n)&&t&&Ae(t.y)&&n0?i:0),p=r[n]+i;if(t[n])return c[n]?m:p;var v=f[n];if(v==null)return 0;if(c[n]){var b=m,S=v;return bk?Math.max(m,v):Math.max(p,v)}function fF(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function hF(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,i=e.offsetLeft,o=e.position,c=e.reverseDirection,u=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,m,p,v;return u.height>0&&u.width>0&&r?(p=jj({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:c,tooltipDimension:u.width,viewBox:h,viewBoxDimension:h.width}),v=jj({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:c,tooltipDimension:u.height,viewBox:h,viewBoxDimension:h.height}),m=fF({translateX:p,translateY:v,useTranslate3d:f})):m=uF,{cssProperties:m,cssClasses:dF({translateX:p,translateY:v,coordinate:r})}}var mF=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),cu={isSsr:mF()};function pF(e,t){return yF(e)||xF(e,t)||vF(e,t)||gF()}function gF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vF(e,t){if(e){if(typeof e=="string")return Sj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sj(e,t):void 0}}function Sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rcu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=pF(e,2),r=t[0],n=t[1];return x.useEffect(()=>{if(window.matchMedia){var i=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(i.matches)};return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}}},[]),r}function Nj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cs(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=jF(f,2),m=h[0],p=h[1];x.useEffect(()=>{var N=E=>{if(E.key==="Escape"){var C,A,_,O;p({dismissed:!0,dismissedAtCoordinate:{x:(C=(A=e.coordinate)===null||A===void 0?void 0:A.x)!==null&&C!==void 0?C:0,y:(_=(O=e.coordinate)===null||O===void 0?void 0:O.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),m.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((o=(c=e.coordinate)===null||c===void 0?void 0:c.y)!==null&&o!==void 0?o:0)!==m.dismissedAtCoordinate.y)&&p(cs(cs({},m),{},{dismissed:!1}));var v=hF({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}),b=v.cssClasses,S=v.cssProperties,w=e.hasPortalFromProps?{}:cs(cs({transition:CF({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},S),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),k=cs(cs({},w),{},{visibility:!m.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return x.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:k,ref:e.innerRef},e.children)}var OF=x.memo(PF),rC=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;tKe(e.x)&&Ke(e.y),Oj=e=>e.base!=null&&Lf(e.base)&&Lf(e),cc=e=>e.x,uc=e=>e.y,TF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Jx(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Pj["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Pj[r]||jh},_j={connectNulls:!1,type:"linear"},DF=e=>{var t=e.type,r=t===void 0?_j.type:t,n=e.points,i=n===void 0?[]:n,o=e.baseLine,c=e.layout,u=e.connectNulls,f=u===void 0?_j.connectNulls:u,h=TF(r,c),m=f?i.filter(Lf):i;if(Array.isArray(o)){var p,v=i.map((N,E)=>Cj(Cj({},N),{},{base:o[E]}));c==="vertical"?p=$d().y(uc).x1(cc).x0(N=>N.base.x):p=$d().x(cc).y1(uc).y0(N=>N.base.y);var b=p.defined(Oj).curve(h),S=f?v.filter(Oj):v;return b(S)}var w;c==="vertical"&&Ae(o)?w=$d().y(uc).x1(cc).x0(o):Ae(o)?w=$d().x(cc).y1(uc).y0(o):w=_E().x(cc).y(uc);var k=w.defined(Lf).curve(h);return k(m)},lf=e=>{var t=e.className,r=e.points,n=e.path,i=e.pathRef,o=ol();if((!r||!r.length)&&!n)return null;var c={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},u=r&&r.length?DF(c):n;return x.createElement("path",ax({},kn(e),e0(e),{className:nt("recharts-curve",t),d:u===null?void 0:u,ref:i}))},LF=["x","y","top","left","width","height","className"];function ox(){return ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),HF=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,i=n===void 0?0:n,o=e.top,c=o===void 0?0:o,u=e.left,f=u===void 0?0:u,h=e.width,m=h===void 0?0:h,p=e.height,v=p===void 0?0:p,b=e.className,S=BF(e,LF),w=RF({x:r,y:i,top:c,left:f,width:m,height:v},S);return!Ae(r)||!Ae(i)||!Ae(m)||!Ae(v)||!Ae(c)||!Ae(f)?null:x.createElement("path",ox({},nn(w),{className:nt("recharts-cross",b),d:WF(r,i,m,v,c,f)}))};function KF(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Rf=1e-4,nC=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],iC=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Ij=(e,t)=>r=>{var n=nC(e,t);return iC(n,r)},GF=(e,t)=>r=>{var n=nC(e,t),i=[...n.map((o,c)=>o*c).slice(1),0];return iC(i,r)},VF=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var i=n.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},qF=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var i=Ij(e,r),o=Ij(t,n),c=GF(e,r),u=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,p=m,v=0;v<8;++v){var b=i(p)-m,S=c(p);if(Math.abs(b-m)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,c=t.dt,u=c===void 0?16.67:c,f=1,h=[0],m=0,p=0,v=1e4,b=0;b{var E,C,A;if(N<=0)return 0;if(N>=1)return f;var _=N*k,O=Math.floor(_),T=_-O;return((E=h[O])!==null&&E!==void 0?E:0)+(((C=h[O+1])!==null&&C!==void 0?C:0)-((A=h[O])!==null&&A!==void 0?A:0))*T}},ZF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Tj(e);case"spring":return YF();default:if(e.split("(")[0]==="cubic-bezier")return Tj(e)}return typeof e=="function"?e:null},XF=(e,t,r)=>{var n,i=o=>{var c=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(i,c);return}n=e.setTimeout(i,c)};return n=e.setTimeout(i,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},aC=x.createContext(XF);aC.Provider;function JF(e){var t=x.useContext(aC);return x.useMemo(()=>e??t,[e,t])}function e9(e,t,r){return(t=t9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t9(e){var t=r9(e,"string");return typeof t=="symbol"?t:t+""}function r9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dj="init",Lj="pending",Rj="active",n9="completed";function Dg(e){return Math.max(0,e)}class i9{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;e9(this,"state",Dj),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=Dg(t.animationDuration),this.animationBegin=Dg(t.animationBegin),this.progress=0,this.from=t.from,this.to=t.to,this.easing=t.easing,(r=t.onAnimationStart)===null||r===void 0||r.call(t)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(t){if(this.getState()===Dj)return this.state=Lj,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Lj){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Rj,this.animationStartedTime=t,this.nextAnimationUpdate(0)):Dg(this.animationBegin-r)}if(this.getState()===Rj){if(this.animationStartedTime==null)throw new Error;var n=t-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(t){this.progress=Math.min(1,Math.max(0,t))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state==="active"){var t;(t=this.onAnimationEnd)===null||t===void 0||t.call(this)}this.state=n9}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class a9 extends i9{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(hi(this.getFrom(),this.getTo(),this.getProgress()))}}class o9{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=c=>{c-n>=r?t(c):i=requestAnimationFrame(o)};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function s9(e,t){return d9(e)||u9(e,t)||c9(e,t)||l9()}function l9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c9(e,t){if(e){if(typeof e=="string")return $j(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$j(e,t):void 0}}function $j(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{},onAnimationStart:()=>{}},zj=0,Lg=1;function oC(e){var t=sn(e,f9),r=t.animationId,n=t.isActive,i=t.canBegin,o=t.duration,c=t.easing,u=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,m=t.children,p=tC(),v=n==="auto"?!cu.isSsr&&!p:n,b=JF(t.animationController),S=x.useState(v?zj:Lg),w=s9(S,2),k=w[0],N=w[1];return x.useEffect(()=>{v||N(Lg)},[v]),x.useEffect(()=>{var E=ZF(c);if(!v||!i||E==null)return al;var C=new o9,A=new a9({animationId:r,easing:E,animationDuration:o,animationBegin:u,onAnimationStart:h,onAnimationEnd:f,from:zj,to:Lg});return b(C,A,N)},[b,r,v,i,o,c,u,h,f]),m(Number(k))}function sC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=x.useRef(Mc(t)),n=x.useRef(e);return n.current!==e&&(r.current=Mc(t),n.current=e),r.current}var h9=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),m9=(e,t,r)=>e.map(n=>"".concat(h9(n)," ").concat(t,"ms ").concat(r)).join(","),p9=["radius"],g9=["radius"],Fj,Bj,Uj,Wj,Hj,Kj,Gj,Vj,qj,Qj;function Yj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zj(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var o=ma(r),c=ma(n),u=Math.min(Math.abs(o)/2,Math.abs(c)/2),f=c>=0?1:-1,h=o>=0?1:-1,m=c>=0&&o>=0||c<0&&o<0?1:0,p;if(u>0&&Array.isArray(i)){for(var v=[0,0,0,0],b=0,S=4;bu?u:k}p=qt(Fj||(Fj=In(["M",",",""])),e,t+f*v[0]),v[0]>0&&(p+=qt(Bj||(Bj=In(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),p+=qt(Uj||(Uj=In(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(p+=qt(Wj||(Wj=In(["A ",",",",0,0,",`, + `,",",""])),v[1],v[1],m,e+r,t+f*v[1])),p+=qt(Hj||(Hj=In(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(p+=qt(Kj||(Kj=In(["A ",",",",0,0,",`, + `,",",""])),v[2],v[2],m,e+r-h*v[2],t+n)),p+=qt(Gj||(Gj=In(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(p+=qt(Vj||(Vj=In(["A ",",",",0,0,",`, + `,",",""])),v[3],v[3],m,e,t+n-f*v[3])),p+="Z"}else if(u>0&&i===+i&&i>0){var N=Math.min(u,i);p=qt(qj||(qj=In(["M ",",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",",",` + L `,",",` + A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,m,e+h*N,t,e+r-h*N,t,N,N,m,e+r,t+f*N,e+r,t+n-f*N,N,N,m,e+r-h*N,t+n,e+h*N,t+n,N,N,m,e,t+n-f*N)}else p=qt(Qj||(Qj=In(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return p},t2={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},E9=e=>{var t=sn(e,t2),r=x.useRef(null),n=x.useState(-1),i=w9(n,2),o=i[0],c=i[1];x.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var X=r.current.getTotalLength();X&&c(X)}catch{}},[]);var u=t.x,f=t.y,h=t.width,m=t.height,p=t.radius,v=t.className,b=t.animationEasing,S=t.animationDuration,w=t.animationBegin,k=t.isAnimationActive,N=t.isUpdateAnimationActive,E=x.useRef(h),C=x.useRef(m),A=x.useRef(u),_=x.useRef(f),O=x.useMemo(()=>({x:u,y:f,width:h,height:m,radius:p}),[u,f,h,m,p]),T=sC(O,"rectangle-");if(u!==+u||f!==+f||h!==+h||m!==+m||h===0||m===0)return null;var B=nt("recharts-rectangle",v);if(!N){var z=nn(t);z.radius;var $=Xj(z,p9);return x.createElement("path",$f({},$,{x:ma(u),y:ma(f),width:ma(h),height:ma(m),radius:typeof p=="number"?p:void 0,className:B,d:e2(u,f,h,m,p)}))}var q=E.current,W=C.current,ve=A.current,de=_.current,ge="0px ".concat(o===-1?1:o,"px"),le="".concat(o,"px ").concat(o,"px"),ie=m9(["strokeDasharray"],S,typeof b=="string"?b:t2.animationEasing);return x.createElement(oC,{animationId:T,key:T,canBegin:o>0,duration:S,easing:b,isActive:N,begin:w},X=>{var te=hi(q,h,X),re=hi(W,m,X),D=hi(ve,u,X),M=hi(de,f,X);r.current&&(E.current=te,C.current=re,A.current=D,_.current=M);var Q;k?X>0?Q={transition:ie,strokeDasharray:le}:Q={strokeDasharray:ge}:Q={strokeDasharray:le};var ne=nn(t);ne.radius;var ae=Xj(ne,g9);return x.createElement("path",$f({},ae,{radius:typeof p=="number"?p:void 0,className:B,d:e2(D,M,te,re,p),ref:r,style:Zj(Zj({},Q),t.style)}))})};function r2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function n2(e){for(var t=1;te*180/Math.PI,Zt=(e,t,r,n)=>({x:e+Math.cos(-zf*n)*r,y:t+Math.sin(-zf*n)*r}),_9=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},M9=(e,t)=>{var r=e.x,n=e.y,i=t.x,o=t.y;return Math.sqrt((r-i)**2+(n-o)**2)},I9=(e,t)=>{var r=e.x,n=e.y,i=t.cx,o=t.cy,c=M9({x:r,y:n},{x:i,y:o});if(c<=0)return{radius:c,angle:0};var u=(r-i)/c,f=Math.acos(u);return n>o&&(f=2*Math.PI-f),{radius:c,angle:O9(f),angleInRadian:f}},T9=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-o*360,endAngle:r-o*360}},D9=(e,t)=>{var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),c=Math.min(i,o);return e+c*360},L9=(e,t)=>{var r=e.relativeX,n=e.relativeY,i=I9({x:r,y:n},t),o=i.radius,c=i.angle,u=t.innerRadius,f=t.outerRadius;if(of||o===0)return null;var h=T9(t),m=h.startAngle,p=h.endAngle,v=c,b;if(m<=p){for(;v>p;)v-=360;for(;v=m&&v<=p}else{for(;v>m;)v-=360;for(;v=p&&v<=m}return b?n2(n2({},t),{},{radius:o,angle:D9(v,t)}):null};function lC(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle,c=Zt(t,r,n,i),u=Zt(t,r,n,o);return{points:[c,u],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var i2,a2,o2,s2,l2,c2,u2;function sx(){return sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=en(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Gd=e=>{var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,c=e.isExternal,u=e.cornerRadius,f=e.cornerIsExternal,h=u*(c?1:-1)+n,m=Math.asin(u/h)/zf,p=f?i:i+o*m,v=Zt(t,r,h,p),b=Zt(t,r,n,p),S=f?i-o*m:i,w=Zt(t,r,h*Math.cos(m*zf),S);return{center:v,circleTangency:b,lineTangency:w,theta:m}},cC=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,c=e.endAngle,u=R9(o,c),f=o+u,h=Zt(t,r,i,o),m=Zt(t,r,i,f),p=qt(i2||(i2=Xa(["M ",",",` + A `,",",`,0, + `,",",`, + `,",",` + `])),h.x,h.y,i,i,+(Math.abs(u)>180),+(o>f),m.x,m.y);if(n>0){var v=Zt(t,r,n,o),b=Zt(t,r,n,f);p+=qt(a2||(a2=Xa(["L ",",",` + A `,",",`,0, + `,",",`, + `,","," Z"])),b.x,b.y,n,n,+(Math.abs(u)>180),+(o<=f),v.x,v.y)}else p+=qt(o2||(o2=Xa(["L ",","," Z"])),t,r);return p},$9=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,c=e.forceCornerRadius,u=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,m=en(h-f),p=Gd({cx:t,cy:r,radius:i,angle:f,sign:m,cornerRadius:o,cornerIsExternal:u}),v=p.circleTangency,b=p.lineTangency,S=p.theta,w=Gd({cx:t,cy:r,radius:i,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:u}),k=w.circleTangency,N=w.lineTangency,E=w.theta,C=u?Math.abs(f-h):Math.abs(f-h)-S-E;if(C<0)return c?qt(s2||(s2=Xa(["M ",",",` + a`,",",",0,0,1,",`,0 + a`,",",",0,0,1,",`,0 + `])),b.x,b.y,o,o,o*2,o,o,-o*2):cC({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var A=qt(l2||(l2=Xa(["M ",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",",` + `])),b.x,b.y,o,o,+(m<0),v.x,v.y,i,i,+(C>180),+(m<0),k.x,k.y,o,o,+(m<0),N.x,N.y);if(n>0){var _=Gd({cx:t,cy:r,radius:n,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),O=_.circleTangency,T=_.lineTangency,B=_.theta,z=Gd({cx:t,cy:r,radius:n,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),$=z.circleTangency,q=z.lineTangency,W=z.theta,ve=u?Math.abs(f-h):Math.abs(f-h)-B-W;if(ve<0&&o===0)return"".concat(A,"L").concat(t,",").concat(r,"Z");A+=qt(c2||(c2=Xa(["L",",",` + A`,",",",0,0,",",",",",` + A`,",",",0,",",",",",",",` + A`,",",",0,0,",",",",","Z"])),q.x,q.y,o,o,+(m<0),$.x,$.y,n,n,+(ve>180),+(m>0),O.x,O.y,o,o,+(m<0),T.x,T.y)}else A+=qt(u2||(u2=Xa(["L",",","Z"])),t,r);return A},z9={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},F9=e=>{var t=sn(e,z9),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,c=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,p=t.className;if(o0&&Math.abs(h-m)<360?w=$9({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(S,b/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:m}):w=cC({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:h,endAngle:m}),x.createElement("path",sx({},nn(t),{className:v,d:w}))};function B9(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(HE(t)){if(e==="centric"){var n=t.cx,i=t.cy,o=t.innerRadius,c=t.outerRadius,u=t.angle,f=Zt(n,i,o,u),h=Zt(n,i,c,u);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return lC(t)}}function U9(e){return iA(e)?NaN:Number(e)}function Rg(e){return e?(e=U9(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function uC(e,t,r){r&&typeof r!="number"&&Bv(e,t,r)&&(t=r=void 0),e=Rg(e),t===void 0?(t=e,e=0):t=Rg(t),r=r===void 0?ee.chartData,m0=Y([En],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Kh=(e,t,r,n)=>n?m0(e):En(e),W9=(e,t,r)=>r?m0(e):En(e),H9=Y([Kh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});Y([m0],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var K9=Y([En],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function p0(e,t){return Q9(e)||q9(e,t)||V9(e,t)||G9()}function G9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V9(e,t){if(e){if(typeof e=="string")return d2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d2(e,t):void 0}}function d2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};Se.decimalPlaces=Se.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ct;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Se.dividedBy=Se.div=function(e){return vi(this,new this.constructor(e))};Se.dividedToIntegerBy=Se.idiv=function(e){var t=this,r=t.constructor;return tt(vi(t,new r(e),0,1),r.precision)};Se.equals=Se.eq=function(e){return!this.cmp(e)};Se.exponent=function(){return Et(this)};Se.greaterThan=Se.gt=function(e){return this.cmp(e)>0};Se.greaterThanOrEqualTo=Se.gte=function(e){return this.cmp(e)>=0};Se.isInteger=Se.isint=function(){return this.e>this.d.length-2};Se.isNegative=Se.isneg=function(){return this.s<0};Se.isPositive=Se.ispos=function(){return this.s>0};Se.isZero=function(){return this.s===0};Se.lessThan=Se.lt=function(e){return this.cmp(e)<0};Se.lessThanOrEqualTo=Se.lte=function(e){return this.cmp(e)<1};Se.logarithm=Se.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq($r))throw Error(on+"NaN");if(r.s<1)throw Error(on+(r.s?"NaN":"-Infinity"));return r.eq($r)?new n(0):(ft=!1,t=vi(zc(r,o),zc(e,o),o),ft=!0,tt(t,i))};Se.minus=Se.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?pC(t,e):hC(t,(e.s=-e.s,e))};Se.modulo=Se.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(on+"NaN");return r.s?(ft=!1,t=vi(r,e,0,1).times(e),ft=!0,r.minus(t)):tt(new n(r),i)};Se.naturalExponential=Se.exp=function(){return mC(this)};Se.naturalLogarithm=Se.ln=function(){return zc(this)};Se.negated=Se.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Se.plus=Se.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?hC(t,e):pC(t,(e.s=-e.s,e))};Se.precision=Se.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(go+e);if(t=Et(i)+1,n=i.d.length-1,r=n*ct+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Se.squareRoot=Se.sqrt=function(){var e,t,r,n,i,o,c,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(on+"NaN")}for(e=Et(u),ft=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Bn(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ll((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=c=r+3;;)if(o=n,n=o.plus(vi(u,o,c+2)).times(.5),Bn(o.d).slice(0,c)===(t=Bn(n.d)).slice(0,c)){if(t=t.slice(c-3,c+1),i==c&&t=="4999"){if(tt(o,r+1,0),o.times(o).eq(u)){n=o;break}}else if(t!="9999")break;c+=4}return ft=!0,tt(n,r)};Se.times=Se.mul=function(e){var t,r,n,i,o,c,u,f,h,m=this,p=m.constructor,v=m.d,b=(e=new p(e)).d;if(!m.s||!e.s)return new p(0);for(e.s*=m.s,r=m.e+e.e,f=v.length,h=b.length,f=0;){for(t=0,i=f+n;i>n;)u=o[i]+b[n]*v[i-n-1]+t,o[i--]=u%zt|0,t=u/zt|0;o[i]=(o[i]+t)%zt|0}for(;!o[--c];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ft?tt(e,p.precision):e};Se.toDecimalPlaces=Se.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Qn(e,0,sl),t===void 0?t=n.rounding:Qn(t,0,8),tt(r,e+Et(r)+1,t))};Se.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=So(n,!0):(Qn(e,0,sl),t===void 0?t=i.rounding:Qn(t,0,8),n=tt(new i(n),e+1,t),r=So(n,!0,e+1)),r};Se.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?So(i):(Qn(e,0,sl),t===void 0?t=o.rounding:Qn(t,0,8),n=tt(new o(i),e+Et(i)+1,t),r=So(n.abs(),!1,e+Et(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Se.toInteger=Se.toint=function(){var e=this,t=e.constructor;return tt(new t(e),Et(e)+1,t.rounding)};Se.toNumber=function(){return+this};Se.toPower=Se.pow=function(e){var t,r,n,i,o,c,u=this,f=u.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f($r);if(u=new f(u),!u.s){if(e.s<1)throw Error(on+"Infinity");return u}if(u.eq($r))return u;if(n=f.precision,e.eq($r))return tt(u,n);if(t=e.e,r=e.d.length-1,c=t>=r,o=u.s,c){if((r=m<0?-m:m)<=fC){for(i=new f($r),t=Math.ceil(n/ct+4),ft=!1;r%2&&(i=i.times(u),m2(i.d,t)),r=ll(r/2),r!==0;)u=u.times(u),m2(u.d,t);return ft=!0,e.s<0?new f($r).div(i):tt(i,n)}}else if(o<0)throw Error(on+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,ft=!1,i=e.times(zc(u,n+h)),ft=!0,i=mC(i),i.s=o,i};Se.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Et(i),n=So(i,r<=o.toExpNeg||r>=o.toExpPos)):(Qn(e,1,sl),t===void 0?t=o.rounding:Qn(t,0,8),i=tt(new o(i),e,t),r=Et(i),n=So(i,e<=r||r<=o.toExpNeg,e)),n};Se.toSignificantDigits=Se.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Qn(e,1,sl),t===void 0?t=n.rounding:Qn(t,0,8)),tt(new n(r),e,t)};Se.toString=Se.valueOf=Se.val=Se.toJSON=Se[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Et(e),r=e.constructor;return So(e,t<=r.toExpNeg||t>=r.toExpPos)};function hC(e,t){var r,n,i,o,c,u,f,h,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),ft?tt(t,p):t;if(f=e.d,h=t.d,c=e.e,i=t.e,f=f.slice(),o=c-i,o){for(o<0?(n=f,o=-o,u=h.length):(n=h,i=c,u=f.length),c=Math.ceil(p/ct),u=c>u?c+1:u+1,o>u&&(o=u,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(u=f.length,o=h.length,u-o<0&&(o=u,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/zt|0,f[o]%=zt;for(r&&(f.unshift(r),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,ft?tt(t,p):t}function Qn(e,t,r){if(e!==~~e||er)throw Error(go+e)}function Bn(e){var t,r,n,i=e.length-1,o="",c=e[0];if(i>0){for(o+=c,t=1;tc?1:-1;else for(u=f=0;ui[u]?1:-1;break}return f}function r(n,i,o){for(var c=0;o--;)n[o]-=c,c=n[o]1;)n.shift()}return function(n,i,o,c){var u,f,h,m,p,v,b,S,w,k,N,E,C,A,_,O,T,B,z=n.constructor,$=n.s==i.s?1:-1,q=n.d,W=i.d;if(!n.s)return new z(n);if(!i.s)throw Error(on+"Division by zero");for(f=n.e-i.e,T=W.length,_=q.length,b=new z($),S=b.d=[],h=0;W[h]==(q[h]||0);)++h;if(W[h]>(q[h]||0)&&--f,o==null?E=o=z.precision:c?E=o+(Et(n)-Et(i))+1:E=o,E<0)return new z(0);if(E=E/ct+2|0,h=0,T==1)for(m=0,W=W[0],E++;(h<_||m)&&E--;h++)C=m*zt+(q[h]||0),S[h]=C/W|0,m=C%W|0;else{for(m=zt/(W[0]+1)|0,m>1&&(W=e(W,m),q=e(q,m),T=W.length,_=q.length),A=T,w=q.slice(0,T),k=w.length;k=zt/2&&++O;do m=0,u=t(W,w,T,k),u<0?(N=w[0],T!=k&&(N=N*zt+(w[1]||0)),m=N/O|0,m>1?(m>=zt&&(m=zt-1),p=e(W,m),v=p.length,k=w.length,u=t(p,w,v,k),u==1&&(m--,r(p,T16)throw Error(g0+Et(e));if(!e.s)return new m($r);for(ft=!1,u=p,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),h+=5;for(n=Math.log(Qa(2,h))/Math.LN10*2+5|0,u+=n,r=i=o=new m($r),m.precision=u;;){if(i=tt(i.times(e),u),r=r.times(++f),c=o.plus(vi(i,r,u)),Bn(c.d).slice(0,u)===Bn(o.d).slice(0,u)){for(;h--;)o=tt(o.times(o),u);return m.precision=p,t==null?(ft=!0,tt(o,p)):o}o=c}}function Et(e){for(var t=e.e*ct,r=e.d[0];r>=10;r/=10)t++;return t}function $g(e,t,r){if(t>e.LN10.sd())throw ft=!0,r&&(e.precision=r),Error(on+"LN10 precision limit exceeded");return tt(new e(e.LN10),t)}function na(e){for(var t="";e--;)t+="0";return t}function zc(e,t){var r,n,i,o,c,u,f,h,m,p=1,v=10,b=e,S=b.d,w=b.constructor,k=w.precision;if(b.s<1)throw Error(on+(b.s?"NaN":"-Infinity"));if(b.eq($r))return new w(0);if(t==null?(ft=!1,h=k):h=t,b.eq(10))return t==null&&(ft=!0),$g(w,h);if(h+=v,w.precision=h,r=Bn(S),n=r.charAt(0),o=Et(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Bn(b.d),n=r.charAt(0),p++;o=Et(b),n>1?(b=new w("0."+r),o++):b=new w(n+"."+r.slice(1))}else return f=$g(w,h+2,k).times(o+""),b=zc(new w(n+"."+r.slice(1)),h-v).plus(f),w.precision=k,t==null?(ft=!0,tt(b,k)):b;for(u=c=b=vi(b.minus($r),b.plus($r),h),m=tt(b.times(b),h),i=3;;){if(c=tt(c.times(m),h),f=u.plus(vi(c,new w(i),h)),Bn(f.d).slice(0,h)===Bn(u.d).slice(0,h))return u=u.times(2),o!==0&&(u=u.plus($g(w,h+2,k).times(o+""))),u=vi(u,new w(p),h),w.precision=k,t==null?(ft=!0,tt(u,k)):u;u=f,i+=2}}function h2(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=ll(r/ct),e.d=[],n=(r+1)%ct,r<0&&(n+=ct),nFf||e.e<-Ff))throw Error(g0+r)}else e.s=0,e.e=0,e.d=[0];return e}function tt(e,t,r){var n,i,o,c,u,f,h,m,p=e.d;for(c=1,o=p[0];o>=10;o/=10)c++;if(n=t-c,n<0)n+=ct,i=t,h=p[m=0];else{if(m=Math.ceil((n+1)/ct),o=p.length,m>=o)return e;for(h=o=p[m],c=1;o>=10;o/=10)c++;n%=ct,i=n-ct+c}if(r!==void 0&&(o=Qa(10,c-i-1),u=h/o%10|0,f=t<0||p[m+1]!==void 0||h%o,f=r<4?(u||f)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||f||r==6&&(n>0?i>0?h/Qa(10,c-i):0:p[m-1])%10&1||r==(e.s<0?8:7))),t<1||!p[0])return f?(o=Et(e),p.length=1,t=t-o-1,p[0]=Qa(10,(ct-t%ct)%ct),e.e=ll(-t/ct)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(n==0?(p.length=m,o=1,m--):(p.length=m+1,o=Qa(10,ct-n),p[m]=i>0?(h/Qa(10,c-i)%Qa(10,i)|0)*o:0),f)for(;;)if(m==0){(p[0]+=o)==zt&&(p[0]=1,++e.e);break}else{if(p[m]+=o,p[m]!=zt)break;p[m--]=0,o=1}for(n=p.length;p[--n]===0;)p.pop();if(ft&&(e.e>Ff||e.e<-Ff))throw Error(g0+Et(e));return e}function pC(e,t){var r,n,i,o,c,u,f,h,m,p,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),ft?tt(t,b):t;if(f=e.d,p=t.d,n=t.e,h=e.e,f=f.slice(),c=h-n,c){for(m=c<0,m?(r=f,c=-c,u=p.length):(r=p,n=h,u=f.length),i=Math.max(Math.ceil(b/ct),u)+2,c>i&&(c=i,r.length=1),r.reverse(),i=c;i--;)r.push(0);r.reverse()}else{for(i=f.length,u=p.length,m=i0;--i)f[u++]=0;for(i=p.length;i>c;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+na(n):c>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+na(-i-1)+o,r&&(n=r-c)>0&&(o+=na(n))):i>=c?(o+=na(i+1-c),r&&(n=r-i-1)>0&&(o=o+"."+na(n))):((n=i+1)0&&(i+1===c&&(o+="."),o+=na(n))),e.s<0?"-"+o:o}function m2(e,t){if(e.length>t)return e.length=t,!0}function gC(e){var t,r,n;function i(o){var c=this;if(!(c instanceof i))return new i(o);if(c.constructor=i,o instanceof i){c.s=o.s,c.e=o.e,c.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(go+o);if(o>0)c.s=1;else if(o<0)o=-o,c.s=-1;else{c.s=0,c.e=0,c.d=[0];return}if(o===~~o&&o<1e7){c.e=0,c.d=[o];return}return h2(c,o.toString())}else if(typeof o!="string")throw Error(go+o);if(o.charCodeAt(0)===45?(o=o.slice(1),c.s=-1):c.s=1,X9.test(o))h2(c,o);else throw Error(go+o)}if(i.prototype=Se,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=gC,i.config=i.set=J9,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(go+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(go+r+": "+n);return this}var v0=gC(Z9);$r=new v0(1);const Ve=v0;function vC(e){var t;return e===0?t=1:t=Math.floor(new Ve(e).abs().log(10).toNumber())+1,t}function xC(e,t,r){for(var n=new Ve(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}function Fc(e,t){return n7(e)||r7(e,t)||t7(e,t)||e7()}function e7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t7(e,t){if(e){if(typeof e=="string")return p2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p2(e,t):void 0}}function p2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=Fc(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]},x0=(e,t,r)=>{if(e.lte(0))return new Ve(0);var n=vC(e.toNumber()),i=new Ve(10).pow(n),o=e.div(i),c=n!==1?.05:.1,u=new Ve(Math.ceil(o.div(c).toNumber())).add(r).mul(c),f=u.mul(i);return t?new Ve(f.toNumber()):new Ve(Math.ceil(f.toNumber()))},bC=(e,t,r)=>{var n;if(e.lte(0))return new Ve(0);var i=[1,2,2.5,5],o=e.toNumber(),c=Math.floor(new Ve(o).abs().log(10).toNumber()),u=new Ve(10).pow(c),f=e.div(u).toNumber(),h=i.findIndex(b=>b>=f-1e-10);if(h===-1&&(u=u.mul(10),h=0),h+=r,h>=i.length){var m=Math.floor(h/i.length);h%=i.length,u=u.mul(new Ve(10).pow(m))}var p=(n=i[h])!==null&&n!==void 0?n:1,v=new Ve(p).mul(u);return t?v:new Ve(Math.ceil(v.toNumber()))},i7=(e,t,r)=>{var n=new Ve(1),i=new Ve(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new Ve(10).pow(vC(e)-1),i=new Ve(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new Ve(Math.floor(e)))}else e===0?i=new Ve(Math.floor((t-1)/2)):r||(i=new Ve(Math.floor(e)));for(var c=Math.floor((t-1)/2),u=[],f=0;f4&&arguments[4]!==void 0?arguments[4]:0,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:x0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ve(0),tickMin:new Ve(0),tickMax:new Ve(0)};var u=c(new Ve(r).sub(t).div(n-1),i,o),f;t<=0&&r>=0?f=new Ve(0):(f=new Ve(t).add(r).div(2),f=f.sub(new Ve(f).mod(u)));var h=Math.ceil(f.sub(t).div(u).toNumber()),m=Math.ceil(new Ve(r).sub(f).div(u).toNumber()),p=h+m+1;return p>n?wC(t,r,n,i,o+1,c):(p0?m+(n-p):m,h=r>0?h:h+(n-p)),{step:u,tickMin:f.sub(new Ve(h).mul(u)),tickMax:f.add(new Ve(m).mul(u))})},g2=function(t){var r=Fc(t,2),n=r[0],i=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=yC([n,i]),m=Fc(h,2),p=m[0],v=m[1];if(p===-1/0||v===1/0){var b=v===1/0?[p,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>i?b.reverse():b}if(p===v)return i7(p,o,c);var S=u==="snap125"?bC:x0,w=wC(p,v,f,c,0,S),k=w.step,N=w.tickMin,E=w.tickMax,C=xC(N,E.add(new Ve(.1).mul(k)),k);return n>i?C.reverse():C},v2=function(t,r){var n=Fc(t,2),i=n[0],o=n[1],c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=yC([i,o]),h=Fc(f,2),m=h[0],p=h[1];if(m===-1/0||p===1/0)return[i,o];if(m===p)return[m];var v=u==="snap125"?bC:x0,b=Math.max(r,2),S=v(new Ve(p).sub(m).div(b-1),c,0),w=[...xC(new Ve(m),new Ve(p),S),p];return c===!1&&(w=w.map(k=>Math.round(k))),i>o?w.reverse():w},a7=e=>e.rootProps.barCategoryGap,Gh=e=>e.rootProps.stackOffset,kC=e=>e.rootProps.reverseStackOrder,y0=e=>e.options.chartName,b0=e=>e.rootProps.syncId,jC=e=>e.rootProps.syncMethod,w0=e=>e.options.eventEmitter,o7=e=>e.rootProps.baseValue,pr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ua={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Tn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Vh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function qh(e,t,r){if(r!=="auto")return r;if(e!=null)return Zn(e,t)?"category":"number"}function x2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bf(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},k0=Y([u7,VA],(e,t)=>{var r;if(e!=null)return e;var n=(r=qh(t,"angleAxis",y2.type))!==null&&r!==void 0?r:"category";return Bf(Bf({},y2),{},{type:n})}),d7=(e,t)=>e.polarAxis.radiusAxis[t],j0=Y([d7,VA],(e,t)=>{var r;if(e!=null)return e;var n=(r=qh(t,"radiusAxis",b2.type))!==null&&r!==void 0?r:"category";return Bf(Bf({},b2),{},{type:n})}),Qh=e=>e.polarOptions,S0=Y([Ni,Ei,er],_9),SC=Y([Qh,S0],(e,t)=>{if(e!=null)return ja(e.innerRadius,t,0)}),NC=Y([Qh,S0],(e,t)=>{if(e!=null)return ja(e.outerRadius,t,t*.8)}),f7=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},EC=Y([Qh],f7);Y([k0,EC],Vh);var AC=Y([S0,SC,NC],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});Y([j0,AC],Vh);var CC=Y([ht,Qh,SC,NC,Ni,Ei],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var c=t.cx,u=t.cy,f=t.startAngle,h=t.endAngle;return{cx:ja(c,i,i/2),cy:ja(u,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Ut=(e,t)=>t,Yh=(e,t,r)=>r;function N0(e){return e==null?void 0:e.id}function PC(e,t,r){var n=t.chartData,i=n===void 0?[]:n,o=r.allowDuplicatedCategory,c=r.dataKey,u=new Map;return e.forEach(f=>{var h,m=(h=f.data)!==null&&h!==void 0?h:i;if(!(m==null||m.length===0)){var p=N0(f);m.forEach((v,b)=>{var S=c==null||o?b:String(Ft(v,c,null)),w=Ft(v,f.dataKey,0),k;u.has(S)?k=u.get(S):k={},Object.assign(k,{[p]:w}),u.set(S,k)})}}),Array.from(u.values())}function E0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Zh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Xh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function h7(e,t){if(e.length===t.length){for(var r=0;r{var t=ht(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},cl=e=>e.tooltip.settings.axisId;function A0(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function c(){return o.apply(this,arguments)}return c.toString=function(){return o.toString()},c})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var c=i[0],u=i[1];return c<=u?o>=c&&o<=u:o>=u&&o<=c},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,c)=>{var u=e(o);if(u!=null){if(e.bandwidth&&c!==null&&c!==void 0&&c.position){var f=e.bandwidth();switch(c.position){case"middle":u+=f/2;break;case"end":u+=f;break}}return u}}}}}var m7=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Un(t)){for(var r,n,i=0;in)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function ya(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function p7(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function C0(e){let t,r,n;e.length!==2?(t=ya,r=(u,f)=>ya(e(u),f),n=(u,f)=>e(u)-f):(t=e===ya||e===p7?e:g7,r=e,n=e);function i(u,f,h=0,m=u.length){if(h>>1;r(u[p],f)<0?h=p+1:m=p}while(h>>1;r(u[p],f)<=0?h=p+1:m=p}while(hh&&n(u[p-1],f)>-n(u[p],f)?p-1:p}return{left:i,center:c,right:o}}function g7(){return 0}function OC(e){return e===null?NaN:+e}function*v7(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const x7=C0(ya),uu=x7.right;C0(OC).center;class w2 extends Map{constructor(t,r=w7){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(k2(this,t))}has(t){return super.has(k2(this,t))}set(t,r){return super.set(y7(this,t),r)}delete(t){return super.delete(b7(this,t))}}function k2({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function y7({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function b7({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function w7(e){return e!==null&&typeof e=="object"?e.valueOf():e}function k7(e=ya){if(e===ya)return _C;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function _C(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const j7=Math.sqrt(50),S7=Math.sqrt(10),N7=Math.sqrt(2);function Uf(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),c=o>=j7?10:o>=S7?5:o>=N7?2:1;let u,f,h;return i<0?(h=Math.pow(10,-i)/c,u=Math.round(e*h),f=Math.round(t*h),u/ht&&--f,h=-h):(h=Math.pow(10,i)*c,u=Math.round(e/h),f=Math.round(t/h),u*ht&&--f),f0))return[];if(e===t)return[e];const n=t=i))return[];const u=o-i+1,f=new Array(u);if(n)if(c<0)for(let h=0;h=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}function S2(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function MC(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?_C:k7(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,m=Math.log(f),p=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*p*(f-p)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*p/f+v)),S=Math.min(n,Math.floor(t+(f-h)*p/f+v));MC(e,t,b,S,i)}const o=e[t];let c=r,u=n;for(dc(e,r,t),i(e[n],o)>0&&dc(e,r,n);c0;)--u}i(e[r],o)===0?dc(e,r,u):(++u,dc(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function dc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function E7(e,t,r){if(e=Float64Array.from(v7(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return S2(e);if(t>=1)return j2(e);var n,i=(n-1)*t,o=Math.floor(i),c=j2(MC(e,o).subarray(0,o+1)),u=S2(e.subarray(o+1));return c+(u-c)*(i-o)}}function A7(e,t,r=OC){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),c=+r(e[o],o,e),u=+r(e[o+1],o+1,e);return c+(u-c)*(i-o)}}function C7(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Vd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Vd(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=_7.exec(e))?new Pr(t[1],t[2],t[3],1):(t=M7.exec(e))?new Pr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=I7.exec(e))?Vd(t[1],t[2],t[3],t[4]):(t=T7.exec(e))?Vd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=D7.exec(e))?_2(t[1],t[2]/100,t[3]/100,1):(t=L7.exec(e))?_2(t[1],t[2]/100,t[3]/100,t[4]):N2.hasOwnProperty(e)?C2(N2[e]):e==="transparent"?new Pr(NaN,NaN,NaN,0):null}function C2(e){return new Pr(e>>16&255,e>>8&255,e&255,1)}function Vd(e,t,r,n){return n<=0&&(e=t=r=NaN),new Pr(e,t,r,n)}function z7(e){return e instanceof du||(e=Wc(e)),e?(e=e.rgb(),new Pr(e.r,e.g,e.b,e.opacity)):new Pr}function fx(e,t,r,n){return arguments.length===1?z7(e):new Pr(e,t,r,n??1)}function Pr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}_0(Pr,fx,TC(du,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new Pr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Bc:Math.pow(Bc,e),new Pr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Pr(vo(this.r),vo(this.g),vo(this.b),Hf(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:P2,formatHex:P2,formatHex8:F7,formatRgb:O2,toString:O2}));function P2(){return`#${Ja(this.r)}${Ja(this.g)}${Ja(this.b)}`}function F7(){return`#${Ja(this.r)}${Ja(this.g)}${Ja(this.b)}${Ja((isNaN(this.opacity)?1:this.opacity)*255)}`}function O2(){const e=Hf(this.opacity);return`${e===1?"rgb(":"rgba("}${vo(this.r)}, ${vo(this.g)}, ${vo(this.b)}${e===1?")":`, ${e})`}`}function Hf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ja(e){return e=vo(e),(e<16?"0":"")+e.toString(16)}function _2(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new wn(e,t,r,n)}function DC(e){if(e instanceof wn)return new wn(e.h,e.s,e.l,e.opacity);if(e instanceof du||(e=Wc(e)),!e)return new wn;if(e instanceof wn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),c=NaN,u=o-i,f=(o+i)/2;return u?(t===o?c=(r-n)/u+(r0&&f<1?0:c,new wn(c,u,f,e.opacity)}function B7(e,t,r,n){return arguments.length===1?DC(e):new wn(e,t,r,n??1)}function wn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}_0(wn,B7,TC(du,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new wn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Bc:Math.pow(Bc,e),new wn(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Pr(zg(e>=240?e-240:e+120,i,n),zg(e,i,n),zg(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new wn(M2(this.h),qd(this.s),qd(this.l),Hf(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(){const e=Hf(this.opacity);return`${e===1?"hsl(":"hsla("}${M2(this.h)}, ${qd(this.s)*100}%, ${qd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function M2(e){return e=(e||0)%360,e<0?e+360:e}function qd(e){return Math.max(0,Math.min(1,e||0))}function zg(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const M0=e=>()=>e;function U7(e,t){return function(r){return e+r*t}}function W7(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function H7(e){return(e=+e)==1?LC:function(t,r){return r-t?W7(t,r,e):M0(isNaN(t)?r:t)}}function LC(e,t){var r=t-e;return r?U7(e,r):M0(isNaN(e)?t:e)}const I2=(function e(t){var r=H7(t);function n(i,o){var c=r((i=fx(i)).r,(o=fx(o)).r),u=r(i.g,o.g),f=r(i.b,o.b),h=LC(i.opacity,o.opacity);return function(m){return i.r=c(m),i.g=u(m),i.b=f(m),i.opacity=h(m),i+""}}return n.gamma=e,n})(1);function K7(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;ir&&(o=t.slice(r,o),u[c]?u[c]+=o:u[++c]=o),(n=n[0])===(i=i[0])?u[c]?u[c]+=i:u[++c]=i:(u[++c]=null,f.push({i:c,x:Kf(n,i)})),r=Fg.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function rB(e,t,r){var n=e[0],i=e[1],o=t[0],c=t[1];return i2?nB:rB,f=h=null,p}function p(v){return v==null||isNaN(v=+v)?o:(f||(f=u(e.map(n),t,r)))(n(c(v)))}return p.invert=function(v){return c(i((h||(h=u(t,e.map(n),Kf)))(v)))},p.domain=function(v){return arguments.length?(e=Array.from(v,Gf),m()):e.slice()},p.range=function(v){return arguments.length?(t=Array.from(v),m()):t.slice()},p.rangeRound=function(v){return t=Array.from(v),r=I0,m()},p.clamp=function(v){return arguments.length?(c=v?!0:gr,m()):c!==gr},p.interpolate=function(v){return arguments.length?(r=v,m()):r},p.unknown=function(v){return arguments.length?(o=v,p):o},function(v,b){return n=v,i=b,m()}}function T0(){return Jh()(gr,gr)}function iB(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Vf(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Vs(e){return e=Vf(Math.abs(e)),e?e[1]:NaN}function aB(e,t){return function(r,n){for(var i=r.length,o=[],c=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>n&&(u=Math.max(1,n-f)),o.push(r.substring(i-=u,i+u)),!((f+=u+1)>n));)u=e[c=(c+1)%e.length];return o.reverse().join(t)}}function oB(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var sB=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hc(e){if(!(t=sB.exec(e)))throw new Error("invalid format: "+e);var t;return new D0({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]})}Hc.prototype=D0.prototype;function D0(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+""}D0.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 lB(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var qf;function cB(e,t){var r=Vf(e,t);if(!r)return qf=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(qf=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,c=n.length;return o===c?n:o>c?n+new Array(o-c+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Vf(e,Math.max(0,t+o-1))[0]}function D2(e,t){var r=Vf(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const L2={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:iB,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)=>D2(e*100,t),r:D2,s:cB,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function R2(e){return e}var $2=Array.prototype.map,z2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function uB(e){var t=e.grouping===void 0||e.thousands===void 0?R2:aB($2.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?R2:oB($2.call(e.numerals,String)),c=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(p,v){p=Hc(p);var b=p.fill,S=p.align,w=p.sign,k=p.symbol,N=p.zero,E=p.width,C=p.comma,A=p.precision,_=p.trim,O=p.type;O==="n"?(C=!0,O="g"):L2[O]||(A===void 0&&(A=12),_=!0,O="g"),(N||b==="0"&&S==="=")&&(N=!0,b="0",S="=");var T=(v&&v.prefix!==void 0?v.prefix:"")+(k==="$"?r:k==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),B=(k==="$"?n:/[%p]/.test(O)?c:"")+(v&&v.suffix!==void 0?v.suffix:""),z=L2[O],$=/[defgprs%]/.test(O);A=A===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function q(W){var ve=T,de=B,ge,le,ie;if(O==="c")de=z(W)+de,W="";else{W=+W;var X=W<0||1/W<0;if(W=isNaN(W)?f:z(Math.abs(W),A),_&&(W=lB(W)),X&&+W==0&&w!=="+"&&(X=!1),ve=(X?w==="("?w:u:w==="-"||w==="("?"":w)+ve,de=(O==="s"&&!isNaN(W)&&qf!==void 0?z2[8+qf/3]:"")+de+(X&&w==="("?")":""),$){for(ge=-1,le=W.length;++geie||ie>57){de=(ie===46?i+W.slice(ge+1):W.slice(ge))+de,W=W.slice(0,ge);break}}}C&&!N&&(W=t(W,1/0));var te=ve.length+W.length+de.length,re=te>1)+ve+W+de+re.slice(te);break;default:W=re+ve+W+de;break}return o(W)}return q.toString=function(){return p+""},q}function m(p,v){var b=Math.max(-8,Math.min(8,Math.floor(Vs(v)/3)))*3,S=Math.pow(10,-b),w=h((p=Hc(p),p.type="f",p),{suffix:z2[8+b/3]});return function(k){return w(S*k)}}return{format:h,formatPrefix:m}}var Qd,L0,RC;dB({thousands:",",grouping:[3],currency:["$",""]});function dB(e){return Qd=uB(e),L0=Qd.format,RC=Qd.formatPrefix,Qd}function fB(e){return Math.max(0,-Vs(Math.abs(e)))}function hB(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vs(t)/3)))*3-Vs(Math.abs(e)))}function mB(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vs(t)-Vs(e))+1}function $C(e,t,r,n){var i=ux(e,t,r),o;switch(n=Hc(n??",f"),n.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=hB(i,c))&&(n.precision=o),RC(n,c)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=mB(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=fB(i))&&(n.precision=o-(n.type==="%")*2);break}}return L0(n)}function Na(e){var t=e.domain;return e.ticks=function(r){var n=t();return lx(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return $C(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,c=n[i],u=n[o],f,h,m=10;for(u0;){if(h=cx(c,u,r),h===f)return n[i]=c,n[o]=u,t(n);if(h>0)c=Math.floor(c/h)*h,u=Math.ceil(u/h)*h;else if(h<0)c=Math.ceil(c*h)/h,u=Math.floor(u*h)/h;else break;f=h}return e},e}function zC(){var e=T0();return e.copy=function(){return fu(e,zC())},ln.apply(e,arguments),Na(e)}function FC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Gf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return FC(e).unknown(t)},e=arguments.length?Array.from(e,Gf):[0,1],Na(r)}function BC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],c;return oMath.pow(e,t)}function yB(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 U2(e){return(t,r)=>-e(-t,r)}function R0(e){const t=e(F2,B2),r=t.domain;let n=10,i,o;function c(){return i=yB(n),o=xB(n),r()[0]<0?(i=U2(i),o=U2(o),e(pB,gB)):e(F2,B2),t}return t.base=function(u){return arguments.length?(n=+u,c()):n},t.domain=function(u){return arguments.length?(r(u),c()):r()},t.ticks=u=>{const f=r();let h=f[0],m=f[f.length-1];const p=m0){for(;v<=b;++v)for(S=1;Sm)break;N.push(w)}}else for(;v<=b;++v)for(S=n-1;S>=1;--S)if(w=v>0?S/o(-v):S*o(v),!(wm)break;N.push(w)}N.length*2{if(u==null&&(u=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Hc(f)).precision==null&&(f.trim=!0),f=L0(f)),u===1/0)return f;const h=Math.max(1,n*u/t.ticks().length);return m=>{let p=m/o(Math.round(i(m)));return p*nr(BC(r(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function UC(){const e=R0(Jh()).domain([1,10]);return e.copy=()=>fu(e,UC()).base(e.base()),ln.apply(e,arguments),e}function W2(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function H2(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function $0(e){var t=1,r=e(W2(t),H2(t));return r.constant=function(n){return arguments.length?e(W2(t=+n),H2(t)):t},Na(r)}function WC(){var e=$0(Jh());return e.copy=function(){return fu(e,WC()).constant(e.constant())},ln.apply(e,arguments)}function K2(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function bB(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function wB(e){return e<0?-e*e:e*e}function z0(e){var t=e(gr,gr),r=1;function n(){return r===1?e(gr,gr):r===.5?e(bB,wB):e(K2(r),K2(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Na(t)}function F0(){var e=z0(Jh());return e.copy=function(){return fu(e,F0()).exponent(e.exponent())},ln.apply(e,arguments),e}function kB(){return F0.apply(null,arguments).exponent(.5)}function G2(e){return Math.sign(e)*e*e}function jB(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function HC(){var e=T0(),t=[0,1],r=!1,n;function i(o){var c=jB(e(o));return isNaN(c)?n:r?Math.round(c):c}return i.invert=function(o){return e.invert(G2(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Gf)).map(G2)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return HC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ln.apply(i,arguments),Na(i)}function KC(){var e=[],t=[],r=[],n;function i(){var c=0,u=Math.max(1,t.length);for(r=new Array(u-1);++c0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[h-1],n[h]]},c.unknown=function(f){return arguments.length&&(o=f),c},c.thresholds=function(){return n.slice()},c.copy=function(){return GC().domain([e,t]).range(i).unknown(o)},ln.apply(Na(c),arguments)}function VC(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[uu(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var c=t.indexOf(o);return[e[c-1],e[c]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return VC().domain(e).range(t).unknown(r)},ln.apply(i,arguments)}const Bg=new Date,Ug=new Date;function It(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const c=i(o),u=i.ceil(o);return o-c(t(o=new Date(+o),c==null?1:Math.floor(c)),o),i.range=(o,c,u)=>{const f=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o0))return f;let h;do f.push(h=new Date(+o)),t(o,u),e(o);while(hIt(c=>{if(c>=c)for(;e(c),!o(c);)c.setTime(c-1)},(c,u)=>{if(c>=c)if(u<0)for(;++u<=0;)for(;t(c,-1),!o(c););else for(;--u>=0;)for(;t(c,1),!o(c););}),r&&(i.count=(o,c)=>(Bg.setTime(+o),Ug.setTime(+c),e(Bg),e(Ug),Math.floor(r(Bg,Ug))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?c=>n(c)%o===0:c=>i.count(0,c)%o===0):i)),i}const Qf=It(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Qf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?It(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Qf);Qf.range;const mi=1e3,rn=mi*60,pi=rn*60,wi=pi*24,B0=wi*7,V2=wi*30,Wg=wi*365,eo=It(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*mi)},(e,t)=>(t-e)/mi,e=>e.getUTCSeconds());eo.range;const U0=It(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mi)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getMinutes());U0.range;const W0=It(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getUTCMinutes());W0.range;const H0=It(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mi-e.getMinutes()*rn)},(e,t)=>{e.setTime(+e+t*pi)},(e,t)=>(t-e)/pi,e=>e.getHours());H0.range;const K0=It(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*pi)},(e,t)=>(t-e)/pi,e=>e.getUTCHours());K0.range;const hu=It(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rn)/wi,e=>e.getDate()-1);hu.range;const em=It(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/wi,e=>e.getUTCDate()-1);em.range;const qC=It(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/wi,e=>Math.floor(e/wi));qC.range;function Oo(e){return It(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*rn)/B0)}const tm=Oo(0),Yf=Oo(1),SB=Oo(2),NB=Oo(3),qs=Oo(4),EB=Oo(5),AB=Oo(6);tm.range;Yf.range;SB.range;NB.range;qs.range;EB.range;AB.range;function _o(e){return It(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/B0)}const rm=_o(0),Zf=_o(1),CB=_o(2),PB=_o(3),Qs=_o(4),OB=_o(5),_B=_o(6);rm.range;Zf.range;CB.range;PB.range;Qs.range;OB.range;_B.range;const G0=It(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());G0.range;const V0=It(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());V0.range;const ki=It(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());ki.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:It(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ki.range;const ji=It(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());ji.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:It(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ji.range;function QC(e,t,r,n,i,o){const c=[[eo,1,mi],[eo,5,5*mi],[eo,15,15*mi],[eo,30,30*mi],[o,1,rn],[o,5,5*rn],[o,15,15*rn],[o,30,30*rn],[i,1,pi],[i,3,3*pi],[i,6,6*pi],[i,12,12*pi],[n,1,wi],[n,2,2*wi],[r,1,B0],[t,1,V2],[t,3,3*V2],[e,1,Wg]];function u(h,m,p){const v=mk).right(c,v);if(b===c.length)return e.every(ux(h/Wg,m/Wg,p));if(b===0)return Qf.every(Math.max(ux(h,m,p),1));const[S,w]=c[v/c[b-1][2]53)return null;"w"in oe||(oe.w=1),"Z"in oe?(Ue=Kg(fc(oe.y,0,1)),_e=Ue.getUTCDay(),Ue=_e>4||_e===0?Zf.ceil(Ue):Zf(Ue),Ue=em.offset(Ue,(oe.V-1)*7),oe.y=Ue.getUTCFullYear(),oe.m=Ue.getUTCMonth(),oe.d=Ue.getUTCDate()+(oe.w+6)%7):(Ue=Hg(fc(oe.y,0,1)),_e=Ue.getDay(),Ue=_e>4||_e===0?Yf.ceil(Ue):Yf(Ue),Ue=hu.offset(Ue,(oe.V-1)*7),oe.y=Ue.getFullYear(),oe.m=Ue.getMonth(),oe.d=Ue.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),_e="Z"in oe?Kg(fc(oe.y,0,1)).getUTCDay():Hg(fc(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(_e+5)%7:oe.w+oe.U*7-(_e+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,Kg(oe)):Hg(oe)}}function B(U,ue,be,oe){for(var Le=0,Ue=ue.length,_e=be.length,mt,tr;Le=_e)return-1;if(mt=ue.charCodeAt(Le++),mt===37){if(mt=ue.charAt(Le++),tr=_[mt in q2?ue.charAt(Le++):mt],!tr||(oe=tr(U,be,oe))<0)return-1}else if(mt!=be.charCodeAt(oe++))return-1}return oe}function z(U,ue,be){var oe=h.exec(ue.slice(be));return oe?(U.p=m.get(oe[0].toLowerCase()),be+oe[0].length):-1}function $(U,ue,be){var oe=b.exec(ue.slice(be));return oe?(U.w=S.get(oe[0].toLowerCase()),be+oe[0].length):-1}function q(U,ue,be){var oe=p.exec(ue.slice(be));return oe?(U.w=v.get(oe[0].toLowerCase()),be+oe[0].length):-1}function W(U,ue,be){var oe=N.exec(ue.slice(be));return oe?(U.m=E.get(oe[0].toLowerCase()),be+oe[0].length):-1}function ve(U,ue,be){var oe=w.exec(ue.slice(be));return oe?(U.m=k.get(oe[0].toLowerCase()),be+oe[0].length):-1}function de(U,ue,be){return B(U,t,ue,be)}function ge(U,ue,be){return B(U,r,ue,be)}function le(U,ue,be){return B(U,n,ue,be)}function ie(U){return c[U.getDay()]}function X(U){return o[U.getDay()]}function te(U){return f[U.getMonth()]}function re(U){return u[U.getMonth()]}function D(U){return i[+(U.getHours()>=12)]}function M(U){return 1+~~(U.getMonth()/3)}function Q(U){return c[U.getUTCDay()]}function ne(U){return o[U.getUTCDay()]}function ae(U){return f[U.getUTCMonth()]}function ee(U){return u[U.getUTCMonth()]}function se(U){return i[+(U.getUTCHours()>=12)]}function me(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var ue=O(U+="",C);return ue.toString=function(){return U},ue},parse:function(U){var ue=T(U+="",!1);return ue.toString=function(){return U},ue},utcFormat:function(U){var ue=O(U+="",A);return ue.toString=function(){return U},ue},utcParse:function(U){var ue=T(U+="",!0);return ue.toString=function(){return U},ue}}}var q2={"-":"",_:" ",0:"0"},Ht=/^\s*\d+/,RB=/^%/,$B=/[\\^$*+?|[\]().{}]/g;function Ye(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function FB(e,t,r){var n=Ht.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function BB(e,t,r){var n=Ht.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function UB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function WB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function HB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Q2(e,t,r){var n=Ht.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Y2(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function KB(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function GB(e,t,r){var n=Ht.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function VB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Z2(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function qB(e,t,r){var n=Ht.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function X2(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function QB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function YB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function ZB(e,t,r){var n=Ht.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function XB(e,t,r){var n=Ht.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function JB(e,t,r){var n=RB.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function eU(e,t,r){var n=Ht.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function tU(e,t,r){var n=Ht.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function J2(e,t){return Ye(e.getDate(),t,2)}function rU(e,t){return Ye(e.getHours(),t,2)}function nU(e,t){return Ye(e.getHours()%12||12,t,2)}function iU(e,t){return Ye(1+hu.count(ki(e),e),t,3)}function YC(e,t){return Ye(e.getMilliseconds(),t,3)}function aU(e,t){return YC(e,t)+"000"}function oU(e,t){return Ye(e.getMonth()+1,t,2)}function sU(e,t){return Ye(e.getMinutes(),t,2)}function lU(e,t){return Ye(e.getSeconds(),t,2)}function cU(e){var t=e.getDay();return t===0?7:t}function uU(e,t){return Ye(tm.count(ki(e)-1,e),t,2)}function ZC(e){var t=e.getDay();return t>=4||t===0?qs(e):qs.ceil(e)}function dU(e,t){return e=ZC(e),Ye(qs.count(ki(e),e)+(ki(e).getDay()===4),t,2)}function fU(e){return e.getDay()}function hU(e,t){return Ye(Yf.count(ki(e)-1,e),t,2)}function mU(e,t){return Ye(e.getFullYear()%100,t,2)}function pU(e,t){return e=ZC(e),Ye(e.getFullYear()%100,t,2)}function gU(e,t){return Ye(e.getFullYear()%1e4,t,4)}function vU(e,t){var r=e.getDay();return e=r>=4||r===0?qs(e):qs.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function xU(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function eS(e,t){return Ye(e.getUTCDate(),t,2)}function yU(e,t){return Ye(e.getUTCHours(),t,2)}function bU(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function wU(e,t){return Ye(1+em.count(ji(e),e),t,3)}function XC(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function kU(e,t){return XC(e,t)+"000"}function jU(e,t){return Ye(e.getUTCMonth()+1,t,2)}function SU(e,t){return Ye(e.getUTCMinutes(),t,2)}function NU(e,t){return Ye(e.getUTCSeconds(),t,2)}function EU(e){var t=e.getUTCDay();return t===0?7:t}function AU(e,t){return Ye(rm.count(ji(e)-1,e),t,2)}function JC(e){var t=e.getUTCDay();return t>=4||t===0?Qs(e):Qs.ceil(e)}function CU(e,t){return e=JC(e),Ye(Qs.count(ji(e),e)+(ji(e).getUTCDay()===4),t,2)}function PU(e){return e.getUTCDay()}function OU(e,t){return Ye(Zf.count(ji(e)-1,e),t,2)}function _U(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function MU(e,t){return e=JC(e),Ye(e.getUTCFullYear()%100,t,2)}function IU(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function TU(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Qs(e):Qs.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function DU(){return"+0000"}function tS(){return"%"}function rS(e){return+e}function nS(e){return Math.floor(+e/1e3)}var us,eP,tP;LU({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 LU(e){return us=LB(e),eP=us.format,us.parse,tP=us.utcFormat,us.utcParse,us}function RU(e){return new Date(e)}function $U(e){return e instanceof Date?+e:+new Date(+e)}function q0(e,t,r,n,i,o,c,u,f,h){var m=T0(),p=m.invert,v=m.domain,b=h(".%L"),S=h(":%S"),w=h("%I:%M"),k=h("%I %p"),N=h("%a %d"),E=h("%b %d"),C=h("%B"),A=h("%Y");function _(O){return(f(O)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>E7(e,o/n))},r.copy=function(){return aP(t).domain(e)},Ai.apply(r,arguments)}function im(){var e=0,t=.5,r=1,n=1,i,o,c,u,f,h=gr,m,p=!1,v;function b(w){return isNaN(w=+w)?v:(w=.5+((w=+m(w))-o)*(n*w{if(e!=null){var n=e.scale,i=e.type;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return KU(n)?n:"point"}};function GU(e,t){for(var r=0,n=e.length,i=e[0]t)?r=o+1:n=o}return r}function dP(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var c;return(c=e(o))!==null&&c!==void 0?c:0}),i=e.range();if(!(r.length===0||i.length<2))return o=>{var c,u,f=GU(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(c=n[f-1])!==null&&c!==void 0?c:0,m=(u=n[f])!==null&&u!==void 0?u:0;return Math.abs(o-h)<=Math.abs(o-m)?r[f-1]:r[f]}}}function VU(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):dP(e,void 0)}function aS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],Ci=(e,t)=>{var r=hP(e,t);return r??Ot},_t={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:px,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:au},mP=(e,t)=>e.cartesianAxis.yAxis[t],Pi=(e,t)=>{var r=mP(e,t);return r??_t},tW={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:""},X0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??tW},yr=(e,t,r)=>{switch(t){case"xAxis":return Ci(e,r);case"yAxis":return Pi(e,r);case"zAxis":return X0(e,r);case"angleAxis":return k0(e,r);case"radiusAxis":return j0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},rW=(e,t,r)=>{switch(t){case"xAxis":return Ci(e,r);case"yAxis":return Pi(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},mu=(e,t,r)=>{switch(t){case"xAxis":return Ci(e,r);case"yAxis":return Pi(e,r);case"angleAxis":return k0(e,r);case"radiusAxis":return j0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},pP=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function gP(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var vP=e=>e.graphicalItems.cartesianItems,nW=Y([Ut,Yh],gP),xP=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),dl=Y([vP,yr,nW],xP,{memoizeOptions:{resultEqualityCheck:Xh}}),yP=Y([dl],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(E0)),bP=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),iW=Y([dl],bP),wP=e=>e.map(t=>t.data).filter(Boolean).flat(1),aW=Y([dl],e=>e.some(t=>!t.data)),kP=Y([dl],wP,{memoizeOptions:{resultEqualityCheck:Xh}}),jP=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,i=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(i,o+1)},J0=Y([kP,Kh],jP),oW=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Ft(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Ft(i,n)}))):e.map(n=>({value:n})),SP=(e,t,r,n,i,o)=>{var c=n.chartData,u=c===void 0?[]:c,f=n.dataStartIndex,h=n.dataEndIndex,m=oW(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var p=u.slice(f,h+1),v=p.map(b=>({value:Ft(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...m]}return m},pu=Y([J0,yr,dl,Kh,aW,kP],SP);function Es(e){if(Vn(e)||e instanceof Date){var t=Number(e);if(Ke(t))return t}}function sS(e){if(Array.isArray(e)){var t=[Es(e[0]),Es(e[1])];return Un(t)?t:void 0}var r=Es(e);if(r!=null)return[r,r]}function Yn(e){return e.map(Es).filter(Cr)}function sW(e,t){var r=Es(e),n=Es(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var lW=Y([pu],e=>e==null?void 0:e.map(t=>t.value).sort(sW));function NP(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function cW(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Gn(t))n=t;else if(Array.isArray(t)){var i=Yn(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:Yn(r.flatMap(o=>{var c=Ft(e,o.dataKey),u,f;if(Array.isArray(c)){var h=fP(c,2);u=h[0],f=h[1]}else u=f=c;if(!(!Ke(u)||!Ke(f)))return[n-u,n+f]}))}var Tt=e=>{var t=Wt(e),r=cl(e);return mu(e,t,r)},Ys=Y([Tt],e=>e==null?void 0:e.dataKey),uW=Y([yP,Kh,Tt],PC),EP=(e,t,r,n)=>{var i={},o=t.reduce((c,u)=>{if(u.stackId==null)return c;var f=c[u.stackId];return f==null&&(f=[]),f.push(u),c[u.stackId]=f,c},i);return Object.fromEntries(Object.entries(o).map(c=>{var u=fP(c,2),f=u[0],h=u[1],m=n?[...h].reverse():h,p=m.map(N0);return[f,{stackedData:Cz(e,p,r),graphicalItems:m}]}))},AP=Y([uW,yP,Gh,kC],EP),CP=(e,t,r,n)=>{var i=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return Mz(e,i,o)},dW=Y([yr],e=>e.allowDataOverflow),ey=e=>{var t;if(e==null||!("domain"in e))return px;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Yn(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:px},PP=Y([yr],ey),OP=Y([PP,dW],dC),fW=Y([AP,En,Ut,OP],CP,{memoizeOptions:{resultEqualityCheck:Zh}}),ty=e=>e.errorBars,hW=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>NP(r,n)),Jf=function(){for(var t=arguments.length,r=new Array(t),n=0;n5&&arguments[5]!==void 0?arguments[5]:[],u,f;if(n.length>0&&n.forEach(h=>{var m,p=h.data!=null?[...h.data]:c,v=(m=i[h.id])===null||m===void 0?void 0:m.filter(b=>NP(o,b));p.forEach(b=>{var S,w=Ft(b,(S=r.dataKey)!==null&&S!==void 0?S:h.dataKey),k=cW(b,w,v);if(k.length>=2){var N=Math.min(...k),E=Math.max(...k);(u==null||Nf)&&(f=E)}var C=sS(w);C!=null&&(u=u==null?C[0]:Math.min(u,C[0]),f=f==null?C[1]:Math.max(f,C[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var m=sS(Ft(h,r.dataKey));m!=null&&(u=u==null?m[0]:Math.min(u,m[0]),f=f==null?m[1]:Math.max(f,m[1]))}),Ke(u)&&Ke(f))return[u,f]},mW=Y([J0,yr,iW,ty,Ut,H9],_P,{memoizeOptions:{resultEqualityCheck:Zh}});function pW(e){var t=e.value;if(Vn(t)||t instanceof Date)return t}var gW=(e,t,r)=>{var n=e.map(pW).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&UE(n))?uC(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},MP=e=>e.referenceElements.dots,fl=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),vW=Y([MP,Ut,Yh],fl),IP=e=>e.referenceElements.areas,xW=Y([IP,Ut,Yh],fl),TP=e=>e.referenceElements.lines,yW=Y([TP,Ut,Yh],fl),DP=(e,t)=>{if(e!=null){var r=Yn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},bW=Y(vW,Ut,DP),LP=(e,t)=>{if(e!=null){var r=Yn(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},wW=Y([xW,Ut],LP);function kW(e){var t;if(e.x!=null)return Yn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Yn(r)}function jW(e){var t;if(e.y!=null)return Yn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Yn(r)}var RP=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?kW(n):jW(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},SW=Y([yW,Ut],RP),NW=Y(bW,SW,wW,(e,t,r)=>Jf(e,r,t)),$P=(e,t,r,n,i,o,c,u)=>{if(r!=null)return r;var f=c==="vertical"&&u==="xAxis"||c==="horizontal"&&u==="yAxis",h=f?Jf(n,o,i):Jf(o,i);return Y9(t,h,e.allowDataOverflow)},EW=Y([yr,PP,OP,fW,mW,NW,ht,Ut],$P,{memoizeOptions:{resultEqualityCheck:Zh}}),AW=[0,1],zP=(e,t,r,n,i,o,c)=>{if(!((e==null||r==null||r.length===0)&&c===void 0)){var u=e.dataKey,f=e.type,h=Zn(t,o);if(h&&u==null){var m;return uC(0,(m=r==null?void 0:r.length)!==null&&m!==void 0?m:0)}return f==="category"?gW(n,e,h):i==="expand"&&!h?AW:c}},ry=Y([yr,ht,J0,pu,Gh,Ut,EW],zP),hl=Y([yr,pP,y0],uP),FP=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var i=ey(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Un(e)){if(o)return g2(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return v2(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Un(e))return g2(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Un(e))return v2(e,t.tickCount,t.allowDecimals,"adaptive")}}},ny=Y([ry,mu,hl],FP),BP=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Un(t)&&Array.isArray(r)&&r.length>0){var i,o,c=t[0],u=(i=r[0])!==null&&i!==void 0?i:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(c,u),Math.max(f,h)]}return t},CW=Y([yr,ry,ny,Ut],BP),PW=Y(pu,yr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Yn(e.map(p=>p.value))).sort((p,v)=>p-v),i=n[0],o=n[n.length-1];if(i==null||o==null)return 1/0;var c=o-i;if(c===0)return 1/0;for(var u=0;ui,(e,t,r,n,i)=>{if(!Ke(e))return 0;var o=t==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var c=ja(r,e*o),u=e*o/2;return u-c-(u-c)/o*c}return 0}),OW=(e,t,r)=>{var n=Ci(e,t);return n==null||typeof n.padding!="string"?0:UP(e,"xAxis",t,r,n.padding)},_W=(e,t,r)=>{var n=Pi(e,t);return n==null||typeof n.padding!="string"?0:UP(e,"yAxis",t,r,n.padding)},MW=Y(Ci,OW,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var i=e.padding;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),IW=Y(Pi,_W,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var i=e.padding;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),WP=Y([er,MW,zh,$h,(e,t,r)=>r],(e,t,r,n,i)=>{var o=n.padding;return i?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),HP=Y([er,ht,IW,zh,$h,(e,t,r)=>r],(e,t,r,n,i,o)=>{var c=i.padding;return o?[n.height-c.bottom,c.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),gu=(e,t,r,n)=>{var i;switch(t){case"xAxis":return WP(e,r,n);case"yAxis":return HP(e,r,n);case"zAxis":return(i=X0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return EC(e);case"radiusAxis":return AC(e,r);default:return}},KP=Y([yr,gu],Vh),TW=Y([hl,CW],m7),iy=Y([yr,hl,TW,KP],Z0),GP=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var i=r.type,o=r.scale,c=Zn(e,n);if(c&&(i==="number"||o!=="auto"))return t.map(u=>u.value)}},ay=Y([ht,pu,mu,Ut],GP),am=Y([iy],A0);Y([iy],VU);Y([iy,lW],dP);Y([dl,ty,Ut],hW);function VP(e,t){return e.idt.id?1:0}var om=(e,t)=>t,sm=(e,t,r)=>r,DW=Y(Lh,om,sm,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(VP)),LW=Y(Rh,om,sm,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(VP)),qP=(e,t)=>({width:e.width,height:t.height}),RW=(e,t)=>{var r=typeof t.width=="number"?t.width:au;return{width:r,height:e.height}},$W=Y(er,Ci,qP),zW=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},FW=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},BW=Y(Ei,er,DW,om,sm,(e,t,r,n,i)=>{var o={},c;return r.forEach(u=>{var f=qP(t,u);c==null&&(c=zW(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;o[u.id]=c-Number(h)*f.height,c+=(h?-1:1)*f.height}),o}),UW=Y(Ni,er,LW,om,sm,(e,t,r,n,i)=>{var o={},c;return r.forEach(u=>{var f=RW(t,u);c==null&&(c=FW(t,n,e));var h=n==="left"&&!i||n==="right"&&i;o[u.id]=c-Number(h)*f.width,c+=(h?-1:1)*f.width}),o}),WW=(e,t)=>{var r=Ci(e,t);if(r!=null)return BW(e,r.orientation,r.mirror)},HW=Y([er,Ci,WW,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),KW=(e,t)=>{var r=Pi(e,t);if(r!=null)return UW(e,r.orientation,r.mirror)},GW=Y([er,Pi,KW,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),VW=Y(er,Pi,(e,t)=>{var r=typeof t.width=="number"?t.width:au;return{width:r,height:e.height}}),QP=(e,t,r,n)=>{if(r!=null){var i=r.allowDuplicatedCategory,o=r.type,c=r.dataKey,u=Zn(e,n),f=t.map(m=>m.value),h=f.filter(m=>m!=null);if(c&&u&&o==="category"&&i&&UE(h))return f}},oy=Y([ht,pu,yr,Ut],QP),lS=Y([ht,rW,hl,am,oy,ay,gu,ny,Ut],(e,t,r,n,i,o,c,u,f)=>{if(t!=null){var h=Zn(e,f);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:f,categoricalDomain:o,duplicateDomain:i,isCategorical:h,niceTicks:u,range:c,realScaleType:r,scale:n}}}),qW=(e,t,r,n,i,o,c,u,f)=>{if(!(t==null||n==null)){var h=Zn(e,f),m=t.type,p=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,S=m==="category"&&n.bandwidth?n.bandwidth()/b:0;S=f==="angleAxis"&&o!=null&&o.length>=2?en(o[0]-o[1])*2*S:S;var w=p||i;return w?w.map((k,N)=>{var E=c?c.indexOf(k):k,C=n.map(E);return Ke(C)?{index:N,coordinate:C+S,value:k,offset:S}:null}).filter(Cr):h&&u?u.map((k,N)=>{var E=n.map(k);return Ke(E)?{coordinate:E+S,value:k,index:N,offset:S}:null}).filter(Cr):n.ticks?n.ticks(v).map((k,N)=>{var E=n.map(k);return Ke(E)?{coordinate:E+S,value:k,index:N,offset:S}:null}).filter(Cr):n.domain().map((k,N)=>{var E=n.map(k);return Ke(E)?{coordinate:E+S,value:c?c[k]:k,index:N,offset:S}:null}).filter(Cr)}},YP=Y([ht,mu,hl,am,ny,gu,oy,ay,Ut],qW),QW=(e,t,r,n,i,o,c)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var u=Zn(e,c),f=t.tickCount,h=0;return h=c==="angleAxis"&&(n==null?void 0:n.length)>=2?en(n[0]-n[1])*2*h:h,u&&o?o.map((m,p)=>{var v=r.map(m);return Ke(v)?{coordinate:v+h,value:m,index:p,offset:h}:null}).filter(Cr):r.ticks?r.ticks(f).map((m,p)=>{var v=r.map(m);return Ke(v)?{coordinate:v+h,value:m,index:p,offset:h}:null}).filter(Cr):r.domain().map((m,p)=>{var v=r.map(m);return Ke(v)?{coordinate:v+h,value:i?i[m]:m,index:p,offset:h}:null}).filter(Cr)}},ZP=Y([ht,mu,am,gu,oy,ay,Ut],QW),XP=Y(yr,am,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})}),YW=Y([yr,hl,ry,KP],Z0),ZW=Y([YW],A0);Y((e,t,r)=>X0(e,r),ZW,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})});var XW=Y([ht,Lh,Rh],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),JW=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};Y([JW],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var c=Math.abs(o.coordinate-t);ce.options.defaultTooltipEventType,e3=e=>e.options.validateTooltipEventTypes;function t3(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function vu(e,t){var r=JP(e),n=e3(e);return t3(t,r,n)}function eH(e){return Me(t=>vu(t,e))}var r3=(e,t)=>{var r,n=Number(t);if(!(Gn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},tH=e=>e.tooltip.settings,aa={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},rH={itemInteraction:{click:aa,hover:aa},axisInteraction:{click:aa,hover:aa},keyboardInteraction:aa,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}},n3=ur({name:"tooltip",initialState:rH,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:lt()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:lt()},removeTooltipEntrySettings:{reducer(e,t){var r=tn(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:lt()},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}}}),cn=n3.actions,nH=cn.addTooltipEntrySettings,iH=cn.replaceTooltipEntrySettings,aH=cn.removeTooltipEntrySettings,oH=cn.setTooltipSettingsState,sH=cn.setActiveMouseOverItemIndex;cn.mouseLeaveItem;var i3=cn.mouseLeaveChart;cn.setActiveClickItemIndex;var a3=cn.setMouseOverAxisIndex,lH=cn.setMouseClickAxisIndex,yc=cn.setSyncInteraction,eh=cn.setKeyboardInteraction,cH=n3.reducer;function cS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yd(e){for(var t=1;t{if(t==null)return aa;var i=hH(e,t,r);if(i==null)return aa;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(mH(i)){if(o)return Yd(Yd({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Yd(Yd({},aa),{},{coordinate:i.coordinate})};function pH(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 r=Number(e);return Number.isFinite(r)?r:void 0}function gH(e,t){var r=pH(e),n=t[0],i=t[1];if(r===void 0)return!1;var o=Math.min(n,i),c=Math.max(n,i);return r>=o&&r<=c}function vH(e,t,r){if(r==null||t==null)return!0;var n=Ft(e,t);return n==null||!Un(r)?!0:gH(n,r)}var kc=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!Ke(o))return i;var c=0,u=1/0;t.length>0&&(u=t.length-1);var f=Math.max(c,Math.min(o,u)),h=t[f];return h==null||vH(h,r,n)?String(f):null},s3=(e,t,r,n,i,o,c)=>{if(o!=null){var u=c[0],f=u==null?void 0:u.getPosition(o);if(f!=null)return f;var h=i==null?void 0:i[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},l3=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(c=>{var u;return((u=c.settings)===null||u===void 0?void 0:u.graphicalItemId)===i})},c3=e=>e.options.tooltipPayloadSearcher,ml=e=>e.tooltip;function uS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dS(e){for(var t=1;te(t)}function fS(e){if(typeof e=="string")return e}function SH(e){if(!(e==null||typeof e!="object")){var t="name"in e?wH(e.name):void 0,r="unit"in e?kH(e.unit):void 0,n="dataKey"in e?jH(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?fS(e.color):void 0,c="fill"in e?fS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:c}}}function NH(e,t){return e??t}var u3=(e,t,r,n,i,o,c)=>{if(!(t==null||o==null)){var u=r.chartData,f=r.computedData,h=r.dataStartIndex,m=r.dataEndIndex,p=[];return e.reduce((v,b)=>{var S,w=b.dataDefinedOnItem,k=b.settings,N=NH(w,u),E=Array.isArray(N)?DA(N,h,m):N,C=(S=k==null?void 0:k.dataKey)!==null&&S!==void 0?S:n,A=k==null?void 0:k.nameKey,_;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&c==="axis"?_=WE(E,n,i):_=o(E,t,f,A),Array.isArray(_))_.forEach(T=>{var B,z,$=SH(T),q=$==null?void 0:$.name,W=$==null?void 0:$.dataKey,ve=$==null?void 0:$.payload,de=dS(dS({},k),{},{name:q,unit:$==null?void 0:$.unit,color:(B=$==null?void 0:$.color)!==null&&B!==void 0?B:k==null?void 0:k.color,fill:(z=$==null?void 0:$.fill)!==null&&z!==void 0?z:k==null?void 0:k.fill});v.push(oj({tooltipEntrySettings:de,dataKey:W,payload:ve,value:Ft(ve,W),name:q==null?void 0:String(q)}))});else{var O;v.push(oj({tooltipEntrySettings:k,dataKey:C,payload:_,value:Ft(_,C),name:(O=Ft(_,A))!==null&&O!==void 0?O:k==null?void 0:k.name}))}return v},p)}},sy=Y([Tt,pP,y0],uP),EH=Y([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),AH=Y([Wt,cl],gP),Mo=Y([EH,Tt,AH],xP,{memoizeOptions:{resultEqualityCheck:Xh}}),CH=Y([Mo],e=>e.filter(E0)),d3=Y([Mo],wP,{memoizeOptions:{resultEqualityCheck:Xh}}),PH=Y([Mo],e=>e.some(t=>!t.data)),No=Y([d3,En],jP),OH=Y([CH,En,Tt],PC),ly=Y([No,Tt,Mo,En,PH,d3],SP),f3=Y([Tt],ey),_H=Y([Tt],e=>e.allowDataOverflow),h3=Y([f3,_H],dC),MH=Y([Mo],e=>e.filter(E0)),IH=Y([OH,MH,Gh,kC],EP),TH=Y([IH,En,Wt,h3],CP),DH=Y([Mo],bP),LH=Y([No,Tt,DH,ty,Wt,K9],_P,{memoizeOptions:{resultEqualityCheck:Zh}}),RH=Y([MP,Wt,cl],fl),$H=Y([RH,Wt],DP),zH=Y([IP,Wt,cl],fl),FH=Y([zH,Wt],LP),BH=Y([TP,Wt,cl],fl),UH=Y([BH,Wt],RP),WH=Y([$H,UH,FH],Jf),HH=Y([Tt,f3,h3,TH,LH,WH,ht,Wt],$P),Zs=Y([Tt,ht,No,ly,Gh,Wt,HH],zP),KH=Y([Zs,Tt,sy],FP),GH=Y([Tt,Zs,KH,Wt],BP),m3=e=>{var t=Wt(e),r=cl(e),n=!1;return gu(e,t,r,n)},p3=Y([Tt,m3],Vh),VH=Y([Tt,sy,GH,p3],Z0),g3=Y([VH],A0),qH=Y([ht,ly,Tt,Wt],QP),QH=Y([ht,ly,Tt,Wt],GP),YH=(e,t,r,n,i,o,c,u)=>{if(t){var f=t.type,h=Zn(e,u);if(n){var m=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,p=f==="category"&&n.bandwidth?n.bandwidth()/m:0;return p=u==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?en(i[0]-i[1])*2*p:p,h&&c?c.map((v,b)=>{var S=n.map(v);return Ke(S)?{coordinate:S+p,value:v,index:b,offset:p}:null}).filter(Cr):n.domain().map((v,b)=>{var S=n.map(v);return Ke(S)?{coordinate:S+p,value:o?o[v]:v,index:b,offset:p}:null}).filter(Cr)}}},Oi=Y([ht,Tt,sy,g3,m3,qH,QH,Wt],YH),cy=Y([JP,e3,tH],(e,t,r)=>t3(r.shared,e,t)),v3=e=>e.tooltip.settings.trigger,uy=e=>e.tooltip.settings.defaultIndex,xu=Y([ml,cy,v3,uy],o3),Kc=Y([xu,No,Ys,Zs],kc),x3=Y([Oi,Kc],r3),ZH=Y([xu],e=>{if(e)return e.dataKey}),XH=Y([xu],e=>{if(e)return e.graphicalItemId}),y3=Y([ml,cy,v3,uy],l3),JH=Y([Ni,Ei,ht,er,Oi,uy,y3],s3),eK=Y([xu,JH],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),tK=Y([xu],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),rK=Y([y3,Kc,En,Ys,x3,c3,cy],u3),nK=Y([rK],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function hS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mS(e){for(var t=1;tMe(Tt),lK=()=>{var e=sK(),t=Me(Oi),r=Me(g3);return Of(!e||!r?void 0:mS(mS({},e),{},{scale:r}),t)};function pS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ds(e){for(var t=1;t{var i=t.find(o=>o&&o.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},hK=(e,t,r,n)=>{var i=t.find(h=>h&&h.index===r);if(i){if(e==="centric"){var o=i.coordinate,c=n.radius;return ds(ds(ds({},n),Zt(n.cx,n.cy,c,o)),{},{angle:o,radius:c})}var u=i.coordinate,f=n.angle;return ds(ds(ds({},n),Zt(n.cx,n.cy,u,f)),{},{angle:f,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function mK(e,t){var r=e.relativeX,n=e.relativeY;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var b3=(e,t,r,n,i)=>{var o,c=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(c<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var u=0;u0?(f=r[u-1])===null||f===void 0?void 0:f.coordinate:(h=r[c-1])===null||h===void 0?void 0:h.coordinate,S=(m=r[u])===null||m===void 0?void 0:m.coordinate,w=u>=c-1?(p=r[0])===null||p===void 0?void 0:p.coordinate:(v=r[u+1])===null||v===void 0?void 0:v.coordinate,k=void 0;if(!(b==null||S==null||w==null))if(en(S-b)!==en(w-S)){var N=[];if(en(w-S)===en(i[1]-i[0])){k=w;var E=S+i[1]-i[0];N[0]=Math.min(E,(E+b)/2),N[1]=Math.max(E,(E+b)/2)}else{k=b;var C=w+i[1]-i[0];N[0]=Math.min(S,(C+S)/2),N[1]=Math.max(S,(C+S)/2)}var A=[Math.min(S,(k+S)/2),Math.max(S,(k+S)/2)];if(e>A[0]&&e<=A[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[u])===null||_===void 0?void 0:_.index}}else{var O=Math.min(b,w),T=Math.max(b,w);if(e>(O+S)/2&&e<=(T+S)/2){var B;return(B=r[u])===null||B===void 0?void 0:B.index}}}else if(t)for(var z=0;z($.coordinate+W.coordinate)/2||z>0&&z($.coordinate+W.coordinate)/2&&e<=($.coordinate+q.coordinate)/2)return $.index}}return-1},w3=()=>Me(y0),dy=(e,t)=>t,k3=(e,t,r)=>r,fy=(e,t,r,n)=>n,pK=Y(Oi,e=>Nh(e,t=>t.coordinate)),hy=Y([ml,dy,k3,fy],o3),my=Y([hy,No,Ys,Zs],kc),gK=(e,t,r)=>{if(t!=null){var n=ml(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},j3=Y([ml,dy,k3,fy],l3),th=Y([Ni,Ei,ht,er,Oi,fy,j3],s3),vK=Y([hy,th],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),S3=Y([Oi,my],r3),xK=Y([j3,my,En,Ys,S3,c3,dy],u3),yK=Y([hy,my],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),bK=(e,t,r,n,i,o,c)=>{if(!(!e||!r||!n||!i)&&mK(e,c)){var u=Iz(e,t),f=b3(u,o,i,r,n),h=fK(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},wK=(e,t,r,n,i,o,c)=>{if(!(!e||!n||!i||!o||!r)){var u=L9(e,r);if(u){var f=Tz(u,t),h=b3(f,c,o,n,i),m=hK(t,o,h,u);return{activeIndex:String(h),activeCoordinate:m}}}},kK=(e,t,r,n,i,o,c,u)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?bK(e,t,n,i,o,c,u):wK(e,t,r,n,i,o,c)},jK=Y(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),SK=Y(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(pr)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:h7}});function gS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vS(e){for(var t=1;tvS(vS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),CK)},OK=new Set(Object.values(pr));function _K(e){return OK.has(e)}var N3=ur({name:"zIndex",initialState:PK,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:lt()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!_K(r)&&delete e.zIndexMap[r])},prepare:lt()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,i=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=i:e.zIndexMap[n].element=i:e.zIndexMap[n]={consumers:0,element:o?void 0:i,panoramaElement:o?i:void 0}},prepare:lt()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:lt()}}}),lm=N3.actions,MK=lm.registerZIndexPortal,Gg=lm.unregisterZIndexPortal,IK=lm.registerZIndexPortalElement,TK=lm.unregisterZIndexPortalElement,DK=N3.reducer;function _i(e){var t=e.zIndex,r=e.children,n=x8(),i=n&&t!==void 0&&t!==0,o=Or(),c=x.useRef(void 0),u=x.useRef(new Set),f=At(),h=Me(p=>jK(p,t,o));if(x.useLayoutEffect(()=>{if(!i){var p=u.current;p.forEach(b=>{f(Gg({zIndex:b}))}),p.clear(),c.current=void 0;return}if(u.current.has(t)||(f(MK({zIndex:t})),u.current.add(t)),h){c.current=h;var v=u.current;v.forEach(b=>{b!==t&&(f(Gg({zIndex:b})),v.delete(b))})}},[f,t,i,h]),x.useLayoutEffect(()=>{var p=u.current;return()=>{p.forEach(v=>{f(Gg({zIndex:v}))}),p.clear()}},[f]),!i)return r;var m=h??c.current;return m?gh.createPortal(r,m):null}function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;tx.useContext(E3),Vg={exports:{}},yS;function WK(){return yS||(yS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,p,v){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new i(m,p||f,v),S=r?r+h:h;return f._events[S]?f._events[S].fn?f._events[S]=[f._events[S],b]:f._events[S].push(b):(f._events[S]=b,f._eventsCount++),f}function c(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],m,p;if(this._eventsCount===0)return h;for(p in m=this._events)t.call(m,p)&&h.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},u.prototype.listeners=function(h){var m=r?r+h:h,p=this._events[m];if(!p)return[];if(p.fn)return[p.fn];for(var v=0,b=p.length,S=new Array(b);v{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Gn(r))return e[r]}},VK={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},A3=ur({name:"options",initialState:VK,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),qK=A3.reducer,QK=A3.actions.createEventEmitter;function YK(e){return e.tooltip.syncInteraction}var ZK={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},C3=ur({name:"chartData",initialState:ZK,reducers:{setChartData(e,t){if(e.chartData=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 r=t.payload,n=r.startIndex,i=r.endIndex;n!=null&&(e.dataStartIndex=n),i!=null&&(e.dataEndIndex=i)}}}),py=C3.actions,wS=py.setChartData,XK=py.setDataStartEndIndexes;py.setComputedData;var JK=C3.reducer,eG=["x","y"];function kS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fs(e){for(var t=1;tf.rootProps.className);x.useEffect(()=>{if(e==null)return al;var f=(h,m,p)=>{if(t!==p&&e===h){if(m.payload.active===!1){r(yc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(c&&m!==null&&m!==void 0&&(v=m.payload)!==null&&v!==void 0&&v.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,S=b.x,w=b.y,k=iG(b,eG),N=m.payload.sourceViewBox,E=N.x,C=N.y,A=N.width,_=N.height,O=fs(fs({},k),{},{x:c.x+(A?(S-E)/A:0)*c.width,y:c.y+(_?(w-C)/_:0)*c.height});r(fs(fs({},m),{},{payload:fs(fs({},m.payload),{},{coordinate:O})}))}else r(m);return}if(i!=null){var T;if(typeof n=="function"){var B={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},z=n(i,B);T=i[z]}else n==="value"&&(T=i.find(ie=>String(ie.value)===m.payload.label));var $=m.payload.coordinate;if($==null||c==null){r(yc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(T==null){r(yc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var q=$.x,W=$.y,ve=Math.min(q,c.x+c.width),de=Math.min(W,c.y+c.height),ge={x:o==="horizontal"?T.coordinate:ve,y:o==="horizontal"?de:T.coordinate},le=yc({active:m.payload.active,coordinate:ge,dataKey:m.payload.dataKey,index:String(T.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});r(le)}}};return Gc.on(vx,f),()=>{Gc.off(vx,f)}},[u,r,t,e,n,i,o,c])}function sG(){var e=Me(b0),t=Me(w0),r=At();x.useEffect(()=>{if(e==null)return al;var n=(i,o,c)=>{t!==c&&e===i&&r(XK(o))};return Gc.on(bS,n),()=>{Gc.off(bS,n)}},[r,t,e])}function lG(){var e=At();x.useEffect(()=>{e(QK())},[e]),oG(),sG()}function cG(e,t,r,n,i,o){var c=Me(S=>gK(S,e,t)),u=Me(XH),f=Me(w0),h=Me(b0),m=Me(jC),p=Me(YK),v=(p==null?void 0:p.sourceViewBox)!=null,b=Fh();x.useEffect(()=>{if(!v&&h!=null&&f!=null){var S=yc({active:o,coordinate:r,dataKey:c,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:u});Gc.emit(vx,h,S,f)}},[v,r,c,u,i,n,f,h,m,o,b])}function jS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function SS(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{T(oH({shared:E,trigger:C,axisId:O,active:i,defaultIndex:B}))},[T,E,C,O,i,B]);var z=Fh(),$=rC(),q=eH(E),W=(t=Me(be=>yK(be,q,C,B)))!==null&&t!==void 0?t:{},ve=W.activeIndex,de=W.isActive,ge=Me(be=>xK(be,q,C,B)),le=Me(be=>S3(be,q,C,B)),ie=Me(be=>vK(be,q,C,B)),X=ge,te=UK(),re=(r=i??de)!==null&&r!==void 0?r:!1,D=y$([X,re]),M=hG(D,2),Q=M[0],ne=M[1],ae=q==="axis"?le:void 0;cG(q,C,ie,ae,ve,re);var ee=_??te;if(ee==null||z==null||q==null)return null;var se=X??ES;re||(se=ES),h&&se.length&&(se=U6(se.filter(be=>be.value!=null&&(be.hide!==!0||n.includeHidden)),v,xG));var me=se.length>0,U=SS(SS({},n),{},{payload:se,label:ae,active:re,activeIndex:ve,coordinate:ie,accessibilityLayer:$}),ue=x.createElement(OF,{allowEscapeViewBox:o,animationDuration:c,animationEasing:u,isAnimationActive:m,active:re,coordinate:ie,hasPayload:me,offset:p,position:b,reverseDirection:S,useTranslate3d:w,viewBox:z,wrapperStyle:k,lastBoundingBox:Q,innerRef:ne,hasPortalFromProps:!!_},yG(f,U));return x.createElement(x.Fragment,null,gh.createPortal(ue,ee),re&&x.createElement(BK,{cursor:N,tooltipEventType:q,coordinate:ie,payload:se,index:ve}))}function kG(e,t,r){return(t=jG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jG(e){var t=SG(e,"string");return typeof t=="symbol"?t:t+""}function SG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class NG{constructor(t){kG(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function AS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EG(e){for(var t=1;t{try{var r=document.getElementById(PS);r||(r=document.createElement("span"),r.setAttribute("id",PS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,_G,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},jc=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||cu.isSsr)return{width:0,height:0};if(!P3.enableCache)return OS(t,r);var n=MG(t,r),i=CS.get(n);if(i)return i;var o=OS(t,r);return CS.set(n,o),o},O3;function rh(e,t){return LG(e)||DG(e,t)||TG(e,t)||IG()}function IG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TG(e,t){if(e){if(typeof e=="string")return _S(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_S(e,t):void 0}}function _S(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=e.breakAll,n=e.style;try{var i=[];Xt(t)||(r?i=t.toString().split(""):i=t.toString().split(M3));var o=i.map(u=>({word:u,width:jc(u,n).width})),c=r?0:jc(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:c}}catch{return null}};function T3(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function rV(e){return Xt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var D3=(e,t,r,n)=>e.reduce((i,o)=>{var c=o.word,u=o.width,f=i[i.length-1];if(f&&u!=null&&(t==null||n||f.width+u+re.reduce((t,r)=>t.width>r.width?t:r),nV="…",$S=(e,t,r,n,i,o,c,u)=>{var f=e.slice(0,t),h=I3({breakAll:r,style:n,children:f+nV});if(!h)return[!1,[]];var m=D3(h.wordsWithComputedWidth,o,c,u),p=m.length>i||L3(m).width>Number(o);return[p,m]},iV=(e,t,r,n,i)=>{var o=e.maxLines,c=e.children,u=e.style,f=e.breakAll,h=Ae(o),m=String(c),p=D3(t,n,r,i);if(!h||i)return p;var v=p.length>o||L3(p).width>Number(n);if(!v)return p;for(var b=0,S=m.length-1,w=0,k;b<=S&&w<=m.length-1;){var N=Math.floor((b+S)/2),E=N-1,C=$S(m,E,f,u,o,n,r,i),A=LS(C,2),_=A[0],O=A[1],T=$S(m,N,f,u,o,n,r,i),B=LS(T,1),z=B[0];if(!_&&!z&&(b=N+1),_&&z&&(S=N-1),!_&&z){k=O;break}w++}return k||p},zS=e=>{var t=Xt(e)?[]:e.toString().split(M3);return[{words:t,width:void 0}]},aV=e=>{var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,c=e.maxLines;if((t||r)&&!cu.isSsr){var u,f,h=I3({breakAll:o,children:n,style:i});if(h){var m=h.wordsWithComputedWidth,p=h.spaceWidth;u=m,f=p}else return zS(n);return iV({breakAll:o,children:n,maxLines:c,style:i},u,f,t,!!r)}return zS(n)},R3="#808080",oV={angle:0,breakAll:!1,capHeight:"0.71em",fill:R3,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},gy=x.forwardRef((e,t)=>{var r=sn(e,oV),n=r.x,i=r.y,o=r.lineHeight,c=r.capHeight,u=r.fill,f=r.scaleToFit,h=r.textAnchor,m=r.verticalAnchor,p=DS(r,QG),v=x.useMemo(()=>aV({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:f,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,f,p.style,p.width]),b=p.dx,S=p.dy,w=p.angle,k=p.className,N=p.breakAll,E=DS(p,YG);if(!Vn(n)||!Vn(i)||v.length===0)return null;var C=Number(n)+(Ae(b)?b:0),A=Number(i)+(Ae(S)?S:0);if(!Ke(C)||!Ke(A))return null;var _;switch(m){case"start":_=qg("calc(".concat(c,")"));break;case"middle":_=qg("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:_=qg("calc(".concat(v.length-1," * -").concat(o,")"));break}var O=[],T=v[0];if(f&&T!=null){var B=T.width,z=p.width;O.push("scale(".concat(Ae(z)&&Ae(B)?z/B:1,")"))}return w&&O.push("rotate(".concat(w,", ").concat(C,", ").concat(A,")")),O.length&&(E.transform=O.join(" ")),x.createElement("text",xx({},nn(E),{ref:t,x:C,y:A,className:nt("recharts-text",k),textAnchor:h,fill:u.includes("url")?R3:u}),v.map(($,q)=>{var W=$.words.join(N?"":" ");return x.createElement("tspan",{x:C,dy:q===0?_:o,key:"".concat(W,"-").concat(q)},W)}))});gy.displayName="Text";function FS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dn(e){for(var t=1;t{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,o=e.parentViewBox,c=u0(t),u=c.x,f=c.y,h=c.height,m=c.upperWidth,p=c.lowerWidth,v=u,b=u+(m-p)/2,S=(v+b)/2,w=(m+p)/2,k=v+m/2,N=h>=0?1:-1,E=N*i,C=N>0?"end":"start",A=N>0?"start":"end",_=m>=0?1:-1,O=_*i,T=_>0?"end":"start",B=_>0?"start":"end",z=o;if(r==="top"){var $={x:v+m/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:C};return z&&($.height=Math.max(f-z.y,0),$.width=m),$}if(r==="bottom"){var q={x:b+p/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:A};return z&&(q.height=Math.max(z.y+z.height-(f+h),0),q.width=p),q}if(r==="left"){var W={x:S-O,y:f+h/2,horizontalAnchor:T,verticalAnchor:"middle"};return z&&(W.width=Math.max(W.x-z.x,0),W.height=h),W}if(r==="right"){var ve={x:S+w+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"};return z&&(ve.width=Math.max(z.x+z.width-ve.x,0),ve.height=h),ve}var de=z?{width:w,height:h}:{};return r==="insideLeft"?Dn({x:S+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"},de):r==="insideRight"?Dn({x:S+w-O,y:f+h/2,horizontalAnchor:T,verticalAnchor:"middle"},de):r==="insideTop"?Dn({x:v+m/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:A},de):r==="insideBottom"?Dn({x:b+p/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:C},de):r==="insideTopLeft"?Dn({x:v+O,y:f+E,horizontalAnchor:B,verticalAnchor:A},de):r==="insideTopRight"?Dn({x:v+m-O,y:f+E,horizontalAnchor:T,verticalAnchor:A},de):r==="insideBottomLeft"?Dn({x:b+O,y:f+h-E,horizontalAnchor:B,verticalAnchor:C},de):r==="insideBottomRight"?Dn({x:b+p-O,y:f+h-E,horizontalAnchor:T,verticalAnchor:C},de):r&&typeof r=="object"&&(Ae(r.x)||bo(r.x))&&(Ae(r.y)||bo(r.y))?Dn({x:u+ja(r.x,w),y:f+ja(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},de):Dn({x:k,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},de)},dV=["labelRef"],fV=["content"];function BS(e,t){if(e==null)return{};var r,n,i=hV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var t=e.x,r=e.y,n=e.upperWidth,i=e.lowerWidth,o=e.width,c=e.height,u=e.children,f=x.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:c}),[t,r,n,i,o,c]);return x.createElement($3.Provider,{value:f},u)},z3=()=>{var e=x.useContext($3),t=Fh();return e||(t?u0(t):void 0)},xV=x.createContext(null),yV=()=>{var e=x.useContext(xV),t=Me(CC);return e||t},bV=e=>{var t=e.value,r=e.formatter,n=Xt(e.children)?t:e.children;return typeof r=="function"?r(n):n},vy=e=>e!=null&&typeof e=="function",wV=(e,t)=>{var r=en(t-e),n=Math.min(Math.abs(t-e),360);return r*n},kV=(e,t,r,n,i)=>{var o=e.offset,c=e.className,u=i.cx,f=i.cy,h=i.innerRadius,m=i.outerRadius,p=i.startAngle,v=i.endAngle,b=i.clockWise,S=(h+m)/2,w=wV(p,v),k=w>=0?1:-1,N,E;switch(t){case"insideStart":N=p+k*o,E=b;break;case"insideEnd":N=v-k*o,E=!b;break;case"end":N=v+k*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=w<=0?E:!E;var C=Zt(u,f,S,N),A=Zt(u,f,S,N+(E?1:-1)*359),_="M".concat(C.x,",").concat(C.y,` + A`).concat(S,",").concat(S,",0,1,").concat(E?0:1,`, + `).concat(A.x,",").concat(A.y),O=Xt(e.id)?Mc("recharts-radial-line-"):e.id;return x.createElement("text",fi({},n,{dominantBaseline:"central",className:nt("recharts-radial-bar-label",c)}),x.createElement("defs",null,x.createElement("path",{id:O,d:_})),x.createElement("textPath",{xlinkHref:"#".concat(O)},r))},jV=(e,t,r)=>{var n=e.cx,i=e.cy,o=e.innerRadius,c=e.outerRadius,u=e.startAngle,f=e.endAngle,h=(u+f)/2;if(r==="outside"){var m=Zt(n,i,c+t,h),p=m.x,v=m.y;return{x:p,y:v,textAnchor:p>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var b=(o+c)/2,S=Zt(n,i,b,h),w=S.x,k=S.y;return{x:w,y:k,textAnchor:"middle",verticalAnchor:"middle"}},cf=e=>e!=null&&"cx"in e&&Ae(e.cx),SV={angle:0,offset:5,zIndex:pr.label,position:"middle",textBreakAll:!1};function NV(e){if(!cf(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function ia(e){var t=sn(e,SV),r=t.viewBox,n=t.parentViewBox,i=t.position,o=t.value,c=t.children,u=t.content,f=t.className,h=f===void 0?"":f,m=t.textBreakAll,p=t.labelRef,v=yV(),b=z3(),S=i==="center"?b:v??b,w,k,N;r==null?w=S:cf(r)?w=r:w=u0(r);var E=NV(w);if(!w||Xt(o)&&Xt(c)&&!x.isValidElement(u)&&typeof u!="function")return null;var C=bc(bc({},t),{},{viewBox:w});if(x.isValidElement(u)){C.labelRef;var A=BS(C,dV);return x.cloneElement(u,A)}if(typeof u=="function"){C.content;var _=BS(C,fV);if(k=x.createElement(u,_),x.isValidElement(k))return k}else k=bV(t);var O=nn(t);if(cf(w)){if(i==="insideStart"||i==="insideEnd"||i==="end")return kV(t,i,k,O,w);N=jV(w,t.offset,t.position)}else{if(!E)return null;var T=uV({viewBox:E,position:i,offset:t.offset,parentViewBox:cf(n)?void 0:n});N=bc(bc({x:T.x,y:T.y,textAnchor:T.horizontalAnchor,verticalAnchor:T.verticalAnchor},T.width!==void 0?{width:T.width}:{}),T.height!==void 0?{height:T.height}:{})}return x.createElement(_i,{zIndex:t.zIndex},x.createElement(gy,fi({ref:p,className:nt("recharts-label",h)},O,N,{textAnchor:T3(O.textAnchor)?O.textAnchor:N.textAnchor,breakAll:m}),k))}ia.displayName="Label";var EV=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?x.createElement(ia,fi({key:"label-implicit"},n)):Vn(e)?x.createElement(ia,fi({key:"label-implicit",value:e},n)):x.isValidElement(e)?e.type===ia?x.cloneElement(e,bc({key:"label-implicit"},n)):x.createElement(ia,fi({key:"label-implicit",content:e},n)):vy(e)?x.createElement(ia,fi({key:"label-implicit",content:e},n)):e&&typeof e=="object"?x.createElement(ia,fi({},e,{key:"label-implicit"},n)):null};function AV(e){var t=e.label,r=e.labelRef,n=z3();return EV(t,n,r)||null}var CV=["valueAccessor"],PV=["dataKey","clockWise","id","textBreakAll","zIndex"];function nh(){return nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(rV(t))return t},F3=x.createContext(void 0),MV=F3.Provider,B3=x.createContext(void 0);B3.Provider;function IV(){return x.useContext(F3)}function TV(){return x.useContext(B3)}function uf(e){var t=e.valueAccessor,r=t===void 0?_V:t,n=WS(e,CV),i=n.dataKey;n.clockWise;var o=n.id,c=n.textBreakAll,u=n.zIndex,f=WS(n,PV),h=IV(),m=TV(),p=h||m;return!p||!p.length?null:x.createElement(_i,{zIndex:u??pr.label},x.createElement(an,{className:"recharts-label-list"},p.map((v,b)=>{var S,w=Xt(i)?r(v,b):Ft(v.payload,i),k=Xt(o)?{}:{id:"".concat(o,"-").concat(b)};return x.createElement(ia,nh({key:"label-".concat(b)},nn(v),f,k,{fill:(S=n.fill)!==null&&S!==void 0?S:v.fill,parentViewBox:v.parentViewBox,value:w,textBreakAll:c,viewBox:v.viewBox,index:b,zIndex:0}))})))}uf.displayName="LabelList";function DV(e){var t=e.label;return t?t===!0?x.createElement(uf,{key:"labelList-implicit"}):x.isValidElement(t)||vy(t)?x.createElement(uf,{key:"labelList-implicit",content:t}):typeof t=="object"?x.createElement(uf,nh({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function yx(){return yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e.cx,r=e.cy,n=e.r,i=e.className,o=nt("recharts-dot",i);return Ae(t)&&Ae(r)&&Ae(n)?x.createElement("circle",yx({},kn(e),e0(e),{className:o,cx:t,cy:r,r:n})):null},LV={radiusAxis:{},angleAxis:{}},W3=ur({name:"polarAxis",initialState:LV,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),cm=W3.actions;cm.addRadiusAxis;cm.removeRadiusAxis;cm.addAngleAxis;cm.removeAngleAxis;var RV=W3.reducer;function $V(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var H3=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function HS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function KS(e){for(var t=1;t{n||(i.current===null?r(nH(t)):i.current!==t&&r(iH({prev:i.current,next:t})),i.current=t)},[t,r,n]),x.useLayoutEffect(()=>()=>{i.current&&(r(aH(i.current)),i.current=null)},[r]),null}function qV(e){var t=e.legendPayload,r=At(),n=Or(),i=x.useRef(null);return x.useLayoutEffect(()=>{n||(i.current===null?r(_8(t)):i.current!==t&&r(M8({prev:i.current,next:t})),i.current=t)},[r,n,t]),x.useLayoutEffect(()=>()=>{i.current&&(r(I8(i.current)),i.current=null)},[r]),null}function QV(e,t){return JV(e)||XV(e,t)||ZV(e,t)||YV()}function YV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZV(e,t){if(e){if(typeof e=="string")return GS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GS(e,t):void 0}}function GS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var i of r)n.push({status:"removed",prev:i});for(var o=0;oe[Math.floor(o*r)]);return yy(n,t)}function rq(e,t){var r=t.map((n,i)=>e[i]);return yy(r,t)}function nq(e,t){for(var r=new Map,n=0;n{var b=r(p,v);if(b!=null){var S=n.get(b);if(S!==void 0)return i.add(b),S}}),c=[];for(var u of n){var f=QV(u,2),h=f[0],m=f[1];i.has(h)||c.push(m)}return yy(o,t,c)}function bx(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===xy?tq(e,t):r===eq?rq(e,t):iq(e,t,r)}function G3(e,t){var r=x.useRef(e),n=x.useRef(t.current),i=x.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,i.current=!1);var o=x.useCallback(function(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(u===0){i.current=!0;return}u===1&&(n.current=c),u>0&&i.current&&f&&(t.current=c)},[t]);return{startValue:n.current,syncStepValue:o}}function aq(e,t){return cq(e)||lq(e,t)||sq(e,t)||oq()}function oq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sq(e,t){if(e){if(typeof e=="string")return VS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?VS(e,t):void 0}}function VS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{typeof e=="function"&&e(),o(!0)},[e]),u=x.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:i,handleAnimationStart:c,handleAnimationEnd:u}}function dq(e){var t,r=e.animationInput,n=e.animationIdPrefix,i=e.items,o=e.previousItemsRef,c=e.isAnimationActive,u=e.animationBegin,f=e.animationDuration,h=e.animationEasing,m=e.onAnimationStart,p=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,S=e.shouldUpdatePreviousRef,w=e.children,k=e.layout,N=sC(r,n),E=G3(N,o),C=(t=E.startValue)!==null&&t!==void 0?t:null,A=bx(C,i,b??xy);return x.createElement(oC,{animationId:N,begin:u,duration:f,isActive:c,easing:h,onAnimationEnd:p,onAnimationStart:m,key:N},_=>{var O=C==null,T=i==null?i:v(A,_,k),B=S?S(_):_>0;return E.syncStepValue(T,_,B),T==null?null:w(T,_,O)})}var Qg;function fq(e,t){return gq(e)||pq(e,t)||mq(e,t)||hq()}function hq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mq(e,t){if(e){if(typeof e=="string")return qS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qS(e,t):void 0}}function qS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var e=x.useState(()=>Mc("uid-")),t=fq(e,1),r=t[0];return r},V3=(Qg=fh.useId)!==null&&Qg!==void 0?Qg:vq;function xq(e,t){var r=V3();return t||(e?"".concat(e,"-").concat(r):r)}var yq=x.createContext(void 0),bq=e=>{var t=e.id,r=e.type,n=e.children,i=xq("recharts-".concat(r),t);return x.createElement(yq.Provider,{value:i},n(i))},wq={cartesianItems:[],polarItems:[]},q3=ur({name:"graphicalItems",initialState:wq,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:lt()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=i)},prepare:lt()},removeCartesianGraphicalItem:{reducer(e,t){var r=tn(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:lt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:lt()},removePolarGraphicalItem:{reducer(e,t){var r=tn(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:lt()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=i)},prepare:lt()}}}),pl=q3.actions,kq=pl.addCartesianGraphicalItem,jq=pl.replaceCartesianGraphicalItem,Sq=pl.removeCartesianGraphicalItem;pl.addPolarGraphicalItem;pl.removePolarGraphicalItem;pl.replacePolarGraphicalItem;var Nq=q3.reducer,Eq=e=>{var t=At(),r=x.useRef(null);return x.useLayoutEffect(()=>{r.current===null?t(kq(e)):r.current!==e&&t(jq({prev:r.current,next:e})),r.current=e},[t,e]),x.useLayoutEffect(()=>()=>{r.current&&(t(Sq(r.current)),r.current=null)},[t]),null},Aq=x.memo(Eq),Cq=["points"];function QS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yg(e){for(var t=1;t{var N,E,C=Yg(Yg(Yg({r:3},c),v),{},{index:k,cx:(N=w.x)!==null&&N!==void 0?N:void 0,cy:(E=w.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:w.value,payload:w.payload,points:t});return x.createElement(Tq,{key:"dot-".concat(k),option:r,dotProps:C,className:i})}),S={};return u&&f!=null&&(S.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(f,")")),x.createElement(_i,{zIndex:m},x.createElement(an,ih({className:n},S),b))}function YS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ZS(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Yq=Y([Qq,Ni,Ei],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),by=()=>Me(Yq),Zq=()=>Me(nK);function XS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zg(e){for(var t=1;t{var t=e.point,r=e.childIndex,n=e.mainColor,i=e.activeDot,o=e.dataKey,c=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var u={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Zg(Zg(Zg({},u),kh(i)),e0(i)),h;return x.isValidElement(i)?h=x.cloneElement(i,f):typeof i=="function"?h=i(f):h=x.createElement(U3,f),x.createElement(an,{className:"recharts-active-dot",clipPath:c},h)};function JS(e){var t=e.points,r=e.mainColor,n=e.activeDot,i=e.itemDataKey,o=e.clipPath,c=e.zIndex,u=c===void 0?pr.activeDot:c,f=Me(Kc),h=Zq();if(t==null||h==null)return null;var m=t.find(p=>h.includes(p.payload));return Xt(m)?null:x.createElement(_i,{zIndex:u},x.createElement(tQ,{point:m,childIndex:Number(f),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var rQ=e=>{var t=e.chartData,r=At(),n=Or();return x.useEffect(()=>n?()=>{}:(r(wS(t)),()=>{r(wS(void 0))}),[t,r,n]),null},eN={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},Z3=ur({name:"brush",initialState:eN,reducers:{setBrushSettings(e,t){return t.payload==null?eN:t.payload}}});Z3.actions.setBrushSettings;var nQ=Z3.reducer;function iQ(e){return(e%180+180)%180}var aQ=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=iQ(i),c=o*Math.PI/180,u=Math.atan(n/r),f=c>u&&c{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=tn(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=tn(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=tn(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),gl=X3.actions;gl.addDot;gl.removeDot;gl.addArea;gl.removeArea;gl.addLine;gl.removeLine;var sQ=X3.reducer;function lQ(e,t){return fQ(e)||dQ(e,t)||uQ(e,t)||cQ()}function cQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uQ(e,t){if(e){if(typeof e=="string")return tN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tN(e,t):void 0}}function tN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=x.useState("".concat(Mc("recharts"),"-clip")),n=lQ(r,1),i=n[0],o=by();if(o==null)return null;var c=o.x,u=o.y,f=o.width,h=o.height;return x.createElement(hQ.Provider,{value:i},x.createElement("defs",null,x.createElement("clipPath",{id:i},x.createElement("rect",{x:c,y:u,height:h,width:f}))),t)};function J3(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function vQ(e,t){return J3(e,t+1)}function xQ(e,t,r,n,i){for(var o=(n||[]).slice(),c=t.start,u=t.end,f=0,h=1,m=c,p=function(){var S=n==null?void 0:n[f];if(S===void 0)return{v:J3(n,h)};var w=f,k,N=()=>(k===void 0&&(k=r(S,w)),k),E=S.coordinate,C=f===0||Vc(e,E,N,m,u);C||(f=0,m=c,h+=1),C&&(m=E+e*(N()/2+i),f+=h)},v;h<=o.length;)if(v=p(),v)return v.v;return[]}function yQ(e,t,r,n,i){var o=(n||[]).slice(),c=o.length;if(c===0)return[];for(var u=t.start,f=t.end,h=1;h<=c;h++){for(var m=(c-1)%h,p=u,v=!0,b=function(){var A=n[w];if(A==null)return 0;var _=w,O,T=()=>(O===void 0&&(O=r(A,_)),O),B=A.coordinate,z=w===m||Vc(e,B,T,p,f);if(!z)return v=!1,1;z&&(p=B+e*(T()/2+i))},S,w=m;w(w===void 0&&(w=r(b,v)),w);if(v===c-1){var N=e*(S.coordinate+e*k()/2-f);o[v]=S=sr(sr({},S),{},{tickCoord:N>0?S.coordinate-N*e:S.coordinate})}else o[v]=S=sr(sr({},S),{},{tickCoord:S.coordinate});if(S.tickCoord!=null){var E=Vc(e,S.tickCoord,k,u,f);E&&(f=S.tickCoord-e*(k()/2+i),o[v]=sr(sr({},S),{},{isShow:!0}))}},m=c-1;m>=0;m--)h(m);return o}function SQ(e,t,r,n,i,o){var c=(n||[]).slice(),u=c.length,f=t.start,h=t.end;if(o){var m=n[u-1];if(m!=null){var p=r(m,u-1),v=e*(m.coordinate+e*p/2-h);if(c[u-1]=m=sr(sr({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var b=Vc(e,m.tickCoord,()=>p,f,h);b&&(h=m.tickCoord-e*(p/2+i),c[u-1]=sr(sr({},m),{},{isShow:!0}))}}}for(var S=o?u-1:u,w=function(E){var C=c[E];if(C==null)return 1;var A=C,_,O=()=>(_===void 0&&(_=r(C,E)),_);if(E===0){var T=e*(A.coordinate-e*O()/2-f);c[E]=A=sr(sr({},A),{},{tickCoord:T<0?A.coordinate-T*e:A.coordinate})}else c[E]=A=sr(sr({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var B=Vc(e,A.tickCoord,O,f,h);B&&(f=A.tickCoord+e*(O()/2+i),c[E]=sr(sr({},A),{},{isShow:!0}))}},k=0;k{var T=typeof h=="function"?h(_.value,O):_.value;return S==="width"?pQ(jc(T,{fontSize:t,letterSpacing:r}),w,p):jc(T,{fontSize:t,letterSpacing:r})[S]},N=i[0],E=i[1],C=i.length>=2&&N!=null&&E!=null?en(E.coordinate-N.coordinate):1,A=gQ(o,C,S);return f==="equidistantPreserveStart"?xQ(C,A,k,i,c):f==="equidistantPreserveEnd"?yQ(C,A,k,i,c):(f==="preserveStart"||f==="preserveStartEnd"?b=SQ(C,A,k,i,c,f==="preserveStartEnd"):b=jQ(C,A,k,i,c),b.filter(_=>_.isShow))}var NQ=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=n,o=e.tickSize,c=o===void 0?0:o,u=e.tickMargin,f=u===void 0?0:u,h=0;if(t){Array.from(t).forEach(b=>{if(b){var S=b.getBoundingClientRect();S.width>h&&(h=S.width)}});var m=r?r.getBoundingClientRect().width:0,p=c+f,v=h+p+m+(r?i:0);return Math.round(v)}return 0},EQ={xAxis:{},yAxis:{}},eO=ur({name:"renderedTicks",initialState:EQ,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId,o=r.ticks;e[n][i]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId;delete e[n][i]}}}),tO=eO.actions,AQ=tO.setRenderedTicks,CQ=tO.removeRenderedTicks,PQ=eO.reducer,OQ=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function nN(e,t){return TQ(e)||IQ(e,t)||MQ(e,t)||_Q()}function _Q(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MQ(e,t){if(e){if(typeof e=="string")return iN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?iN(e,t):void 0}}function iN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return al;var o=t.map(c=>({value:c.value,coordinate:c.coordinate,offset:c.offset,index:c.index}));return i(AQ({ticks:o,axisId:n,axisType:r})),()=>{i(CQ({axisId:n,axisType:r}))}},[i,t,n,r]),null}var GQ=x.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,i=e.tick,o=e.tickLine,c=e.stroke,u=e.tickFormatter,f=e.unit,h=e.padding,m=e.tickTextProps,p=e.orientation,v=e.mirror,b=e.x,S=e.y,w=e.width,k=e.height,N=e.tickSize,E=e.tickMargin,C=e.fontSize,A=e.letterSpacing,_=e.getTicksConfig,O=e.events,T=e.axisType,B=e.axisId,z=wy(wt(wt({},_),{},{ticks:n}),C,A),$=kn(_),q=kh(i),W=T3($.textAnchor)?$.textAnchor:UQ(p,v),ve=WQ(p,v),de={};typeof o=="object"&&(de=o);var ge=wt(wt({},$),{},{fill:"none"},de),le=z.map(te=>wt({entry:te},BQ(te,b,S,w,k,p,N,v,E))),ie=le.map(te=>{var re=te.entry,D=te.line;return x.createElement(an,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(re.value,"-").concat(re.coordinate,"-").concat(re.tickCoord)},o&&x.createElement("line",Eo({},ge,D,{className:nt("recharts-cartesian-axis-tick-line",Po(o,"className"))})))}),X=le.map((te,re)=>{var D,M,Q=te.entry,ne=te.tick,ae=wt(wt(wt(wt({verticalAnchor:ve},$),{},{textAnchor:W,stroke:"none",fill:c},ne),{},{index:re,payload:Q,visibleTicksCount:z.length,tickFormatter:u,padding:h},m),{},{angle:(D=(M=m==null?void 0:m.angle)!==null&&M!==void 0?M:$.angle)!==null&&D!==void 0?D:0}),ee=wt(wt({},ae),q);return x.createElement(an,Eo({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(Q.value,"-").concat(Q.coordinate,"-").concat(Q.tickCoord)},YR(O,Q,re)),i&&x.createElement(HQ,{option:i,tickProps:ee,value:"".concat(typeof u=="function"?u(Q.value,re):Q.value).concat(f||"")}))});return x.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(T,"-ticks")},x.createElement(KQ,{ticks:z,axisId:B,axisType:T}),X.length>0&&x.createElement(_i,{zIndex:pr.label},x.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(T,"-tick-labels"),ref:t},X)),ie.length>0&&x.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(T,"-tick-lines")},ie))}),VQ=x.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,i=e.height,o=e.className,c=e.hide,u=e.ticks,f=e.axisType,h=e.axisId,m=DQ(e,OQ),p=x.useState(""),v=nN(p,2),b=v[0],S=v[1],w=x.useState(""),k=nN(w,2),N=k[0],E=k[1],C=x.useRef(null);x.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return NQ({ticks:C.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var A=x.useCallback(_=>{if(_){var O=_.getElementsByClassName("recharts-cartesian-axis-tick-value");C.current=O;var T=O[0];if(T){var B=window.getComputedStyle(T),z=B.fontSize,$=B.letterSpacing;(z!==b||$!==N)&&(S(z),E($))}}},[b,N]);return c||n!=null&&n<=0||i!=null&&i<=0?null:x.createElement(_i,{zIndex:e.zIndex},x.createElement(an,{className:nt("recharts-cartesian-axis",o)},x.createElement(FQ,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:kn(e)}),x.createElement(GQ,{ref:A,axisType:f,events:m,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,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:u,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),x.createElement(vV,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},x.createElement(AV,{label:e.label,labelRef:e.labelRef}),e.children)))}),ky=x.forwardRef((e,t)=>{var r=sn(e,xi);return x.createElement(VQ,Eo({},r,{ref:t}))});ky.displayName="CartesianAxis";var qQ=["x1","y1","x2","y2","key"],QQ=["offset"],YQ=["xAxisId","yAxisId"],ZQ=["xAxisId","yAxisId"];function oN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cr(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,i=e.y,o=e.width,c=e.height,u=e.ry;return x.createElement("rect",{x:n,y:i,ry:u,width:o,height:c,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function rO(e){var t=e.option,r=e.lineItemProps,n;if(x.isValidElement(t))n=x.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,o=r.x1,c=r.y1,u=r.x2,f=r.y2,h=r.key,m=ah(r,qQ),p=(i=kn(m))!==null&&i!==void 0?i:{};p.offset;var v=ah(p,QQ);n=x.createElement("line",to({},v,{x1:o,y1:c,x2:u,y2:f,fill:"none",key:h}))}return n}function nY(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var c=ah(e,YQ),u=o.map((f,h)=>{var m=cr(cr({},c),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return x.createElement(rO,{key:"line-".concat(h),option:i,lineItemProps:m})});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function iY(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var c=ah(e,ZQ),u=o.map((f,h)=>{var m=cr(cr({},c),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return x.createElement(rO,{option:i,lineItemProps:m,key:"line-".concat(h)})});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function aY(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,c=e.height,u=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||u==null)return null;var m=u.map(v=>Math.round(v+i-i)).sort((v,b)=>v-b);i!==m[0]&&m.unshift(0);var p=m.map((v,b)=>{var S=m[b+1],w=S==null,k=w?i+c-v:S-v;if(k<=0)return null;var N=b%t.length;return x.createElement("rect",{key:"react-".concat(b),y:v,x:n,height:k,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function oY(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,c=e.y,u=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var m=h.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==m[0]&&m.unshift(0);var p=m.map((v,b)=>{var S=m[b+1],w=S==null,k=w?o+u-v:S-v;if(k<=0)return null;var N=b%n.length;return x.createElement("rect",{key:"react-".concat(b),x:v,y:c,width:k,height:f,stroke:"none",fill:n[N],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var sY=(e,t)=>{var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return LA(wy(cr(cr(cr({},xi),r),{},{ticks:RA(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},lY=(e,t)=>{var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return LA(wy(cr(cr(cr({},xi),r),{},{ticks:RA(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},cY={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:pr.grid};function nO(e){var t=KA(),r=GA(),n=HA(),i=cr(cr({},sn(e,cY)),{},{x:Ae(e.x)?e.x:n.left,y:Ae(e.y)?e.y:n.top,width:Ae(e.width)?e.width:n.width,height:Ae(e.height)?e.height:n.height}),o=i.xAxisId,c=i.yAxisId,u=i.x,f=i.y,h=i.width,m=i.height,p=i.syncWithTicks,v=i.horizontalValues,b=i.verticalValues,S=Or(),w=Me(z=>lS(z,"xAxis",o,S)),k=Me(z=>lS(z,"yAxis",c,S));if(!qn(h)||!qn(m)||!Ae(u)||!Ae(f))return null;var N=i.verticalCoordinatesGenerator||sY,E=i.horizontalCoordinatesGenerator||lY,C=i.horizontalPoints,A=i.verticalPoints;if((!C||!C.length)&&typeof E=="function"){var _=v&&v.length,O=E({yAxis:k?cr(cr({},k),{},{ticks:_?v:k.ticks}):void 0,width:t??h,height:r??m,offset:n},_?!0:p);_f(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(C=O)}if((!A||!A.length)&&typeof N=="function"){var T=b&&b.length,B=N({xAxis:w?cr(cr({},w),{},{ticks:T?b:w.ticks}):void 0,width:t??h,height:r??m,offset:n},T?!0:p);_f(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(A=B)}return x.createElement(_i,{zIndex:i.zIndex},x.createElement("g",{className:"recharts-cartesian-grid"},x.createElement(rY,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),x.createElement(aY,to({},i,{horizontalPoints:C})),x.createElement(oY,to({},i,{verticalPoints:A})),x.createElement(nY,to({},i,{offset:n,horizontalPoints:C,xAxis:w,yAxis:k})),x.createElement(iY,to({},i,{offset:n,verticalPoints:A,xAxis:w,yAxis:k}))))}nO.displayName="CartesianGrid";var uY={},iO=ur({name:"errorBars",initialState:uY,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]||(e[n]=[]),e[n].push(i)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(c=>c.dataKey===i.dataKey&&c.direction===i.direction?o:c))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==i.dataKey||o.direction!==i.direction))}}}),jy=iO.actions;jy.addErrorBar;jy.replaceErrorBar;jy.removeErrorBar;var dY=iO.reducer;function aO(e,t){var r,n,i=Me(h=>Ci(h,e)),o=Me(h=>Pi(h,t)),c=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:Ot.allowDataOverflow,u=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:_t.allowDataOverflow,f=c||u;return{needClip:f,needClipX:c,needClipY:u}}function fY(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=by(),o=aO(t,r),c=o.needClipX,u=o.needClipY,f=o.needClip,h=Me(C=>WP(C,t,!1)),m=Me(C=>HP(C,r,!1));if(!f||!i)return null;var p=i.x,v=i.y,b=i.width,S=i.height,w=c&&h?Math.min(h[0],h[1]):p-b/2,k=u&&m?Math.min(m[0],m[1]):v-S/2,N=c&&h?Math.abs(h[1]-h[0]):b*2,E=u&&m?Math.abs(m[1]-m[0]):S*2;return x.createElement("clipPath",{id:"clipPath-".concat(n)},x.createElement("rect",{x:w,y:k,width:N,height:E}))}function hY(e){var t=kh(e),r=3,n=2;if(t!=null){var i=t.r,o=t.strokeWidth,c=Number(i),u=Number(o);return(Number.isNaN(c)||c<0)&&(c=r),(Number.isNaN(u)||u<0)&&(u=n),{r:c,strokeWidth:u}}return{r,strokeWidth:n}}function Sy(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:Q3}function Ny(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:Q3}var oO=(e,t,r)=>XP(e,"xAxis",Sy(e,t),r),sO=(e,t,r)=>ZP(e,"xAxis",Sy(e,t),r),lO=(e,t,r)=>XP(e,"yAxis",Ny(e,t),r),cO=(e,t,r)=>ZP(e,"yAxis",Ny(e,t),r),mY=Y([ht,oO,lO,sO,cO],(e,t,r,n,i)=>Zn(e,"xAxis")?Of(t,n,!1):Of(r,i,!1)),pY=(e,t)=>t,uO=Y([vP,pY],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),dO=e=>{var t=ht(e),r=Zn(t,"xAxis");return r?"yAxis":"xAxis"},gY=(e,t)=>{var r=dO(e);return r==="yAxis"?Ny(e,t):Sy(e,t)},vY=(e,t,r)=>AP(e,dO(e),gY(e,t),r),xY=Y([uO,vY],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,i=N0(e);if(!(n==null||i==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,c=o==null?void 0:o.find(u=>u.key===i);if(c!=null)return c.map(u=>[u[0],u[1]])}}}),yY=Y([ht,oO,lO,sO,cO,xY,W9,mY,uO,o7],(e,t,r,n,i,o,c,u,f,h)=>{var m=c.chartData,p=c.dataStartIndex,v=c.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||u==null)){var b=f.data,S;if(b&&b.length>0?S=b:S=m==null?void 0:m.slice(p,v+1),S!=null)return KY({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:p,areaSettings:f,stackedData:o,displayedData:S,chartBaseValue:h,bandSize:u})}}),bY=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],wY=["id","baseLine"];function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.y||0));return Ae(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(p=>p.y||0),m)),Ae(m)?x.createElement("rect",{x:up.x||0));return Ae(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(p=>p.x||0),m)),Ae(m)?x.createElement("rect",{x:0,y:ue==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Xs(Xs({},r.next),{},{x:hi(r.prev.x,r.next.x,t),y:hi(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),hO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:xy,animationInterpolateFn:IY,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:EY,xAxisId:0,yAxisId:0,zIndex:pr.area};function sh(e,t){return e&&e!=="none"?e:t}var TY=e=>{var t=e.dataKey,r=e.name,n=e.stroke,i=e.fill,o=e.legendType,c=e.hide;return[{inactive:c,dataKey:t,type:o,color:sh(n,i),value:$A(r,t),payload:e}]},DY=x.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,i=e.strokeWidth,o=e.fill,c=e.name,u=e.hide,f=e.unit,h=e.tooltipType,m=e.id,p={dataDefinedOnItem:r,getPosition:al,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:$A(c,t),hide:u,type:h,color:sh(n,o),unit:f,graphicalItemId:m}};return x.createElement(VV,{tooltipEntrySettings:p})});function LY(e){var t=e.clipPathId,r=e.points,n=e.props,i=n.needClip,o=n.dot,c=n.dataKey,u=kn(n);return x.createElement(Lq,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:c,baseProps:u,needClip:i,clipPathId:t})}function RY(e){var t=e.showLabels,r=e.children,n=e.points,i=n.map(o=>{var c,u,f={x:(c=o.x)!==null&&c!==void 0?c:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Xs(Xs({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return x.createElement(MV,{value:t?i:void 0},r)}function $Y(e){var t=e.points,r=e.baseLine,n=e.needClip,i=e.clipPathId,o=e.props,c=e.animationElapsedTime,u=e.isAnimating,f=e.isEntrance,h=o.layout,m=o.type,p=o.stroke,v=o.connectNulls,b=o.isRange,S=o.shape,w=o.id,k=fO(o,AY),N=nn(k),E=Xs(Xs({},N),{},{id:w,points:t,connectNulls:v,type:m,baseLine:r,layout:h,stroke:p,isRange:b,animationElapsedTime:c,isAnimating:u,isEntrance:f});return x.createElement(x.Fragment,null,(t==null?void 0:t.length)>1&&x.createElement(an,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},x.createElement(GV,{option:S,DefaultShape:hO.shape,shapeProps:E})),x.createElement(LY,{points:t,props:k,clipPathId:i}))}function zY(e,t,r){if(Ae(e)){var n=Ae(t)?t:void 0;return hi(n,e,r)}if(Xt(e)||Gn(e)){var i=Ae(t)?t:void 0;return hi(i,0,r)}return e}function FY(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=e.previousPointsRef,o=e.previousBaselineRef,c=n.points,u=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,m=n.animationDuration,p=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,S=x.useMemo(()=>({points:c,baseLine:u}),[c,u]),w=G3(S,o),k=d0(),N=uq(n.onAnimationStart,n.onAnimationEnd),E=N.isAnimating,C=N.handleAnimationStart,A=N.handleAnimationEnd,_=w.startValue;if(k==null)return null;var O;return Array.isArray(u)&&Array.isArray(_)?O=bx(_,u,v):Array.isArray(u)?O=bx(null,u,v):O=null,x.createElement(dq,{animationInput:S,animationIdPrefix:"recharts-area-",items:c,previousItemsRef:i,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:p,onAnimationStart:C,onAnimationEnd:A,animationInterpolateFn:b,animationMatchBy:v,layout:k},(T,B,z)=>{var $;return B===1?$=u:Array.isArray(u)?$=b(O,B,k):$=z?u:zY(u,_,B),w.syncStepValue($,B),x.createElement(RY,{showLabels:!E,points:c},n.children,x.createElement($Y,{points:T,baseLine:$,needClip:t,clipPathId:r,props:n,animationElapsedTime:B,isAnimating:E||B<1,isEntrance:z}),x.createElement(DV,{label:n.label}))})}function BY(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=x.useRef(null),o=x.useRef();return x.createElement(FY,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:o})}class UY extends x.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,c=t.top,u=t.left,f=t.needClip,h=t.xAxisId,m=t.yAxisId,p=t.width,v=t.height,b=t.id,S=t.baseLine,w=t.zIndex;if(r)return null;var k=nt("recharts-area",o),N=b,E=hY(n),C=E.r,A=E.strokeWidth,_=H3(n),O=C*2+A,T=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return x.createElement(_i,{zIndex:w},x.createElement(an,{className:k},f&&x.createElement("defs",null,x.createElement(fY,{clipPathId:N,xAxisId:h,yAxisId:m}),!_&&x.createElement("clipPath",{id:"clipPath-dots-".concat(N)},x.createElement("rect",{x:u-O/2,y:c-O/2,width:p+O,height:v+O}))),x.createElement(BY,{needClip:f,clipPathId:N,props:this.props})),x.createElement(JS,{points:i,mainColor:sh(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:T}),this.props.isRange&&Array.isArray(S)&&x.createElement(JS,{points:S,mainColor:sh(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:T}))}}function WY(e){var t,r=e.activeDot,n=e.animationBegin,i=e.animationDuration,o=e.animationEasing,c=e.connectNulls,u=e.dot,f=e.fill,h=e.fillOpacity,m=e.hide,p=e.isAnimationActive,v=e.legendType,b=e.stroke,S=e.xAxisId,w=e.yAxisId,k=fO(e,CY),N=ol(),E=w3(),C=aO(S,w),A=C.needClip,_=Or(),O=(t=Me(ge=>yY(ge,e.id,_)))!==null&&t!==void 0?t:{},T=O.points,B=O.isRange,z=O.baseLine,$=by();if(N!=="horizontal"&&N!=="vertical"||$==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var q=$.height,W=$.width,ve=$.x,de=$.y;return!T||!T.length?null:x.createElement(UY,oh({},k,{activeDot:r,animationBegin:n,animationDuration:i,animationEasing:o,baseLine:z,connectNulls:c,dot:u,fill:f,fillOpacity:h,height:q,hide:m,layout:N,isAnimationActive:p,isRange:B,legendType:v,needClip:A,points:T,stroke:b,width:W,left:ve,top:de,xAxisId:S,yAxisId:w}))}var HY=(e,t,r,n,i)=>{var o=r??t;if(Ae(o))return o;var c=e==="horizontal"?i:n,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),h=Math.min(u[0],u[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]};function KY(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,i=t.dataKey,o=e.stackedData,c=e.layout,u=e.chartBaseValue,f=e.xAxis,h=e.yAxis,m=e.displayedData,p=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,S=e.bandSize,w=o&&o.length,k=HY(c,u,n,f,h),N=c==="horizontal",E=!1,C=m.map((_,O)=>{var T,B,z,$;if(w)$=o[p+O];else{var q=Ft(_,i);Array.isArray(q)?($=q,E=!0):$=[k,q]}var W=(T=(B=$)===null||B===void 0?void 0:B[1])!==null&&T!==void 0?T:null,ve=W==null||w&&!r&&Ft(_,i)==null;if(N){var de;return{x:nj({axis:f,ticks:v,bandSize:S,entry:_,index:O}),y:ve?null:(de=h.scale.map(W))!==null&&de!==void 0?de:null,value:$,payload:_}}return{x:ve?null:(z=f.scale.map(W))!==null&&z!==void 0?z:null,y:nj({axis:h,ticks:b,bandSize:S,entry:_,index:O}),value:$,payload:_}}),A;return w||E?A=C.map(_=>{var O,T=Array.isArray(_.value)?_.value[0]:null;if(N){var B;return{x:_.x,y:T!=null&&_.y!=null&&(B=h.scale.map(T))!==null&&B!==void 0?B:null,payload:_.payload}}return{x:T!=null&&(O=f.scale.map(T))!==null&&O!==void 0?O:null,y:_.y,payload:_.payload}}):A=N?h.scale.map(k):f.scale.map(k),{points:C,baseLine:A??0,isRange:E}}function GY(e){var t=sn(e,hO),r=Or();return x.createElement(bq,{id:t.id,type:"area"},n=>x.createElement(x.Fragment,null,x.createElement(qV,{legendPayload:TY(t)}),x.createElement(DY,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),x.createElement(Aq,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:Pz(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),x.createElement(WY,oh({},t,{id:n}))))}var mO=x.memo(GY,Hh);mO.displayName="Area";var VY=["domain","range"],qY=["domain","range"];function cN(e,t){if(e==null)return{};var r,n,i=QY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(c!=null)return fN(fN({},o),{},{type:c})},[o,c]);return x.useLayoutEffect(()=>{u!=null&&(r.current===null?t(Bq(u)):r.current!==u&&t(Uq({prev:r.current,next:u})),r.current=u)},[u,t]),x.useLayoutEffect(()=>()=>{r.current&&(t(Wq(r.current)),r.current=null)},[t]),null}var iZ=e=>{var t=e.xAxisId,r=e.className,n=Me(FA),i=Or(),o="xAxis",c=Me(v=>YP(v,o,t,i)),u=Me(v=>$W(v,t)),f=Me(v=>HW(v,t)),h=Me(v=>hP(v,t));if(u==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=kx(e,ZY);h.id,h.scale;var p=kx(h,XY);return x.createElement(ky,wx({},m,p,{x:f.x,y:f.y,width:u.width,height:u.height,className:nt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:c,axisType:o,axisId:t}))},aZ={allowDataOverflow:Ot.allowDataOverflow,allowDecimals:Ot.allowDecimals,allowDuplicatedCategory:Ot.allowDuplicatedCategory,angle:Ot.angle,axisLine:xi.axisLine,height:Ot.height,hide:!1,includeHidden:Ot.includeHidden,interval:Ot.interval,label:!1,minTickGap:Ot.minTickGap,mirror:Ot.mirror,orientation:Ot.orientation,padding:Ot.padding,reversed:Ot.reversed,scale:Ot.scale,tick:Ot.tick,tickCount:Ot.tickCount,tickLine:xi.tickLine,tickSize:xi.tickSize,type:Ot.type,niceTicks:Ot.niceTicks,xAxisId:0},oZ=e=>{var t=sn(e,aZ);return x.createElement(x.Fragment,null,x.createElement(nZ,{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}),x.createElement(iZ,t))},gO=x.memo(oZ,pO);gO.displayName="XAxis";var sZ=["type"],lZ=["dangerouslySetInnerHTML","ticks","scale"],cZ=["id","scale"];function jx(){return jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(c!=null)return mN(mN({},o),{},{type:c})},[c,o]);return x.useLayoutEffect(()=>{u!=null&&(r.current===null?t(Hq(u)):r.current!==u&&t(Kq({prev:r.current,next:u})),r.current=u)},[u,t]),x.useLayoutEffect(()=>()=>{r.current&&(t(Gq(r.current)),r.current=null)},[t]),null}function pZ(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,o=x.useRef(null),c=x.useRef(null),u=Me(FA),f=Or(),h=At(),m="yAxis",p=Me(N=>VW(N,t)),v=Me(N=>GW(N,t)),b=Me(N=>YP(N,m,t,f)),S=Me(N=>mP(N,t));if(x.useLayoutEffect(()=>{if(!(n!=="auto"||!p||vy(i)||x.isValidElement(i)||S==null)){var N=o.current;if(N){var E=N.getCalculatedWidth();Math.round(p.width)!==Math.round(E)&&h(Vq({id:t,width:E}))}}},[b,p,h,i,t,n,S]),p==null||v==null||S==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var w=Sx(e,lZ);S.id,S.scale;var k=Sx(S,cZ);return x.createElement(ky,jx({},w,k,{ref:o,labelRef:c,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:p.width,height:p.height,className:nt("recharts-".concat(m," ").concat(m),r),viewBox:u,ticks:b,axisType:m,axisId:t}))}var gZ={allowDataOverflow:_t.allowDataOverflow,allowDecimals:_t.allowDecimals,allowDuplicatedCategory:_t.allowDuplicatedCategory,angle:_t.angle,axisLine:xi.axisLine,hide:!1,includeHidden:_t.includeHidden,interval:_t.interval,label:!1,minTickGap:_t.minTickGap,mirror:_t.mirror,orientation:_t.orientation,padding:_t.padding,reversed:_t.reversed,scale:_t.scale,tick:_t.tick,tickCount:_t.tickCount,tickLine:xi.tickLine,tickSize:xi.tickSize,type:_t.type,niceTicks:_t.niceTicks,width:_t.width,yAxisId:0},vZ=e=>{var t=sn(e,gZ);return x.createElement(x.Fragment,null,x.createElement(mZ,{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}),x.createElement(pZ,t))},vO=x.memo(vZ,pO);vO.displayName="YAxis";var xZ=(e,t)=>t,Ey=Y([xZ,ht,CC,Wt,p3,Oi,pK,er],kK);function yZ(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Ay(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(yZ(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var c=(u,f)=>({relativeX:Math.round((u-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(u=>c(u.clientX,u.clientY)):c(e.clientX,e.clientY)}var xO=Ur("mouseClick"),yO=iu();yO.startListening({actionCreator:xO,effect:(e,t)=>{var r=e.payload,n=Ey(t.getState(),Ay(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(lH({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Nx=Ur("mouseMove"),bO=iu(),hs=null,Wa=null,Xg=null;bO.startListening({actionCreator:Nx,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=n.eventSettings,o=i.throttleDelay,c=i.throttledEvents,u=c==="all"||(c==null?void 0:c.includes("mousemove"));hs!==null&&(cancelAnimationFrame(hs),hs=null),Wa!==null&&(typeof o!="number"||!u)&&(clearTimeout(Wa),Wa=null),Xg=Ay(r);var f=()=>{var h=t.getState(),m=vu(h,h.tooltip.settings.shared);if(!Xg){hs=null,Wa=null;return}if(m==="axis"){var p=Ey(h,Xg);(p==null?void 0:p.activeIndex)!=null?t.dispatch(a3({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(i3())}hs=null,Wa=null};if(!u){f();return}o==="raf"?hs=requestAnimationFrame(f):typeof o=="number"&&Wa===null&&(Wa=setTimeout(f,o))}});function bZ(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var pN={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},wO=ur({name:"rootProps",initialState:pN,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:pN.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}}}),wZ=wO.reducer,kZ=wO.actions.updateOptions,jZ=null,SZ={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)},kO=ur({name:"polarOptions",initialState:jZ,reducers:SZ});kO.actions.updatePolarOptions;var NZ=kO.reducer,jO=Ur("keyDown"),SO=Ur("focus"),NO=Ur("blur"),um=iu(),ms=null,Ha=null,Xd=null;um.startListening({actionCreator:jO,effect:(e,t)=>{Xd=e.payload,ms!==null&&(cancelAnimationFrame(ms),ms=null);var r=t.getState(),n=r.eventSettings,i=n.throttleDelay,o=n.throttledEvents,c=o==="all"||o.includes("keydown");Ha!==null&&(typeof i!="number"||!c)&&(clearTimeout(Ha),Ha=null);var u=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var m=f.tooltip.keyboardInteraction,p=Xd;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var v=kc(m,No(f),Ys(f),Zs(f)),b=v==null?-1:Number(v),S=!Number.isFinite(b)||b<0,w=Oi(f),k=No(f),N=vu(f,f.tooltip.settings.shared);if(p==="Enter"){if(S)return;var E=th(f,N,"hover",String(m.index));t.dispatch(eh({active:!m.active,activeIndex:m.index,activeCoordinate:E}));return}var C=XW(f),A=C==="left-to-right"?1:-1,_=p==="ArrowRight"?1:-1,O;if(S){var T=Ys(f),B=Zs(f),z=_*A,$=ge=>({active:!1,index:String(ge),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(O=-1,z>0){for(var q=0;q=0;W--)if(kc($(W),k,T,B)!=null){O=W;break}if(O<0)return}else{O=b+_*A;var ve=(w==null?void 0:w.length)||k.length;if(ve===0||O>=ve||O<0)return}var de=th(f,N,"hover",String(O));t.dispatch(eh({active:!0,activeIndex:O.toString(),activeCoordinate:de}))}finally{ms=null,Ha=null}};if(!c){u();return}i==="raf"?ms=requestAnimationFrame(u):typeof i=="number"&&Ha===null&&(u(),Xd=null,Ha=setTimeout(()=>{Xd?u():(Ha=null,ms=null)},i))}});um.startListening({actionCreator:SO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;if(!i.active&&i.index==null){var o="0",c=vu(r,r.tooltip.settings.shared),u=th(r,c,"hover",String(o));t.dispatch(eh({active:!0,activeIndex:o,activeCoordinate:u}))}}}});um.startListening({actionCreator:NO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;i.active&&t.dispatch(eh({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function EO(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var Zr=Ur("externalEvent"),AO=iu(),Jd=new Map,pc=new Map,Jg=new Map;AO.startListening({actionCreator:Zr,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(n!=null){var o=i.type,c=EO(i);Jg.set(o,{handler:n,reactEvent:c});var u=Jd.get(o);u!==void 0&&(cancelAnimationFrame(u),Jd.delete(o));var f=t.getState(),h=f.eventSettings,m=h.throttleDelay,p=h.throttledEvents,v=p,b=v==="all"||(v==null?void 0:v.includes(o)),S=pc.get(o);S!==void 0&&(typeof m!="number"||!b)&&(clearTimeout(S),pc.delete(o));var w=()=>{var E=Jg.get(o);try{if(!E)return;var C=E.handler,A=E.reactEvent,_=t.getState(),O={activeCoordinate:eK(_),activeDataKey:ZH(_),activeIndex:Kc(_),activeLabel:x3(_),activeTooltipIndex:Kc(_),isTooltipActive:tK(_)};C&&C(O,A)}finally{Jd.delete(o),pc.delete(o),Jg.delete(o)}};if(!b){w();return}if(m==="raf"){var k=requestAnimationFrame(w);Jd.set(o,k)}else if(typeof m=="number"){if(!pc.has(o)){w();var N=setTimeout(w,m);pc.set(o,N)}}else w()}}});var EZ=Y([ml],e=>e.tooltipItemPayloads),AZ=Y([EZ,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var i=n.getPosition;if(i!=null)return i(t)}}}),CO=Ur("touchMove"),PO=iu(),Ka=null,ea=null,gN=null,gc=null;PO.startListening({actionCreator:CO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){gc=EO(r);var n=t.getState(),i=n.eventSettings,o=i.throttleDelay,c=i.throttledEvents,u=c==="all"||c.includes("touchmove");Ka!==null&&(cancelAnimationFrame(Ka),Ka=null),ea!==null&&(typeof o!="number"||!u)&&(clearTimeout(ea),ea=null),gN=Array.from(r.touches).map(h=>Ay({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(gc!=null){var h=t.getState(),m=vu(h,h.tooltip.settings.shared);if(m==="axis"){var p,v=(p=gN)===null||p===void 0?void 0:p[0];if(v==null){Ka=null,ea=null;return}var b=Ey(h,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(a3({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(m==="item"){var S,w=gc.touches[0];if(document.elementFromPoint==null||w==null)return;var k=document.elementFromPoint(w.clientX,w.clientY);if(!k||!k.getAttribute)return;var N=k.getAttribute(Lz),E=(S=k.getAttribute(Rz))!==null&&S!==void 0?S:void 0,C=Mo(h).find(O=>O.id===E);if(N==null||C==null||E==null)return;var A=C.dataKey,_=AZ(h,N,E);t.dispatch(sH({activeDataKey:A,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:E}))}Ka=null,ea=null}};if(!u){f();return}o==="raf"?Ka=requestAnimationFrame(f):typeof o=="number"&&ea===null&&(f(),gc=null,ea=setTimeout(()=>{gc?f():(ea=null,Ka=null)},o))}}});var OO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},_O=ur({name:"eventSettings",initialState:OO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),CZ=_O.actions.setEventSettings,PZ=_O.reducer,OZ=sA({brush:nQ,cartesianAxis:qq,chartData:JK,errorBars:dY,eventSettings:PZ,graphicalItems:Nq,layout:bz,legend:T8,options:qK,polarAxis:RV,polarOptions:NZ,referenceElements:sQ,renderedTicks:PQ,rootProps:wZ,tooltip:cH,zIndex:DK}),_Z=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return K$({reducer:OZ,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([yO.middleware,bO.middleware,um.middleware,AO.middleware,PO.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(kA({type:"raf"}))},devTools:{serialize:{replacer:bZ},name:"recharts-".concat(r)}})};function MZ(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,i=Or(),o=x.useRef(null);if(i)return r;o.current==null&&(o.current=_Z(t,n));var c=r0;return x.createElement(Y8,{context:c,store:o.current},r)}function IZ(e){var t=e.layout,r=e.margin,n=At(),i=Or();return x.useEffect(()=>{i||(n(vz(t)),n(gz(r)))},[n,i,t,r]),null}var TZ=x.memo(IZ,Hh);function DZ(e){var t=At();return x.useEffect(()=>{t(kZ(e))},[t,e]),null}var LZ=e=>{var t=At();return x.useEffect(()=>{t(CZ(e))},[t,e]),null},RZ=x.memo(LZ,Hh);function vN(e){var t=e.zIndex,r=e.isPanorama,n=x.useRef(null),i=At();return x.useLayoutEffect(()=>(n.current&&i(IK({zIndex:t,element:n.current,isPanorama:r})),()=>{i(TK({zIndex:t,isPanorama:r}))}),[i,t,r]),x.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function xN(e){var t=e.children,r=e.isPanorama,n=Me(SK);if(!n||n.length===0)return t;var i=n.filter(c=>c<0),o=n.filter(c=>c>0);return x.createElement(x.Fragment,null,i.map(c=>x.createElement(vN,{key:c,zIndex:c,isPanorama:r})),t,o.map(c=>x.createElement(vN,{key:c,zIndex:c,isPanorama:r})))}var $Z=["children"];function zZ(e,t){if(e==null)return{};var r,n,i=FZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=KA(),n=GA(),i=rC();if(!qn(r)||!qn(n))return null;var o=e.children,c=e.otherAttributes,u=e.title,f=e.desc,h,m;return c!=null&&(typeof c.tabIndex=="number"?h=c.tabIndex:h=i?0:void 0,typeof c.role=="string"?m=c.role:m=i?"application":void 0),x.createElement(NE,lh({},c,{title:u,desc:f,role:m,tabIndex:h,width:r,height:n,style:BZ,ref:t}),o)}),WZ=e=>{var t=e.children,r=Me(zh);if(!r)return null;var n=r.width,i=r.height,o=r.y,c=r.x;return x.createElement(NE,{width:n,height:i,x:c,y:o},t)},yN=x.forwardRef((e,t)=>{var r=e.children,n=zZ(e,$Z),i=Or();return i?x.createElement(WZ,null,x.createElement(xN,{isPanorama:!0},r)):x.createElement(UZ,lh({ref:t},n),x.createElement(xN,{isPanorama:!1},r))});function HZ(e,t){return qZ(e)||VZ(e,t)||GZ(e,t)||KZ()}function KZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GZ(e,t){if(e){if(typeof e=="string")return bN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bN(e,t):void 0}}function bN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n!=null){var c=n.getBoundingClientRect(),u=c.width/n.offsetWidth;Ke(u)&&u!==o&&e(yz(u))}},[n,e,o]),i}function wN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function YZ(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(lG(),null);function uh(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var aX=x.forwardRef((e,t)=>{var r,n,i=x.useRef(null),o=x.useState({containerWidth:uh((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:uh((n=e.style)===null||n===void 0?void 0:n.height)}),c=ch(o,2),u=c[0],f=c[1],h=x.useCallback((p,v)=>{f(b=>{var S=Math.round(p),w=Math.round(v);return b.containerWidth===S&&b.containerHeight===w?b:{containerWidth:S,containerHeight:w}})},[]),m=x.useCallback(p=>{if(typeof t=="function"&&t(p),i.current!=null&&(i.current.disconnect(),i.current=null),p!=null&&typeof ResizeObserver<"u"){var v=p.getBoundingClientRect(),b=v.width,S=v.height;h(b,S);var w=N=>{var E=N[0];if(E!=null){var C=E.contentRect,A=C.width,_=C.height;h(A,_)}},k=new ResizeObserver(w);k.observe(p),i.current=k}},[t,h]);return x.useEffect(()=>()=>{var p=i.current;p!=null&&p.disconnect()},[h]),x.createElement(x.Fragment,null,x.createElement(ou,{width:u.containerWidth,height:u.containerHeight}),x.createElement("div",ba({ref:m},e)))}),oX=x.forwardRef((e,t)=>{var r=e.width,n=e.height,i=x.useState({containerWidth:uh(r),containerHeight:uh(n)}),o=ch(i,2),c=o[0],u=o[1],f=x.useCallback((m,p)=>{u(v=>{var b=Math.round(m),S=Math.round(p);return v.containerWidth===b&&v.containerHeight===S?v:{containerWidth:b,containerHeight:S}})},[]),h=x.useCallback(m=>{if(typeof t=="function"&&t(m),m!=null){var p=m.getBoundingClientRect(),v=p.width,b=p.height;f(v,b)}},[t,f]);return x.createElement(x.Fragment,null,x.createElement(ou,{width:c.containerWidth,height:c.containerHeight}),x.createElement("div",ba({ref:h},e)))}),sX=x.forwardRef((e,t)=>{var r=e.width,n=e.height;return x.createElement(x.Fragment,null,x.createElement(ou,{width:r,height:n}),x.createElement("div",ba({ref:t},e)))}),lX=x.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?x.createElement(oX,ba({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?x.createElement(sX,ba({},e,{width:r,height:n,ref:t})):x.createElement(x.Fragment,null,x.createElement(ou,{width:r,height:n}),x.createElement("div",ba({ref:t},e)))});function cX(e){return e?aX:lX}var uX=x.forwardRef((e,t)=>{var r=e.children,n=e.className,i=e.height,o=e.onClick,c=e.onContextMenu,u=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,m=e.onMouseLeave,p=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,S=e.onTouchMove,w=e.onTouchStart,k=e.style,N=e.width,E=e.responsive,C=e.dispatchTouchEvents,A=C===void 0?!0:C,_=x.useRef(null),O=At(),T=x.useState(null),B=ch(T,2),z=B[0],$=B[1],q=x.useState(null),W=ch(q,2),ve=W[0],de=W[1],ge=QZ(),le=c0(),ie=(le==null?void 0:le.width)>0?le.width:N,X=(le==null?void 0:le.height)>0?le.height:i,te=x.useCallback(_e=>{ge(_e),typeof t=="function"&&t(_e),$(_e),de(_e),_e!=null&&(_.current=_e)},[ge,t,$,de]),re=x.useCallback(_e=>{O(xO(_e)),O(Zr({handler:o,reactEvent:_e}))},[O,o]),D=x.useCallback(_e=>{O(Nx(_e)),O(Zr({handler:h,reactEvent:_e}))},[O,h]),M=x.useCallback(_e=>{O(i3()),O(Zr({handler:m,reactEvent:_e}))},[O,m]),Q=x.useCallback(_e=>{O(Nx(_e)),O(Zr({handler:p,reactEvent:_e}))},[O,p]),ne=x.useCallback(()=>{O(SO())},[O]),ae=x.useCallback(()=>{O(NO())},[O]),ee=x.useCallback(_e=>{O(jO(_e.key))},[O]),se=x.useCallback(_e=>{O(Zr({handler:c,reactEvent:_e}))},[O,c]),me=x.useCallback(_e=>{O(Zr({handler:u,reactEvent:_e}))},[O,u]),U=x.useCallback(_e=>{O(Zr({handler:f,reactEvent:_e}))},[O,f]),ue=x.useCallback(_e=>{O(Zr({handler:v,reactEvent:_e}))},[O,v]),be=x.useCallback(_e=>{O(Zr({handler:w,reactEvent:_e}))},[O,w]),oe=x.useCallback(_e=>{A&&O(CO(_e)),O(Zr({handler:S,reactEvent:_e}))},[O,A,S]),Le=x.useCallback(_e=>{O(Zr({handler:b,reactEvent:_e}))},[O,b]),Ue=cX(E);return x.createElement(E3.Provider,{value:z},x.createElement(SR.Provider,{value:ve},x.createElement(Ue,{width:ie??(k==null?void 0:k.width),height:X??(k==null?void 0:k.height),className:nt("recharts-wrapper",n),style:YZ({position:"relative",cursor:"default",width:ie,height:X},k),onClick:re,onContextMenu:se,onDoubleClick:me,onFocus:ne,onBlur:ae,onKeyDown:ee,onMouseDown:U,onMouseEnter:D,onMouseLeave:M,onMouseMove:Q,onMouseUp:ue,onTouchEnd:Le,onTouchMove:oe,onTouchStart:be,ref:te},x.createElement(iX,null),r)))}),dX=["width","height","responsive","children","className","style","compact","title","desc"];function fX(e,t){if(e==null)return{};var r,n,i=hX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,i=e.responsive,o=e.children,c=e.className,u=e.style,f=e.compact,h=e.title,m=e.desc,p=fX(e,dX),v=kn(p);return f?x.createElement(x.Fragment,null,x.createElement(ou,{width:r,height:n}),x.createElement(yN,{otherAttributes:v,title:h,desc:m},o)):x.createElement(uX,{className:c,style:u,width:r,height:n,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},x.createElement(yN,{otherAttributes:v,title:h,desc:m,ref:t},x.createElement(mQ,null,o)))});function Ex(){return Ex=Object.assign?Object.assign.bind():function(e){for(var t=1;tx.createElement(wX,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:kX,tooltipPayloadSearcher:GK,categoricalChartProps:e,ref:t}));const SX="rgba(130,130,150,0.14)",SN="rgba(130,130,150,0.85)";function NX(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function MO(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function EX({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:s.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:s.jsx("div",{className:"space-y-1",children:t.map(n=>s.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[s.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),s.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),s.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:MO(n.value,r)})]},n.dataKey))})})}function IO({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176}){const o=e.reduce((u,f)=>t.reduce((h,m)=>Math.max(h,Number(f[m.key])||0),u),0),c=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(NX(o*1.15),10);return s.jsx("div",{style:{height:i},className:"w-full",children:s.jsx(g8,{width:"100%",height:"100%",children:s.jsxs(jX,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[s.jsx("defs",{children:t.map(u=>s.jsxs("linearGradient",{id:`grad-${u.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u.color,stopOpacity:.22}),s.jsx("stop",{offset:"100%",stopColor:u.color,stopOpacity:0})]},u.key))}),s.jsx(nO,{vertical:!1,stroke:SX}),s.jsx(gO,{dataKey:"t",hide:!0}),s.jsx(vO,{domain:[0,c],ticks:[0,c/2,c],tickFormatter:u=>MO(u,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:SN}}),s.jsx(wG,{content:s.jsx(EX,{unit:r}),cursor:{stroke:SN,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(u=>s.jsx(mO,{type:"monotone",dataKey:u.key,name:u.label,stroke:u.color,strokeWidth:2,fill:`url(#grad-${u.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},u.key))]})})})}const AX=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function TO(){var c,u,f,h;const{sys:e,hist:t}=hR(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=AX.filter(m=>m.key!=="gpu"||r),i={cpu:(c=e==null?void 0:e.cpu)==null?void 0:c.percent,ram:(u=e==null?void 0:e.ram)==null?void 0:u.percent,gpu:r?e.gpu.busy_percent:null,disk:(f=e==null?void 0:e.disk)==null?void 0:f.percent},o={cpu:(h=e==null?void 0:e.cpu)!=null&&h.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Jr(e.ram.used)}/${Jr(e.ram.total)} GB`:"",gpu:r?`${Jr(e.gpu.gtt_used)}/${Jr(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Jr(e.disk.used)}/${Jr(e.disk.total)} GB`:""};return s.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[s.jsx(yi,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),s.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(m=>s.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[s.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:m.color}}),s.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:m.label}),s.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(i[m.key]??0),"%"]}),o[m.key]&&s.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[m.key]})]},m.key))}),s.jsx(IO,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):s.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&s.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&s.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&s.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}const NN=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function DO(){const{data:e}=dE(3e3),t=lR(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[s.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(hh,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),s.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&s.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[s.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&s.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[s.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",s.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),s.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),s.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:NN.map(i=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:i.label}),s.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[i.key])??0)})]},i.key))})]}),e?s.jsx(IO,{data:t,series:NN,unit:" tok/s",yMode:"auto",height:150}):s.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),s.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}function CX(){const{data:e}=wh(3e4),{data:t}=Si(),r=((e==null?void 0:e.os)||0)+((e==null?void 0:e.engine)||0)+((e==null?void 0:e.swap)||0)+((e==null?void 0:e.models)||0),n=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}})),i=(t==null?void 0:t.models)??[],o=(t==null?void 0:t.running)??[],c=i.find(m=>m.role==="hermes"),u=i.find(m=>m.role==="coder-lite")||i.find(m=>m.role==="coder"),f=m=>m?o.includes(m):!1,h=m=>{var p;return((p=m==null?void 0:m.split("/").pop())==null?void 0:p.replace(/\.gguf$/i,""))||"—"};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Basisstation"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Geht's der Box gut, gibt's Updates, was läuft gerade."})]}),s.jsx(dR,{frame:"box"}),s.jsxs("button",{onClick:n,className:J("w-full flex items-center gap-3 rounded-2xl border p-4 text-left transition-all cursor-pointer",r>0?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10":"border-border/60 bg-card/45 hover:border-primary/40"),children:[r>0?s.jsx(FM,{className:"h-6 w-6 shrink-0 text-amber-400"}):s.jsx(Mt,{className:"h-6 w-6 shrink-0 text-emerald-400"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:J("text-sm font-semibold",r>0?"text-amber-400":"text-foreground"),children:r>0?`${r} Update${r===1?"":"s"} verfügbar`:"Alles aktuell"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:r>0?"Antippen, um zu sehen, was genau aktualisiert wird.":"Keine ausstehenden Updates."})]}),r>0&&s.jsxs("span",{className:"shrink-0 flex items-center gap-1 text-xs font-semibold text-amber-400",children:["Ansehen ",s.jsx(Kn,{className:"h-4 w-4"})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:"Was gerade läuft"}),s.jsx("div",{className:"rounded-2xl border border-border/60 overflow-hidden",children:[{icon:yi,label:"Lucys Hirn",model:c==null?void 0:c.name,warm:f(c==null?void 0:c.name)},{icon:Fs,label:"Coder (Vibe-Coding)",model:u==null?void 0:u.name,warm:f(u==null?void 0:u.name)}].map(m=>s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/40 last:border-0",children:[s.jsx("span",{className:J("h-2 w-2 shrink-0 rounded-full",m.warm?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),s.jsx(m.icon,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsx("span",{className:"text-sm text-foreground w-40 shrink-0",children:m.label}),s.jsx("span",{className:"text-xs text-muted-foreground flex-1 truncate font-mono",children:h(m.model)}),s.jsx("span",{className:J("text-xs shrink-0",m.warm?"text-emerald-400":"text-muted-foreground"),children:m.model?m.warm?"warm":"bereit":"nicht gesetzt"})]},m.label))})]}),s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsx(TO,{}),s.jsx(DO,{})]})]})}const PX=e=>!!dt(e).protected;function OX({role:e,roleRec:t,models:r,onAssign:n,onClose:i}){var f,h;const o=t&&t.role===e?t:null,c={};o==null||o.models.forEach(m=>{c[m.name]=m});const u=o?o.models.map(m=>r.find(p=>p.name===m.name)).filter(Boolean):r;return s.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":`${dt(e).label} konfigurieren`,children:s.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[s.jsx(mo,{role:e})," festlegen"]}),s.jsx("button",{onClick:i,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für ",s.jsx("strong",{className:"text-foreground",children:dt(e).label}),s.jsx("span",{className:"block text-[10px] text-muted-foreground/70 mt-0.5",children:dt(e).desc})]}),(o==null?void 0:o.recommended)&&s.jsxs("button",{onClick:()=>n(o.recommended),title:(f=c[o.recommended])==null?void 0:f.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[s.jsx(wa,{className:"h-3 w-3"})," Auto: ",(h=o.recommended.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")]})]}),s.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[PX(e)?s.jsx("div",{className:"w-full px-3 py-2 rounded-lg text-[11px] text-muted-foreground border border-border/30 bg-background/20 flex items-center gap-1.5",children:"🔒 Diese Rolle ist lebenswichtig und kann nicht leer bleiben — wähle stattdessen ein anderes Modell."}):s.jsx("button",{onClick:()=>n(""),className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:s.jsx("span",{children:"Zuweisung entfernen"})}),u.map(m=>{var w;const p=c[m.name],v=m.role===e,b=!!(p!=null&&p.recommended),S=!!p&&!p.suitable;return s.jsxs("button",{onClick:()=>n(m.name),className:J("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border",b?"border-primary/50 bg-primary/10":v?"text-primary font-bold bg-primary/5 border-primary/30":S?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[s.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[s.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(w=m.name.split("/").pop())==null?void 0:w.replace(/\.gguf$/i,""),b&&s.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),s.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:p?`${p.params_b}B · ${m.quant} · ${p.reason}`:`${lr(m.size_bytes)} · ${m.quant}`})]}),v&&s.jsx(Mt,{className:"h-4 w-4 shrink-0 text-primary"})]},m.name)})]})]})})}const _X=["fast","heavy","heavy_chars"],MX=["coder_lite","coder","coding_escalate_chars"];function IX(){const e=Hr(),{data:t,isLoading:r}=bL(),[n,i]=x.useState(null),[o,c]=x.useState(!1),[u,f]=x.useState(""),[h,m]=x.useState(0);if(x.useEffect(()=>{t!=null&&t.policy&&!n&&i({...t.policy})},[t,n]),r||!t||!n)return s.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-xs text-muted-foreground",children:"Lade Routing-Policy…"});const p=N=>t.fields.find(E=>E.key===N),v=Object.keys(n).some(N=>n[N]!==t.policy[N]),b=(N,E)=>{i(C=>C&&{...C,[N]:E}),f("")},S=N=>b(N,t.defaults[N]);async function w(){if(!n)return;const N={};for(const E of Object.keys(n))n[E]!==t.policy[E]&&(N[E]=n[E]);if(Object.keys(N).length!==0){c(!0),f("");try{const{policy:E}=await mL(N);i({...E}),e.invalidateQueries({queryKey:ze.routingPolicy}),e.invalidateQueries({queryKey:ze.routing}),m(Date.now()),setTimeout(()=>m(0),2e3)}catch(E){f(E.message||String(E))}finally{c(!1)}}}function k({k:N}){const E=p(N),C=n[N],A=n[N]===t.defaults[N];return s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("label",{className:"text-[10px] font-semibold text-muted-foreground",children:E.label}),!A&&s.jsxs("button",{onClick:()=>S(N),className:"flex items-center gap-0.5 text-[9px] text-muted-foreground/60 hover:text-foreground transition-colors cursor-pointer",title:`Auf Default zurücksetzen (${String(t.defaults[N])||"leer"})`,children:[s.jsx(Rx,{className:"h-2.5 w-2.5"})," Default"]})]}),E.type==="bool"?s.jsxs("button",{onClick:()=>b(N,!C),className:J("flex h-8 w-full items-center justify-between rounded-lg border px-3 text-[11px] font-semibold transition-all cursor-pointer",C?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-border/40 bg-background/40 text-muted-foreground"),children:[s.jsx("span",{children:C?"An":"Aus"}),s.jsx("span",{className:J("h-3.5 w-3.5 rounded-full transition-colors",C?"bg-emerald-400":"bg-muted-foreground/40")})]}):E.type==="int"?s.jsx("input",{type:"number",value:C,min:E.min,max:E.max,"aria-label":E.label,onChange:_=>b(N,Number(_.target.value)),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"}):s.jsx("input",{type:"text",value:C,"aria-label":E.label,spellCheck:!1,placeholder:N==="coder_lite"?"(leer = aus)":"",onChange:_=>b(N,_.target.value),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"})]})}return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(kI,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lane-Routing & Policy"}),s.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-300 border border-emerald-500/20",children:"hot-reload"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[u&&s.jsx("span",{className:"text-[10px] text-red-400 max-w-[280px] truncate",title:u,children:u}),h>0&&s.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-400",children:[s.jsx(Mt,{className:"h-3.5 w-3.5"})," gespeichert"]}),s.jsxs("button",{onClick:w,disabled:!v||o,className:J("h-8 px-4 rounded-lg text-[10px] font-bold uppercase tracking-wide transition-all flex items-center gap-1.5",v&&!o?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer shadow-md shadow-primary/10":"bg-background/40 text-muted-foreground/50 border border-border/40 cursor-not-allowed"),children:[o?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):null,"Speichern"]})]})]}),s.jsxs("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed -mt-1",children:["Welches echte Modell hinter den virtuellen Lanes ",s.jsx("code",{className:"text-cyan-300",children:"chat"})," und"," ",s.jsx("code",{className:"text-cyan-300",children:"coding"})," steckt. Änderungen greifen sofort (kein Neustart). Die Keyword-Heuristiken bleiben im Code."]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[s.jsx(cI,{className:"h-4 w-4 text-teal-400"}),s.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"chat"}),s.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(= auto)"})]}),_X.map(N=>s.jsx(k,{k:N},N))]}),s.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[s.jsx(HM,{className:"h-4 w-4 text-indigo-400"}),s.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"coding"}),s.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(agentisch → immer Coder)"})]}),MX.map(N=>s.jsx(k,{k:N},N))]})]}),s.jsx("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4",children:s.jsx("div",{className:"max-w-xs",children:s.jsx(k,{k:"fast_no_think"})})})]})}function TX(){var ve,de,ge;const e=Hr(),{data:t}=Si(4e3),{data:r}=Gx(),{data:n}=Co(),{data:i}=fE(),{showAlert:o,dialogElement:c}=Nn(),[u,f]=x.useState(!1),[h,m]=x.useState(!1),p=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=(ve=r==null?void 0:r.groups)==null?void 0:ve.brains,S=(b==null?void 0:b.members)??[],w=le=>p.find(ie=>ie.name===le),k=le=>{var ie;return((ie=le.split("/").pop())==null?void 0:ie.replace(/\.gguf$/i,""))||le},N=S.map(w).filter(Boolean),E=1024**3,C=i==null?void 0:i.budget,A=N.reduce((le,ie)=>le+(ie.size_bytes||0),0)/E,_=((de=n==null?void 0:n.gpu)==null?void 0:de.gtt_total)||((ge=n==null?void 0:n.gpu)==null?void 0:ge.vram_total)||0,O=(C==null?void 0:C.gtt_gb)||(_?_/E:0),T=(C==null?void 0:C.warm_projected_gb)??A,B=O>0?Math.min(100,T/O*100):0,z=p.filter(le=>!S.includes(le.name)&&!le.incomplete);async function $(le){m(!0);try{await sE("brains",le,(b==null?void 0:b.swap)??!1,(b==null?void 0:b.persist)??!0),e.invalidateQueries({queryKey:ze.groups}),e.invalidateQueries({queryKey:ze.models}),e.invalidateQueries({queryKey:ze.hermesBrain})}catch(ie){o("Fehler",`Immer-bereit-Set konnte nicht geändert werden: ${(ie==null?void 0:ie.message)||ie}`)}finally{m(!1)}}function q(le){const ie=w(le);if(ie&&dt(ie.role).protected){o("Geschützt",`„${dt(ie.role).label}" ist lebenswichtig und bleibt immer bereit.`);return}$(S.filter(X=>X!==le))}function W(le){f(!1),$([...S,le])}return b?s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[s.jsx(EN,{}),s.jsxs("div",{className:"space-y-1.5",children:[N.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground",children:"Noch keine Modelle im Set."}),N.map(le=>{const ie=v.includes(le.name),X=dt(le.role).protected;return s.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[s.jsx("span",{className:J("h-2 w-2 shrink-0 rounded-full ring-2 ring-black/40",ie?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40"),title:ie?"Gerade warm (bereit)":"Reserviert — lädt bei Bedarf sofort"}),le.role&&s.jsx(mo,{role:le.role,dense:!0,className:"shrink-0"}),s.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",title:le.name,children:k(le.name)}),s.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:lr(le.size_bytes)})]}),X?s.jsx("span",{className:"shrink-0 text-[10px] font-semibold text-muted-foreground",title:"Lebenswichtig — bleibt immer im Set.",children:"🔒"}):s.jsx("button",{onClick:()=>q(le.name),disabled:h,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground transition-colors hover:bg-red-500/5 hover:text-red-400 cursor-pointer disabled:opacity-50",title:"Aus dem Immer-bereit-Set nehmen (lädt dann nur noch bei Bedarf)",children:s.jsx(Br,{className:"h-3.5 w-3.5"})})]},le.name)})]}),s.jsxs("button",{onClick:()=>f(!0),disabled:h||z.length===0,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border/50 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary cursor-pointer disabled:opacity-50",children:[s.jsx(hf,{className:"h-3.5 w-3.5"})," Modell dauerhaft bereithalten"]}),s.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",title:"Modellgewichte + KV-Cache, berechnet aus den echten Architektur-Daten jedes Modells (Layer × KV-Köpfe × Kontext) und seiner KV-Quantisierung. So viel legt llama.cpp beim Laden wirklich für den eingestellten Kontext an — kein Aufschlag mehr.",children:[s.jsx(ga,{className:"h-3.5 w-3.5"})," Reserviert fürs Set"]}),s.jsxs("span",{className:"font-mono font-bold text-foreground",children:[T.toFixed(1),O>0?` / ${O.toFixed(0)}`:""," GB"]})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:s.jsx("div",{className:J("h-full rounded-full transition-all duration-500",B>=85?"bg-red-500":B>=65?"bg-amber-500":"bg-teal-500"),style:{width:`${B}%`}})}),C&&!C.fits&&s.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-[11px] text-amber-400",children:[s.jsx(vr,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),s.jsxs("span",{children:["Zusammen mit dem größten Gelegenheits-Modell (~",C.largest_ondemand_gb," GB) wird der Speicher knapp. Das Set bleibt dabei immer geladen — wird es wirklich eng, schlägt das Laden des großen Modells fehl (es wartet dann, statt das Set zu verdrängen)."]})]}),C&&C.fits&&s.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-emerald-400",children:[s.jsx(Mt,{className:"h-3.5 w-3.5 shrink-0"})," Passt auch neben dem größten Gelegenheits-Modell — nichts wird verdrängt."]})]}),u&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":"Modell zum Immer-bereit-Set hinzufügen",children:s.jsxs("div",{className:"w-full max-w-md space-y-3 rounded-2xl border border-border/80 bg-card p-6 shadow-2xl animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Dauerhaft bereithalten"}),s.jsx("button",{onClick:()=>f(!1),className:"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Wähle ein Modell, das ohne Ladezeit bereitstehen soll:"}),s.jsx("div",{className:"max-h-60 space-y-1.5 overflow-y-auto pr-1",children:z.map(le=>s.jsxs("button",{onClick:()=>W(le.name),className:"flex w-full items-center justify-between gap-2 rounded-lg border border-border/30 bg-background/20 px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[le.role&&s.jsx(mo,{role:le.role,dense:!0,className:"shrink-0"}),s.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",children:k(le.name)})]}),s.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:lr(le.size_bytes)})]},le.name))})]})}),c]}):s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[s.jsx(EN,{}),s.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Es gibt noch kein Immer-bereit-Set. Es entsteht automatisch, sobald Lucys Hirn zugewiesen ist."}),c]})}function EN(){return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(wa,{className:"h-4.5 w-4.5 text-primary"}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-bold uppercase tracking-wide text-foreground",children:"Immer-bereit-Set"}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Diese Modelle hält Lucy immer bereit — sie antworten ohne Ladezeit."})]})]})}function DX(){var Ue,_e,mt,tr;const e=Hr(),{data:t,isLoading:r,error:n}=Si(4e3),{data:i}=wh(4e3),{data:o}=fE(),{data:c}=Co(),{data:u}=Gx(),{showAlert:f,showConfirm:h,showPrompt:m,dialogElement:p}=Nn(),v=Wx(),b=K=>!!dt(K).protected,S=(t==null?void 0:t.models)??[],w=(t==null?void 0:t.running)??[],k=n?String(n):"",N=()=>{e.invalidateQueries({queryKey:ze.models}),e.invalidateQueries({queryKey:ze.routing})},E=(Ue=u==null?void 0:u.groups)==null?void 0:Ue.brains,C=(E==null?void 0:E.members)??[],A=K=>C.includes(K),_=C.some(K=>w.includes(K));async function O(K){if(!E){f("Keine brains-Gruppe","Es existiert noch keine Ko-Residenz-Gruppe „brains“ in der Engine-Konfiguration. Lege sie erst über die Gruppen-Verwaltung an.");return}const Pe=C.includes(K)?C.filter(Ze=>Ze!==K):[...C,K];try{await sE("brains",Pe,E.swap??!1,E.persist??!0),e.invalidateQueries({queryKey:ze.groups}),N()}catch(Ze){f("Fehler",`Ko-Residenz konnte nicht geändert werden: ${Ze.message||Ze}`)}}const[T,B]=x.useState(null),[z,$]=x.useState(null),[q,W]=x.useState(null),[ve,de]=x.useState("grid"),[ge,le]=x.useState("all"),ie=S.filter(K=>ge==="in_use"?!!K.role||w.includes(K.name):!0);async function X(K){try{await ye(`/api/models/${encodeURIComponent(K)}/load`,{method:"POST"}),N()}catch(Ce){f("Fehler",`Fehler beim Laden des Modells: ${Ce.message}`)}}async function te(K){if(E&&_&&!A(K)){const Ce=C.filter(Pe=>w.includes(Pe)).map(Pe=>Pe.split("/").pop()).join(", ");h("Verdrängt das Hirn?",`„${K.split("/").pop()}“ ist nicht in der Ko-Residenz-Gruppe „brains“. Beim Laden wirft es das aktuell warme Hirn (${Ce}) raus — Lucy verliert Hirn bzw. Augen. + +Trotzdem exklusiv laden? Tipp: Mit dem 🧠-Schalter machst du das Modell dauerhaft ko-resident, dann bleiben beide warm.`,()=>X(K));return}X(K)}async function re(K){const Ce=S.find(Pe=>Pe.name===K);if(Ce&&b(Ce.role)){f("Geschützt",`„${dt(Ce.role).label}" ist lebenswichtig für Lucy und bleibt geladen. Zum Entladen erst im Experten-Modus die Rolle einem anderen Modell geben.`);return}try{await ye(`/api/models/${encodeURIComponent(K)}/unload`,{method:"POST"}),N()}catch(Pe){f("Fehler",`Fehler beim Entladen des Modells: ${Pe.message}`)}}async function D(){try{await ye("/api/models/unload",{method:"POST"}),N()}catch(K){f("Fehler",`Fehler beim Entladen aller Modelle: ${K.message}`)}}async function M(K,Ce){try{const Pe=await ye(`/api/models/${encodeURIComponent(Ce)}/role`,{method:"POST",body:JSON.stringify({role:K||null})});N(),Pe!=null&&Pe.warning&&f("Hirn gesetzt — Hinweis",Pe.warning)}catch(Pe){f("Fehler",`Fehler beim Zuweisen der Rolle: ${Pe.message||Pe}`)}}function Q(K){B(K),$(null),ye(`/api/roles/${encodeURIComponent(K)}/recommend`).then(Ce=>$(Ce)).catch(()=>{})}async function ne(K,Ce){let Pe=null;try{Pe=await ye(`/api/models/${encodeURIComponent(K)}/ctx/auto`)}catch{}const Ze=Pe?`Optimal für dein Setup: ${(Pe.ctx/1024).toFixed(0)}k (${Pe.ctx}) — GTT ${Pe.gtt_gb} GB − reserviert ${Pe.reserved_gb} GB (${Pe.mode}) → ${Pe.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";m("Kontextlänge anpassen",Ze,String(Ce||32768),async et=>{if(et)try{await ye(`/api/models/${encodeURIComponent(K)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(et,10)})}),N()}catch(dr){f("Fehler",`Fehler beim Setzen des Kontexts: ${dr.message||dr}`)}},void 0,Pe?{autoValue:String(Pe.ctx),autoLabel:`Auto (${(Pe.ctx/1024).toFixed(0)}k)`}:void 0)}async function ae(K){const Ce=S.find(Pe=>Pe.name===K);if(Ce&&b(Ce.role)){f("Geschützt",`„${dt(Ce.role).label}" ist lebenswichtig für Lucy und kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}h("Modell löschen?",`Modell '${K}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await ye(`/api/models/${encodeURIComponent(K)}`,{method:"DELETE"}),N()}catch(Pe){f("Fehler",`Fehler beim Löschen: ${Pe.message||Pe}`)}})}async function ee(K,Ce,Pe,Ze){try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:Ce,quant:Pe,jinja:Ze})}),f("Herunterladen gestartet",`Download für '${K}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(et){f("Fehler",`Fehler beim Starten des Upgrades: ${et.message||et}`)}}async function se(K){const Ce=o==null?void 0:o.budget,Pe=Ce&&!Ce.fits?` + +⚠ Speicher-Warnung: Dieses Brain (~${Ce.brain_gb} GB) bleibt immer resident (persistent). Zusammen mit dem größten on-demand-Modell (~${Ce.largest_ondemand_gb} GB) sprengt das das Budget (${Ce.gtt_gb} GB) → beim Laden von heavy/coder droht ein Überlauf. Erwäge ein kleineres Brain oder weniger Kontext.`:"";h("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${K.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Pe}`,async()=>{try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:"hermes",quant:"Q4_K_M",jinja:!0})}),f("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),N()}catch(Ze){f("Fehler",`Update fehlgeschlagen: ${Ze.message||Ze}`)}})}if(r)return s.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(k)return s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",k,")."]});const me=S.filter(K=>w.includes(K.name)),U=me.reduce((K,Ce)=>K+(Ce.size_bytes||0),0),ue=((_e=c==null?void 0:c.gpu)==null?void 0:_e.gtt_total)||((mt=c==null?void 0:c.gpu)==null?void 0:mt.vram_total)||0,be=((tr=c==null?void 0:c.gpu)==null?void 0:tr.gtt_used)||0,oe=16*1024**3,Le=ue>2*1024**3?ue:U>oe?U*1.2:oe;return s.jsxs("div",{className:"space-y-8",children:[s.jsx("style",{children:` + @keyframes flow-dash { + to { + stroke-dashoffset: -20; + } + } + .svg-flow-path { + stroke-dasharray: 4 6; + animation: flow-dash 1s linear infinite; + } + `}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ga,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",lr(U)," Gewichte",be>0?` · ${lr(be)} real belegt (inkl. KV)`:""," / ",lr(Le)]}),v&&w.length>0&&s.jsx("button",{onClick:D,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),s.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:me.length===0?s.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):me.map((K,Ce)=>{var et;const Pe=(K.size_bytes||0)/Le*100,Ze=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][Ce%4];return s.jsxs("div",{style:{width:`${Pe}%`},className:J("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",Ze),title:`${K.name} (${lr(K.size_bytes)})`,children:[s.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[K.role?`[${dt(K.role).short}] `:"",(et=K.name.split("/").pop())==null?void 0:et.replace(".gguf","")]}),s.jsx("span",{className:"text-[8px] font-mono opacity-80",children:lr(K.size_bytes)})]},K.name)})})]}),s.jsx(TX,{}),v&&s.jsx(IX,{}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[s.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:v?"Gateway Steckplatz-Belegung (Slot-Zuweisung)":"Wer macht was bei Lucy — zum Ändern antippen"}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:AL.map(K=>{var Ze;const Ce=S.find(et=>et.role===K),Pe=Ce?w.includes(Ce.name):!1;return s.jsxs("div",{onClick:()=>Q(K),className:J("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",Pe?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":Ce?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(mo,{role:K}),Pe&&s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),s.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:Ce==null?void 0:Ce.name,children:Ce?(Ze=Ce.name.split("/").pop())==null?void 0:Ze.replace(/\.gguf$/i,""):"nicht zugewiesen"}),s.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},K)})})]}),(o==null?void 0:o.current)&&s.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Hn,{className:"h-4.5 w-4.5 text-indigo-400"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),o.current.version!=null&&s.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",o.current.version]})]}),s.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"agent"}})),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",title:"Hirn-Wechsel passiert jetzt zentral im Hermes-Tab",children:"Im Hermes-Tab wechseln →"})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:o.current.name,children:o.current.name.split("/").pop()}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[s.jsx("span",{children:o.current.params_b?`${o.current.params_b}B`:"—"}),s.jsx("span",{children:"•"}),s.jsx("span",{children:o.current.quant||"GGUF"}),s.jsx("span",{children:"•"}),s.jsx("span",{children:lr(o.current.size_bytes||0)})]})]}),o.update_available&&o.recommended?s.jsxs("button",{onClick:()=>se(o.recommended.repo),className:J("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",o.budget&&!o.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[s.jsx(Bs,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):s.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[s.jsx(Mt,{className:"h-4 w-4"})," Neueste Generation"]})]}),o.update_available&&o.recommended&&s.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",s.jsx("span",{className:"font-mono font-bold",children:o.recommended.name.replace(/-GGUF$/i,"")}),"(v",o.recommended.version,", ",o.recommended.params_b,"B) — von NousResearch."]}),o.budget&&s.jsxs("div",{className:J("text-[10px] flex items-start gap-1.5 leading-relaxed",o.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[s.jsx(ga,{className:"h-3 w-3 shrink-0 mt-0.5"}),s.jsxs("span",{children:["Always-On-Brain ~",o.budget.brain_gb," GB + größtes on-demand (~",o.budget.largest_ondemand_gb," GB) = ",(o.budget.brain_gb+o.budget.largest_ondemand_gb).toFixed(1)," / ",o.budget.gtt_gb," GB",o.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[s.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",ie.length," von ",S.length,")"]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[s.jsx("button",{onClick:()=>le("all"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),s.jsx("button",{onClick:()=>le("in_use"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),s.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[s.jsx("button",{onClick:()=>de("grid"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ve==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),s.jsx("button",{onClick:()=>de("list"),className:J("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ve==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),ve==="grid"?s.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:ie.length===0?s.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:ge==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ie.map(K=>{const Ce=w.includes(K.name),Pe=i==null?void 0:i.model_list.find(et=>et.role===K.role),Ze=pf(K.name);return s.jsxs("div",{className:J("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",Ce?"border-primary/45 shadow-primary/5":K.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"flex items-start justify-between gap-3",children:s.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[s.jsx("div",{className:J("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Ze.color),title:Ze.name,children:Ze.initial}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:K.name,children:K.name.split("/").pop()}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[s.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:K.quant||"GGUF"}),Ce&&s.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[s.jsx(hh,{className:"h-3 w-3 animate-pulse"})," Warm"]}),K.role&&s.jsx(mo,{role:K.role,dense:!0}),b(K.role)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[9px] font-semibold text-muted-foreground",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&A(K.name)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[9px] font-mono text-fuchsia-300 font-bold uppercase",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm, verdrängt es nicht.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),v&&(K.spec_active?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),s.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:s.jsx(Pv,{caps:K.capabilities})})]}),s.jsxs("div",{className:"space-y-3 pt-1",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[s.jsx(ga,{className:"h-3.5 w-3.5 text-primary/80"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),s.jsx("div",{className:"text-foreground font-semibold",children:lr(K.size_bytes)})]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[s.jsx(f5,{className:"h-3.5 w-3.5 text-primary/80"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),s.jsx("div",{className:"text-foreground font-semibold",children:Cv(K.ctx)})]})]})]}),Pe&&s.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[s.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),s.jsxs("span",{children:["Upgrade verfügbar: ",Pe.repo.split("/").pop()]})]}),s.jsxs("button",{onClick:()=>ee(Pe.repo,K.role,K.quant||"Q4_K_M",K.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[s.jsx(Bs,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[(()=>{const et=b(K.role),dr=Ce&&et,Mi=K.incomplete&&!Ce||dr;return s.jsx("button",{onClick:()=>Ce?re(K.name):te(K.name),disabled:Mi,title:dr?`„${dt(K.role).label}" bleibt geladen (geschützt).`:void 0,className:J("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",Mi?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ce?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:dr?"🔒 geladen":Ce?"Entladen":"Laden"})})(),v&&s.jsx("button",{onClick:()=>ne(K.name,K.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),v&&E&&s.jsx("button",{onClick:()=>O(K.name),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",A(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:A(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&s.jsxs("button",{onClick:()=>W(K),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[s.jsx(wa,{className:"h-3 w-3"})," Spec"]}),s.jsx("button",{onClick:()=>ae(K.name),disabled:b(K.role),className:J("h-7 w-7 rounded-lg border border-border/40 flex items-center justify-center transition-colors",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${dt(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:s.jsx(Us,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})}):s.jsx("div",{className:"space-y-2",children:ie.length===0?s.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:ge==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ie.map(K=>{const Ce=w.includes(K.name),Pe=pf(K.name);return s.jsxs("div",{className:J("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",Ce?"border-primary/45":K.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx("div",{className:J("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Pe.color),title:Pe.name,children:Pe.initial}),s.jsxs("div",{className:"min-w-0 text-left",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:K.name,children:K.name.split("/").pop()}),K.role&&s.jsx(mo,{role:K.role,dense:!0,className:"shrink-0"}),b(K.role)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[8px] font-semibold text-muted-foreground shrink-0",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&A(K.name)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[8px] font-mono text-fuchsia-300 font-bold uppercase shrink-0",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),v&&(K.spec_active?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),Ce&&s.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[s.jsxs("span",{children:["Größe: ",lr(K.size_bytes)]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Kontext: ",Cv(K.ctx)]}),s.jsx("span",{children:"•"}),s.jsx("span",{className:"font-mono text-[9px]",children:K.quant||"GGUF"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[s.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:s.jsx(Pv,{caps:K.capabilities})}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[(()=>{const Ze=b(K.role),et=Ce&&Ze,dr=K.incomplete&&!Ce||et;return s.jsx("button",{onClick:()=>Ce?re(K.name):te(K.name),disabled:dr,title:et?`„${dt(K.role).label}" bleibt geladen (geschützt).`:void 0,className:J("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",dr?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ce?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:et?"🔒 geladen":Ce?"Entladen":"Laden"})})(),v&&s.jsx("button",{onClick:()=>ne(K.name,K.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),v&&E&&s.jsx("button",{onClick:()=>O(K.name),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",A(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:A(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&s.jsxs("button",{onClick:()=>W(K),className:J("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[s.jsx(wa,{className:"h-3 w-3"})," Spec"]}),s.jsx("button",{onClick:()=>ae(K.name),disabled:b(K.role),className:J("h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 transition-all",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${dt(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:s.jsx(Us,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})})]}),T&&s.jsx(OX,{role:T,roleRec:z,models:S,onAssign:K=>{M(T,K),B(null)},onClose:()=>B(null)}),q&&s.jsx(pE,{model:q,onClose:()=>W(null),onChanged:N}),p]})}function ev({icon:e,title:t,sub:r,onClick:n}){return s.jsxs("button",{onClick:n,className:"w-full flex items-center gap-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-left transition-all hover:border-primary/40 cursor-pointer",children:[s.jsx(e,{className:"h-6 w-6 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-sm text-foreground",children:t}),s.jsx("div",{className:"text-xs text-muted-foreground",children:r})]}),s.jsx(Kn,{className:"h-5 w-5 text-muted-foreground shrink-0"})]})}function LX(){const[e,t]=x.useState(null);return e?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("button",{onClick:()=>t(null),className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[s.jsx(e5,{className:"h-4 w-4"})," Maschinenraum"]}),e==="modelle"?s.jsx(DX,{}):s.jsx(xE,{})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Maschinenraum"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nur nötig, wenn du wirklich was ändern willst."})]}),s.jsx(oE,{})]}),s.jsx(ev,{icon:yi,title:"Modelle",sub:"Hirne, Coder, Immer-bereit-Set, Bibliothek",onClick:()=>t("modelle")}),s.jsx(ev,{icon:p5,title:"Wartung und Logs",sub:"Updates, Backup, Dienste, Logs, Zugangsdaten",onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}))}),s.jsx(ev,{icon:Hn,title:"Hermes und Verdrahtung",sub:"Agent, Gehirn-Modell, PC-Verbindung",onClick:()=>t("hermes")})]})}const RX=[{id:"start",label:"Start",icon:hh},{id:"vibe",label:"Vibe-Coding",icon:Fs},{id:"konstitution",label:"Konstitution",icon:TM},{id:"maschinenraum",label:"Maschinenraum",icon:tu}];function $X(){const[e,t]=x.useState("start"),[r,n]=x.useState(!1),[i,o]=x.useState("maintenance"),{data:c}=Kx();x.useEffect(()=>{const f=h=>{var m;o(((m=h.detail)==null?void 0:m.tab)||"maintenance"),n(!0)};return window.addEventListener("open-system-drawer",f),()=>window.removeEventListener("open-system-drawer",f)},[]);const u=c&&c.engine_reachable&&(c.brain?c.brain.ready:!0);return s.jsxs("div",{className:"flex h-full relative",children:[s.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:s.jsx("div",{className:"absolute inset-0 opacity-30 animate-aurora bg-gradient-to-tr from-teal-500/15 via-indigo-500/10 to-purple-500/15 blur-[130px]"})}),s.jsx(yE,{open:r,onClose:()=>n(!1),defaultTab:i}),s.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md",children:[s.jsxs("div",{className:"flex items-center gap-2 px-5 py-4 border-b border-border/40",children:[s.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20"}),s.jsxs("div",{className:"leading-tight",children:[s.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),s.jsx("div",{className:"text-[10px] text-muted-foreground",children:"3 · Prototyp"})]})]}),s.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4",children:RX.map(f=>s.jsxs("button",{onClick:()=>t(f.id),className:J("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-all cursor-pointer",e===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[s.jsx(f.icon,{className:"h-4.5 w-4.5 shrink-0"})," ",f.label]},f.id))}),s.jsxs("div",{className:"px-3 py-3 border-t border-border/40 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 text-xs text-muted-foreground",children:[s.jsx("span",{className:J("h-2 w-2 rounded-full",u?"bg-emerald-500 animate-pulse":"bg-amber-500")}),u?"Box läuft":"prüfen"]}),s.jsxs("a",{href:"#dashboard",className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[s.jsx(e5,{className:"h-3.5 w-3.5"})," zurück zu MC2"]})]})]}),s.jsxs("main",{className:"flex-1 min-w-0 overflow-y-auto p-6 scrollbar-thin",children:[e==="start"&&s.jsx(CX,{}),e==="vibe"&&s.jsx(gE,{}),e==="konstitution"&&s.jsx(vE,{}),e==="maschinenraum"&&s.jsx(LX,{})]})]})}const zX={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},FX={ok:"hover:border-emerald-500/40",warn:"hover:border-amber-500/50",alert:"hover:border-red-500/50",muted:"hover:border-primary/40",loading:"hover:border-border/60"};function ps({icon:e,title:t,value:r,unit:n,tone:i="muted",hint:o,onClick:c}){return s.jsxs("button",{onClick:c,className:J("group relative flex flex-col items-start rounded-2xl border border-border/60 bg-card/45 p-5 text-left shadow-lg shadow-black/15 backdrop-blur-md transition-all duration-200 cursor-pointer hover:bg-card/70 hover:shadow-xl",FX[i]),children:[s.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[s.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl border border-border/40 bg-background/30 text-foreground/80 transition-colors group-hover:text-primary",children:s.jsx(e,{className:"h-5 w-5"})}),s.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",zX[i]),title:o})]}),s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[s.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:r}),n&&s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n})]}),s.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[s.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:t}),s.jsx(Kn,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),o&&s.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:o})]})}function BX(){var c;const{data:e=[]}=cE(150,6e4),[t,r]=x.useState(!1),n=e.find(u=>u.source==="chef-gutachter");if(!n)return null;const i=new Date(n.ts*1e3).toLocaleString("de-DE",{weekday:"long",day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}),o=(c=n.text.split(` +`).find(u=>u.trim().startsWith("VERDIKT:")))==null?void 0:c.replace(/^\s*VERDIKT:\s*/,"");return s.jsxs("div",{className:"rounded-2xl border border-violet-500/25 bg-violet-500/[0.05] p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("button",{onClick:()=>r(u=>!u),className:"flex w-full items-center gap-3 text-left cursor-pointer",children:[s.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-violet-500/30 bg-background/30 text-violet-300",children:s.jsx(d5,{className:"h-4.5 w-4.5"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block text-sm font-bold text-foreground",children:"Morgenlage"}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o||n.subject||"Nächtliches Gutachten über die autonome Arbeit"})]}),s.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground/60",children:i}),t?s.jsx(tl,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):s.jsx(Kn,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]}),t&&s.jsxs("div",{className:"mt-3 border-t border-violet-500/15 pt-3",children:[n.subject&&s.jsx("p",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-violet-300/80",children:n.subject}),s.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-foreground/85",children:n.text})]})]})}const AN={"":"einmalig",daily:"täglich",weekdays:"werktags",weekly:"wöchentlich"};function UX(){const{data:e=[],isLoading:t}=vL(),r=Hr(),{showAlert:n,showConfirm:i,dialogElement:o}=Nn(),[c,u]=x.useState(!1),[f,h]=x.useState(""),[m,p]=x.useState(""),[v,b]=x.useState(""),[S,w]=x.useState(!1),k=()=>r.invalidateQueries({queryKey:ze.reminders});async function N(){if(!(!f.trim()||!m)){w(!0);try{await ye("/api/reminders",{method:"POST",body:JSON.stringify({text:f,when:m,repeat:v})}),h(""),p(""),b(""),u(!1),k()}catch(A){n("Anlegen fehlgeschlagen",String((A==null?void 0:A.message)||A))}finally{w(!1)}}}function E(A,_){i("Erinnerung löschen?",`„${_}" wird entfernt.`,async()=>{try{await ye(`/api/reminders/${A}`,{method:"DELETE"}),k()}catch(O){n("Fehler",String((O==null?void 0:O.message)||O))}})}const C=[...e].sort((A,_)=>A.next_ts-_.next_ts);return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[s.jsxs("span",{className:"flex items-center gap-2 text-sm font-bold text-foreground",children:[s.jsx("span",{className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-amber-300",children:s.jsx(JN,{className:"h-4 w-4"})}),"Anstehendes"]}),s.jsxs("button",{onClick:()=>u(A=>!A),className:"flex h-8 items-center gap-1 rounded-lg border border-border/60 bg-background/30 px-2.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all cursor-pointer",children:[c?s.jsx(Br,{className:"h-3.5 w-3.5"}):s.jsx(hf,{className:"h-3.5 w-3.5"})," ",c?"Abbrechen":"Neu"]})]}),c&&s.jsxs("div",{className:"mb-3 space-y-2 rounded-xl border border-border/50 bg-background/30 p-3",children:[s.jsx("input",{value:f,onChange:A=>h(A.target.value),placeholder:"Woran soll Lucy erinnern?","aria-label":"Erinnerungstext",className:"h-9 w-full rounded-lg border border-border/60 bg-card/45 px-3 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("input",{type:"datetime-local",value:m,onChange:A=>p(A.target.value),"aria-label":"Zeitpunkt",className:"h-9 rounded-lg border border-border/60 bg-card/45 px-2 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50 [color-scheme:dark]"}),s.jsx("select",{value:v,onChange:A=>b(A.target.value),"aria-label":"Wiederholung",className:"h-9 cursor-pointer rounded-lg border border-border/60 bg-card/45 px-2 text-xs font-semibold text-foreground outline-none",children:Object.entries(AN).map(([A,_])=>s.jsx("option",{value:A,className:"bg-popover",children:_},A))}),s.jsxs("button",{onClick:N,disabled:S||!f.trim()||!m,className:"ml-auto flex h-9 items-center gap-1.5 rounded-lg bg-primary px-3 text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50",children:[S?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(hf,{className:"h-3.5 w-3.5"})," Anlegen"]})]})]}),t?s.jsx("p",{className:"text-xs text-muted-foreground",children:"Wird geladen …"}):C.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:"Keine Erinnerungen. Lucy sagt dir hier (und per Stimme) Bescheid, wenn etwas ansteht."}):s.jsxs("div",{className:"space-y-1.5",children:[C.slice(0,6).map(A=>{const _=A.next_ts*1e3E(A.id,A.text),"aria-label":"Erinnerung löschen",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground opacity-0 transition-all hover:bg-red-500/5 hover:text-red-400 group-hover:opacity-100 cursor-pointer",children:s.jsx(Us,{className:"h-3.5 w-3.5"})})]},A.id)}),C.length>6&&s.jsxs("p",{className:"text-[10px] text-muted-foreground/60",children:["+",C.length-6," weitere"]})]}),o]})}const Js=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],ro=e=>e==null?"–":`${(e/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function WX(e){const t=Math.max(0,Date.now()/1e3-e);return t<60?`vor ${Math.round(t)} s`:t<3600?`vor ${Math.round(t/60)} min`:`vor ${Math.round(t/3600)} h`}function Ax(e){return Js.reduce((t,r)=>t+(e[r.key]??0),0)}function HX(e){let t=null;for(const r of Js){const n=e[r.key];n!=null&&(t==null||n>t.ms)&&(t={label:r.label,color:r.color,ms:n})}return t}function KX({t:e,scale:t}){const r=Js.map(n=>`${n.label} ${ro(e[n.key])}`).join(" · ")+(e.mem0_ms!=null?` (davon Mem0 ${ro(e.mem0_ms)})`:"");return s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:WX(e.ts)}),s.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:r,children:[s.jsx("div",{className:"absolute inset-0 flex",children:Js.map(n=>{const i=e[n.key];return!i||i<=0?null:s.jsx("div",{style:{width:`${i/t*100}%`,background:n.color},className:"h-full first:rounded-l-sm"},n.key)})}),e.error&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),s.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:e.error?"–":ro(Ax(e))})]})}function GX(){const{data:e}=xL(12),t=e??[],r=Math.max(1,...t.map(o=>Ax(o))),n=t[0],i=n?HX(n):null;return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[s.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(o5,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),s.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n?s.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[s.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${n.error?"text-rose-400":"text-foreground"}`,children:n.error?"Fehler":ro(Ax(n))}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!n.error&&i&&s.jsxs(s.Fragment,{children:[" · Täter: ",s.jsx("span",{style:{color:i.color},className:"font-semibold",children:i.label})," ",ro(i.ms)]})]})]}):s.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),n&&!n.error&&s.jsxs("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:[Js.filter(o=>n[o.key]!=null).map(o=>`${o.label} ${ro(n[o.key])}`).join(" · "),n.mem0_ms!=null&&s.jsxs("span",{className:"text-muted-foreground/50",children:[" · davon Mem0 ",ro(n.mem0_ms)]})]})]}),s.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Js.map(o=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:o.color}}),s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o.label})]},o.key))})]}),t.length>0?s.jsx("div",{className:"space-y-1.5",children:t.map(o=>s.jsx(KX,{t:o,scale:r},o.id))}):s.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),s.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Mem0-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const dh=e=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:e}}));function VX({onNavigate:e}){var ve,de,ge,le;const{data:t}=Si(4e3),{data:r}=uE(4e3),{data:n}=wh(8e3),{data:i}=Ev(),{data:o}=Vx(),{data:c}=hE(),{data:u}=lE(2e4),f=kE(),{showAlert:h,dialogElement:m}=Nn(),p=Hr(),[v,b]=x.useState({});async function S(ie,X){b(te=>({...te,[ie]:!0}));try{if(X.kind==="loadModel")await ye(`/api/models/${encodeURIComponent(X.model)}/load`,{method:"POST"});else{const te=await ye("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:X.service})});te.ok||h("Reparatur nicht ganz geklappt",(te.err||"Unbekannter Fehler")+(X.needsSudo?` + +Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}p.invalidateQueries({queryKey:ze.health}),p.invalidateQueries({queryKey:ze.services}),p.invalidateQueries({queryKey:ze.models})}catch(te){h("Reparatur fehlgeschlagen",String((te==null?void 0:te.message)||te))}finally{b(te=>({...te,[ie]:!1}))}}const w=((ve=t==null?void 0:t.running)==null?void 0:ve.length)??0,k=(r==null?void 0:r.services.filter(ie=>ie.ok).length)??0,N=(r==null?void 0:r.services.length)??0,E=N-k,C=(i==null?void 0:i.length)??0,A=(n?(n.os>0?1:0)+(n.engine>0?1:0)+(n.swap>0?1:0)+(n.models>0?1:0):0)+(((de=n==null?void 0:n.components)==null?void 0:de.filter(ie=>ie.update===!0).length)??0),_=(c==null?void 0:c.gateway.ok)&&(c==null?void 0:c.memory.ok),O=u!=null&&u.available?u.open_count:0,T=(ge=t==null?void 0:t.models)==null?void 0:ge.find(ie=>ie.role==="hermes"),B=T!=null&&T.name?(le=T.name.split("/").pop())==null?void 0:le.replace(/\.gguf$/i,""):"",z=i?i.filter(ie=>["auto","agent","hermes"].includes(ie.source)).length:0,$=r==null?void 0:r.services.filter(ie=>!ie.ok).map(ie=>ie.name).join(", "),q=n?[n.os>0&&"OS",n.engine>0&&"Engine",n.swap>0&&"Swap",n.models>0&&"Modelle"].filter(Boolean):[],W=q.length>0?q.join(" + "):"";return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Cockpit"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[s.jsx(qX,{verdict:f.verdict,memory:f.memory,warns:f.warns}),s.jsx(BX,{}),s.jsxs("section",{children:[s.jsx(ef,{children:"Leistung"}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsx(TO,{}),s.jsx(DO,{})]}),s.jsx("div",{className:"mt-4",children:s.jsx(GX,{})})]}),s.jsxs("section",{children:[s.jsx(ef,{children:"Bereiche"}),s.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[s.jsx(ps,{icon:eu,title:"Auftragsbuch",value:u!=null&&u.available?O:"—",unit:O===1?"Vorschlag":"Vorschläge",tone:u?O>0?"warn":"ok":"loading",hint:O>0?`${O} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>e("auftraege")}),s.jsx(ps,{icon:ff,title:"Modelle",value:w,unit:"warm",tone:w>0?"ok":"muted",hint:B?`Hirn: ${B}`:"Kein Hermes-Modell geladen",onClick:()=>e("models")}),s.jsx(ps,{icon:Sa,title:"Gedächtnis",value:i?C:"…",unit:"Notizen",tone:i?"ok":"loading",hint:i?`${C} Fakten (${z} auto gelernt)`:"Gedächtnis-Pool laden...",onClick:()=>e("memory")}),s.jsx(ps,{icon:ph,title:"Dienste",value:r?`${k}/${N}`:"…",unit:"laufen",tone:r?E>0?"warn":"ok":"loading",hint:$?`Ausfall: ${$}`:"Alle Dienste online",onClick:()=>dh("maintenance")}),s.jsx(ps,{icon:$x,title:"Updates",value:n?A>0?A:"0":"…",unit:A>0?"bereit":"aktuell",tone:n?A>0?"warn":"ok":"loading",hint:A>0?`Verfügbar: ${W}`:"Alles auf dem neuesten Stand",onClick:()=>dh("maintenance")}),s.jsx(ps,{icon:Pc,title:"Verbinden",value:"Zed",unit:_?"· bereit":"",tone:c?_?"ok":"warn":"loading",hint:o!=null&&o.pc_executor_reachable?"IDE & PC online (:7777)":"IDE-Kopplung (PC offline)",onClick:()=>e("connect")})]})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(QX,{problems:f.problems,pendingCount:A,openAuftraege:O,busy:v,onRepair:S,onNavigate:e}),s.jsxs("section",{children:[s.jsx(ef,{children:"Anstehendes"}),s.jsx(UX,{})]}),s.jsxs("section",{children:[s.jsx(ef,{children:"Werkzeuge & Diagnose"}),s.jsx(YX,{agent:o,svcErrors:E,onNavigate:e})]})]})]}),m]})}function ef({children:e}){return s.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function qX({verdict:e,memory:t,warns:r}){const n=r.length?`${r[0].label}: ${r[0].detail}${r.length>1?` (+${r.length-1} weitere)`:""}`:t.status==="full"?t.text:"Nichts Schlimmes — nur ein Hinweis.",i={loading:{ring:"border-border/60 bg-card/45",icon:Bt,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:Lx,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:vr,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:n},problem:{ring:"border-red-500/50 bg-red-500/5",icon:vr,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:"Ein wichtiger Dienst hakt."}}[e],o=i.icon,c={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[t.status],u={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[t.status];return s.jsxs("div",{className:J("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between h-full",i.ring),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:s.jsx(o,{className:J("h-6 w-6",i.iconCls)})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:i.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:i.sub})]})]}),s.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[s.jsx(ga,{className:"h-3.5 w-3.5"})," Speicher"]}),s.jsx("span",{className:J("font-mono font-bold",c),children:t.status==="unknown"?"—":`${t.usedGb.toFixed(0)} / ${t.totalGb.toFixed(0)} GB`})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:s.jsx("div",{className:J("h-full rounded-full transition-all duration-500",u),style:{width:`${t.pct}%`}})})]})]})}function QX({problems:e,pendingCount:t,openAuftraege:r,busy:n,onRepair:i,onNavigate:o}){const c=t>0,u=r>0,f=e.length===0&&!c&&!u;return s.jsx("div",{className:"h-full flex flex-col justify-between",children:f?s.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[s.jsx(Mt,{className:"h-5 w-5 shrink-0 text-emerald-400"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):s.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[e.map(h=>s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[s.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:s.jsx(h.icon,{className:"h-4.5 w-4.5"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-sm font-bold text-foreground",children:h.label}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:h.detail})]})]}),h.repair&&s.jsxs("button",{onClick:()=>h.repair&&i(h.id,h.repair),disabled:!!n[h.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60 w-full sm:w-auto justify-center",children:[n[h.id]?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(tu,{className:"h-3.5 w-3.5"}),h.repair.label]})]},h.id)),u&&s.jsxs("button",{onClick:()=>o("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-primary/30 bg-primary/5 p-4 text-left transition-all hover:bg-primary/10 cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/30 bg-background/30 text-primary",children:s.jsx(eu,{className:"h-4.5 w-4.5"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Vorschl",r===1?"ag":"äge"," im Auftragsbuch"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),s.jsx(Kn,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),c&&s.jsxs("button",{onClick:()=>dh("maintenance"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:s.jsx($x,{className:"h-4.5 w-4.5"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t," Update",t===1?"":"s"," bereit"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),s.jsx(Kn,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function YX({agent:e,svcErrors:t,onNavigate:r}){const n=[{label:"Hermes Agent",status:e?e.gateway_reachable?"Bereit":"Offline":"…",tone:e?e.gateway_reachable?"ok":"alert":"loading",action:()=>r("agent")},{label:"Direkte Box-Shell (SSH)",status:e?e.box_console_reachable?"Bereit":"Offline":"…",tone:e?e.box_console_reachable?"ok":"warn":"loading",action:()=>r("konsole")},{label:"Systemlogs & Diagnose",status:t>0?`${t} Fehler`:"Keine Fehler",tone:t>0?"alert":"ok",action:()=>dh("logs")},{label:"Interaktives Terminal",status:"Öffnen",tone:"muted",action:()=>r("terminal")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>r("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>r("chronik")}];return s.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:s.jsx("div",{className:"divide-y divide-border/20",children:n.map((i,o)=>{const c={loading:"bg-muted-foreground/45 animate-pulse",ok:"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]",warn:"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]",alert:"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]",muted:"bg-muted-foreground/30"}[i.tone];return s.jsxs("button",{onClick:i.action,className:"w-full py-2.5 px-1.5 flex items-center justify-between text-left hover:bg-card/45 rounded-lg transition-all group cursor-pointer text-xs",children:[s.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:i.label}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:J("text-[10px] font-semibold font-mono",i.tone==="ok"?"text-emerald-400":i.tone==="warn"?"text-amber-400":i.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:i.status}),s.jsx("span",{className:J("h-1.5 w-1.5 rounded-full",c)})]})]},o)})})})}const ZX={wartung:"Werkstatt",orchestrator:"Orchestrator",doku:"Doku",feature:"Feature"},XX={laeuft:{label:"wird eingespielt …",cls:"text-sky-300 border-sky-500/40 bg-sky-500/10",spin:!0},rollback:{label:"Rollback läuft …",cls:"text-amber-300 border-amber-500/40 bg-amber-500/10",spin:!0},eingespielt:{label:"eingespielt ✓",cls:"text-emerald-300 border-emerald-500/40 bg-emerald-500/10"},fehlgeschlagen:{label:"fehlgeschlagen",cls:"text-red-300 border-red-500/40 bg-red-500/10"},zurueckgerollt:{label:"zurückgerollt",cls:"text-amber-300 border-amber-500/40 bg-amber-500/10"},kritisch:{label:"KRITISCH — Box prüfen",cls:"text-red-200 border-red-500/60 bg-red-500/20"},abgelehnt:{label:"abgelehnt",cls:"text-muted-foreground border-border/60 bg-background/30"}};function LO(e){return e?new Date(e*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function JX(){const{data:e,isLoading:t,refetch:r,isFetching:n}=lE(),i=Hr(),{showAlert:o,showConfirm:c,dialogElement:u}=Nn(),[f,h]=x.useState({}),m=()=>i.invalidateQueries({queryKey:ze.auftragsbuch});async function p(w,k,N,E){h(C=>({...C,[w]:!0}));try{await ye(k,{method:"POST",body:JSON.stringify(N)}),E&&o("Erledigt",E),m()}catch(C){o("Das hat nicht geklappt",String((C==null?void 0:C.message)||C))}finally{h(C=>({...C,[w]:!1}))}}const v=(e==null?void 0:e.items)??[],b=(e==null?void 0:e.skill_kandidaten)??[],S=v.length===0&&b.length===0;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Auftragsbuch"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Was die Box gebaut oder sich ausgedacht hat — du entscheidest. Annehmen spielt es mit Fangnetz ein (Health-Check, automatischer Rollback)."})]}),s.jsxs("button",{onClick:()=>r(),className:"flex h-9 items-center gap-1.5 rounded-lg border border-border/60 bg-card/45 px-3 text-xs font-semibold text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all cursor-pointer",children:[s.jsx(ho,{className:J("h-3.5 w-3.5",n&&"animate-spin")})," Aktualisieren"]})]}),e&&!e.available&&s.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Das Auftragsbuch lebt auf der Box (liest die Gitea-Branches dort). Im lokalen Dev-Modus ist hier nichts zu sehen."}),t&&s.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[s.jsx(Bt,{className:"h-4 w-4 animate-spin"})," Vorschläge werden geladen …"]}),(e==null?void 0:e.available)&&S&&s.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-5",children:[s.jsx(Mt,{className:"h-5 w-5 shrink-0 text-emerald-400"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu entscheiden"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Keine offenen Vorschläge. Werkstatt, Orchestrator und Traum melden sich hier, sobald es etwas gibt."})]})]}),v.length>0&&s.jsxs("section",{className:"space-y-3",children:[s.jsxs(CN,{icon:YM,children:["Fertige Patches (",v.length,")"]}),v.map(w=>s.jsx(tJ,{item:w,busy:f,onAct:p,showConfirm:c},w.branch))]}),b.length>0&&s.jsxs("section",{className:"space-y-3",children:[s.jsxs(CN,{icon:va,children:["Skill-Kandidaten aus dem Traum (",b.length,")"]}),b.map(w=>s.jsx(rJ,{k:w,busy:f,onAct:p,showConfirm:c},w.file))]}),u]})}function CN({icon:e,children:t}){return s.jsxs("p",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(e,{className:"h-3.5 w-3.5"})," ",t]})}function eJ({item:e}){const t=e.status;if(!t)return null;const r=XX[t.state];return r?s.jsxs("span",{className:J("flex items-center gap-1.5 rounded-lg border px-2 py-0.5 text-[10px] font-bold",r.cls),title:t.detail,children:[r.spin&&s.jsx(Bt,{className:"h-3 w-3 animate-spin"}),r.label]}):null}function tJ({item:e,busy:t,onAct:r,showConfirm:n}){var b,S,w;const[i,o]=x.useState(!1),[c,u]=x.useState(null),[f,h]=x.useState(!1),m=((b=e.status)==null?void 0:b.state)==="laeuft"||((S=e.status)==null?void 0:S.state)==="rollback",p=((w=e.status)==null?void 0:w.state)==="eingespielt";async function v(){const k=!i;if(o(k),k&&c===null){h(!0);try{const N=await ye(`/api/auftragsbuch/diff?branch=${encodeURIComponent(e.branch)}`);u(N.diff+(N.truncated?` +… (gekürzt)`:""))}catch(N){u(`(Diff nicht ladbar: ${(N==null?void 0:N.message)||N})`)}finally{h(!1)}}}return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md space-y-3",children:[s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:"rounded-md border border-primary/30 bg-primary/10 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-primary",children:ZX[e.kind]??e.kind}),s.jsx("span",{className:"font-mono text-[11px] text-muted-foreground truncate",title:e.branch,children:e.branch}),s.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground/70",children:[s.jsx(mh,{className:"h-3 w-3"}),LO(e.ts)]}),s.jsx(eJ,{item:e})]}),s.jsx("p",{className:"mt-1.5 text-sm font-semibold text-foreground",children:e.subject||"(ohne Titel)"}),e.body&&s.jsx("p",{className:"mt-1 whitespace-pre-wrap text-xs leading-relaxed text-muted-foreground line-clamp-6",children:e.body})]}),!m&&!p&&s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s.jsxs("button",{disabled:!!t[e.branch],onClick:()=>n("Vorschlag annehmen?",`'${e.branch}' wird auf main gemergt und live eingespielt. Die Zentrale startet dabei kurz neu. Geht der Health-Check danach rot, rollt die Box automatisch zurück.${e.frontend_ohne_build?` + +Achtung: Enthält Frontend-Quelltext ohne gebautes Bundle — die Oberfläche bleibt alt, bis am PC gebaut wird.`:""}`,()=>r(e.branch,"/api/auftragsbuch/annehmen",{branch:e.branch})),className:"flex h-9 items-center gap-1.5 rounded-lg border border-emerald-500/40 bg-emerald-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-emerald-300 transition-all hover:bg-emerald-500/20 cursor-pointer disabled:opacity-50",children:[t[e.branch]?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(Mt,{className:"h-3.5 w-3.5"})," Annehmen"]}),s.jsxs("button",{disabled:!!t["ab:"+e.branch],onClick:()=>n("Vorschlag ablehnen?",`Der Branch '${e.branch}' wird auf Gitea gelöscht. Die Arbeit bleibt in der Historie, aber die Karte verschwindet.`,()=>r("ab:"+e.branch,"/api/auftragsbuch/ablehnen",{branch:e.branch})),className:"flex h-9 items-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300/90 transition-all hover:bg-red-500/15 cursor-pointer disabled:opacity-50",children:[t["ab:"+e.branch]?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(Br,{className:"h-3.5 w-3.5"})," Ablehnen"]})]})]}),e.status&&(m||!p)&&e.status.detail&&s.jsx("p",{className:"text-[11px] text-muted-foreground",children:e.status.detail}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-muted-foreground",children:[s.jsxs("span",{className:"rounded bg-background/40 px-1.5 py-0.5 font-mono",children:[e.ahead," Commit",e.ahead===1?"":"s"]}),e.shortstat&&s.jsx("span",{className:"rounded bg-background/40 px-1.5 py-0.5 font-mono",children:e.shortstat.trim()}),e.behind>0&&s.jsxs("span",{className:"flex items-center gap-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-amber-300",title:"main ist seit diesem Vorschlag weitergelaufen",children:[s.jsx(vr,{className:"h-3 w-3"})," ",e.behind," hinter main"]}),e.frontend_ohne_build&&s.jsxs("span",{className:"flex items-center gap-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-amber-300",title:"Die Box kann kein Frontend bauen (kein Node) — nach dem Annehmen bleibt die Oberfläche alt, bis am PC gebaut wird.",children:[s.jsx(vr,{className:"h-3 w-3"})," Frontend ohne Build"]})]}),s.jsxs("div",{children:[s.jsxs("button",{onClick:v,className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[i?s.jsx(tl,{className:"h-3.5 w-3.5"}):s.jsx(Kn,{className:"h-3.5 w-3.5"}),s.jsx(qM,{className:"h-3.5 w-3.5"})," ",e.files.length," Datei",e.files.length===1?"":"en"," — Änderungen ansehen"]}),i&&s.jsxs("div",{className:"mt-2 space-y-2",children:[s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.files.map(k=>s.jsxs("span",{className:"rounded bg-background/40 px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:[s.jsx("b",{className:J(k.status.startsWith("A")&&"text-emerald-400",k.status.startsWith("D")&&"text-red-400",k.status.startsWith("M")&&"text-sky-400"),children:k.status})," ",k.path]},k.path)),e.files_truncated&&s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"…"})]}),s.jsx("div",{className:"max-h-96 overflow-auto rounded-xl border border-border/50 bg-background/50 p-3",children:f?s.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Diff wird geladen …"}):s.jsx("pre",{className:"text-[10px] leading-relaxed text-foreground/80 whitespace-pre",children:(c??"").split(` +`).map((k,N)=>s.jsx("span",{className:J("block",k.startsWith("+")&&!k.startsWith("+++")&&"text-emerald-300/90 bg-emerald-500/5",k.startsWith("-")&&!k.startsWith("---")&&"text-red-300/90 bg-red-500/5",(k.startsWith("@@")||k.startsWith("diff "))&&"text-sky-300/90"),children:k||" "},N))})})]})]})]})}function rJ({k:e,busy:t,onAct:r,showConfirm:n}){const[i,o]=x.useState(!1);return s.jsxs("div",{className:"rounded-2xl border border-violet-500/25 bg-violet-500/[0.04] p-4 shadow-lg shadow-black/15 backdrop-blur-md space-y-3",children:[s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:"rounded-md border border-violet-500/30 bg-violet-500/10 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-violet-300",children:"Traum-Idee"}),s.jsx("span",{className:"font-mono text-[11px] text-muted-foreground truncate",children:e.file}),s.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground/70",children:[s.jsx(mh,{className:"h-3 w-3"}),LO(e.mtime)]})]}),s.jsx("p",{className:"mt-1.5 text-sm font-semibold text-foreground",children:e.title})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s.jsxs("button",{disabled:!!t["sk:"+e.file],onClick:()=>n("Werkstatt beauftragen?",`Der Kandidat '${e.title}' geht als Auftrag an die Werkstatt (Orchestrator, propose-only). Das Ergebnis erscheint später als neuer Patch-Vorschlag hier im Auftragsbuch — nichts geht ungefragt live.`,()=>r("sk:"+e.file,"/api/auftragsbuch/skill/annehmen",{file:e.file},"Die Werkstatt arbeitet. Das Ergebnis taucht als neuer Vorschlag im Auftragsbuch auf (das kann einige Minuten dauern).")),className:"flex h-9 items-center gap-1.5 rounded-lg border border-violet-500/40 bg-violet-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-violet-300 transition-all hover:bg-violet-500/20 cursor-pointer disabled:opacity-50",children:[t["sk:"+e.file]?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(JM,{className:"h-3.5 w-3.5"})," Beauftragen"]}),s.jsxs("button",{disabled:!!t["skab:"+e.file],onClick:()=>n("Kandidat verwerfen?",`'${e.title}' wandert ins Archiv des Wissens-Vaults (verworfen/). Der Traum schlägt ihn nicht erneut vor.`,()=>r("skab:"+e.file,"/api/auftragsbuch/skill/ablehnen",{file:e.file})),className:"flex h-9 items-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300/90 transition-all hover:bg-red-500/15 cursor-pointer disabled:opacity-50",children:[t["skab:"+e.file]?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(Br,{className:"h-3.5 w-3.5"})," Verwerfen"]})]})]}),s.jsxs("button",{onClick:()=>o(c=>!c),className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[i?s.jsx(tl,{className:"h-3.5 w-3.5"}):s.jsx(Kn,{className:"h-3.5 w-3.5"}),s.jsx(eu,{className:"h-3.5 w-3.5"})," Vorschlag lesen"]}),i&&s.jsx("pre",{className:"max-h-72 overflow-auto rounded-xl border border-border/50 bg-background/50 p-3 text-[11px] leading-relaxed text-foreground/85 whitespace-pre-wrap",children:e.preview})]})}const nJ={sentry:{icon:Lx,label:"Health-Wächter",cls:"text-red-300 bg-red-500/10 border-red-500/25"},alarm:{icon:$x,label:"Alarm",cls:"text-red-200 bg-red-500/15 border-red-500/40"},notify:{icon:IM,label:"Meldung",cls:"text-sky-300 bg-sky-500/10 border-sky-500/25"},"chef-gutachter":{icon:d5,label:"Morgenlage",cls:"text-violet-300 bg-violet-500/10 border-violet-500/25"},radar:{icon:gI,label:"Radar",cls:"text-teal-300 bg-teal-500/10 border-teal-500/25"},auftragsbuch:{icon:eu,label:"Auftragsbuch",cls:"text-primary bg-primary/10 border-primary/25"},zeitmaschine:{icon:Rx,label:"Zeitmaschine",cls:"text-amber-300 bg-amber-500/10 border-amber-500/25"},reminder:{icon:JN,label:"Erinnerung",cls:"text-amber-300 bg-amber-500/10 border-amber-500/25"},traum:{icon:va,label:"Traum",cls:"text-violet-300 bg-violet-500/10 border-violet-500/25"}},iJ={icon:lI,label:"Box",cls:"text-muted-foreground bg-background/40 border-border/50"};function aJ(e){return new Date(e*1e3).toLocaleDateString("de-DE",{weekday:"long",day:"2-digit",month:"long"})}function oJ(){const{data:e=[],isLoading:t}=cE(),[r,n]=x.useState(!0),i=x.useMemo(()=>{const o=[];for(const c of e){const u=aJ(c.ts),f=o[o.length-1];f&&f.day===u?f.items.push(c):o.push({day:u,items:[c]})}return o},[e]);return s.jsxs("div",{className:"space-y-7",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Chronik"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Was deine Box von allein getan und gemeldet hat — und die Zeitmaschine, falls du zu einem früheren Stand zurück willst."})]}),s.jsx(sJ,{}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("p",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(s5,{className:"h-3.5 w-3.5"})," Verlauf"]}),t&&s.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[s.jsx(Bt,{className:"h-4 w-4 animate-spin"})," Chronik wird geladen …"]}),!t&&e.length===0&&s.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 text-center text-xs text-muted-foreground",children:"Noch keine Einträge. Sobald die Box etwas von allein tut oder meldet (Updates, Wächter, Träume), steht es hier."}),i.map(({day:o,items:c})=>s.jsxs("div",{children:[s.jsx("p",{className:"mb-2 text-xs font-bold text-foreground/70",children:o}),s.jsxs("div",{className:"space-y-2 border-l-2 border-border/40 pl-4",children:[(r?c.slice(0,8):c).map(u=>{const f=nJ[u.source]??iJ,h=f.icon;return s.jsxs("div",{className:"relative rounded-xl border border-border/50 bg-card/40 p-3 backdrop-blur-sm",children:[s.jsx("span",{className:"absolute -left-[23px] top-4 h-2.5 w-2.5 rounded-full bg-border ring-4 ring-background/60"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs("span",{className:J("flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-[10px] font-bold",f.cls),children:[s.jsx(h,{className:"h-3 w-3"})," ",f.label]}),u.subject&&s.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground",children:u.subject}),s.jsx("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground/60",children:new Date(u.ts*1e3).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})})]}),s.jsx("p",{className:"mt-1.5 whitespace-pre-wrap text-xs leading-relaxed text-foreground/85",children:u.text})]},u.id)}),r&&c.length>8&&s.jsxs("button",{onClick:()=>n(!1),className:"text-[11px] text-muted-foreground underline hover:text-foreground",children:[c.length-8," weitere anzeigen"]})]})]},o))]})]})}function sJ(){const{data:e}=gL(),t=Hr(),{showAlert:r,showConfirm:n,dialogElement:i}=Nn(),[o,c]=x.useState(null),[u,f]=x.useState(!1),[h,m]=x.useState(!1),p=(e==null?void 0:e.backups)??[],v=h?p:p.slice(0,4);function b(k){const N=k.snapshot.match(/^(\d{4})-?(\d{2})-?(\d{2})[T_-](\d{2})[-:]?(\d{2})/);return N?`${N[3]}.${N[2]}.${N[1]}, ${N[4]}:${N[5]} Uhr`:k.snapshot}async function S(k){c(k.file);try{await ye("/api/zeitmaschine/restore",{method:"POST",body:JSON.stringify({file:k.file})}),r("Zeitmaschine läuft","Die Wiederherstellung wurde gestartet. Die Dienste starten gleich neu — die Zentrale ist kurz weg und meldet sich von selbst zurück. Vorher wurde automatisch ein Sicherheits-Backup des jetzigen Zustands gemacht.")}catch(N){r("Start fehlgeschlagen",String((N==null?void 0:N.message)||N))}finally{c(null)}}async function w(){f(!0);try{const k=await ye("/api/system/backup",{method:"POST"});k.ok?r("Gesichert",`Snapshot ${k.snapshot} wurde angelegt.`):r("Backup fehlgeschlagen",k.error||"Unbekannter Fehler"),t.invalidateQueries({queryKey:ze.zeitmaschine})}catch(k){r("Backup fehlgeschlagen",String((k==null?void 0:k.message)||k))}finally{f(!1)}}return s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("p",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(Tw,{className:"h-3.5 w-3.5"})," Zeitmaschine — gesicherte Stände"]}),s.jsxs("button",{onClick:w,disabled:u||!(e!=null&&e.available),className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-card/45 px-2.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all cursor-pointer disabled:opacity-50",children:[u?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(Tw,{className:"h-3.5 w-3.5"})," Jetzt sichern"]})]}),e&&!e.available&&s.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Die Snapshots liegen auf der Box — im lokalen Dev-Modus nicht verfügbar."}),(e==null?void 0:e.available)&&p.length===0&&s.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-5 text-center text-xs text-muted-foreground",children:'Noch keine Snapshots. Das nächtliche Backup (03:30) legt sie automatisch an — oder „Jetzt sichern".'}),v.length>0&&s.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:v.map((k,N)=>s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-border/50 bg-card/40 p-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("p",{className:"text-xs font-semibold text-foreground",children:[b(k)," ",N===0&&s.jsx("span",{className:"ml-1 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[9px] font-bold text-emerald-300",children:"neuester"})]}),s.jsxs("p",{className:"font-mono text-[10px] text-muted-foreground/70 truncate",title:k.file,children:[k.size_mb.toLocaleString("de-DE")," MB · ",k.file]})]}),s.jsxs("button",{disabled:o!==null,onClick:()=>n("Wirklich zu diesem Stand zurück?",`Die Box wird auf den Snapshot vom ${b(k)} zurückgesetzt (Gedächtnis, Hermes-Config, Modell-Router). Der JETZIGE Zustand wird vorher automatisch gesichert — der Schritt ist also umkehrbar. Die Dienste starten neu, die Zentrale ist kurz weg.`,()=>S(k)),className:"flex h-8 shrink-0 items-center gap-1.5 rounded-lg border border-amber-500/40 bg-amber-500/10 px-2.5 text-[10px] font-bold uppercase tracking-wide text-amber-300 transition-all hover:bg-amber-500/20 cursor-pointer disabled:opacity-50",children:[o===k.file?s.jsx(Bt,{className:"h-3 w-3 animate-spin"}):s.jsx(Rx,{className:"h-3 w-3"})," Zurück"]})]},k.file))}),p.length>4&&!h&&s.jsxs("button",{onClick:()=>m(!0),className:"text-[11px] text-muted-foreground underline hover:text-foreground",children:["Alle ",p.length," Snapshots anzeigen"]}),i]})}const lJ={"":"Allgemein",traeume:"Träume",muster:"Muster","skill-kandidaten":"Skill-Kandidaten","skill-kandidaten/beauftragt":"Skill-Kandidaten · beauftragt","skill-kandidaten/verworfen":"Skill-Kandidaten · verworfen"};function cJ(){const{data:e,isLoading:t}=pL(),[r,n]=x.useState(null),[i,o]=x.useState(null),[c,u]=x.useState(!1),[f,h]=x.useState(""),m=x.useMemo(()=>(e==null?void 0:e.files)??[],[e]),p=x.useMemo(()=>{const w=new Map;for(const k of m)w.set(k.name.toLowerCase(),k.path);return w},[m]),v=x.useMemo(()=>{if(!f.trim())return m;const w=f.toLowerCase();return m.filter(k=>k.title.toLowerCase().includes(w)||k.path.toLowerCase().includes(w))},[m,f]),b=x.useMemo(()=>{const w=[];for(const k of v){const N=w.find(E=>E.dir===k.dir);N?N.files.push(k):w.push({dir:k.dir,files:[k]})}return w.sort((k,N)=>k.dir===""?-1:N.dir===""?1:k.dir.localeCompare(N.dir))},[v]);x.useEffect(()=>{if(!r&&m.length){const w=m.find(k=>k.path.toLowerCase()==="index.md");n((w==null?void 0:w.path)??m[0].path)}},[m,r]),x.useEffect(()=>{r&&(u(!0),ye(`/api/wissen/datei?pfad=${encodeURIComponent(r)}`).then(o).catch(()=>o({path:r,content:"*(Notiz nicht ladbar)*",mtime:0})).finally(()=>u(!1)))},[r]);const S=w=>{const k=p.get(w.toLowerCase());k&&n(k)};return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Wissen"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Was sich die Box nachts erschließt — Traum-Notizen, Muster und Skill-Ideen aus dem Wissens-Vault, verlinkt wie ein Wiki."})]}),e&&!e.available&&s.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Der Wissens-Vault liegt auf der Box (~/wissens-vault) — im lokalen Dev-Modus nicht verfügbar."}),t&&s.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[s.jsx(Bt,{className:"h-4 w-4 animate-spin"})," Vault wird geladen …"]}),(e==null?void 0:e.available)&&m.length===0&&s.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 text-center text-xs text-muted-foreground",children:"Noch keine Notizen. Der nächtliche Traum (03:15) legt sie an — morgen früh steht hier die erste."}),m.length>0&&s.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row",children:[s.jsxs("aside",{className:"w-full shrink-0 space-y-3 lg:w-72",children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{value:f,onChange:w=>h(w.target.value),type:"search",placeholder:"Notizen durchsuchen…","aria-label":"Notizen durchsuchen",className:"h-9 w-full rounded-lg border border-border/60 bg-card/45 pl-8 pr-3 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50"}),s.jsx(rl,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),s.jsx("div",{className:"max-h-[70vh] space-y-3 overflow-y-auto pr-1 scrollbar-thin",children:b.map(({dir:w,files:k})=>s.jsxs("div",{children:[s.jsxs("p",{className:"mb-1 flex items-center gap-1 text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(a5,{className:"h-3 w-3"})," ",lJ[w]??w]}),s.jsx("div",{className:"space-y-0.5",children:k.map(N=>s.jsxs("button",{onClick:()=>n(N.path),className:J("flex w-full items-center gap-1.5 rounded-lg px-2 py-1.5 text-left text-xs transition-all cursor-pointer",r===N.path?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[s.jsx(i5,{className:"h-3.5 w-3.5 shrink-0"}),s.jsx("span",{className:"truncate",title:N.title,children:N.name}),N.neu&&s.jsxs("span",{className:"ml-auto flex items-center gap-0.5 rounded bg-violet-500/15 px-1 py-0.5 text-[8px] font-bold uppercase text-violet-300",children:[s.jsx(va,{className:"h-2.5 w-2.5"}),"neu"]})]},N.path))})]},w||"__root"))})]}),s.jsx("div",{className:"min-w-0 flex-1 rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:c?s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(Bt,{className:"h-4 w-4 animate-spin"})," Notiz wird geladen …"]}):i?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-3 flex items-center justify-between border-b border-border/40 pb-2",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[s.jsx(c5,{className:"h-3.5 w-3.5"})," ",i.path]}),i.mtime>0&&s.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["Stand ",new Date(i.mtime*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),s.jsx(uJ,{text:i.content,onWikiLink:S,known:p})]}):null})]})]})}function uJ({text:e,onWikiLink:t,known:r}){const n=e.split(` +`),i=[];let o=[],c=null;const u=f=>{o.length&&(i.push(s.jsx("ul",{className:"mb-3 ml-4 list-disc space-y-1",children:o},f)),o=[])};return n.forEach((f,h)=>{const m=`l${h}`;if(c!==null){f.trimEnd()==="```"?(i.push(s.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px] leading-relaxed text-foreground/85",children:c.join(` +`)},m)),c=null):c.push(f);return}if(f.trimStart().startsWith("```")){u(m),c=[];return}const p=f.trimEnd();if(!p.trim()){u(m);return}const v=p.match(/^(#{1,4})\s+(.*)$/);if(v){u(m);const S=v[1].length,w=S===1?"text-lg font-bold mt-1 mb-3":S===2?"text-base font-bold mt-4 mb-2":"text-sm font-bold mt-3 mb-1.5";i.push(s.jsx("p",{className:J(w,"font-space text-foreground"),children:tv(v[2],t,r,m)},m));return}const b=p.match(/^\s*[-*•]\s+(.*)$/);if(b){o.push(s.jsx("li",{className:"text-xs leading-relaxed text-foreground/85",children:tv(b[1],t,r,m)},m));return}u(m),i.push(s.jsx("p",{className:"mb-2 text-xs leading-relaxed text-foreground/85",children:tv(p,t,r,m)},m))}),u("end"),c!==null&&i.push(s.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px]",children:c.join(` +`)},"code-end")),s.jsx("div",{className:"max-w-3xl",children:i})}function tv(e,t,r,n){return e.split(/(\[\[[^\]]+\]\]|\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g).map((o,c)=>{const u=`${n}-${c}`,f=o.match(/^\[\[([^\]|]+)(?:\|([^\]]+))?\]\]$/);if(f){const h=f[1].trim(),m=(f[2]??f[1]).trim();return r.has(h.toLowerCase())?s.jsx("button",{onClick:()=>t(h),className:"rounded bg-primary/10 px-1 text-primary underline decoration-primary/40 underline-offset-2 hover:bg-primary/20 cursor-pointer",children:m},u):s.jsx("span",{className:"rounded bg-background/40 px-1 text-muted-foreground",title:"Notiz existiert (noch) nicht",children:m},u)}return o.startsWith("**")&&o.endsWith("**")?s.jsx("b",{className:"font-semibold text-foreground",children:o.slice(2,-2)},u):o.startsWith("*")&&o.endsWith("*")&&o.length>2?s.jsx("i",{children:o.slice(1,-1)},u):o.startsWith("`")&&o.endsWith("`")?s.jsx("code",{className:"rounded bg-background/50 px-1 font-mono text-[11px] text-teal-300",children:o.slice(1,-1)},u):s.jsx("span",{children:o},u)})}function dJ(){var S,w,k,N,E;cR();const[e,t]=x.useState(()=>{const C=window.location.hash.slice(1);return gs.some(A=>A.id===C)?C:"dashboard"}),r=x.useCallback(C=>{window.location.hash.slice(1)===C?t(C):window.location.hash=C},[]),[n,i]=x.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,c]=x.useState(!1),[u,f]=x.useState("maintenance"),[h,m]=x.useState(()=>window.location.hash==="#mc3"),{data:p}=Kx(),{data:v}=Co(2e4);x.useEffect(()=>{document.documentElement.classList.add("dark")},[]),x.useEffect(()=>{const C=A=>{var O;f(((O=A.detail)==null?void 0:O.tab)||"maintenance"),c(!0)};return window.addEventListener("open-system-drawer",C),()=>window.removeEventListener("open-system-drawer",C)},[]),x.useEffect(()=>{const C=A=>{var O;const _=(O=A.detail)==null?void 0:O.view;_&&r(_)};return window.addEventListener("mc-navigate",C),()=>window.removeEventListener("mc-navigate",C)},[r]),x.useEffect(()=>{const C=()=>{m(window.location.hash==="#mc3");const A=window.location.hash.slice(1);gs.some(_=>_.id===A)&&t(A)};return window.addEventListener("hashchange",C),()=>window.removeEventListener("hashchange",C)},[]);const b=gs.find(C=>C.id===e);return h?s.jsx($X,{}):s.jsxs("div",{className:"flex h-full relative",children:[s.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[s.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),s.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),s.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),s.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),s.jsx(ID,{onNavigate:r}),s.jsx(yE,{open:o,onClose:()=>c(!1),defaultTab:u}),s.jsxs("aside",{className:J("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:[s.jsxs("div",{className:J("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[s.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[s.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&s.jsxs("div",{className:"leading-tight",children:[s.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),s.jsx("button",{onClick:()=>{i(C=>{const A=!C;return localStorage.setItem("mc_sidebar_collapsed",A.toString()),A})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?s.jsx(Kn,{className:"h-4 w-4","aria-hidden":"true"}):s.jsx(zM,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let C=null;return gs.map(A=>{const _=A.group!==C;return C=A.group,s.jsxs("div",{className:"space-y-1",children:[_&&(n?C!==gs[0].group&&s.jsx("div",{className:"my-3 border-t border-border/30"}):s.jsx("div",{className:"mt-5 mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40 first:mt-0 select-none",children:A.group})),s.jsxs("a",{href:`#${A.id}`,"aria-current":e===A.id?"page":void 0,className:J("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",e===A.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?A.label:void 0,"aria-label":n?A.label:void 0,children:[s.jsx(A.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&s.jsx("span",{className:"truncate",children:A.label})]})]},A.id)})})()}),s.jsx("div",{className:J("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?s.jsx("div",{className:"flex justify-center",children:s.jsx("span",{className:J("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",p?p.engine_reachable?p.brain&&!p.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:p?p.engine_reachable?p.brain&&!p.brain.ready?`Hirn offline (${p.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):s.jsxs("div",{className:"space-y-2 text-left",children:[p?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:J("h-2 w-2 rounded-full animate-pulse",p.engine_reachable?"bg-emerald-500":"bg-amber-500")}),s.jsxs("span",{className:"truncate",children:["Engine ",p.engine_reachable?"online":"offline"]})]}),p.brain&&!p.brain.ready&&s.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${p.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[s.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),s.jsxs("span",{className:"truncate",children:["Hirn offline",p.brain.model?` (${p.brain.model})`:""]})]})]}):s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",s.jsx("span",{className:"truncate",children:"Backend offline"})]}),(v==null?void 0:v.versions)&&s.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[s.jsxs("div",{className:"truncate",title:v.versions.mc2?`${v.versions.mc2.branch}-${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""} (${v.versions.mc2.date})`:"nicht gefunden",children:[s.jsx("strong",{children:"MC2:"})," ",v.versions.mc2?`${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""}`:"—"]}),s.jsxs("div",{className:"truncate",title:((S=v.versions.engine)==null?void 0:S.type)==="git"?`${v.versions.engine.branch}-${v.versions.engine.hash}${v.versions.engine.dirty?"*":""} (${v.versions.engine.date})`:((w=v.versions.engine)==null?void 0:w.version_text)||"unbekannt",children:[s.jsx("strong",{children:"Engine:"})," ",((k=v.versions.engine)==null?void 0:k.type)==="git"?`${v.versions.engine.hash}${v.versions.engine.dirty?"*":""}`:((E=(N=v.versions.engine)==null?void 0:N.version_text)==null?void 0:E.split(" ").pop())||"—"]}),s.jsxs("div",{className:"truncate",title:v.versions.hermes_agent?`${v.versions.hermes_agent.branch}-${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""} (${v.versions.hermes_agent.date})`:"nicht gefunden",children:[s.jsx("strong",{children:"Hermes Agent:"})," ",v.versions.hermes_agent?`${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[s.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(oE,{}),s.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),s.jsxs("button",{onClick:()=>{const C=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(C)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[s.jsx(KM,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"Suchen"}),s.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),s.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&s.jsx(VX,{onNavigate:C=>r(C)}),e==="auftraege"&&s.jsx(JX,{}),e==="models"&&s.jsx(BL,{}),e==="connect"&&s.jsx(gE,{}),e==="memory"&&s.jsx(vE,{}),e==="wissen"&&s.jsx(cJ,{}),e==="chronik"&&s.jsx(oJ,{}),e==="agent"&&s.jsx(xE,{}),e==="konsole"&&s.jsx(VL,{}),e==="guide"&&s.jsx(QL,{}),!["dashboard","auftraege","models","connect","memory","wissen","chronik","agent","konsole","guide"].includes(e)&&s.jsx(YL,{title:b.label,hint:b.hint})]})]})]})}class fJ extends Ox.Component{constructor(){super(...arguments);ns(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,n){console.error("Unbehandelter UI-Fehler:",r,n.componentStack)}render(){return this.state.error?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:s.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[s.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),s.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),s.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const hJ=new gM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});H4.createRoot(document.getElementById("root")).render(s.jsx(Ox.StrictMode,{children:s.jsx(fJ,{children:s.jsx(vM,{client:hJ,children:s.jsx(dJ,{})})})}));export{Ox as R,I2 as a,X7 as b,Wc as c,j2 as d,ho as e,Px as g,Kf as i,s as j,S2 as m,P0 as o,x as r}; diff --git a/frontend/dist/assets/index-CunuYLZu.css b/frontend/dist/assets/index-CunuYLZu.css deleted file mode 100644 index 8002c9e..0000000 --- a/frontend/dist/assets/index-CunuYLZu.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@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-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-300:oklch(85.5% .138 181.071);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-fuchsia-300:oklch(83.3% .145 321.434);--color-fuchsia-400:oklch(74% .238 322.16);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-neutral-200:oklch(92.2% 0 0);--color-neutral-400:oklch(70.8% 0 0);--color-neutral-700:oklch(37.1% 0 0);--color-neutral-800:oklch(26.9% 0 0);--color-neutral-950:oklch(14.5% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--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: 1.5 ;--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);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@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%;-moz-tab-size:4;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;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]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.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}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.-top-0\.5{top:calc(var(--spacing) * -.5)}.top-0{top:0}.top-1\/2{top:50%}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.right-0{right:0}.right-3{right:calc(var(--spacing) * 3)}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-\[-10\%\]{bottom:-10%}.-left-\[23px\]{left:-23px}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-\[-10\%\]{left:-10%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-50{z-index:-50}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-\[60\]{z-index:60}.z-\[99\]{z-index:99}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-3{margin-block:calc(var(--spacing) * 3)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.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-5{margin-top:calc(var(--spacing) * 5)}.mt-auto{margin-top:auto}.mr-0\.5{margin-right:calc(var(--spacing) * .5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.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-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-6{-webkit-line-clamp:6;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.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{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-44{height:calc(var(--spacing) * 44)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-\[120px\]{height:120px}.h-\[150px\]{height:150px}.h-\[480px\]{height:480px}.h-\[500px\]{height:500px}.h-\[calc\(100vh-8\.5rem\)\]{height:calc(100vh - 8.5rem)}.h-\[calc\(100vh-13rem\)\]{height:calc(100vh - 13rem)}.h-full{height:100%}.h-px{height:1px}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[calc\(100vh-14rem\)\]{max-height:calc(100vh - 14rem)}.min-h-\[16rem\]{min-height:16rem}.min-h-\[58vh\]{min-height:58vh}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.min-h-\[560px\]{min-height:560px}.min-h-\[620px\]{min-height:620px}.min-h-screen{min-height:100vh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.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\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-24{width:calc(var(--spacing) * 24)}.w-40{width:calc(var(--spacing) * 40)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-\[40\%\]{width:40%}.w-\[50\%\]{width:50%}.w-fit{width:fit-content}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[16rem\]{max-width:16rem}.max-w-\[120px\]{max-width:120px}.max-w-\[180px\]{max-width:180px}.max-w-\[250px\]{max-width:250px}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-\[2\.5rem\]{min-width:2.5rem}.min-w-\[2rem\]{min-width:2rem}.min-w-\[140px\]{min-width:140px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.scroll-mt-20{scroll-margin-top:calc(var(--spacing) * 20)}.scrollbar-none{scrollbar-width:none}.scrollbar-thin{scrollbar-width:thin}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.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-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.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-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}: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)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-7>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 7) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}:where(.divide-border\/20>:not(:last-child)){border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\/20>:not(:last-child)){border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.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-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/25{border-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/50{border-color:color-mix(in oklab,var(--color-amber-500) 50%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border,.border-border\/20{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/20{border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.border-border\/30{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.border-border\/50{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,hsl(var(--border)) 50%,transparent)}}.border-border\/60{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.border-border\/70{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/70{border-color:color-mix(in oklab,hsl(var(--border)) 70%,transparent)}}.border-border\/80{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,hsl(var(--border)) 80%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/25{border-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/25{border-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-500\/10{border-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/10{border-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.border-emerald-500\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/15{border-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/25{border-color:#00bb7f40}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/25{border-color:color-mix(in oklab,var(--color-emerald-500) 25%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-fuchsia-500\/25{border-color:#e12afb40}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/25{border-color:color-mix(in oklab,var(--color-fuchsia-500) 25%,transparent)}}.border-fuchsia-500\/30{border-color:#e12afb4d}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/30{border-color:color-mix(in oklab,var(--color-fuchsia-500) 30%,transparent)}}.border-fuchsia-500\/40{border-color:#e12afb66}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/40{border-color:color-mix(in oklab,var(--color-fuchsia-500) 40%,transparent)}}.border-indigo-500\/25{border-color:#625fff40}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/25{border-color:color-mix(in oklab,var(--color-indigo-500) 25%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-indigo-500\/40{border-color:#625fff66}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/40{border-color:color-mix(in oklab,var(--color-indigo-500) 40%,transparent)}}.border-lime-500\/25{border-color:#80cd0040}@supports (color:color-mix(in lab,red,red)){.border-lime-500\/25{border-color:color-mix(in oklab,var(--color-lime-500) 25%,transparent)}}.border-neutral-700{border-color:var(--color-neutral-700)}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-pink-500\/25{border-color:#f6339a40}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/25{border-color:color-mix(in oklab,var(--color-pink-500) 25%,transparent)}}.border-primary,.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.border-primary\/25{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/25{border-color:color-mix(in oklab,hsl(var(--primary)) 25%,transparent)}}.border-primary\/30{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.border-primary\/40{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.border-primary\/45{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.border-primary\/50{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.border-primary\/60{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/60{border-color:color-mix(in oklab,hsl(var(--primary)) 60%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500) 25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\/40{border-color:color-mix(in oklab,var(--color-red-500) 40%,transparent)}}.border-red-500\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\/50{border-color:color-mix(in oklab,var(--color-red-500) 50%,transparent)}}.border-red-500\/60{border-color:#fb2c3699}@supports (color:color-mix(in lab,red,red)){.border-red-500\/60{border-color:color-mix(in oklab,var(--color-red-500) 60%,transparent)}}.border-sky-500\/25{border-color:#00a5ef40}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/25{border-color:color-mix(in oklab,var(--color-sky-500) 25%,transparent)}}.border-sky-500\/40{border-color:#00a5ef66}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/40{border-color:color-mix(in oklab,var(--color-sky-500) 40%,transparent)}}.border-slate-500\/25{border-color:#62748e40}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/25{border-color:color-mix(in oklab,var(--color-slate-500) 25%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-teal-500\/25{border-color:#00baa740}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/25{border-color:color-mix(in oklab,var(--color-teal-500) 25%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/15{border-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/15{border-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/25{border-color:#8d54ff40}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/25{border-color:color-mix(in oklab,var(--color-violet-500) 25%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-violet-500\/40{border-color:#8d54ff66}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/40{border-color:color-mix(in oklab,var(--color-violet-500) 40%,transparent)}}.border-t-emerald-500\/70{border-top-color:#00bb7fb3}@supports (color:color-mix(in lab,red,red)){.border-t-emerald-500\/70{border-top-color:color-mix(in oklab,var(--color-emerald-500) 70%,transparent)}}.border-t-primary\/70{border-top-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-t-primary\/70{border-top-color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.border-t-violet-500\/70{border-top-color:#8d54ffb3}@supports (color:color-mix(in lab,red,red)){.border-t-violet-500\/70{border-top-color:color-mix(in oklab,var(--color-violet-500) 70%,transparent)}}.border-l-amber-500\/80{border-left-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.border-l-amber-500\/80{border-left-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.border-l-cyan-500\/80{border-left-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.border-l-cyan-500\/80{border-left-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.border-l-indigo-500\/80{border-left-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.border-l-indigo-500\/80{border-left-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.border-l-muted{border-left-color:hsl(var(--muted))}.border-l-violet-500\/80{border-left-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.border-l-violet-500\/80{border-left-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-\[\#030712\]{background-color:#030712}.bg-\[hsl\(224\,30\%\,6\%\)\]{background-color:#0b0d14}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-amber-500\/\[0\.06\]{background-color:#f99c000f}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/\[0\.06\]{background-color:color-mix(in oklab,var(--color-amber-500) 6%,transparent)}}.bg-background\/10{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/10{background-color:color-mix(in oklab,hsl(var(--background)) 10%,transparent)}}.bg-background\/15{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/15{background-color:color-mix(in oklab,hsl(var(--background)) 15%,transparent)}}.bg-background\/20{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,hsl(var(--background)) 20%,transparent)}}.bg-background\/25{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/25{background-color:color-mix(in oklab,hsl(var(--background)) 25%,transparent)}}.bg-background\/30{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/30{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.bg-background\/35{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/35{background-color:color-mix(in oklab,hsl(var(--background)) 35%,transparent)}}.bg-background\/40{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.bg-background\/50{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,hsl(var(--background)) 50%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.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-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-border,.bg-border\/30{background-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.bg-border\/30{background-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.bg-card,.bg-card\/10{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/10{background-color:color-mix(in oklab,hsl(var(--card)) 10%,transparent)}}.bg-card\/20{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,hsl(var(--card)) 20%,transparent)}}.bg-card\/30{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.bg-card\/40{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/40{background-color:color-mix(in oklab,hsl(var(--card)) 40%,transparent)}}.bg-card\/45{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/45{background-color:color-mix(in oklab,hsl(var(--card)) 45%,transparent)}}.bg-card\/50{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,hsl(var(--card)) 50%,transparent)}}.bg-card\/60{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/60{background-color:color-mix(in oklab,hsl(var(--card)) 60%,transparent)}}.bg-card\/70{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/70{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.bg-card\/85{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/85{background-color:color-mix(in oklab,hsl(var(--card)) 85%,transparent)}}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-emerald-500\/\[0\.07\]{background-color:#00bb7f12}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/\[0\.07\]{background-color:color-mix(in oklab,var(--color-emerald-500) 7%,transparent)}}.bg-fuchsia-500{background-color:var(--color-fuchsia-500)}.bg-fuchsia-500\/10{background-color:#e12afb1a}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-500\/10{background-color:color-mix(in oklab,var(--color-fuchsia-500) 10%,transparent)}}.bg-fuchsia-500\/15{background-color:#e12afb26}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-500\/15{background-color:color-mix(in oklab,var(--color-fuchsia-500) 15%,transparent)}}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.bg-lime-500{background-color:var(--color-lime-500)}.bg-lime-500\/15{background-color:#80cd0026}@supports (color:color-mix(in lab,red,red)){.bg-lime-500\/15{background-color:color-mix(in oklab,var(--color-lime-500) 15%,transparent)}}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground\/30{background-color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/30{background-color:color-mix(in oklab,hsl(var(--muted-foreground)) 30%,transparent)}}.bg-muted-foreground\/40{background-color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/40{background-color:color-mix(in oklab,hsl(var(--muted-foreground)) 40%,transparent)}}.bg-muted-foreground\/45{background-color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/45{background-color:color-mix(in oklab,hsl(var(--muted-foreground)) 45%,transparent)}}.bg-muted\/10{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,hsl(var(--muted)) 10%,transparent)}}.bg-muted\/20{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,hsl(var(--muted)) 20%,transparent)}}.bg-muted\/25{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/25{background-color:color-mix(in oklab,hsl(var(--muted)) 25%,transparent)}}.bg-muted\/40{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,hsl(var(--muted)) 40%,transparent)}}.bg-neutral-800{background-color:var(--color-neutral-800)}.bg-neutral-950{background-color:var(--color-neutral-950)}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-pink-500{background-color:var(--color-pink-500)}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-popover,.bg-popover\/95{background-color:hsl(var(--popover))}@supports (color:color-mix(in lab,red,red)){.bg-popover\/95{background-color:color-mix(in oklab,hsl(var(--popover)) 95%,transparent)}}.bg-primary,.bg-primary\/5{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.bg-primary\/15{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.bg-primary\/\[0\.06\]{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/\[0\.06\]{background-color:color-mix(in oklab,hsl(var(--primary)) 6%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/15{background-color:color-mix(in oklab,var(--color-rose-500) 15%,transparent)}}.bg-sky-500\/10{background-color:#00a5ef1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-sky-500) 10%,transparent)}}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-teal-500{background-color:var(--color-teal-500)}.bg-teal-500\/10{background-color:#00baa71a}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/10{background-color:color-mix(in oklab,var(--color-teal-500) 10%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\/5{background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/5{background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.bg-violet-500\/\[0\.04\]{background-color:#8d54ff0a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/\[0\.04\]{background-color:color-mix(in oklab,var(--color-violet-500) 4%,transparent)}}.bg-violet-500\/\[0\.05\]{background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/\[0\.05\]{background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-foreground{--tw-gradient-from:hsl(var(--foreground));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/15{--tw-gradient-from:#00baa726}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/15{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 15%, transparent)}}.from-teal-500\/15{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/20{--tw-gradient-from:#00baa733}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 20%, transparent)}}.from-teal-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-foreground{--tw-gradient-via:hsl(var(--foreground));--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/10{--tw-gradient-via:#625fff1a}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 10%, transparent)}}.via-indigo-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/15{--tw-gradient-via:#625fff26}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/15{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.via-indigo-500\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary{--tw-gradient-to:hsl(var(--primary));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/15{--tw-gradient-to:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/15{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 15%, transparent)}}.to-purple-500\/15{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/20{--tw-gradient-to:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.to-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.fill-primary\/20{fill:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.fill-primary\/20{fill:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.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-8{padding:calc(var(--spacing) * 8)}.p-12{padding:calc(var(--spacing) * 12)}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.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)}.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-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}.font-space{font-family:Space Grotesk,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.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-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.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-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.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-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-300\/70{color:#ffd236b3}@supports (color:color-mix(in lab,red,red)){.text-amber-300\/70{color:color-mix(in oklab,var(--color-amber-300) 70%,transparent)}}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/90{color:color-mix(in oklab,var(--color-amber-400) 90%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-cyan-200\/90{color:#a2f4fde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-200\/90{color:color-mix(in oklab,var(--color-cyan-200) 90%,transparent)}}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-300\/80{color:#53eafdcc}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/80{color:color-mix(in oklab,var(--color-cyan-300) 80%,transparent)}}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-300\/80{color:#5ee9b5cc}@supports (color:color-mix(in lab,red,red)){.text-emerald-300\/80{color:color-mix(in oklab,var(--color-emerald-300) 80%,transparent)}}.text-emerald-300\/90{color:#5ee9b5e6}@supports (color:color-mix(in lab,red,red)){.text-emerald-300\/90{color:color-mix(in oklab,var(--color-emerald-300) 90%,transparent)}}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-400\/90{color:#00d294e6}@supports (color:color-mix(in lab,red,red)){.text-emerald-400\/90{color:color-mix(in oklab,var(--color-emerald-400) 90%,transparent)}}.text-foreground,.text-foreground\/70{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/70{color:color-mix(in oklab,hsl(var(--foreground)) 70%,transparent)}}.text-foreground\/80{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,hsl(var(--foreground)) 80%,transparent)}}.text-foreground\/85{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/85{color:color-mix(in oklab,hsl(var(--foreground)) 85%,transparent)}}.text-foreground\/90{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,hsl(var(--foreground)) 90%,transparent)}}.text-fuchsia-300{color:var(--color-fuchsia-300)}.text-fuchsia-400{color:var(--color-fuchsia-400)}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-lime-400{color:var(--color-lime-400)}.text-muted-foreground,.text-muted-foreground\/40{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/40{color:color-mix(in oklab,hsl(var(--muted-foreground)) 40%,transparent)}}.text-muted-foreground\/50{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.text-muted-foreground\/55{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/55{color:color-mix(in oklab,hsl(var(--muted-foreground)) 55%,transparent)}}.text-muted-foreground\/60{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,hsl(var(--muted-foreground)) 60%,transparent)}}.text-muted-foreground\/70{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,hsl(var(--muted-foreground)) 70%,transparent)}}.text-muted-foreground\/75{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/75{color:color-mix(in oklab,hsl(var(--muted-foreground)) 75%,transparent)}}.text-muted-foreground\/80{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,hsl(var(--muted-foreground)) 80%,transparent)}}.text-neutral-200{color:var(--color-neutral-200)}.text-neutral-400{color:var(--color-neutral-400)}.text-orange-300{color:var(--color-orange-300)}.text-pink-400{color:var(--color-pink-400)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/70{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.text-primary\/80{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-red-200{color:var(--color-red-200)}.text-red-300{color:var(--color-red-300)}.text-red-300\/90{color:#ffa3a3e6}@supports (color:color-mix(in lab,red,red)){.text-red-300\/90{color:color-mix(in oklab,var(--color-red-300) 90%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-sky-300{color:var(--color-sky-300)}.text-sky-300\/90{color:#77d4ffe6}@supports (color:color-mix(in lab,red,red)){.text-sky-300\/90{color:color-mix(in oklab,var(--color-sky-300) 90%,transparent)}}.text-sky-400{color:var(--color-sky-400)}.text-slate-300{color:var(--color-slate-300)}.text-teal-300{color:var(--color-teal-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-200\/90{color:#ddd6ffe6}@supports (color:color-mix(in lab,red,red)){.text-violet-200\/90{color:color-mix(in oklab,var(--color-violet-200) 90%,transparent)}}.text-violet-300{color:var(--color-violet-300)}.text-violet-300\/80{color:#c4b4ffcc}@supports (color:color-mix(in lab,red,red)){.text-violet-300\/80{color:color-mix(in oklab,var(--color-violet-300) 80%,transparent)}}.text-violet-400{color:var(--color-violet-400)}.text-violet-400\/70{color:#a685ffb3}@supports (color:color-mix(in lab,red,red)){.text-violet-400\/70{color:color-mix(in oklab,var(--color-violet-400) 70%,transparent)}}.text-white{color:var(--color-white)}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.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,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.decoration-primary\/40{-webkit-text-decoration-color:hsl(var(--primary));text-decoration-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.decoration-primary\/40{-webkit-text-decoration-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent);text-decoration-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.\[color-scheme\:dark\]{color-scheme:dark}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-35{opacity:.35}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-85{opacity:.85}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--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-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(16\,185\,129\,0\.4\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#10b98166);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(239\,68\,68\,0\.4\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#ef444466);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(245\,158\,11\,0\.4\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 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)}.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-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)}.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-2{--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)}.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)}.shadow-amber-500\/10{--tw-shadow-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/15{--tw-shadow-color:#00000026}@supports (color:color-mix(in lab,red,red)){.shadow-black\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/25{--tw-shadow-color:#00000040}@supports (color:color-mix(in lab,red,red)){.shadow-black\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 25%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/5{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/20{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/10{--tw-shadow-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-background\/60{--tw-ring-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.ring-background\/60{--tw-ring-color:color-mix(in oklab, hsl(var(--background)) 60%, transparent)}}.ring-black\/40{--tw-ring-color:#0006}@supports (color:color-mix(in lab,red,red)){.ring-black\/40{--tw-ring-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.ring-white\/70{--tw-ring-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.ring-white\/70{--tw-ring-color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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,)}.blur-\[130px\]{--tw-blur:blur(130px);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,)}.blur-\[140px\]{--tw-blur:blur(140px);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,)}.blur-\[160px\]{--tw-blur:blur(160px);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,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);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,)}.grayscale{--tw-grayscale:grayscale(100%);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,)}.invert{--tw-invert:invert(100%);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,)}.sepia{--tw-sepia:sepia(100%);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,)!important}.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,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.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\!{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!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.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-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))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:text-foreground:is(:where(.group):hover *){color:hsl(var(--foreground))}.group-hover\:text-primary:is(:where(.group):hover *){color:hsl(var(--primary))}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder,.placeholder\:text-muted-foreground\/50::placeholder{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted-foreground\/50::placeholder{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.first\:mt-0:first-child{margin-top:0}.first\:rounded-l-sm:first-child{border-top-left-radius:calc(var(--radius) - 4px);border-bottom-left-radius:calc(var(--radius) - 4px)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media(hover:hover){.hover\:border-amber-500\/50:hover{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.hover\:border-amber-500\/50:hover{border-color:color-mix(in oklab,var(--color-amber-500) 50%,transparent)}}.hover\:border-border:hover,.hover\:border-border\/60:hover{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.hover\:border-border\/60:hover{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.hover\:border-emerald-500\/40:hover{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.hover\:border-emerald-500\/40:hover{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.hover\:border-primary\/20:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/20:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.hover\:border-primary\/45:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/45:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.hover\:border-red-500\/50:hover{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.hover\:border-red-500\/50:hover{border-color:color-mix(in oklab,var(--color-red-500) 50%,transparent)}}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.hover\:bg-background\/30:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/30:hover{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.hover\:bg-background\/40:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/40:hover{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.hover\:bg-background\/60:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,hsl(var(--background)) 60%,transparent)}}.hover\:bg-background\/80:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,hsl(var(--background)) 80%,transparent)}}.hover\:bg-card\/45:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/45:hover{background-color:color-mix(in oklab,hsl(var(--card)) 45%,transparent)}}.hover\:bg-card\/70:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/70:hover{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.hover\:bg-card\/75:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/75:hover{background-color:color-mix(in oklab,hsl(var(--card)) 75%,transparent)}}.hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.hover\:bg-emerald-500\/20:hover{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/20:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.hover\:bg-fuchsia-500\/20:hover{background-color:#e12afb33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-fuchsia-500\/20:hover{background-color:color-mix(in oklab,var(--color-fuchsia-500) 20%,transparent)}}.hover\:bg-indigo-500\/15:hover{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-indigo-500\/15:hover{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.hover\:bg-neutral-700:hover{background-color:var(--color-neutral-700)}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 90%,transparent)}}.hover\:bg-primary\/95:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/95:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 95%,transparent)}}.hover\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\:bg-red-500\/5:hover{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/5:hover{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:bg-red-500\/15:hover{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/15:hover{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.hover\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.hover\:bg-violet-500\/20:hover{background-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-violet-500\/20:hover{background-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover,.hover\:text-primary\/80:hover{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-xl:hover{--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)}}.focus\:border-primary:focus,.focus\:border-primary\/50:focus{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:border-primary\/50:focus{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.focus\:ring-1:focus{--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)}.focus\:ring-primary:focus,.focus\:ring-primary\/50:focus{--tw-ring-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, hsl(var(--primary)) 50%, transparent)}}.focus\:ring-violet-500\/50:focus{--tw-ring-color:#8d54ff80}@supports (color:color-mix(in lab,red,red)){.focus\:ring-violet-500\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-violet-500) 50%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--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-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:cursor-default:disabled{cursor:default}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-36{width:calc(var(--spacing) * 36)}.sm\:w-\[640px\]{width:640px}.sm\:w-auto{width:auto}.sm\:max-w-\[400px\]{max-width:400px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:self-auto{align-self:auto}.sm\:p-10{padding:calc(var(--spacing) * 10)}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[170px_1fr\]{grid-template-columns:170px 1fr}}@media(min-width:64rem){.lg\:absolute{position:absolute}.lg\:top-4{top:calc(var(--spacing) * 4)}.lg\:right-4{right:calc(var(--spacing) * 4)}.lg\:bottom-4{bottom:calc(var(--spacing) * 4)}.lg\:left-4{left:calc(var(--spacing) * 4)}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-\[calc\(100\%-2rem\)\]{height:calc(100% - 2rem)}.lg\:w-40{width:calc(var(--spacing) * 40)}.lg\:w-72{width:calc(var(--spacing) * 72)}.lg\:w-80{width:calc(var(--spacing) * 80)}.lg\:w-96{width:calc(var(--spacing) * 96)}.lg\:max-w-md{max-width:var(--container-md)}.lg\:flex-none{flex:none}.lg\:shrink-0{flex-shrink:0}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[1fr_300px\]{grid-template-columns:1fr 300px}.lg\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1\.3fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}.lg\:flex-row{flex-direction:row}.lg\:items-stretch{align-items:stretch}.lg\:rounded-xl{border-radius:var(--radius-xl)}.lg\:border{border-style:var(--tw-border-style);border-width:1px}.lg\:border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.lg\:border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.lg\:bg-background\/65{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.lg\:bg-background\/65{background-color:color-mix(in oklab,hsl(var(--background)) 65%,transparent)}}.lg\:p-4{padding:calc(var(--spacing) * 4)}.lg\:shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.lg\:shadow-black\/50{--tw-shadow-color:#00000080}@supports (color:color-mix(in lab,red,red)){.lg\:shadow-black\/50{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 50%, transparent) var(--tw-shadow-alpha), transparent)}}.lg\:backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}}@media(min-width:80rem){.xl\:max-w-xl{max-width:var(--container-xl)}}}:root{--background:224 30% 6%;--foreground:210 20% 92%;--card:224 25% 10%;--card-foreground:210 20% 94%;--popover:224 28% 9%;--popover-foreground:210 20% 94%;--primary:172 72% 50%;--primary-foreground:224 47% 8%;--muted:220 16% 14%;--muted-foreground:215 14% 64%;--accent:220 16% 16%;--accent-foreground:210 20% 94%;--border:222 18% 23%;--input:222 18% 23%;--ring:172 72% 50%;--radius:.75rem;color-scheme:dark}.light{--background:0 0% 100%;--foreground:222 22% 12%;--card:0 0% 100%;--card-foreground:222 22% 12%;--popover:0 0% 100%;--popover-foreground:222 22% 12%;--primary:172 70% 38%;--primary-foreground:0 0% 100%;--muted:220 14% 95%;--muted-foreground:220 9% 42%;--accent:220 14% 94%;--accent-foreground:222 22% 12%;--border:220 13% 88%;--input:220 13% 88%;--ring:172 66% 50%;color-scheme:light}@keyframes aurora{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.animate-aurora{background-size:200% 200%;animation:25s infinite aurora}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:9999px}*{border-color:hsl(var(--border) / .85);outline-color:hsl(var(--primary) / .5)}:focus-visible{outline:2px solid hsl(var(--primary) / .7);outline-offset:2px}@media(prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}@keyframes flow-cyan{0%{stroke-dasharray:6 3;stroke-dashoffset:18px}to{stroke-dasharray:6 3;stroke-dashoffset:0}}.animate-flow-cyan{animation:1.2s linear infinite flow-cyan}.rounded-2xl.border.bg-card\/45{position:relative;overflow:hidden;background-color:hsl(var(--card) / .85)!important;border-color:hsl(var(--border) / .95)!important;transition:transform .3s cubic-bezier(.4,0,.2,1),background-color .3s cubic-bezier(.4,0,.2,1),border-color .3s cubic-bezier(.4,0,.2,1),box-shadow .3s cubic-bezier(.4,0,.2,1)!important;box-shadow:0 10px 30px -15px #00000073,inset 0 1px #ffffff0d!important}.rounded-2xl.border.bg-card\/45:before{content:"";background:linear-gradient(90deg,hsl(var(--primary)),#6366f1,#a855f7);opacity:.75;height:3.5px;position:absolute;top:0;left:0;right:0;transition:opacity .3s!important}.rounded-2xl.border.bg-card\/45:hover{transform:translateY(-3px);background-color:hsl(var(--card) / .92)!important;border-color:hsl(var(--primary) / .35)!important;box-shadow:0 20px 40px -20px #000000a6,0 0 18px 2px hsl(var(--primary) / .05)!important}.rounded-2xl.border.bg-card\/45:hover:before{opacity:1}.rounded-xl.border.bg-card\/45{background-color:hsl(var(--card) / .88)!important;border-color:hsl(var(--border) / .9)!important;transition:background-color .2s,border-color .2s!important}.rounded-xl.border.bg-card\/45:hover{background-color:hsl(var(--card) / .95)!important;border-color:hsl(var(--primary) / .3)!important}aside nav a[class*="bg-primary/15"]:not([class*=justify-center]){background:linear-gradient(90deg,hsl(var(--primary) / .18),#6366f11f)!important;color:hsl(var(--primary))!important;border-left:3.5px solid hsl(var(--primary))!important;border-radius:0 var(--radius) var(--radius) 0!important;padding-left:calc(.75rem - 3.5px)!important;box-shadow:inset 0 1px #ffffff05!important}aside nav a[class*="bg-primary/15"][class*=justify-center]{background:hsl(var(--primary) / .18)!important;color:hsl(var(--primary))!important;box-shadow:0 0 12px 1px hsl(var(--primary) / .1)!important;border:1px solid hsl(var(--primary) / .3)!important}::-webkit-scrollbar-thumb{border-radius:9999px;background:hsl(var(--primary) / .25)!important}::-webkit-scrollbar-thumb:hover{background:hsl(var(--primary) / .5)!important}input:focus,textarea:focus,select:focus{outline:none;border-color:hsl(var(--primary))!important;box-shadow:0 0 0 2px hsl(var(--primary) / .15)!important}@media(min-width:1440px){html{font-size:16.5px}}@media(min-width:1920px){html{font-size:17.5px}}@media(min-width:2560px){html{font-size:19px}}@media(min-width:3440px){html{font-size:20px}}@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-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@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:"";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:"";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:"";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:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} diff --git a/frontend/dist/assets/index-DHhyicLg.css b/frontend/dist/assets/index-DHhyicLg.css new file mode 100644 index 0000000..01605d4 --- /dev/null +++ b/frontend/dist/assets/index-DHhyicLg.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@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-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-teal-300:oklch(85.5% .138 181.071);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-fuchsia-300:oklch(83.3% .145 321.434);--color-fuchsia-400:oklch(74% .238 322.16);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-neutral-200:oklch(92.2% 0 0);--color-neutral-400:oklch(70.8% 0 0);--color-neutral-700:oklch(37.1% 0 0);--color-neutral-800:oklch(26.9% 0 0);--color-neutral-950:oklch(14.5% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--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: 1.5 ;--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);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--default-mono-font-family:"JetBrains Mono", ui-monospace, SFMono-Regular, monospace}}@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%;-moz-tab-size:4;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;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]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.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}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.-top-0\.5{top:calc(var(--spacing) * -.5)}.top-0{top:0}.top-1\/2{top:50%}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-\[-10\%\]{top:-10%}.top-\[30\%\]{top:30%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.right-0{right:0}.right-3{right:calc(var(--spacing) * 3)}.right-\[-10\%\]{right:-10%}.right-\[20\%\]{right:20%}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-\[-10\%\]{bottom:-10%}.-left-\[23px\]{left:-23px}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-\[-10\%\]{left:-10%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-50{z-index:-50}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-\[60\]{z-index:60}.z-\[99\]{z-index:99}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-3{margin-block:calc(var(--spacing) * 3)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.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-5{margin-top:calc(var(--spacing) * 5)}.mt-auto{margin-top:auto}.mr-0\.5{margin-right:calc(var(--spacing) * .5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.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-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-6{-webkit-line-clamp:6;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.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{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-44{height:calc(var(--spacing) * 44)}.h-\[40\%\]{height:40%}.h-\[50\%\]{height:50%}.h-\[120px\]{height:120px}.h-\[150px\]{height:150px}.h-\[480px\]{height:480px}.h-\[500px\]{height:500px}.h-\[calc\(100vh-8\.5rem\)\]{height:calc(100vh - 8.5rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-20{max-height:calc(var(--spacing) * 20)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.min-h-\[16rem\]{min-height:16rem}.min-h-\[58vh\]{min-height:58vh}.min-h-\[90px\]{min-height:90px}.min-h-\[300px\]{min-height:300px}.min-h-\[620px\]{min-height:620px}.min-h-screen{min-height:100vh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.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\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-24{width:calc(var(--spacing) * 24)}.w-40{width:calc(var(--spacing) * 40)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-\[40\%\]{width:40%}.w-\[50\%\]{width:50%}.w-fit{width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[16rem\]{max-width:16rem}.max-w-\[120px\]{max-width:120px}.max-w-\[250px\]{max-width:250px}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-\[2\.5rem\]{min-width:2.5rem}.min-w-\[2rem\]{min-width:2rem}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.scroll-mt-20{scroll-margin-top:calc(var(--spacing) * 20)}.scrollbar-none{scrollbar-width:none}.scrollbar-thin{scrollbar-width:thin}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.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-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.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-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}: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)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-7>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 7) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}:where(.divide-border\/20>:not(:last-child)){border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\/20>:not(:last-child)){border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.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-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/25{border-color:#f99c0040}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/25{border-color:color-mix(in oklab,var(--color-amber-500) 25%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/40{border-color:color-mix(in oklab,var(--color-amber-500) 40%,transparent)}}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/50{border-color:color-mix(in oklab,var(--color-amber-500) 50%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-border,.border-border\/20{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/20{border-color:color-mix(in oklab,hsl(var(--border)) 20%,transparent)}}.border-border\/30{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/30{border-color:color-mix(in oklab,hsl(var(--border)) 30%,transparent)}}.border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.border-border\/50{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,hsl(var(--border)) 50%,transparent)}}.border-border\/60{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/60{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.border-border\/70{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/70{border-color:color-mix(in oklab,hsl(var(--border)) 70%,transparent)}}.border-border\/80{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,hsl(var(--border)) 80%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/25{border-color:#00b7d740}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/25{border-color:color-mix(in oklab,var(--color-cyan-500) 25%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-500\/10{border-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/10{border-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.border-emerald-500\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/15{border-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/25{border-color:#00bb7f40}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/25{border-color:color-mix(in oklab,var(--color-emerald-500) 25%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/40{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.border-fuchsia-500\/25{border-color:#e12afb40}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/25{border-color:color-mix(in oklab,var(--color-fuchsia-500) 25%,transparent)}}.border-fuchsia-500\/30{border-color:#e12afb4d}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/30{border-color:color-mix(in oklab,var(--color-fuchsia-500) 30%,transparent)}}.border-fuchsia-500\/40{border-color:#e12afb66}@supports (color:color-mix(in lab,red,red)){.border-fuchsia-500\/40{border-color:color-mix(in oklab,var(--color-fuchsia-500) 40%,transparent)}}.border-indigo-500\/25{border-color:#625fff40}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/25{border-color:color-mix(in oklab,var(--color-indigo-500) 25%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-indigo-500\/40{border-color:#625fff66}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/40{border-color:color-mix(in oklab,var(--color-indigo-500) 40%,transparent)}}.border-lime-500\/25{border-color:#80cd0040}@supports (color:color-mix(in lab,red,red)){.border-lime-500\/25{border-color:color-mix(in oklab,var(--color-lime-500) 25%,transparent)}}.border-neutral-700{border-color:var(--color-neutral-700)}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-pink-500\/25{border-color:#f6339a40}@supports (color:color-mix(in lab,red,red)){.border-pink-500\/25{border-color:color-mix(in oklab,var(--color-pink-500) 25%,transparent)}}.border-primary,.border-primary\/20{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/20{border-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.border-primary\/25{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/25{border-color:color-mix(in oklab,hsl(var(--primary)) 25%,transparent)}}.border-primary\/30{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/30{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.border-primary\/40{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/40{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.border-primary\/45{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.border-primary\/50{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.border-primary\/60{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-primary\/60{border-color:color-mix(in oklab,hsl(var(--primary)) 60%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500) 25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\/40{border-color:color-mix(in oklab,var(--color-red-500) 40%,transparent)}}.border-red-500\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\/50{border-color:color-mix(in oklab,var(--color-red-500) 50%,transparent)}}.border-red-500\/60{border-color:#fb2c3699}@supports (color:color-mix(in lab,red,red)){.border-red-500\/60{border-color:color-mix(in oklab,var(--color-red-500) 60%,transparent)}}.border-sky-500\/25{border-color:#00a5ef40}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/25{border-color:color-mix(in oklab,var(--color-sky-500) 25%,transparent)}}.border-sky-500\/40{border-color:#00a5ef66}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/40{border-color:color-mix(in oklab,var(--color-sky-500) 40%,transparent)}}.border-slate-500\/25{border-color:#62748e40}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/25{border-color:color-mix(in oklab,var(--color-slate-500) 25%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-teal-500\/25{border-color:#00baa740}@supports (color:color-mix(in lab,red,red)){.border-teal-500\/25{border-color:color-mix(in oklab,var(--color-teal-500) 25%,transparent)}}.border-transparent{border-color:#0000}.border-violet-500\/15{border-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/15{border-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.border-violet-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-violet-500\/25{border-color:#8d54ff40}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/25{border-color:color-mix(in oklab,var(--color-violet-500) 25%,transparent)}}.border-violet-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-violet-500\/40{border-color:#8d54ff66}@supports (color:color-mix(in lab,red,red)){.border-violet-500\/40{border-color:color-mix(in oklab,var(--color-violet-500) 40%,transparent)}}.border-t-emerald-500\/70{border-top-color:#00bb7fb3}@supports (color:color-mix(in lab,red,red)){.border-t-emerald-500\/70{border-top-color:color-mix(in oklab,var(--color-emerald-500) 70%,transparent)}}.border-t-primary\/70{border-top-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.border-t-primary\/70{border-top-color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.border-t-violet-500\/70{border-top-color:#8d54ffb3}@supports (color:color-mix(in lab,red,red)){.border-t-violet-500\/70{border-top-color:color-mix(in oklab,var(--color-violet-500) 70%,transparent)}}.border-l-amber-500\/80{border-left-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.border-l-amber-500\/80{border-left-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.border-l-cyan-500\/80{border-left-color:#00b7d7cc}@supports (color:color-mix(in lab,red,red)){.border-l-cyan-500\/80{border-left-color:color-mix(in oklab,var(--color-cyan-500) 80%,transparent)}}.border-l-indigo-500\/80{border-left-color:#625fffcc}@supports (color:color-mix(in lab,red,red)){.border-l-indigo-500\/80{border-left-color:color-mix(in oklab,var(--color-indigo-500) 80%,transparent)}}.border-l-muted{border-left-color:hsl(var(--muted))}.border-l-violet-500\/80{border-left-color:#8d54ffcc}@supports (color:color-mix(in lab,red,red)){.border-l-violet-500\/80{border-left-color:color-mix(in oklab,var(--color-violet-500) 80%,transparent)}}.bg-\[\#030712\]{background-color:#030712}.bg-\[hsl\(224\,30\%\,6\%\)\]{background-color:#0b0d14}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500) 5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/15{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-500\/80{background-color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/80{background-color:color-mix(in oklab,var(--color-amber-500) 80%,transparent)}}.bg-amber-500\/\[0\.06\]{background-color:#f99c000f}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/\[0\.06\]{background-color:color-mix(in oklab,var(--color-amber-500) 6%,transparent)}}.bg-background\/10{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/10{background-color:color-mix(in oklab,hsl(var(--background)) 10%,transparent)}}.bg-background\/15{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/15{background-color:color-mix(in oklab,hsl(var(--background)) 15%,transparent)}}.bg-background\/20{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/20{background-color:color-mix(in oklab,hsl(var(--background)) 20%,transparent)}}.bg-background\/25{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/25{background-color:color-mix(in oklab,hsl(var(--background)) 25%,transparent)}}.bg-background\/30{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/30{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.bg-background\/35{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/35{background-color:color-mix(in oklab,hsl(var(--background)) 35%,transparent)}}.bg-background\/40{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/40{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.bg-background\/50{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,hsl(var(--background)) 50%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.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-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-border{background-color:hsl(var(--border))}.bg-card,.bg-card\/10{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/10{background-color:color-mix(in oklab,hsl(var(--card)) 10%,transparent)}}.bg-card\/20{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,hsl(var(--card)) 20%,transparent)}}.bg-card\/30{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,hsl(var(--card)) 30%,transparent)}}.bg-card\/40{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/40{background-color:color-mix(in oklab,hsl(var(--card)) 40%,transparent)}}.bg-card\/45{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/45{background-color:color-mix(in oklab,hsl(var(--card)) 45%,transparent)}}.bg-card\/50{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/50{background-color:color-mix(in oklab,hsl(var(--card)) 50%,transparent)}}.bg-card\/60{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/60{background-color:color-mix(in oklab,hsl(var(--card)) 60%,transparent)}}.bg-card\/70{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/70{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.bg-card\/85{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.bg-card\/85{background-color:color-mix(in oklab,hsl(var(--card)) 85%,transparent)}}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/15{background-color:#00b7d726}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/15{background-color:color-mix(in oklab,var(--color-cyan-500) 15%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-500\/80{background-color:#00bb7fcc}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/80{background-color:color-mix(in oklab,var(--color-emerald-500) 80%,transparent)}}.bg-fuchsia-500{background-color:var(--color-fuchsia-500)}.bg-fuchsia-500\/10{background-color:#e12afb1a}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-500\/10{background-color:color-mix(in oklab,var(--color-fuchsia-500) 10%,transparent)}}.bg-fuchsia-500\/15{background-color:#e12afb26}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-500\/15{background-color:color-mix(in oklab,var(--color-fuchsia-500) 15%,transparent)}}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-500\/15{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/15{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.bg-lime-500{background-color:var(--color-lime-500)}.bg-lime-500\/15{background-color:#80cd0026}@supports (color:color-mix(in lab,red,red)){.bg-lime-500\/15{background-color:color-mix(in oklab,var(--color-lime-500) 15%,transparent)}}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground\/30{background-color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/30{background-color:color-mix(in oklab,hsl(var(--muted-foreground)) 30%,transparent)}}.bg-muted-foreground\/40{background-color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/40{background-color:color-mix(in oklab,hsl(var(--muted-foreground)) 40%,transparent)}}.bg-muted-foreground\/45{background-color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/45{background-color:color-mix(in oklab,hsl(var(--muted-foreground)) 45%,transparent)}}.bg-muted\/10{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,hsl(var(--muted)) 10%,transparent)}}.bg-muted\/20{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,hsl(var(--muted)) 20%,transparent)}}.bg-muted\/25{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/25{background-color:color-mix(in oklab,hsl(var(--muted)) 25%,transparent)}}.bg-muted\/40{background-color:hsl(var(--muted))}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,hsl(var(--muted)) 40%,transparent)}}.bg-neutral-800{background-color:var(--color-neutral-800)}.bg-neutral-950{background-color:var(--color-neutral-950)}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-pink-500{background-color:var(--color-pink-500)}.bg-pink-500\/15{background-color:#f6339a26}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/15{background-color:color-mix(in oklab,var(--color-pink-500) 15%,transparent)}}.bg-popover,.bg-popover\/95{background-color:hsl(var(--popover))}@supports (color:color-mix(in lab,red,red)){.bg-popover\/95{background-color:color-mix(in oklab,hsl(var(--popover)) 95%,transparent)}}.bg-primary,.bg-primary\/5{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/5{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.bg-primary\/10{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.bg-primary\/15{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/15{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.bg-primary\/\[0\.06\]{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.bg-primary\/\[0\.06\]{background-color:color-mix(in oklab,hsl(var(--primary)) 6%,transparent)}}.bg-purple-500\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/15{background-color:color-mix(in oklab,var(--color-purple-500) 15%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500) 80%,transparent)}}.bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/15{background-color:color-mix(in oklab,var(--color-rose-500) 15%,transparent)}}.bg-sky-500\/10{background-color:#00a5ef1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-sky-500) 10%,transparent)}}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-teal-500{background-color:var(--color-teal-500)}.bg-teal-500\/10{background-color:#00baa71a}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/10{background-color:color-mix(in oklab,var(--color-teal-500) 10%,transparent)}}.bg-teal-500\/15{background-color:#00baa726}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/15{background-color:color-mix(in oklab,var(--color-teal-500) 15%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\/5{background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/5{background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-500\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/15{background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.bg-violet-500\/\[0\.04\]{background-color:#8d54ff0a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/\[0\.04\]{background-color:color-mix(in oklab,var(--color-violet-500) 4%,transparent)}}.bg-violet-500\/\[0\.05\]{background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/\[0\.05\]{background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-foreground{--tw-gradient-from:hsl(var(--foreground));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/15{--tw-gradient-from:#00baa726}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/15{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 15%, transparent)}}.from-teal-500\/15{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500\/20{--tw-gradient-from:#00baa733}@supports (color:color-mix(in lab,red,red)){.from-teal-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-teal-500) 20%, transparent)}}.from-teal-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-foreground{--tw-gradient-via:hsl(var(--foreground));--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/10{--tw-gradient-via:#625fff1a}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 10%, transparent)}}.via-indigo-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-500\/15{--tw-gradient-via:#625fff26}@supports (color:color-mix(in lab,red,red)){.via-indigo-500\/15{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.via-indigo-500\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-primary{--tw-gradient-to:hsl(var(--primary));--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/15{--tw-gradient-to:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/15{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 15%, transparent)}}.to-purple-500\/15{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500\/20{--tw-gradient-to:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/20{--tw-gradient-to:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.to-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-sky-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.fill-primary\/20{fill:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.fill-primary\/20{fill:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.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-8{padding:calc(var(--spacing) * 8)}.p-12{padding:calc(var(--spacing) * 12)}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.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)}.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-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\[12vh\]{padding-top:12vh}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}.font-space{font-family:Space Grotesk,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.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-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.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-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.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-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-300{color:var(--color-amber-300)}.text-amber-300\/70{color:#ffd236b3}@supports (color:color-mix(in lab,red,red)){.text-amber-300\/70{color:color-mix(in oklab,var(--color-amber-300) 70%,transparent)}}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/80{color:color-mix(in oklab,var(--color-amber-400) 80%,transparent)}}.text-amber-400\/90{color:#fcbb00e6}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/90{color:color-mix(in oklab,var(--color-amber-400) 90%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-cyan-200\/90{color:#a2f4fde6}@supports (color:color-mix(in lab,red,red)){.text-cyan-200\/90{color:color-mix(in oklab,var(--color-cyan-200) 90%,transparent)}}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-300\/80{color:#53eafdcc}@supports (color:color-mix(in lab,red,red)){.text-cyan-300\/80{color:color-mix(in oklab,var(--color-cyan-300) 80%,transparent)}}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-300\/80{color:#5ee9b5cc}@supports (color:color-mix(in lab,red,red)){.text-emerald-300\/80{color:color-mix(in oklab,var(--color-emerald-300) 80%,transparent)}}.text-emerald-300\/90{color:#5ee9b5e6}@supports (color:color-mix(in lab,red,red)){.text-emerald-300\/90{color:color-mix(in oklab,var(--color-emerald-300) 90%,transparent)}}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-400\/90{color:#00d294e6}@supports (color:color-mix(in lab,red,red)){.text-emerald-400\/90{color:color-mix(in oklab,var(--color-emerald-400) 90%,transparent)}}.text-foreground,.text-foreground\/70{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/70{color:color-mix(in oklab,hsl(var(--foreground)) 70%,transparent)}}.text-foreground\/80{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,hsl(var(--foreground)) 80%,transparent)}}.text-foreground\/85{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/85{color:color-mix(in oklab,hsl(var(--foreground)) 85%,transparent)}}.text-foreground\/90{color:hsl(var(--foreground))}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,hsl(var(--foreground)) 90%,transparent)}}.text-fuchsia-300{color:var(--color-fuchsia-300)}.text-fuchsia-400{color:var(--color-fuchsia-400)}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-400{color:var(--color-indigo-400)}.text-lime-400{color:var(--color-lime-400)}.text-muted-foreground,.text-muted-foreground\/40{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/40{color:color-mix(in oklab,hsl(var(--muted-foreground)) 40%,transparent)}}.text-muted-foreground\/50{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/50{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.text-muted-foreground\/55{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/55{color:color-mix(in oklab,hsl(var(--muted-foreground)) 55%,transparent)}}.text-muted-foreground\/60{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,hsl(var(--muted-foreground)) 60%,transparent)}}.text-muted-foreground\/70{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,hsl(var(--muted-foreground)) 70%,transparent)}}.text-muted-foreground\/75{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/75{color:color-mix(in oklab,hsl(var(--muted-foreground)) 75%,transparent)}}.text-muted-foreground\/80{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,hsl(var(--muted-foreground)) 80%,transparent)}}.text-neutral-200{color:var(--color-neutral-200)}.text-neutral-400{color:var(--color-neutral-400)}.text-orange-300{color:var(--color-orange-300)}.text-pink-400{color:var(--color-pink-400)}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/70{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/70{color:color-mix(in oklab,hsl(var(--primary)) 70%,transparent)}}.text-primary\/80{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.text-primary\/80{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-red-200{color:var(--color-red-200)}.text-red-300{color:var(--color-red-300)}.text-red-300\/90{color:#ffa3a3e6}@supports (color:color-mix(in lab,red,red)){.text-red-300\/90{color:color-mix(in oklab,var(--color-red-300) 90%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-400\/80{color:#ff6568cc}@supports (color:color-mix(in lab,red,red)){.text-red-400\/80{color:color-mix(in oklab,var(--color-red-400) 80%,transparent)}}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-sky-300{color:var(--color-sky-300)}.text-sky-300\/90{color:#77d4ffe6}@supports (color:color-mix(in lab,red,red)){.text-sky-300\/90{color:color-mix(in oklab,var(--color-sky-300) 90%,transparent)}}.text-sky-400{color:var(--color-sky-400)}.text-slate-300{color:var(--color-slate-300)}.text-teal-300{color:var(--color-teal-300)}.text-teal-400{color:var(--color-teal-400)}.text-transparent{color:#0000}.text-violet-200\/90{color:#ddd6ffe6}@supports (color:color-mix(in lab,red,red)){.text-violet-200\/90{color:color-mix(in oklab,var(--color-violet-200) 90%,transparent)}}.text-violet-300{color:var(--color-violet-300)}.text-violet-300\/80{color:#c4b4ffcc}@supports (color:color-mix(in lab,red,red)){.text-violet-300\/80{color:color-mix(in oklab,var(--color-violet-300) 80%,transparent)}}.text-violet-400{color:var(--color-violet-400)}.text-violet-400\/70{color:#a685ffb3}@supports (color:color-mix(in lab,red,red)){.text-violet-400\/70{color:color-mix(in oklab,var(--color-violet-400) 70%,transparent)}}.text-white{color:var(--color-white)}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.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,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.decoration-primary\/40{-webkit-text-decoration-color:hsl(var(--primary));text-decoration-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.decoration-primary\/40{-webkit-text-decoration-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent);text-decoration-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.\[color-scheme\:dark\]{color-scheme:dark}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-35{opacity:.35}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-85{opacity:.85}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--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-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(16\,185\,129\,0\.4\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#10b98166);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(239\,68\,68\,0\.4\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#ef444466);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(245\,158\,11\,0\.4\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 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)}.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-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)}.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-2{--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)}.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)}.shadow-amber-500\/10{--tw-shadow-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/5{--tw-shadow-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.shadow-black\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/15{--tw-shadow-color:#00000026}@supports (color:color-mix(in lab,red,red)){.shadow-black\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/25{--tw-shadow-color:#00000040}@supports (color:color-mix(in lab,red,red)){.shadow-black\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 25%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-emerald-500) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/5{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/5{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 5%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/10{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-primary\/20{--tw-shadow-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.shadow-primary\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, hsl(var(--primary)) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-500\/10{--tw-shadow-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-500) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-background\/60{--tw-ring-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.ring-background\/60{--tw-ring-color:color-mix(in oklab, hsl(var(--background)) 60%, transparent)}}.ring-black\/40{--tw-ring-color:#0006}@supports (color:color-mix(in lab,red,red)){.ring-black\/40{--tw-ring-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.ring-white\/70{--tw-ring-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.ring-white\/70{--tw-ring-color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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,)}.blur-\[130px\]{--tw-blur:blur(130px);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,)}.blur-\[140px\]{--tw-blur:blur(140px);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,)}.blur-\[160px\]{--tw-blur:blur(160px);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,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);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,)}.grayscale{--tw-grayscale:grayscale(100%);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,)}.invert{--tw-invert:invert(100%);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,)}.sepia{--tw-sepia:sepia(100%);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,)!important}.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,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.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\!{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!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.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-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))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:text-foreground:is(:where(.group):hover *){color:hsl(var(--foreground))}.group-hover\:text-primary:is(:where(.group):hover *){color:hsl(var(--primary))}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder,.placeholder\:text-muted-foreground\/50::placeholder{color:hsl(var(--muted-foreground))}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted-foreground\/50::placeholder{color:color-mix(in oklab,hsl(var(--muted-foreground)) 50%,transparent)}}.first\:mt-0:first-child{margin-top:0}.first\:rounded-l-sm:first-child{border-top-left-radius:calc(var(--radius) - 4px);border-bottom-left-radius:calc(var(--radius) - 4px)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media(hover:hover){.hover\:border-amber-500\/50:hover{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.hover\:border-amber-500\/50:hover{border-color:color-mix(in oklab,var(--color-amber-500) 50%,transparent)}}.hover\:border-border:hover,.hover\:border-border\/60:hover{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.hover\:border-border\/60:hover{border-color:color-mix(in oklab,hsl(var(--border)) 60%,transparent)}}.hover\:border-emerald-500\/40:hover{border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.hover\:border-emerald-500\/40:hover{border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 30%,transparent)}}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/40:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 40%,transparent)}}.hover\:border-primary\/45:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/45:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 45%,transparent)}}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:border-primary\/50:hover{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.hover\:border-red-500\/50:hover{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.hover\:border-red-500\/50:hover{border-color:color-mix(in oklab,var(--color-red-500) 50%,transparent)}}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.hover\:bg-amber-500\/15:hover{background-color:#f99c0026}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/15:hover{background-color:color-mix(in oklab,var(--color-amber-500) 15%,transparent)}}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.hover\:bg-background\/30:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/30:hover{background-color:color-mix(in oklab,hsl(var(--background)) 30%,transparent)}}.hover\:bg-background\/40:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/40:hover{background-color:color-mix(in oklab,hsl(var(--background)) 40%,transparent)}}.hover\:bg-background\/60:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,hsl(var(--background)) 60%,transparent)}}.hover\:bg-background\/80:hover{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-background\/80:hover{background-color:color-mix(in oklab,hsl(var(--background)) 80%,transparent)}}.hover\:bg-card\/45:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/45:hover{background-color:color-mix(in oklab,hsl(var(--card)) 45%,transparent)}}.hover\:bg-card\/70:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/70:hover{background-color:color-mix(in oklab,hsl(var(--card)) 70%,transparent)}}.hover\:bg-card\/75:hover{background-color:hsl(var(--card))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card\/75:hover{background-color:color-mix(in oklab,hsl(var(--card)) 75%,transparent)}}.hover\:bg-emerald-500\/10:hover{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/10:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.hover\:bg-emerald-500\/15:hover{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/15:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.hover\:bg-emerald-500\/20:hover{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-500\/20:hover{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.hover\:bg-fuchsia-500\/20:hover{background-color:#e12afb33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-fuchsia-500\/20:hover{background-color:color-mix(in oklab,var(--color-fuchsia-500) 20%,transparent)}}.hover\:bg-indigo-500\/15:hover{background-color:#625fff26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-indigo-500\/15:hover{background-color:color-mix(in oklab,var(--color-indigo-500) 15%,transparent)}}.hover\:bg-neutral-700:hover{background-color:var(--color-neutral-700)}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 5%,transparent)}}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 10%,transparent)}}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/15:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 15%,transparent)}}.hover\:bg-primary\/20:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 90%,transparent)}}.hover\:bg-primary\/95:hover{background-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/95:hover{background-color:color-mix(in oklab,hsl(var(--primary)) 95%,transparent)}}.hover\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\:bg-red-500\/5:hover{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/5:hover{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:bg-red-500\/15:hover{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/15:hover{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.hover\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.hover\:bg-violet-500\/20:hover{background-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-violet-500\/20:hover{background-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover,.hover\:text-primary\/80:hover{color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary\/80:hover{color:color-mix(in oklab,hsl(var(--primary)) 80%,transparent)}}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-xl:hover{--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)}}.focus\:border-primary:focus,.focus\:border-primary\/50:focus{border-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:border-primary\/50:focus{border-color:color-mix(in oklab,hsl(var(--primary)) 50%,transparent)}}.focus\:ring-1:focus{--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)}.focus\:ring-primary:focus,.focus\:ring-primary\/50:focus{--tw-ring-color:hsl(var(--primary))}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/50:focus{--tw-ring-color:color-mix(in oklab, hsl(var(--primary)) 50%, transparent)}}.focus\:ring-violet-500\/50:focus{--tw-ring-color:#8d54ff80}@supports (color:color-mix(in lab,red,red)){.focus\:ring-violet-500\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-violet-500) 50%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--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-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:cursor-default:disabled{cursor:default}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-36{width:calc(var(--spacing) * 36)}.sm\:w-\[640px\]{width:640px}.sm\:w-auto{width:auto}.sm\:max-w-\[400px\]{max-width:400px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:self-auto{align-self:auto}.sm\:p-10{padding:calc(var(--spacing) * 10)}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[170px_1fr\]{grid-template-columns:170px 1fr}}@media(min-width:64rem){.lg\:absolute{position:absolute}.lg\:top-4{top:calc(var(--spacing) * 4)}.lg\:top-6{top:calc(var(--spacing) * 6)}.lg\:right-4{right:calc(var(--spacing) * 4)}.lg\:right-6{right:calc(var(--spacing) * 6)}.lg\:bottom-4{bottom:calc(var(--spacing) * 4)}.lg\:bottom-6{bottom:calc(var(--spacing) * 6)}.lg\:left-4{left:calc(var(--spacing) * 4)}.lg\:left-6{left:calc(var(--spacing) * 6)}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-\[calc\(100\%-2rem\)\]{height:calc(100% - 2rem)}.lg\:h-\[calc\(100\%-3rem\)\]{height:calc(100% - 3rem)}.lg\:w-40{width:calc(var(--spacing) * 40)}.lg\:w-72{width:calc(var(--spacing) * 72)}.lg\:w-80{width:calc(var(--spacing) * 80)}.lg\:w-96{width:calc(var(--spacing) * 96)}.lg\:flex-none{flex:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1\.3fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}.lg\:flex-row{flex-direction:row}.lg\:items-stretch{align-items:stretch}.lg\:rounded-xl{border-radius:var(--radius-xl)}.lg\:border{border-style:var(--tw-border-style);border-width:1px}.lg\:border-border\/40{border-color:hsl(var(--border))}@supports (color:color-mix(in lab,red,red)){.lg\:border-border\/40{border-color:color-mix(in oklab,hsl(var(--border)) 40%,transparent)}}.lg\:bg-background\/65{background-color:hsl(var(--background))}@supports (color:color-mix(in lab,red,red)){.lg\:bg-background\/65{background-color:color-mix(in oklab,hsl(var(--background)) 65%,transparent)}}.lg\:p-4{padding:calc(var(--spacing) * 4)}.lg\:shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.lg\:shadow-black\/50{--tw-shadow-color:#00000080}@supports (color:color-mix(in lab,red,red)){.lg\:shadow-black\/50{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 50%, transparent) var(--tw-shadow-alpha), transparent)}}.lg\:backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}}}:root{--background:224 30% 6%;--foreground:210 20% 92%;--card:224 25% 10%;--card-foreground:210 20% 94%;--popover:224 28% 9%;--popover-foreground:210 20% 94%;--primary:172 72% 50%;--primary-foreground:224 47% 8%;--muted:220 16% 14%;--muted-foreground:215 14% 64%;--accent:220 16% 16%;--accent-foreground:210 20% 94%;--border:222 18% 23%;--input:222 18% 23%;--ring:172 72% 50%;--radius:.75rem;color-scheme:dark}.light{--background:0 0% 100%;--foreground:222 22% 12%;--card:0 0% 100%;--card-foreground:222 22% 12%;--popover:0 0% 100%;--popover-foreground:222 22% 12%;--primary:172 70% 38%;--primary-foreground:0 0% 100%;--muted:220 14% 95%;--muted-foreground:220 9% 42%;--accent:220 14% 94%;--accent-foreground:222 22% 12%;--border:220 13% 88%;--input:220 13% 88%;--ring:172 66% 50%;color-scheme:light}@keyframes aurora{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.animate-aurora{background-size:200% 200%;animation:25s infinite aurora}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:9999px}*{border-color:hsl(var(--border) / .85);outline-color:hsl(var(--primary) / .5)}:focus-visible{outline:2px solid hsl(var(--primary) / .7);outline-offset:2px}@media(prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}@keyframes flow-cyan{0%{stroke-dasharray:6 3;stroke-dashoffset:18px}to{stroke-dasharray:6 3;stroke-dashoffset:0}}.animate-flow-cyan{animation:1.2s linear infinite flow-cyan}.rounded-2xl.border.bg-card\/45{position:relative;overflow:hidden;background-color:hsl(var(--card) / .85)!important;border-color:hsl(var(--border) / .95)!important;transition:transform .3s cubic-bezier(.4,0,.2,1),background-color .3s cubic-bezier(.4,0,.2,1),border-color .3s cubic-bezier(.4,0,.2,1),box-shadow .3s cubic-bezier(.4,0,.2,1)!important;box-shadow:0 10px 30px -15px #00000073,inset 0 1px #ffffff0d!important}.rounded-2xl.border.bg-card\/45:before{content:"";background:linear-gradient(90deg,hsl(var(--primary)),#6366f1,#a855f7);opacity:.75;height:3.5px;position:absolute;top:0;left:0;right:0;transition:opacity .3s!important}.rounded-2xl.border.bg-card\/45:hover{transform:translateY(-3px);background-color:hsl(var(--card) / .92)!important;border-color:hsl(var(--primary) / .35)!important;box-shadow:0 20px 40px -20px #000000a6,0 0 18px 2px hsl(var(--primary) / .05)!important}.rounded-2xl.border.bg-card\/45:hover:before{opacity:1}.rounded-xl.border.bg-card\/45{background-color:hsl(var(--card) / .88)!important;border-color:hsl(var(--border) / .9)!important;transition:background-color .2s,border-color .2s!important}.rounded-xl.border.bg-card\/45:hover{background-color:hsl(var(--card) / .95)!important;border-color:hsl(var(--primary) / .3)!important}aside nav a[class*="bg-primary/15"]:not([class*=justify-center]){background:linear-gradient(90deg,hsl(var(--primary) / .18),#6366f11f)!important;color:hsl(var(--primary))!important;border-left:3.5px solid hsl(var(--primary))!important;border-radius:0 var(--radius) var(--radius) 0!important;padding-left:calc(.75rem - 3.5px)!important;box-shadow:inset 0 1px #ffffff05!important}aside nav a[class*="bg-primary/15"][class*=justify-center]{background:hsl(var(--primary) / .18)!important;color:hsl(var(--primary))!important;box-shadow:0 0 12px 1px hsl(var(--primary) / .1)!important;border:1px solid hsl(var(--primary) / .3)!important}::-webkit-scrollbar-thumb{border-radius:9999px;background:hsl(var(--primary) / .25)!important}::-webkit-scrollbar-thumb:hover{background:hsl(var(--primary) / .5)!important}input:focus,textarea:focus,select:focus{outline:none;border-color:hsl(var(--primary))!important;box-shadow:0 0 0 2px hsl(var(--primary) / .15)!important}@media(min-width:1440px){html{font-size:16.5px}}@media(min-width:1920px){html{font-size:17.5px}}@media(min-width:2560px){html{font-size:19px}}@media(min-width:3440px){html{font-size:20px}}@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-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@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:"";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:"";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:"";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:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}} diff --git a/frontend/dist/assets/index-P6XXlxiQ.js b/frontend/dist/assets/index-P6XXlxiQ.js deleted file mode 100644 index 8e3dad0..0000000 --- a/frontend/dist/assets/index-P6XXlxiQ.js +++ /dev/null @@ -1,765 +0,0 @@ -var I4=Object.defineProperty;var mw=e=>{throw TypeError(e)};var T4=(e,t,r)=>t in e?I4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ns=(e,t,r)=>T4(e,typeof t!="symbol"?t+"":t,r),Jp=(e,t,r)=>t.has(e)||mw("Cannot "+r);var L=(e,t,r)=>(Jp(e,t,"read from private field"),r?r.call(e):t.get(e)),De=(e,t,r)=>t.has(e)?mw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ke=(e,t,r,n)=>(Jp(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),We=(e,t,r)=>(Jp(e,t,"access private method"),r);var Ed=(e,t,r,n)=>({set _(i){ke(e,t,i,r)},get _(){return L(e,t,n)}});function D4(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Px(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eg={exports:{}},rc={},tg={exports:{}},Ue={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var pw;function R4(){if(pw)return Ue;pw=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=p&&D[p]||D["@@iterator"],typeof D=="function"?D:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function k(D,M,q){this.props=D,this.context=M,this.refs=w,this.updater=q||b}k.prototype.isReactComponent={},k.prototype.setState=function(D,M){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,M,"setState")},k.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=k.prototype;function E(D,M,q){this.props=D,this.context=M,this.refs=w,this.updater=q||b}var C=E.prototype=new N;C.constructor=E,S(C,k.prototype),C.isPureReactComponent=!0;var A=Array.isArray,_=Object.prototype.hasOwnProperty,O={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function B(D,M,q){var le,oe={},te=null,W=null;if(M!=null)for(le in M.ref!==void 0&&(W=M.ref),M.key!==void 0&&(te=""+M.key),M)_.call(M,le)&&!I.hasOwnProperty(le)&&(oe[le]=M[le]);var ne=arguments.length-2;if(ne===1)oe.children=q;else if(1>>1,M=Z[D];if(0>>1;Di(oe,ie))tei(W,oe)?(Z[D]=W,Z[te]=ie,D=te):(Z[D]=oe,Z[le]=ie,D=le);else if(tei(W,ie))Z[D]=W,Z[te]=ie,D=te;else break e}}return re}function i(Z,re){var ie=Z.sortIndex-re.sortIndex;return ie!==0?ie:Z.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var f=[],h=[],m=1,p=null,v=3,b=!1,S=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Z){for(var re=r(h);re!==null;){if(re.callback===null)n(h);else if(re.startTime<=Z)n(h),re.sortIndex=re.expirationTime,t(f,re);else break;re=r(h)}}function A(Z){if(w=!1,C(Z),!S)if(r(f)!==null)S=!0,se(_);else{var re=r(h);re!==null&&ae(A,re.startTime-Z)}}function _(Z,re){S=!1,w&&(w=!1,N(B),B=-1),b=!0;var ie=v;try{for(C(re),p=r(f);p!==null&&(!(p.expirationTime>re)||Z&&!Q());){var D=p.callback;if(typeof D=="function"){p.callback=null,v=p.priorityLevel;var M=D(p.expirationTime<=re);re=e.unstable_now(),typeof M=="function"?p.callback=M:p===r(f)&&n(f),C(re)}else n(f);p=r(f)}if(p!==null)var q=!0;else{var le=r(h);le!==null&&ae(A,le.startTime-re),q=!1}return q}finally{p=null,v=ie,b=!1}}var O=!1,I=null,B=-1,F=5,$=-1;function Q(){return!(e.unstable_now()-$Z||125D?(Z.sortIndex=ie,t(h,Z),r(f)===null&&Z===r(h)&&(w?(N(B),B=-1):w=!0,ae(A,ie-D))):(Z.sortIndex=M,t(f,Z),S||b||(S=!0,se(_))),Z},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(Z){var re=v;return function(){var ie=v;v=re;try{return Z.apply(this,arguments)}finally{v=ie}}}})(ig)),ig}var bw;function F4(){return bw||(bw=1,ng.exports=z4()),ng.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var ww;function B4(){if(ww)return Nr;ww=1;var e=el(),t=F4();function r(a){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},p={};function v(a){return f.call(p,a)?!0:f.call(m,a)?!1:h.test(a)?p[a]=!0:(m[a]=!0,!1)}function b(a,l,d,g){if(d!==null&&d.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return g?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function S(a,l,d,g){if(l===null||typeof l>"u"||b(a,l,d,g))return!0;if(g)return!1;if(d!==null)switch(d.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function w(a,l,d,g,y,j,P){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=g,this.attributeNamespace=y,this.mustUseProperty=d,this.propertyName=a,this.type=l,this.sanitizeURL=j,this.removeEmptyString=P}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){k[a]=new w(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var l=a[0];k[l]=new w(l,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){k[a]=new w(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){k[a]=new w(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){k[a]=new w(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){k[a]=new w(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){k[a]=new w(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){k[a]=new w(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){k[a]=new w(a,5,!1,a.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function E(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var l=a.replace(N,E);k[l]=new w(l,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var l=a.replace(N,E);k[l]=new w(l,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var l=a.replace(N,E);k[l]=new w(l,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){k[a]=new w(a,1,!1,a.toLowerCase(),null,!1,!1)}),k.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){k[a]=new w(a,1,!1,a.toLowerCase(),null,!0,!0)});function C(a,l,d,g){var y=k.hasOwnProperty(l)?k[l]:null;(y!==null?y.type!==0:g||!(2T||y[P]!==j[T]){var R=` -`+y[P].replace(" at new "," at ");return a.displayName&&R.includes("")&&(R=R.replace("",a.displayName)),R}while(1<=P&&0<=T);break}}}finally{q=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?M(a):""}function oe(a){switch(a.tag){case 5:return M(a.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return a=le(a.type,!1),a;case 11:return a=le(a.type.render,!1),a;case 1:return a=le(a.type,!0),a;default:return""}}function te(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case I:return"Fragment";case O:return"Portal";case F:return"Profiler";case B:return"StrictMode";case ge:return"Suspense";case ue:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case Q:return(a.displayName||"Context")+".Consumer";case $:return(a._context.displayName||"Context")+".Provider";case U:var l=a.render;return a=a.displayName,a||(a=l.displayName||l.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case pe:return l=a.displayName||null,l!==null?l:te(a.type)||"Memo";case se:l=a._payload,a=a._init;try{return te(a(l))}catch{}}return null}function W(a){var l=a.type;switch(a.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=l.render,a=a.displayName||a.name||"",l.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return te(l);case 8:return l===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function ne(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function J(a){var l=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function xe(a){var l=J(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,l),g=""+a[l];if(!a.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,j=d.set;return Object.defineProperty(a,l,{configurable:!0,get:function(){return y.call(this)},set:function(P){g=""+P,j.call(this,P)}}),Object.defineProperty(a,l,{enumerable:d.enumerable}),{getValue:function(){return g},setValue:function(P){g=""+P},stopTracking:function(){a._valueTracker=null,delete a[l]}}}}function be(a){a._valueTracker||(a._valueTracker=xe(a))}function fe(a){if(!a)return!1;var l=a._valueTracker;if(!l)return!0;var d=l.getValue(),g="";return a&&(g=J(a)?a.checked?"true":"false":a.value),a=g,a!==d?(l.setValue(a),!0):!1}function qe(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function Be(a,l){var d=l.checked;return ie({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function _e(a,l){var d=l.defaultValue==null?"":l.defaultValue,g=l.checked!=null?l.checked:l.defaultChecked;d=ne(l.value!=null?l.value:d),a._wrapperState={initialChecked:g,initialValue:d,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function wt(a,l){l=l.checked,l!=null&&C(a,"checked",l,!1)}function tr(a,l){wt(a,l);var d=ne(l.value),g=l.type;if(d!=null)g==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(g==="submit"||g==="reset"){a.removeAttribute("value");return}l.hasOwnProperty("value")?Ce(a,l.type,d):l.hasOwnProperty("defaultValue")&&Ce(a,l.type,ne(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(a.defaultChecked=!!l.defaultChecked)}function K(a,l,d){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var g=l.type;if(!(g!=="submit"&&g!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+a._wrapperState.initialValue,d||l===a.value||(a.value=l),a.defaultValue=l}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function Ce(a,l,d){(l!=="number"||qe(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var Pe=Array.isArray;function Ze(a,l,d,g){if(a=a.options,l){l={};for(var y=0;y"+l.valueOf().toString()+"",l=it.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}});function xl(a,l){if(l){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=l;return}}a.textContent=l}var yl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},LO=["Webkit","ms","Moz","O"];Object.keys(yl).forEach(function(a){LO.forEach(function(l){l=l+a.charAt(0).toUpperCase()+a.substring(1),yl[l]=yl[a]})});function Py(a,l,d){return l==null||typeof l=="boolean"||l===""?"":d||typeof l!="number"||l===0||yl.hasOwnProperty(a)&&yl[a]?(""+l).trim():l+"px"}function Oy(a,l){a=a.style;for(var d in l)if(l.hasOwnProperty(d)){var g=d.indexOf("--")===0,y=Py(d,l[d],g);d==="float"&&(d="cssFloat"),g?a.setProperty(d,y):a[d]=y}}var $O=ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function dm(a,l){if(l){if($O[a]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,a));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function fm(a,l){if(a.indexOf("-")===-1)return typeof l.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hm=null;function mm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var pm=null,Io=null,To=null;function _y(a){if(a=Bl(a)){if(typeof pm!="function")throw Error(r(280));var l=a.stateNode;l&&(l=Bu(l),pm(a.stateNode,a.type,l))}}function My(a){Io?To?To.push(a):To=[a]:Io=a}function Iy(){if(Io){var a=Io,l=To;if(To=Io=null,_y(a),l)for(a=0;a>>=0,a===0?32:31-(QO(a)/YO|0)|0}var ju=64,Su=4194304;function jl(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Nu(a,l){var d=a.pendingLanes;if(d===0)return 0;var g=0,y=a.suspendedLanes,j=a.pingedLanes,P=d&268435455;if(P!==0){var T=P&~y;T!==0?g=jl(T):(j&=P,j!==0&&(g=jl(j)))}else P=d&~y,P!==0?g=jl(P):j!==0&&(g=jl(j));if(g===0)return 0;if(l!==0&&l!==g&&(l&y)===0&&(y=g&-g,j=l&-l,y>=j||y===16&&(j&4194240)!==0))return l;if((g&4)!==0&&(g|=d&16),l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=g;0d;d++)l.push(a);return l}function Sl(a,l,d){a.pendingLanes|=l,l!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,l=31-un(l),a[l]=d}function e_(a,l){var d=a.pendingLanes&~l;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=l,a.mutableReadLanes&=l,a.entangledLanes&=l,l=a.entanglements;var g=a.eventTimes;for(a=a.expirationTimes;0=Ml),sb=" ",lb=!1;function cb(a,l){switch(a){case"keyup":return C_.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ub(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Lo=!1;function O_(a,l){switch(a){case"compositionend":return ub(l);case"keypress":return l.which!==32?null:(lb=!0,sb);case"textInput":return a=l.data,a===sb&&lb?null:a;default:return null}}function __(a,l){if(Lo)return a==="compositionend"||!Im&&cb(a,l)?(a=tb(),Ou=Am=Li=null,Lo=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:d,offset:l-a};a=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=vb(d)}}function yb(a,l){return a&&l?a===l?!0:a&&a.nodeType===3?!1:l&&l.nodeType===3?yb(a,l.parentNode):"contains"in a?a.contains(l):a.compareDocumentPosition?!!(a.compareDocumentPosition(l)&16):!1:!1}function bb(){for(var a=window,l=qe();l instanceof a.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)a=l.contentWindow;else break;l=qe(a.document)}return l}function Rm(a){var l=a&&a.nodeName&&a.nodeName.toLowerCase();return l&&(l==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||l==="textarea"||a.contentEditable==="true")}function F_(a){var l=bb(),d=a.focusedElem,g=a.selectionRange;if(l!==d&&d&&d.ownerDocument&&yb(d.ownerDocument.documentElement,d)){if(g!==null&&Rm(d)){if(l=g.start,a=g.end,a===void 0&&(a=l),"selectionStart"in d)d.selectionStart=l,d.selectionEnd=Math.min(a,d.value.length);else if(a=(l=d.ownerDocument||document)&&l.defaultView||window,a.getSelection){a=a.getSelection();var y=d.textContent.length,j=Math.min(g.start,y);g=g.end===void 0?j:Math.min(g.end,y),!a.extend&&j>g&&(y=g,g=j,j=y),y=xb(d,j);var P=xb(d,g);y&&P&&(a.rangeCount!==1||a.anchorNode!==y.node||a.anchorOffset!==y.offset||a.focusNode!==P.node||a.focusOffset!==P.offset)&&(l=l.createRange(),l.setStart(y.node,y.offset),a.removeAllRanges(),j>g?(a.addRange(l),a.extend(P.node,P.offset)):(l.setEnd(P.node,P.offset),a.addRange(l)))}}for(l=[],a=d;a=a.parentNode;)a.nodeType===1&&l.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d=document.documentMode,$o=null,Lm=null,Rl=null,$m=!1;function wb(a,l,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;$m||$o==null||$o!==qe(g)||(g=$o,"selectionStart"in g&&Rm(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Rl&&Dl(Rl,g)||(Rl=g,g=$u(Lm,"onSelect"),0Wo||(a.current=Ym[Wo],Ym[Wo]=null,Wo--)}function rt(a,l){Wo++,Ym[Wo]=a.current,a.current=l}var Bi={},rr=Fi(Bi),br=Fi(!1),Pa=Bi;function Ho(a,l){var d=a.type.contextTypes;if(!d)return Bi;var g=a.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===l)return g.__reactInternalMemoizedMaskedChildContext;var y={},j;for(j in d)y[j]=l[j];return g&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=y),y}function wr(a){return a=a.childContextTypes,a!=null}function Uu(){ot(br),ot(rr)}function Rb(a,l,d){if(rr.current!==Bi)throw Error(r(168));rt(rr,l),rt(br,d)}function Lb(a,l,d){var g=a.stateNode;if(l=l.childContextTypes,typeof g.getChildContext!="function")return d;g=g.getChildContext();for(var y in g)if(!(y in l))throw Error(r(108,W(a)||"Unknown",y));return ie({},d,g)}function Wu(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Bi,Pa=rr.current,rt(rr,a),rt(br,br.current),!0}function $b(a,l,d){var g=a.stateNode;if(!g)throw Error(r(169));d?(a=Lb(a,l,Pa),g.__reactInternalMemoizedMergedChildContext=a,ot(br),ot(rr),rt(rr,a)):ot(br),rt(br,d)}var ei=null,Hu=!1,Zm=!1;function zb(a){ei===null?ei=[a]:ei.push(a)}function X_(a){Hu=!0,zb(a)}function Ui(){if(!Zm&&ei!==null){Zm=!0;var a=0,l=Je;try{var d=ei;for(Je=1;a>=P,y-=P,ti=1<<32-un(l)+y|d<Le?(Lt=Te,Te=null):Lt=Te.sibling;var Qe=de(H,Te,V[Le],ve);if(Qe===null){Te===null&&(Te=Lt);break}a&&Te&&Qe.alternate===null&&l(H,Te),z=j(Qe,z,Le),Ie===null?Oe=Qe:Ie.sibling=Qe,Ie=Qe,Te=Lt}if(Le===V.length)return d(H,Te),ut&&_a(H,Le),Oe;if(Te===null){for(;LeLe?(Lt=Te,Te=null):Lt=Te.sibling;var Zi=de(H,Te,Qe.value,ve);if(Zi===null){Te===null&&(Te=Lt);break}a&&Te&&Zi.alternate===null&&l(H,Te),z=j(Zi,z,Le),Ie===null?Oe=Zi:Ie.sibling=Zi,Ie=Zi,Te=Lt}if(Qe.done)return d(H,Te),ut&&_a(H,Le),Oe;if(Te===null){for(;!Qe.done;Le++,Qe=V.next())Qe=me(H,Qe.value,ve),Qe!==null&&(z=j(Qe,z,Le),Ie===null?Oe=Qe:Ie.sibling=Qe,Ie=Qe);return ut&&_a(H,Le),Oe}for(Te=g(H,Te);!Qe.done;Le++,Qe=V.next())Qe=we(Te,H,Le,Qe.value,ve),Qe!==null&&(a&&Qe.alternate!==null&&Te.delete(Qe.key===null?Le:Qe.key),z=j(Qe,z,Le),Ie===null?Oe=Qe:Ie.sibling=Qe,Ie=Qe);return a&&Te.forEach(function(M4){return l(H,M4)}),ut&&_a(H,Le),Oe}function jt(H,z,V,ve){if(typeof V=="object"&&V!==null&&V.type===I&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case _:e:{for(var Oe=V.key,Ie=z;Ie!==null;){if(Ie.key===Oe){if(Oe=V.type,Oe===I){if(Ie.tag===7){d(H,Ie.sibling),z=y(Ie,V.props.children),z.return=H,H=z;break e}}else if(Ie.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===se&&Kb(Oe)===Ie.type){d(H,Ie.sibling),z=y(Ie,V.props),z.ref=Ul(H,Ie,V),z.return=H,H=z;break e}d(H,Ie);break}else l(H,Ie);Ie=Ie.sibling}V.type===I?(z=za(V.props.children,H.mode,ve,V.key),z.return=H,H=z):(ve=xd(V.type,V.key,V.props,null,H.mode,ve),ve.ref=Ul(H,z,V),ve.return=H,H=ve)}return P(H);case O:e:{for(Ie=V.key;z!==null;){if(z.key===Ie)if(z.tag===4&&z.stateNode.containerInfo===V.containerInfo&&z.stateNode.implementation===V.implementation){d(H,z.sibling),z=y(z,V.children||[]),z.return=H,H=z;break e}else{d(H,z);break}else l(H,z);z=z.sibling}z=qp(V,H.mode,ve),z.return=H,H=z}return P(H);case se:return Ie=V._init,jt(H,z,Ie(V._payload),ve)}if(Pe(V))return Ne(H,z,V,ve);if(re(V))return Ee(H,z,V,ve);qu(H,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,z!==null&&z.tag===6?(d(H,z.sibling),z=y(z,V),z.return=H,H=z):(d(H,z),z=Vp(V,H.mode,ve),z.return=H,H=z),P(H)):d(H,z)}return jt}var qo=Gb(!0),Vb=Gb(!1),Qu=Fi(null),Yu=null,Qo=null,np=null;function ip(){np=Qo=Yu=null}function ap(a){var l=Qu.current;ot(Qu),a._currentValue=l}function op(a,l,d){for(;a!==null;){var g=a.alternate;if((a.childLanes&l)!==l?(a.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),a===d)break;a=a.return}}function Yo(a,l){Yu=a,np=Qo=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&l)!==0&&(kr=!0),a.firstContext=null)}function Vr(a){var l=a._currentValue;if(np!==a)if(a={context:a,memoizedValue:l,next:null},Qo===null){if(Yu===null)throw Error(r(308));Qo=a,Yu.dependencies={lanes:0,firstContext:a}}else Qo=Qo.next=a;return l}var Ma=null;function sp(a){Ma===null?Ma=[a]:Ma.push(a)}function qb(a,l,d,g){var y=l.interleaved;return y===null?(d.next=d,sp(l)):(d.next=y.next,y.next=d),l.interleaved=d,ni(a,g)}function ni(a,l){a.lanes|=l;var d=a.alternate;for(d!==null&&(d.lanes|=l),d=a,a=a.return;a!==null;)a.childLanes|=l,d=a.alternate,d!==null&&(d.childLanes|=l),d=a,a=a.return;return d.tag===3?d.stateNode:null}var Wi=!1;function lp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qb(a,l){a=a.updateQueue,l.updateQueue===a&&(l.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function ii(a,l){return{eventTime:a,lane:l,tag:0,payload:null,callback:null,next:null}}function Hi(a,l,d){var g=a.updateQueue;if(g===null)return null;if(g=g.shared,(Ve&2)!==0){var y=g.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),g.pending=l,ni(a,d)}return y=g.interleaved,y===null?(l.next=l,sp(g)):(l.next=y.next,y.next=l),g.interleaved=l,ni(a,d)}function Zu(a,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194240)!==0)){var g=l.lanes;g&=a.pendingLanes,d|=g,l.lanes=d,km(a,d)}}function Yb(a,l){var d=a.updateQueue,g=a.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var y=null,j=null;if(d=d.firstBaseUpdate,d!==null){do{var P={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};j===null?y=j=P:j=j.next=P,d=d.next}while(d!==null);j===null?y=j=l:j=j.next=l}else y=j=l;d={baseState:g.baseState,firstBaseUpdate:y,lastBaseUpdate:j,shared:g.shared,effects:g.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=l:a.next=l,d.lastBaseUpdate=l}function Xu(a,l,d,g){var y=a.updateQueue;Wi=!1;var j=y.firstBaseUpdate,P=y.lastBaseUpdate,T=y.shared.pending;if(T!==null){y.shared.pending=null;var R=T,X=R.next;R.next=null,P===null?j=X:P.next=X,P=R;var he=a.alternate;he!==null&&(he=he.updateQueue,T=he.lastBaseUpdate,T!==P&&(T===null?he.firstBaseUpdate=X:T.next=X,he.lastBaseUpdate=R))}if(j!==null){var me=y.baseState;P=0,he=X=R=null,T=j;do{var de=T.lane,we=T.eventTime;if((g&de)===de){he!==null&&(he=he.next={eventTime:we,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var Ne=a,Ee=T;switch(de=l,we=d,Ee.tag){case 1:if(Ne=Ee.payload,typeof Ne=="function"){me=Ne.call(we,me,de);break e}me=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ee.payload,de=typeof Ne=="function"?Ne.call(we,me,de):Ne,de==null)break e;me=ie({},me,de);break e;case 2:Wi=!0}}T.callback!==null&&T.lane!==0&&(a.flags|=64,de=y.effects,de===null?y.effects=[T]:de.push(T))}else we={eventTime:we,lane:de,tag:T.tag,payload:T.payload,callback:T.callback,next:null},he===null?(X=he=we,R=me):he=he.next=we,P|=de;if(T=T.next,T===null){if(T=y.shared.pending,T===null)break;de=T,T=de.next,de.next=null,y.lastBaseUpdate=de,y.shared.pending=null}}while(!0);if(he===null&&(R=me),y.baseState=R,y.firstBaseUpdate=X,y.lastBaseUpdate=he,l=y.shared.interleaved,l!==null){y=l;do P|=y.lane,y=y.next;while(y!==l)}else j===null&&(y.shared.lanes=0);Da|=P,a.lanes=P,a.memoizedState=me}}function Zb(a,l,d){if(a=l.effects,l.effects=null,a!==null)for(l=0;ld?d:4,a(!0);var g=hp.transition;hp.transition={};try{a(!1),l()}finally{Je=d,hp.transition=g}}function g1(){return qr().memoizedState}function r4(a,l,d){var g=qi(a);if(d={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null},v1(a))x1(l,d);else if(d=qb(a,l,d,g),d!==null){var y=hr();gn(d,a,g,y),y1(d,l,g)}}function n4(a,l,d){var g=qi(a),y={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null};if(v1(a))x1(l,y);else{var j=a.alternate;if(a.lanes===0&&(j===null||j.lanes===0)&&(j=l.lastRenderedReducer,j!==null))try{var P=l.lastRenderedState,T=j(P,d);if(y.hasEagerState=!0,y.eagerState=T,dn(T,P)){var R=l.interleaved;R===null?(y.next=y,sp(l)):(y.next=R.next,R.next=y),l.interleaved=y;return}}catch{}finally{}d=qb(a,l,y,g),d!==null&&(y=hr(),gn(d,a,g,y),y1(d,l,g))}}function v1(a){var l=a.alternate;return a===pt||l!==null&&l===pt}function x1(a,l){Gl=td=!0;var d=a.pending;d===null?l.next=l:(l.next=d.next,d.next=l),a.pending=l}function y1(a,l,d){if((d&4194240)!==0){var g=l.lanes;g&=a.pendingLanes,d|=g,l.lanes=d,km(a,d)}}var id={readContext:Vr,useCallback:nr,useContext:nr,useEffect:nr,useImperativeHandle:nr,useInsertionEffect:nr,useLayoutEffect:nr,useMemo:nr,useReducer:nr,useRef:nr,useState:nr,useDebugValue:nr,useDeferredValue:nr,useTransition:nr,useMutableSource:nr,useSyncExternalStore:nr,useId:nr,unstable_isNewReconciler:!1},i4={readContext:Vr,useCallback:function(a,l){return On().memoizedState=[a,l===void 0?null:l],a},useContext:Vr,useEffect:l1,useImperativeHandle:function(a,l,d){return d=d!=null?d.concat([a]):null,rd(4194308,4,d1.bind(null,l,a),d)},useLayoutEffect:function(a,l){return rd(4194308,4,a,l)},useInsertionEffect:function(a,l){return rd(4,2,a,l)},useMemo:function(a,l){var d=On();return l=l===void 0?null:l,a=a(),d.memoizedState=[a,l],a},useReducer:function(a,l,d){var g=On();return l=d!==void 0?d(l):l,g.memoizedState=g.baseState=l,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},g.queue=a,a=a.dispatch=r4.bind(null,pt,a),[g.memoizedState,a]},useRef:function(a){var l=On();return a={current:a},l.memoizedState=a},useState:o1,useDebugValue:bp,useDeferredValue:function(a){return On().memoizedState=a},useTransition:function(){var a=o1(!1),l=a[0];return a=t4.bind(null,a[1]),On().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,d){var g=pt,y=On();if(ut){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Rt===null)throw Error(r(349));(Ta&30)!==0||t1(g,l,d)}y.memoizedState=d;var j={value:d,getSnapshot:l};return y.queue=j,l1(n1.bind(null,g,j,a),[a]),g.flags|=2048,Ql(9,r1.bind(null,g,j,d,l),void 0,null),d},useId:function(){var a=On(),l=Rt.identifierPrefix;if(ut){var d=ri,g=ti;d=(g&~(1<<32-un(g)-1)).toString(32)+d,l=":"+l+"R"+d,d=Vl++,0<\/script>",a=a.removeChild(a.firstChild)):typeof g.is=="string"?a=P.createElement(d,{is:g.is}):(a=P.createElement(d),d==="select"&&(P=a,g.multiple?P.multiple=!0:g.size&&(P.size=g.size))):a=P.createElementNS(a,d),a[Cn]=l,a[Fl]=g,z1(a,l,!1,!1),l.stateNode=a;e:{switch(P=fm(d,g),d){case"dialog":at("cancel",a),at("close",a),y=g;break;case"iframe":case"object":case"embed":at("load",a),y=g;break;case"video":case"audio":for(y=0;yts&&(l.flags|=128,g=!0,Yl(j,!1),l.lanes=4194304)}else{if(!g)if(a=Ju(P),a!==null){if(l.flags|=128,g=!0,d=a.updateQueue,d!==null&&(l.updateQueue=d,l.flags|=4),Yl(j,!0),j.tail===null&&j.tailMode==="hidden"&&!P.alternate&&!ut)return ir(l),null}else 2*kt()-j.renderingStartTime>ts&&d!==1073741824&&(l.flags|=128,g=!0,Yl(j,!1),l.lanes=4194304);j.isBackwards?(P.sibling=l.child,l.child=P):(d=j.last,d!==null?d.sibling=P:l.child=P,j.last=P)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=kt(),l.sibling=null,d=mt.current,rt(mt,g?d&1|2:d&1),l):(ir(l),null);case 22:case 23:return Hp(),g=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(Tr&1073741824)!==0&&(ir(l),l.subtreeFlags&6&&(l.flags|=8192)):ir(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function f4(a,l){switch(Jm(l),l.tag){case 1:return wr(l.type)&&Uu(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return Zo(),ot(br),ot(rr),fp(),a=l.flags,(a&65536)!==0&&(a&128)===0?(l.flags=a&-65537|128,l):null;case 5:return up(l),null;case 13:if(ot(mt),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Vo()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return ot(mt),null;case 4:return Zo(),null;case 10:return ap(l.type._context),null;case 22:case 23:return Hp(),null;case 24:return null;default:return null}}var ld=!1,ar=!1,h4=typeof WeakSet=="function"?WeakSet:Set,je=null;function Jo(a,l){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(g){vt(a,l,g)}else d.current=null}function Mp(a,l,d){try{d()}catch(g){vt(a,l,g)}}var U1=!1;function m4(a,l){if(Hm=Cu,a=bb(),Rm(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var y=g.anchorOffset,j=g.focusNode;g=g.focusOffset;try{d.nodeType,j.nodeType}catch{d=null;break e}var P=0,T=-1,R=-1,X=0,he=0,me=a,de=null;t:for(;;){for(var we;me!==d||y!==0&&me.nodeType!==3||(T=P+y),me!==j||g!==0&&me.nodeType!==3||(R=P+g),me.nodeType===3&&(P+=me.nodeValue.length),(we=me.firstChild)!==null;)de=me,me=we;for(;;){if(me===a)break t;if(de===d&&++X===y&&(T=P),de===j&&++he===g&&(R=P),(we=me.nextSibling)!==null)break;me=de,de=me.parentNode}me=we}d=T===-1||R===-1?null:{start:T,end:R}}else d=null}d=d||{start:0,end:0}}else d=null;for(Km={focusedElem:a,selectionRange:d},Cu=!1,je=l;je!==null;)if(l=je,a=l.child,(l.subtreeFlags&1028)!==0&&a!==null)a.return=l,je=a;else for(;je!==null;){l=je;try{var Ne=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Ee=Ne.memoizedProps,jt=Ne.memoizedState,H=l.stateNode,z=H.getSnapshotBeforeUpdate(l.elementType===l.type?Ee:hn(l.type,Ee),jt);H.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var V=l.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ve){vt(l,l.return,ve)}if(a=l.sibling,a!==null){a.return=l.return,je=a;break}je=l.return}return Ne=U1,U1=!1,Ne}function Zl(a,l,d){var g=l.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var y=g=g.next;do{if((y.tag&a)===a){var j=y.destroy;y.destroy=void 0,j!==void 0&&Mp(l,d,j)}y=y.next}while(y!==g)}}function cd(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&a)===a){var g=d.create;d.destroy=g()}d=d.next}while(d!==l)}}function Ip(a){var l=a.ref;if(l!==null){var d=a.stateNode;switch(a.tag){case 5:a=d;break;default:a=d}typeof l=="function"?l(a):l.current=a}}function W1(a){var l=a.alternate;l!==null&&(a.alternate=null,W1(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&(delete l[Cn],delete l[Fl],delete l[Qm],delete l[Y_],delete l[Z_])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function H1(a){return a.tag===5||a.tag===3||a.tag===4}function K1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||H1(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Tp(a,l,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,l?d.nodeType===8?d.parentNode.insertBefore(a,l):d.insertBefore(a,l):(d.nodeType===8?(l=d.parentNode,l.insertBefore(a,d)):(l=d,l.appendChild(a)),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Fu));else if(g!==4&&(a=a.child,a!==null))for(Tp(a,l,d),a=a.sibling;a!==null;)Tp(a,l,d),a=a.sibling}function Dp(a,l,d){var g=a.tag;if(g===5||g===6)a=a.stateNode,l?d.insertBefore(a,l):d.appendChild(a);else if(g!==4&&(a=a.child,a!==null))for(Dp(a,l,d),a=a.sibling;a!==null;)Dp(a,l,d),a=a.sibling}var Kt=null,mn=!1;function Ki(a,l,d){for(d=d.child;d!==null;)G1(a,l,d),d=d.sibling}function G1(a,l,d){if(An&&typeof An.onCommitFiberUnmount=="function")try{An.onCommitFiberUnmount(ku,d)}catch{}switch(d.tag){case 5:ar||Jo(d,l);case 6:var g=Kt,y=mn;Kt=null,Ki(a,l,d),Kt=g,mn=y,Kt!==null&&(mn?(a=Kt,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):Kt.removeChild(d.stateNode));break;case 18:Kt!==null&&(mn?(a=Kt,d=d.stateNode,a.nodeType===8?qm(a.parentNode,d):a.nodeType===1&&qm(a,d),Pl(a)):qm(Kt,d.stateNode));break;case 4:g=Kt,y=mn,Kt=d.stateNode.containerInfo,mn=!0,Ki(a,l,d),Kt=g,mn=y;break;case 0:case 11:case 14:case 15:if(!ar&&(g=d.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){y=g=g.next;do{var j=y,P=j.destroy;j=j.tag,P!==void 0&&((j&2)!==0||(j&4)!==0)&&Mp(d,l,P),y=y.next}while(y!==g)}Ki(a,l,d);break;case 1:if(!ar&&(Jo(d,l),g=d.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=d.memoizedProps,g.state=d.memoizedState,g.componentWillUnmount()}catch(T){vt(d,l,T)}Ki(a,l,d);break;case 21:Ki(a,l,d);break;case 22:d.mode&1?(ar=(g=ar)||d.memoizedState!==null,Ki(a,l,d),ar=g):Ki(a,l,d);break;default:Ki(a,l,d)}}function V1(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new h4),l.forEach(function(g){var y=j4.bind(null,a,g);d.has(g)||(d.add(g),g.then(y,y))})}}function pn(a,l){var d=l.deletions;if(d!==null)for(var g=0;gy&&(y=P),g&=~j}if(g=y,g=kt()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*g4(g/1960))-g,10a?16:a,Vi===null)var g=!1;else{if(a=Vi,Vi=null,md=0,(Ve&6)!==0)throw Error(r(331));var y=Ve;for(Ve|=4,je=a.current;je!==null;){var j=je,P=j.child;if((je.flags&16)!==0){var T=j.deletions;if(T!==null){for(var R=0;Rkt()-$p?La(a,0):Lp|=d),Sr(a,l)}function ow(a,l){l===0&&((a.mode&1)===0?l=1:(l=Su,Su<<=1,(Su&130023424)===0&&(Su=4194304)));var d=hr();a=ni(a,l),a!==null&&(Sl(a,l,d),Sr(a,d))}function k4(a){var l=a.memoizedState,d=0;l!==null&&(d=l.retryLane),ow(a,d)}function j4(a,l){var d=0;switch(a.tag){case 13:var g=a.stateNode,y=a.memoizedState;y!==null&&(d=y.retryLane);break;case 19:g=a.stateNode;break;default:throw Error(r(314))}g!==null&&g.delete(l),ow(a,d)}var sw;sw=function(a,l,d){if(a!==null)if(a.memoizedProps!==l.pendingProps||br.current)kr=!0;else{if((a.lanes&d)===0&&(l.flags&128)===0)return kr=!1,u4(a,l,d);kr=(a.flags&131072)!==0}else kr=!1,ut&&(l.flags&1048576)!==0&&Fb(l,Gu,l.index);switch(l.lanes=0,l.tag){case 2:var g=l.type;sd(a,l),a=l.pendingProps;var y=Ho(l,rr.current);Yo(l,d),y=pp(null,l,g,a,y,d);var j=gp();return l.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,wr(g)?(j=!0,Wu(l)):j=!1,l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,lp(l),y.updater=ad,l.stateNode=y,y._reactInternals=l,kp(l,g,a,d),l=Ep(null,l,g,!0,j,d)):(l.tag=0,ut&&j&&Xm(l),fr(null,l,y,d),l=l.child),l;case 16:g=l.elementType;e:{switch(sd(a,l),a=l.pendingProps,y=g._init,g=y(g._payload),l.type=g,y=l.tag=N4(g),a=hn(g,a),y){case 0:l=Np(null,l,g,a,d);break e;case 1:l=I1(null,l,g,a,d);break e;case 11:l=C1(null,l,g,a,d);break e;case 14:l=P1(null,l,g,hn(g.type,a),d);break e}throw Error(r(306,g,""))}return l;case 0:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:hn(g,y),Np(a,l,g,y,d);case 1:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:hn(g,y),I1(a,l,g,y,d);case 3:e:{if(T1(l),a===null)throw Error(r(387));g=l.pendingProps,j=l.memoizedState,y=j.element,Qb(a,l),Xu(l,g,null,d);var P=l.memoizedState;if(g=P.element,j.isDehydrated)if(j={element:g,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},l.updateQueue.baseState=j,l.memoizedState=j,l.flags&256){y=Xo(Error(r(423)),l),l=D1(a,l,g,d,y);break e}else if(g!==y){y=Xo(Error(r(424)),l),l=D1(a,l,g,d,y);break e}else for(Ir=zi(l.stateNode.containerInfo.firstChild),Mr=l,ut=!0,fn=null,d=Vb(l,null,g,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Vo(),g===y){l=ai(a,l,d);break e}fr(a,l,g,d)}l=l.child}return l;case 5:return Xb(l),a===null&&tp(l),g=l.type,y=l.pendingProps,j=a!==null?a.memoizedProps:null,P=y.children,Gm(g,y)?P=null:j!==null&&Gm(g,j)&&(l.flags|=32),M1(a,l),fr(a,l,P,d),l.child;case 6:return a===null&&tp(l),null;case 13:return R1(a,l,d);case 4:return cp(l,l.stateNode.containerInfo),g=l.pendingProps,a===null?l.child=qo(l,null,g,d):fr(a,l,g,d),l.child;case 11:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:hn(g,y),C1(a,l,g,y,d);case 7:return fr(a,l,l.pendingProps,d),l.child;case 8:return fr(a,l,l.pendingProps.children,d),l.child;case 12:return fr(a,l,l.pendingProps.children,d),l.child;case 10:e:{if(g=l.type._context,y=l.pendingProps,j=l.memoizedProps,P=y.value,rt(Qu,g._currentValue),g._currentValue=P,j!==null)if(dn(j.value,P)){if(j.children===y.children&&!br.current){l=ai(a,l,d);break e}}else for(j=l.child,j!==null&&(j.return=l);j!==null;){var T=j.dependencies;if(T!==null){P=j.child;for(var R=T.firstContext;R!==null;){if(R.context===g){if(j.tag===1){R=ii(-1,d&-d),R.tag=2;var X=j.updateQueue;if(X!==null){X=X.shared;var he=X.pending;he===null?R.next=R:(R.next=he.next,he.next=R),X.pending=R}}j.lanes|=d,R=j.alternate,R!==null&&(R.lanes|=d),op(j.return,d,l),T.lanes|=d;break}R=R.next}}else if(j.tag===10)P=j.type===l.type?null:j.child;else if(j.tag===18){if(P=j.return,P===null)throw Error(r(341));P.lanes|=d,T=P.alternate,T!==null&&(T.lanes|=d),op(P,d,l),P=j.sibling}else P=j.child;if(P!==null)P.return=j;else for(P=j;P!==null;){if(P===l){P=null;break}if(j=P.sibling,j!==null){j.return=P.return,P=j;break}P=P.return}j=P}fr(a,l,y.children,d),l=l.child}return l;case 9:return y=l.type,g=l.pendingProps.children,Yo(l,d),y=Vr(y),g=g(y),l.flags|=1,fr(a,l,g,d),l.child;case 14:return g=l.type,y=hn(g,l.pendingProps),y=hn(g.type,y),P1(a,l,g,y,d);case 15:return O1(a,l,l.type,l.pendingProps,d);case 17:return g=l.type,y=l.pendingProps,y=l.elementType===g?y:hn(g,y),sd(a,l),l.tag=1,wr(g)?(a=!0,Wu(l)):a=!1,Yo(l,d),w1(l,g,y),kp(l,g,y,d),Ep(null,l,g,!0,a,d);case 19:return $1(a,l,d);case 22:return _1(a,l,d)}throw Error(r(156,l.tag))};function lw(a,l){return By(a,l)}function S4(a,l,d,g){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(a,l,d,g){return new S4(a,l,d,g)}function Gp(a){return a=a.prototype,!(!a||!a.isReactComponent)}function N4(a){if(typeof a=="function")return Gp(a)?1:0;if(a!=null){if(a=a.$$typeof,a===U)return 11;if(a===pe)return 14}return 2}function Yi(a,l){var d=a.alternate;return d===null?(d=Yr(a.tag,l,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=l,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,l=a.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function xd(a,l,d,g,y,j){var P=2;if(g=a,typeof a=="function")Gp(a)&&(P=1);else if(typeof a=="string")P=5;else e:switch(a){case I:return za(d.children,y,j,l);case B:P=8,y|=8;break;case F:return a=Yr(12,d,l,y|2),a.elementType=F,a.lanes=j,a;case ge:return a=Yr(13,d,l,y),a.elementType=ge,a.lanes=j,a;case ue:return a=Yr(19,d,l,y),a.elementType=ue,a.lanes=j,a;case ae:return yd(d,y,j,l);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case $:P=10;break e;case Q:P=9;break e;case U:P=11;break e;case pe:P=14;break e;case se:P=16,g=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return l=Yr(P,d,l,y),l.elementType=a,l.type=g,l.lanes=j,l}function za(a,l,d,g){return a=Yr(7,a,g,l),a.lanes=d,a}function yd(a,l,d,g){return a=Yr(22,a,g,l),a.elementType=ae,a.lanes=d,a.stateNode={isHidden:!1},a}function Vp(a,l,d){return a=Yr(6,a,null,l),a.lanes=d,a}function qp(a,l,d){return l=Yr(4,a.children!==null?a.children:[],a.key,l),l.lanes=d,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function E4(a,l,d,g,y){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wm(0),this.expirationTimes=wm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wm(0),this.identifierPrefix=g,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Qp(a,l,d,g,y,j,P,T,R){return a=new E4(a,l,d,T,R),l===1?(l=1,j===!0&&(l|=8)):l=0,j=Yr(3,null,null,l),a.current=j,j.stateNode=a,j.memoizedState={element:g,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},lp(j),a}function A4(a,l,d){var g=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rg.exports=B4(),rg.exports}var jw;function U4(){if(jw)return Ad;jw=1;var e=zN();return Ad.createRoot=e.createRoot,Ad.hydrateRoot=e.hydrateRoot,Ad}var W4=U4();const H4=Px(W4);var Jc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},no,oa,As,PN,K4=(PN=class extends Jc{constructor(){super();De(this,no);De(this,oa);De(this,As);ke(this,As,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,oa)||this.setEventListener(L(this,As))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,oa))==null||t.call(this),ke(this,oa,void 0))}setEventListener(t){var r;ke(this,As,t),(r=L(this,oa))==null||r.call(this),ke(this,oa,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,no)!==t&&(ke(this,no,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof L(this,no)=="boolean"?L(this,no):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},no=new WeakMap,oa=new WeakMap,As=new WeakMap,PN),_x=new K4,G4={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sa,Cx,ON,V4=(ON=class{constructor(){De(this,sa,G4);De(this,Cx,!1)}setTimeoutProvider(e){ke(this,sa,e)}setTimeout(e,t){return L(this,sa).setTimeout(e,t)}clearTimeout(e){L(this,sa).clearTimeout(e)}setInterval(e,t){return L(this,sa).setInterval(e,t)}clearInterval(e){L(this,sa).clearInterval(e)}},sa=new WeakMap,Cx=new WeakMap,ON),Ya=new V4;function q4(e){setTimeout(e,0)}var Q4=typeof window>"u"||"Deno"in globalThis;function Ar(){}function Y4(e,t){return typeof e=="function"?e(t):e}function rv(e){return typeof e=="number"&&e>=0&&e!==1/0}function FN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pa(e,t){return typeof e=="function"?e(t):e}function Lr(e,t){return typeof e=="function"?e(t):e}function Sw(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:c,stale:u}=e;if(c){if(n){if(t.queryHash!==Mx(c,t.options))return!1}else if(!Ec(t.queryKey,c))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function Nw(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Nc(t.options.mutationKey)!==Nc(o))return!1}else if(!Ec(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Mx(e,t){return((t==null?void 0:t.queryKeyHashFn)||Nc)(e)}function Nc(e){return JSON.stringify(e,(t,r)=>iv(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Ec(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ec(e[r],t[r])):!1}var Z4=Object.prototype.hasOwnProperty;function BN(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=Ew(e)&&Ew(t);if(!n&&!(iv(e)&&iv(t)))return t;const o=(n?e:Object.keys(e)).length,c=n?t:Object.keys(t),u=c.length,f=n?new Array(u):{};let h=0;for(let m=0;m{Ya.setTimeout(t,e)})}function av(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?BN(e,t):t}function J4(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function eM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Ix=Symbol();function UN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ix?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function WN(e,t){return typeof e=="function"?e(...t):!!e}function tM(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var Ac=(()=>{let e=()=>Q4;return{isServer(){return e()},setIsServer(t){e=t}}})();function ov(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var rM=q4;function nM(){let e=[],t=0,r=u=>{u()},n=u=>{u()},i=rM;const o=u=>{t?e.push(u):i(()=>{r(u)})},c=()=>{const u=e;e=[],u.length&&i(()=>{n(()=>{u.forEach(f=>{r(f)})})})};return{batch:u=>{let f;t++;try{f=u()}finally{t--,t||c()}return f},batchCalls:u=>(...f)=>{o(()=>{u(...f)})},schedule:o,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u},setScheduler:u=>{i=u}}}var Yt=nM(),Cs,la,Ps,_N,iM=(_N=class extends Jc{constructor(){super();De(this,Cs,!0);De(this,la);De(this,Ps);ke(this,Ps,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,la)||this.setEventListener(L(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,la))==null||t.call(this),ke(this,la,void 0))}setEventListener(t){var r;ke(this,Ps,t),(r=L(this,la))==null||r.call(this),ke(this,la,t(this.setOnline.bind(this)))}setOnline(t){L(this,Cs)!==t&&(ke(this,Cs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return L(this,Cs)}},Cs=new WeakMap,la=new WeakMap,Ps=new WeakMap,_N),df=new iM;function aM(e){return Math.min(1e3*2**e,3e4)}function HN(e){return(e??"online")==="online"?df.isOnline():!0}var sv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function KN(e){let t=!1,r=0,n;const i=ov(),o=()=>i.status!=="pending",c=w=>{var k;if(!o()){const N=new sv(w);v(N),(k=e.onCancel)==null||k.call(e,N)}},u=()=>{t=!0},f=()=>{t=!1},h=()=>_x.isFocused()&&(e.networkMode==="always"||df.isOnline())&&e.canRun(),m=()=>HN(e.networkMode)&&e.canRun(),p=w=>{o()||(n==null||n(),i.resolve(w))},v=w=>{o()||(n==null||n(),i.reject(w))},b=()=>new Promise(w=>{var k;n=N=>{(o()||h())&&w(N)},(k=e.onPause)==null||k.call(e)}).then(()=>{var w;n=void 0,o()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(o())return;let w;const k=r===0?e.initialPromise:void 0;try{w=k??e.fn()}catch(N){w=Promise.reject(N)}Promise.resolve(w).then(p).catch(N=>{var O;if(o())return;const E=e.retry??(Ac.isServer()?0:3),C=e.retryDelay??aM,A=typeof C=="function"?C(r,N):C,_=E===!0||typeof E=="number"&&rh()?void 0:b()).then(()=>{t?v(N):S()})})};return{promise:i,status:()=>i.status,cancel:c,continue:()=>(n==null||n(),i),cancelRetry:u,continueRetry:f,canStart:m,start:()=>(m()?S():b().then(S),i)}}var io,MN,GN=(MN=class{constructor(){De(this,io)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rv(this.gcTime)&&ke(this,io,Ya.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ac.isServer()?1/0:300*1e3))}clearGcTimeout(){L(this,io)!==void 0&&(Ya.clearTimeout(L(this,io)),ke(this,io,void 0))}},io=new WeakMap,MN);function oM(e){return{onFetch:(t,r)=>{var m,p,v,b,S;const n=t.options,i=(v=(p=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:p.fetchMore)==null?void 0:v.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],c=((S=t.state.data)==null?void 0:S.pageParams)||[];let u={pages:[],pageParams:[]},f=0;const h=async()=>{let w=!1;const k=C=>{tM(C,()=>t.signal,()=>w=!0)},N=UN(t.options,t.fetchOptions),E=async(C,A,_)=>{if(w)return Promise.reject(t.signal.reason);if(A==null&&C.pages.length)return Promise.resolve(C);const I=(()=>{const Q={client:t.client,queryKey:t.queryKey,pageParam:A,direction:_?"backward":"forward",meta:t.options.meta};return k(Q),Q})(),B=await N(I),{maxPages:F}=t.options,$=_?eM:J4;return{pages:$(C.pages,B,F),pageParams:$(C.pageParams,A,F)}};if(i&&o.length){const C=i==="backward",A=C?sM:Cw,_={pages:o,pageParams:c},O=A(n,_);u=await E(_,O,C)}else{const C=e??o.length;do{const A=f===0?c[0]??n.initialPageParam:Cw(n,u);if(f>0&&A==null)break;u=await E(u,A),f++}while(f{var w,k;return(k=(w=t.options).persister)==null?void 0:k.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function Cw(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function sM(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Os,ao,_s,Xr,oo,$t,qc,so,Rr,VN,li,IN,lM=(IN=class extends GN{constructor(t){super();De(this,Rr);De(this,Os);De(this,ao);De(this,_s);De(this,Xr);De(this,oo);De(this,$t);De(this,qc);De(this,so);ke(this,so,!1),ke(this,qc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ke(this,oo,t.client),ke(this,Xr,L(this,oo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ke(this,ao,Ow(this.options)),this.state=t.state??L(this,ao),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,Os)}get promise(){var t;return(t=L(this,$t))==null?void 0:t.promise}setOptions(t){if(this.options={...L(this,qc),...t},t!=null&&t._type&&ke(this,Os,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Ow(this.options);r.data!==void 0&&(this.setState(Pw(r.data,r.dataUpdatedAt)),ke(this,ao,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Xr).remove(this)}setData(t,r){const n=av(this.state.data,t,this.options);return We(this,Rr,li).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){We(this,Rr,li).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=L(this,$t))==null?void 0:n.promise;return(i=L(this,$t))==null||i.cancel(t),r?r.then(Ar).catch(Ar):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,ao)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Lr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ix||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pa(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!FN(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,$t))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=L(this,$t))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Xr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(L(this,$t)&&(L(this,so)||We(this,Rr,VN).call(this)?L(this,$t).cancel({revert:!0}):L(this,$t).cancelRetry()),this.scheduleGc()),L(this,Xr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||We(this,Rr,li).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,p,v,b,S,w,k,N,E,C;if(this.state.fetchStatus!=="idle"&&((h=L(this,$t))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(L(this,$t))return L(this,$t).continueRetry(),L(this,$t).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(_=>_.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ke(this,so,!0),n.signal)})},o=()=>{const A=UN(this.options,r),O=(()=>{const I={client:L(this,oo),queryKey:this.queryKey,meta:this.meta};return i(I),I})();return ke(this,so,!1),this.options.persister?this.options.persister(A,O,this):A(O)},u=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,oo),state:this.state,fetchFn:o};return i(A),A})(),f=L(this,Os)==="infinite"?oM(this.options.pages):this.options.behavior;f==null||f.onFetch(u,this),ke(this,_s,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&We(this,Rr,li).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),ke(this,$t,KN({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:A=>{A instanceof sv&&A.revert&&this.setState({...L(this,_s),fetchStatus:"idle"}),n.abort()},onFail:(A,_)=>{We(this,Rr,li).call(this,{type:"failed",failureCount:A,error:_})},onPause:()=>{We(this,Rr,li).call(this,{type:"pause"})},onContinue:()=>{We(this,Rr,li).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const A=await L(this,$t).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(b=(v=L(this,Xr).config).onSuccess)==null||b.call(v,A,this),(w=(S=L(this,Xr).config).onSettled)==null||w.call(S,A,this.state.error,this),A}catch(A){if(A instanceof sv){if(A.silent)return L(this,$t).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw We(this,Rr,li).call(this,{type:"error",error:A}),(N=(k=L(this,Xr).config).onError)==null||N.call(k,A,this),(C=(E=L(this,Xr).config).onSettled)==null||C.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},Os=new WeakMap,ao=new WeakMap,_s=new WeakMap,Xr=new WeakMap,oo=new WeakMap,$t=new WeakMap,qc=new WeakMap,so=new WeakMap,Rr=new WeakSet,VN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},li=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...qN(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...Pw(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ke(this,_s,t.manual?i:void 0),i;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Yt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),L(this,Xr).notify({query:this,type:"updated",action:t})})},IN);function qN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:HN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Pw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ow(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Er,Ke,Qc,mr,lo,Ms,ui,ca,Yc,Is,Ts,co,uo,ua,Ds,Xe,vc,lv,cv,uv,dv,fv,hv,mv,QN,TN,cM=(TN=class extends Jc{constructor(t,r){super();De(this,Xe);De(this,Er);De(this,Ke);De(this,Qc);De(this,mr);De(this,lo);De(this,Ms);De(this,ui);De(this,ca);De(this,Yc);De(this,Is);De(this,Ts);De(this,co);De(this,uo);De(this,ua);De(this,Ds,new Set);this.options=r,ke(this,Er,t),ke(this,ca,null),ke(this,ui,ov()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Ke).addObserver(this),_w(L(this,Ke),this.options)?We(this,Xe,vc).call(this):this.updateResult(),We(this,Xe,dv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pv(L(this,Ke),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pv(L(this,Ke),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,We(this,Xe,fv).call(this),We(this,Xe,hv).call(this),L(this,Ke).removeObserver(this)}setOptions(t){const r=this.options,n=L(this,Ke);if(this.options=L(this,Er).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lr(this.options.enabled,L(this,Ke))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");We(this,Xe,mv).call(this),L(this,Ke).setOptions(this.options),r._defaulted&&!nv(this.options,r)&&L(this,Er).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Ke),observer:this});const i=this.hasListeners();i&&Mw(L(this,Ke),n,this.options,r)&&We(this,Xe,vc).call(this),this.updateResult(),i&&(L(this,Ke)!==n||Lr(this.options.enabled,L(this,Ke))!==Lr(r.enabled,L(this,Ke))||pa(this.options.staleTime,L(this,Ke))!==pa(r.staleTime,L(this,Ke)))&&We(this,Xe,lv).call(this);const o=We(this,Xe,cv).call(this);i&&(L(this,Ke)!==n||Lr(this.options.enabled,L(this,Ke))!==Lr(r.enabled,L(this,Ke))||o!==L(this,ua))&&We(this,Xe,uv).call(this,o)}getOptimisticResult(t){const r=L(this,Er).getQueryCache().build(L(this,Er),t),n=this.createResult(r,t);return dM(this,n)&&(ke(this,mr,n),ke(this,Ms,this.options),ke(this,lo,L(this,Ke).state)),n}getCurrentResult(){return L(this,mr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&L(this,ui).status==="pending"&&L(this,ui).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){L(this,Ds).add(t)}getCurrentQuery(){return L(this,Ke)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=L(this,Er).defaultQueryOptions(t),n=L(this,Er).getQueryCache().build(L(this,Er),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return We(this,Xe,vc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,mr)))}createResult(t,r){var F;const n=L(this,Ke),i=this.options,o=L(this,mr),c=L(this,lo),u=L(this,Ms),h=t!==n?t.state:L(this,Qc),{state:m}=t;let p={...m},v=!1,b;if(r._optimisticResults){const $=this.hasListeners(),Q=!$&&_w(t,r),U=$&&Mw(t,n,r,i);(Q||U)&&(p={...p,...qN(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:S,errorUpdatedAt:w,status:k}=p;b=p.data;let N=!1;if(r.placeholderData!==void 0&&b===void 0&&k==="pending"){let $;o!=null&&o.isPlaceholderData&&r.placeholderData===(u==null?void 0:u.placeholderData)?($=o.data,N=!0):$=typeof r.placeholderData=="function"?r.placeholderData((F=L(this,Ts))==null?void 0:F.state.data,L(this,Ts)):r.placeholderData,$!==void 0&&(k="success",b=av(o==null?void 0:o.data,$,r),v=!0)}if(r.select&&b!==void 0&&!N)if(o&&b===(c==null?void 0:c.data)&&r.select===L(this,Yc))b=L(this,Is);else try{ke(this,Yc,r.select),b=r.select(b),b=av(o==null?void 0:o.data,b,r),ke(this,Is,b),ke(this,ca,null)}catch($){ke(this,ca,$)}L(this,ca)&&(S=L(this,ca),b=L(this,Is),w=Date.now(),k="error");const E=p.fetchStatus==="fetching",C=k==="pending",A=k==="error",_=C&&E,O=b!==void 0,B={status:k,fetchStatus:p.fetchStatus,isPending:C,isSuccess:k==="success",isError:A,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:p.dataUpdatedAt,error:S,errorUpdatedAt:w,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!C,isLoadingError:A&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:A&&O,isStale:Tx(t,r),refetch:this.refetch,promise:L(this,ui),isEnabled:Lr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=B.data!==void 0,Q=B.status==="error"&&!$,U=pe=>{Q?pe.reject(B.error):$&&pe.resolve(B.data)},ge=()=>{const pe=ke(this,ui,B.promise=ov());U(pe)},ue=L(this,ui);switch(ue.status){case"pending":t.queryHash===n.queryHash&&U(ue);break;case"fulfilled":(Q||B.data!==ue.value)&&ge();break;case"rejected":(!Q||B.error!==ue.reason)&&ge();break}}return B}updateResult(){const t=L(this,mr),r=this.createResult(L(this,Ke),this.options);if(ke(this,lo,L(this,Ke).state),ke(this,Ms,this.options),L(this,lo).data!==void 0&&ke(this,Ts,L(this,Ke)),nv(r,t))return;ke(this,mr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!L(this,Ds).size)return!0;const c=new Set(o??L(this,Ds));return this.options.throwOnError&&c.add("error"),Object.keys(L(this,mr)).some(u=>{const f=u;return L(this,mr)[f]!==t[f]&&c.has(f)})};We(this,Xe,QN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&We(this,Xe,dv).call(this)}},Er=new WeakMap,Ke=new WeakMap,Qc=new WeakMap,mr=new WeakMap,lo=new WeakMap,Ms=new WeakMap,ui=new WeakMap,ca=new WeakMap,Yc=new WeakMap,Is=new WeakMap,Ts=new WeakMap,co=new WeakMap,uo=new WeakMap,ua=new WeakMap,Ds=new WeakMap,Xe=new WeakSet,vc=function(t){We(this,Xe,mv).call(this);let r=L(this,Ke).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ar)),r},lv=function(){We(this,Xe,fv).call(this);const t=pa(this.options.staleTime,L(this,Ke));if(Ac.isServer()||L(this,mr).isStale||!rv(t))return;const n=FN(L(this,mr).dataUpdatedAt,t)+1;ke(this,co,Ya.setTimeout(()=>{L(this,mr).isStale||this.updateResult()},n))},cv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Ke)):this.options.refetchInterval)??!1},uv=function(t){We(this,Xe,hv).call(this),ke(this,ua,t),!(Ac.isServer()||Lr(this.options.enabled,L(this,Ke))===!1||!rv(L(this,ua))||L(this,ua)===0)&&ke(this,uo,Ya.setInterval(()=>{(this.options.refetchIntervalInBackground||_x.isFocused())&&We(this,Xe,vc).call(this)},L(this,ua)))},dv=function(){We(this,Xe,lv).call(this),We(this,Xe,uv).call(this,We(this,Xe,cv).call(this))},fv=function(){L(this,co)!==void 0&&(Ya.clearTimeout(L(this,co)),ke(this,co,void 0))},hv=function(){L(this,uo)!==void 0&&(Ya.clearInterval(L(this,uo)),ke(this,uo,void 0))},mv=function(){const t=L(this,Er).getQueryCache().build(L(this,Er),this.options);if(t===L(this,Ke))return;const r=L(this,Ke);ke(this,Ke,t),ke(this,Qc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},QN=function(t){Yt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(L(this,mr))}),L(this,Er).getQueryCache().notify({query:L(this,Ke),type:"observerResultsUpdated"})})},TN);function uM(e,t){return Lr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Lr(t.retryOnMount,e)===!1)}function _w(e,t){return uM(e,t)||e.state.data!==void 0&&pv(e,t,t.refetchOnMount)}function pv(e,t,r){if(Lr(t.enabled,e)!==!1&&pa(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Tx(e,t)}return!1}function Mw(e,t,r,n){return(e!==t||Lr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Tx(e,r)}function Tx(e,t){return Lr(t.enabled,e)!==!1&&e.isStaleByTime(pa(t.staleTime,e))}function dM(e,t){return!nv(e.getCurrentResult(),t)}var Zc,Rn,or,fo,Ln,ta,DN,fM=(DN=class extends GN{constructor(t){super();De(this,Ln);De(this,Zc);De(this,Rn);De(this,or);De(this,fo);ke(this,Zc,t.client),this.mutationId=t.mutationId,ke(this,or,t.mutationCache),ke(this,Rn,[]),this.state=t.state||hM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,Rn).includes(t)||(L(this,Rn).push(t),this.clearGcTimeout(),L(this,or).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ke(this,Rn,L(this,Rn).filter(r=>r!==t)),this.scheduleGc(),L(this,or).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Rn).length||(this.state.status==="pending"?this.scheduleGc():L(this,or).remove(this))}continue(){var t;return((t=L(this,fo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,u,f,h,m,p,v,b,S,w,k,N,E,C,A,_,O,I;const r=()=>{We(this,Ln,ta).call(this,{type:"continue"})},n={client:L(this,Zc),meta:this.options.meta,mutationKey:this.options.mutationKey};ke(this,fo,KN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(B,F)=>{We(this,Ln,ta).call(this,{type:"failed",failureCount:B,error:F})},onPause:()=>{We(this,Ln,ta).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,or).canRun(this)}));const i=this.state.status==="pending",o=!L(this,fo).canStart();try{if(i)r();else{We(this,Ln,ta).call(this,{type:"pending",variables:t,isPaused:o}),L(this,or).config.onMutate&&await L(this,or).config.onMutate(t,this,n);const F=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,t,n));F!==this.state.context&&We(this,Ln,ta).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const B=await L(this,fo).start();return await((h=(f=L(this,or).config).onSuccess)==null?void 0:h.call(f,B,t,this.state.context,this,n)),await((p=(m=this.options).onSuccess)==null?void 0:p.call(m,B,t,this.state.context,n)),await((b=(v=L(this,or).config).onSettled)==null?void 0:b.call(v,B,null,this.state.variables,this.state.context,this,n)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,B,null,t,this.state.context,n)),We(this,Ln,ta).call(this,{type:"success",data:B}),B}catch(B){try{await((N=(k=L(this,or).config).onError)==null?void 0:N.call(k,B,t,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((C=(E=this.options).onError)==null?void 0:C.call(E,B,t,this.state.context,n))}catch(F){Promise.reject(F)}try{await((_=(A=L(this,or).config).onSettled)==null?void 0:_.call(A,void 0,B,this.state.variables,this.state.context,this,n))}catch(F){Promise.reject(F)}try{await((I=(O=this.options).onSettled)==null?void 0:I.call(O,void 0,B,t,this.state.context,n))}catch(F){Promise.reject(F)}throw We(this,Ln,ta).call(this,{type:"error",error:B}),B}finally{L(this,or).runNext(this)}}},Zc=new WeakMap,Rn=new WeakMap,or=new WeakMap,fo=new WeakMap,Ln=new WeakSet,ta=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Yt.batch(()=>{L(this,Rn).forEach(n=>{n.onMutationUpdate(t)}),L(this,or).notify({mutation:this,type:"updated",action:t})})},DN);function hM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var di,xn,Xc,RN,mM=(RN=class extends Jc{constructor(t={}){super();De(this,di);De(this,xn);De(this,Xc);this.config=t,ke(this,di,new Set),ke(this,xn,new Map),ke(this,Xc,0)}build(t,r,n){const i=new fM({client:t,mutationCache:this,mutationId:++Ed(this,Xc)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){L(this,di).add(t);const r=Cd(t);if(typeof r=="string"){const n=L(this,xn).get(r);n?n.push(t):L(this,xn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,di).delete(t)){const r=Cd(t);if(typeof r=="string"){const n=L(this,xn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&L(this,xn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Cd(t);if(typeof r=="string"){const n=L(this,xn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Cd(t);if(typeof r=="string"){const i=(n=L(this,xn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Yt.batch(()=>{L(this,di).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,di).clear(),L(this,xn).clear()})}getAll(){return Array.from(L(this,di))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Nw(r,n))}findAll(t={}){return this.getAll().filter(r=>Nw(t,r))}notify(t){Yt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Yt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ar))))}},di=new WeakMap,xn=new WeakMap,Xc=new WeakMap,RN);function Cd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var $n,LN,pM=(LN=class extends Jc{constructor(t={}){super();De(this,$n);this.config=t,ke(this,$n,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??Mx(i,r);let c=this.get(o);return c||(c=new lM({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(c)),c}add(t){L(this,$n).has(t.queryHash)||(L(this,$n).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=L(this,$n).get(t.queryHash);r&&(t.destroy(),r===t&&L(this,$n).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Yt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,$n).get(t)}getAll(){return[...L(this,$n).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Sw(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Sw(t,n)):r}notify(t){Yt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Yt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Yt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$n=new WeakMap,LN),xt,da,fa,Rs,Ls,ha,$s,zs,$N,gM=($N=class{constructor(e={}){De(this,xt);De(this,da);De(this,fa);De(this,Rs);De(this,Ls);De(this,ha);De(this,$s);De(this,zs);ke(this,xt,e.queryCache||new pM),ke(this,da,e.mutationCache||new mM),ke(this,fa,e.defaultOptions||{}),ke(this,Rs,new Map),ke(this,Ls,new Map),ke(this,ha,0)}mount(){Ed(this,ha)._++,L(this,ha)===1&&(ke(this,$s,_x.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,xt).onFocus())})),ke(this,zs,df.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,xt).onOnline())})))}unmount(){var e,t;Ed(this,ha)._--,L(this,ha)===0&&((e=L(this,$s))==null||e.call(this),ke(this,$s,void 0),(t=L(this,zs))==null||t.call(this),ke(this,zs,void 0))}isFetching(e){return L(this,xt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,da).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,xt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=L(this,xt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(pa(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,xt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=L(this,xt).get(n.queryHash),o=i==null?void 0:i.state.data,c=Y4(t,o);if(c!==void 0)return L(this,xt).build(this,n).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return Yt.batch(()=>L(this,xt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=L(this,xt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=L(this,xt);Yt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=L(this,xt);return Yt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Yt.batch(()=>L(this,xt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Ar).catch(Ar)}invalidateQueries(e,t={}){return Yt.batch(()=>(L(this,xt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Yt.batch(()=>L(this,xt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(Ar)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Ar)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=L(this,xt).build(this,t);return r.isStaleByTime(pa(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ar).catch(Ar)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ar).catch(Ar)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return df.isOnline()?L(this,da).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,xt)}getMutationCache(){return L(this,da)}getDefaultOptions(){return L(this,fa)}setDefaultOptions(e){ke(this,fa,e)}setQueryDefaults(e,t){L(this,Rs).set(Nc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Rs).values()],r={};return t.forEach(n=>{Ec(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,Ls).set(Nc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,Ls).values()],r={};return t.forEach(n=>{Ec(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,fa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mx(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ix&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,fa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,xt).clear(),L(this,da).clear()}},xt=new WeakMap,da=new WeakMap,fa=new WeakMap,Rs=new WeakMap,Ls=new WeakMap,ha=new WeakMap,$s=new WeakMap,zs=new WeakMap,$N),YN=x.createContext(void 0),Hr=e=>{const t=x.useContext(YN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vM=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(YN.Provider,{value:e,children:t})),ZN=x.createContext(!1),xM=()=>x.useContext(ZN);ZN.Provider;function yM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bM=x.createContext(yM()),wM=()=>x.useContext(bM),kM=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?WN(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},jM=e=>{x.useEffect(()=>{e.clearReset()},[e])},SM=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||WN(r,[e.error,n])),NM=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},EM=(e,t)=>e.isLoading&&e.isFetching&&!t,AM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Iw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function CM(e,t,r){var b,S,w,k;const n=xM(),i=wM(),o=Hr(),c=o.defaultQueryOptions(e);(S=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||S.call(b,c);const u=o.getQueryCache().get(c.queryHash),f=e.subscribed!==!1;c._optimisticResults=n?"isRestoring":f?"optimistic":void 0,NM(c),kM(c,i,u),jM(i);const h=!o.getQueryCache().get(c.queryHash),[m]=x.useState(()=>new t(o,c)),p=m.getOptimisticResult(c),v=!n&&f;if(x.useSyncExternalStore(x.useCallback(N=>{const E=v?m.subscribe(Yt.batchCalls(N)):Ar;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),x.useEffect(()=>{m.setOptions(c)},[c,m]),AM(c,p))throw Iw(c,m,i);if(SM({result:p,errorResetBoundary:i,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw p.error;if((k=(w=o.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||k.call(w,c,p),c.experimental_prefetchInRender&&!Ac.isServer()&&EM(p,n)){const N=h?Iw(c,m,i):u==null?void 0:u.promise;N==null||N.catch(Ar).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?p:m.trackResult(p)}function gt(e,t){return CM(e,cM)}/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),XN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var OM={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _M=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:c,...u},f)=>x.createElement("svg",{ref:f,...OM,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:XN("lucide",i),...u},[...c.map(([h,m])=>x.createElement(h,m)),...Array.isArray(o)?o:[o]]));/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ce=(e,t)=>{const r=x.forwardRef(({className:n,...i},o)=>x.createElement(_M,{ref:o,iconNode:t,className:XN(`lucide-${PM(e)}`,n),...i}));return r.displayName=`${e}`,r};/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hh=ce("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JN=ce("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Tw=ce("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const e5=ce("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wc=ce("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const MM=ce("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const IM=ce("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const t5=ce("BookMarked",[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gv=ce("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const TM=ce("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Hn=ce("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const DM=ce("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ff=ce("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RM=ce("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const LM=ce("BrainCog",[["path",{d:"M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588 4 4 0 0 0 7.636 2.106 3.2 3.2 0 0 0 .164-.546c.028-.13.306-.13.335 0a3.2 3.2 0 0 0 .163.546 4 4 0 0 0 7.636-2.106 4 4 0 0 0 .556-6.588 4 4 0 0 0-2.526-5.77A3 3 0 1 0 12 5",key:"1kgmhc"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m15.7 10.4-.9.4",key:"ayzo6p"}],["path",{d:"m9.2 13.2-.9.4",key:"1uzb3g"}],["path",{d:"m13.6 15.7-.4-.9",key:"11ifqf"}],["path",{d:"m10.8 9.2-.4-.9",key:"1pmk2v"}],["path",{d:"m15.7 13.5-.9-.4",key:"7ng02m"}],["path",{d:"m9.2 10.9-.9-.4",key:"1x66zd"}],["path",{d:"m10.5 15.7.4-.9",key:"3js94g"}],["path",{d:"m13.1 9.2.4-.9",key:"18n7mc"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Sa=ce("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $M=ce("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mt=ce("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tl=ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zM=ce("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kn=ce("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r5=ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const FM=ce("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const n5=ce("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const BM=ce("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const UM=ce("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mh=ce("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const WM=ce("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const HM=ce("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Fs=ce("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const KM=ce("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vv=ce("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const GM=ce("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xv=ce("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yi=ce("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const VM=ce("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Bs=ce("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Dx=ce("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Dw=ce("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Cc=ce("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qM=ce("FileDiff",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const i5=ce("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const QM=ce("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const a5=ce("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const o5=ce("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const YM=ce("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ZM=ce("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XM=ce("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JM=ce("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ga=ce("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rx=ce("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eI=ce("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const s5=ce("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eu=ce("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ag=ce("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tI=ce("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const og=ce("Laptop",[["path",{d:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",key:"tarvll"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const l5=ce("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rI=ce("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const c5=ce("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nI=ce("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iI=ce("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aI=ce("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oI=ce("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Bt=ce("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const u5=ce("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sI=ce("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lI=ce("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cI=ce("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uI=ce("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rw=ce("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const d5=ce("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dI=ce("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lw=ce("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const f5=ce("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pc=ce("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hf=ce("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fI=ce("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const h5=ce("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hI=ce("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mI=ce("Radar",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ho=ce("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pI=ce("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lx=ce("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const m5=ce("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gI=ce("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rl=ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vI=ce("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ph=ce("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $w=ce("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $x=ce("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const p5=ce("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xI=ce("ShieldQuestion",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nl=ce("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const g5=ce("Shuffle",[["path",{d:"M2 18h1.4c1.3 0 2.5-.6 3.3-1.7l6.1-8.6c.7-1.1 2-1.7 3.3-1.7H22",key:"1wmou1"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 6h1.9c1.5 0 2.9.9 3.6 2.2",key:"10bdb2"}],["path",{d:"M22 18h-5.9c-1.3 0-2.6-.7-3.3-1.8l-.5-.8",key:"vgxac0"}],["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yI=ce("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bI=ce("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const va=ce("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const v5=ce("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wI=ce("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kI=ce("Telescope",[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const x5=ce("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Us=ce("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vr=ce("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jI=ce("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tu=ce("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Br=ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** - * @license lucide-react v0.460.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wa=ce("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),gs=[{id:"dashboard",label:"Cockpit",hint:"Deine Box auf einen Blick",icon:rI,group:"Operativ"},{id:"auftraege",label:"Auftragsbuch",hint:"Vorschläge der Box — annehmen oder ablehnen",icon:eu,group:"Operativ"},{id:"chronik",label:"Chronik",hint:"Was die Box von allein getan hat + Zeitmaschine",icon:s5,group:"Operativ"},{id:"memory",label:"Gedächtnis",hint:"Geteiltes Memory verwalten",icon:Sa,group:"Wissen"},{id:"wissen",label:"Wissen",hint:"Lucys Wissens-Vault (Traum-Notizen)",icon:c5,group:"Wissen"},{id:"connect",label:"Verbinden",hint:"IDE-/Agent-Configs erzeugen",icon:Pc,group:"Werkzeuge"},{id:"konsole",label:"Konsole",hint:"Direkte Box-Shell (SSH-artig)",icon:v5,group:"Werkzeuge"},{id:"guide",label:"Anleitung",hint:"Einrichten & Vibe-Coding",icon:BM,group:"Werkzeuge"},{id:"models",label:"Modelle",hint:"Speicher, laden & Rollen",icon:ff,group:"Wartung"},{id:"agent",label:"Hermes",hint:"Agent-Status & Verdrahtung",icon:Hn,group:"Wartung"}];var zw=1,SI=.9,NI=.8,EI=.17,sg=.1,lg=.999,AI=.9999,CI=.99,PI=/[\\\/_+.#"@\[\(\{&]/,OI=/[\\\/_+.#"@\[\(\{&]/g,_I=/[\s-]/,y5=/[\s-]/g;function yv(e,t,r,n,i,o,c){if(o===t.length)return i===e.length?zw:CI;var u=`${i},${o}`;if(c[u]!==void 0)return c[u];for(var f=n.charAt(o),h=r.indexOf(f,i),m=0,p,v,b,S;h>=0;)p=yv(e,t,r,n,h+1,o+1,c),p>m&&(h===i?p*=zw:PI.test(e.charAt(h-1))?(p*=NI,b=e.slice(i,h-1).match(OI),b&&i>0&&(p*=Math.pow(lg,b.length))):_I.test(e.charAt(h-1))?(p*=SI,S=e.slice(i,h-1).match(y5),S&&i>0&&(p*=Math.pow(lg,S.length))):(p*=EI,i>0&&(p*=Math.pow(lg,h-i))),e.charAt(h)!==t.charAt(o)&&(p*=AI)),(pp&&(p=v*sg)),p>m&&(m=p),h=r.indexOf(f,h+1);return c[u]=m,m}function Fw(e){return e.toLowerCase().replace(y5," ")}function MI(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,yv(e,t,Fw(e),Fw(t),0,0,{})}function xa(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Bw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ws(...e){return t=>{let r=!1;const n=e.map(i=>{const o=Bw(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i{var N;const{scope:v,children:b,...S}=p,w=((N=v==null?void 0:v[e])==null?void 0:N[f])||u,k=x.useMemo(()=>S,Object.values(S));return s.jsx(w.Provider,{value:k,children:b})};h.displayName=o+"Provider";function m(p,v){var w;const b=((w=v==null?void 0:v[e])==null?void 0:w[f])||u,S=x.useContext(b);if(S)return S;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[h,m]}const i=()=>{const o=r.map(c=>x.createContext(c));return function(u){const f=(u==null?void 0:u[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,TI(i,...t)]}function TI(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const c=n.reduce((u,{useScope:f,scopeName:h})=>{const p=f(o)[`__scope${h}`];return{...u,...p}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}var Oc=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},DI=fh[" useId ".trim().toString()]||(()=>{}),RI=0;function gi(e){const[t,r]=x.useState(DI());return Oc(()=>{r(n=>n??String(RI++))},[e]),t?`radix-${t}`:""}var LI=fh[" useInsertionEffect ".trim().toString()]||Oc;function $I({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,c]=zI({defaultProp:t,onChange:r}),u=e!==void 0,f=u?e:i;{const m=x.useRef(e!==void 0);x.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,n])}const h=x.useCallback(m=>{var p;if(u){const v=FI(m)?m(e):m;v!==e&&((p=c.current)==null||p.call(c,v))}else o(m)},[u,e,o,c]);return[f,h]}function zI({defaultProp:e,onChange:t}){const[r,n]=x.useState(e),i=x.useRef(r),o=x.useRef(t);return LI(()=>{o.current=t},[t]),x.useEffect(()=>{var c;i.current!==r&&((c=o.current)==null||c.call(o,r),i.current=r)},[r,i]),[r,n,o]}function FI(e){return typeof e=="function"}var gh=zN();function b5(e){const t=x.forwardRef((r,n)=>{let{children:i,...o}=r,c=null,u=!1;const f=[];Uw(i)&&typeof Pd=="function"&&(i=Pd(i._payload)),x.Children.forEach(i,v=>{var b;if(KI(v)){u=!0;const S=v;let w="child"in S.props?S.props.child:S.props.children;Uw(w)&&typeof Pd=="function"&&(w=Pd(w._payload)),c=UI(S,w),f.push((b=c==null?void 0:c.props)==null?void 0:b.children)}else f.push(v)}),c?c=x.cloneElement(c,void 0,f):!u&&x.Children.count(i)===1&&x.isValidElement(i)&&(c=i);const h=c?HI(c):void 0,m=Ao(n,h);if(!c){if(i||i===0)throw new Error(u?QI(e):qI(e));return i}const p=WI(o,c.props??{});return c.type!==x.Fragment&&(p.ref=n?m:h),x.cloneElement(c,p)});return t.displayName=`${e}.Slot`,t}var BI=Symbol.for("radix.slottable"),UI=(e,t)=>{if("child"in e.props){const r=e.props.child;return x.isValidElement(r)?x.cloneElement(r,void 0,e.props.children(r.props.children)):null}return x.isValidElement(t)?t:null};function WI(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...u)=>{const f=o(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function HI(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function KI(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===BI}var GI=Symbol.for("react.lazy");function Uw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===GI&&"_payload"in e&&VI(e._payload)}function VI(e){return typeof e=="object"&&e!==null&&"then"in e}var qI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,QI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Pd=fh[" use ".trim().toString()],YI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Jt=YI.reduce((e,t)=>{const r=b5(`Primitive.${t}`),n=x.forwardRef((i,o)=>{const{asChild:c,...u}=i,f=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(f,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ZI(e,t){e&&gh.flushSync(()=>e.dispatchEvent(t))}function _c(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>((...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)}),[])}function XI(e,t=globalThis==null?void 0:globalThis.document){const r=_c(e);x.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var JI="DismissableLayer",bv="dismissableLayer.update",eT="dismissableLayer.pointerDownOutside",tT="dismissableLayer.focusOutside",Ww,zx=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),w5=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...h}=e,m=x.useContext(zx),[p,v]=x.useState(null),b=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=x.useState({}),w=Ao(t,F=>v(F)),k=Array.from(m.layers),[N]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(N),C=p?k.indexOf(p):-1,A=m.layersWithOutsidePointerEventsDisabled.size>0,_=C>=E,O=x.useRef(!1),I=aT(F=>{const $=F.target;if(!($ instanceof Node))return;const Q=[...m.branches].some(U=>U.contains($));!_||Q||(o==null||o(F),u==null||u(F),F.defaultPrevented||f==null||f())},{ownerDocument:b,deferPointerDownOutside:n,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:m.dismissableSurfaces}),B=oT(F=>{if(n&&O.current)return;const $=F.target;[...m.branches].some(U=>U.contains($))||(c==null||c(F),u==null||u(F),F.defaultPrevented||f==null||f())},b);return XI(F=>{C===m.layers.size-1&&(i==null||i(F),!F.defaultPrevented&&f&&(F.preventDefault(),f()))},b),x.useEffect(()=>{if(p)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Ww=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(p)),m.layers.add(p),Hw(),()=>{r&&(m.layersWithOutsidePointerEventsDisabled.delete(p),m.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=Ww))}},[p,b,r,m]),x.useEffect(()=>()=>{p&&(m.layers.delete(p),m.layersWithOutsidePointerEventsDisabled.delete(p),Hw())},[p,m]),x.useEffect(()=>{const F=()=>S({});return document.addEventListener(bv,F),()=>document.removeEventListener(bv,F)},[]),s.jsx(Jt.div,{...h,ref:w,style:{pointerEvents:A?_?"auto":"none":void 0,...e.style},onFocusCapture:xa(e.onFocusCapture,B.onFocusCapture),onBlurCapture:xa(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:xa(e.onPointerDownCapture,I.onPointerDownCapture)})});w5.displayName=JI;var rT="DismissableLayerBranch",nT=x.forwardRef((e,t)=>{const r=x.useContext(zx),n=x.useRef(null),i=Ao(t,n);return x.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),s.jsx(Jt.div,{...e,ref:i})});nT.displayName=rT;function iT(){const e=x.useContext(zx),[t,r]=x.useState(null);return x.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}function aT(e,t){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:n=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,c=_c(e),u=x.useRef(!1),f=x.useRef(!1),h=x.useRef(new Map),m=x.useRef(()=>{});return x.useEffect(()=>{function p(){f.current=!1,i.current=!1,h.current.clear()}function v(){return Array.from(h.current.values()).some(Boolean)}function b(E){if(!f.current)return;const C=E.target;C instanceof Node&&[...o].some(_=>_.contains(C))||h.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function S(E){f.current&&h.current.set(E.type,!1)}const w=E=>{if(E.target&&!u.current){let C=function(){r.removeEventListener("click",m.current);const _=v();p(),_||k5(eT,c,A,{discrete:!0})};const A={originalEvent:E};f.current=!0,i.current=n&&E.button===0,h.current.clear(),!n||E.button!==0?C():(r.removeEventListener("click",m.current),m.current=C,r.addEventListener("click",m.current,{once:!0}))}else r.removeEventListener("click",m.current),p();u.current=!1},k=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of k)r.addEventListener(E,b,!0),r.addEventListener(E,S);const N=window.setTimeout(()=>{r.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(N),r.removeEventListener("pointerdown",w),r.removeEventListener("click",m.current);for(const E of k)r.removeEventListener(E,b,!0),r.removeEventListener(E,S)}},[r,c,n,i,o]),{onPointerDownCapture:()=>u.current=!0}}function oT(e,t=globalThis==null?void 0:globalThis.document){const r=_c(e),n=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!n.current&&k5(tT,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Hw(){const e=new CustomEvent(bv);document.dispatchEvent(e)}function k5(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?ZI(i,o):i.dispatchEvent(o)}var cg="focusScope.autoFocusOnMount",ug="focusScope.autoFocusOnUnmount",Kw={bubbles:!1,cancelable:!0},sT="FocusScope",j5=x.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...c}=e,[u,f]=x.useState(null),h=_c(i),m=_c(o),p=x.useRef(null),v=Ao(t,w=>f(w)),b=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let w=function(C){if(b.paused||!u)return;const A=C.target;u.contains(A)?p.current=A:ra(p.current,{select:!0})},k=function(C){if(b.paused||!u)return;const A=C.relatedTarget;A!==null&&(u.contains(A)||ra(p.current,{select:!0}))},N=function(C){if(document.activeElement===document.body)for(const _ of C)_.removedNodes.length>0&&ra(u)};document.addEventListener("focusin",w),document.addEventListener("focusout",k);const E=new MutationObserver(N);return u&&E.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",k),E.disconnect()}}},[n,u,b.paused]),x.useEffect(()=>{if(u){Vw.add(b);const w=document.activeElement;if(!u.contains(w)){const N=new CustomEvent(cg,Kw);u.addEventListener(cg,h),u.dispatchEvent(N),N.defaultPrevented||(lT(hT(S5(u)),{select:!0}),document.activeElement===w&&ra(u))}return()=>{u.removeEventListener(cg,h),setTimeout(()=>{const N=new CustomEvent(ug,Kw);u.addEventListener(ug,m),u.dispatchEvent(N),N.defaultPrevented||ra(w??document.body,{select:!0}),u.removeEventListener(ug,m),Vw.remove(b)},0)}}},[u,h,m,b]);const S=x.useCallback(w=>{if(!r&&!n||b.paused)return;const k=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,N=document.activeElement;if(k&&N){const E=w.currentTarget,[C,A]=cT(E);C&&A?!w.shiftKey&&N===A?(w.preventDefault(),r&&ra(C,{select:!0})):w.shiftKey&&N===C&&(w.preventDefault(),r&&ra(A,{select:!0})):N===E&&w.preventDefault()}},[r,n,b.paused]);return s.jsx(Jt.div,{tabIndex:-1,...c,ref:v,onKeyDown:S})});j5.displayName=sT;function lT(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ra(n,{select:t}),document.activeElement!==r)return}function cT(e){const t=S5(e),r=Gw(t,e),n=Gw(t.reverse(),e);return[r,n]}function S5(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Gw(e,t){for(const r of e)if(!uT(r,{upTo:t}))return r}function uT(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function dT(e){return e instanceof HTMLInputElement&&"select"in e}function ra(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&dT(e)&&t&&e.select()}}var Vw=fT();function fT(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=qw(e,t),e.unshift(t)},remove(t){var r;e=qw(e,t),(r=e[0])==null||r.resume()}}}function qw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hT(e){return e.filter(t=>t.tagName!=="A")}var mT="Portal",N5=x.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=x.useState(!1);Oc(()=>o(!0),[]);const c=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?gh.createPortal(s.jsx(Jt.div,{...n,ref:t}),c):null});N5.displayName=mT;function pT(e,t){return x.useReducer((r,n)=>t[r][n]??r,e)}var vh=e=>{const{present:t,children:r}=e,n=gT(t),i=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),o=vT(n.ref,xT(i));return typeof r=="function"||n.isPresent?x.cloneElement(i,{ref:o}):null};vh.displayName="Presence";function gT(e){const[t,r]=x.useState(),n=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),c=e?"mounted":"unmounted",[u,f]=pT(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const h=Od(n.current);o.current=u==="mounted"?h:"none"},[u]),Oc(()=>{const h=n.current,m=i.current;if(m!==e){const v=o.current,b=Od(h);e?f("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Oc(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,p=b=>{const w=Od(n.current).includes(CSS.escape(b.animationName));if(b.target===t&&w&&(f("ANIMATION_END"),!i.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},v=b=>{b.target===t&&(o.current=Od(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:x.useCallback(h=>{n.current=h?getComputedStyle(h):null,r(h)},[])}}function Qw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vT(...e){const t=x.useRef(e);return t.current=e,x.useCallback(r=>{const n=t.current;let i=!1;const o=n.map(c=>{const u=Qw(c,r);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let c=0;c{Mn||(Mn={start:Yw(),end:Yw()});const{start:e,end:t}=Mn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),_d++,()=>{_d===1&&(Mn==null||Mn.start.remove(),Mn==null||Mn.end.remove(),Mn=null),_d=Math.max(0,_d-1)}},[])}function Yw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var zn=function(){return zn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return RT;var t=LT(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},zT=P5(),ks="data-scroll-locked",FT=function(e,t,r,n){var i=e.left,o=e.top,c=e.right,u=e.gap;return r===void 0&&(r="margin"),` - .`.concat(wT,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(u,"px ").concat(n,`; - } - body[`).concat(ks,`] { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(c,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(u,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(u,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(tf,` { - right: `).concat(u,"px ").concat(n,`; - } - - .`).concat(rf,` { - margin-right: `).concat(u,"px ").concat(n,`; - } - - .`).concat(tf," .").concat(tf,` { - right: 0 `).concat(n,`; - } - - .`).concat(rf," .").concat(rf,` { - margin-right: 0 `).concat(n,`; - } - - body[`).concat(ks,`] { - `).concat(kT,": ").concat(u,`px; - } -`)},Xw=function(){var e=parseInt(document.body.getAttribute(ks)||"0",10);return isFinite(e)?e:0},BT=function(){x.useEffect(function(){return document.body.setAttribute(ks,(Xw()+1).toString()),function(){var e=Xw()-1;e<=0?document.body.removeAttribute(ks):document.body.setAttribute(ks,e.toString())}},[])},UT=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;BT();var o=x.useMemo(function(){return $T(i)},[i]);return x.createElement(zT,{styles:FT(o,!t,i,r?"":"!important")})},wv=!1;if(typeof window<"u")try{var Md=Object.defineProperty({},"passive",{get:function(){return wv=!0,!0}});window.addEventListener("test",Md,Md),window.removeEventListener("test",Md,Md)}catch{wv=!1}var is=wv?{passive:!1}:!1,WT=function(e){return e.tagName==="TEXTAREA"},O5=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!WT(e)&&r[t]==="visible")},HT=function(e){return O5(e,"overflowY")},KT=function(e){return O5(e,"overflowX")},Jw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=_5(e,n);if(i){var o=M5(e,n),c=o[1],u=o[2];if(c>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},GT=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},VT=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},_5=function(e,t){return e==="v"?HT(t):KT(t)},M5=function(e,t){return e==="v"?GT(t):VT(t)},qT=function(e,t){return e==="h"&&t==="rtl"?-1:1},QT=function(e,t,r,n,i){var o=qT(e,window.getComputedStyle(t).direction),c=o*n,u=r.target,f=t.contains(u),h=!1,m=c>0,p=0,v=0;do{if(!u)break;var b=M5(e,u),S=b[0],w=b[1],k=b[2],N=w-k-o*S;(S||N)&&_5(e,u)&&(p+=N,v+=S);var E=u.parentNode;u=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(v)<1)&&(h=!0),h},Id=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ek=function(e){return[e.deltaX,e.deltaY]},tk=function(e){return e&&"current"in e?e.current:e},YT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ZT=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},XT=0,as=[];function JT(e){var t=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),i=x.useState(XT++)[0],o=x.useState(P5)[0],c=x.useRef(e);x.useEffect(function(){c.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=bT([e.lockRef.current],(e.shards||[]).map(tk),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=x.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!c.current.allowPinchZoom;var N=Id(w),E=r.current,C="deltaX"in w?w.deltaX:E[0]-N[0],A="deltaY"in w?w.deltaY:E[1]-N[1],_,O=w.target,I=Math.abs(C)>Math.abs(A)?"h":"v";if("touches"in w&&I==="h"&&O.type==="range")return!1;var B=window.getSelection(),F=B&&B.anchorNode,$=F?F===O||F.contains(O):!1;if($)return!1;var Q=Jw(I,O);if(!Q)return!0;if(Q?_=I:(_=I==="v"?"h":"v",Q=Jw(I,O)),!Q)return!1;if(!n.current&&"changedTouches"in w&&(C||A)&&(n.current=_),!_)return!0;var U=n.current||_;return QT(U,k,w,U==="h"?C:A)},[]),f=x.useCallback(function(w){var k=w;if(!(!as.length||as[as.length-1]!==o)){var N="deltaY"in k?ek(k):Id(k),E=t.current.filter(function(_){return _.name===k.type&&(_.target===k.target||k.target===_.shadowParent)&&YT(_.delta,N)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var C=(c.current.shards||[]).map(tk).filter(Boolean).filter(function(_){return _.contains(k.target)}),A=C.length>0?u(k,C[0]):!c.current.noIsolation;A&&k.cancelable&&k.preventDefault()}}},[]),h=x.useCallback(function(w,k,N,E){var C={name:w,delta:k,target:N,should:E,shadowParent:eD(N)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(A){return A!==C})},1)},[]),m=x.useCallback(function(w){r.current=Id(w),n.current=void 0},[]),p=x.useCallback(function(w){h(w.type,ek(w),w.target,u(w,e.lockRef.current))},[]),v=x.useCallback(function(w){h(w.type,Id(w),w.target,u(w,e.lockRef.current))},[]);x.useEffect(function(){return as.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",f,is),document.addEventListener("touchmove",f,is),document.addEventListener("touchstart",m,is),function(){as=as.filter(function(w){return w!==o}),document.removeEventListener("wheel",f,is),document.removeEventListener("touchmove",f,is),document.removeEventListener("touchstart",m,is)}},[]);var b=e.removeScrollBar,S=e.inert;return x.createElement(x.Fragment,null,S?x.createElement(o,{styles:ZT(i)}):null,b?x.createElement(UT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function eD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tD=PT(C5,JT);var I5=x.forwardRef(function(e,t){return x.createElement(xh,zn({},e,{ref:t,sideCar:tD}))});I5.classNames=xh.classNames;var rD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},os=new WeakMap,Td=new WeakMap,Dd={},mg=0,T5=function(e){return e&&(e.host||T5(e.parentNode))},nD=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=T5(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},iD=function(e,t,r,n){var i=nD(t,Array.isArray(e)?e:[e]);Dd[r]||(Dd[r]=new WeakMap);var o=Dd[r],c=[],u=new Set,f=new Set(i),h=function(p){!p||u.has(p)||(u.add(p),h(p.parentNode))};i.forEach(h);var m=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(v){if(u.has(v))m(v);else try{var b=v.getAttribute(n),S=b!==null&&b!=="false",w=(os.get(v)||0)+1,k=(o.get(v)||0)+1;os.set(v,w),o.set(v,k),c.push(v),w===1&&S&&Td.set(v,!0),k===1&&v.setAttribute(r,"true"),S||v.setAttribute(n,"true")}catch(N){console.error("aria-hidden: cannot operate on ",v,N)}})};return m(t),u.clear(),mg++,function(){c.forEach(function(p){var v=os.get(p)-1,b=o.get(p)-1;os.set(p,v),o.set(p,b),v||(Td.has(p)||p.removeAttribute(n),Td.delete(p)),b||p.removeAttribute(r)}),mg--,mg||(os=new WeakMap,os=new WeakMap,Td=new WeakMap,Dd={})}},aD=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=rD(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),iD(n,i,r,"aria-hidden")):function(){return null}},yh="Dialog",[D5]=II(yh),[oD,Sn]=D5(yh),R5=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:c=!0}=e,u=x.useRef(null),f=x.useRef(null),[h,m]=$I({prop:n,defaultProp:i??!1,onChange:o,caller:yh});return s.jsx(oD,{scope:t,triggerRef:u,contentRef:f,contentId:gi(),titleId:gi(),descriptionId:gi(),open:h,onOpenChange:m,onOpenToggle:x.useCallback(()=>m(p=>!p),[m]),modal:c,children:r})};R5.displayName=yh;var L5="DialogTrigger",sD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(L5,r),o=Ao(t,i.triggerRef);return s.jsx(Jt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Bx(i.open),...n,ref:o,onClick:xa(e.onClick,i.onOpenToggle)})});sD.displayName=L5;var Fx="DialogPortal",[lD,$5]=D5(Fx,{forceMount:void 0}),z5=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=Sn(Fx,t);return s.jsx(lD,{scope:t,forceMount:r,children:x.Children.map(n,c=>s.jsx(vh,{present:r||o.open,children:s.jsx(N5,{asChild:!0,container:i,children:c})}))})};z5.displayName=Fx;var mf="DialogOverlay",F5=x.forwardRef((e,t)=>{const r=$5(mf,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=Sn(mf,e.__scopeDialog);return o.modal?s.jsx(vh,{present:n||o.open,children:s.jsx(uD,{...i,ref:t})}):null});F5.displayName=mf;var cD=b5("DialogOverlay.RemoveScroll"),uD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(mf,r),o=iT(),c=Ao(t,o);return s.jsx(I5,{as:cD,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsx(Jt.div,{"data-state":Bx(i.open),...n,ref:c,style:{pointerEvents:"auto",...n.style}})})}),Hs="DialogContent",B5=x.forwardRef((e,t)=>{const r=$5(Hs,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=Sn(Hs,e.__scopeDialog);return s.jsx(vh,{present:n||o.open,children:o.modal?s.jsx(dD,{...i,ref:t}):s.jsx(fD,{...i,ref:t})})});B5.displayName=Hs;var dD=x.forwardRef((e,t)=>{const r=Sn(Hs,e.__scopeDialog),n=x.useRef(null),i=Ao(t,r.contentRef,n);return x.useEffect(()=>{const o=n.current;if(o)return aD(o)},[]),s.jsx(U5,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:xa(e.onCloseAutoFocus,o=>{var c;o.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:xa(e.onPointerDownOutside,o=>{const c=o.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&o.preventDefault()}),onFocusOutside:xa(e.onFocusOutside,o=>o.preventDefault())})}),fD=x.forwardRef((e,t)=>{const r=Sn(Hs,e.__scopeDialog),n=x.useRef(!1),i=x.useRef(!1);return s.jsx(U5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,o),o.defaultPrevented||(n.current||(u=r.triggerRef.current)==null||u.focus(),o.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:o=>{var f,h;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),U5=x.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...c}=e,u=Sn(Hs,r);return yT(),s.jsx(s.Fragment,{children:s.jsx(j5,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o,children:s.jsx(w5,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Bx(u.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})}),W5="DialogTitle",hD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(W5,r);return s.jsx(Jt.h2,{id:i.titleId,...n,ref:t})});hD.displayName=W5;var H5="DialogDescription",mD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(H5,r);return s.jsx(Jt.p,{id:i.descriptionId,...n,ref:t})});mD.displayName=H5;var K5="DialogClose",pD=x.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Sn(K5,r);return s.jsx(Jt.button,{type:"button",...n,ref:t,onClick:xa(e.onClick,()=>i.onOpenChange(!1))})});pD.displayName=K5;function Bx(e){return e?"open":"closed"}var nc='[cmdk-group=""]',pg='[cmdk-group-items=""]',gD='[cmdk-group-heading=""]',G5='[cmdk-item=""]',rk=`${G5}:not([aria-disabled="true"])`,kv="cmdk-item-select",vs="data-value",vD=(e,t,r)=>MI(e,t,r),V5=x.createContext(void 0),ru=()=>x.useContext(V5),q5=x.createContext(void 0),Ux=()=>x.useContext(q5),Q5=x.createContext(void 0),Y5=x.forwardRef((e,t)=>{let r=xs(()=>{var M,q;return{search:"",value:(q=(M=e.value)!=null?M:e.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=xs(()=>new Set),i=xs(()=>new Map),o=xs(()=>new Map),c=xs(()=>new Set),u=Z5(e),{label:f,children:h,value:m,onValueChange:p,filter:v,shouldFilter:b,loop:S,disablePointerSelection:w=!1,vimBindings:k=!0,...N}=e,E=gi(),C=gi(),A=gi(),_=x.useRef(null),O=CD();xo(()=>{if(m!==void 0){let M=m.trim();r.current.value=M,I.emit()}},[m]),xo(()=>{O(6,ge)},[]);let I=x.useMemo(()=>({subscribe:M=>(c.current.add(M),()=>c.current.delete(M)),snapshot:()=>r.current,setState:(M,q,le)=>{var oe,te,W,ne;if(!Object.is(r.current[M],q)){if(r.current[M]=q,M==="search")U(),$(),O(1,Q);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(A);J?J.focus():(oe=document.getElementById(E))==null||oe.focus()}if(O(7,()=>{var J;r.current.selectedItemId=(J=ue())==null?void 0:J.id,I.emit()}),le||O(5,ge),((te=u.current)==null?void 0:te.value)!==void 0){let J=q??"";(ne=(W=u.current).onValueChange)==null||ne.call(W,J);return}}I.emit()}},emit:()=>{c.current.forEach(M=>M())}}),[]),B=x.useMemo(()=>({value:(M,q,le)=>{var oe;q!==((oe=o.current.get(M))==null?void 0:oe.value)&&(o.current.set(M,{value:q,keywords:le}),r.current.filtered.items.set(M,F(q,le)),O(2,()=>{$(),I.emit()}))},item:(M,q)=>(n.current.add(M),q&&(i.current.has(q)?i.current.get(q).add(M):i.current.set(q,new Set([M]))),O(3,()=>{U(),$(),r.current.value||Q(),I.emit()}),()=>{o.current.delete(M),n.current.delete(M),r.current.filtered.items.delete(M);let le=ue();O(4,()=>{U(),(le==null?void 0:le.getAttribute("id"))===M&&Q(),I.emit()})}),group:M=>(i.current.has(M)||i.current.set(M,new Set),()=>{o.current.delete(M),i.current.delete(M)}),filter:()=>u.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:E,inputId:A,labelId:C,listInnerRef:_}),[]);function F(M,q){var le,oe;let te=(oe=(le=u.current)==null?void 0:le.filter)!=null?oe:vD;return M?te(M,r.current.search,q):0}function $(){if(!r.current.search||u.current.shouldFilter===!1)return;let M=r.current.filtered.items,q=[];r.current.filtered.groups.forEach(oe=>{let te=i.current.get(oe),W=0;te.forEach(ne=>{let J=M.get(ne);W=Math.max(J,W)}),q.push([oe,W])});let le=_.current;pe().sort((oe,te)=>{var W,ne;let J=oe.getAttribute("id"),xe=te.getAttribute("id");return((W=M.get(xe))!=null?W:0)-((ne=M.get(J))!=null?ne:0)}).forEach(oe=>{let te=oe.closest(pg);te?te.appendChild(oe.parentElement===te?oe:oe.closest(`${pg} > *`)):le.appendChild(oe.parentElement===le?oe:oe.closest(`${pg} > *`))}),q.sort((oe,te)=>te[1]-oe[1]).forEach(oe=>{var te;let W=(te=_.current)==null?void 0:te.querySelector(`${nc}[${vs}="${encodeURIComponent(oe[0])}"]`);W==null||W.parentElement.appendChild(W)})}function Q(){let M=pe().find(le=>le.getAttribute("aria-disabled")!=="true"),q=M==null?void 0:M.getAttribute(vs);I.setState("value",q||void 0)}function U(){var M,q,le,oe;if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let te=0;for(let W of n.current){let ne=(q=(M=o.current.get(W))==null?void 0:M.value)!=null?q:"",J=(oe=(le=o.current.get(W))==null?void 0:le.keywords)!=null?oe:[],xe=F(ne,J);r.current.filtered.items.set(W,xe),xe>0&&te++}for(let[W,ne]of i.current)for(let J of ne)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(W);break}r.current.filtered.count=te}function ge(){var M,q,le;let oe=ue();oe&&(((M=oe.parentElement)==null?void 0:M.firstChild)===oe&&((le=(q=oe.closest(nc))==null?void 0:q.querySelector(gD))==null||le.scrollIntoView({block:"nearest"})),oe.scrollIntoView({block:"nearest"}))}function ue(){var M;return(M=_.current)==null?void 0:M.querySelector(`${G5}[aria-selected="true"]`)}function pe(){var M;return Array.from(((M=_.current)==null?void 0:M.querySelectorAll(rk))||[])}function se(M){let q=pe()[M];q&&I.setState("value",q.getAttribute(vs))}function ae(M){var q;let le=ue(),oe=pe(),te=oe.findIndex(ne=>ne===le),W=oe[te+M];(q=u.current)!=null&&q.loop&&(W=te+M<0?oe[oe.length-1]:te+M===oe.length?oe[0]:oe[te+M]),W&&I.setState("value",W.getAttribute(vs))}function Z(M){let q=ue(),le=q==null?void 0:q.closest(nc),oe;for(;le&&!oe;)le=M>0?ED(le,nc):AD(le,nc),oe=le==null?void 0:le.querySelector(rk);oe?I.setState("value",oe.getAttribute(vs)):ae(M)}let re=()=>se(pe().length-1),ie=M=>{M.preventDefault(),M.metaKey?re():M.altKey?Z(1):ae(1)},D=M=>{M.preventDefault(),M.metaKey?se(0):M.altKey?Z(-1):ae(-1)};return x.createElement(Jt.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:M=>{var q;(q=N.onKeyDown)==null||q.call(N,M);let le=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||le))switch(M.key){case"n":case"j":{k&&M.ctrlKey&&ie(M);break}case"ArrowDown":{ie(M);break}case"p":case"k":{k&&M.ctrlKey&&D(M);break}case"ArrowUp":{D(M);break}case"Home":{M.preventDefault(),se(0);break}case"End":{M.preventDefault(),re();break}case"Enter":{M.preventDefault();let oe=ue();if(oe){let te=new Event(kv);oe.dispatchEvent(te)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:OD},f),bh(e,M=>x.createElement(q5.Provider,{value:I},x.createElement(V5.Provider,{value:B},M))))}),xD=x.forwardRef((e,t)=>{var r,n;let i=gi(),o=x.useRef(null),c=x.useContext(Q5),u=ru(),f=Z5(e),h=(n=(r=f.current)==null?void 0:r.forceMount)!=null?n:c==null?void 0:c.forceMount;xo(()=>{if(!h)return u.item(i,c==null?void 0:c.id)},[h]);let m=X5(i,o,[e.value,e.children,o],e.keywords),p=Ux(),v=ka(O=>O.value&&O.value===m.current),b=ka(O=>h||u.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);x.useEffect(()=>{let O=o.current;if(!(!O||e.disabled))return O.addEventListener(kv,S),()=>O.removeEventListener(kv,S)},[b,e.onSelect,e.disabled]);function S(){var O,I;w(),(I=(O=f.current).onSelect)==null||I.call(O,m.current)}function w(){p.setState("value",m.current,!0)}if(!b)return null;let{disabled:k,value:N,onSelect:E,forceMount:C,keywords:A,..._}=e;return x.createElement(Jt.div,{ref:Ws(o,t),..._,id:i,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!v,"data-disabled":!!k,"data-selected":!!v,onPointerMove:k||u.getDisablePointerSelection()?void 0:w,onClick:k?void 0:S},e.children)}),yD=x.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:i,...o}=e,c=gi(),u=x.useRef(null),f=x.useRef(null),h=gi(),m=ru(),p=ka(b=>i||m.filter()===!1?!0:b.search?b.filtered.groups.has(c):!0);xo(()=>m.group(c),[]),X5(c,u,[e.value,e.heading,f]);let v=x.useMemo(()=>({id:c,forceMount:i}),[i]);return x.createElement(Jt.div,{ref:Ws(u,t),...o,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&x.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),bh(e,b=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},x.createElement(Q5.Provider,{value:v},b))))}),bD=x.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=x.useRef(null),o=ka(c=>!c.search);return!r&&!o?null:x.createElement(Jt.div,{ref:Ws(i,t),...n,"cmdk-separator":"",role:"separator"})}),wD=x.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=e.value!=null,o=Ux(),c=ka(h=>h.search),u=ka(h=>h.selectedItemId),f=ru();return x.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),x.createElement(Jt.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":u,id:f.inputId,type:"text",value:i?e.value:c,onChange:h=>{i||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),kD=x.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,o=x.useRef(null),c=x.useRef(null),u=ka(h=>h.selectedItemId),f=ru();return x.useEffect(()=>{if(c.current&&o.current){let h=c.current,m=o.current,p,v=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let b=h.offsetHeight;m.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(p),v.unobserve(h)}}},[]),x.createElement(Jt.div,{ref:Ws(o,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":n,id:f.listId},bh(e,h=>x.createElement("div",{ref:Ws(c,f.listInnerRef),"cmdk-list-sizer":""},h)))}),jD=x.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:o,container:c,...u}=e;return x.createElement(R5,{open:r,onOpenChange:n},x.createElement(z5,{container:c},x.createElement(F5,{"cmdk-overlay":"",className:i}),x.createElement(B5,{"aria-label":e.label,"cmdk-dialog":"",className:o},x.createElement(Y5,{ref:t,...u}))))}),SD=x.forwardRef((e,t)=>ka(r=>r.filtered.count===0)?x.createElement(Jt.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),ND=x.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...o}=e;return x.createElement(Jt.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},bh(e,c=>x.createElement("div",{"aria-hidden":!0},c)))}),ss=Object.assign(Y5,{List:kD,Item:xD,Input:wD,Group:yD,Separator:bD,Dialog:jD,Empty:SD,Loading:ND});function ED(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function AD(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Z5(e){let t=x.useRef(e);return xo(()=>{t.current=e}),t}var xo=typeof window>"u"?x.useEffect:x.useLayoutEffect;function xs(e){let t=x.useRef();return t.current===void 0&&(t.current=e()),t}function ka(e){let t=Ux(),r=()=>e(t.snapshot());return x.useSyncExternalStore(t.subscribe,r,r)}function X5(e,t,r,n=[]){let i=x.useRef(),o=ru();return xo(()=>{var c;let u=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():i.current}})(),f=n.map(h=>h.trim());o.value(e,u,f),(c=t.current)==null||c.setAttribute(vs,u),i.current=u}),i}var CD=()=>{let[e,t]=x.useState(),r=xs(()=>new Map);return xo(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,i)=>{r.current.set(n,i),t({})}};function PD(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function bh({asChild:e,children:t},r){return e&&x.isValidElement(t)?x.cloneElement(PD(t),{ref:t.ref},r(t.props.children)):r(t)}var OD={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function _D({onNavigate:e}){const[t,r]=x.useState(!1);return x.useEffect(()=>{const n=i=>{(i.metaKey||i.ctrlKey)&&i.key.toLowerCase()==="k"&&(i.preventDefault(),r(o=>!o))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),s.jsx(ss.Dialog,{open:t,onOpenChange:r,label:"Befehlspalette",className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 p-4 pt-[12vh] overscroll-contain",onClick:()=>r(!1),children:s.jsxs("div",{className:"w-full max-w-lg overflow-hidden rounded-xl border border-border bg-popover text-popover-foreground shadow-2xl",onClick:n=>n.stopPropagation(),children:[s.jsx(ss.Input,{autoFocus:!0,placeholder:"Springe zu… (Modelle, Routing, System …)",className:"w-full border-b border-border bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"}),s.jsxs(ss.List,{className:"max-h-80 overflow-y-auto p-2",children:[s.jsx(ss.Empty,{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nichts gefunden."}),s.jsx(ss.Group,{heading:"Bereiche",className:"px-1 py-1 text-xs text-muted-foreground",children:gs.map(n=>s.jsxs(ss.Item,{value:`${n.label} ${n.hint}`,onSelect:()=>{e(n.id),r(!1)},className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground aria-selected:bg-accent aria-selected:text-accent-foreground",children:[s.jsx(n.icon,{className:"h-4 w-4 text-primary"}),s.jsx("span",{children:n.label}),s.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:n.hint})]},n.id))})]})]})})}const J5="mc_expert_mode",jv="mc-expert-mode-change",MD=()=>{try{return localStorage.getItem(J5)==="true"}catch{return!1}};function ID(e){return window.addEventListener(jv,e),window.addEventListener("storage",e),()=>{window.removeEventListener(jv,e),window.removeEventListener("storage",e)}}function nk(e){localStorage.setItem(J5,String(e)),window.dispatchEvent(new Event(jv))}function Wx(){return x.useSyncExternalStore(ID,MD,()=>!1)}function eE(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=RD(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:c=>{const u=c.split(Hx);return u[0]===""&&u.length!==1&&u.shift(),tE(u,t)||DD(c)},getConflictingClassGroupIds:(c,u)=>{const f=r[c]||[];return u&&n[c]?[...f,...n[c]]:f}}},tE=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?tE(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Hx);return(c=t.validators.find(({validator:u})=>u(o)))==null?void 0:c.classGroupId},ik=/^\[(.+)\]$/,DD=e=>{if(ik.test(e)){const t=ik.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},RD=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return $D(Object.entries(e.classGroups),r).forEach(([o,c])=>{Sv(c,n,o,t)}),n},Sv=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:ak(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(LD(i)){Sv(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,c])=>{Sv(c,ak(t,o),r,n)})})},ak=(e,t)=>{let r=e;return t.split(Hx).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},LD=e=>e.isThemeGetter,$D=(e,t)=>t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([c,u])=>[t+c,u])):o);return[r,i]}):e,zD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(o,c)=>{r.set(o,c),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let c=r.get(o);if(c!==void 0)return c;if((c=n.get(o))!==void 0)return i(o,c),c},set(o,c){r.has(o)?r.set(o,c):i(o,c)}}},rE="!",FD=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],o=t.length,c=u=>{const f=[];let h=0,m=0,p;for(let k=0;km?p-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:w}};return r?u=>r({className:u,parseClassName:c}):c},BD=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},UD=e=>({cache:zD(e.cacheSize),parseClassName:FD(e),...TD(e)}),WD=/\s+/,HD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=[],c=e.trim().split(WD);let u="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{modifiers:m,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:b}=r(h);let S=!!b,w=n(S?v.substring(0,b):v);if(!w){if(!S){u=h+(u.length>0?" "+u:u);continue}if(w=n(v),!w){u=h+(u.length>0?" "+u:u);continue}S=!1}const k=BD(m).join(":"),N=p?k+rE:k,E=N+w;if(o.includes(E))continue;o.push(E);const C=i(w,S);for(let A=0;A0?" "+u:u)}return u};function KD(){let e=0,t,r,n="";for(;e{if(typeof e=="string")return e;let t,r="";for(let n=0;np(m),e());return r=UD(h),n=r.cache.get,i=r.cache.set,o=u,u(f)}function u(f){const h=n(f);if(h)return h;const m=HD(f,r);return i(f,m),m}return function(){return o(KD.apply(null,arguments))}}const st=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},iE=/^\[(?:([a-z-]+):)?(.+)\]$/i,VD=/^\d+\/\d+$/,qD=new Set(["px","full","screen"]),QD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YD=/\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$/,ZD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,JD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,si=e=>js(e)||qD.has(e)||VD.test(e),Xi=e=>il(e,"length",sR),js=e=>!!e&&!Number.isNaN(Number(e)),gg=e=>il(e,"number",js),ic=e=>!!e&&Number.isInteger(Number(e)),eR=e=>e.endsWith("%")&&js(e.slice(0,-1)),ze=e=>iE.test(e),Ji=e=>QD.test(e),tR=new Set(["length","size","percentage"]),rR=e=>il(e,tR,aE),nR=e=>il(e,"position",aE),iR=new Set(["image","url"]),aR=e=>il(e,iR,cR),oR=e=>il(e,"",lR),ac=()=>!0,il=(e,t,r)=>{const n=iE.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},sR=e=>YD.test(e)&&!ZD.test(e),aE=()=>!1,lR=e=>XD.test(e),cR=e=>JD.test(e),uR=()=>{const e=st("colors"),t=st("spacing"),r=st("blur"),n=st("brightness"),i=st("borderColor"),o=st("borderRadius"),c=st("borderSpacing"),u=st("borderWidth"),f=st("contrast"),h=st("grayscale"),m=st("hueRotate"),p=st("invert"),v=st("gap"),b=st("gradientColorStops"),S=st("gradientColorStopPositions"),w=st("inset"),k=st("margin"),N=st("opacity"),E=st("padding"),C=st("saturate"),A=st("scale"),_=st("sepia"),O=st("skew"),I=st("space"),B=st("translate"),F=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",ze,t],U=()=>[ze,t],ge=()=>["",si,Xi],ue=()=>["auto",js,ze],pe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",ze],ie=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[js,ze];return{cacheSize:500,separator:":",theme:{colors:[ac],spacing:[si,Xi],blur:["none","",Ji,ze],brightness:D(),borderColor:[e],borderRadius:["none","","full",Ji,ze],borderSpacing:U(),borderWidth:ge(),contrast:D(),grayscale:re(),hueRotate:D(),invert:re(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[eR,Xi],inset:Q(),margin:Q(),opacity:D(),padding:U(),saturate:D(),scale:D(),sepia:re(),skew:D(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",ze]}],container:["container"],columns:[{columns:[Ji]}],"break-after":[{"break-after":ie()}],"break-before":[{"break-before":ie()}],"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"],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:[...pe(),ze]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ic,ze]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ze]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",ic,ze]}],"grid-cols":[{"grid-cols":[ac]}],"col-start-end":[{col:["auto",{span:["full",ic,ze]},ze]}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":[ac]}],"row-start-end":[{row:["auto",{span:[ic,ze]},ze]}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ze]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ze,t]}],"min-w":[{"min-w":[ze,t,"min","max","fit"]}],"max-w":[{"max-w":[ze,t,"none","full","min","max","fit","prose",{screen:[Ji]},Ji]}],h:[{h:[ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ji,Xi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gg]}],"font-family":[{font:[ac]}],"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:["tighter","tight","normal","wide","wider","widest",ze]}],"line-clamp":[{"line-clamp":["none",js,gg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",si,ze]}],"list-image":[{"list-image":["none",ze]}],"list-style-type":[{list:["none","disc","decimal",ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",si,Xi]}],"underline-offset":[{"underline-offset":["auto",si,ze]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...pe(),nR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},aR]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:se()}],"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-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:["",...se()]}],"outline-offset":[{"outline-offset":[si,ze]}],"outline-w":[{outline:[si,Xi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[si,Xi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ji,oR]}],"shadow-color":[{shadow:[ac]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...ae(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ae()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Ji,ze]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[p]}],saturate:[{saturate:[C]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ze]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",ze]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[ic,ze]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ze]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ze]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",ze]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[si,Xi,gg]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},dR=GD(uR);function ee(...e){return dR(nt(e))}function Nv(e){return e?e.replace(/127\.0\.0\.1|localhost/g,"192.168.178.151"):""}function oE(){const e=Wx();return s.jsxs("div",{className:"flex items-center rounded-md border border-border/40 bg-background/40 p-0.5",role:"group","aria-label":"Ansichtsmodus",title:"Einfach zeigt nur das Wichtigste. Experte zeigt alle technischen Details.",children:[s.jsxs("button",{onClick:()=>nk(!1),"aria-pressed":!e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-primary shadow-sm"),children:[s.jsx(va,{className:"h-3.5 w-3.5"})," Einfach"]}),s.jsxs("button",{onClick:()=>nk(!0),"aria-pressed":e,className:ee("flex items-center gap-1 rounded px-2 py-1 text-xs font-semibold transition-all cursor-pointer",e?"bg-primary/15 text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),children:[s.jsx(yI,{className:"h-3.5 w-3.5"})," Experte"]})]})}async function ye(e,t){var f;const r={"Content-Type":"application/json",...t==null?void 0:t.headers},n=localStorage.getItem("mc_sudo_password"),i=localStorage.getItem("mc_hf_token");n&&(r["X-Sudo-Password"]=n);let o=t==null?void 0:t.body;if((((f=t==null?void 0:t.method)==null?void 0:f.toUpperCase())||"GET")==="POST"){if(typeof o=="string")try{const h=JSON.parse(o);let m=!1;n&&!("sudo_password"in h)&&(h.sudo_password=n,m=!0),i&&!("hf_token"in h)&&(h.hf_token=i,m=!0),m&&(o=JSON.stringify(h))}catch{}else if(!o){const h={};n&&(h.sudo_password=n),i&&(h.hf_token=i),Object.keys(h).length>0&&(o=JSON.stringify(h))}}const u=await fetch(e,{...t,headers:r,body:o});if(!u.ok)throw new Error(`${u.status} ${u.statusText}`);return u.json()}const sE=(e,t,r=!1,n=!0)=>ye("/api/groups",{method:"PUT",body:JSON.stringify({group:e,members:t,swap:r,persist:n})}),fR=e=>ye("/api/routing/policy",{method:"PUT",body:JSON.stringify(e)}),$e={health:["health"],systemStatus:["system-status"],services:["services"],models:["models"],groups:["groups"],routing:["routing"],routingPolicy:["routing-policy"],jobs:["jobs"],tokenStats:["token-stats"],agentStatus:["agent-status"],hermesBrain:["hermes-brain"],updates:["updates"],discover:["discover"],drafts:e=>["drafts",e??""],connect:e=>["connect",e??""],connectHealth:["connect-health"],memory:(e,t)=>["memory",e??"",t??""],memoryGraph:["memory-graph"],voiceTrace:["voice-trace"],auftragsbuch:["auftragsbuch"],chronik:["chronik"],wissen:["wissen"],zeitmaschine:["zeitmaschine"],reminders:["reminders"]},lE=(e=8e3)=>gt({queryKey:$e.auftragsbuch,queryFn:()=>ye("/api/auftragsbuch"),refetchInterval:e}),cE=(e=150,t=15e3)=>gt({queryKey:$e.chronik,queryFn:()=>ye(`/api/chronik?limit=${e}`),refetchInterval:t,select:r=>r.items??[]}),hR=()=>gt({queryKey:$e.wissen,queryFn:()=>ye("/api/wissen")}),mR=(e=3e4)=>gt({queryKey:$e.zeitmaschine,queryFn:()=>ye("/api/zeitmaschine"),refetchInterval:e}),pR=(e=2e4)=>gt({queryKey:$e.reminders,queryFn:()=>ye("/api/reminders"),refetchInterval:e,select:t=>t.items??[]}),gR=(e=12,t=4e3)=>gt({queryKey:$e.voiceTrace,queryFn:()=>ye(`/api/voice/trace?limit=${e}`),refetchInterval:t,select:r=>r.turns??[]}),vR=(e=!0)=>gt({queryKey:$e.memoryGraph,queryFn:()=>ye("/api/memory/graph"),enabled:e}),Kx=()=>gt({queryKey:$e.health,queryFn:()=>ye("/api/health"),refetchInterval:1e4}),Co=(e=5e3)=>gt({queryKey:$e.systemStatus,queryFn:()=>ye("/api/system/status"),refetchInterval:e}),uE=(e=3e3)=>gt({queryKey:$e.services,queryFn:()=>ye("/api/system/services"),refetchInterval:e}),Si=(e=4e3)=>gt({queryKey:$e.models,queryFn:()=>ye("/api/models"),refetchInterval:e}),Gx=(e=8e3)=>gt({queryKey:$e.groups,queryFn:()=>ye("/api/groups"),refetchInterval:e}),xR=()=>gt({queryKey:$e.routingPolicy,queryFn:()=>ye("/api/routing/policy")}),yR=(e=2e3)=>gt({queryKey:$e.jobs,queryFn:()=>ye("/api/jobs"),refetchInterval:e,select:t=>t.jobs??[]}),dE=(e=3e3)=>gt({queryKey:$e.tokenStats,queryFn:()=>ye("/api/system/token-stats"),refetchInterval:e}),Vx=(e=5e3)=>gt({queryKey:$e.agentStatus,queryFn:()=>ye("/api/agent/status"),refetchInterval:e}),fE=(e=6e4)=>gt({queryKey:$e.hermesBrain,queryFn:()=>ye("/api/agent/brain"),refetchInterval:e}),wh=e=>gt({queryKey:$e.updates,queryFn:()=>ye("/api/maintenance/updates"),refetchInterval:e}),bR=()=>gt({queryKey:$e.discover,queryFn:()=>ye("/api/discover")}),wR=e=>gt({queryKey:$e.drafts(e),queryFn:()=>ye(`/api/models/drafts?target=${encodeURIComponent(e??"")}`),enabled:!!e}),kR=e=>gt({queryKey:$e.connect(e),queryFn:()=>ye(e?`/api/connect?${e}`:"/api/connect")}),hE=()=>gt({queryKey:$e.connectHealth,queryFn:()=>ye("/api/connect/health"),refetchInterval:15e3}),Ev=e=>gt({queryKey:$e.memory(e==null?void 0:e.q,e==null?void 0:e.category),queryFn:()=>{const t=new URLSearchParams;return e!=null&&e.q&&t.set("q",e.q),e!=null&&e.category&&t.set("category",e.category),ye(`/api/memory?${t}`)},select:t=>e!=null&&e.limit?t.slice(0,e.limit):t});function mE({type:e,title:t,message:r,defaultValue:n,autoValue:i,autoLabel:o,onConfirm:c,onCancel:u}){const f=x.useRef(null);return s.jsx("div",{className:"fixed inset-0 z-[99] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":t,children:s.jsxs("div",{className:"w-full max-w-sm rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:t}),s.jsx("button",{onClick:u||(()=>c()),"aria-label":"Schließen",className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.jsx("p",{className:"max-h-72 overflow-y-auto whitespace-pre-line text-xs text-muted-foreground leading-relaxed scrollbar-thin",children:r}),e==="prompt"&&s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{ref:f,type:"text",defaultValue:n,"aria-label":t,className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground",autoFocus:!0,onKeyDown:h=>{var m;h.key==="Enter"&&c((m=f.current)==null?void 0:m.value)}}),i!==void 0&&s.jsx("button",{type:"button",onClick:()=>{f.current&&(f.current.value=i)},title:"Setup-bewussten Optimalwert eintragen",className:"h-9 px-3 shrink-0 text-xs font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg transition-colors cursor-pointer",children:o||"Auto"})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[(e==="confirm"||e==="prompt")&&s.jsx("button",{onClick:u,className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Abbrechen"}),s.jsx("button",{onClick:()=>{var m;const h=e==="prompt"?(m=f.current)==null?void 0:m.value:void 0;c(h)},className:"h-8 px-4 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/95 rounded-lg transition-colors cursor-pointer",children:e==="confirm"?"Ja, fortfahren":e==="prompt"?"Übernehmen":"OK"})]})]})})}function Nn(){const[e,t]=x.useState(null),r=x.useCallback(()=>t(null),[]),n=x.useCallback((u,f,h)=>{t({type:"alert",title:u,message:f,onConfirm:()=>{t(null),h==null||h()}})},[]),i=x.useCallback((u,f,h,m)=>{t({type:"confirm",title:u,message:f,onConfirm:()=>{t(null),h()},onCancel:()=>{t(null),m==null||m()}})},[]),o=x.useCallback((u,f,h,m,p,v)=>{t({type:"prompt",title:u,message:f,defaultValue:h,autoValue:v==null?void 0:v.autoValue,autoLabel:v==null?void 0:v.autoLabel,onConfirm:b=>{t(null),m(b)},onCancel:()=>{t(null),p==null||p()}})},[]),c=e?s.jsx(mE,{...e}):null;return{showAlert:n,showConfirm:i,showPrompt:o,close:r,dialogElement:c}}function Jr(e){return(e/1024**3).toFixed(1)}function Av(e){return e?e>1024**3?`${(e/1024**3).toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`:""}function lr(e){if(!e)return"—";const t=e/1024**3;return t>=1?`${t.toFixed(1)} GB`:`${(e/1024**2).toFixed(0)} MB`}function jR(e){if(!e)return"";const t=Math.floor(e/60);return t>0?`${t} min`:`${e} s`}function Cv(e){return e?`${Math.round(e/1024)}k`:"—"}function SR(){const e=Hr(),{data:t=[]}=yR(2e3),{showAlert:r,dialogElement:n}=Nn();async function i(u){try{await ye(`/api/jobs/${u}/cancel`,{method:"POST"}),e.invalidateQueries({queryKey:$e.jobs})}catch(f){r("Fehler",f.message)}}const o=t.filter(u=>u.state==="running"||u.state==="queued"),c=t.filter(u=>u.state!=="running"&&u.state!=="queued").slice(-3);return o.length===0&&c.length===0?null:s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-4 shadow-lg shadow-black/10",children:[s.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Aktive Downloads"}),o.map(u=>s.jsxs("div",{className:"space-y-1.5 p-3 rounded-xl bg-background/20 border border-border/40",children:[s.jsxs("div",{className:"flex justify-between items-center text-xs",children:[s.jsx("span",{className:"font-semibold truncate max-w-[250px]",children:u.label}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-muted-foreground font-mono",children:[u.progress??0,"% • ",Av(u.done_bytes),"/",Av(u.total_bytes),u.eta_s?` • ETA ${jR(u.eta_s)}`:""]}),s.jsx("button",{onClick:()=>i(u.id),className:"text-[10px] text-red-400 hover:text-red-300 font-semibold border border-red-500/25 bg-red-500/5 px-2 py-0.5 rounded transition-all cursor-pointer",children:"Abbrechen"})]})]}),s.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${u.progress??0}%`}})})]},u.id)),c.map(u=>s.jsxs("div",{className:"flex justify-between items-center text-xs text-muted-foreground px-1",children:[s.jsx("span",{className:"truncate",children:u.label}),s.jsx("span",{className:ee("font-semibold text-[10px] px-1.5 py-0.5 rounded uppercase font-mono",u.state==="done"?"bg-emerald-500/10 text-emerald-400":"bg-amber-500/10 text-amber-400"),children:u.state})]},u.id)),n]})}function Fa({children:e,tone:t="muted"}){const r={muted:"bg-muted text-muted-foreground",primary:"bg-primary/15 text-primary",warn:"bg-amber-500/15 text-amber-500"};return s.jsx("span",{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${r[t]}`,children:e})}function Pv({caps:e}){return e?s.jsxs("span",{className:"inline-flex flex-wrap gap-1",children:[e.coder&&s.jsx(Fa,{children:"💻 Code"}),e.vision&&s.jsx(Fa,{children:"👁 Bild"}),e.reasoning&&s.jsx(Fa,{children:"🧠 Reason"}),e.moe&&s.jsxs(Fa,{tone:"primary",children:["🧩 MoE",e.active_b?`·${e.active_b}b`:""]}),e.tools==="yes"&&s.jsx(Fa,{tone:"primary",children:"🛠 Tools"}),e.tools==="likely"&&s.jsx(Fa,{tone:"warn",children:"🛠 Tools?"}),e.embedding&&s.jsx(Fa,{children:"🔢 Embed"})]}):null}const qx=[{role:"hermes",label:"Lucys Hirn",short:"Hirn",icon:Sa,desc:"Lucys Alltags-Verstand — denkt und redet mit dir. Immer bereit.",tone:"bg-indigo-500/15 text-indigo-400 border-indigo-500/25",protected:!0},{role:"embed",label:"Lucys Gedächtnis",short:"Gedächtnis",icon:t5,desc:"Merkt sich Wichtiges und findet es später wieder.",tone:"bg-emerald-500/15 text-emerald-400 border-emerald-500/25",protected:!0},{role:"reranker",label:"Gedächtnis-Sortierer",short:"Sortierer",icon:aI,desc:"Ordnet gefundene Erinnerungen nach echter Relevanz — die Feinsortierung hinter dem Gedächtnis.",tone:"bg-lime-500/15 text-lime-400 border-lime-500/25"},{role:"vision",label:"Lucys Augen",short:"Augen",icon:Cc,desc:"Sieht Bilder und Screenshots und beschreibt, was drauf ist.",tone:"bg-pink-500/15 text-pink-400 border-pink-500/25"},{role:"heavy",label:"Großes Hirn",short:"Groß",icon:LM,desc:"Das schwere Geschütz — wird für besonders knifflige Fragen dazugeholt.",tone:"bg-amber-500/15 text-amber-400 border-amber-500/25"},{role:"coder-lite",label:"Programmierer (schnell)",short:"Code schnell",icon:Fs,desc:"Schnelles Programmieren im Alltag.",tone:"bg-violet-500/15 text-violet-400 border-violet-500/25"},{role:"coder",label:"Programmierer (gründlich)",short:"Code gründlich",icon:Fs,desc:"Schreibt und prüft Code besonders sorgfältig — für schwere Coding-Aufgaben.",tone:"bg-fuchsia-500/15 text-fuchsia-400 border-fuchsia-500/25"},{role:"scout",label:"Späher",short:"Späher",icon:kI,desc:"Schneller erster Blick und grobe Einschätzung.",tone:"bg-teal-500/15 text-teal-400 border-teal-500/25"},{role:"kritiker",label:"Kritiker",short:"Kritiker",icon:m5,desc:"Die unbestechliche Zweitmeinung — prüft Behauptungen und Patches (anderer Hersteller als das Hirn).",tone:"bg-cyan-500/15 text-cyan-400 border-cyan-500/25"}],NR=qx.map(e=>e.role),ok=Object.fromEntries(qx.map(e=>[e.role,e])),sk=e=>({role:e||"?",label:e||"unbekannt",short:e||"?",icon:Sa,desc:"Rolle ohne hinterlegten Klartext-Namen.",tone:"bg-slate-500/15 text-slate-300 border-slate-500/25"}),ER={fast:"hermes",coder_lite:"coder-lite"};function dt(e){return e&&(ok[e]||ok[ER[e]])||sk(e)}function mo({role:e,dense:t=!1,className:r}){const n=dt(e),i=n.icon;return s.jsxs("span",{className:ee("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-semibold border tracking-wide",n.tone,r),title:`${n.desc} (${n.role})`,children:[s.jsx(i,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),t?n.short:n.label]})}function AR({fit:e}){const t={perfect:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/20",marginal:"bg-amber-500/15 text-amber-400 border border-amber-500/20",too_tight:"bg-red-500/15 text-red-400 border border-red-500/20"}[e.level];return s.jsxs("span",{className:ee("rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider font-mono",t),children:[e.text," • ",e.req_gb," GB RAM"]})}function pf(e){const t=e.toLowerCase();return t.includes("qwen")?{name:"Qwen",color:"bg-purple-500/20 text-purple-300 border-purple-500/30",initial:"Q"}:t.includes("gemma")?{name:"Gemma",color:"bg-blue-500/20 text-blue-300 border-blue-500/30",initial:"G"}:t.includes("llama")?{name:"Llama",color:"bg-red-500/20 text-red-300 border-red-500/30",initial:"🦙"}:t.includes("mistral")||t.includes("mixtral")?{name:"Mistral",color:"bg-orange-500/20 text-orange-300 border-orange-500/30",initial:"M"}:t.includes("deepseek")?{name:"DeepSeek",color:"bg-cyan-500/20 text-cyan-300 border-cyan-500/30",initial:"D"}:t.includes("hermes")||t.includes("nous")?{name:"Hermes",color:"bg-amber-500/20 text-amber-300 border-amber-500/30",initial:"H"}:t.includes("phi")?{name:"Phi",color:"bg-emerald-500/20 text-emerald-300 border-emerald-500/30",initial:"Φ"}:{name:"Other",color:"bg-slate-500/20 text-slate-300 border-slate-500/30",initial:"AI"}}function pE({model:e,onClose:t,onChanged:r}){var w,k;const{data:n,isLoading:i}=wR(e.gguf_path),[o,c]=x.useState(null),[u,f]=x.useState(""),h=n==null?void 0:n.target_vocab,m=(n==null?void 0:n.drafts)??[],p=m.filter(N=>N.compatible===!0),v=e.spec_draft_model;async function b(N){c(N??"__clear__"),f("");try{await ye(`/api/models/${encodeURIComponent(e.name)}/draft`,{method:"POST",body:JSON.stringify({draft_path:N})}),r(),t()}catch(E){f(String((E==null?void 0:E.message)||E)),c(null)}}const S=N=>{var E;return N?`${N.pre??"?"} · ${((E=N.n_vocab)==null?void 0:E.toLocaleString())??"?"} Tokens`:"—"};return s.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",children:s.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-2",children:[s.jsx(wa,{className:"h-4 w-4"})," Speculative Draft"]}),s.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"text-xs text-muted-foreground leading-relaxed",children:['Beschleunigt die Token-Generierung mit einem kleinen "Draft"-Modell. Voraussetzung: der Draft muss den ',s.jsx("strong",{className:"text-foreground",children:"exakt gleichen Tokenizer (Vocab)"})," haben wie das Modell — sonst lehnt llama.cpp es ab."]}),s.jsxs("div",{className:"rounded-lg border border-border/40 bg-background/30 px-3 py-2 text-[11px] font-mono flex items-center justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:(w=e.name.split("/").pop())==null?void 0:w.replace(/\.gguf$/i,"")}),s.jsxs("span",{className:"text-foreground",children:["Vocab: ",S(h)]})]}),e.spec_active&&v&&s.jsxs("div",{className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 flex items-center justify-between gap-2",children:[s.jsxs("span",{className:"text-[11px] text-emerald-400 font-mono flex items-center gap-1.5 truncate",children:[s.jsx(Mt,{className:"h-3.5 w-3.5 shrink-0"})," Aktiv: ",v]}),s.jsx("button",{onClick:()=>b(null),disabled:o!==null,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Deaktivieren"})]}),!(n!=null&&n.target_exists)&&s.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 flex items-center gap-2",children:[s.jsx(vr,{className:"h-3.5 w-3.5 shrink-0"}),"Modell-GGUF noch nicht vorhanden — Spec-Draft ist nach dem Download konfigurierbar."]}),s.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto pr-1",children:i?s.jsx("div",{className:"text-xs text-muted-foreground py-6 text-center",children:"Prüfe Vocab-Kompatibilität…"}):m.length===0?s.jsxs("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/50 rounded-lg p-4 text-center",children:["Keine Draft-Modelle in ",s.jsx("code",{className:"font-mono",children:"/srv/models/drafts"}),". Lade ein kleines same-family-Modell (z.B. Qwen3-0.6B) und lege es dort ab."]}):m.map(N=>{var A,_;const E=N.filename===v,C=N.compatible===!0;return s.jsxs("div",{className:ee("rounded-lg border px-3 py-2 flex items-center justify-between gap-2 text-left",C?"border-border/40 bg-background/20":"border-border/20 bg-background/10 opacity-60",E&&"border-primary/40 bg-primary/10"),children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"text-[11px] font-mono font-semibold text-foreground truncate flex items-center gap-1.5",children:[N.filename,N.mtp&&s.jsx("span",{className:"shrink-0 rounded bg-indigo-500/15 px-1.5 py-0.5 text-[8px] font-bold uppercase tracking-wider text-indigo-400 border border-indigo-500/25",title:"MTP-Kopf (Multi-Token-Prediction) — by-construction vocab-identisch, höchste Akzeptanzrate",children:"MTP"})]}),s.jsxs("div",{className:"text-[9px] text-muted-foreground font-mono",children:[lr(N.size_bytes)," · Vocab: ",S(N.vocab)]})]}),C?E?s.jsxs("span",{className:"text-[9px] font-bold uppercase text-primary flex items-center gap-1 shrink-0",children:[s.jsx(Mt,{className:"h-3.5 w-3.5"})," Aktiv"]}):s.jsx("button",{onClick:()=>b(N.path),disabled:o!==null,className:"h-7 px-3 rounded-lg border border-emerald-500/30 bg-emerald-500/5 hover:bg-emerald-500/15 text-emerald-400 text-[9px] font-bold uppercase shrink-0 cursor-pointer disabled:opacity-50",children:"Aktivieren"}):s.jsxs("span",{className:"text-[9px] font-bold uppercase text-amber-400/80 flex items-center gap-1 shrink-0",title:N.compatible===!1?`Inkompatibel: Tokenizer/Vocab weicht ab (Draft ${(A=N.vocab)==null?void 0:A.pre}/${(_=N.vocab)==null?void 0:_.n_vocab} ≠ Modell ${h==null?void 0:h.pre}/${h==null?void 0:h.n_vocab}).`:"Kompatibilität nicht prüfbar (Datei fehlt).",children:[s.jsx(vr,{className:"h-3.5 w-3.5"})," ",N.compatible===!1?"Vocab ≠":"n/a"]})]},N.path)})}),!i&&(n==null?void 0:n.target_exists)&&m.length>0&&p.length===0&&s.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-[11px] text-amber-400 leading-relaxed",children:["Kein vocab-kompatibler Draft verfügbar — Speculative Decoding ist für dieses Modell nicht möglich. Es braucht einen Draft mit identischem Tokenizer (pre=",s.jsx("span",{className:"font-mono",children:h==null?void 0:h.pre}),", n_vocab=",s.jsx("span",{className:"font-mono",children:(k=h==null?void 0:h.n_vocab)==null?void 0:k.toLocaleString()}),")."]}),u&&s.jsx("div",{className:"text-[10px] text-red-400 font-mono",children:u})]})})}const lk={hermes:{bar:"bg-indigo-500",dot:"bg-indigo-500",text:"text-indigo-400"},embed:{bar:"bg-emerald-500",dot:"bg-emerald-500",text:"text-emerald-400"},vision:{bar:"bg-pink-500",dot:"bg-pink-500",text:"text-pink-400"},heavy:{bar:"bg-amber-500",dot:"bg-amber-500",text:"text-amber-400"},"coder-lite":{bar:"bg-violet-500",dot:"bg-violet-500",text:"text-violet-400"},coder:{bar:"bg-fuchsia-500",dot:"bg-fuchsia-500",text:"text-fuchsia-400"},scout:{bar:"bg-teal-500",dot:"bg-teal-500",text:"text-teal-400"},kritiker:{bar:"bg-cyan-500",dot:"bg-cyan-500",text:"text-cyan-400"},reranker:{bar:"bg-lime-500",dot:"bg-lime-500",text:"text-lime-400"}},CR={fast:"hermes",coder_lite:"coder-lite"},ck={bar:"bg-slate-400",dot:"bg-slate-400",text:"text-slate-300"};function gf(e){return e&&(lk[e]||lk[CR[e]])||ck}const uk=1024**3,dk=e=>{var t;return((t=e.split("/").pop())==null?void 0:t.replace(/\.gguf$/i,""))??e};function PR({running:e,capacityBytes:t,realUsedBytes:r,selected:n,onSelect:i}){const o=t>2*uk?t:124*uk,c=e.reduce((h,m)=>h+(m.size_bytes||0),0),u=Math.max(0,o-c),f=u/o*100;return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("div",{className:"mb-3 flex flex-wrap items-end justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ga,{className:"h-5 w-5 text-primary"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Arbeitsspeicher"}),s.jsxs("div",{className:"font-space text-xl font-bold tracking-tight text-foreground",children:[Jr(o)," GB ",s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"gesamt"})]})]})]}),s.jsxs("div",{className:"text-right text-[11px] font-mono text-muted-foreground",children:[s.jsxs("div",{children:[s.jsxs("span",{className:"font-bold text-foreground",children:[Jr(c)," GB"]})," Modelle geladen"]}),r>0&&s.jsxs("div",{children:[Jr(r)," GB real belegt (inkl. KV-Cache)"]}),s.jsxs("div",{className:"text-emerald-400",children:[Jr(u)," GB frei"]})]})]}),s.jsx("div",{className:"flex h-12 w-full overflow-hidden rounded-xl border border-border/40 bg-background/50 p-1",children:e.length===0?s.jsx("div",{className:"flex w-full items-center justify-center text-[11px] italic text-muted-foreground/60",children:"Kein Modell geladen — Auto-Swap holt bei Anfrage automatisch das passende."}):s.jsxs(s.Fragment,{children:[e.map(h=>{const m=(h.size_bytes||0)/o*100,p=gf(h.role),v=n===h.name;return s.jsxs("button",{onClick:()=>i==null?void 0:i(h.name),style:{width:`${m}%`},title:`${dt(h.role).label} · ${dk(h.name)} · ${lr(h.size_bytes)}`,className:ee("group flex h-full min-w-[2.5rem] shrink-0 flex-col justify-center gap-0.5 rounded-lg px-2 text-left text-white transition-all",p.bar,v?"ring-2 ring-white/70":"opacity-90 hover:opacity-100"),children:[s.jsx("span",{className:"truncate font-space text-[10px] font-bold leading-tight tracking-wide",children:dt(h.role).short}),s.jsx("span",{className:"truncate font-mono text-[9px] leading-tight opacity-85",children:lr(h.size_bytes)})]},h.name)}),f>1.5&&s.jsx("div",{style:{width:`${f}%`},className:"flex h-full min-w-[2rem] items-center justify-center rounded-lg text-[9px] font-mono text-muted-foreground/50",title:`${Jr(u)} GB frei`,children:"frei"})]})}),e.length>0&&s.jsxs("div",{className:"mt-3 flex flex-wrap gap-x-4 gap-y-1.5",children:[e.map(h=>{const m=gf(h.role);return s.jsxs("button",{onClick:()=>i==null?void 0:i(h.name),className:"flex items-center gap-1.5 text-[11px] text-muted-foreground transition-colors hover:text-foreground",children:[s.jsx("span",{className:ee("h-2.5 w-2.5 rounded-sm",m.dot)}),s.jsx("span",{className:ee("font-semibold",m.text),children:dt(h.role).short}),s.jsx("span",{className:"font-mono text-muted-foreground/70",children:dk(h.name)})]},h.name)}),s.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground/60",children:[s.jsx("span",{className:"h-2.5 w-2.5 rounded-sm border border-border/50 bg-background/50"})," frei · ",Jr(u)," GB"]})]})]})}const fk=1024**3,Ga=e=>{var t;return((t=e.split("/").pop())==null?void 0:t.replace(/\.gguf$/i,""))??e};function OR(){var M,q,le,oe;const e=Hr(),{data:t,isLoading:r,error:n}=Si(4e3),{data:i}=Co(),{data:o}=Gx(),{showAlert:c,showConfirm:u,showPrompt:f,dialogElement:h}=Nn(),m=Wx(),p=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=te=>!!dt(te).protected,S=(M=o==null?void 0:o.groups)==null?void 0:M.brains,w=(S==null?void 0:S.members)??[],k=te=>w.includes(te),[N,E]=x.useState(null),[C,A]=x.useState(""),[_,O]=x.useState("all"),[I,B]=x.useState(null),F=()=>{e.invalidateQueries({queryKey:$e.models}),e.invalidateQueries({queryKey:$e.routing}),e.invalidateQueries({queryKey:$e.groups})},$=p.filter(te=>v.includes(te.name)),Q=((q=i==null?void 0:i.gpu)==null?void 0:q.gtt_total)||((le=i==null?void 0:i.gpu)==null?void 0:le.vram_total)||0,U=((oe=i==null?void 0:i.gpu)==null?void 0:oe.gtt_used)||0,ge=Q>2*fk?Q:124*fk,ue=x.useMemo(()=>{const te=C.trim().toLowerCase();return p.filter(W=>_==="in_use"?!!W.role||v.includes(W.name):!0).filter(W=>te?W.name.toLowerCase().includes(te):!0).sort((W,ne)=>{const J=v.includes(W.name)?0:1,xe=v.includes(ne.name)?0:1;return J!==xe?J-xe:Ga(W.name).localeCompare(Ga(ne.name))})},[p,v,_,C]),pe=p.find(te=>te.name===N)??null;async function se(te){try{await ye(`/api/models/${encodeURIComponent(te)}/load`,{method:"POST"}),F()}catch(W){c("Fehler",`Laden fehlgeschlagen: ${W.message||W}`)}}async function ae(te){const W=w.some(ne=>v.includes(ne));if(S&&W&&!k(te)){const ne=w.filter(J=>v.includes(J)).map(Ga).join(", ");u("Verdrängt das Hirn?",`„${Ga(te)}" ist nicht ko-resident. Beim Laden wirft es das warme Hirn (${ne}) raus — Lucy verliert Hirn bzw. Augen. - -Trotzdem exklusiv laden?`,()=>se(te));return}se(te)}async function Z(te){const W=p.find(ne=>ne.name===te);if(W&&b(W.role)){c("Geschützt",`„${dt(W.role).label}" ist lebenswichtig und bleibt geladen.`);return}try{await ye(`/api/models/${encodeURIComponent(te)}/unload`,{method:"POST"}),F()}catch(ne){c("Fehler",`Entladen fehlgeschlagen: ${ne.message||ne}`)}}async function re(te,W){try{const ne=await ye(`/api/models/${encodeURIComponent(W)}/role`,{method:"POST",body:JSON.stringify({role:te||null})});F(),ne!=null&&ne.warning&&c("Rolle gesetzt — Hinweis",ne.warning)}catch(ne){c("Fehler",`Rolle zuweisen fehlgeschlagen: ${ne.message||ne}`)}}async function ie(te,W){let ne=null;try{ne=await ye(`/api/models/${encodeURIComponent(te)}/ctx/auto`)}catch{}const J=ne?`Optimal für dein Setup: ${(ne.ctx/1024).toFixed(0)}k (${ne.ctx}). »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";f("Kontextlänge anpassen",J,String(W||32768),async xe=>{if(xe)try{await ye(`/api/models/${encodeURIComponent(te)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(xe,10)})}),F()}catch(be){c("Fehler",`Kontext setzen fehlgeschlagen: ${be.message||be}`)}},void 0,ne?{autoValue:String(ne.ctx),autoLabel:`Auto (${(ne.ctx/1024).toFixed(0)}k)`}:void 0)}async function D(te){const W=p.find(ne=>ne.name===te);if(W&&b(W.role)){c("Geschützt",`„${dt(W.role).label}" kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}u("Modell löschen?",`„${Ga(te)}" und alle GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await ye(`/api/models/${encodeURIComponent(te)}`,{method:"DELETE"}),N===te&&E(null),F()}catch(ne){c("Fehler",`Löschen fehlgeschlagen: ${ne.message||ne}`)}})}return r?s.jsx("div",{className:"py-16 text-center text-xs text-muted-foreground",children:"Werkbank wird geladen …"}):n?s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",String(n),")."]}):s.jsxs("div",{className:"space-y-5",children:[s.jsx(PR,{running:$,capacityBytes:ge,realUsedBytes:U,selected:N,onSelect:E}),s.jsxs("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)]",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(rl,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/60"}),s.jsx("input",{value:C,onChange:te=>A(te.target.value),placeholder:"Modell suchen …",className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 pl-8 pr-2 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-primary/50 focus:outline-none"})]}),s.jsx("div",{className:"flex rounded-lg border border-border/40 bg-background/30 p-0.5",children:["all","in_use"].map(te=>s.jsx("button",{onClick:()=>O(te),className:ee("rounded-md px-2 py-1 text-[9px] font-bold uppercase transition-all cursor-pointer",_===te?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:te==="all"?"Alle":"In Benutzung"},te))})]}),s.jsx("div",{className:"max-h-[60vh] space-y-1.5 overflow-y-auto scrollbar-thin pr-1",children:ue.length===0?s.jsx("div",{className:"rounded-xl border border-dashed border-border/50 p-8 text-center text-xs text-muted-foreground",children:"Keine Modelle."}):ue.map(te=>{const W=v.includes(te.name),ne=N===te.name,J=pf(te.name),xe=gf(te.role);return s.jsxs("button",{onClick:()=>E(te.name),className:ee("flex w-full items-center gap-2.5 rounded-xl border p-2.5 text-left transition-all cursor-pointer",ne?"border-primary/60 bg-primary/10":"border-border/40 bg-background/20 hover:border-primary/30 hover:bg-background/40"),children:[s.jsx("span",{className:ee("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border text-[10px] font-bold",J.color),children:J.initial}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("div",{className:"truncate font-mono text-xs font-semibold text-foreground",children:Ga(te.name)}),s.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[te.role&&s.jsx("span",{className:ee("h-2 w-2 rounded-sm",xe.dot)}),s.jsx("span",{className:"text-[10px] text-muted-foreground",children:te.role?dt(te.role).short:"keine Rolle"}),s.jsxs("span",{className:"text-[10px] text-muted-foreground/50",children:["· ",lr(te.size_bytes)]})]})]}),W?s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[9px] font-bold uppercase text-emerald-400",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"warm"]}):te.incomplete?s.jsx("span",{className:"shrink-0 text-[9px] font-bold uppercase text-amber-400",children:"⚠ fehlt"}):s.jsx("span",{className:"shrink-0 text-[9px] font-semibold uppercase text-muted-foreground/50",children:"bereit"})]},te.name)})})]}),s.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:pe?s.jsx(_R,{m:pe,warm:v.includes(pe.name),expert:m,protectedRole:b(pe.role),coresident:k(pe.name),onLoad:()=>ae(pe.name),onUnload:()=>Z(pe.name),onRole:te=>re(te,pe.name),onCtx:()=>ie(pe.name,pe.ctx),onSpec:()=>B(pe),onDelete:()=>D(pe.name)}):s.jsxs("div",{className:"flex h-full min-h-[16rem] flex-col items-center justify-center gap-2 text-center text-muted-foreground",children:[s.jsx(yi,{className:"h-8 w-8 opacity-40"}),s.jsx("p",{className:"text-sm font-semibold",children:"Links ein Modell wählen"}),s.jsx("p",{className:"text-xs",children:"Dann verwaltest du es hier — laden, Rolle, Kontext, löschen."})]})})]}),I&&s.jsx(pE,{model:I,onClose:()=>B(null),onChanged:F}),h]})}function _R({m:e,warm:t,expert:r,protectedRole:n,coresident:i,onLoad:o,onUnload:c,onRole:u,onCtx:f,onSpec:h,onDelete:m}){const p=pf(e.name),v=t&&n;return s.jsxs("div",{className:"flex h-full flex-col gap-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{className:ee("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border text-sm font-bold",p.color),children:p.initial}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h2",{className:"break-all font-mono text-sm font-bold text-foreground",children:Ga(e.name)}),s.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[e.role?s.jsx(mo,{role:e.role}):s.jsx("span",{className:"rounded border border-dashed border-border/50 px-1.5 py-0.5 text-[10px] text-muted-foreground",children:"keine Rolle"}),n&&s.jsxs("span",{className:"rounded bg-background/40 px-1.5 py-0.5 text-[10px] text-muted-foreground",title:"Lebenswichtig — geschützt",children:[s.jsx(u5,{className:"mr-0.5 inline h-3 w-3"}),"geschützt"]}),i&&s.jsxs("span",{className:"rounded border border-fuchsia-500/30 bg-fuchsia-500/10 px-1.5 py-0.5 text-[10px] font-bold uppercase text-fuchsia-300",children:[s.jsx(Sa,{className:"mr-0.5 inline h-3 w-3"}),"Ko-resident"]}),t&&s.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold uppercase text-emerald-400",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"warm"]})]})]})]}),s.jsxs("button",{onClick:t?c:o,disabled:e.incomplete&&!t||v,className:ee("flex h-11 w-full items-center justify-center gap-2 rounded-xl border text-sm font-bold transition-all cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",t?"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20":"border-primary/40 bg-primary/10 text-primary hover:bg-primary/20"),title:v?`„${dt(e.role).label}" bleibt geladen (geschützt).`:void 0,children:[t?s.jsx(fI,{className:"h-4 w-4"}):s.jsx(h5,{className:"h-4 w-4"}),v?"🔒 bleibt geladen":t?"Entladen":"Ins Warm-Set laden"]}),s.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsx("div",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Rolle"}),s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[s.jsx(hk,{active:!e.role,onClick:()=>u(""),dot:"bg-slate-400",label:"keine"}),qx.map(b=>s.jsx(hk,{active:e.role===b.role,onClick:()=>u(b.role),dot:gf(b.role).dot,label:b.short},b.role))]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[s.jsx(MR,{icon:ga,label:"Größe",value:lr(e.size_bytes)}),s.jsxs("button",{onClick:f,className:"group flex items-center gap-2 rounded-lg border border-border/30 bg-background/20 p-2.5 text-left transition-colors hover:border-primary/40 cursor-pointer",children:[s.jsx(f5,{className:"h-4 w-4 text-primary/80"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"Kontext · ändern"}),s.jsx("div",{className:"font-semibold text-foreground",children:Cv(e.ctx)})]})]})]}),s.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Beschleuniger"}),r&&s.jsxs("button",{onClick:h,className:ee("flex h-6 items-center gap-1 rounded-lg border px-2 text-[9px] font-bold uppercase transition-colors cursor-pointer",e.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":e.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),children:[s.jsx(wa,{className:"h-3 w-3"})," Spec"]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[e.spec_active&&s.jsx(Rd,{tone:"emerald",label:"Spec-Decoding aktiv"}),!e.spec_active&&e.spec_draft_model&&s.jsx(Rd,{tone:"amber",label:"Spec inaktiv"}),e.prompt_cache&&s.jsx(Rd,{tone:"cyan",label:"Prompt-Cache"}),e.parallel_slots>1&&s.jsx(Rd,{tone:"violet",label:`${e.parallel_slots} Slots`}),!e.spec_active&&!e.spec_draft_model&&!e.prompt_cache&&e.parallel_slots<=1&&s.jsx("span",{className:"text-[11px] text-muted-foreground/60",children:"keine aktiv"})]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:s.jsx(Pv,{caps:e.capabilities})}),s.jsxs("button",{onClick:m,disabled:n,className:ee("mt-auto flex h-9 items-center justify-center gap-1.5 rounded-lg border text-xs font-semibold transition-colors",n?"cursor-not-allowed border-border/30 text-muted-foreground/40":"border-red-500/30 text-red-400 hover:bg-red-500/10 cursor-pointer"),children:[s.jsx(Us,{className:"h-3.5 w-3.5"})," ",n?"geschützt — nicht löschbar":"Modell löschen"]})]})}function hk({active:e,onClick:t,dot:r,label:n}){return s.jsxs("button",{onClick:t,className:ee("flex items-center gap-1.5 rounded-lg border px-2 py-1 text-[10px] font-semibold transition-all cursor-pointer",e?"border-primary/60 bg-primary/15 text-foreground":"border-border/40 bg-background/20 text-muted-foreground hover:border-primary/30"),children:[s.jsx("span",{className:ee("h-2 w-2 rounded-sm",r)}),n,e&&s.jsx(Mt,{className:"h-3 w-3 text-primary"})]})}function MR({icon:e,label:t,value:r}){return s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/30 bg-background/20 p-2.5",children:[s.jsx(e,{className:"h-4 w-4 text-primary/80"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:t}),s.jsx("div",{className:"font-semibold text-foreground",children:r})]})]})}function Rd({tone:e,label:t}){const r={emerald:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",amber:"bg-amber-500/10 text-amber-400 border-amber-500/20",cyan:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20",violet:"bg-violet-500/10 text-violet-400 border-violet-500/20"}[e];return s.jsx("span",{className:ee("rounded border px-1.5 py-0.5 text-[10px] font-semibold",r),children:t})}const IR=[{key:"popular",label:"Beliebt",q:""},{key:"coder",label:"Coder",q:"coder"},{key:"vision",label:"Vision",q:"vision"},{key:"reasoning",label:"Reasoning",q:"reasoning"},{key:"small",label:"Klein (≤4B)",q:"3B"}],TR=["fast","heavy","coder","vision","hermes","scout"],DR=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1});function mk(e){return DR.format(e)}function RR(){const{data:e}=Si(),t=(e==null?void 0:e.models)??[],[r,n]=x.useState(""),[i,o]=x.useState([]),[c,u]=x.useState(!1),[f,h]=x.useState(""),[m,p]=x.useState("popular"),[v,b]=x.useState(""),[S,w]=x.useState(null),[k,N]=x.useState([]),[E,C]=x.useState("Q4_K_M"),[A,_]=x.useState(""),[O,I]=x.useState(null),[B,F]=x.useState(!1),[$,Q]=x.useState({});async function U(M){u(!0),h("");try{const q=await ye(`/api/hf/search?q=${encodeURIComponent(M)}`);o(q.results),q.results.length||h("Keine Ergebnisse.")}catch(q){h(`Suche fehlgeschlagen: ${q}`)}finally{u(!1)}}x.useEffect(()=>{U("")},[]);function ge(M){p(M.key),n(""),U(M.q)}function ue(){p(""),U(r)}async function pe(M,q,le){F(!1);try{const oe=await ye(`/api/fit?params_b=0&quant=${encodeURIComponent(q)}&ctx=8192&name=${encodeURIComponent(M)}&role=${encodeURIComponent(le)}`);I(oe)}catch{I(null)}}async function se(M){if(S===M){w(null);return}w(M),N([]),I(null),_(""),F(!1),h("Analysiere Repository…");try{const q=await ye(`/api/hf/quants?repo=${encodeURIComponent(M)}`);N(q.quants);const le=q.quants.includes("Q4_K_M")?"Q4_K_M":q.quants[0]||"Q4_K_M";C(le),h(q.quants.length?"":"Keine GGUF-Dateien in diesem Repo gefunden."),q.quants.length&&pe(q.repo,le,"")}catch(q){h(`Fehler: ${q}`)}}function ae(){const M=v.trim();M&&(o(q=>q.some(le=>le.repo===M)?q:[{repo:M,downloads:0,likes:0},...q]),b(""),se(M))}const Z=A?t.find(M=>(M.role||"").toLowerCase()===A):void 0;async function re(M){if((O==null?void 0:O.fit.level)==="too_tight"&&!B){F(!0);return}Q(q=>({...q,[M]:"Starte…"}));try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:M,quant:E,role:A||void 0,jinja:!0})}),Q(q=>({...q,[M]:"Download läuft"})),F(!1)}catch{Q(le=>({...le,[M]:"Fehler"}))}}const ie=M=>{var le;const q=((le=M.split("/").pop())==null?void 0:le.toLowerCase().replace(/-gguf$/i,""))||"";return q.length>3&&t.some(oe=>oe.name.toLowerCase().includes(q))},D=M=>M==="perfect"?"text-emerald-400 border-emerald-500/40 bg-emerald-500/10":M==="marginal"?"text-amber-400 border-amber-500/40 bg-amber-500/10":"text-red-400 border-red-500/40 bg-red-500/10";return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(rl,{className:"absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),s.jsx("input",{value:r,onChange:M=>n(M.target.value),onKeyDown:M=>M.key==="Enter"&&ue(),"aria-label":"HuggingFace durchsuchen",type:"search",spellCheck:!1,placeholder:"HuggingFace durchsuchen (z.B. Qwen Coder, Llama-3.1, gemma)…",className:"w-full h-10 pl-9 pr-3 rounded-xl border border-border/60 bg-background/40 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),s.jsx("button",{onClick:ue,className:"h-10 px-5 rounded-xl bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Suchen"})]}),s.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:IR.map(M=>s.jsxs("button",{onClick:()=>ge(M),className:ee("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-all cursor-pointer border",m===M.key?"bg-primary/15 text-primary border-primary/30":"border-border/50 text-muted-foreground hover:text-foreground hover:border-border"),children:[M.key==="popular"&&s.jsx(QM,{className:"h-3 w-3"}),M.label]},M.key))}),c?s.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:"Lade GGUF-Modelle von HuggingFace…"}):s.jsxs("div",{className:"space-y-2",children:[i.map(M=>{const q=S===M.repo,le=ie(M.repo),oe=M.repo.includes("/")?M.repo.split("/")[0]:"—",te=M.repo.split("/").pop();return s.jsxs("div",{className:ee("rounded-xl border bg-card/45 backdrop-blur-md transition-all",q?"border-primary/40 shadow-lg shadow-primary/5":"border-border/50 hover:border-primary/30"),children:[s.jsxs("button",{onClick:()=>se(M.repo),className:"w-full flex items-center gap-3 p-3.5 text-left cursor-pointer",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"text-xs font-bold font-mono text-foreground truncate max-w-[280px]",title:M.repo,children:te}),le&&s.jsxs("span",{className:"flex items-center gap-1 text-[8px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-1.5 py-0.5 rounded",children:[s.jsx(Mt,{className:"h-2.5 w-2.5"})," installiert"]})]}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-3 mt-0.5 font-mono",children:[s.jsx("span",{children:oe}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Bs,{className:"h-3 w-3"})," ",mk(M.downloads)]}),M.likes>0&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(eI,{className:"h-3 w-3"})," ",mk(M.likes)]})]})]}),q?s.jsx(r5,{className:"h-4 w-4 text-muted-foreground shrink-0"}):s.jsx(tl,{className:"h-4 w-4 text-muted-foreground shrink-0"})]}),q&&s.jsx("div",{className:"border-t border-border/30 p-3.5 space-y-3",children:k.length===0?s.jsx("div",{className:"text-[11px] text-muted-foreground font-mono",children:f||"Lade Quants…"}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Quant"}),s.jsx("select",{value:E,onChange:W=>{C(W.target.value),pe(M.repo,W.target.value,A)},"aria-label":"Quantisierung",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:k.map(W=>s.jsx("option",{value:W,className:"bg-popover text-foreground",children:W},W))}),s.jsx("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1",children:"Rolle"}),s.jsxs("select",{value:A,onChange:W=>{_(W.target.value),pe(M.repo,E,W.target.value)},"aria-label":"Rolle",title:"Optional — bestimmt Auto-Konfiguration + setup-bewussten Kontext",className:"h-8 rounded-lg border border-border/60 bg-background/40 px-2 text-xs text-foreground font-semibold outline-none",children:[s.jsx("option",{value:"",className:"bg-popover text-foreground",children:"keine"}),TR.map(W=>s.jsx("option",{value:W,className:"bg-popover text-foreground",children:W},W))]}),s.jsx("button",{onClick:()=>re(M.repo),disabled:!!$[M.repo]&&$[M.repo]==="Download läuft",className:ee("h-8 px-3.5 ml-auto rounded-lg text-xs font-semibold transition-all cursor-pointer flex items-center gap-1.5",B?"bg-red-500 text-white hover:opacity-90":"bg-primary text-primary-foreground hover:opacity-90"),children:$[M.repo]?$[M.repo]:B?s.jsxs(s.Fragment,{children:[s.jsx(vr,{className:"h-3.5 w-3.5"})," OOM — trotzdem laden"]}):s.jsxs(s.Fragment,{children:[s.jsx(Bs,{className:"h-3.5 w-3.5"})," Herunterladen"]})})]}),O&&s.jsxs("div",{className:ee("flex flex-wrap items-center gap-x-3 gap-y-1 rounded-lg border px-3 py-2 text-[11px] font-medium",D(O.fit.level)),children:[s.jsx("span",{className:"font-bold uppercase tracking-wide",children:O.fit.text}),s.jsxs("span",{className:"font-mono opacity-90",children:["~",O.params_b,"B · ~",O.fit.req_gb," GB / ",O.sys_ram_gb," GB · ~",O.fit.tps," t/s"]}),O.fit.level!=="too_tight"?s.jsxs("span",{className:"font-mono opacity-80",children:["ctx → ",(O.assigned_ctx/1024).toFixed(0),"k"]}):s.jsx("span",{className:"opacity-90",children:"— passt nicht, würde beim Laden abstürzen (OOM)."})]}),Z&&s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-400",children:[s.jsx(vr,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),s.jsxs("span",{children:["Rolle ",s.jsxs("strong",{children:["„",A,'"']})," hält aktuell ",s.jsx("strong",{children:Z.name.split("/").pop()})," — wird beim Download übernommen."]})]})]})})]},M.repo)}),!i.length&&!c&&s.jsx("div",{className:"text-xs text-muted-foreground py-10 text-center",children:f||"Keine Ergebnisse."})]}),s.jsxs("div",{className:"border-t border-border/30 pt-4 flex flex-col sm:flex-row gap-2 items-stretch sm:items-center",children:[s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground shrink-0",children:"Direkt:"}),s.jsx("input",{value:v,onChange:M=>b(M.target.value),onKeyDown:M=>M.key==="Enter"&&ae(),"aria-label":"Repository oder URL direkt eingeben",spellCheck:!1,placeholder:"org/repo oder HF-URL (z.B. unsloth/Qwen2.5-Coder-7B-Instruct-GGUF)",className:"flex-1 h-9 rounded-lg border border-border/60 bg-background/40 px-3 text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground font-mono"}),s.jsx("button",{onClick:ae,className:"h-9 px-4 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold hover:border-primary/50 hover:bg-background/40 transition-all cursor-pointer whitespace-nowrap",children:"Laden"})]})]})}const LR={fast:{title:"Schnelles Alltags-Hirn",desc:"Schnelle MoE-Antworten für Chat, Zusammenfassungen und alltägliche Aufgaben.",icon:wa},heavy:{title:"Schweres Reasoning",desc:"Große Modelle für komplexe Logik, Mathematik und tiefgründiges Planen.",icon:Sa},coder:{title:"Coden & Entwicklung",desc:"Autovervollständigung, Refactoring und Codegenerierung direkt in deiner IDE.",icon:Fs},vision:{title:"Bilder & Vision",desc:"Verarbeitet Bilder, Screenshots und visuelle Diagramme in multimodalen Chats.",icon:Cc},hermes:{title:"Lucys Hirn (Agent)",desc:"Lucys dauer-warmes Agent-Hirn mit Tool-Calling — bleibt ko-resident, lädt nie kalt nach.",icon:RM},scout:{title:"Multimodal-Allrounder",desc:"Multimodaler Allrounder für schnelle Antworten, Übersetzungen und Alltag.",icon:vv},kritiker:{title:"Kritisches Prüf-Hirn",desc:"Schärfer Blick für Fehler, Schwachstellen und Sicherheitslücken — denkt skeptisch, bevor du deployst.",icon:m5},reranker:{title:"Gedächtnis-Sortierer",desc:"Sortiert und gewichtet gespeicherte Fakten nach Relevanz — damit die richtige Info sofort da ist.",icon:rl}};function $R(){const{data:e,isLoading:t,error:r}=bR(),{data:n}=Si(),{data:i}=wh(),o=(n==null?void 0:n.models)??[],c=r?String(r):"",[u,f]=x.useState({}),[h,m]=x.useState({}),[p,v]=x.useState("recommended");async function b(S,w,k,N){f(E=>({...E,[S]:"Starte..."}));try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:S,role:w,quant:k,jinja:N})}),f(E=>({...E,[S]:"Download läuft"}))}catch{f(C=>({...C,[S]:"Fehler"}))}}return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 w-fit",children:[["recommended","Empfohlen"],["browse","Stöbern & Suchen"]].map(([S,w])=>s.jsx("button",{onClick:()=>v(S),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide transition-all cursor-pointer",p===S?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:w},S))}),p==="browse"?s.jsx(RR,{}):t?s.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Analysiere Hardware und suche passende GGUF-Empfehlungen…"}):c||!e?s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Empfehlungsdienst temporär nicht erreichbar (",c,")."]}):s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground bg-background/25 border border-border/40 p-4 rounded-xl flex flex-col sm:flex-row sm:items-center justify-between gap-3 shadow-sm",children:[s.jsxs("div",{children:["Modell-Registry geladen für ",s.jsxs("span",{className:"text-foreground font-bold",children:[e.sys_ram_gb," GB"]})," System-RAM."]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(wI,{className:"h-3.5 w-3.5 text-primary fill-primary/20"}),s.jsx("span",{children:"Empfehlungen sind automatisch auf deine Box-Hardware optimiert."})]})]}),s.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:e.categories.map(S=>{const w=LR[S.role]||{title:S.title||S.role,desc:"Spezifisches Modell für diese Systemrolle.",icon:l5},k=w.icon,N=o.find(I=>I.role===S.role||(I.aliases||[]).includes(S.role)),E=i==null?void 0:i.model_list.find(I=>I.role===S.role),C=S.models.find(I=>I.repo===S.recommended)||S.models[0];if(!C)return null;const A=u[C.repo],_=S.models.filter(I=>I.repo!==S.recommended),O=!!h[S.role];return s.jsxs("div",{className:ee("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-5 transition-all duration-300 hover:border-primary/40",N?"border-border/60":"border-primary/20 shadow-primary/5"),children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shadow-sm shrink-0",children:s.jsx(k,{className:"h-5.5 w-5.5"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold tracking-tight text-foreground",children:w.title}),s.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground uppercase bg-background/50 px-1.5 py-0.5 rounded border border-border/30 inline-block mt-0.5",children:["Rolle: ",S.role]})]})]}),N?s.jsxs("span",{className:"flex items-center gap-1.5 text-[9px] font-bold text-emerald-400 uppercase tracking-wider bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-lg",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Aktiviert"]}):s.jsx("span",{className:"text-[9px] font-bold text-primary/70 uppercase tracking-wider bg-primary/10 border border-primary/20 px-2.5 py-1 rounded-lg",children:"Frei"})]}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:w.desc}),s.jsx("div",{className:"p-3.5 rounded-xl bg-background/35 border border-border/30 space-y-2.5",children:N?s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Aktive GGUF-Belegung"}),s.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:N.name,children:N.name.split("/").pop()}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2",children:[s.jsxs("span",{children:["Größe: ",Av(N.size_bytes||0)]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Quant: ",N.quant||"GGUF"]})]})]}):s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[9px] font-bold uppercase tracking-wider text-primary/80",children:"Empfohlenes Modell"}),s.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:C.name,children:C.name}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 flex-wrap",children:[s.jsxs("span",{children:["Ersteller: ",C.author]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Quant: ",C.quant]})]}),s.jsx("div",{className:"flex items-center gap-1.5 pt-0.5",children:s.jsx(AR,{fit:C.fit})})]})}),s.jsx("div",{className:"pt-1",children:N?E?s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),s.jsxs("span",{children:["Bessere Version in der Registry: ",E.repo.split("/").pop()]})]}),s.jsxs("button",{onClick:()=>b(E.repo,S.role,C.quant||"Q4_K_M",C.caps.tools!=="no"),disabled:!!u[E.repo],className:"h-8 w-full flex items-center justify-center gap-1.5 rounded-lg bg-amber-500 text-black text-xs font-bold hover:bg-amber-400 disabled:opacity-50 transition-all cursor-pointer shadow-md shadow-amber-500/10",children:[s.jsx(Bs,{className:"h-3.5 w-3.5"}),u[E.repo]||"Auf neue Version aktualisieren"]})]}):s.jsxs("div",{className:"h-8 flex items-center justify-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/10 rounded-lg select-none",children:[s.jsx(Mt,{className:"h-4 w-4"})," Auf neuestem Stand"]}):s.jsxs("button",{onClick:()=>b(C.repo,S.role,C.quant||"Q4_K_M",C.caps.tools!=="no"),disabled:!!A,className:ee("h-8 w-full flex items-center justify-center gap-1.5 rounded-lg text-xs font-bold transition-all cursor-pointer border",A?"border-primary/40 bg-primary/5 text-primary":"bg-primary text-primary-foreground hover:opacity-90 shadow-md shadow-primary/10"),children:[s.jsx(Bs,{className:"h-3.5 w-3.5"}),A||"Optimales Modell einsetzen"]})})]}),_.length>0&&s.jsxs("div",{className:"border-t border-border/20 pt-3",children:[s.jsxs("button",{onClick:()=>m(I=>({...I,[S.role]:!O})),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/80 hover:text-foreground transition-colors cursor-pointer",children:[O?s.jsx(r5,{className:"h-3 w-3"}):s.jsx(tl,{className:"h-3 w-3"}),s.jsxs("span",{children:["Alternative Empfehlungen anzeigen (",_.length,")"]})]}),O&&s.jsx("div",{className:"mt-2.5 space-y-2 max-h-36 overflow-y-auto pr-1 scrollbar-thin",children:_.map(I=>s.jsxs("div",{className:"p-2 rounded-lg bg-background/25 border border-border/20 flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[10px] font-mono font-bold text-foreground truncate",title:I.name,children:I.name}),s.jsxs("div",{className:"text-[9px] text-muted-foreground flex items-center gap-1.5 mt-0.5",children:[s.jsxs("span",{children:["Quant: ",I.quant]}),s.jsx("span",{children:"•"}),s.jsx("span",{children:I.fit.text})]})]}),s.jsx("button",{onClick:()=>b(I.repo,S.role,I.quant||"Q4_K_M",I.caps.tools!=="no"),disabled:!!u[I.repo],className:"h-6 px-2.5 rounded bg-background/40 hover:bg-background/80 border border-border/40 text-[9px] font-bold text-foreground transition-all cursor-pointer shrink-0 disabled:opacity-50",children:u[I.repo]||"Installieren"})]},I.repo))})]})]},S.role)})})]})]})}function zR(){const[e,t]=x.useState("cockpit");return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Modell-Manager"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Verwalte deine Modelle und passe das Gateway-Routing live über das interaktive Cockpit an."})]}),s.jsx("div",{className:"flex rounded-xl border border-border/60 bg-card/45 backdrop-blur-md p-1 self-start",children:["cockpit","discover"].map(r=>s.jsx("button",{onClick:()=>t(r),className:ee("rounded-lg px-4 py-1.5 text-xs font-semibold tracking-wide uppercase transition-all cursor-pointer",e===r?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground"),children:r==="cockpit"?"Werkbank":"Modelle finden"},r))})]}),s.jsx(SR,{}),s.jsx("div",{className:"transition-all duration-300",children:e==="cockpit"?s.jsx(OR,{}):s.jsx($R,{})})]})}const pk={hermes_desktop:"Hermes Desktop: Browser-Login",kilo:"Kilo: Einstellungen → API Provider",claude_code:"env / Übersetzer"};function vg({line:e,loading:t}){return t||!e?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-muted-foreground",children:[s.jsx(Bt,{className:"h-3 w-3 animate-spin"})," prüfe…"]}):e.ok?s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-emerald-400",children:[s.jsx(n5,{className:"h-3 w-3"})," ",e.detail]}):s.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-semibold text-red-400",children:[s.jsx(UM,{className:"h-3 w-3"})," ",e.detail]})}function xg({tool:e,fileName:t,accent:r,copied:n,onCopy:i}){return s.jsxs("div",{className:"flex flex-col border border-border/60 bg-black/60 rounded-2xl overflow-hidden shadow-2xl",children:[s.jsxs("div",{className:"flex h-11 items-center justify-between px-4 border-b border-border/40 bg-black/40 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-3 w-3 rounded-full bg-red-500/80"}),s.jsx("span",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),s.jsx("span",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),s.jsx("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground/75 bg-background/30 px-3 py-1 rounded-md border border-border/20",children:s.jsx("span",{children:t})}),s.jsxs("button",{onClick:i,className:"flex h-7 px-2.5 items-center gap-1.5 rounded-lg border border-border/40 bg-background/30 text-[10px] font-semibold text-muted-foreground hover:text-foreground hover:bg-background/60 transition-all cursor-pointer",children:[n?s.jsx(Mt,{className:"h-3.5 w-3.5 text-emerald-400"}):s.jsx(xv,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:n?"Kopiert":"Kopieren"})]})]}),s.jsx("pre",{className:ee("p-5 overflow-x-auto text-xs font-mono whitespace-pre leading-relaxed scrollbar-thin select-text bg-black/10",r==="teal"?"text-cyan-200/90":"text-violet-200/90"),children:s.jsx("code",{children:e.snippet})})]})}function gE(){const[e,t]=x.useState(localStorage.getItem("mc_host")||"192.168.178.151"),[r,n]=x.useState(localStorage.getItem("mc_mcp_path")||""),[i,o]=x.useState("kilo"),[c,u]=x.useState(!1),[f,h]=x.useState(null),m=new URLSearchParams({host:e});r&&m.set("mcp_path",r);const{data:p,error:v}=kR(m.toString()),{data:b,isLoading:S}=hE(),w=v?String(v):"";function k(_){t(_),_&&localStorage.setItem("mc_host",_)}function N(_){n(_),localStorage.setItem("mc_mcp_path",_)}const E=p==null?void 0:p.tools.hermes_desktop,C=p==null?void 0:p.tools[i];async function A(_,O){O&&(await navigator.clipboard.writeText(O),h(_),setTimeout(()=>h(null),1500))}return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Verbindung & Integration"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.jsx("span",{className:"text-foreground",children:"Hermes Desktop"})," ist die Tür zur Box — einmal verbinden, fertig. Für Spezialfälle gibt es darunter die rohen Leitungen (Gateway /v1 + Gedächtnis-MCP) für sonstige Tools."]})]}),s.jsxs("div",{className:"p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"grid gap-4 md:grid-cols-[170px_1fr] items-center",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-background/40 p-4 text-center",children:[s.jsx(og,{className:"h-7 w-7 mx-auto text-muted-foreground"}),s.jsx("div",{className:"mt-2 text-sm font-semibold text-foreground",children:"Dein lokaler Agent"}),s.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Hermes Desktop · Kilo Code · Claude Code …"})]}),s.jsxs("div",{className:"flex flex-col gap-2.5",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wc,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 rounded-xl border border-primary/25 bg-primary/5 px-3.5 py-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-primary",children:[s.jsx(yi,{className:"h-3.5 w-3.5"})," Leitung 1 — Modell"]}),s.jsx(vg,{line:b==null?void 0:b.gateway,loading:S})]}),s.jsx("div",{className:"mt-1 text-[11px] font-mono text-primary/80",children:"Gateway · :9001/v1 · Lanes chat / coding"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wc,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 rounded-xl border border-violet-500/25 bg-violet-500/5 px-3.5 py-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-violet-300",children:[s.jsx(Sa,{className:"h-3.5 w-3.5"})," Leitung 2 — Gedächtnis"]}),s.jsx(vg,{line:b==null?void 0:b.memory,loading:S})]}),s.jsx("div",{className:"mt-1 text-[11px] font-mono text-violet-300/80",children:"MCP · mcp_memory.py · separat"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wc,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 rounded-xl border border-emerald-500/25 bg-emerald-500/5 px-3.5 py-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-emerald-300",children:[s.jsx(og,{className:"h-3.5 w-3.5"})," Leitung 3 — Desktop-Gateway"]}),s.jsx(vg,{line:b==null?void 0:b.desktop_gateway,loading:S})]}),s.jsx("div",{className:"mt-1 text-[11px] font-mono text-emerald-300/80",children:"Desktop-Gateway · :9119 · API-Status"})]})]})]})]}),s.jsxs("p",{className:"mt-3.5 text-[11px] text-muted-foreground leading-relaxed",children:["Der Gateway liefert ",s.jsx("span",{className:"text-foreground",children:"nur das LLM"}),". Das geteilte Gedächtnis läuft über einen",s.jsx("span",{className:"text-foreground",children:" eigenen MCP-Server"})," und das Desktop-Gateway bietet die Agenten-Schnittstelle — alle drei Leitungen werden unabhängig eingerichtet."]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 p-5 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[s.jsx(XM,{className:"h-3.5 w-3.5 text-primary"})," Box LAN IP-Adresse"]}),s.jsx("input",{value:e,onChange:_=>k(_.target.value),"aria-label":"Box LAN IP-Adresse",spellCheck:!1,placeholder:"z.B. 192.168.178.151",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-primary/50 text-foreground"})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("label",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[s.jsx(a5,{className:"h-3.5 w-3.5 text-violet-400"})," Lokaler MCP-Scriptpfad",s.jsx("span",{className:"text-violet-400/70 normal-case font-semibold tracking-normal",children:"(nur Leitung 2)"})]}),s.jsx("input",{value:r,onChange:_=>N(_.target.value),"aria-label":"Lokaler MCP-Scriptpfad",spellCheck:!1,placeholder:"z.B. F:\\Coding Stuff\\mission-control-2\\mcp\\mcp_memory.py",className:"w-full h-9 rounded-lg border border-border/60 bg-background/40 px-3 font-mono text-xs outline-none focus:ring-1 focus:ring-violet-500/50 text-foreground"})]})]}),w&&s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Fehler beim Generieren der Snippets: ",w]}),p&&s.jsxs("div",{className:"space-y-5",children:[E&&s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-emerald-500/70 bg-card/30 p-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[s.jsx(og,{className:"h-4 w-4 text-emerald-400"}),"Hermes Desktop anbinden",s.jsx("span",{className:"text-[10px] font-medium text-emerald-400/90 normal-case",children:"der Hauptweg"})]}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Die Desktop-App dockt remote an die Box an — volle Agent-Oberfläche, Projekte, Review, Gedächtnis inklusive."})]}),E.note&&s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-emerald-500/5 border border-emerald-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[s.jsx(ag,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),s.jsx("span",{children:E.note})]}),s.jsx(xg,{tool:E,fileName:pk.hermes_desktop,accent:"teal",copied:f==="desktop",onCopy:()=>A("desktop",E.snippet)})]}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/30",children:[s.jsxs("button",{onClick:()=>u(_=>!_),className:"flex w-full items-center gap-2 p-4 text-sm font-space font-bold text-foreground cursor-pointer hover:text-primary transition-colors",children:[c?s.jsx(tl,{className:"h-4 w-4"}):s.jsx(Kn,{className:"h-4 w-4"}),"Sonstige Tools (roher /v1-Zugang + Gedächtnis-MCP)",s.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"Kilo Code · Claude Code · Eigenbau"})]}),c&&s.jsxs("div",{className:"grid gap-5 lg:grid-cols-2 p-4 pt-0",children:[s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-primary/70 bg-card/30 p-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[s.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-primary/15 text-primary text-[11px]",children:"1"}),"Modell anbinden"]}),s.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:"Wähle dein Tool — das Snippet zeigt auf den Gateway."})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(p.tools).filter(([_])=>_!=="hermes_desktop").map(([_,O])=>s.jsx("button",{onClick:()=>o(_),className:ee("rounded-lg px-3 py-1.5 text-[11px] font-semibold tracking-wide transition-all cursor-pointer",i===_?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"border border-border/50 text-muted-foreground hover:text-foreground"),children:O.label},_))}),C&&s.jsxs(s.Fragment,{children:[C.note&&s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-primary/5 border border-primary/20 text-[11px] text-muted-foreground leading-relaxed",children:[s.jsx(ag,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),s.jsx("span",{children:C.note})]}),s.jsx(xg,{tool:C,fileName:pk[i]||"config.json",accent:"teal",copied:f==="model",onCopy:()=>A("model",C.snippet)})]})]}),s.jsxs("div",{className:"space-y-3 rounded-2xl border border-border/60 border-t-2 border-t-violet-500/70 bg-card/30 p-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-space font-bold text-foreground",children:[s.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-md bg-violet-500/15 text-violet-300 text-[11px]",children:"2"}),"Gedächtnis anbinden",s.jsx("span",{className:"text-[10px] font-medium text-muted-foreground normal-case",children:"optional"})]}),s.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Ein MCP-Block — gilt zusätzlich für ",s.jsx("em",{children:"jedes"})," Tool aus Schritt 1."]})]}),s.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-violet-500/5 border border-violet-500/20 text-[11px] text-muted-foreground leading-relaxed",children:[s.jsx(ag,{className:"h-4 w-4 text-violet-400 shrink-0 mt-0.5"}),s.jsx("span",{children:p.memory.note})]}),s.jsx(xg,{tool:p.memory,fileName:"mcp.json",accent:"violet",copied:f==="memory",onCopy:()=>A("memory",p.memory.snippet)})]})]})]})]})]})}const FR="modulepreload",BR=function(e){return"/"+e},gk={},UR=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let c=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=c(r.map(h=>{if(h=BR(h),h in gk)return;gk[h]=!0;const m=h.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":FR,m||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((b,S)=>{v.addEventListener("load",b),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return i.then(c=>{for(const u of c||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};class vk extends x.Component{constructor(){super(...arguments);ns(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}render(){return this.state.error?s.jsxs("div",{className:"h-[480px] rounded-2xl border border-red-500/20 bg-red-500/5 p-6 text-xs text-red-400 overflow-auto",children:[s.jsx("div",{className:"font-semibold mb-2",children:"Graph konnte nicht gerendert werden"}),s.jsx("pre",{className:"whitespace-pre-wrap break-words text-[11px] leading-relaxed",children:this.state.error.message})]}):this.props.children}}const xk=x.lazy(()=>UR(()=>import("./GraphView-DlGYz4R1.js"),[]).then(e=>({default:e.GraphView}))),Ld=["identity","knowledge","rules","events"],yk=new Set(["auto","agent","hermes"]),yg={identity:{label:"Identität",icon:jI,bg:"bg-cyan-500/10",text:"text-cyan-400"},knowledge:{label:"Wissen",icon:nl,bg:"bg-indigo-500/10",text:"text-indigo-400"},rules:{label:"Regeln",icon:gI,bg:"bg-violet-500/10",text:"text-violet-400"},events:{label:"Ereignisse",icon:mh,bg:"bg-amber-500/10",text:"text-amber-400"}},bk={label:"Gedächtnis",icon:gv,text:"text-muted-foreground"},WR={identity:"border-l-cyan-500/80",knowledge:"border-l-indigo-500/80",rules:"border-l-violet-500/80",events:"border-l-amber-500/80"},wk=`Hi Hermes! Lass uns ein kurzes Onboarding machen, damit du dich künftig an mich erinnerst. Stell mir nacheinander ein paar kurze Fragen zu: -1) wer ich bin und woran ich gerade arbeite, -2) wie ich angesprochen werden möchte, -3) meine bevorzugten Tools, Sprachen und Arbeitsweise, -4) wichtige Regeln/Konventionen, die du beachten sollst, -5) meine Infrastruktur (Server, Dienste – ohne Geheimnisse). -Frag immer nur eine sache auf einmal und fass am Ende zusammen, was du dir gemerkt hast.`;function vE(){const[e,t]=x.useState(""),[r,n]=x.useState(""),[i,o]=x.useState(""),[c,u]=x.useState("knowledge"),[f,h]=x.useState(!1),[m,p]=x.useState(!1),[v,b]=x.useState("liste"),[S,w]=x.useState(!1),[k,N]=x.useState(null),E=Hr(),{showAlert:C,showConfirm:A,dialogElement:_}=Nn(),{data:O=[]}=Ev({}),{data:I=[],error:B}=Ev({q:r,category:e}),{data:F}=vR(!0),$=B?String(B):"",Q=()=>{E.invalidateQueries({queryKey:["memory"]}),E.invalidateQueries({queryKey:["memory-graph"]})},U=x.useMemo(()=>{const W=O.length,ne=O.filter(J=>yk.has(J.source)).length;return{total:W,auto:ne,manual:W-ne,cats:new Set(O.map(J=>J.category)).size}},[O]),ge=O.length===0,ue=x.useMemo(()=>{const W=F??{nodes:[],edges:[]};if(!r.trim())return W;const ne=r.toLowerCase(),J=W.nodes.filter(be=>be.content.toLowerCase().includes(ne)),xe=new Set(J.map(be=>be.id));return{nodes:J,edges:W.edges.filter(be=>xe.has(be.source)&&xe.has(be.target))}},[F,r]),pe=x.useMemo(()=>{const W={};return I.forEach(ne=>{var J;(W[J=ne.category]??(W[J]=[])).push(ne)}),W},[I]),se=x.useMemo(()=>I.filter(W=>!Ld.includes(W.category)),[I]);async function ae(){i.trim()&&(await ye("/api/memory",{method:"POST",body:JSON.stringify({content:i,category:c,source:"ui"})}),o(""),w(!1),Q())}function Z(W){A("Eintrag löschen?","Diesen Gedächtnis-Eintrag dauerhaft entfernen?",async()=>{try{await ye(`/api/memory/${W}`,{method:"DELETE"}),Q()}catch(ne){C("Fehler",`Löschen fehlgeschlagen: ${ne.message||ne}`)}})}async function re(){try{await navigator.clipboard.writeText(wk),p(!0),setTimeout(()=>p(!1),1800)}catch{C("Kopieren fehlgeschlagen","Markiere den Prompt und kopiere ihn manuell (Strg+C).")}}function ie(){re(),window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"terminal"}}))}async function D(){h(!0);try{const W=await ye("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!1})});if(W.duplicate_count===0){C("Ergebnis","Keine Dubletten gefunden — alles sauber.");return}const ne=xe=>xe.length>90?xe.slice(0,90)+"…":xe,J=W.groups.slice(0,5).map(xe=>`✓ bleibt: „${ne(xe.keep.content)}" -✗ weg: ${xe.remove.map(be=>`„${ne(be.content)}"`).join(", ")}`).join(` - -`)+(W.groups.length>5?` - -… und ${W.groups.length-5} weitere Gruppe(n).`:"");A("Deduplizierung bestätigen",`${W.duplicate_count} Dublette(n) in ${W.groups.length} Gruppe(n) gefunden: - -${J} - -Zusammenführen?`,async()=>{try{await ye("/api/memory/dedupe",{method:"POST",body:JSON.stringify({apply:!0})}),Q()}catch(xe){C("Fehler",`Fehler beim Löschen: ${xe.message}`)}})}catch(W){C("Fehler",`Fehler bei der Deduplizierung: ${W.message}`)}finally{h(!1)}}const M=x.useMemo(()=>I.find(W=>W.id===k),[I,k]),q=x.useMemo(()=>{if(!M||!F)return[];const W=new Set([...F.edges.filter(ne=>ne.source===M.id).map(ne=>ne.target),...F.edges.filter(ne=>ne.target===M.id).map(ne=>ne.source)]);return I.filter(ne=>W.has(ne.id))},[M,F,I]),le={identity:"#00f5ff",knowledge:"#3b82f6",rules:"#d946ef",events:"#fbbf24"},oe={identity:"Identität",knowledge:"Wissen",rules:"Regeln",events:"Ereignisse"},te=new Set(["auto","agent","hermes"]);return s.jsxs("div",{className:"space-y-6",children:[ge?s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 sm:p-10 flex flex-col items-center text-center gap-5",children:[s.jsx("div",{className:"h-14 w-14 rounded-2xl bg-primary/10 flex items-center justify-center",children:s.jsx(cI,{className:"h-7 w-7 text-primary"})}),s.jsxs("div",{className:"space-y-1.5 max-w-lg",children:[s.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Lass Hermes dich kennenlernen"}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Statt Fakten einzutippen: führ ein kurzes Onboarding-Gespräch mit Hermes. Was ihr besprecht, merkt sich das Gedächtnis automatisch — du musst nichts manuell pflegen."})]}),s.jsxs("div",{className:"w-full max-w-lg text-left",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:"Sende das an Hermes"}),s.jsx("button",{onClick:re,className:"flex items-center gap-1 text-[10px] font-semibold text-muted-foreground hover:text-foreground transition-colors",children:m?s.jsxs(s.Fragment,{children:[s.jsx(Mt,{className:"h-3 w-3 text-emerald-400"})," Kopiert"]}):s.jsxs(s.Fragment,{children:[s.jsx(xv,{className:"h-3 w-3"})," Kopieren"]})})]}),s.jsx("pre",{className:"w-full rounded-xl border border-border/60 bg-background/40 p-3.5 text-[11px] leading-relaxed text-foreground/90 whitespace-pre-wrap font-mono",children:wk})]}),s.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[s.jsxs("button",{onClick:ie,className:"h-9 px-4 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center gap-1.5 cursor-pointer",children:[s.jsx(x5,{className:"h-4 w-4"})," Im Terminal starten"]}),s.jsxs("button",{onClick:re,className:"h-9 px-4 rounded-lg border border-border/60 bg-card text-xs font-semibold hover:border-primary/50 transition-all flex items-center gap-1.5 cursor-pointer",children:[m?s.jsx(Mt,{className:"h-4 w-4 text-emerald-400"}):s.jsx(xv,{className:"h-4 w-4"})," Prompt kopieren"]})]}),s.jsxs("p",{className:"text-[11px] text-muted-foreground/70 flex items-center gap-1.5",children:[s.jsx(vI,{className:"h-3 w-3"})," Funktioniert genauso über Telegram —"," ",s.jsx("button",{onClick:()=>w(!0),className:"underline hover:text-foreground",children:"oder lieber manuell anlegen"}),"."]})]}):s.jsxs("div",{className:"relative w-full h-[calc(100vh-8.5rem)] min-h-[620px] rounded-2xl border border-border/60 bg-[#030712] overflow-hidden flex flex-col lg:block",children:[s.jsx("div",{className:"absolute inset-0 z-0 hidden lg:block",children:s.jsx(vk,{children:s.jsx(x.Suspense,{fallback:s.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:s.jsx(xk,{data:ue,selectedNodeId:k,onNodeSelect:N})})})}),s.jsxs("div",{className:ee("z-10 flex flex-col transition-all duration-300","lg:absolute lg:left-4 lg:top-4 lg:bottom-4 lg:w-96 lg:rounded-xl lg:border lg:border-border/40 lg:bg-background/65 lg:backdrop-blur-md lg:p-4 lg:shadow-2xl lg:shadow-black/50 lg:h-[calc(100%-2rem)]","w-full h-full p-4 flex-1 lg:flex-none",v==="graph"&&"hidden lg:flex"),children:[s.jsxs("div",{className:"space-y-3 mb-3 shrink-0",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Gedächtnis-Pool"}),s.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed mt-0.5",children:"IDEs & Gateway lesen und lernen hier per MCP."})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.jsxs("span",{className:"text-[9px] font-semibold bg-primary/10 text-primary border border-primary/20 px-2 py-0.5 rounded-md",children:[U.total," Fakten"]}),s.jsxs("span",{className:"text-[9px] font-semibold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-2 py-0.5 rounded-md",children:[U.auto," auto"]}),s.jsxs("span",{className:"text-[9px] font-semibold bg-card/60 text-muted-foreground border border-border/40 px-2 py-0.5 rounded-md",children:[U.cats," Kat."]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 w-full",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx("input",{value:r,onChange:W=>n(W.target.value),"aria-label":"Gedächtnis durchsuchen",type:"search",placeholder:"Semantisch suchen…",className:"w-full h-8 pl-8 pr-3 rounded-lg border border-border/50 bg-background/40 text-[11px] outline-none focus:ring-1 focus:ring-primary/50 text-foreground"}),s.jsx(rl,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),s.jsx("button",{onClick:()=>w(W=>!W),title:"Eintrag hinzufügen",className:"h-8 w-8 shrink-0 rounded-lg bg-primary text-primary-foreground text-xs font-semibold hover:opacity-90 transition-all flex items-center justify-center cursor-pointer shadow-md shadow-primary/10",children:s.jsx(hf,{className:"h-4 w-4"})}),s.jsx("button",{onClick:D,disabled:f,title:"Deduplizieren",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/60 bg-card/45 hover:border-primary/50 transition-all cursor-pointer shadow-md disabled:opacity-50",children:s.jsx(va,{className:"h-3.5 w-3.5 text-primary"})}),s.jsx("div",{className:"flex items-center gap-1 p-0.5 bg-card/30 border border-border/40 rounded-lg lg:hidden",children:[["liste",oI],["graph",$w]].map(([W,ne])=>s.jsx("button",{onClick:()=>b(W),className:ee("flex h-7 w-7 items-center justify-center rounded-md transition-all cursor-pointer",v===W?"bg-primary text-primary-foreground":"text-muted-foreground"),children:s.jsx(ne,{className:"h-3.5 w-3.5"})},W))})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-1 p-0.5 bg-card/30 border border-border/40 rounded-lg w-full overflow-x-auto shrink-0 scrollbar-none",children:[s.jsx("button",{onClick:()=>t(""),className:ee("h-6 px-2 rounded-md text-[9px] font-semibold uppercase tracking-wider transition-all cursor-pointer shrink-0",e?"text-muted-foreground hover:text-foreground":"bg-primary text-primary-foreground"),children:"Alle"}),Ld.map(W=>{const ne=yg[W]||bk;return s.jsx("button",{onClick:()=>t(W),className:ee("h-6 px-2 rounded-md text-[9px] font-semibold uppercase tracking-wider transition-all cursor-pointer flex items-center gap-1 shrink-0",e===W?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:ne.label},W)})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto pr-1 scrollbar-thin space-y-4",children:[S&&s.jsxs("div",{className:"rounded-xl border border-border/50 bg-background/50 p-3 space-y-2 shrink-0",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Neuer Eintrag"}),s.jsx("button",{onClick:()=>w(!1),className:"text-muted-foreground hover:text-foreground",children:s.jsx(Br,{className:"h-3.5 w-3.5"})})]}),s.jsx("textarea",{value:i,onChange:W=>o(W.target.value),rows:2,placeholder:"Vorliebe, Regel oder Fakt…",className:"w-full resize-none rounded-lg border border-border/50 bg-background/30 p-2 text-[11px] outline-none focus:ring-1 focus:ring-primary/50 text-foreground leading-relaxed"}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("select",{value:c,onChange:W=>u(W.target.value),className:"h-7 rounded-md border border-border/50 bg-background/50 px-1 text-[10px] outline-none text-foreground cursor-pointer",children:Ld.map(W=>{var ne;return s.jsx("option",{value:W,className:"bg-popover text-foreground",children:((ne=yg[W])==null?void 0:ne.label)||W},W)})}),s.jsx("button",{onClick:ae,className:"h-7 px-2.5 rounded-md bg-primary text-primary-foreground text-[10px] font-semibold hover:opacity-90 transition-all cursor-pointer",children:"Speichern"})]})]}),$&&s.jsxs("div",{className:"rounded-lg border border-red-500/20 bg-red-500/5 p-3 text-[10px] text-red-400",children:["Fehler: ",$]}),I.length===0?s.jsx("div",{className:"text-[11px] text-muted-foreground border border-dashed border-border/60 rounded-xl p-8 text-center bg-card/10",children:"Keine Einträge gefunden."}):s.jsx("div",{className:"space-y-4",children:[...Ld,"__other"].map(W=>{const ne=W==="__other"?se:pe[W]||[];if(!ne.length)return null;const J=yg[W]||bk,xe=J.icon;return s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-0.5",children:[s.jsx(xe,{className:ee("h-3 w-3",J.text)}),s.jsx("span",{className:ee("text-[9px] font-bold uppercase tracking-wider",J.text),children:J.label}),s.jsx("span",{className:"text-[9px] font-mono text-muted-foreground/60 bg-card/50 rounded px-1",children:ne.length})]}),s.jsx("div",{className:"space-y-1.5",children:ne.map(be=>{const fe=yk.has(be.source),qe=k===be.id;return s.jsxs("div",{onClick:()=>N(qe?null:be.id),className:ee("flex items-start justify-between gap-3 p-2.5 rounded-lg border border-l-4 transition-all group cursor-pointer text-left",qe?"bg-primary/10 border-primary shadow-md":"bg-card/45 border-border/40 hover:bg-card/75",WR[be.category]||"border-l-muted"),children:[s.jsx("span",{className:"text-[11px] text-foreground leading-relaxed break-words whitespace-pre-wrap flex-1 min-w-0",children:be.content}),s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 self-center",children:[fe&&s.jsx("span",{title:"Auto gelernt",children:s.jsx(va,{className:"h-2.5 w-2.5 text-emerald-400"})}),s.jsx("button",{onClick:Be=>{Be.stopPropagation(),Z(be.id),k===be.id&&N(null)},className:"h-5 w-5 rounded-md flex items-center justify-center border border-border/40 text-muted-foreground hover:text-red-400 hover:bg-red-500/5 transition-all opacity-0 group-hover:opacity-100",children:s.jsx(Us,{className:"h-3.5 w-3.5"})})]})]},be.id)})})]},W)})})]})]}),s.jsx("div",{className:ee("w-full h-[500px] relative lg:hidden",v==="liste"&&"hidden"),children:s.jsx(vk,{children:s.jsx(x.Suspense,{fallback:s.jsx("div",{className:"h-full rounded-2xl border border-border/60 bg-card/30 flex items-center justify-center text-xs text-muted-foreground",children:"Graph wird geladen…"}),children:s.jsx(xk,{data:ue,selectedNodeId:k,onNodeSelect:N})})})}),M&&s.jsxs("div",{className:ee("z-10 flex flex-col transition-all duration-300","lg:absolute lg:right-4 lg:top-4 lg:bottom-4 lg:w-80 lg:rounded-xl lg:border lg:border-border/40 lg:bg-background/65 lg:backdrop-blur-md lg:p-4 lg:shadow-2xl lg:shadow-black/50 lg:h-[calc(100%-2rem)]","w-full p-4 border-t border-border/60 bg-card/45 shrink-0 flex flex-col"),children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[s.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{background:le[M.category]}}),s.jsx("span",{className:"text-[9px] font-bold uppercase tracking-wider",style:{color:le[M.category]},children:oe[M.category]||M.category}),s.jsxs("span",{className:`ml-auto text-[9px] font-mono flex items-center gap-1 ${te.has(M.source)?"text-emerald-400":"text-muted-foreground/70"}`,children:[te.has(M.source)&&s.jsx(va,{className:"h-2.5 w-2.5"}),M.source]}),s.jsx("button",{onClick:()=>N(null),className:"text-muted-foreground hover:text-foreground ml-1.5 cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto pr-1 scrollbar-thin text-xs text-foreground leading-relaxed mb-4 break-words whitespace-pre-wrap text-left",children:M.content}),s.jsxs("div",{className:"mt-auto shrink-0 space-y-3 pt-3 border-t border-border/30",children:[s.jsxs("div",{className:"text-[9px] font-bold uppercase tracking-wider text-muted-foreground/70 flex items-center gap-1",children:[s.jsx($w,{className:"h-2.5 w-2.5"})," verwandte Fakten"]}),s.jsx("div",{className:"flex flex-col gap-1 max-h-40 overflow-y-auto scrollbar-none text-left",children:q.length?q.map(W=>s.jsxs("button",{onClick:()=>N(W.id),className:"flex items-center gap-2 text-[10px] text-muted-foreground hover:text-foreground text-left transition-colors cursor-pointer py-0.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{background:le[W.category]}}),s.jsx("span",{className:"truncate",children:W.content})]},W.id)):s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"—"})}),s.jsxs("button",{onClick:()=>{Z(M.id),N(null)},className:"flex w-full items-center justify-center gap-1.5 text-[10px] font-bold text-red-400 border border-red-500/20 rounded-lg py-2 hover:bg-red-500/5 transition-all cursor-pointer",children:[s.jsx(Us,{className:"h-3.5 w-3.5"})," Eintrag vergessen"]})]})]})]}),_]})}const HR=["chat","coding","fast","heavy"];function xE(){const{data:e,error:t}=Vx(5e3),{data:r}=Si(),{showAlert:n,dialogElement:i}=Nn(),o=Hr(),c=t?String(t):"",[u,f]=x.useState(!1),h=(r==null?void 0:r.models)??[];async function m(v){try{await ye("/api/agent/brain",{method:"POST",body:JSON.stringify({model:v})}),n("Erledigt",`Hermes-Hirn zeigt jetzt auf das Alias '${v}'. Der Gateway-Dienst wurde neu gestartet.`),o.invalidateQueries({queryKey:$e.agentStatus}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}async function p(v){try{await ye("/api/agent/brain/set",{method:"POST",body:JSON.stringify({model_id:v})}),n("Erledigt","Agent-Hirn gewechselt (warm gehalten). Gateway wurde neugestartet."),o.invalidateQueries({queryKey:$e.agentStatus}),o.invalidateQueries({queryKey:$e.models}),f(!1)}catch(b){n("Fehler",`Wechsel fehlgeschlagen: ${b.message||b}`)}}return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row justify-between sm:items-center gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Hermes Agenten-Cockpit"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hermes ist ein autonomer Agent, der im Hintergrund der Box läuft (Port ",s.jsx("code",{children:":8642"}),") und seine eigene UI besitzt."]})]}),(e==null?void 0:e.hermes_ui_url)&&s.jsxs("a",{href:Nv(e.hermes_ui_url),target:"_blank",rel:"noopener",className:ee("flex h-9 px-4 items-center gap-1.5 text-xs font-semibold rounded-lg transition-all cursor-pointer shadow-md shrink-0 self-start",e.hermes_ui_reachable?"bg-primary text-primary-foreground hover:opacity-90 shadow-primary/10":"border border-border/60 text-muted-foreground bg-background/20"),children:[s.jsx(Dx,{className:"h-4 w-4"}),s.jsx("span",{children:"Hermes-GUI öffnen"})]})]}),c&&s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400 font-mono",children:["Status nicht lesbar (",c,")."]}),e&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[s.jsx(Hn,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Fluss"})]}),s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-stretch gap-3",children:[s.jsxs("button",{onClick:()=>e.hermes_ui_reachable&&window.open(Nv(e.hermes_ui_url),"_blank"),title:e.hermes_ui_reachable?"Hermes-GUI öffnen":"Desktop-Gateway offline",className:"lg:w-40 shrink-0 rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/40 transition-all cursor-pointer flex flex-col justify-center",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(hh,{className:ee("h-3.5 w-3.5",e.hermes_ui_reachable?"text-emerald-400":"text-amber-500")}),s.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Desktop & GUI"}),s.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full animate-pulse",e.hermes_ui_reachable?"bg-emerald-500":"bg-amber-500")})]}),s.jsx("span",{className:"text-[10px] text-muted-foreground font-mono mt-0.5",children:"Hermes Desktop · Clients"})]}),s.jsx("div",{className:"hidden lg:flex items-center text-muted-foreground text-lg select-none",children:"→"}),s.jsxs("div",{className:"flex-1 flex flex-col gap-2.5",children:[s.jsxs("div",{className:"rounded-xl border border-primary/40 bg-primary/5 px-3.5 py-2.5 flex items-center gap-2",children:[s.jsx(Hn,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-xs font-semibold text-primary",children:"Agent Gateway"}),s.jsx("span",{className:"text-[11px] font-mono text-muted-foreground",children:":8642"}),s.jsxs("span",{className:ee("ml-auto inline-flex items-center gap-1.5 text-[10px] font-bold uppercase font-mono px-2 py-0.5 rounded-full border",e.gateway_reachable?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-red-500/10 text-red-400 border-red-500/20"),children:[s.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full",e.gateway_reachable?"bg-emerald-500 animate-pulse":"bg-red-500")}),e.gateway_reachable?"online":"offline"]})]}),s.jsxs("div",{className:"grid gap-2.5 sm:grid-cols-3",children:[s.jsxs("button",{onClick:()=>f(!0),className:"rounded-xl border border-border/60 bg-background/30 p-3 text-left hover:border-primary/45 transition-all cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[s.jsx(yi,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Hirn"}),s.jsx("span",{className:"ml-auto text-[9px] text-primary/70 font-bold uppercase",children:"wechseln →"})]}),s.jsx("div",{className:"text-[11px] font-mono font-medium text-foreground truncate mt-1",title:e.brain_model,children:e.brain_model||"chat"})]}),s.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[s.jsx(tu,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"Verdrahtung"})]}),s.jsxs("div",{className:"text-[10px] font-mono mt-1 flex flex-wrap gap-x-2 text-muted-foreground",children:[s.jsxs("span",{children:["Config: ",e.has_config?"✓":"—"]}),s.jsxs("span",{children:["Skills: ",e.has_skills?"✓":"—"]}),s.jsxs("span",{children:["Memory: ",e.has_memories?"✓":"—"]})]})]}),s.jsxs("div",{className:"rounded-xl border border-border/60 bg-background/30 p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[s.jsx(Rw,{className:"h-3.5 w-3.5 text-primary"}),s.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider",children:"PC"}),s.jsx("span",{className:ee("ml-auto h-1.5 w-1.5 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")})]}),s.jsxs("div",{className:ee("text-[11px] font-mono mt-1",e.pc_executor_reachable?"text-emerald-400":"text-muted-foreground"),children:[":7777 ",e.pc_executor_reachable?"verbunden":"offline"]})]})]})]})]})]}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Rw,{className:"h-5 w-5 text-primary"}),s.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"PC Verbindung"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:ee("h-2 w-2 rounded-full",e.pc_executor_reachable?"bg-emerald-500 animate-pulse":"bg-amber-500")}),s.jsx("span",{className:"text-xs font-semibold text-foreground",children:e.pc_executor_reachable?"Erreichbar":"Nicht verbunden"})]})]}),s.jsxs("div",{className:"grid gap-6 md:grid-cols-2 text-xs text-muted-foreground leading-relaxed text-left",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("p",{children:["Der ",s.jsx("strong",{className:"text-foreground",children:"Hermes PC Executor"})," läuft auf ",s.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"192.168.178.98:7777"})," und ermöglicht Hermes den direkten Zugriff auf deinen Windows-PC — Shell-Befehle, Screenshots, Tastatureingaben."]}),s.jsxs("p",{children:["Hermes erreicht den PC über den MCP-Server ",s.jsx("code",{className:"text-foreground font-mono px-1 py-0.5 rounded bg-muted/40 border border-border/30",children:"hermes-pc-control"}),", der automatisch beim Gateway-Start verbunden wird."]})]}),s.jsx("div",{className:"space-y-3",children:e.pc_executor_reachable?s.jsxs("div",{className:"p-3.5 bg-emerald-500/5 border border-emerald-500/20 rounded-xl space-y-1",children:[s.jsxs("div",{className:"text-emerald-400 font-semibold text-xs flex items-center gap-1.5",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"}),"PC Executor verbunden"]}),s.jsxs("p",{className:"text-[10px]",children:["Hermes kann jetzt per Telegram oder Terminal Befehle auf TobisNicerPC ausführen. Nutze ",s.jsx("code",{className:"text-foreground",children:"pc_shell"}),", ",s.jsx("code",{className:"text-foreground",children:"pc_screenshot"})," oder ",s.jsx("code",{className:"text-foreground",children:"pc_open"}),"."]})]}):s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-xs font-bold text-foreground",children:"PC Executor starten"}),s.jsxs("p",{children:["Starte ",s.jsx("code",{className:"text-foreground font-mono",children:"start.bat"})," im Ordner ",s.jsx("code",{className:"text-foreground font-mono",children:"client\\hermes-pc\\"})," auf dem Windows-PC und lasse das Fenster offen."]}),s.jsx("div",{className:"p-3 bg-background/25 rounded-xl border border-border/30 font-mono text-[9px] text-cyan-300",children:"client\\hermes-pc\\start.bat"})]})})]})]}),!e.gateway_reachable&&s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 space-y-4 shadow-lg shadow-black/10 text-left",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(nl,{className:"h-5 w-5 text-amber-500"}),s.jsx("h3",{className:"text-sm font-bold uppercase tracking-wider text-foreground",children:"Hermes-Agent Diagnostics"})]}),s.jsxs("div",{className:"text-xs text-muted-foreground space-y-3 leading-relaxed",children:[s.jsx("p",{children:"Der Hermes-Dienst ist auf der Box derzeit offline oder kann sich nicht mit dem lokalen llama-swap verbinden."}),s.jsxs("p",{children:["Stelle sicher, dass die systemd-Dienste auf der Box laufen. Du kannst den Status im ",s.jsx("strong",{children:"OS & Updates Drawer"})," prüfen und die Dienste bei Bedarf neu starten."]}),s.jsxs("div",{className:"p-3.5 bg-background/25 rounded-xl border border-border/30 font-mono text-[10px] space-y-1",children:[s.jsx("div",{className:"text-muted-foreground/60",children:"# Dienste manuell auf der Box prüfen:"}),s.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-gateway"}),s.jsx("div",{className:"text-primary",children:"systemctl --user status hermes-builtin-ui"})]}),s.jsxs("p",{children:["Weitere Einrichtungsdetails (Brain-Konfiguration, MCP-Kopplungen, SSH-Tunneling und Such-Engines) findest du in der Dokumentationsdatei:",s.jsx("code",{className:"ml-1 px-1.5 py-0.5 rounded bg-muted/40 text-foreground border border-border/30",children:"docs/HERMES_SETUP.md"}),"."]})]})]})]}),e&&u&&s.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":"Hermes-Hirn konfigurieren",children:s.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[s.jsx(yi,{className:"h-4 w-4"}),s.jsx("span",{children:"Hermes-Hirn konfigurieren"})]}),s.jsx("button",{onClick:()=>f(!1),className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Lane / Gateway-Alias"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:HR.map(v=>{const b=e.brain_model===v;return s.jsxs("button",{onClick:()=>m(v),className:ee("px-3 py-1.5 rounded-lg text-xs font-mono font-semibold border transition-all cursor-pointer flex items-center gap-1.5",b?"border-primary/40 bg-primary/10 text-primary":"border-border/30 bg-background/20 text-foreground hover:bg-accent"),children:[v,b&&s.jsx(Mt,{className:"h-3.5 w-3.5"})]},v)})}),s.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["Schlank & flexibel: das Hirn folgt dem Lane-Routing (z.B. ",s.jsx("code",{className:"text-primary",children:"chat"})," = fast↔heavy)."]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Installiertes Modell (warm gehalten)"}),s.jsx("div",{className:"space-y-1.5 max-h-56 overflow-y-auto pr-1",children:h.map(v=>{var S;const b=v.role==="hermes";return s.jsxs("button",{onClick:()=>!b&&p(v.name),disabled:b||v.incomplete,className:ee("w-full text-left px-3 py-2.5 rounded-lg text-xs flex items-center justify-between font-mono border transition-all",b?"border-indigo-500/40 bg-indigo-500/10 text-indigo-300":v.incomplete?"border-border/20 bg-background/10 text-muted-foreground/50 cursor-not-allowed":"border-border/30 bg-background/20 text-foreground hover:bg-accent cursor-pointer"),children:[s.jsxs("div",{className:"flex flex-col min-w-0",children:[s.jsx("span",{className:"font-semibold truncate max-w-[280px]",children:(S=v.name.split("/").pop())==null?void 0:S.replace(/\.gguf$/i,"")}),s.jsxs("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:[v.capabilities.params_b?`${v.capabilities.params_b}B`:"?"," · ",v.capabilities.tools!=="no"?"Tools ✓":"ohne Tools",v.role&&` · Rolle: ${v.role}`]})]}),b?s.jsxs("span",{className:"text-[9px] font-bold uppercase text-indigo-300 shrink-0 flex items-center gap-1",children:[s.jsx(Mt,{className:"h-3.5 w-3.5"})," Aktiv"]}):s.jsx("span",{className:"text-[9px] font-bold uppercase text-primary/70 shrink-0",children:"Warm setzen →"})]},v.name)})})]}),s.jsxs("div",{className:"text-[10px] text-amber-400/80 flex items-start gap-1.5 border-t border-border/20 pt-2.5",children:[s.jsx("span",{children:"💡"}),s.jsxs("span",{children:["Für einen ",s.jsx("strong",{children:"Agenten"}),' sind Hermes-Modelle (natives Tool-Calling) meist die robustere Wahl. Neues Modell? Erst über „Modell-Manager → Modelle finden" laden.']})]})]})}),i]})}function KR(){const{data:e}=Vx(5e3),t=e!=null&&e.box_console_url?Nv(e.box_console_url):void 0,r=e==null?void 0:e.box_console_reachable;return s.jsxs("div",{className:"flex h-full flex-col gap-4",children:[s.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Konsole"}),s.jsx("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:"Direkte Shell auf der Box — wie ein SSH-Fenster, mitten im Browser."})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx("span",{className:ee("h-2 w-2 rounded-full",r?"bg-emerald-500 animate-pulse":"bg-amber-500")}),r?"online":"offline"]}),t&&s.jsxs("a",{href:t,target:"_blank",rel:"noopener",className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-background/20 px-3 text-xs font-semibold text-muted-foreground transition-all hover:border-primary/50 hover:text-foreground",children:[s.jsx(Dx,{className:"h-3.5 w-3.5"})," In neuem Tab"]})]})]}),t?s.jsxs("div",{className:"relative min-h-[58vh] flex-1 overflow-hidden rounded-2xl border border-border/60 bg-black/50 shadow-lg shadow-black/25",children:[r===!1&&s.jsxs("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 bg-black/70 text-center",children:[s.jsx(vr,{className:"h-8 w-8 text-amber-400"}),s.jsx("div",{className:"text-sm font-semibold text-amber-300",children:"Konsole nicht erreichbar"}),s.jsxs("p",{className:"max-w-sm text-[11px] leading-normal text-muted-foreground",children:["Der ",s.jsx("code",{className:"font-mono text-primary",children:"box-console"}),"-Dienst (ttyd) läuft nicht. Auf der Box: ",s.jsx("code",{className:"font-mono",children:"systemctl --user restart box-console"}),"."]})]}),s.jsx("iframe",{src:t,title:"Box-Konsole",className:"h-full w-full border-0",style:{minHeight:"58vh"}})]}):s.jsxs("div",{className:"flex min-h-[58vh] flex-1 items-center justify-center rounded-2xl border border-border/60 bg-background/20 text-xs text-muted-foreground",children:[s.jsx(v5,{className:"mr-2 h-4 w-4"})," Lade Konsole…"]})]})}const kk=[{id:"grundlagen",label:"Grundlagen"},{id:"moe",label:"MoE & Quant"},{id:"lokal",label:"Lokal betreiben"},{id:"modelle",label:"Modell-Landschaft"},{id:"gateway",label:"Gateway-Trick"},{id:"mcp",label:"MCP"},{id:"skills",label:"Skills"},{id:"memory",label:"Gedächtnis & RAG"},{id:"agents",label:"Agenten"},{id:"ide",label:"IDE anbinden"},{id:"tricks",label:"Tricks & Kniffe"},{id:"wartung",label:"Sicherheit & Wartung"},{id:"ressourcen",label:"Ressourcen"},{id:"troubleshooting",label:"Troubleshooting"}];function GR(e){var t;(t=document.getElementById(e))==null||t.scrollIntoView({behavior:"smooth",block:"start"})}function Dr({id:e,icon:t,color:r,title:n,kicker:i,children:o,wide:c}){return s.jsxs("section",{id:e,className:ee("scroll-mt-20 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-3",c&&"md:col-span-2"),children:[s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[s.jsx(t,{className:ee("h-5 w-5 shrink-0",r)}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:n}),i&&s.jsx("span",{className:ee("text-[9px] font-mono",r),children:i})]})]}),s.jsx("div",{className:"text-xs text-muted-foreground space-y-2.5 leading-relaxed",children:o})]})}function Ba({children:e}){return s.jsxs("div",{className:"mt-1 rounded-xl border border-primary/25 bg-primary/[0.06] p-3 text-[11px] leading-relaxed",children:[s.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-primary mb-1",children:[s.jsx(va,{className:"h-3 w-3"})," Bei dir konkret"]}),s.jsx("div",{className:"text-muted-foreground space-y-1",children:e})]})}function Fe({children:e}){return s.jsx("code",{className:"rounded bg-background/40 border border-border/30 px-1.5 py-0.5 font-mono text-[10px] text-foreground",children:e})}function St({href:e,name:t,note:r}){return s.jsxs("li",{className:"leading-relaxed",children:[s.jsxs("a",{href:e,target:"_blank",rel:"noopener",className:"text-primary hover:underline font-semibold inline-flex items-center gap-0.5",children:[t,s.jsx(MM,{className:"h-3 w-3 opacity-60"})]}),s.jsxs("span",{className:"text-muted-foreground",children:[" — ",r]})]})}function VR(){const[e,t]=x.useState(!1);return s.jsxs("div",{className:"space-y-7",children:[s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 flex items-start gap-4",children:[s.jsx("div",{className:"h-11 w-11 rounded-xl bg-primary/15 flex items-center justify-center shrink-0",children:s.jsx(gv,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Die AI-Bibel"}),s.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-2xl",children:["Allgemeines Nachschlagewerk für lokale & agentische AI — Konzepte, Tricks, Kniffe und kuratierte Quellen. ",s.jsx("span",{className:"font-semibold text-foreground",children:"Stand Juni 2026."})," ","Das meiste gilt überall; ",s.jsx("span",{className:"text-primary font-semibold",children:'„Bei dir konkret"'}),"-Kästen zeigen, was dein Stack daraus macht."]})]})]}),s.jsx("div",{className:"sticky top-0 z-10 -mx-1 px-1",children:s.jsx("div",{className:"rounded-xl border border-border/50 bg-card/70 backdrop-blur-xl p-2 shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[s.jsx(vv,{className:"h-3.5 w-3.5 text-primary ml-1 mr-0.5 shrink-0"}),(e?kk:kk.slice(0,9)).map(r=>s.jsx("button",{onClick:()=>GR(r.id),className:"rounded-lg px-2.5 py-1 text-[11px] font-semibold text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:r.label},r.id)),s.jsx("button",{onClick:()=>t(r=>!r),className:"rounded-lg px-2 py-1 text-[11px] font-semibold text-primary hover:bg-primary/10 transition-colors cursor-pointer",children:e?"weniger":"+ mehr"})]})})}),s.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[s.jsxs(Dr,{id:"grundlagen",icon:yi,color:"text-cyan-400",title:"1. Wie LLMs ticken",kicker:"Grundlagen",children:[s.jsxs("p",{children:["Ein LLM ist im Kern ein ",s.jsx("strong",{children:"Wahrscheinlichkeits-Rechner für das nächste Token"}),' (Wortteil). Es „weiß" nichts — es setzt fort, was statistisch am plausibelsten ist. Daraus folgt fast alles andere.']}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Tokens"})," sind die Einheit — ~¾ Wort. Ein- und Ausgabe werden in Tokens gezählt."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Kontextfenster"}),' = wie viele Tokens das Modell gleichzeitig „sehen" kann (Prompt + Antwort). Voll = Anfang fällt raus.']}),s.jsxs("li",{children:[s.jsx("strong",{children:"Parameter"})," = die trainierten Gewichte. Training ist einmalig, ",s.jsx("strong",{children:"Inferenz"})," ist jede Antwort."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Temperatur / Sampling"})," steuert Zufall: niedrig = deterministisch/präzise (Code), hoch = kreativ."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Halluzination"})," ist kein Bug, sondern die Kehrseite des Ratens. Gegenmittel: Grounding via Tools/RAG, Verifikation."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Reasoning-/Thinking-Modelle"}),' „denken" in unsichtbaren Tokens vor der Antwort — besser bei Logik, langsamer/teurer.']})]})]}),s.jsxs(Dr,{id:"moe",icon:l5,color:"text-violet-400",title:"2. MoE & Quantisierung",kicker:"Mehr Modell, weniger Last",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Mixture of Experts (MoE):"})," Statt für jedes Token das ganze Netz zu aktivieren, wählt ein",s.jsx("em",{children:" Router"})," nur ein paar spezialisierte ",s.jsx("em",{children:"Experts"}),' aus. So läuft ein 100B-Modell mit der aktiven Rechenlast eines viel kleineren (z.B. „122B total / 10B aktiv").']}),s.jsxs("p",{children:[s.jsx("strong",{children:"Quantisierung:"})," Gewichte von FP16 auf weniger Bits eindampfen — kleiner & schneller bei minimalem Qualitätsverlust. Faustregel:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx(Fe,{children:"Q8"})," nahezu verlustfrei, größter Footprint"]}),s.jsxs("li",{children:[s.jsx(Fe,{children:"Q6_K"})," sehr gut, guter Mittelweg"]}),s.jsxs("li",{children:[s.jsx(Fe,{children:"Q4_K_M"})," der Sweet-Spot für lokal — viel Modell pro GB"]})]}),s.jsxs(Ba,{children:["VRAM/RAM ist die harte Grenze — ",s.jsx("strong",{children:"darum"})," ist beides hier zentral: MoE lässt 100B+ überhaupt laufen, Quant entscheidet, was reinpasst. Dein Line-up fährt durchweg ",s.jsx(Fe,{children:"Q4_K_M"}),"/",s.jsx(Fe,{children:"Q6_K"}),"."]})]}),s.jsxs(Dr,{id:"lokal",icon:ph,color:"text-emerald-400",title:"3. Lokal betreiben: Engines & Backends",kicker:"llama.cpp, vLLM & Co.",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Inference-Engines"})," — was die Modelle ausführt:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"llama.cpp / GGUF"})," — der De-facto-Standard für lokal, CPU+GPU, läuft überall."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Ollama / LM Studio"})," — bequeme Wrapper mit One-Click-Downloads (LM Studio mit GUI)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"vLLM / TGI"})," — Server-Engines für maximalen Durchsatz auf dicken GPUs."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"llama-swap"})," — Proxy, der ",s.jsx("em",{children:"mehrere"})," Modelle hinter ",s.jsx("em",{children:"einem"})," Port hält und je nach Anfrage automatisch ein-/aussattelt."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"GPU-Backends"})," — wie gerechnet wird:"]}),s.jsx("ul",{className:"list-disc pl-4 space-y-1",children:s.jsxs("li",{children:[s.jsx(Fe,{children:"CUDA"})," NVIDIA · ",s.jsx(Fe,{children:"ROCm"})," AMD · ",s.jsx(Fe,{children:"Vulkan"})," herstellerübergreifend · ",s.jsx(Fe,{children:"Metal"})," Apple"]})}),s.jsxs("p",{className:"pt-1",children:[s.jsx("strong",{children:"Begriffe, die immer wiederkommen:"})," Kontext (",s.jsx(Fe,{children:"-c"}),"), Slots/Parallel, KV-Cache, Modell-TTL/Swap, ",s.jsx("strong",{children:"Speculative Decoding"})," (kleines Draft-Modell rät voraus → schneller)."]})]})]}),s.jsxs(Ba,{children:["Deine Box hat eine AMD-APU (gfx1151). ",s.jsx("strong",{children:"Einschränkung & Trick:"})," dort schlägt ",s.jsx(Fe,{children:"Vulkan/RADV"})," das offizielle ",s.jsx(Fe,{children:"ROCm"})," bei Token-Generierung um ~12–22 % — darum läuft die Engine auf Vulkan.",s.jsx(Fe,{children:"llama-swap"})," hält die Alltags-Hirne dauerwarm; ",s.jsx(Fe,{children:"coder"})," nutzt Spec-Decoding."]})]}),s.jsxs(Dr,{id:"modelle",icon:ff,color:"text-sky-400",title:"4. Modell-Landschaft",kicker:"Stand Juni 2026",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{children:s.jsx("strong",{children:"Open-Weight (lokal nutzbar):"})}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Qwen"})," (Alibaba) — starke Allrounder + Coder + Vision, viele Größen/MoE."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Llama"})," (Meta), ",s.jsx("strong",{children:"Gemma"})," (Google), ",s.jsx("strong",{children:"Phi"})," (Microsoft) — solide Open-Familien."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"DeepSeek"}),", ",s.jsx("strong",{children:"Mistral/Mixtral"})," — kräftige MoE-/Reasoning-Modelle."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{children:s.jsx("strong",{children:"Frontier (Cloud-API):"})}),s.jsx("ul",{className:"list-disc pl-4 space-y-1",children:s.jsxs("li",{children:[s.jsx("strong",{children:"Claude"})," (Anthropic), ",s.jsx("strong",{children:"GPT"})," (OpenAI), ",s.jsx("strong",{children:"Gemini"})," (Google) — die stärksten Allrounder, aber nicht lokal."]})}),s.jsxs("p",{className:"pt-1",children:[s.jsx("strong",{children:"Modellwahl nach Aufgabe:"})," schnelles Alltags-Hirn · großes Logik-Hirn für harte Tasks · dediziertes Code-Modell · multimodal für Bilder · Embedding-Modell fürs Gedächtnis."]})]})]}),s.jsx("p",{className:"text-[11px] italic",children:'Leaderboards (HF, LMArena) sind grobe Orientierung — der einzige Benchmark, der zählt, ist deine eigene Aufgabe. Vorsicht vor „Benchmaxxing".'}),s.jsxs(Ba,{children:["Dein Line-up via llama-swap: ",s.jsx(Fe,{children:"fast"})," (Alltag/Vision/MoE) · ",s.jsx(Fe,{children:"heavy"})," (schwere Logik) ·",s.jsx(Fe,{children:"coder"})," · ",s.jsx(Fe,{children:"scout"})," · ",s.jsx(Fe,{children:"vision"})," · ",s.jsx(Fe,{children:"embed"})," (fürs Gedächtnis) ·",s.jsx(Fe,{children:"hermes"})," (Agent-Hirn). Verwalten/tauschen im ",s.jsx("strong",{children:"Modell-Manager"}),"-Tab."]})]}),s.jsxs(Dr,{id:"gateway",icon:dI,color:"text-amber-400",title:"5. Der Gateway-Trick",kicker:"OpenAI-kompatibel = überall andocken",children:[s.jsxs("p",{children:["Fast jedes AI-Tool spricht heute das ",s.jsx("strong",{children:"OpenAI-Format"})," (",s.jsx(Fe,{children:"/v1/chat/completions"}),"). Ein",s.jsx("strong",{children:" Gateway"})," davor gibt dir ",s.jsx("em",{children:"einen"})," Endpunkt für alles: zentrales Key-Management, Logging und transparentes ",s.jsx("strong",{children:"Routing"})," — der Client merkt nicht, welches Modell tatsächlich antwortet."]}),s.jsxs("p",{children:["Die ",s.jsx(Fe,{children:"model:auto"}),'-Idee: du sagst „auto", das Gateway wählt das passende Modell je nach Anfrage und lädt es bei Bedarf.']}),s.jsxs(Ba,{children:["Dein Gateway: ",s.jsx(Fe,{children:"http://192.168.178.151:9001/v1"}),", Model ",s.jsx(Fe,{children:"auto"}),", API-Key beliebig. Fertige Configs erzeugt dir der ",s.jsx("strong",{children:"Verbinden"}),"-Tab live — eine Wahrheit, kein Abtippen."]})]}),s.jsxs(Dr,{id:"mcp",icon:Pc,color:"text-violet-400",title:"6. MCP — Werkzeuge für Agenten",kicker:"USB-C für AI-Tools",children:[s.jsxs("p",{children:["Das ",s.jsx("strong",{children:"Model Context Protocol"})," (offen, von Anthropic initiiert) standardisiert, wie ein AI-Client mit externen Tools & Datenquellen spricht. Ein ",s.jsx("strong",{children:"MCP-Server"})," bringt Fähigkeiten: Dateien, Web-Fetch, Git, Datenbanken, eigene APIs."]}),s.jsx("p",{children:"Statt für jeden Editor eigene Tools zu schreiben, bindet jeder MCP-fähige Agent denselben Server an."}),s.jsxs("div",{className:"flex items-start gap-1.5 rounded-xl border border-amber-500/25 bg-amber-500/[0.06] p-2.5 text-[11px]",children:[s.jsx(u5,{className:"h-3.5 w-3.5 text-amber-400 shrink-0 mt-0.5"}),s.jsxs("span",{children:[s.jsx("strong",{children:"Sicherheit:"})," ein MCP-Server hat echten Zugriff (Dateien, Shell). Nur vertrauenswürdige Server laufen lassen, Rechte minimal halten, Quelle prüfen."]})]})]}),s.jsxs(Dr,{id:"skills",icon:hI,color:"text-emerald-400",title:"7. Agent Skills",kicker:"Wiederverwendbare Fähigkeiten",children:[s.jsxs("p",{children:["Ein ",s.jsx("strong",{children:"Skill"})," ist ein Ordner mit einer ",s.jsx(Fe,{children:"SKILL.md"})," (YAML-Kopf + Anleitung, optional Skripte/Beispiele), den der Agent für eine bestimmte Aufgabe lädt — z.B. TDD, Code-Vereinfachung, API-Design."]}),s.jsx("pre",{className:"p-2.5 bg-background/25 rounded-lg border border-border/30 font-mono text-[9px] text-foreground overflow-x-auto whitespace-pre",children:`--- -name: tdd-pro -description: Treibt Entwicklung mit strikter TDD-Praxis ---- -# Instructions -...`}),s.jsxs("p",{children:["Suchen & installieren über die ",s.jsx("strong",{children:"skills.sh"}),"-Registry: ",s.jsx(Fe,{children:"npx skills find"})," /",s.jsx(Fe,{children:"npx skills add owner/repo"}),". Skills liegen projektweit (vom Agent beim Start gelesen) oder global."]})]}),s.jsxs(Dr,{id:"memory",icon:VM,color:"text-indigo-400",title:"8. Gedächtnis & RAG",kicker:"Modelle vergessen — du nicht",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:["LLMs sind ",s.jsx("strong",{children:"zustandslos"}),": ohne Hilfe weiß das Modell beim nächsten Turn nichts mehr. Gedächtnis lebt extern."]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Embeddings"})," wandeln Text in Vektoren; ein ",s.jsx("strong",{children:"Vektor-Store"})," (Chroma, …) findet semantisch Ähnliches."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"RAG"})," = relevante Fakten vor dem Turn heraussuchen und einblenden statt alles im Prompt zu halten."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Long-Context vs. RAG:"}),' riesige Fenster sind bequem, aber teuer & „lost in the middle" — gezieltes Abrufen skaliert besser.']})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Auto-lernendes Gedächtnis"})," ist die nächste Stufe:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:["extrahiert Fakten ",s.jsx("em",{children:"selbst"})," aus Gesprächen, statt nur abzuspeichern"]}),s.jsx("li",{children:"dedupliziert semantisch (kein 10× derselbe Fakt)"}),s.jsxs("li",{children:[s.jsx("strong",{children:"Graph-Sicht"})," = Fakten ",s.jsx("em",{children:"plus"})," ihre Beziehungen, nicht nur eine flache Liste"]})]})]})]}),s.jsxs(Ba,{children:["Dein Gedächtnis (Tab ",s.jsx("strong",{children:"Gedächtnis"}),") ist ",s.jsx("strong",{children:"Mem0"}),"-basiert: auto-lernend & semantisch, ",s.jsx("strong",{children:"graph-first"})," dargestellt, mit 4-Typen-Taxonomie (",s.jsx(Fe,{children:"Identität"})," · ",s.jsx(Fe,{children:"Wissen"})," · ",s.jsx(Fe,{children:"Regeln"})," · ",s.jsx(Fe,{children:"Ereignisse"}),"). Einstieg über ein kurzes ",s.jsx("strong",{children:"Hermes-Onboarding-Gespräch"})," im Terminal — der Agent lernt im Hintergrund nach jedem Turn.",s.jsx("br",{}),s.jsx("strong",{children:"Gotcha:"})," ein gelöschter Fakt kann wieder auftauchen, solange die Original-Nachricht noch im Verlauf steht (additive Extraktion)."]})]}),s.jsxs(Dr,{id:"agents",icon:Hn,color:"text-rose-400",title:"9. Autonome Agenten betreiben",kicker:"LLM in der Schleife",wide:!0,children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:["Ein ",s.jsx("strong",{children:"Agent"})," ist ein LLM in einer Schleife mit Tools:",s.jsx("em",{children:" denken → Tool aufrufen → Ergebnis beobachten → weiter"}),", bis das Ziel erreicht ist."]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Guardrails"})," (Hard-Stop, Tool-Limits) verhindern Endlos-Loops, wenn ein Tool fehlt oder hängt."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Kontext-Hygiene"})," ist die wichtigste Disziplin: frische Sessions starten — vollgemüllte Historien werden langsam, driften und halluzinieren."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Kanäle:"})," CLI/Terminal, Chat-UI, Messaging (z.B. Telegram), reine API."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Least Privilege:"})," gib einem Agenten nur die Tools, die er wirklich braucht. Kritische Aktionen (Shell auf dem Host, Löschen, Geld/Deploys) hinter menschliche Freigabe."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Was sich vollautomatisch lohnt:"})," Modell-Routing, Hintergrund-Gedächtnis, Recherche. ",s.jsx("strong",{children:"Was Freigabe braucht:"})," Systembefehle, Updates/Reboots, permanentes Löschen."]})]})]}),s.jsxs(Ba,{children:[s.jsx("strong",{children:"Hermes"})," ist dein Box-Agent (Hirn = ",s.jsx(Fe,{children:"fast"}),"). Reden tust du mit ihm im",s.jsx("strong",{children:" Terminal"}),"-Tab (Web-Terminal via ttyd) oder per ",s.jsx("strong",{children:"Telegram"}),". Er hat MCP-Server für Gedächtnis, Stack-Steuerung, Web-Fetch und ",s.jsx("strong",{children:"PC-Steuerung"})," (Executor auf deinem Windows-PC). Status & Verdrahtung im ",s.jsx("strong",{children:"Hermes"}),"-Tab."]})]}),s.jsxs(Dr,{id:"ide",icon:Fs,color:"text-cyan-400",title:"10. IDE / Editor anbinden",kicker:"Vibe-Coding lokal",children:[s.jsxs("p",{children:["Jede ",s.jsx("strong",{children:"OpenAI-kompatible"})," IDE oder Extension lässt sich auf einen lokalen Server umbiegen — Base-URL + Model eintragen, fertig:"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Cline"})," & ",s.jsx("strong",{children:"Roo Code"})," (VS-Code-Extensions, voller Agent + MCP)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Cursor"})," (VS-Code-Fork mit Top-Autocomplete)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Continue"}),", ",s.jsx("strong",{children:"aider"})," (CLI), ",s.jsx("strong",{children:"OpenCode"})," (Desktop)"]})]}),s.jsxs(Ba,{children:["Tipp den Kram nicht ab: der ",s.jsx("strong",{children:"Verbinden"}),"-Tab generiert die fertige Config (inkl. MCP-Gedächtnis) pro Tool zum Kopieren. Essenz: Base ",s.jsx(Fe,{children:"…:9001/v1"}),", Model ",s.jsx(Fe,{children:"auto"}),", Key beliebig."]})]}),s.jsx(Dr,{id:"tricks",icon:iI,color:"text-amber-400",title:"11. Tricks & Kniffe",kicker:"Was im Alltag wirklich spart",wide:!0,children:s.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:[["Kontext sauber halten","Neue Session statt Mega-Historie. Drift, Tempo und Halluzination hängen direkt am Kontext-Müll."],["Plan-then-Act","Erst Plan/Vorgehen bestätigen lassen, dann ausführen. Spart teure Holzwege."],["Gezielte Edits","Nie ganze Dateien überschreiben für eine Zeile — Such-/Ersetz-Tools nutzen. Weniger Tokens, weniger Fehler."],["Non-interaktive Befehle","Keine interaktiven Prompts im Agent-Terminal; lange Tasks als Background-Job. Sonst hängt der Loop."],["DevTools koppeln","Browser-/Konsolen-Zugriff geben — der Agent liest echte Fehler statt blind zu raten."],["Richtige Modellwahl","Schnelles Hirn für Alltag, großes für harte Logik, Coder fürs Coden. Nicht alles mit der Kanone."],["Akzeptanzkriterien","Sag konkret, woran „fertig“ erkennbar ist. Vage Prompts → vage Ergebnisse."],["Verifizieren statt vertrauen","Tests/Live-Check fordern. „Sollte funktionieren“ ist kein Beweis."],["Regeln ins Gedächtnis","Wiederkehrende Vorlieben/Konventionen einmal ablegen — der Agent zieht sie selbst."]].map(([r,n])=>s.jsxs("div",{className:"space-y-1 p-3 bg-background/10 rounded-xl border border-border/30",children:[s.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-foreground text-[11px]",children:[s.jsx(wa,{className:"h-3 w-3 text-amber-400"})," ",r]}),s.jsx("p",{className:"text-[11px]",children:n})]},r))})}),s.jsx(Dr,{id:"wartung",icon:nl,color:"text-emerald-400",title:"12. Sicherheit & Wartung",kicker:"Damit's auch morgen noch läuft",wide:!0,children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[s.jsx(o5,{className:"h-3.5 w-3.5 text-emerald-400"})," Goldene Regeln"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Ein ungetesteter Restore ist kein Backup."})," Wiederherstellung mindestens einmal echt durchspielen."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Updates können Dinge still zerschießen"})," — gerade bei AI-Stacks (Embeddings, Provider-Interna). Versionen pinnen, Smoke-Test, Post-Check."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Least Privilege"})," für Agenten, MCP-Server und PC-Zugriff. Kritisches hinter Freigabe."]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{className:"flex items-center gap-1.5 font-bold text-foreground",children:[s.jsx(tu,{className:"h-3.5 w-3.5 text-emerald-400"})," Bei dir im SystemDrawer"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Backup:"})," tägliches Voll-Zustands-Backup, getesteter ",s.jsx(Fe,{children:"restore.sh"})," (Doku in ",s.jsx(Fe,{children:"docs/BACKUP.md"}),")."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Updates:"})," git-basierter Update-Check; ",s.jsx("strong",{children:"Hermes-Update-Button"})," mit anschließendem ",s.jsx("strong",{children:"Gehirn-Check"})," (rot, falls das Update das Gedächtnis zerschießt) + Engine-Update."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Dienste & Gefahrenzone:"})," Restart/Logs pro Dienst, kritische Eingriffe getrennt."]})]}),s.jsx("p",{className:"text-[10px] italic",children:'Erreichbar über das System-Icon → Tab „Wartung".'})]})]})}),s.jsxs("section",{id:"ressourcen",className:"scroll-mt-20 md:col-span-2 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-6 shadow-lg shadow-black/10 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-border/20 pb-3",children:[s.jsx(vv,{className:"h-5 w-5 text-primary"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"13. Kuratierte Ressourcen & Links"}),s.jsx("span",{className:"text-[9px] font-mono text-primary",children:"Sauber geordnet — die guten Quellen"})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-5 text-xs",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(ff,{className:"h-3.5 w-3.5 text-sky-400"})," Modelle & Engines"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://huggingface.co/models",name:"Hugging Face",note:"das Repository für offene Modelle (GGUF, Embeddings, Datasets)."}),s.jsx(St,{href:"https://github.com/ggml-org/llama.cpp",name:"llama.cpp",note:"die Referenz-Engine für lokale Inferenz."}),s.jsx(St,{href:"https://github.com/mostlygeek/llama-swap",name:"llama-swap",note:"mehrere Modelle hinter einem Port, Auto-Swap."}),s.jsx(St,{href:"https://ollama.com",name:"Ollama",note:"einfachster Einstieg, One-Command-Modelle."}),s.jsx(St,{href:"https://lmstudio.ai",name:"LM Studio",note:"lokale GUI zum Stöbern, Laden & Chatten."}),s.jsx(St,{href:"https://github.com/vllm-project/vllm",name:"vLLM",note:"Hochdurchsatz-Serving auf dicken GPUs."})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(Pc,{className:"h-3.5 w-3.5 text-violet-400"})," MCP & Skills"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://modelcontextprotocol.io",name:"MCP — offizielle Doku",note:"Spezifikation & Einstieg."}),s.jsx(St,{href:"https://github.com/modelcontextprotocol/servers",name:"Offizielle MCP-Server",note:"filesystem, git, postgres, fetch & mehr."}),s.jsx(St,{href:"https://smithery.ai",name:"Smithery",note:"Registry zum Suchen & Auto-Installieren von MCP-Servern."}),s.jsx(St,{href:"https://glama.ai/mcp/servers",name:"Glama MCP Registry",note:"kuratierte Community-Datenbank."}),s.jsx(St,{href:"https://skills.sh",name:"skills.sh",note:"Registry & CLI für Agent-Skills."})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(Hn,{className:"h-3.5 w-3.5 text-rose-400"})," Agenten & Frameworks"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://github.com/NousResearch/hermes-agent",name:"Hermes Agent (Nous)",note:"der Agent, der auf deiner Box läuft."}),s.jsx(St,{href:"https://docs.claude.com",name:"Anthropic / Claude Docs",note:"API, Tool-Use, Agent SDK, MCP."}),s.jsx(St,{href:"https://github.com/cline/cline",name:"Cline",note:"autonomer Coding-Agent für VS Code."}),s.jsx(St,{href:"https://aider.chat",name:"aider",note:"AI-Pair-Programming im Terminal, git-nativ."}),s.jsx(St,{href:"https://continue.dev",name:"Continue",note:"Open-Source-Autopilot für IDEs."})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"font-bold text-foreground flex items-center gap-1.5",children:[s.jsx(gv,{className:"h-3.5 w-3.5 text-amber-400"})," Lernen & Community"]}),s.jsxs("ul",{className:"list-disc pl-4 space-y-1.5",children:[s.jsx(St,{href:"https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview",name:"Prompt-Engineering (Anthropic)",note:"die beste praktische Anleitung."}),s.jsx(St,{href:"https://github.com/anthropics/anthropic-cookbook",name:"Anthropic Cookbook",note:"lauffähige Rezepte für Tools, RAG, Agenten."}),s.jsx(St,{href:"https://www.promptingguide.ai",name:"Prompt Engineering Guide",note:"herstellerneutrales Nachschlagewerk."}),s.jsx(St,{href:"https://github.com/mem0ai/mem0",name:"Mem0",note:"die auto-lernende Memory-Schicht hinter deinem Gedächtnis."}),s.jsx(St,{href:"https://www.reddit.com/r/LocalLLaMA/",name:"r/LocalLLaMA",note:"der Puls der lokalen-LLM-Szene."})]})]})]})]}),s.jsx(Dr,{id:"troubleshooting",icon:nI,color:"text-rose-400",title:"14. Troubleshooting",kicker:"Wenn's hakt",wide:!0,children:s.jsxs("ul",{className:"space-y-2 list-disc pl-4",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Keine Verbindung?"})," Selbes LAN wie die Box? IP/Port stimmen (",s.jsx(Fe,{children:":9001"}),")? Backend-Status in der ",s.jsx("strong",{children:"Zentrale"})," prüfen."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Modell antwortet nicht / langsam?"})," In der ",s.jsx("strong",{children:"Zentrale → Dienste"})," schauen, ob ",s.jsx(Fe,{children:"llama-swap"})," grün ist; sonst Restart. Erstes Token nach Swap dauert (Modell lädt)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Agent dreht durch / halluziniert?"})," Frische Session im ",s.jsx("strong",{children:"Terminal"})," starten — meist ist es vollgemüllter Kontext."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Gedächtnis findet nichts?"})," Embedding-Dienst online? Semantisch suchen (Sinn statt exaktem Wort). Leeres Gedächtnis → Hermes-Onboarding starten."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Update hat etwas zerschossen?"})," Genau dafür gibt es Backup & ",s.jsx(Fe,{children:"restore.sh"})," — den getesteten Restore fahren, dann Ursache suchen."]})]})})]}),s.jsx("p",{className:"text-center text-[10px] text-muted-foreground/50 pt-2",children:"Mission Control 2 · AI-Bibel · Stand Juni 2026 — lebendes Dokument, wächst mit dem Stack."})]})}function qR({title:e,hint:t}){return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold",children:e}),s.jsx("p",{className:"text-sm text-muted-foreground",children:t})]}),s.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed border-border bg-card/50 py-20 text-center",children:[s.jsx(GM,{className:"h-8 w-8 text-muted-foreground"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Kommt in einer späteren Phase."})]})]})}const jk=[{id:"mission-control-2",label:"Mission Control",type:"user",reach:"gateway (integr"},{id:"hermes-gateway",label:"Hermes Gateway",type:"user",reach:"hermes-gateway"},{id:"mem0-service",label:"Mem0 (Gedächtnis)",type:"user",reach:"mem0"},{id:"voice-service",label:"Voice (Sprache)",type:"user",reach:"voice"},{id:"hermes-builtin-ui",label:"Hermes GUI (Desktop-Gateway)",type:"user",reach:"hermes-gui"},{id:"llama-swap",label:"Llama Swap",type:"system",reach:"llama-swap"}];function oc({icon:e,iconClass:t,name:r,status:n,available:i,busy:o,actionLabel:c,onAction:u}){return s.jsxs("div",{className:ee("flex items-center gap-3 rounded-lg border px-3 py-2",i?"border-amber-500/30 bg-amber-500/5":"border-border/50 bg-background/20"),children:[s.jsx(e,{className:ee("h-4 w-4 shrink-0",t)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs text-foreground truncate",children:r}),s.jsx("div",{className:ee("text-[10px] truncate",i?"text-amber-400/90":"text-muted-foreground"),children:n})]}),s.jsx("button",{onClick:u,disabled:!i||o,className:ee("text-[11px] font-semibold rounded-lg px-2.5 py-1 transition-colors shrink-0",i?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer":"border border-border/50 text-muted-foreground/40 cursor-default"),children:o?"…":c})]})}function QR({label:e,ok:t,system:r,busy:n,onRestart:i,onLogs:o}){return s.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border/50 bg-background/20 px-3 py-2",children:[s.jsx("span",{className:ee("w-1.5 h-1.5 rounded-full shrink-0",t===!0?"bg-emerald-500":t===!1?"bg-red-500":"bg-muted-foreground/40")}),s.jsxs("span",{className:"flex-1 text-xs text-foreground truncate",children:[e,r&&s.jsx("span",{className:"text-[9px] text-muted-foreground",children:" (root)"})]}),s.jsx("button",{onClick:i,disabled:n,title:"Neu starten",className:"text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",children:s.jsx(ho,{className:ee("h-3.5 w-3.5",n&&"animate-spin")})}),s.jsx("button",{onClick:o,title:"Logs ansehen",className:"text-muted-foreground hover:text-primary transition-colors",children:s.jsx(i5,{className:"h-3.5 w-3.5"})})]})}function bg(e){return e==null?"":e>1024**3?`${(e/1024**3).toFixed(2)} GB`:`${(e/1024**2).toFixed(1)} MB`}const YR=/\b(error|fehler|fail(ed|ure)?|fatal|critical|crit|panic|traceback|exception|denied|refused|unable|emerg|alert|oom|killed)\b/i,ZR=/\b(warn(ing)?|deprecat\w*|retry(ing)?|timeout|timed out|degraded|missing|not found|nicht gefunden)\b/i;function XR(e){return YR.test(e)?"error":ZR.test(e)?"warn":"info"}const JR={error:"text-red-400",warn:"text-amber-300",info:"text-cyan-300/80"};function eL({service:e,text:t,loading:r,logStatus:n,onRefresh:i,onOpenSettings:o}){const[c,u]=x.useState(!1),[f,h]=x.useState(""),m=x.useRef(null),p=x.useMemo(()=>t?t.split(` -`).map(k=>({t:k,level:XR(k)})):[],[t]),v=x.useMemo(()=>p.filter(k=>k.level!=="info").length,[p]),b=f.trim().toLowerCase(),S=p.filter(k=>(!c||k.level!=="info")&&(!b||k.t.toLowerCase().includes(b))),w=n==="password_required"||n==="incorrect_password";return s.jsxs("div",{className:"flex-1 flex flex-col min-h-[300px] border border-border/60 bg-black/50 rounded-xl overflow-hidden shadow-inner",children:[s.jsxs("div",{className:"flex h-10 items-center justify-between gap-2 px-3 border-b border-border/40 bg-black/30 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-muted-foreground shrink-0",children:[s.jsx(x5,{className:"h-3 w-3 text-primary"}),s.jsx("span",{className:"hidden sm:inline",children:"stdout/stderr —"})," ",e]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsxs("div",{className:"relative",children:[s.jsx(rl,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{value:f,onChange:k=>h(k.target.value),placeholder:"filtern…",className:"h-7 w-24 sm:w-36 rounded-md border border-border/50 bg-background/40 pl-6 pr-2 text-[10px] text-foreground outline-none focus:border-primary/50"})]}),s.jsxs("button",{onClick:()=>u(k=>!k),title:"Nur Fehler und Warnungen zeigen",className:ee("flex h-7 items-center gap-1 rounded-md border px-2 text-[10px] font-semibold transition-colors",c?"border-amber-500/50 bg-amber-500/15 text-amber-300":"border-border/50 bg-background/20 text-muted-foreground hover:text-foreground"),children:[s.jsx(vr,{className:"h-3 w-3"}),"Nur Probleme",v>0?` (${v})`:""]}),s.jsx("button",{onClick:i,disabled:r,title:"Neu laden",className:"flex h-7 w-7 items-center justify-center rounded-md border border-border/50 bg-background/20 text-muted-foreground hover:text-foreground transition-colors disabled:opacity-50",children:s.jsx(ho,{className:ee("h-3 w-3",r&&"animate-spin")})})]})]}),s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto p-3 text-[10px] font-mono leading-relaxed scrollbar-thin select-text",children:w?s.jsxs("div",{className:"flex h-full flex-col items-center justify-center space-y-3 p-6 text-center",children:[s.jsx(vr,{className:"h-8 w-8 text-amber-400 animate-pulse animate-duration-1000"}),s.jsx("div",{className:"text-xs font-semibold text-amber-300",children:n==="incorrect_password"?"Falsches Sudo-Passwort hinterlegt.":"Sudo-Passwort für systemd-Dienste erforderlich."}),s.jsxs("p",{className:"max-w-xs text-[10px] leading-normal text-muted-foreground",children:["Für das Auslesen der systemd-Logs von ",e," werden Root-Rechte benötigt. Hinterlege dein Passwort in den Einstellungen."]}),s.jsx("button",{onClick:o,className:"mt-2 rounded-md bg-primary px-3 py-1.5 text-[10px] font-semibold text-primary-foreground transition-colors hover:bg-primary/95",children:"Sudo-Passwort eintragen"})]}):r&&!t?s.jsx("span",{className:"text-muted-foreground",children:"Lade Logs…"}):p.length===0?s.jsx("span",{className:"text-muted-foreground",children:"Keine Logeinträge vorhanden."}):S.length===0?s.jsx("span",{className:"text-muted-foreground",children:c?"Keine Fehler oder Warnungen — der Dienst läuft sauber. ✓":"Kein Treffer für den Filter."}):S.map((k,N)=>s.jsx("div",{className:ee("whitespace-pre-wrap",JR[k.level]),children:k.t||" "},N))})]})}function tL({open:e,showAlert:t}){const[r,n]=x.useState(""),[i,o]=x.useState(""),[c,u]=x.useState(!1),[f,h]=x.useState(!1);return x.useEffect(()=>{e&&(n(localStorage.getItem("mc_sudo_password")||""),o(localStorage.getItem("mc_hf_token")||""))},[e]),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Zugangsdaten & Schlüssel"}),s.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Daten werden ausschließlich lokal in deinem Browser (localStorage) gespeichert und bei Bedarf an das Backend übertragen."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(nl,{className:"h-4 w-4 text-amber-400"}),"Host Sudo-Passwort"]}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:c?"text":"password",value:r,onChange:m=>n(m.target.value),"aria-label":"Host Sudo-Passwort",name:"sudo-password",autoComplete:"off",spellCheck:!1,placeholder:"Sudo-Passwort für System-Operationen",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),s.jsx("button",{type:"button",onClick:()=>u(!c),"aria-label":c?"Passwort verbergen":"Passwort anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:c?s.jsx(Dw,{className:"h-4 w-4","aria-hidden":"true"}):s.jsx(Cc,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Wird benötigt für systemd-Dienste (Llama Swap logs/restart), OS-Update (apt) und Reboot."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-xs font-semibold flex items-center gap-1.5",children:[s.jsx(tI,{className:"h-4 w-4 text-violet-400"}),"HuggingFace API Token"]}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:f?"text":"password",value:i,onChange:m=>o(m.target.value),"aria-label":"HuggingFace API Token",name:"hf-token",autoComplete:"off",spellCheck:!1,placeholder:"hf_…",className:"w-full h-10 pl-3 pr-10 text-xs bg-background/40 border border-border/60 rounded-lg outline-none focus:border-primary transition-colors text-foreground"}),s.jsx("button",{type:"button",onClick:()=>h(!f),"aria-label":f?"Token verbergen":"Token anzeigen",className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors",children:f?s.jsx(Dw,{className:"h-4 w-4","aria-hidden":"true"}):s.jsx(Cc,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.jsx("p",{className:"text-[9px] text-muted-foreground leading-normal",children:"Erlaubt das Herunterladen von geschützten oder Gate-restricted Modellen direkt über Mission Control."})]}),s.jsxs("div",{className:"flex gap-3 pt-2",children:[s.jsx("button",{onClick:()=>{localStorage.setItem("mc_sudo_password",r),localStorage.setItem("mc_hf_token",i),t("Erfolgreich","Einstellungen erfolgreich lokal gespeichert.")},className:"flex-1 h-9 flex items-center justify-center text-xs font-semibold text-primary-foreground bg-primary hover:bg-primary/90 rounded-lg transition-colors shadow shadow-primary/10 cursor-pointer",children:"Speichern"}),s.jsx("button",{onClick:()=>{n(""),o(""),localStorage.removeItem("mc_sudo_password"),localStorage.removeItem("mc_hf_token"),t("Gelöscht","Zugangsdaten gelöscht.")},className:"h-9 px-4 flex items-center justify-center text-xs font-semibold text-muted-foreground border border-border/60 bg-background/20 hover:bg-accent rounded-lg transition-colors cursor-pointer",children:"Zurücksetzen"})]})]})}function rL({detail:e,maintenanceJob:t,onClose:r,onApply:n}){var f,h;const i=e.data,o={os:{icon:nl,cls:"text-cyan-400",title:"OS-Pakete (apt)"},engine:{icon:ph,cls:"text-violet-400",title:"Inferenz-Engine (llama.cpp)"},swap:{icon:g5,cls:"text-fuchsia-400",title:"Router (llama-swap)"},hermes:{icon:Hn,cls:"text-amber-400",title:"Hermes-Agent"}}[e.kind],c=o.icon,u=i?e.kind==="os"?(i.count??0)===0:e.kind==="hermes"?(i.behind??0)===0:i.installed_build!=null&&i.latest_build!=null&&i.latest_build<=i.installed_build:!0;return s.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:r}),s.jsxs("div",{className:"relative w-full max-w-lg max-h-[80vh] flex flex-col rounded-2xl border border-border/60 bg-card shadow-2xl font-sans text-foreground",children:[s.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(c,{className:ee("h-4.5 w-4.5",o.cls)}),s.jsx("h3",{className:"text-sm font-semibold",children:o.title})]}),s.jsx("button",{onClick:r,className:"flex h-7 w-7 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-5 text-xs space-y-3 scrollbar-thin",children:e.loading?s.jsxs("div",{className:"flex h-24 items-center justify-center gap-2 text-muted-foreground",children:[s.jsx(ho,{className:"h-4 w-4 animate-spin"})," Details werden geladen…"]}):i!=null&&i.error?s.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-3 text-red-400",children:i.error}):s.jsxs(s.Fragment,{children:[(i==null?void 0:i.action_needed)!=null&&s.jsxs("div",{className:ee("flex items-start gap-2 rounded-lg border p-3",i.action_needed?"border-amber-500/40 bg-amber-500/10":"border-emerald-500/40 bg-emerald-500/10"),children:[i.action_needed?s.jsx(vr,{className:"h-4 w-4 text-amber-400 shrink-0 mt-0.5"}):s.jsx(n5,{className:"h-4 w-4 text-emerald-400 shrink-0 mt-0.5"}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:ee("text-xs font-semibold",i.action_needed?"text-amber-300":"text-emerald-300"),children:["Musst du etwas tun? ",i.action_needed?"Ja":"Nein — die Box regelt das (Fangnetz)"]}),i.action_needed&&i.action_text&&s.jsx("div",{className:"mt-0.5 text-[11px] text-foreground/90",children:i.action_text})]})]}),(i==null?void 0:i.summary)&&s.jsxs("div",{className:"rounded-lg border border-primary/25 bg-primary/5 p-3 space-y-1",children:[s.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-primary",children:"Was dieses Update bedeutet (Zusammenfassung der Box)"}),s.jsx("pre",{className:"whitespace-pre-wrap text-[11px] leading-relaxed text-foreground/90 font-sans",children:i.summary})]}),e.kind==="os"?s.jsxs(s.Fragment,{children:[((i==null?void 0:i.count)??0)===0?s.jsx("div",{className:"text-muted-foreground",children:"Keine Pakete zu aktualisieren — System ist aktuell."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground",children:[i.count," Paket(e) werden aktualisiert:"]}),s.jsx("div",{className:"space-y-1",children:i.packages.map(m=>s.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[s.jsx(Lw,{className:"h-3 w-3 text-cyan-400 shrink-0"}),m.name]}),s.jsxs("span",{className:"flex items-center gap-1 font-mono text-[10px] text-muted-foreground shrink-0",children:[s.jsx("span",{children:m.current}),s.jsx(wc,{className:"h-3 w-3"}),s.jsx("span",{className:"text-emerald-400",children:m.candidate})]})]},m.name))})]}),(((f=i==null?void 0:i.held_back)==null?void 0:f.length)??0)>0&&s.jsxs("div",{className:"space-y-1.5 rounded-lg border border-border/40 bg-background/20 p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",children:[s.jsx(mh,{className:"h-3.5 w-3.5"})," Vom Hersteller zurückgestellt — kein Handeln nötig"]}),s.jsx("p",{className:"text-[10px] text-muted-foreground leading-normal",children:"Diese Pakete gäbe es bereits, Ubuntu spielt sie aber gestaffelt aus (Phasen-Rollout) bzw. hält sie kurz zurück. Sie kommen bei einem der nächsten automatischen Läufe von selbst — das ist kein Fehler und nichts hängt fest."}),s.jsx("div",{className:"space-y-1",children:i.held_back.map(m=>s.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border border-border/30 bg-background/30 px-2.5 py-1.5",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] truncate",children:[s.jsx(Lw,{className:"h-3 w-3 text-muted-foreground shrink-0"}),m.name]}),s.jsx("span",{className:"text-[9px] text-muted-foreground shrink-0",children:m.reason==="phasing"?"Phasen-Rollout":"vorerst zurückgehalten"})]},m.name))})]})]}):e.kind==="engine"||e.kind==="swap"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px]",children:[s.jsxs("span",{className:"rounded-md border border-border/40 bg-background/30 px-2 py-1",children:["Build ",(i==null?void 0:i.installed_build)??"?"]}),s.jsx(wc,{className:"h-3.5 w-3.5 text-muted-foreground"}),s.jsxs("span",{className:"rounded-md border border-emerald-500/30 bg-emerald-500/5 px-2 py-1 text-emerald-400",children:["Build ",(i==null?void 0:i.latest_build)??"?"]})]}),((i==null?void 0:i.name)||(i==null?void 0:i.latest_tag))&&s.jsxs("div",{className:"text-muted-foreground",children:["Release: ",s.jsx("span",{className:"text-foreground",children:i==null?void 0:i.name}),i!=null&&i.latest_tag?` (${i.latest_tag})`:""]}),(i==null?void 0:i.url)&&s.jsxs("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline",children:["Original-Release-Notes auf GitHub ",s.jsx(Dx,{className:"h-3 w-3"})]}),(i==null?void 0:i.body)&&s.jsxs("details",{className:"group",children:[s.jsx("summary",{className:"cursor-pointer text-[10px] text-muted-foreground hover:text-foreground",children:"Original-Notizen (englisch) anzeigen"}),s.jsx("pre",{className:"mt-1.5 whitespace-pre-wrap rounded-lg border border-border/40 bg-background/30 p-3 text-[10px] leading-relaxed text-muted-foreground max-h-60 overflow-y-auto scrollbar-thin",children:i.body})]})]}):(((h=i==null?void 0:i.commits)==null?void 0:h.length)??0)===0?s.jsx("div",{className:"text-muted-foreground",children:"Keine neuen Commits — Hermes-Agent ist bereits aktuell."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground",children:[i.behind," neue Commit(s) auf ",s.jsxs("span",{className:"font-mono text-foreground",children:["origin/",i.branch]}),":"]}),s.jsx("div",{className:"space-y-1",children:i.commits.map(m=>s.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-background/30 px-2.5 py-1.5",children:[s.jsx(ZM,{className:"h-3.5 w-3.5 text-primary shrink-0 mt-0.5"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-[11px] truncate",children:m.subject}),s.jsxs("div",{className:"font-mono text-[9px] text-muted-foreground",children:[m.hash," · ",m.when]})]})]},m.hash))})]}),e.kind!=="os"&&!u&&s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border/40 bg-background/20 p-2.5",children:[s.jsx(p5,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-[10px] text-muted-foreground leading-normal",children:["Vor dem Update sichert die Box automatisch den alten Stand. Danach prüft sie den ganzen Stack per echter Anfrage — läuft etwas nicht, rollt sie von selbst zurück",e.kind==="hermes"?" und startet den Gateway neu":"","."]})]})]})}),s.jsxs("div",{className:"flex gap-3 border-t border-border/40 p-4 shrink-0",children:[s.jsx("button",{onClick:r,className:"h-9 flex-1 rounded-lg border border-border/60 bg-background/20 text-xs font-semibold text-muted-foreground hover:bg-accent transition-colors cursor-pointer",children:"Schließen"}),s.jsx("button",{onClick:n,disabled:e.loading||u||!!t,title:t?`Update läuft bereits: ${t.label}`:void 0,className:"h-9 flex-1 rounded-lg bg-primary text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-40 disabled:cursor-default",children:t?"Update läuft…":"Jetzt aktualisieren"})]})]})]})}function yE({open:e,onClose:t,defaultTab:r="maintenance"}){var Mi,vl;const[n,i]=x.useState(null),[o,c]=x.useState([]),[u,f]=x.useState("llama-swap"),[h,m]=x.useState(""),[p,v]=x.useState(!1),[b,S]=x.useState(null),[w,k]=x.useState({}),[N,E]=x.useState("maintenance"),[C,A]=x.useState(!1),[_,O]=x.useState(""),[I,B]=x.useState(!1),[F,$]=x.useState(null),[Q,U]=x.useState([]),[ge,ue]=x.useState(!1),[pe,se]=x.useState(null),[ae,Z]=x.useState(null);function re(G,Re,it){Z({type:"alert",title:G,message:Re,onConfirm:()=>{Z(null),it&&it()}})}function ie(G,Re,it){Z({type:"confirm",title:G,message:Re,onConfirm:()=>{Z(null),it()},onCancel:()=>Z(null)})}function D(G){return G?new Date(G*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Nie"}x.useEffect(()=>{e&&r&&E(r)},[e,r]);function M(){ye("/api/maintenance/updates").then(i).catch(G=>console.error("Error loading updates",G))}function q(){ye("/api/jobs").then(G=>c(G.jobs||[])).catch(G=>console.error("Error loading jobs",G))}function le(){ye("/api/system/services").then($).catch(()=>{})}function oe(){ye("/api/system/backups").then(G=>U(G.backups||[])).catch(()=>{})}function te(G){v(!0),S(null),ye(`/api/maintenance/logs?service=${G}&lines=150`).then(Re=>{Re.ok?m(Re.text):(m(`Fehler beim Laden der Logs: ${Re.err||"Unbekannter Fehler"}`),(Re.status==="incorrect_password"||Re.status==="password_required")&&S(Re.status))}).catch(Re=>m(`Fehler: ${Re.message}`)).finally(()=>v(!1))}x.useEffect(()=>{if(!e)return;M(),q(),le(),oe();const G=setInterval(()=>{q(),M(),le()},3e3);return()=>clearInterval(G)},[e]),x.useEffect(()=>{!e||N!=="logs"||te(u)},[e,N,u]);function W(G){return(G==null?void 0:G.status)==="busy"?(re("Update läuft bereits",`Es läuft gerade „${G.running}". Bitte warte, bis es fertig ist.`),q(),!0):!1}function ne(G){return(G==null?void 0:G.status)==="password_required"||(G==null?void 0:G.status)==="incorrect_password"?(re("Box-Passwort nötig",(G.status==="incorrect_password"?"Das gespeicherte Box-Passwort stimmt nicht. ":"Für dieses Update braucht die Box dein Passwort. ")+"Bitte oben im Reiter „Einstellungen“ setzen bzw. korrigieren."),!0):G&&G.ok===!1?(re("Update fehlgeschlagen",G.err||"Unbekannter Fehler."),!0):!1}async function J(){try{const G=await ye("/api/maintenance/os-update",{method:"POST"});if(W(G)||ne(G))return;q(),E("maintenance")}catch(G){re("Fehler",`Fehler beim Starten des OS-Updates: ${G.message}`)}}async function xe(){try{const G=await ye("/api/maintenance/engine-update",{method:"POST"});if(W(G)||ne(G))return;q(),E("maintenance")}catch(G){re("Fehler",`Fehler beim Engine-Update: ${G.message}`)}}async function be(){try{const G=await ye("/api/maintenance/swap-update",{method:"POST"});if(W(G)||ne(G))return;q(),E("maintenance")}catch(G){re("Fehler",`Fehler beim Router-Update: ${G.message}`)}}async function fe(){ue(!0);try{const G=await ye("/api/maintenance/hermes-update",{method:"POST"});if(W(G))return;q()}catch(G){re("Fehler",`Hermes-Update fehlgeschlagen: ${G.message}`)}finally{ue(!1)}}async function qe(G){se({kind:G,loading:!0,data:null});try{const Re=await ye(`/api/maintenance/update-details?kind=${G}`);se({kind:G,loading:!1,data:Re})}catch(Re){se({kind:G,loading:!1,data:{kind:G,error:Re.message}})}}function Be(){const G=pe==null?void 0:pe.kind;se(null),G==="os"?J():G==="engine"?xe():G==="swap"?be():G==="hermes"&&fe()}function _e(){var Re;const G=[n!=null&&n.engine?"Engine":null,n!=null&&n.swap?"Router":null,(Re=n==null?void 0:n.components)!=null&&Re.some(it=>it.update===!0)?"Hermes-Agent":null,n!=null&&n.os?`OS (${n.os} Pakete)`:null].filter(Boolean);ie("Alle Updates einspielen?",`Nacheinander in einem Job: ${G.join(" → ")}. Jeder Schritt sichert und prüft sich selbst; schlägt einer fehl, stoppt der Rest. (OS braucht das Box-Passwort aus den Einstellungen — fehlt es, wird OS übersprungen.)`,async()=>{try{const it=await ye("/api/maintenance/update-all",{method:"POST"});if(W(it)||ne(it))return;if((it==null?void 0:it.status)==="nothing"){re("Nichts zu tun","Es stehen keine Updates aus.");return}q(),E("maintenance")}catch(it){re("Fehler",`„Alle aktualisieren" konnte nicht starten: ${it.message}`)}})}async function wt(){A(!0);try{await ye("/api/maintenance/check-updates",{method:"POST"}),q(),E("maintenance")}catch(G){re("Fehler",`Fehler bei der Update-Suche: ${G.message}`)}finally{A(!1)}}async function tr(G,Re){try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:G,role:Re})}),re("Gestartet",`Modell-Upgrade für '${Re}' (${G}) gestartet.`),q(),E("maintenance")}catch(it){re("Fehler",`Fehler beim Starten des Modell-Upgrades: ${it.message}`)}}async function K(){ie("Reboot bestätigen","Bist du sicher, dass du das gesamte Host-System neu starten willst?",async()=>{try{await ye("/api/maintenance/reboot",{method:"POST"}),re("Reboot","Reboot ausgelöst. System startet neu...",()=>{t()})}catch(G){re("Fehler",`Fehler beim Reboot: ${G.message}`)}})}async function Ce(){B(!0),O("Snapshot wird erzeugt...");try{const G=await ye("/api/system/backup",{method:"POST"});O(G.ok?`Snapshot erzeugt: ${G.snapshot} (${G.files.length} Komponenten)`:"Backup fehlgeschlagen."),oe()}catch(G){O(`Fehler: ${G.message}`)}finally{B(!1)}}async function Pe(G){k(Re=>({...Re,[G]:!0}));try{const Re=await ye("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:G})});Re.ok?re("Dienst neu gestartet",`Dienst ${G} wurde erfolgreich neu gestartet.`,()=>{N==="logs"&&u===G&&te(G)}):re("Fehler",`Fehler beim Neustart: ${Re.err||"Unbekannter Fehler"}`)}catch(Re){re("Fehler",`Fehler beim Neustart: ${Re.message}`)}finally{k(Re=>({...Re,[G]:!1}))}}async function Ze(G){try{await ye(`/api/jobs/${G}/cancel`,{method:"POST"}),q()}catch(Re){re("Fehler",`Fehler beim Abbrechen: ${Re.message}`)}}const et=o.find(G=>(G.state==="running"||G.state==="queued")&&G.group==="maintenance"),dr=(n?(n.os>0?1:0)+(n.engine?1:0)+(n.swap?1:0):0)+(((Mi=n==null?void 0:n.components)==null?void 0:Mi.filter(G=>G.update===!0).length)??0);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:ee("fixed inset-0 bg-black/60 backdrop-blur-sm z-50 transition-opacity duration-300",e?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),onClick:t}),s.jsxs("div",{className:ee("fixed inset-y-0 right-0 w-full sm:w-[640px] bg-card/85 backdrop-blur-xl border-l border-border/60 shadow-2xl z-50 flex flex-col transform transition-transform duration-300 ease-in-out font-sans text-foreground",e?"translate-x-0":"translate-x-full"),children:[s.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between border-b border-border/40 px-6",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(yi,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold tracking-wide uppercase font-space",children:"OS-Zentrale & Pflege"})]}),s.jsx("button",{onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 text-muted-foreground hover:bg-accent transition-colors",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex border-b border-border/40 px-6",children:[s.jsx("button",{onClick:()=>E("maintenance"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="maintenance"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Wartung"}),s.jsx("button",{onClick:()=>E("logs"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="logs"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"System-Logs"}),s.jsx("button",{onClick:()=>E("settings"),className:ee("flex-1 py-3 text-xs font-semibold uppercase tracking-wider border-b-2 text-center transition-all",N==="settings"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:"Einstellungen"})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[N==="maintenance"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Updates"}),s.jsxs("div",{className:"flex items-center gap-3",children:[dr>0&&s.jsxs("button",{onClick:_e,disabled:!!et,className:"flex items-center gap-1 rounded-md border border-primary/40 bg-primary/10 px-2 py-1 text-[10px] font-bold text-primary transition-colors hover:bg-primary/20 disabled:opacity-50",children:[s.jsx(WM,{className:"h-3 w-3"})," Alle aktualisieren (",dr,")"]}),s.jsxs("button",{onClick:wt,disabled:C||!!et,className:"flex items-center gap-1 text-[10px] font-semibold text-primary hover:text-primary/80 transition-colors disabled:opacity-50",children:[s.jsx(ho,{className:ee("h-3 w-3",C&&"animate-spin")})," Nach Updates suchen"]})]})]}),(n==null?void 0:n.last_check)&&s.jsxs("div",{className:"text-[9px] text-muted-foreground -mt-1",children:["Zuletzt gesucht: ",D(n.last_check)]}),et&&s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-300",children:[s.jsx(ho,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}),s.jsxs("span",{children:["Update läuft: ",s.jsx("span",{className:"font-semibold",children:et.label})," — bitte warten. Weitere Updates sind solange gesperrt."]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(oc,{icon:nl,iconClass:"text-cyan-400",name:"OS-Pakete (apt)",available:!!(n!=null&&n.os),status:n!=null&&n.os?`${n.os} verfügbar`:"aktuell",actionLabel:"Anzeigen",onAction:()=>qe("os")}),s.jsx(oc,{icon:ph,iconClass:"text-violet-400",name:"Inferenz-Engine (llama.cpp)",available:!!(n!=null&&n.engine),status:n!=null&&n.engine?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>qe("engine")}),s.jsx(oc,{icon:g5,iconClass:"text-fuchsia-400",name:"Router (llama-swap)",available:!!(n!=null&&n.swap),status:n!=null&&n.swap?"Update verfügbar":"aktuell",actionLabel:"Anzeigen",onAction:()=>qe("swap")}),(()=>{var Re;const G=(Re=n==null?void 0:n.components)==null?void 0:Re.find(it=>it.key==="hermes_agent");return s.jsx(oc,{icon:Hn,iconClass:"text-amber-400",name:"Hermes-Agent",available:(G==null?void 0:G.update)===!0,busy:ge,status:(G==null?void 0:G.update)===!0?`Update: ${G.latest}`:(G==null?void 0:G.reachable)===!1?"offline":"aktuell",actionLabel:"Anzeigen",onAction:()=>qe("hermes")})})(),(vl=n==null?void 0:n.model_list)==null?void 0:vl.map(G=>s.jsx(oc,{icon:DM,iconClass:"text-emerald-400",name:`Modell · ${G.role}`,available:!0,status:G.title,actionLabel:"Upgrade",onAction:()=>tr(G.repo,G.role)},G.role))]})]}),s.jsxs("div",{className:"space-y-2.5",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Dienste"}),s.jsx("div",{className:"space-y-1.5",children:jk.map(G=>{var Re;return s.jsx(QR,{label:G.label,system:G.type==="system",ok:(Re=F==null?void 0:F.services.find(it=>it.name.toLowerCase().includes(G.reach)))==null?void 0:Re.ok,busy:w[G.id],onRestart:()=>Pe(G.id),onLogs:()=>{f(G.id),E("logs")}},G.id)})})]}),s.jsxs("div",{className:"space-y-2.5",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Backup"}),s.jsxs("div",{className:"rounded-lg border border-border/50 bg-background/20 px-3 py-2.5 flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs text-foreground truncate",children:Q[0]?`Letztes: ${Q[0].snapshot}`:"Noch kein Backup"}),s.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[Q.length," Snapshots · Restore per CLI (restore.sh)"]})]}),s.jsxs("button",{onClick:Ce,disabled:I,className:"flex items-center gap-1.5 text-[11px] font-semibold rounded-lg px-2.5 py-1 bg-primary text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50 shrink-0",children:[s.jsx($M,{className:ee("h-3.5 w-3.5",I&&"animate-pulse")})," Snapshot"]})]}),_&&s.jsx("div",{className:"text-[10px] font-mono text-primary bg-primary/5 p-2 rounded-lg border border-primary/20 break-all leading-normal",children:_})]}),s.jsxs("div",{className:"space-y-2.5",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-red-400/80",children:"Gefahrenzone"}),s.jsxs("button",{onClick:K,className:"flex w-full items-center gap-3 p-3 rounded-lg border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 text-red-400 transition-all text-left text-xs font-semibold",children:[s.jsx(h5,{className:"h-4.5 w-4.5"}),s.jsxs("div",{children:[s.jsx("div",{children:"Host-System neu starten"}),s.jsx("div",{className:"text-[10px] text-red-400/80 font-normal",children:"Startet die ganze Box neu"})]})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:"Hintergrund-Aufgaben"}),s.jsxs("span",{className:"text-[10px] font-mono bg-primary/10 text-primary px-1.5 py-0.5 rounded-full",children:[o.filter(G=>G.state==="running"||G.state==="queued").length," Aktiv"]})]}),s.jsx("div",{className:"space-y-3",children:o.length===0?s.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-xl p-6 text-center",children:"Aktuell keine aktiven Hintergrund-Jobs."}):o.map(G=>{const Re=G.state==="running"||G.state==="queued";return s.jsxs("div",{className:ee("p-3 rounded-xl border transition-all duration-300",Re?"border-primary/40 bg-primary/5 shadow-md shadow-primary/5":"border-border/40 bg-background/20 opacity-80"),children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"text-xs font-semibold flex items-center gap-1.5",children:[Re&&s.jsxs("span",{className:"flex h-2 w-2 relative",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),G.label]}),s.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground uppercase flex items-center gap-2",children:[s.jsxs("span",{children:["ID: ",G.id]}),s.jsx("span",{children:"•"}),s.jsx("span",{className:ee(G.state==="done"&&"text-emerald-400",G.state==="failed"&&"text-red-400",G.state==="running"&&"text-primary",G.state==="queued"&&"text-amber-400",G.state==="canceled"&&"text-muted-foreground"),children:G.state})]})]}),Re&&s.jsx("button",{onClick:()=>Ze(G.id),className:"text-[10px] font-semibold text-red-400 hover:text-red-300 border border-red-500/20 bg-red-500/5 hover:bg-red-500/10 px-2 py-0.5 rounded transition-colors",children:"Abbrechen"})]}),G.state==="running"&&s.jsxs("div",{className:"mt-3 space-y-1",children:[s.jsx("div",{className:"w-full h-1.5 bg-muted rounded-full overflow-hidden",children:s.jsx("div",{className:"h-full bg-primary transition-all duration-500",style:{width:`${G.progress??0}%`}})}),s.jsxs("div",{className:"flex justify-between items-center text-[9px] font-mono text-muted-foreground",children:[s.jsxs("span",{children:[G.progress??0,"%"]}),G.done_bytes!=null&&G.total_bytes!=null&&s.jsxs("span",{children:[bg(G.done_bytes)," / ",bg(G.total_bytes),G.rate_bps!=null&&` (${bg(G.rate_bps)}/s)`]}),G.eta_s!=null&&s.jsxs("span",{children:["ETA: ",G.eta_s,"s"]})]})]})]},G.id)})})]})]}),N==="logs"&&s.jsxs("div",{className:"flex flex-col h-full space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("select",{value:u,onChange:G=>f(G.target.value),className:"flex-1 h-9 px-3 text-xs bg-background/40 border border-border/60 rounded-lg outline-none text-foreground font-semibold",children:jk.map(G=>s.jsxs("option",{value:G.id,children:[G.label," (",G.type==="system"?"systemd-root":"user",")"]},G.id))}),s.jsxs("button",{onClick:()=>Pe(u),disabled:w[u],className:"flex h-9 px-3 items-center gap-1.5 text-xs font-semibold rounded-lg border border-border/60 bg-background/20 hover:border-primary/50 transition-colors disabled:opacity-50",title:"Dienst neu starten",children:[s.jsx(ho,{className:ee("h-3.5 w-3.5",w[u]&&"animate-spin")}),"Restart"]})]}),s.jsx(eL,{service:u,text:h,loading:p,logStatus:b,onRefresh:()=>te(u),onOpenSettings:()=>E("settings")})]}),N==="settings"&&s.jsx(tL,{open:e,showAlert:re})]})]}),pe&&s.jsx(rL,{detail:pe,maintenanceJob:et,onClose:()=>se(null),onApply:Be}),ae&&s.jsx(mE,{type:ae.type,title:ae.title,message:ae.message,onConfirm:ae.onConfirm,onCancel:ae.onCancel})]})}let Ov=[],_v=[];const Mv=new Set,bE=()=>Mv.forEach(e=>e());function wE(e){return Mv.add(e),()=>{Mv.delete(e)}}function nL(e){Ov=[...Ov,e].slice(-40),bE()}function iL(e){_v=[..._v,e].slice(-40),bE()}const aL=()=>x.useSyncExternalStore(wE,()=>Ov),oL=()=>x.useSyncExternalStore(wE,()=>_v);function sL(){const{data:e,dataUpdatedAt:t}=Co(3e3),{data:r,dataUpdatedAt:n}=dE(3e3),i=x.useRef(null);x.useEffect(()=>{var o,c,u,f;e&&nL({t:Date.now(),cpu:((o=e.cpu)==null?void 0:o.percent)??0,ram:((c=e.ram)==null?void 0:c.percent)??0,gpu:((u=e.gpu)==null?void 0:u.busy_percent)??null,disk:((f=e.disk)==null?void 0:f.percent)??null})},[t]),x.useEffect(()=>{if(!r)return;const o=Date.now(),c=r.prompt_tokens,u=r.completion_tokens;if(i.current){const f=Math.max((o-i.current.t)/1e3,.001);iL({t:o,prompt:Math.max(0,(c-i.current.p)/f),completion:Math.max(0,(u-i.current.c)/f)})}i.current={p:c,c:u,t:o}},[n])}function kE(){var A,_,O,I,B,F;const{data:e}=Kx(),{data:t}=uE(),{data:r}=Si(),{data:n}=Co(),i=!!e&&!!t,o=$=>{var Q;return(Q=t==null?void 0:t.services.find(U=>U.name.toLowerCase().includes($)))==null?void 0:Q.ok},c=e==null?void 0:e.engine_reachable,u=(A=e==null?void 0:e.brain)==null?void 0:A.ready,f=((_=e==null?void 0:e.brain)==null?void 0:_.model)||((O=r==null?void 0:r.models.find($=>$.role==="hermes"))==null?void 0:O.name)||"",h=[];h.push((()=>{const $={id:"brain",label:"Lucys Hirn",icon:Sa,critical:!0};return i?c===!1?{...$,status:"down",detail:"Die Motor-Maschine (Engine) läuft nicht — Lucy kann gerade gar nicht denken.",repair:{kind:"restart",service:"llama-swap",label:"Motor neu starten",needsSudo:!0}}:u===!1?{...$,status:"down",detail:"Lucys Hirn ist gerade eingeschlafen — einmal aufwecken.",repair:f?{kind:"loadModel",model:f,label:"Hirn aufwecken"}:void 0}:{...$,status:"ok",detail:"Wach und ansprechbar."}:{...$,status:"loading",detail:"Wird geprüft …"}})()),h.push((()=>{const $={id:"vision",label:"Lucys Augen",icon:Cc,critical:!1};if(!i||!r)return{...$,status:"loading",detail:"Wird geprüft …"};const Q=r.models.find(ge=>ge.role==="vision");return Q?(r.running??[]).includes(Q.name)?{...$,status:"ok",detail:"Sieht gerade zu (geladen, solange Lucy sie nutzt)."}:{...$,status:"ok",detail:"Augen ruhen — sie laden von selbst, sobald Lucy startet oder ein Bild kommt.",repair:{kind:"loadModel",model:Q.name,label:"Augen wecken"}}:{...$,status:"warn",detail:"Kein Augen-Modell eingerichtet — Lucy kann keine Bilder ansehen."}})()),h.push((()=>{const $={id:"memory",label:"Lucys Gedächtnis",icon:t5,critical:!0},Q=o("mem0");return!i||Q===void 0?{...$,status:"loading",detail:"Wird geprüft …"}:Q?{...$,status:"ok",detail:"Merkt sich Neues und findet Altes wieder."}:{...$,status:"down",detail:"Lucy kann sich gerade nichts merken — das Gedächtnis antwortet nicht.",repair:{kind:"restart",service:"mem0-service",label:"Gedächtnis neu starten"}}})()),h.push((()=>{const $={id:"gateway",label:"Verbindung (Gateway)",icon:Pc,critical:!0},Q=e?e.gateway_reachable:o("integriert");return!i||Q===void 0?{...$,status:"loading",detail:"Wird geprüft …"}:Q?{...$,status:"ok",detail:"Apps und IDEs können Lucy erreichen."}:{...$,status:"down",detail:"Die Verbindungs-Zentrale antwortet nicht — Apps erreichen Lucy nicht.",repair:{kind:"restart",service:"mission-control-2",label:"Zentrale neu starten"}}})()),h.push((()=>{const $={id:"agent",label:"Lucys Agent (Hermes)",icon:Hn,critical:!0},Q=o("hermes-gateway");return!i||Q===void 0?{...$,status:"loading",detail:"Wird geprüft …"}:Q?{...$,status:"ok",detail:"Lucy ist bereit zu reden und zu handeln."}:{...$,status:"down",detail:"Lucys Agent ist offline — sie reagiert gerade nicht.",repair:{kind:"restart",service:"hermes-gateway",label:"Agent neu starten"}}})()),h.push((()=>{const $={id:"voice",label:"Lucys Stimme",icon:uI,critical:!1},Q=o("voice");return!i||Q===void 0?{...$,status:"loading",detail:"Wird geprüft …"}:Q?{...$,status:"ok",detail:"Lucy kann hören und sprechen."}:{...$,status:"warn",detail:"Sprechen ist gerade aus — Tippen geht weiter normal.",repair:{kind:"restart",service:"voice-service",label:"Stimme neu starten"}}})());const m=((I=n==null?void 0:n.gpu)==null?void 0:I.gtt_total)||((B=n==null?void 0:n.gpu)==null?void 0:B.vram_total)||0,p=((F=n==null?void 0:n.gpu)==null?void 0:F.gtt_used)||0,v=m>0?Math.min(100,p/m*100):0,b=1024**3,S=m?v>=90?{status:"full",usedGb:p/b,totalGb:m/b,pct:v,text:"Speicher fast voll — Lucy könnte langsamer werden."}:v>=72?{status:"warn",usedGb:p/b,totalGb:m/b,pct:v,text:"Speicher gut gefüllt — noch okay."}:{status:"ok",usedGb:p/b,totalGb:m/b,pct:v,text:"Genug Speicher frei."}:{status:"unknown",usedGb:0,totalGb:0,pct:0,text:"Speicher-Auslastung unbekannt."},w=h.some($=>$.status==="loading"),k=h.filter($=>$.critical&&$.status==="down"),N=h.filter($=>$.status==="warn"||!$.critical&&$.status==="down"),E=S.status==="full";return{verdict:w&&!k.length?"loading":k.length?"problem":N.length||E?"warn":"gut",checks:h,memory:S,problems:k,warns:N}}const lL={ok:"bg-emerald-500",warn:"bg-amber-500",down:"bg-red-500",loading:"bg-muted-foreground/40"};function cL({frame:e="lucy"}={}){const{verdict:t,checks:r,memory:n,problems:i}=kE(),{showAlert:o,dialogElement:c}=Nn(),u=Hr(),[f,h]=x.useState({});async function m(k,N){h(E=>({...E,[k]:!0}));try{if(N.kind==="loadModel")await ye(`/api/models/${encodeURIComponent(N.model)}/load`,{method:"POST"});else{const E=await ye("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:N.service})});E.ok||o("Reparatur nicht ganz geklappt",(E.err||"Unbekannter Fehler")+(N.needsSudo?` - -Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}u.invalidateQueries({queryKey:$e.health}),u.invalidateQueries({queryKey:$e.services}),u.invalidateQueries({queryKey:$e.models})}catch(E){o("Reparatur fehlgeschlagen",String((E==null?void 0:E.message)||E))}finally{h(E=>({...E,[k]:!1}))}}const p=e==="box"?{loading:"Box wird geprüft …",gut:"Alles okay",warn:"Kleinigkeit an der Box",problem:"Box braucht Hilfe"}:{loading:"Lucy wird geprüft …",gut:"Lucy geht's gut 💚",warn:"Kleinigkeit bei Lucy",problem:"Lucy braucht Hilfe"},v={loading:{ring:"border-border/60 bg-card/45",icon:Bt,iconCls:"text-muted-foreground animate-spin",title:p.loading,sub:"Einen Moment, ich schaue nach dem Rechten."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:Rx,iconCls:"text-emerald-400",title:p.gut,sub:"Alle wichtigen Fähigkeiten laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:vr,iconCls:"text-amber-400",title:p.warn,sub:"Nichts Schlimmes — nur ein Hinweis."},problem:{ring:"border-red-500/50 bg-red-500/5",icon:vr,iconCls:"text-red-400",title:p.problem,sub:`${i.length} wichtige${i.length===1?"s":""} Problem${i.length===1?"":"e"} gefunden.`}}[t],b=v.icon,S={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[n.status],w={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[n.status];return s.jsxs("div",{className:ee("rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors",v.ring),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:s.jsx(b,{className:ee("h-6 w-6",v.iconCls)})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:v.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:v.sub})]})]}),s.jsxs("div",{className:"mt-4 rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[s.jsx(ga,{className:"h-3.5 w-3.5"})," Speicher"]}),s.jsx("span",{className:ee("font-mono font-bold",w),children:n.status==="unknown"?"—":`${n.usedGb.toFixed(0)} / ${n.totalGb.toFixed(0)} GB`})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:s.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",S),style:{width:`${n.pct}%`}})}),s.jsx("p",{className:ee("mt-1.5 text-[11px]",w),children:n.text})]}),s.jsx("div",{className:"mt-4 space-y-1.5",children:r.map(k=>s.jsx(uL,{c:k,busy:!!f[k.id],onRepair:()=>k.repair&&m(k.id,k.repair)},k.id))}),c]})}function uL({c:e,busy:t,onRepair:r}){const n=e.icon,i=e.status==="down"||e.status==="warn";return s.jsxs("div",{className:ee("flex items-center justify-between gap-3 rounded-xl border p-2.5 transition-colors",e.status==="down"?"border-red-500/25 bg-red-500/5":e.status==="warn"?"border-amber-500/20 bg-amber-500/5":"border-border/30 bg-background/15"),children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[s.jsxs("span",{className:"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-foreground/80",children:[s.jsx(n,{className:"h-4 w-4"}),s.jsx("span",{className:ee("absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full ring-2 ring-black/40",lL[e.status],e.status==="down"&&"animate-pulse")})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold text-foreground",children:[e.label,e.status==="ok"&&s.jsx(Mt,{className:"h-3 w-3 text-emerald-400"}),!e.critical&&s.jsx("span",{className:"rounded bg-background/40 px-1 py-0.5 text-[8px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:"optional"})]}),s.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:e.detail})]})]}),i&&e.repair&&s.jsxs("button",{onClick:r,disabled:t,className:ee("flex h-8 shrink-0 items-center gap-1.5 rounded-lg border px-2.5 text-[10px] font-bold uppercase tracking-wide transition-all cursor-pointer disabled:opacity-60",e.status==="down"?"border-red-500/40 bg-red-500/10 text-red-300 hover:bg-red-500/20":"border-amber-500/40 bg-amber-500/10 text-amber-300 hover:bg-amber-500/20"),title:e.repair.label,children:[t?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(tu,{className:"h-3.5 w-3.5"}),e.repair.label]}),i&&!e.repair&&s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] font-semibold text-muted-foreground",title:"Keine Auto-Reparatur bekannt",children:[s.jsx(xI,{className:"h-3.5 w-3.5"})," manuell"]})]})}function dL(){const{data:e,error:t}=Co(3e3),r=aL();return{sys:e,hist:r,error:t}}var fL=["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"];function Qx(e){if(typeof e!="string")return!1;var t=fL;return t.includes(e)}var hL=["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"],mL=new Set(hL);function jE(e){return typeof e!="string"?!1:mL.has(e)}function SE(e){return typeof e=="string"&&e.startsWith("data-")}function kn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(jE(r)||SE(r))&&(t[r]=e[r]);return t}function kh(e){if(e==null)return null;if(x.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return kn(t)}return typeof e=="object"&&!Array.isArray(e)?kn(e):null}function nn(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(jE(r)||SE(r)||Qx(r))&&(t[r]=e[r]);return t}function pL(e){return e==null?null:x.isValidElement(e)?nn(e.props):typeof e=="object"&&!Array.isArray(e)?nn(e):null}var gL=["children","width","height","viewBox","className","style","title","desc"];function Iv(){return Iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.width,i=e.height,o=e.viewBox,c=e.className,u=e.style,f=e.title,h=e.desc,m=vL(e,gL),p=o||{width:n,height:i,x:0,y:0},v=nt("recharts-surface",c);return x.createElement("svg",Iv({},nn(m),{className:v,width:n,height:i,style:u,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:t}),x.createElement("title",null,f),x.createElement("desc",null,h),r)}),yL=["children","className"];function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=e.children,n=e.className,i=bL(e,yL),o=nt("recharts-layer",n);return x.createElement("g",Tv({className:o},nn(i),{ref:t}),r)}),kL=x.createContext(null);function yt(e){return function(){return e}}const Dv=Math.PI,Rv=2*Dv,Va=1e-6,jL=Rv-Va;function EE(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return EE;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;iVa)if(!(Math.abs(p*f-h*m)>Va)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let b=n-c,S=i-u,w=f*f+h*h,k=b*b+S*S,N=Math.sqrt(w),E=Math.sqrt(v),C=o*Math.tan((Dv-Math.acos((w+v-k)/(2*N*E)))/2),A=C/E,_=C/N;Math.abs(A-1)>Va&&this._append`L${t+A*m},${r+A*p}`,this._append`A${o},${o},0,0,${+(p*b>m*S)},${this._x1=t+_*f},${this._y1=r+_*h}`}}arc(t,r,n,i,o,c){if(t=+t,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),f=n*Math.sin(i),h=t+u,m=r+f,p=1^c,v=c?i-o:o-i;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>Va||Math.abs(this._y1-m)>Va)&&this._append`L${h},${m}`,n&&(v<0&&(v=v%Rv+Rv),v>jL?this._append`A${n},${n},0,1,${p},${t-u},${r-f}A${n},${n},0,1,${p},${this._x1=h},${this._y1=m}`:v>Va&&this._append`A${n},${n},0,${+(v>=Dv)},${p},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function AE(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new NL(t)}function Yx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function CE(e){this._context=e}CE.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 jh(e){return new CE(e)}function PE(e){return e[0]}function OE(e){return e[1]}function _E(e,t){var r=yt(!0),n=null,i=jh,o=null,c=AE(u);e=typeof e=="function"?e:e===void 0?PE:yt(e),t=typeof t=="function"?t:t===void 0?OE:yt(t);function u(f){var h,m=(f=Yx(f)).length,p,v=!1,b;for(n==null&&(o=i(b=c())),h=0;h<=m;++h)!(h=b;--S)u.point(C[S],A[S]);u.lineEnd(),u.areaEnd()}N&&(C[v]=+e(k,v,p),A[v]=+t(k,v,p),u.point(n?+n(k,v,p):C[v],r?+r(k,v,p):A[v]))}if(E)return u=null,E+""||null}function m(){return _E().defined(i).curve(c).context(o)}return h.x=function(p){return arguments.length?(e=typeof p=="function"?p:yt(+p),n=null,h):e},h.x0=function(p){return arguments.length?(e=typeof p=="function"?p:yt(+p),h):e},h.x1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:yt(+p),h):n},h.y=function(p){return arguments.length?(t=typeof p=="function"?p:yt(+p),r=null,h):t},h.y0=function(p){return arguments.length?(t=typeof p=="function"?p:yt(+p),h):t},h.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:yt(+p),h):r},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(r)},h.lineX1=function(){return m().x(n).y(t)},h.defined=function(p){return arguments.length?(i=typeof p=="function"?p:yt(!!p),h):i},h.curve=function(p){return arguments.length?(c=p,o!=null&&(u=c(o)),h):c},h.context=function(p){return arguments.length?(p==null?o=u=null:u=c(o=p),h):o},h}class ME{constructor(t,r){this._context=t,this._x=r}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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function EL(e){return new ME(e,!0)}function AL(e){return new ME(e,!1)}function vf(){}function xf(e,t,r){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+r)/6)}function IE(e){this._context=e}IE.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:xf(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:xf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function CL(e){return new IE(e)}function TE(e){this._context=e}TE.prototype={areaStart:vf,areaEnd:vf,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:xf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function PL(e){return new TE(e)}function DE(e){this._context=e}DE.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:xf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function OL(e){return new DE(e)}function RE(e){this._context=e}RE.prototype={areaStart:vf,areaEnd:vf,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 _L(e){return new RE(e)}function Sk(e){return e<0?-1:1}function Nk(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),c=(r-e._y1)/(i||n<0&&-0),u=(o*i+c*n)/(n+i);return(Sk(o)+Sk(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(u))||0}function Ek(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function wg(e,t,r){var n=e._x0,i=e._y0,o=e._x1,c=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,i+u*t,o-u,c-u*r,o,c)}function yf(e){this._context=e}yf.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:wg(this,this._t0,Ek(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 r=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,wg(this,Ek(this,r=Nk(this,e,t)),r);break;default:wg(this,this._t0,r=Nk(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function LE(e){this._context=new $E(e)}(LE.prototype=Object.create(yf.prototype)).point=function(e,t){yf.prototype.point.call(this,t,e)};function $E(e){this._context=e}$E.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,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function ML(e){return new yf(e)}function IL(e){return new LE(e)}function zE(e){this._context=e}zE.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Ak(e),i=Ak(t),o=0,c=1;c=0;--t)i[t]=(c[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function DL(e){return new Sh(e,.5)}function RL(e){return new Sh(e,0)}function LL(e){return new Sh(e,1)}function yo(e,t){if((c=e.length)>1)for(var r=1,n,i,o=e[t[0]],c,u=o.length;r=0;)r[t]=t;return r}function $L(e,t){return e[t]}function zL(e){const t=[];return t.key=e,t}function FL(){var e=yt([]),t=Lv,r=yo,n=$L;function i(o){var c=Array.from(e.apply(this,arguments),zL),u,f=c.length,h=-1,m;for(const p of o)for(u=0,++h;u0){for(var r,n,i=0,o=e[0].length,c;i0){for(var r=0,n=e[t[0]],i,o=n.length;r0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,c;n1&&arguments[1]!==void 0?arguments[1]:KL,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function qt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{var u=r[c-1];return typeof u=="string"?i+u+o:u!==void 0?i+ma(u)+o:i+o},"")}var en=e=>e===0?0:e>0?1:-1,Gn=e=>typeof e=="number"&&e!=+e,bo=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,Ae=e=>(typeof e=="number"||e instanceof Number)&&!Gn(e),Vn=e=>Ae(e)||typeof e=="string",GL=0,Mc=e=>{var t=++GL;return"".concat(e||"").concat(t)},ja=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ae(t)&&typeof t!="string")return n;var o;if(bo(t)){if(r==null)return n;var c=t.indexOf("%");o=r*parseFloat(t.slice(0,c))/100}else o=+t;return Gn(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},UE=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;nn&&(typeof t=="function"?t(n):Po(n,t))===r)}var Xt=e=>e===null||typeof e>"u",Jx=e=>Xt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Cr(e){return e!=null}function al(){}var HE=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,e0=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(x.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Qx(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},VL=(e,t,r)=>n=>(e(t,r,n),null),qL=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];Qx(i)&&typeof o=="function"&&(n||(n={}),n[i]=VL(o,t,r))}),n};function Ck(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function QL(e){for(var t=1;t(c[u]===void 0&&n[u]!==void 0&&(c[u]=n[u]),c),r);return o}function JL(e,t){const r=new Map;for(let n=0;nObject.prototype.propertyIsEnumerable.call(e,t))}function t0(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const i6="[object RegExp]",GE="[object String]",VE="[object Number]",qE="[object Boolean]",QE="[object Arguments]",a6="[object Symbol]",o6="[object Date]",s6="[object Map]",l6="[object Set]",c6="[object Array]",u6="[object ArrayBuffer]",d6="[object Object]",f6="[object DataView]",h6="[object Uint8Array]",m6="[object Uint8ClampedArray]",p6="[object Uint16Array]",g6="[object Uint32Array]",v6="[object Int8Array]",x6="[object Int16Array]",y6="[object Int32Array]",b6="[object Float32Array]",w6="[object Float64Array]",Pk=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function k6(e){return typeof Pk.Buffer<"u"&&Pk.Buffer.isBuffer(e)}function j6(e,t){return Za(e,void 0,e,new Map,t)}function Za(e,t,r,n=new Map,i=void 0){const o=i==null?void 0:i(e,t,r,n);if(o!==void 0)return o;if(zv(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const c=new Array(e.length);n.set(e,c);for(let u=0;u{}):Fv(e,t,function n(i,o,c,u,f,h){const m=r(i,o,c,u,f,h);return m!==void 0?!!m:Fv(i,o,n,h,!1)},new Map,!0)}function Fv(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return E6(e,t,r,n);case"function":return Object.keys(t).length>0?Fv(e,{...t},r,n,i):nf(e,t);default:return YE(e)&&i?typeof t=="string"?t==="":!0:nf(e,t)}}function E6(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return XE(e,t,r,n);if(t instanceof Map)return A6(e,t,r,n);if(t instanceof Set)return C6(e,t,r,n);const i=Object.keys(t);if(e==null||zv(e))return i.length===0;if(i.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o{})}function P6(e){return e=N6(e),t=>JE(t,e)}function O6(e,t){return j6(e,(r,n,i,o)=>{if(typeof e=="object"){if(t0(e)==="[object Object]"&&typeof e.constructor!="function"){const c={};return o.set(e,c),vn(c,e,i,o),c}switch(Object.prototype.toString.call(e)){case VE:case GE:case qE:{const c=new e.constructor(e==null?void 0:e.valueOf());return vn(c,e),c}case QE:{const c={};return vn(c,e),c.length=e.length,c[Symbol.iterator]=e[Symbol.iterator],c}default:return}}})}function _6(e){return O6(e)}const M6=/^(?:0|[1-9]\d*)$/;function eA(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e=0}function tA(e){return e!=null&&typeof e!="function"&&L6(e.length)}function $6(e){return typeof e=="object"&&e!==null}function z6(e){return $6(e)&&tA(e)}function Ok(e,t=KE){return z6(e)?JL(Array.from(e),e6(R6(t),1)):[]}function F6(e,t,r){return t===!0?Ok(e,r):typeof t=="function"?Ok(e,t):e}var kg={exports:{}},jg={},Sg={exports:{}},Ng={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var _k;function B6(){if(_k)return Ng;_k=1;var e=el();function t(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function u(p,v){var b=v(),S=n({inst:{value:b,getSnapshot:v}}),w=S[0].inst,k=S[1];return o(function(){w.value=b,w.getSnapshot=v,f(w)&&k({inst:w})},[p,b,v]),i(function(){return f(w)&&k({inst:w}),p(function(){f(w)&&k({inst:w})})},[p]),c(b),b}function f(p){var v=p.getSnapshot;p=p.value;try{var b=v();return!r(p,b)}catch{return!0}}function h(p,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return Ng.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Ng}var Mk;function U6(){return Mk||(Mk=1,Sg.exports=B6()),Sg.exports}/** - * @license React - * use-sync-external-store-shim/with-selector.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ik;function W6(){if(Ik)return jg;Ik=1;var e=el(),t=U6();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,c=e.useEffect,u=e.useMemo,f=e.useDebugValue;return jg.useSyncExternalStoreWithSelector=function(h,m,p,v,b){var S=o(null);if(S.current===null){var w={hasValue:!1,value:null};S.current=w}else w=S.current;S=u(function(){function N(O){if(!E){if(E=!0,C=O,O=v(O),b!==void 0&&w.hasValue){var I=w.value;if(b(I,O))return A=I}return A=O}if(I=A,n(C,O))return I;var B=v(O);return b!==void 0&&b(I,B)?(C=O,I):(C=O,A=B)}var E=!1,C,A,_=p===void 0?null:p;return[function(){return N(m())},_===null?void 0:function(){return N(_())}]},[m,p,v,b]);var k=i(h,S[0],S[1]);return c(function(){w.hasValue=!0,w.value=k},[k]),f(k),k},jg}var Tk;function H6(){return Tk||(Tk=1,kg.exports=W6()),kg.exports}var K6=H6(),r0=x.createContext(null),G6=e=>e,At=()=>{var e=x.useContext(r0);return e?e.store.dispatch:G6},af=()=>{},V6=()=>af,q6=(e,t)=>e===t;function Me(e){var t=x.useContext(r0),r=x.useMemo(()=>t?n=>{if(n!=null)return e(n)}:af,[t,e]);return K6.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:V6,t?t.store.getState:af,t?t.store.getState:af,r,q6)}function Q6(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Y6(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Dk=e=>Array.isArray(e)?e:[e];function Z6(e){const t=Array.isArray(e[0])?e[0]:e;return Y6(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function X6(e,t){const r=[],{length:n}=e;for(let i=0;itypeof WeakRef>"u"?J6:WeakRef,rA=e$(),t$=0,Rk=1;function zd(){return{s:t$,v:void 0,o:null,p:null}}function r$(e){return e instanceof rA?e.deref():e}function nA(e,t={}){let r=zd();const{resultEqualityCheck:n}=t;let i,o=0;function c(){let u=r;const{length:f}=arguments;for(let p=0,v=f;p{r=zd(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}function n$(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,c=0,u,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),Q6(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...f},{memoize:p,memoizeOptions:v=[],argsMemoize:b=nA,argsMemoizeOptions:S=[]}=m,w=Dk(v),k=Dk(S),N=Z6(i),E=p(function(){return o++,h.apply(null,arguments)},...w),C=b(function(){c++;const _=X6(N,arguments);return u=E.apply(null,_),u},...k);return Object.assign(C,{resultFunc:h,memoizedResultFunc:E,dependencies:N,dependencyRecomputations:()=>c,resetDependencyRecomputations:()=>{c=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:b})};return Object.assign(n,{withTypes:()=>n}),n}var Y=n$(nA);function i$(e,t=1){const r=[],n=Math.floor(t),i=(o,c)=>{for(let u=0;u{if(e!==t){const n=Lk(e),i=Lk(t);if(n===i&&n===0){if(et)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function iA(e){return typeof e=="symbol"||e instanceof Symbol}const o$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s$=/^\w*$/;function l$(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||iA(e)?!0:typeof e=="string"&&(s$.test(e)||!o$.test(e))||t!=null}function c$(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(u=>String(u));const i=(u,f)=>{let h=u;for(let m=0;mf==null||u==null?f:typeof u=="object"&&"key"in u?Object.hasOwn(f,u.key)?f[u.key]:i(f,u.path):typeof u=="function"?u(f):Array.isArray(u)?i(f,u):typeof f=="object"?f[u]:f,c=t.map(u=>(Array.isArray(u)&&u.length===1&&(u=u[0]),u==null||typeof u=="function"||Array.isArray(u)||l$(u)?u:{key:u,path:Xx(u)}));return e.map(u=>({original:u,criteria:c.map(f=>o(f,u))})).slice().sort((u,f)=>{for(let h=0;hu.original)}function Nh(e,...t){const r=t.length;return r>1&&Bv(e,t[0],t[1])?t=[]:r>2&&Bv(t[0],t[1],t[2])&&(t=[t[0]]),c$(e,i$(t),["asc"])}var aA=e=>e.legend.settings,u$=e=>e.legend.size,d$=e=>e.legend.payload;Y([d$,aA],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?Nh(n,r):n});function f$(e,t){return g$(e)||p$(e,t)||m$(e,t)||h$()}function h$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -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 $k(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$k(e,t):void 0}}function $k(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rFd||Math.abs(e.left-t.left)>Fd||Math.abs(e.top-t.top)>Fd||Math.abs(e.width-t.width)>Fd}function Fk(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function v$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=x.useState({height:0,left:0,top:0,width:0}),r=f$(t,2),n=r[0],i=r[1],o=x.useRef(null),c=x.useRef(n);c.current=n;var u=x.useCallback(f=>{if(o.current!=null&&(o.current.disconnect(),o.current=null),f!=null){var h=Fk(f);if(zk(h,c.current)&&i(h),typeof ResizeObserver<"u"){var m=new ResizeObserver(()=>{var p=Fk(f);zk(p,c.current)&&i(p)});m.observe(f),o.current=m}}},[...e]);return x.useEffect(()=>()=>{var f;(f=o.current)===null||f===void 0||f.disconnect()},[]),[n,u]}function Vt(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 x$=typeof Symbol=="function"&&Symbol.observable||"@@observable",Bk=x$,Eg=()=>Math.random().toString(36).substring(7).split("").join("."),y$={INIT:`@@redux/INIT${Eg()}`,REPLACE:`@@redux/REPLACE${Eg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Eg()}`},bf=y$;function n0(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function oA(e,t,r){if(typeof e!="function")throw new Error(Vt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Vt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Vt(1));return r(oA)(e,t)}let n=e,i=t,o=new Map,c=o,u=0,f=!1;function h(){c===o&&(c=new Map,o.forEach((k,N)=>{c.set(N,k)}))}function m(){if(f)throw new Error(Vt(3));return i}function p(k){if(typeof k!="function")throw new Error(Vt(4));if(f)throw new Error(Vt(5));let N=!0;h();const E=u++;return c.set(E,k),function(){if(N){if(f)throw new Error(Vt(6));N=!1,h(),c.delete(E),o=null}}}function v(k){if(!n0(k))throw new Error(Vt(7));if(typeof k.type>"u")throw new Error(Vt(8));if(typeof k.type!="string")throw new Error(Vt(17));if(f)throw new Error(Vt(9));try{f=!0,i=n(i,k)}finally{f=!1}return(o=c).forEach(E=>{E()}),k}function b(k){if(typeof k!="function")throw new Error(Vt(10));n=k,v({type:bf.REPLACE})}function S(){const k=p;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Vt(11));function E(){const A=N;A.next&&A.next(m())}return E(),{unsubscribe:k(E)}},[Bk](){return this}}}return v({type:bf.INIT}),{dispatch:v,subscribe:p,getState:m,replaceReducer:b,[Bk]:S}}function b$(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:bf.INIT})>"u")throw new Error(Vt(12));if(typeof r(void 0,{type:bf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Vt(13))})}function sA(e){const t=Object.keys(e),r={};for(let o=0;o"u")throw u&&u.type,new Error(Vt(14));h[p]=S,f=f||S!==b}return f=f||n.length!==Object.keys(c).length,f?h:c}}function wf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function w$(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(Vt(15))};const c={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},u=e.map(f=>f(c));return o=wf(...u)(i.dispatch),{...i,dispatch:o}}}function lA(e){return n0(e)&&"type"in e&&typeof e.type=="string"}var cA=Symbol.for("immer-nothing"),Uk=Symbol.for("immer-draftable"),xr=Symbol.for("immer-state");function yn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zr=Object,Ks=zr.getPrototypeOf,kf="constructor",Eh="prototype",Uv="configurable",jf="enumerable",of="writable",Ic="value",bi=e=>!!e&&!!e[xr];function jn(e){var t;return e?uA(e)||Ch(e)||!!e[Uk]||!!((t=e[kf])!=null&&t[Uk])||Ph(e)||Oh(e):!1}var k$=zr[Eh][kf].toString(),Wk=new WeakMap;function uA(e){if(!e||!i0(e))return!1;const t=Ks(e);if(t===null||t===zr[Eh])return!0;const r=zr.hasOwnProperty.call(t,kf)&&t[kf];if(r===Object)return!0;if(!ys(r))return!1;let n=Wk.get(r);return n===void 0&&(n=Function.toString.call(r),Wk.set(r,n)),n===k$}function Ah(e,t,r=!0){nu(e)===0?(r?Reflect.ownKeys(e):zr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function nu(e){const t=e[xr];return t?t.type_:Ch(e)?1:Ph(e)?2:Oh(e)?3:0}var Hk=(e,t,r=nu(e))=>r===2?e.has(t):zr[Eh].hasOwnProperty.call(e,t),Wv=(e,t,r=nu(e))=>r===2?e.get(t):e[t],Sf=(e,t,r,n=nu(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function j$(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ch=Array.isArray,Ph=e=>e instanceof Map,Oh=e=>e instanceof Set,i0=e=>typeof e=="object",ys=e=>typeof e=="function",Ag=e=>typeof e=="boolean";function S$(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ci=e=>e.copy_||e.base_,a0=e=>e.modified_?e.copy_:e.base_;function Hv(e,t){if(Ph(e))return new Map(e);if(Oh(e))return new Set(e);if(Ch(e))return Array[Eh].slice.call(e);const r=uA(e);if(t===!0||t==="class_only"&&!r){const n=zr.getOwnPropertyDescriptors(e);delete n[xr];let i=Reflect.ownKeys(n);for(let o=0;o1&&zr.defineProperties(e,{set:Bd,add:Bd,clear:Bd,delete:Bd}),zr.freeze(e),t&&Ah(e,(r,n)=>{o0(n,!0)},!1)),e}function N$(){yn(2)}var Bd={[Ic]:N$};function _h(e){return e===null||!i0(e)?!0:zr.isFrozen(e)}var Nf="MapSet",Kv="Patches",Kk="ArrayMethods",dA={};function wo(e){const t=dA[e];return t||yn(0,e),t}var Gk=e=>!!dA[e],Tc,fA=()=>Tc,E$=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Gk(Nf)?wo(Nf):void 0,arrayMethodsPlugin_:Gk(Kk)?wo(Kk):void 0});function Vk(e,t){t&&(e.patchPlugin_=wo(Kv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gv(e){Vv(e),e.drafts_.forEach(A$),e.drafts_=null}function Vv(e){e===Tc&&(Tc=e.parent_)}var qk=e=>Tc=E$(Tc,e);function A$(e){const t=e[xr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Qk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[xr].modified_&&(Gv(t),yn(4)),jn(e)&&(e=Yk(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[xr].base_,e,t)}else e=Yk(t,r);return C$(t,e,!0),Gv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==cA?e:void 0}function Yk(e,t){if(_h(t))return t;const r=t[xr];if(!r)return Ef(t,e.handledSet_,e);if(!Mh(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);pA(r,e)}return r.copy_}function C$(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&o0(t,r)}function hA(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Mh=(e,t)=>e.scope_===t,P$=[];function mA(e,t,r,n){const i=ci(e),o=e.type_;if(n!==void 0&&Wv(i,n,o)===t){Sf(i,n,r,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Ah(i,(f,h)=>{if(bi(h)){const m=u.get(h)||[];m.push(f),u.set(h,m)}})}const c=e.draftLocations_.get(t)??P$;for(const u of c)Sf(i,u,r,o)}function O$(e,t,r){e.callbacks_.push(function(i){var u;const o=t;if(!o||!Mh(o,i))return;(u=i.mapSetPlugin_)==null||u.fixSetContents(o);const c=a0(o);mA(e,o.draft_??o,c,r),pA(o,i)})}function pA(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}hA(e)}}function _$(e,t,r){const{scope_:n}=e;if(bi(r)){const i=r[xr];Mh(i,n)&&i.callbacks_.push(function(){sf(e);const c=a0(i);mA(e,r,c,t)})}else jn(r)&&e.callbacks_.push(function(){const o=ci(e);e.type_===3?o.has(r)&&Ef(r,n.handledSet_,n):Wv(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ef(Wv(e.copy_,t,e.type_),n.handledSet_,n)})}function Ef(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||bi(e)||t.has(e)||!jn(e)||_h(e)||(t.add(e),Ah(e,(n,i)=>{if(bi(i)){const o=i[xr];if(Mh(o,r)){const c=a0(o);Sf(e,n,c,e.type_),hA(o)}}else jn(i)&&Ef(i,t,r)})),e}function M$(e,t){const r=Ch(e),n={type_:r?1:0,scope_:t?t.scope_:fA(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,o=Af;r&&(i=[n],o=Dc);const{revoke:c,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=c,[u,n]}var Af={get(e,t){if(t===xr)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=ci(e);if(!Hk(i,t,e.type_))return I$(e,i,t);const o=i[t];if(e.finalized_||!jn(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&S$(t))return o;if(o===Cg(e.base_,t)){sf(e);const c=e.type_===1?+t:t,u=Qv(e.scope_,o,e,c);return e.copy_[c]=u}return o},has(e,t){return t in ci(e)},ownKeys(e){return Reflect.ownKeys(ci(e))},set(e,t,r){const n=gA(ci(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Cg(ci(e),t),o=i==null?void 0:i[xr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(j$(r,i)&&(r!==void 0||Hk(e.base_,t,e.type_)))return!0;sf(e),qv(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),_$(e,t,r)),!0},deleteProperty(e,t){return sf(e),Cg(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),qv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ci(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[of]:!0,[Uv]:e.type_!==1||t!=="length",[jf]:n[jf],[Ic]:r[t]}},defineProperty(){yn(11)},getPrototypeOf(e){return Ks(e.base_)},setPrototypeOf(){yn(12)}},Dc={};for(let e in Af){let t=Af[e];Dc[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Dc.deleteProperty=function(e,t){return Dc.set.call(this,e,t,void 0)};Dc.set=function(e,t,r){return Af.set.call(this,e[0],t,r,e[0])};function Cg(e,t){const r=e[xr];return(r?ci(r):e)[t]}function I$(e,t,r){var i;const n=gA(t,r);return n?Ic in n?n[Ic]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function gA(e,t){if(!(t in e))return;let r=Ks(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ks(r)}}function qv(e){e.modified_||(e.modified_=!0,e.parent_&&qv(e.parent_))}function sf(e){e.copy_||(e.assigned_=new Map,e.copy_=Hv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var T$=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(ys(r)&&!ys(n)){const c=n;n=r;const u=this;return function(h=c,...m){return u.produce(h,p=>n.call(this,p,...m))}}ys(n)||yn(6),i!==void 0&&!ys(i)&&yn(7);let o;if(jn(r)){const c=qk(this),u=Qv(c,r,void 0);let f=!0;try{o=n(u),f=!1}finally{f?Gv(c):Vv(c)}return Vk(c,i),Qk(o,c)}else if(!r||!i0(r)){if(o=n(r),o===void 0&&(o=r),o===cA&&(o=void 0),this.autoFreeze_&&o0(o,!0),i){const c=[],u=[];wo(Kv).generateReplacementPatches_(r,o,{patches_:c,inversePatches_:u}),i(c,u)}return o}else yn(1,r)},this.produceWithPatches=(r,n)=>{if(ys(r))return(u,...f)=>this.produceWithPatches(u,h=>r(h,...f));let i,o;return[this.produce(r,n,(u,f)=>{i=u,o=f}),i,o]},Ag(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Ag(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Ag(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){jn(t)||yn(8),bi(t)&&(t=tn(t));const r=qk(this),n=Qv(r,t,void 0);return n[xr].isManual_=!0,Vv(r),n}finishDraft(t,r){const n=t&&t[xr];(!n||!n.isManual_)&&yn(9);const{scope_:i}=n;return Vk(i,r),Qk(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const i=wo(Kv).applyPatches_;return bi(t)?i(t,r):this.produce(t,o=>i(o,r))}};function Qv(e,t,r,n){const[i,o]=Ph(t)?wo(Nf).proxyMap_(t,r):Oh(t)?wo(Nf).proxySet_(t,r):M$(t,r);return((r==null?void 0:r.scope_)??fA()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?O$(r,o,n):o.callbacks_.push(function(f){var m;(m=f.mapSetPlugin_)==null||m.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function tn(e){return bi(e)||yn(10,e),vA(e)}function vA(e){if(!jn(e)||_h(e))return e;const t=e[xr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Hv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Hv(e,!0);return Ah(r,(i,o)=>{Sf(r,i,vA(o))},n),t&&(t.finalized_=!1),r}var D$=new T$,xA=D$.produce;function yA(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var R$=yA(),L$=yA,$$=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wf:wf.apply(null,arguments)};function Ur(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Fr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>lA(n)&&n.type===e,r}var bA=class xc extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,xc.prototype)}static get[Symbol.species](){return xc}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new xc(...t[0].concat(this)):new xc(...t.concat(this))}};function Zk(e){return jn(e)?xA(e,()=>{}):e}function Ud(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function z$(e){return typeof e=="boolean"}var F$=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let c=new bA;return r&&(z$(r)?c.push(R$):c.push(L$(r.extraArgument))),c},wA="RTK_autoBatch",lt=()=>e=>({payload:e,meta:{[wA]:!0}}),Xk=e=>t=>{setTimeout(t,e)},B$=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(c),r())},o=e(i),c=setTimeout(i,t)},kA=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,c=!1;const u=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?B$(window.requestAnimationFrame,100):Xk(10):e.type==="callback"?e.queueNotification:Xk(e.timeout),h=()=>{c=!1,o&&(o=!1,u.forEach(m=>m()))};return Object.assign({},n,{subscribe(m){const p=()=>i&&m(),v=n.subscribe(p);return u.add(m),()=>{v(),u.delete(m)}},dispatch(m){var p;try{return i=!((p=m==null?void 0:m.meta)!=null&&p[wA]),o=!i,o&&(c||(c=!0,f(h))),n.dispatch(m)}finally{i=!0}}})},U$=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new bA(e);return n&&i.push(kA(typeof n=="object"?n:void 0)),i};function W$(e){const t=F$(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:c=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(n0(r))u=sA(r);else throw new Error(Fr(1));let f;typeof n=="function"?f=n(t):f=t();let h=wf;i&&(h=$$({trace:!1,...typeof i=="object"&&i}));const m=w$(...f),p=U$(m);let v=typeof c=="function"?c(p):p();const b=h(...v);return oA(u,o,b)}function jA(e){const t={},r=[];let n;const i={addCase(o,c){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Fr(28));if(u in t)throw new Error(Fr(29));return t[u]=c,i},addAsyncThunk(o,c){return c.pending&&(t[o.pending.type]=c.pending),c.rejected&&(t[o.rejected.type]=c.rejected),c.fulfilled&&(t[o.fulfilled.type]=c.fulfilled),c.settled&&r.push({matcher:o.settled,reducer:c.settled}),i},addMatcher(o,c){return r.push({matcher:o,reducer:c}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function H$(e){return typeof e=="function"}function K$(e,t){let[r,n,i]=jA(t),o;if(H$(e))o=()=>Zk(e());else{const u=Zk(e);o=()=>u}function c(u=o(),f){let h=[r[f.type],...n.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,p)=>{if(p)if(bi(m)){const b=p(m,f);return b===void 0?m:b}else{if(jn(m))return xA(m,v=>p(v,f));{const v=p(m,f);if(v===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return m},u)}return c.getInitialState=o,c}var G$="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",V$=(e=21)=>{let t="",r=e;for(;r--;)t+=G$[Math.random()*64|0];return t},q$=Symbol.for("rtk-slice-createasyncthunk");function Q$(e,t){return`${e}/${t}`}function Y$({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[q$];return function(i){const{name:o,reducerPath:c=o}=i;if(!o)throw new Error(Fr(11));const u=(typeof i.reducers=="function"?i.reducers(X$()):i.reducers)||{},f=Object.keys(u),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(A,_){const O=typeof A=="string"?A:A.type;if(!O)throw new Error(Fr(12));if(O in h.sliceCaseReducersByType)throw new Error(Fr(13));return h.sliceCaseReducersByType[O]=_,m},addMatcher(A,_){return h.sliceMatchers.push({matcher:A,reducer:_}),m},exposeAction(A,_){return h.actionCreators[A]=_,m},exposeCaseReducer(A,_){return h.sliceCaseReducersByName[A]=_,m}};f.forEach(A=>{const _=u[A],O={reducerName:A,type:Q$(o,A),createNotation:typeof i.reducers=="function"};ez(_)?rz(O,_,m,t):J$(O,_,m)});function p(){const[A={},_=[],O=void 0]=typeof i.extraReducers=="function"?jA(i.extraReducers):[i.extraReducers],I={...A,...h.sliceCaseReducersByType};return K$(i.initialState,B=>{for(let F in I)B.addCase(F,I[F]);for(let F of h.sliceMatchers)B.addMatcher(F.matcher,F.reducer);for(let F of _)B.addMatcher(F.matcher,F.reducer);O&&B.addDefaultCase(O)})}const v=A=>A,b=new Map,S=new WeakMap;let w;function k(A,_){return w||(w=p()),w(A,_)}function N(){return w||(w=p()),w.getInitialState()}function E(A,_=!1){function O(B){let F=B[A];return typeof F>"u"&&_&&(F=Ud(S,O,N)),F}function I(B=v){const F=Ud(b,_,()=>new WeakMap);return Ud(F,B,()=>{const $={};for(const[Q,U]of Object.entries(i.selectors??{}))$[Q]=Z$(U,B,()=>Ud(S,B,N),_);return $})}return{reducerPath:A,getSelectors:I,get selectors(){return I(O)},selectSlice:O}}const C={name:o,reducer:k,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:N,...E(c),injectInto(A,{reducerPath:_,...O}={}){const I=_??c;return A.inject({reducerPath:I,reducer:k},O),{...C,...E(I,!0)}}};return C}}function Z$(e,t,r,n){function i(o,...c){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...c)}return i.unwrapped=e,i}var ur=Y$();function X$(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function J$({type:e,reducerName:t,createNotation:r},n,i){let o,c;if("reducer"in n){if(r&&!tz(n))throw new Error(Fr(17));o=n.reducer,c=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,c?Ur(e,c):Ur(e))}function ez(e){return e._reducerDefinitionType==="asyncThunk"}function tz(e){return e._reducerDefinitionType==="reducerWithPrepare"}function rz({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Fr(18));const{payloadCreator:o,fulfilled:c,pending:u,rejected:f,settled:h,options:m}=r,p=i(e,o,m);n.exposeAction(t,p),c&&n.addCase(p.fulfilled,c),u&&n.addCase(p.pending,u),f&&n.addCase(p.rejected,f),h&&n.addMatcher(p.settled,h),n.exposeCaseReducer(t,{fulfilled:c||Wd,pending:u||Wd,rejected:f||Wd,settled:h||Wd})}function Wd(){}var nz="task",SA="listener",NA="completed",s0="cancelled",iz=`task-${s0}`,az=`task-${NA}`,Yv=`${SA}-${s0}`,oz=`${SA}-${NA}`,Ih=class{constructor(e){ns(this,"code");ns(this,"name","TaskAbortError");ns(this,"message");this.code=e,this.message=`${nz} ${s0} (reason: ${e})`}},l0=(e,t)=>{if(typeof e!="function")throw new TypeError(Fr(32))},Cf=()=>{},EA=(e,t=Cf)=>(e.catch(t),e),AA=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),po=e=>{if(e.aborted)throw new Ih(e.reason)};function CA(e,t){let r=Cf;return new Promise((n,i)=>{const o=()=>i(new Ih(e.reason));if(e.aborted){o();return}r=AA(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Cf})}var sz=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Ih?"cancelled":"rejected",error:r}}finally{t==null||t()}},Pf=e=>t=>EA(CA(e,t).then(r=>(po(e),r))),PA=e=>{const t=Pf(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Ss}=Object,Jk={},Th="listenerMiddleware",lz=(e,t)=>{const r=n=>AA(e,()=>n.abort(e.reason));return(n,i)=>{l0(n);const o=new AbortController;r(o);const c=sz(async()=>{po(e),po(o.signal);const u=await n({pause:Pf(o.signal),delay:PA(o.signal),signal:o.signal});return po(o.signal),u},()=>o.abort(az));return i!=null&&i.autoJoin&&t.push(c.catch(Cf)),{result:Pf(e)(c),cancel(){o.abort(iz)}}}},cz=(e,t)=>{const r=async(n,i)=>{po(t);let o=()=>{};const u=[new Promise((f,h)=>{let m=e({predicate:n,effect:(p,v)=>{v.unsubscribe(),f([p,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&u.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await CA(t,Promise.race(u));return po(t),f}finally{o()}};return((n,i)=>EA(r(n,i)))},OA=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=Ur(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Fr(21));return l0(o),{predicate:i,type:t,effect:o}},_A=Ss(e=>{const{type:t,predicate:r,effect:n}=OA(e);return{id:V$(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Fr(22))}}},{withTypes:()=>_A}),ej=(e,t)=>{const{type:r,effect:n,predicate:i}=OA(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},Zv=e=>{e.pending.forEach(t=>{t.abort(Yv)})},uz=(e,t)=>()=>{for(const r of t.keys())Zv(r);e.clear()},tj=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},MA=Ss(Ur(`${Th}/add`),{withTypes:()=>MA}),dz=Ur(`${Th}/removeAll`),IA=Ss(Ur(`${Th}/remove`),{withTypes:()=>IA}),fz=(...e)=>{console.error(`${Th}/error`,...e)},iu=(e={})=>{const t=new Map,r=new Map,n=b=>{const S=r.get(b)??0;r.set(b,S+1)},i=b=>{const S=r.get(b)??1;S===1?r.delete(b):r.set(b,S-1)},{extra:o,onError:c=fz}=e;l0(c);const u=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),S=>{b.unsubscribe(),S!=null&&S.cancelActive&&Zv(b)}),f=(b=>{const S=ej(t,b)??_A(b);return u(S)});Ss(f,{withTypes:()=>f});const h=b=>{const S=ej(t,b);return S&&(S.unsubscribe(),b.cancelActive&&Zv(S)),!!S};Ss(h,{withTypes:()=>h});const m=async(b,S,w,k)=>{const N=new AbortController,E=cz(f,N.signal),C=[];try{b.pending.add(N),n(b),await Promise.resolve(b.effect(S,Ss({},w,{getOriginalState:k,condition:(A,_)=>E(A,_).then(Boolean),take:E,delay:PA(N.signal),pause:Pf(N.signal),extra:o,signal:N.signal,fork:lz(N.signal,C),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((A,_,O)=>{A!==N&&(A.abort(Yv),O.delete(A))})},cancel:()=>{N.abort(Yv),b.pending.delete(N)},throwIfCancelled:()=>{po(N.signal)}})))}catch(A){A instanceof Ih||tj(c,A,{raisedBy:"effect"})}finally{await Promise.all(C),N.abort(oz),i(b),b.pending.delete(N)}},p=uz(t,r);return{middleware:b=>S=>w=>{if(!lA(w))return S(w);if(MA.match(w))return f(w.payload);if(dz.match(w)){p();return}if(IA.match(w))return h(w.payload);let k=b.getState();const N=()=>{if(k===Jk)throw new Error(Fr(23));return k};let E;try{if(E=S(w),t.size>0){const C=b.getState(),A=Array.from(t.values());for(const _ of A){let O=!1;try{O=_.predicate(w,C,k)}catch(I){O=!1,tj(c,I,{raisedBy:"predicate"})}O&&m(_,w,b,N)}}}finally{k=Jk}return E},startListening:f,stopListening:h,clearListeners:p}};function Fr(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 hz={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},TA=ur({name:"chartLayout",initialState:hz,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),Dh=TA.actions,mz=Dh.setMargin,pz=Dh.setLayout,gz=Dh.setChartSize,vz=Dh.setScale,xz=TA.reducer;function DA(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function He(e){return Number.isFinite(e)}function qn(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function rj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bs(e){for(var t=1;t{if(t&&r){var n=r.width,i=r.height,o=t.align,c=t.verticalAlign,u=t.layout;if((u==="vertical"||u==="horizontal"&&c==="middle")&&o!=="center"&&Ae(e[o]))return bs(bs({},e),{},{[o]:e[o]+(n||0)});if((u==="horizontal"||u==="vertical"&&o==="center")&&c!=="middle"&&Ae(e[c]))return bs(bs({},e),{},{[c]:e[c]+(i||0)})}return e},Zn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",RA=(e,t,r,n)=>{if(n)return e.map(u=>u.coordinate);var i,o,c=e.map(u=>(u.coordinate===t&&(i=!0),u.coordinate===r&&(o=!0),u.coordinate));return i||c.push(t),o||c.push(r),c},LA=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,o=e.range,c=e.scale,u=e.realScaleType,f=e.isCategorical,h=e.categoricalDomain,m=e.tickCount,p=e.ticks,v=e.niceTicks,b=e.axisType;if(!c)return null;var S=u==="scaleBand"&&c.bandwidth?c.bandwidth()/2:2,w=i==="category"&&c.bandwidth?c.bandwidth()/S:0;if(w=b==="angleAxis"&&o&&o.length>=2?en(o[0]-o[1])*2*w:w,p||v){var k=(p||v||[]).map((N,E)=>{var C=n?n.indexOf(N):N,A=c.map(C);return He(A)?{coordinate:A+w,value:N,offset:w,index:E}:null}).filter(Cr);return k}return f&&h?h.map((N,E)=>{var C=c.map(N);return He(C)?{coordinate:C+w,value:N,index:E,offset:w}:null}).filter(Cr):c.ticks&&m!=null?c.ticks(m).map((N,E)=>{var C=c.map(N);return He(C)?{coordinate:C+w,value:N,index:E,offset:w}:null}).filter(Cr):c.domain().map((N,E)=>{var C=c.map(N);return He(C)?{coordinate:C+w,value:n?n[N]:N,index:E,offset:w}:null}).filter(Cr)},jz=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(h[0]=o,o+=v,h[1]=o):(h[0]=c,c+=v,h[1]=c)}}}},Sz=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},Nz={sign:jz,expand:BL,none:yo,silhouette:UL,wiggle:WL,positive:Sz},Ez=(e,t,r)=>{var n,i=(n=Nz[r])!==null&&n!==void 0?n:yo,o=FL().keys(t).value((u,f)=>Number(Ft(u,f,0))).order(Lv).offset(i),c=o(e);return c.forEach((u,f)=>{u.forEach((h,m)=>{var p=Ft(e[m],t[f],0);Array.isArray(p)&&p.length===2&&Ae(p[0])&&Ae(p[1])&&(h[0]=p[0],h[1]=p[1])})}),c};function Az(e){return e==null?void 0:String(e)}function nj(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,o=e.index,c=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Xt(i[t.dataKey])){var u=WE(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Ft(i,Xt(c)?t.dataKey:c),h=t.scale.map(f);return Ae(h)?h:null}var Cz=e=>{var t=e.flat(2).filter(Ae);return[Math.min(...t),Math.max(...t)]},Pz=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Oz=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return Pz(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var c=o.stackedData,u=c.reduce((f,h)=>{var m=DA(h,t,r),p=Cz(m);return!He(p[0])||!He(p[1])?f:[Math.min(f[0],p[0]),Math.max(f[1],p[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},ij=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,aj=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Of=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Nh(t,m=>m.coordinate),o=1/0,c=1,u=i.length;c{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Mz=(e,t)=>t==="centric"?e.angle:e.radius,Ni=e=>e.layout.width,Ei=e=>e.layout.height,Iz=e=>e.layout.scale,zA=e=>e.layout.margin,Rh=Y(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Lh=Y(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Tz="data-recharts-item-index",Dz="data-recharts-item-id",au=60;function sj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hd(e){for(var t=1;te.brush.height;function Fz(e){var t=Lh(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:au;return r+i}return r},0)}function Bz(e){var t=Lh(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:au;return r+i}return r},0)}function Uz(e){var t=Rh(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Wz(e){var t=Rh(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var er=Y([Ni,Ei,zA,zz,Fz,Bz,Uz,Wz,aA,u$],(e,t,r,n,i,o,c,u,f,h)=>{var m={left:(r.left||0)+i,right:(r.right||0)+o},p={top:(r.top||0)+c,bottom:(r.bottom||0)+u},v=Hd(Hd({},p),m),b=v.bottom;v.bottom+=n,v=kz(v,f,h);var S=e-v.left-v.right,w=t-v.top-v.bottom;return Hd(Hd({brushBottom:b},v),{},{width:Math.max(S,0),height:Math.max(w,0)})}),Hz=Y(er,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),FA=Y(Ni,Ei,(e,t)=>({x:0,y:0,width:e,height:t})),Kz=x.createContext(null),Or=()=>x.useContext(Kz)!=null,$h=e=>e.brush,zh=Y([$h,er,zA],(e,t,r)=>({height:e.height,x:Ae(e.x)?e.x:t.left,y:Ae(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ae(e.width)?e.width:t.width}));function Gz(e,t,{signal:r,edges:n}={}){let i,o=null;const c=n!=null&&n.includes("leading"),u=n==null||n.includes("trailing"),f=()=>{o!==null&&(e.apply(i,o),i=void 0,o=null)},h=()=>{u&&f(),b()};let m=null;const p=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,h()},t)},v=()=>{m!==null&&(clearTimeout(m),m=null)},b=()=>{v(),i=void 0,o=null},S=()=>{f()},w=function(...k){if(r!=null&&r.aborted)return;i=this,o=k;const N=m==null;p(),c&&N&&f()};return w.schedule=p,w.cancel=b,w.flush=S,r==null||r.addEventListener("abort",b,{once:!0}),w}function Vz(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:i=!0,maxWait:o}=r,c=Array(2);n&&(c[0]="leading"),i&&(c[1]="trailing");let u,f=null;const h=Gz(function(...v){u=e.apply(this,v),f=null},t,{edges:c}),m=function(...v){return o!=null&&(f===null&&(f=Date.now()),Date.now()-f>=o)?(u=e.apply(this,v),f=Date.now(),h.cancel(),h.schedule(),u):(h.apply(this,v),u)},p=()=>(h.flush(),u);return m.cancel=h.cancel,m.flush=p,m}function qz(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return Vz(e,t,{leading:n,maxWait:t,trailing:i})}var _f=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;oi[c++]))}},Fn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},BA=(e,t,r)=>{var n=r.width,i=n===void 0?Fn.width:n,o=r.height,c=o===void 0?Fn.height:o,u=r.aspect,f=r.maxHeight,h=bo(i)?e:Number(i),m=bo(c)?t:Number(c);return u&&u>0&&(h?m=h/u:m&&(h=m*u),f&&m!=null&&m>f&&(m=f)),{calculatedWidth:h,calculatedHeight:m}},Qz={width:0,height:0,overflow:"visible"},Yz={width:0,overflowX:"visible"},Zz={height:0,overflowY:"visible"},Xz={},Jz=e=>{var t=e.width,r=e.height,n=bo(t),i=bo(r);return n&&i?Qz:n?Yz:i?Zz:Xz};function e8(e){var t=e.width,r=e.height,n=e.aspect,i=t,o=r;return i===void 0&&o===void 0?(i=Fn.width,o=Fn.height):i===void 0?i=n&&n>0?void 0:Fn.width:o===void 0&&(o=n&&n>0?void 0:Fn.height),{width:i,height:o}}var t8=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Mf(){return Mf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({width:r,height:n}),[r,n]);return f8(i)?x.createElement(UA.Provider,{value:i},t):null}var c0=()=>x.useContext(UA),h8=x.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?Fn.initialDimension:n,o=e.width,c=e.height,u=e.minWidth,f=u===void 0?Fn.minWidth:u,h=e.minHeight,m=e.maxHeight,p=e.children,v=e.debounce,b=v===void 0?Fn.debounce:v,S=e.id,w=e.className,k=e.onResize,N=e.style,E=N===void 0?{}:N,C=u8(e,t8),A=x.useRef(null),_=x.useRef();_.current=k,x.useImperativeHandle(t,()=>A.current);var O=x.useState({containerWidth:i.width,containerHeight:i.height}),I=a8(O,2),B=I[0],F=I[1],$=x.useCallback((se,ae)=>{F(Z=>{var re=Math.round(se),ie=Math.round(ae);return Z.containerWidth===re&&Z.containerHeight===ie?Z:{containerWidth:re,containerHeight:ie}})},[]);x.useEffect(()=>{if(A.current==null||typeof ResizeObserver>"u")return al;var se=D=>{var M,q=D[0];if(q!=null){var le=q.contentRect,oe=le.width,te=le.height;$(oe,te),(M=_.current)===null||M===void 0||M.call(_,oe,te)}};b>0&&(se=qz(se,b,{trailing:!0,leading:!1}));var ae=new ResizeObserver(se),Z=A.current.getBoundingClientRect(),re=Z.width,ie=Z.height;return $(re,ie),ae.observe(A.current),()=>{ae.disconnect()}},[$,b]);var Q=B.containerWidth,U=B.containerHeight;_f(!r||r>0,"The aspect(%s) must be greater than zero.",r);var ge=BA(Q,U,{width:o,height:c,aspect:r,maxHeight:m}),ue=ge.calculatedWidth,pe=ge.calculatedHeight;return _f(Q<0||U<0||ue!=null&&ue>0||pe!=null&&pe>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,ue,pe,o,c,f,h,r),x.createElement("div",Mf({id:S?"".concat(S):void 0,className:nt("recharts-responsive-container",w),style:cj(cj({},E),{},{width:o,height:c,minWidth:f,minHeight:h,maxHeight:m}),ref:A},C),x.createElement("div",{style:Jz({width:o,height:c})},x.createElement(WA,{width:ue,height:pe},p)))}),m8=x.forwardRef((e,t)=>{var r=c0();if(qn(r.width)&&qn(r.height))return e.children;var n=e8({width:e.width,height:e.height,aspect:e.aspect}),i=n.width,o=n.height,c=BA(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight}),u=c.calculatedWidth,f=c.calculatedHeight;return Ae(u)&&Ae(f)?x.createElement(WA,{width:u,height:f},e.children):x.createElement(h8,Mf({},e,{width:i,height:o,ref:t}))});function u0(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 Fh=()=>{var e,t=Or(),r=Me(Hz),n=Me(zh),i=(e=Me($h))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},p8={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},HA=()=>{var e;return(e=Me(er))!==null&&e!==void 0?e:p8},KA=()=>Me(Ni),GA=()=>Me(Ei),ht=e=>e.layout.layoutType,ol=()=>Me(ht),d0=()=>{var e=ol();if(e==="horizontal"||e==="vertical")return e},VA=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},g8=()=>{var e=ol();return e!==void 0},ou=e=>{var t=At(),r=Or(),n=e.width,i=e.height,o=c0(),c=n,u=i;return o&&(c=o.width>0?o.width:n,u=o.height>0?o.height:i),x.useEffect(()=>{!r&&qn(c)&&qn(u)&&t(gz({width:c,height:u}))},[t,r,c,u]),null},qA=Symbol.for("immer-nothing"),dj=Symbol.for("immer-draftable"),Wr=Symbol.for("immer-state");function bn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Rc=Object.getPrototypeOf;function Gs(e){return!!e&&!!e[Wr]}function ko(e){var t;return e?QA(e)||Array.isArray(e)||!!e[dj]||!!((t=e.constructor)!=null&&t[dj])||su(e)||Uh(e):!1}var v8=Object.prototype.constructor.toString(),fj=new WeakMap;function QA(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=fj.get(r);return n===void 0&&(n=Function.toString.call(r),fj.set(r,n)),n===v8}function If(e,t,r=!0){Bh(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Bh(e){const t=e[Wr];return t?t.type_:Array.isArray(e)?1:su(e)?2:Uh(e)?3:0}function Xv(e,t){return Bh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function YA(e,t,r){const n=Bh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function x8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function su(e){return e instanceof Map}function Uh(e){return e instanceof Set}function qa(e){return e.copy_||e.base_}function Jv(e,t){if(su(e))return new Map(e);if(Uh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=QA(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Wr];let i=Reflect.ownKeys(n);for(let o=0;o1&&Object.defineProperties(e,{set:Kd,add:Kd,clear:Kd,delete:Kd}),Object.freeze(e),t&&Object.values(e).forEach(r=>f0(r,!0))),e}function y8(){bn(2)}var Kd={value:y8};function Wh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var b8={};function jo(e){const t=b8[e];return t||bn(0,e),t}var Lc;function ZA(){return Lc}function w8(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function hj(e,t){t&&(jo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ex(e){tx(e),e.drafts_.forEach(k8),e.drafts_=null}function tx(e){e===Lc&&(Lc=e.parent_)}function mj(e){return Lc=w8(Lc,e)}function k8(e){const t=e[Wr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function pj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Wr].modified_&&(ex(t),bn(4)),ko(e)&&(e=Tf(t,e),t.parent_||Df(t,e)),t.patches_&&jo("Patches").generateReplacementPatches_(r[Wr].base_,e,t.patches_,t.inversePatches_)):e=Tf(t,r,[]),ex(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qA?e:void 0}function Tf(e,t,r){if(Wh(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[Wr];if(!i)return If(t,(o,c)=>gj(e,i,t,o,c,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return Df(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let c=o,u=!1;i.type_===3&&(c=new Set(o),o.clear(),u=!0),If(c,(f,h)=>gj(e,i,o,f,h,r,u),n),Df(e,o,!1),r&&e.patches_&&jo("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function gj(e,t,r,n,i,o,c){if(i==null||typeof i!="object"&&!c)return;const u=Wh(i);if(!(u&&!c)){if(Gs(i)){const f=o&&t&&t.type_!==3&&!Xv(t.assigned_,n)?o.concat(n):void 0,h=Tf(e,i,f);if(YA(r,n,h),Gs(h))e.canAutoFreeze_=!1;else return}else c&&r.add(i);if(ko(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&u)return;Tf(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(su(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Df(e,i)}}}function Df(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&f0(t,r)}function j8(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:ZA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=h0;r&&(i=[n],o=$c);const{revoke:c,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=c,u}var h0={get(e,t){if(t===Wr)return e;const r=qa(e);if(!Xv(r,t))return S8(e,r,t);const n=r[t];return e.finalized_||!ko(n)?n:n===Pg(e.base_,t)?(Og(e),e.copy_[t]=nx(n,e)):n},has(e,t){return t in qa(e)},ownKeys(e){return Reflect.ownKeys(qa(e))},set(e,t,r){const n=XA(qa(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Pg(qa(e),t),o=i==null?void 0:i[Wr];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(x8(r,i)&&(r!==void 0||Xv(e.base_,t)))return!0;Og(e),rx(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Pg(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Og(e),rx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=qa(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){bn(11)},getPrototypeOf(e){return Rc(e.base_)},setPrototypeOf(){bn(12)}},$c={};If(h0,(e,t)=>{$c[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$c.deleteProperty=function(e,t){return $c.set.call(this,e,t,void 0)};$c.set=function(e,t,r){return h0.set.call(this,e[0],t,r,e[0])};function Pg(e,t){const r=e[Wr];return(r?qa(r):e)[t]}function S8(e,t,r){var i;const n=XA(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function XA(e,t){if(!(t in e))return;let r=Rc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Rc(r)}}function rx(e){e.modified_||(e.modified_=!0,e.parent_&&rx(e.parent_))}function Og(e){e.copy_||(e.copy_=Jv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var N8=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const c=this;return function(f=o,...h){return c.produce(f,m=>r.call(this,m,...h))}}typeof r!="function"&&bn(6),n!==void 0&&typeof n!="function"&&bn(7);let i;if(ko(t)){const o=mj(this),c=nx(t,void 0);let u=!0;try{i=r(c),u=!1}finally{u?ex(o):tx(o)}return hj(o,n),pj(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===qA&&(i=void 0),this.autoFreeze_&&f0(i,!0),n){const o=[],c=[];jo("Patches").generateReplacementPatches_(t,i,o,c),n(o,c)}return i}else bn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(c,...u)=>this.produceWithPatches(c,f=>t(f,...u));let n,i;return[this.produce(t,r,(c,u)=>{n=c,i=u}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ko(e)||bn(8),Gs(e)&&(e=E8(e));const t=mj(this),r=nx(e,void 0);return r[Wr].isManual_=!0,tx(t),r}finishDraft(e,t){const r=e&&e[Wr];(!r||!r.isManual_)&&bn(9);const{scope_:n}=r;return hj(n,t),pj(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=jo("Patches").applyPatches_;return Gs(e)?n(e,t):this.produce(e,i=>n(i,t))}};function nx(e,t){const r=su(e)?jo("MapSet").proxyMap_(e,t):Uh(e)?jo("MapSet").proxySet_(e,t):j8(e,t);return(t?t.scope_:ZA()).drafts_.push(r),r}function E8(e){return Gs(e)||bn(10,e),JA(e)}function JA(e){if(!ko(e)||Wh(e))return e;const t=e[Wr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Jv(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Jv(e,!0);return If(r,(i,o)=>{YA(r,i,JA(o))},n),t&&(t.finalized_=!1),r}var A8=new N8;A8.produce;var C8={settings:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemSorter:"value"},size:{width:0,height:0},payload:[]},eC=ur({name:"legend",initialState:C8,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(t.payload)},prepare:lt()},replaceLegendPayload:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).payload.indexOf(n);o>-1&&(e.payload[o]=i)},prepare:lt()},removeLegendPayload:{reducer(e,t){var r=tn(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:lt()}}}),lu=eC.actions;lu.setLegendSize;lu.setLegendSettings;var P8=lu.addLegendPayload,O8=lu.replaceLegendPayload,_8=lu.removeLegendPayload,M8=eC.reducer,_g={exports:{}},Mg={};/** - * @license React - * use-sync-external-store-with-selector.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var vj;function I8(){if(vj)return Mg;vj=1;var e=el();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,c=e.useMemo,u=e.useDebugValue;return Mg.useSyncExternalStoreWithSelector=function(f,h,m,p,v){var b=i(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=c(function(){function k(_){if(!N){if(N=!0,E=_,_=p(_),v!==void 0&&S.hasValue){var O=S.value;if(v(O,_))return C=O}return C=_}if(O=C,r(E,_))return O;var I=p(_);return v!==void 0&&v(O,I)?(E=_,O):(E=_,C=I)}var N=!1,E,C,A=m===void 0?null:m;return[function(){return k(h())},A===null?void 0:function(){return k(A())}]},[h,m,p,v]);var w=n(f,b[0],b[1]);return o(function(){S.hasValue=!0,S.value=w},[w]),u(w),w},Mg}var xj;function T8(){return xj||(xj=1,_g.exports=I8()),_g.exports}T8();function D8(e){e()}function R8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){D8(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var yj={notify(){},get:()=>[]};function L8(e,t){let r,n=yj,i=0,o=!1;function c(w){m();const k=n.subscribe(w);let N=!1;return()=>{N||(N=!0,k(),p())}}function u(){n.notify()}function f(){S.onStateChange&&S.onStateChange()}function h(){return o}function m(){i++,r||(r=e.subscribe(f),n=R8())}function p(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=yj)}function v(){o||(o=!0,m())}function b(){o&&(o=!1,p())}const S={addNestedSub:c,notifyNestedSubs:u,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:b,getListeners:()=>n};return S}var $8=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",z8=$8(),F8=()=>typeof navigator<"u"&&navigator.product==="ReactNative",B8=F8(),U8=()=>z8||B8?x.useLayoutEffect:x.useEffect,W8=U8();function bj(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function H8(e,t){if(bj(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i{const f=L8(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),c=x.useMemo(()=>i.getState(),[i]);W8(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),c!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,c]);const u=r||G8;return x.createElement(u.Provider,{value:o},t)}var q8=V8,Q8=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Y8(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Hh(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(Q8.has(n)){if(e[n]==null&&t[n]==null)continue;if(!H8(e[n],t[n]))return!1}else if(!Y8(e[n],t[n]))return!1;return!0}function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.separator,r=t===void 0?ls.separator:t,n=e.contentStyle,i=e.itemStyle,o=e.labelStyle,c=o===void 0?ls.labelStyle:o,u=e.payload,f=e.formatter,h=e.itemSorter,m=e.wrapperClassName,p=e.labelClassName,v=e.label,b=e.labelFormatter,S=e.accessibilityLayer,w=S===void 0?ls.accessibilityLayer:S,k=()=>{if(u&&u.length){var B={padding:0,margin:0},F=oF(u,h),$=F.map((Q,U)=>{if(!Q||Q.type==="none")return null;var ge=Q.formatter||f||aF,ue=Q.value,pe=Q.name,se=ue,ae=pe;if(ge){var Z=ge(ue,pe,Q,U,u);if(Array.isArray(Z)){var re=eF(Z,2);se=re[0],ae=re[1]}else if(Z!=null)se=Z;else return null}var ie=sc(sc({},ls.itemStyle),{},{color:Q.color||ls.itemStyle.color},i);return x.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:ie},Vn(ae)?x.createElement("span",{className:"recharts-tooltip-item-name"},ae):null,Vn(ae)?x.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,x.createElement("span",{className:"recharts-tooltip-item-value"},se),x.createElement("span",{className:"recharts-tooltip-item-unit"},Q.unit||""))});return x.createElement("ul",{className:"recharts-tooltip-item-list",style:B},$)}return null},N=sc(sc({},ls.contentStyle),n),E=sc({margin:0},c),C=!Xt(v),A=C?v:"",_=nt("recharts-default-tooltip",m),O=nt("recharts-tooltip-label",p);C&&b&&u!==void 0&&u!==null&&(A=b(v,u));var I=w?{role:"status","aria-live":"assertive"}:{};return x.createElement("div",ix({className:_,style:N},I),x.createElement("p",{className:O,style:E},x.isValidElement(A)?A:"".concat(A)),k())},lc="recharts-tooltip-wrapper",lF={visibility:"hidden"};function cF(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return nt(lc,{["".concat(lc,"-right")]:Ae(r)&&t&&Ae(t.x)&&r>=t.x,["".concat(lc,"-left")]:Ae(r)&&t&&Ae(t.x)&&r=t.y,["".concat(lc,"-top")]:Ae(n)&&t&&Ae(t.y)&&n0?i:0),p=r[n]+i;if(t[n])return c[n]?m:p;var v=f[n];if(v==null)return 0;if(c[n]){var b=m,S=v;return bk?Math.max(m,v):Math.max(p,v)}function uF(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function dF(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTop,i=e.offsetLeft,o=e.position,c=e.reverseDirection,u=e.tooltipBox,f=e.useTranslate3d,h=e.viewBox,m,p,v;return u.height>0&&u.width>0&&r?(p=jj({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:c,tooltipDimension:u.width,viewBox:h,viewBoxDimension:h.width}),v=jj({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:c,tooltipDimension:u.height,viewBox:h,viewBoxDimension:h.height}),m=uF({translateX:p,translateY:v,useTranslate3d:f})):m=lF,{cssProperties:m,cssClasses:cF({translateX:p,translateY:v,coordinate:r})}}var fF=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),cu={isSsr:fF()};function hF(e,t){return vF(e)||gF(e,t)||pF(e,t)||mF()}function mF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pF(e,t){if(e){if(typeof e=="string")return Sj(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sj(e,t):void 0}}function Sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);rcu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches),t=hF(e,2),r=t[0],n=t[1];return x.useEffect(()=>{if(window.matchMedia){var i=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{n(i.matches)};return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}}},[]),r}function Nj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cs(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),h=wF(f,2),m=h[0],p=h[1];x.useEffect(()=>{var N=E=>{if(E.key==="Escape"){var C,A,_,O;p({dismissed:!0,dismissedAtCoordinate:{x:(C=(A=e.coordinate)===null||A===void 0?void 0:A.x)!==null&&C!==void 0?C:0,y:(_=(O=e.coordinate)===null||O===void 0?void 0:O.y)!==null&&_!==void 0?_:0}})}};return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),m.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((o=(c=e.coordinate)===null||c===void 0?void 0:c.y)!==null&&o!==void 0?o:0)!==m.dismissedAtCoordinate.y)&&p(cs(cs({},m),{},{dismissed:!1}));var v=dF({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}),b=v.cssClasses,S=v.cssProperties,w=e.hasPortalFromProps?{}:cs(cs({transition:EF({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},S),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),k=cs(cs({},w),{},{visibility:!m.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return x.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:b,style:k,ref:e.innerRef},e.children)}var CF=x.memo(AF),rC=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;tHe(e.x)&&He(e.y),Oj=e=>e.base!=null&&Rf(e.base)&&Rf(e),cc=e=>e.x,uc=e=>e.y,MF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Jx(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=Pj["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return Pj[r]||jh},_j={connectNulls:!1,type:"linear"},IF=e=>{var t=e.type,r=t===void 0?_j.type:t,n=e.points,i=n===void 0?[]:n,o=e.baseLine,c=e.layout,u=e.connectNulls,f=u===void 0?_j.connectNulls:u,h=MF(r,c),m=f?i.filter(Rf):i;if(Array.isArray(o)){var p,v=i.map((N,E)=>Cj(Cj({},N),{},{base:o[E]}));c==="vertical"?p=$d().y(uc).x1(cc).x0(N=>N.base.x):p=$d().x(cc).y1(uc).y0(N=>N.base.y);var b=p.defined(Oj).curve(h),S=f?v.filter(Oj):v;return b(S)}var w;c==="vertical"&&Ae(o)?w=$d().y(uc).x1(cc).x0(o):Ae(o)?w=$d().x(cc).y1(uc).y0(o):w=_E().x(cc).y(uc);var k=w.defined(Rf).curve(h);return k(m)},lf=e=>{var t=e.className,r=e.points,n=e.path,i=e.pathRef,o=ol();if((!r||!r.length)&&!n)return null;var c={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},u=r&&r.length?IF(c):n;return x.createElement("path",ax({},kn(e),e0(e),{className:nt("recharts-curve",t),d:u===null?void 0:u,ref:i}))},TF=["x","y","top","left","width","height","className"];function ox(){return ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),UF=e=>{var t=e.x,r=t===void 0?0:t,n=e.y,i=n===void 0?0:n,o=e.top,c=o===void 0?0:o,u=e.left,f=u===void 0?0:u,h=e.width,m=h===void 0?0:h,p=e.height,v=p===void 0?0:p,b=e.className,S=zF(e,TF),w=DF({x:r,y:i,top:c,left:f,width:m,height:v},S);return!Ae(r)||!Ae(i)||!Ae(m)||!Ae(v)||!Ae(c)||!Ae(f)?null:x.createElement("path",ox({},nn(w),{className:nt("recharts-cross",b),d:BF(r,i,m,v,c,f)}))};function WF(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}var Lf=1e-4,nC=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],iC=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),Ij=(e,t)=>r=>{var n=nC(e,t);return iC(n,r)},HF=(e,t)=>r=>{var n=nC(e,t),i=[...n.map((o,c)=>o*c).slice(1),0];return iC(i,r)},KF=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var i=n.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},GF=function(){for(var t=arguments.length,r=new Array(t),n=0;n{var i=Ij(e,r),o=Ij(t,n),c=HF(e,r),u=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,p=m,v=0;v<8;++v){var b=i(p)-m,S=c(p);if(Math.abs(b-m)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,o=i===void 0?8:i,c=t.dt,u=c===void 0?16.67:c,f=1,h=[0],m=0,p=0,v=1e4,b=0;b{var E,C,A;if(N<=0)return 0;if(N>=1)return f;var _=N*k,O=Math.floor(_),I=_-O;return((E=h[O])!==null&&E!==void 0?E:0)+(((C=h[O+1])!==null&&C!==void 0?C:0)-((A=h[O])!==null&&A!==void 0?A:0))*I}},QF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Tj(e);case"spring":return qF();default:if(e.split("(")[0]==="cubic-bezier")return Tj(e)}return typeof e=="function"?e:null},YF=(e,t,r)=>{var n,i=o=>{var c=t.tick(o);if(t.getState()==="active"){if(r(t.getInterpolated()),t.getProgress()===1){t.complete(),n=void 0;return}n=e.setTimeout(i,c);return}n=e.setTimeout(i,c)};return n=e.setTimeout(i,0),()=>{var o;return(o=n)===null||o===void 0?void 0:o()}},aC=x.createContext(YF);aC.Provider;function ZF(e){var t=x.useContext(aC);return x.useMemo(()=>e??t,[e,t])}function XF(e,t,r){return(t=JF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JF(e){var t=e9(e,"string");return typeof t=="symbol"?t:t+""}function e9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dj="init",Rj="pending",Lj="active",t9="completed";function Dg(e){return Math.max(0,e)}class r9{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(t){var r;XF(this,"state",Dj),this.animationId=t.animationId,this.onAnimationEnd=t.onAnimationEnd,this.animationDuration=Dg(t.animationDuration),this.animationBegin=Dg(t.animationBegin),this.progress=0,this.from=t.from,this.to=t.to,this.easing=t.easing,(r=t.onAnimationStart)===null||r===void 0||r.call(t)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(t){if(this.getState()===Dj)return this.state=Rj,this.beginStartedTime=t,this.animationBegin;if(this.getState()===Rj){if(this.beginStartedTime==null)throw new Error;var r=t-this.beginStartedTime;return r>=this.animationBegin?(this.state=Lj,this.animationStartedTime=t,this.nextAnimationUpdate(0)):Dg(this.animationBegin-r)}if(this.getState()===Lj){if(this.animationStartedTime==null)throw new Error;var n=t-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(t){this.progress=Math.min(1,Math.max(0,t))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state==="active"){var t;(t=this.onAnimationEnd)===null||t===void 0||t.call(this)}this.state=t9}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}}class n9 extends r9{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(hi(this.getFrom(),this.getTo(),this.getProgress()))}}class i9{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=c=>{c-n>=r?t(c):i=requestAnimationFrame(o)};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function a9(e,t){return c9(e)||l9(e,t)||s9(e,t)||o9()}function o9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s9(e,t){if(e){if(typeof e=="string")return $j(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$j(e,t):void 0}}function $j(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{},onAnimationStart:()=>{}},zj=0,Rg=1;function oC(e){var t=sn(e,u9),r=t.animationId,n=t.isActive,i=t.canBegin,o=t.duration,c=t.easing,u=t.begin,f=t.onAnimationEnd,h=t.onAnimationStart,m=t.children,p=tC(),v=n==="auto"?!cu.isSsr&&!p:n,b=ZF(t.animationController),S=x.useState(v?zj:Rg),w=a9(S,2),k=w[0],N=w[1];return x.useEffect(()=>{v||N(Rg)},[v]),x.useEffect(()=>{var E=QF(c);if(!v||!i||E==null)return al;var C=new i9,A=new n9({animationId:r,easing:E,animationDuration:o,animationBegin:u,onAnimationStart:h,onAnimationEnd:f,from:zj,to:Rg});return b(C,A,N)},[b,r,v,i,o,c,u,h,f]),m(Number(k))}function sC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=x.useRef(Mc(t)),n=x.useRef(e);return n.current!==e&&(r.current=Mc(t),n.current=e),r.current}var d9=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),f9=(e,t,r)=>e.map(n=>"".concat(d9(n)," ").concat(t,"ms ").concat(r)).join(","),h9=["radius"],m9=["radius"],Fj,Bj,Uj,Wj,Hj,Kj,Gj,Vj,qj,Qj;function Yj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zj(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{var o=ma(r),c=ma(n),u=Math.min(Math.abs(o)/2,Math.abs(c)/2),f=c>=0?1:-1,h=o>=0?1:-1,m=c>=0&&o>=0||c<0&&o<0?1:0,p;if(u>0&&Array.isArray(i)){for(var v=[0,0,0,0],b=0,S=4;bu?u:k}p=qt(Fj||(Fj=In(["M",",",""])),e,t+f*v[0]),v[0]>0&&(p+=qt(Bj||(Bj=In(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),p+=qt(Uj||(Uj=In(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(p+=qt(Wj||(Wj=In(["A ",",",",0,0,",`, - `,",",""])),v[1],v[1],m,e+r,t+f*v[1])),p+=qt(Hj||(Hj=In(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(p+=qt(Kj||(Kj=In(["A ",",",",0,0,",`, - `,",",""])),v[2],v[2],m,e+r-h*v[2],t+n)),p+=qt(Gj||(Gj=In(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(p+=qt(Vj||(Vj=In(["A ",",",",0,0,",`, - `,",",""])),v[3],v[3],m,e,t+n-f*v[3])),p+="Z"}else if(u>0&&i===+i&&i>0){var N=Math.min(u,i);p=qt(qj||(qj=In(["M ",",",` - A `,",",",0,0,",",",",",` - L `,",",` - A `,",",",0,0,",",",",",` - L `,",",` - A `,",",",0,0,",",",",",` - L `,",",` - A `,",",",0,0,",",",","," Z"])),e,t+f*N,N,N,m,e+h*N,t,e+r-h*N,t,N,N,m,e+r,t+f*N,e+r,t+n-f*N,N,N,m,e+r-h*N,t+n,e+h*N,t+n,N,N,m,e,t+n-f*N)}else p=qt(Qj||(Qj=In(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return p},t2={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},S9=e=>{var t=sn(e,t2),r=x.useRef(null),n=x.useState(-1),i=y9(n,2),o=i[0],c=i[1];x.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Z=r.current.getTotalLength();Z&&c(Z)}catch{}},[]);var u=t.x,f=t.y,h=t.width,m=t.height,p=t.radius,v=t.className,b=t.animationEasing,S=t.animationDuration,w=t.animationBegin,k=t.isAnimationActive,N=t.isUpdateAnimationActive,E=x.useRef(h),C=x.useRef(m),A=x.useRef(u),_=x.useRef(f),O=x.useMemo(()=>({x:u,y:f,width:h,height:m,radius:p}),[u,f,h,m,p]),I=sC(O,"rectangle-");if(u!==+u||f!==+f||h!==+h||m!==+m||h===0||m===0)return null;var B=nt("recharts-rectangle",v);if(!N){var F=nn(t);F.radius;var $=Xj(F,h9);return x.createElement("path",$f({},$,{x:ma(u),y:ma(f),width:ma(h),height:ma(m),radius:typeof p=="number"?p:void 0,className:B,d:e2(u,f,h,m,p)}))}var Q=E.current,U=C.current,ge=A.current,ue=_.current,pe="0px ".concat(o===-1?1:o,"px"),se="".concat(o,"px ").concat(o,"px"),ae=f9(["strokeDasharray"],S,typeof b=="string"?b:t2.animationEasing);return x.createElement(oC,{animationId:I,key:I,canBegin:o>0,duration:S,easing:b,isActive:N,begin:w},Z=>{var re=hi(Q,h,Z),ie=hi(U,m,Z),D=hi(ge,u,Z),M=hi(ue,f,Z);r.current&&(E.current=re,C.current=ie,A.current=D,_.current=M);var q;k?Z>0?q={transition:ae,strokeDasharray:se}:q={strokeDasharray:pe}:q={strokeDasharray:se};var le=nn(t);le.radius;var oe=Xj(le,m9);return x.createElement("path",$f({},oe,{radius:typeof p=="number"?p:void 0,className:B,d:e2(D,M,re,ie,p),ref:r,style:Zj(Zj({},q),t.style)}))})};function r2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function n2(e){for(var t=1;te*180/Math.PI,Zt=(e,t,r,n)=>({x:e+Math.cos(-zf*n)*r,y:t+Math.sin(-zf*n)*r}),P9=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},O9=(e,t)=>{var r=e.x,n=e.y,i=t.x,o=t.y;return Math.sqrt((r-i)**2+(n-o)**2)},_9=(e,t)=>{var r=e.x,n=e.y,i=t.cx,o=t.cy,c=O9({x:r,y:n},{x:i,y:o});if(c<=0)return{radius:c,angle:0};var u=(r-i)/c,f=Math.acos(u);return n>o&&(f=2*Math.PI-f),{radius:c,angle:C9(f),angleInRadian:f}},M9=e=>{var t=e.startAngle,r=e.endAngle,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-o*360,endAngle:r-o*360}},I9=(e,t)=>{var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),o=Math.floor(n/360),c=Math.min(i,o);return e+c*360},T9=(e,t)=>{var r=e.relativeX,n=e.relativeY,i=_9({x:r,y:n},t),o=i.radius,c=i.angle,u=t.innerRadius,f=t.outerRadius;if(of||o===0)return null;var h=M9(t),m=h.startAngle,p=h.endAngle,v=c,b;if(m<=p){for(;v>p;)v-=360;for(;v=m&&v<=p}else{for(;v>m;)v-=360;for(;v=p&&v<=m}return b?n2(n2({},t),{},{radius:o,angle:I9(v,t)}):null};function lC(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,o=e.endAngle,c=Zt(t,r,n,i),u=Zt(t,r,n,o);return{points:[c,u],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var i2,a2,o2,s2,l2,c2,u2;function sx(){return sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r=en(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},Gd=e=>{var t=e.cx,r=e.cy,n=e.radius,i=e.angle,o=e.sign,c=e.isExternal,u=e.cornerRadius,f=e.cornerIsExternal,h=u*(c?1:-1)+n,m=Math.asin(u/h)/zf,p=f?i:i+o*m,v=Zt(t,r,h,p),b=Zt(t,r,n,p),S=f?i-o*m:i,w=Zt(t,r,h*Math.cos(m*zf),S);return{center:v,circleTangency:b,lineTangency:w,theta:m}},cC=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.startAngle,c=e.endAngle,u=D9(o,c),f=o+u,h=Zt(t,r,i,o),m=Zt(t,r,i,f),p=qt(i2||(i2=Xa(["M ",",",` - A `,",",`,0, - `,",",`, - `,",",` - `])),h.x,h.y,i,i,+(Math.abs(u)>180),+(o>f),m.x,m.y);if(n>0){var v=Zt(t,r,n,o),b=Zt(t,r,n,f);p+=qt(a2||(a2=Xa(["L ",",",` - A `,",",`,0, - `,",",`, - `,","," Z"])),b.x,b.y,n,n,+(Math.abs(u)>180),+(o<=f),v.x,v.y)}else p+=qt(o2||(o2=Xa(["L ",","," Z"])),t,r);return p},R9=e=>{var t=e.cx,r=e.cy,n=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,c=e.forceCornerRadius,u=e.cornerIsExternal,f=e.startAngle,h=e.endAngle,m=en(h-f),p=Gd({cx:t,cy:r,radius:i,angle:f,sign:m,cornerRadius:o,cornerIsExternal:u}),v=p.circleTangency,b=p.lineTangency,S=p.theta,w=Gd({cx:t,cy:r,radius:i,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:u}),k=w.circleTangency,N=w.lineTangency,E=w.theta,C=u?Math.abs(f-h):Math.abs(f-h)-S-E;if(C<0)return c?qt(s2||(s2=Xa(["M ",",",` - a`,",",",0,0,1,",`,0 - a`,",",",0,0,1,",`,0 - `])),b.x,b.y,o,o,o*2,o,o,-o*2):cC({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var A=qt(l2||(l2=Xa(["M ",",",` - A`,",",",0,0,",",",",",` - A`,",",",0,",",",",",",",` - A`,",",",0,0,",",",",",` - `])),b.x,b.y,o,o,+(m<0),v.x,v.y,i,i,+(C>180),+(m<0),k.x,k.y,o,o,+(m<0),N.x,N.y);if(n>0){var _=Gd({cx:t,cy:r,radius:n,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),O=_.circleTangency,I=_.lineTangency,B=_.theta,F=Gd({cx:t,cy:r,radius:n,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),$=F.circleTangency,Q=F.lineTangency,U=F.theta,ge=u?Math.abs(f-h):Math.abs(f-h)-B-U;if(ge<0&&o===0)return"".concat(A,"L").concat(t,",").concat(r,"Z");A+=qt(c2||(c2=Xa(["L",",",` - A`,",",",0,0,",",",",",` - A`,",",",0,",",",",",",",` - A`,",",",0,0,",",",",","Z"])),Q.x,Q.y,o,o,+(m<0),$.x,$.y,n,n,+(ge>180),+(m>0),O.x,O.y,o,o,+(m<0),I.x,I.y)}else A+=qt(u2||(u2=Xa(["L",",","Z"])),t,r);return A},L9={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},$9=e=>{var t=sn(e,L9),r=t.cx,n=t.cy,i=t.innerRadius,o=t.outerRadius,c=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,m=t.endAngle,p=t.className;if(o0&&Math.abs(h-m)<360?w=R9({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(S,b/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:m}):w=cC({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:h,endAngle:m}),x.createElement("path",sx({},nn(t),{className:v,d:w}))};function z9(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(HE(t)){if(e==="centric"){var n=t.cx,i=t.cy,o=t.innerRadius,c=t.outerRadius,u=t.angle,f=Zt(n,i,o,u),h=Zt(n,i,c,u);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return lC(t)}}function F9(e){return iA(e)?NaN:Number(e)}function Lg(e){return e?(e=F9(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function uC(e,t,r){r&&typeof r!="number"&&Bv(e,t,r)&&(t=r=void 0),e=Lg(e),t===void 0?(t=e,e=0):t=Lg(t),r=r===void 0?ee.chartData,m0=Y([En],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Kh=(e,t,r,n)=>n?m0(e):En(e),B9=(e,t,r)=>r?m0(e):En(e),U9=Y([Kh],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});Y([m0],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});var W9=Y([En],e=>{var t=e.chartData,r=e.dataStartIndex,n=e.dataEndIndex;return t!=null?t.slice(r,n+1):[]});function p0(e,t){return V9(e)||G9(e,t)||K9(e,t)||H9()}function H9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K9(e,t){if(e){if(typeof e=="string")return d2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d2(e,t):void 0}}function d2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};Se.decimalPlaces=Se.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ct;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Se.dividedBy=Se.div=function(e){return vi(this,new this.constructor(e))};Se.dividedToIntegerBy=Se.idiv=function(e){var t=this,r=t.constructor;return tt(vi(t,new r(e),0,1),r.precision)};Se.equals=Se.eq=function(e){return!this.cmp(e)};Se.exponent=function(){return Et(this)};Se.greaterThan=Se.gt=function(e){return this.cmp(e)>0};Se.greaterThanOrEqualTo=Se.gte=function(e){return this.cmp(e)>=0};Se.isInteger=Se.isint=function(){return this.e>this.d.length-2};Se.isNegative=Se.isneg=function(){return this.s<0};Se.isPositive=Se.ispos=function(){return this.s>0};Se.isZero=function(){return this.s===0};Se.lessThan=Se.lt=function(e){return this.cmp(e)<0};Se.lessThanOrEqualTo=Se.lte=function(e){return this.cmp(e)<1};Se.logarithm=Se.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq($r))throw Error(on+"NaN");if(r.s<1)throw Error(on+(r.s?"NaN":"-Infinity"));return r.eq($r)?new n(0):(ft=!1,t=vi(zc(r,o),zc(e,o),o),ft=!0,tt(t,i))};Se.minus=Se.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?pC(t,e):hC(t,(e.s=-e.s,e))};Se.modulo=Se.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(on+"NaN");return r.s?(ft=!1,t=vi(r,e,0,1).times(e),ft=!0,r.minus(t)):tt(new n(r),i)};Se.naturalExponential=Se.exp=function(){return mC(this)};Se.naturalLogarithm=Se.ln=function(){return zc(this)};Se.negated=Se.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Se.plus=Se.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?hC(t,e):pC(t,(e.s=-e.s,e))};Se.precision=Se.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(go+e);if(t=Et(i)+1,n=i.d.length-1,r=n*ct+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Se.squareRoot=Se.sqrt=function(){var e,t,r,n,i,o,c,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(on+"NaN")}for(e=Et(u),ft=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Bn(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ll((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=c=r+3;;)if(o=n,n=o.plus(vi(u,o,c+2)).times(.5),Bn(o.d).slice(0,c)===(t=Bn(n.d)).slice(0,c)){if(t=t.slice(c-3,c+1),i==c&&t=="4999"){if(tt(o,r+1,0),o.times(o).eq(u)){n=o;break}}else if(t!="9999")break;c+=4}return ft=!0,tt(n,r)};Se.times=Se.mul=function(e){var t,r,n,i,o,c,u,f,h,m=this,p=m.constructor,v=m.d,b=(e=new p(e)).d;if(!m.s||!e.s)return new p(0);for(e.s*=m.s,r=m.e+e.e,f=v.length,h=b.length,f=0;){for(t=0,i=f+n;i>n;)u=o[i]+b[n]*v[i-n-1]+t,o[i--]=u%zt|0,t=u/zt|0;o[i]=(o[i]+t)%zt|0}for(;!o[--c];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ft?tt(e,p.precision):e};Se.toDecimalPlaces=Se.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Qn(e,0,sl),t===void 0?t=n.rounding:Qn(t,0,8),tt(r,e+Et(r)+1,t))};Se.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=So(n,!0):(Qn(e,0,sl),t===void 0?t=i.rounding:Qn(t,0,8),n=tt(new i(n),e+1,t),r=So(n,!0,e+1)),r};Se.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?So(i):(Qn(e,0,sl),t===void 0?t=o.rounding:Qn(t,0,8),n=tt(new o(i),e+Et(i)+1,t),r=So(n.abs(),!1,e+Et(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Se.toInteger=Se.toint=function(){var e=this,t=e.constructor;return tt(new t(e),Et(e)+1,t.rounding)};Se.toNumber=function(){return+this};Se.toPower=Se.pow=function(e){var t,r,n,i,o,c,u=this,f=u.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f($r);if(u=new f(u),!u.s){if(e.s<1)throw Error(on+"Infinity");return u}if(u.eq($r))return u;if(n=f.precision,e.eq($r))return tt(u,n);if(t=e.e,r=e.d.length-1,c=t>=r,o=u.s,c){if((r=m<0?-m:m)<=fC){for(i=new f($r),t=Math.ceil(n/ct+4),ft=!1;r%2&&(i=i.times(u),m2(i.d,t)),r=ll(r/2),r!==0;)u=u.times(u),m2(u.d,t);return ft=!0,e.s<0?new f($r).div(i):tt(i,n)}}else if(o<0)throw Error(on+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,ft=!1,i=e.times(zc(u,n+h)),ft=!0,i=mC(i),i.s=o,i};Se.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Et(i),n=So(i,r<=o.toExpNeg||r>=o.toExpPos)):(Qn(e,1,sl),t===void 0?t=o.rounding:Qn(t,0,8),i=tt(new o(i),e,t),r=Et(i),n=So(i,e<=r||r<=o.toExpNeg,e)),n};Se.toSignificantDigits=Se.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Qn(e,1,sl),t===void 0?t=n.rounding:Qn(t,0,8)),tt(new n(r),e,t)};Se.toString=Se.valueOf=Se.val=Se.toJSON=Se[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Et(e),r=e.constructor;return So(e,t<=r.toExpNeg||t>=r.toExpPos)};function hC(e,t){var r,n,i,o,c,u,f,h,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),ft?tt(t,p):t;if(f=e.d,h=t.d,c=e.e,i=t.e,f=f.slice(),o=c-i,o){for(o<0?(n=f,o=-o,u=h.length):(n=h,i=c,u=f.length),c=Math.ceil(p/ct),u=c>u?c+1:u+1,o>u&&(o=u,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(u=f.length,o=h.length,u-o<0&&(o=u,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/zt|0,f[o]%=zt;for(r&&(f.unshift(r),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,ft?tt(t,p):t}function Qn(e,t,r){if(e!==~~e||er)throw Error(go+e)}function Bn(e){var t,r,n,i=e.length-1,o="",c=e[0];if(i>0){for(o+=c,t=1;tc?1:-1;else for(u=f=0;ui[u]?1:-1;break}return f}function r(n,i,o){for(var c=0;o--;)n[o]-=c,c=n[o]1;)n.shift()}return function(n,i,o,c){var u,f,h,m,p,v,b,S,w,k,N,E,C,A,_,O,I,B,F=n.constructor,$=n.s==i.s?1:-1,Q=n.d,U=i.d;if(!n.s)return new F(n);if(!i.s)throw Error(on+"Division by zero");for(f=n.e-i.e,I=U.length,_=Q.length,b=new F($),S=b.d=[],h=0;U[h]==(Q[h]||0);)++h;if(U[h]>(Q[h]||0)&&--f,o==null?E=o=F.precision:c?E=o+(Et(n)-Et(i))+1:E=o,E<0)return new F(0);if(E=E/ct+2|0,h=0,I==1)for(m=0,U=U[0],E++;(h<_||m)&&E--;h++)C=m*zt+(Q[h]||0),S[h]=C/U|0,m=C%U|0;else{for(m=zt/(U[0]+1)|0,m>1&&(U=e(U,m),Q=e(Q,m),I=U.length,_=Q.length),A=I,w=Q.slice(0,I),k=w.length;k=zt/2&&++O;do m=0,u=t(U,w,I,k),u<0?(N=w[0],I!=k&&(N=N*zt+(w[1]||0)),m=N/O|0,m>1?(m>=zt&&(m=zt-1),p=e(U,m),v=p.length,k=w.length,u=t(p,w,v,k),u==1&&(m--,r(p,I16)throw Error(g0+Et(e));if(!e.s)return new m($r);for(ft=!1,u=p,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),h+=5;for(n=Math.log(Qa(2,h))/Math.LN10*2+5|0,u+=n,r=i=o=new m($r),m.precision=u;;){if(i=tt(i.times(e),u),r=r.times(++f),c=o.plus(vi(i,r,u)),Bn(c.d).slice(0,u)===Bn(o.d).slice(0,u)){for(;h--;)o=tt(o.times(o),u);return m.precision=p,t==null?(ft=!0,tt(o,p)):o}o=c}}function Et(e){for(var t=e.e*ct,r=e.d[0];r>=10;r/=10)t++;return t}function $g(e,t,r){if(t>e.LN10.sd())throw ft=!0,r&&(e.precision=r),Error(on+"LN10 precision limit exceeded");return tt(new e(e.LN10),t)}function na(e){for(var t="";e--;)t+="0";return t}function zc(e,t){var r,n,i,o,c,u,f,h,m,p=1,v=10,b=e,S=b.d,w=b.constructor,k=w.precision;if(b.s<1)throw Error(on+(b.s?"NaN":"-Infinity"));if(b.eq($r))return new w(0);if(t==null?(ft=!1,h=k):h=t,b.eq(10))return t==null&&(ft=!0),$g(w,h);if(h+=v,w.precision=h,r=Bn(S),n=r.charAt(0),o=Et(b),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)b=b.times(e),r=Bn(b.d),n=r.charAt(0),p++;o=Et(b),n>1?(b=new w("0."+r),o++):b=new w(n+"."+r.slice(1))}else return f=$g(w,h+2,k).times(o+""),b=zc(new w(n+"."+r.slice(1)),h-v).plus(f),w.precision=k,t==null?(ft=!0,tt(b,k)):b;for(u=c=b=vi(b.minus($r),b.plus($r),h),m=tt(b.times(b),h),i=3;;){if(c=tt(c.times(m),h),f=u.plus(vi(c,new w(i),h)),Bn(f.d).slice(0,h)===Bn(u.d).slice(0,h))return u=u.times(2),o!==0&&(u=u.plus($g(w,h+2,k).times(o+""))),u=vi(u,new w(p),h),w.precision=k,t==null?(ft=!0,tt(u,k)):u;u=f,i+=2}}function h2(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=ll(r/ct),e.d=[],n=(r+1)%ct,r<0&&(n+=ct),nFf||e.e<-Ff))throw Error(g0+r)}else e.s=0,e.e=0,e.d=[0];return e}function tt(e,t,r){var n,i,o,c,u,f,h,m,p=e.d;for(c=1,o=p[0];o>=10;o/=10)c++;if(n=t-c,n<0)n+=ct,i=t,h=p[m=0];else{if(m=Math.ceil((n+1)/ct),o=p.length,m>=o)return e;for(h=o=p[m],c=1;o>=10;o/=10)c++;n%=ct,i=n-ct+c}if(r!==void 0&&(o=Qa(10,c-i-1),u=h/o%10|0,f=t<0||p[m+1]!==void 0||h%o,f=r<4?(u||f)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||f||r==6&&(n>0?i>0?h/Qa(10,c-i):0:p[m-1])%10&1||r==(e.s<0?8:7))),t<1||!p[0])return f?(o=Et(e),p.length=1,t=t-o-1,p[0]=Qa(10,(ct-t%ct)%ct),e.e=ll(-t/ct)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(n==0?(p.length=m,o=1,m--):(p.length=m+1,o=Qa(10,ct-n),p[m]=i>0?(h/Qa(10,c-i)%Qa(10,i)|0)*o:0),f)for(;;)if(m==0){(p[0]+=o)==zt&&(p[0]=1,++e.e);break}else{if(p[m]+=o,p[m]!=zt)break;p[m--]=0,o=1}for(n=p.length;p[--n]===0;)p.pop();if(ft&&(e.e>Ff||e.e<-Ff))throw Error(g0+Et(e));return e}function pC(e,t){var r,n,i,o,c,u,f,h,m,p,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),ft?tt(t,b):t;if(f=e.d,p=t.d,n=t.e,h=e.e,f=f.slice(),c=h-n,c){for(m=c<0,m?(r=f,c=-c,u=p.length):(r=p,n=h,u=f.length),i=Math.max(Math.ceil(b/ct),u)+2,c>i&&(c=i,r.length=1),r.reverse(),i=c;i--;)r.push(0);r.reverse()}else{for(i=f.length,u=p.length,m=i0;--i)f[u++]=0;for(i=p.length;i>c;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+na(n):c>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+na(-i-1)+o,r&&(n=r-c)>0&&(o+=na(n))):i>=c?(o+=na(i+1-c),r&&(n=r-i-1)>0&&(o=o+"."+na(n))):((n=i+1)0&&(i+1===c&&(o+="."),o+=na(n))),e.s<0?"-"+o:o}function m2(e,t){if(e.length>t)return e.length=t,!0}function gC(e){var t,r,n;function i(o){var c=this;if(!(c instanceof i))return new i(o);if(c.constructor=i,o instanceof i){c.s=o.s,c.e=o.e,c.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(go+o);if(o>0)c.s=1;else if(o<0)o=-o,c.s=-1;else{c.s=0,c.e=0,c.d=[0];return}if(o===~~o&&o<1e7){c.e=0,c.d=[o];return}return h2(c,o.toString())}else if(typeof o!="string")throw Error(go+o);if(o.charCodeAt(0)===45?(o=o.slice(1),c.s=-1):c.s=1,Y9.test(o))h2(c,o);else throw Error(go+o)}if(i.prototype=Se,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=gC,i.config=i.set=Z9,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(go+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(go+r+": "+n);return this}var v0=gC(Q9);$r=new v0(1);const Ge=v0;function vC(e){var t;return e===0?t=1:t=Math.floor(new Ge(e).abs().log(10).toNumber())+1,t}function xC(e,t,r){for(var n=new Ge(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}function Fc(e,t){return t7(e)||e7(e,t)||J9(e,t)||X9()}function X9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J9(e,t){if(e){if(typeof e=="string")return p2(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p2(e,t):void 0}}function p2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=Fc(e,2),r=t[0],n=t[1],i=r,o=n;return r>n&&(i=n,o=r),[i,o]},x0=(e,t,r)=>{if(e.lte(0))return new Ge(0);var n=vC(e.toNumber()),i=new Ge(10).pow(n),o=e.div(i),c=n!==1?.05:.1,u=new Ge(Math.ceil(o.div(c).toNumber())).add(r).mul(c),f=u.mul(i);return t?new Ge(f.toNumber()):new Ge(Math.ceil(f.toNumber()))},bC=(e,t,r)=>{var n;if(e.lte(0))return new Ge(0);var i=[1,2,2.5,5],o=e.toNumber(),c=Math.floor(new Ge(o).abs().log(10).toNumber()),u=new Ge(10).pow(c),f=e.div(u).toNumber(),h=i.findIndex(b=>b>=f-1e-10);if(h===-1&&(u=u.mul(10),h=0),h+=r,h>=i.length){var m=Math.floor(h/i.length);h%=i.length,u=u.mul(new Ge(10).pow(m))}var p=(n=i[h])!==null&&n!==void 0?n:1,v=new Ge(p).mul(u);return t?v:new Ge(Math.ceil(v.toNumber()))},r7=(e,t,r)=>{var n=new Ge(1),i=new Ge(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new Ge(10).pow(vC(e)-1),i=new Ge(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new Ge(Math.floor(e)))}else e===0?i=new Ge(Math.floor((t-1)/2)):r||(i=new Ge(Math.floor(e)));for(var c=Math.floor((t-1)/2),u=[],f=0;f4&&arguments[4]!==void 0?arguments[4]:0,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:x0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Ge(0),tickMin:new Ge(0),tickMax:new Ge(0)};var u=c(new Ge(r).sub(t).div(n-1),i,o),f;t<=0&&r>=0?f=new Ge(0):(f=new Ge(t).add(r).div(2),f=f.sub(new Ge(f).mod(u)));var h=Math.ceil(f.sub(t).div(u).toNumber()),m=Math.ceil(new Ge(r).sub(f).div(u).toNumber()),p=h+m+1;return p>n?wC(t,r,n,i,o+1,c):(p0?m+(n-p):m,h=r>0?h:h+(n-p)),{step:u,tickMin:f.sub(new Ge(h).mul(u)),tickMax:f.add(new Ge(m).mul(u))})},g2=function(t){var r=Fc(t,2),n=r[0],i=r[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(o,2),h=yC([n,i]),m=Fc(h,2),p=m[0],v=m[1];if(p===-1/0||v===1/0){var b=v===1/0?[p,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),v];return n>i?b.reverse():b}if(p===v)return r7(p,o,c);var S=u==="snap125"?bC:x0,w=wC(p,v,f,c,0,S),k=w.step,N=w.tickMin,E=w.tickMax,C=xC(N,E.add(new Ge(.1).mul(k)),k);return n>i?C.reverse():C},v2=function(t,r){var n=Fc(t,2),i=n[0],o=n[1],c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=yC([i,o]),h=Fc(f,2),m=h[0],p=h[1];if(m===-1/0||p===1/0)return[i,o];if(m===p)return[m];var v=u==="snap125"?bC:x0,b=Math.max(r,2),S=v(new Ge(p).sub(m).div(b-1),c,0),w=[...xC(new Ge(m),new Ge(p),S),p];return c===!1&&(w=w.map(k=>Math.round(k))),i>o?w.reverse():w},n7=e=>e.rootProps.barCategoryGap,Gh=e=>e.rootProps.stackOffset,kC=e=>e.rootProps.reverseStackOrder,y0=e=>e.options.chartName,b0=e=>e.rootProps.syncId,jC=e=>e.rootProps.syncMethod,w0=e=>e.options.eventEmitter,i7=e=>e.rootProps.baseValue,pr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ua={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Tn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Vh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function qh(e,t,r){if(r!=="auto")return r;if(e!=null)return Zn(e,t)?"category":"number"}function x2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bf(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},k0=Y([l7,VA],(e,t)=>{var r;if(e!=null)return e;var n=(r=qh(t,"angleAxis",y2.type))!==null&&r!==void 0?r:"category";return Bf(Bf({},y2),{},{type:n})}),c7=(e,t)=>e.polarAxis.radiusAxis[t],j0=Y([c7,VA],(e,t)=>{var r;if(e!=null)return e;var n=(r=qh(t,"radiusAxis",b2.type))!==null&&r!==void 0?r:"category";return Bf(Bf({},b2),{},{type:n})}),Qh=e=>e.polarOptions,S0=Y([Ni,Ei,er],P9),SC=Y([Qh,S0],(e,t)=>{if(e!=null)return ja(e.innerRadius,t,0)}),NC=Y([Qh,S0],(e,t)=>{if(e!=null)return ja(e.outerRadius,t,t*.8)}),u7=e=>{if(e==null)return[0,0];var t=e.startAngle,r=e.endAngle;return[t,r]},EC=Y([Qh],u7);Y([k0,EC],Vh);var AC=Y([S0,SC,NC],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});Y([j0,AC],Vh);var CC=Y([ht,Qh,SC,NC,Ni,Ei],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var c=t.cx,u=t.cy,f=t.startAngle,h=t.endAngle;return{cx:ja(c,i,i/2),cy:ja(u,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Ut=(e,t)=>t,Yh=(e,t,r)=>r;function N0(e){return e==null?void 0:e.id}function PC(e,t,r){var n=t.chartData,i=n===void 0?[]:n,o=r.allowDuplicatedCategory,c=r.dataKey,u=new Map;return e.forEach(f=>{var h,m=(h=f.data)!==null&&h!==void 0?h:i;if(!(m==null||m.length===0)){var p=N0(f);m.forEach((v,b)=>{var S=c==null||o?b:String(Ft(v,c,null)),w=Ft(v,f.dataKey,0),k;u.has(S)?k=u.get(S):k={},Object.assign(k,{[p]:w}),u.set(S,k)})}}),Array.from(u.values())}function E0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Zh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Xh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function d7(e,t){if(e.length===t.length){for(var r=0;r{var t=ht(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},cl=e=>e.tooltip.settings.axisId;function A0(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function c(){return o.apply(this,arguments)}return c.toString=function(){return o.toString()},c})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var c=i[0],u=i[1];return c<=u?o>=c&&o<=u:o>=u&&o<=c},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,c)=>{var u=e(o);if(u!=null){if(e.bandwidth&&c!==null&&c!==void 0&&c.position){var f=e.bandwidth();switch(c.position){case"middle":u+=f/2;break;case"end":u+=f;break}}return u}}}}}var f7=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Un(t)){for(var r,n,i=0;in)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function ya(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function h7(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function C0(e){let t,r,n;e.length!==2?(t=ya,r=(u,f)=>ya(e(u),f),n=(u,f)=>e(u)-f):(t=e===ya||e===h7?e:m7,r=e,n=e);function i(u,f,h=0,m=u.length){if(h>>1;r(u[p],f)<0?h=p+1:m=p}while(h>>1;r(u[p],f)<=0?h=p+1:m=p}while(hh&&n(u[p-1],f)>-n(u[p],f)?p-1:p}return{left:i,center:c,right:o}}function m7(){return 0}function OC(e){return e===null?NaN:+e}function*p7(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const g7=C0(ya),uu=g7.right;C0(OC).center;class w2 extends Map{constructor(t,r=y7){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(k2(this,t))}has(t){return super.has(k2(this,t))}set(t,r){return super.set(v7(this,t),r)}delete(t){return super.delete(x7(this,t))}}function k2({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function v7({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function x7({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function y7(e){return e!==null&&typeof e=="object"?e.valueOf():e}function b7(e=ya){if(e===ya)return _C;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function _C(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const w7=Math.sqrt(50),k7=Math.sqrt(10),j7=Math.sqrt(2);function Uf(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),c=o>=w7?10:o>=k7?5:o>=j7?2:1;let u,f,h;return i<0?(h=Math.pow(10,-i)/c,u=Math.round(e*h),f=Math.round(t*h),u/ht&&--f,h=-h):(h=Math.pow(10,i)*c,u=Math.round(e/h),f=Math.round(t/h),u*ht&&--f),f0))return[];if(e===t)return[e];const n=t=i))return[];const u=o-i+1,f=new Array(u);if(n)if(c<0)for(let h=0;h=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}function S2(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function MC(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?_C:b7(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,m=Math.log(f),p=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*p*(f-p)/f)*(h-f/2<0?-1:1),b=Math.max(r,Math.floor(t-h*p/f+v)),S=Math.min(n,Math.floor(t+(f-h)*p/f+v));MC(e,t,b,S,i)}const o=e[t];let c=r,u=n;for(dc(e,r,t),i(e[n],o)>0&&dc(e,r,n);c0;)--u}i(e[r],o)===0?dc(e,r,u):(++u,dc(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function dc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function S7(e,t,r){if(e=Float64Array.from(p7(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return S2(e);if(t>=1)return j2(e);var n,i=(n-1)*t,o=Math.floor(i),c=j2(MC(e,o).subarray(0,o+1)),u=S2(e.subarray(o+1));return c+(u-c)*(i-o)}}function N7(e,t,r=OC){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),c=+r(e[o],o,e),u=+r(e[o+1],o+1,e);return c+(u-c)*(i-o)}}function E7(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Vd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Vd(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=P7.exec(e))?new Pr(t[1],t[2],t[3],1):(t=O7.exec(e))?new Pr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_7.exec(e))?Vd(t[1],t[2],t[3],t[4]):(t=M7.exec(e))?Vd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=I7.exec(e))?_2(t[1],t[2]/100,t[3]/100,1):(t=T7.exec(e))?_2(t[1],t[2]/100,t[3]/100,t[4]):N2.hasOwnProperty(e)?C2(N2[e]):e==="transparent"?new Pr(NaN,NaN,NaN,0):null}function C2(e){return new Pr(e>>16&255,e>>8&255,e&255,1)}function Vd(e,t,r,n){return n<=0&&(e=t=r=NaN),new Pr(e,t,r,n)}function L7(e){return e instanceof du||(e=Wc(e)),e?(e=e.rgb(),new Pr(e.r,e.g,e.b,e.opacity)):new Pr}function fx(e,t,r,n){return arguments.length===1?L7(e):new Pr(e,t,r,n??1)}function Pr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}_0(Pr,fx,TC(du,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new Pr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Bc:Math.pow(Bc,e),new Pr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Pr(vo(this.r),vo(this.g),vo(this.b),Hf(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:P2,formatHex:P2,formatHex8:$7,formatRgb:O2,toString:O2}));function P2(){return`#${Ja(this.r)}${Ja(this.g)}${Ja(this.b)}`}function $7(){return`#${Ja(this.r)}${Ja(this.g)}${Ja(this.b)}${Ja((isNaN(this.opacity)?1:this.opacity)*255)}`}function O2(){const e=Hf(this.opacity);return`${e===1?"rgb(":"rgba("}${vo(this.r)}, ${vo(this.g)}, ${vo(this.b)}${e===1?")":`, ${e})`}`}function Hf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ja(e){return e=vo(e),(e<16?"0":"")+e.toString(16)}function _2(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new wn(e,t,r,n)}function DC(e){if(e instanceof wn)return new wn(e.h,e.s,e.l,e.opacity);if(e instanceof du||(e=Wc(e)),!e)return new wn;if(e instanceof wn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),c=NaN,u=o-i,f=(o+i)/2;return u?(t===o?c=(r-n)/u+(r0&&f<1?0:c,new wn(c,u,f,e.opacity)}function z7(e,t,r,n){return arguments.length===1?DC(e):new wn(e,t,r,n??1)}function wn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}_0(wn,z7,TC(du,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new wn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Bc:Math.pow(Bc,e),new wn(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Pr(zg(e>=240?e-240:e+120,i,n),zg(e,i,n),zg(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new wn(M2(this.h),qd(this.s),qd(this.l),Hf(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(){const e=Hf(this.opacity);return`${e===1?"hsl(":"hsla("}${M2(this.h)}, ${qd(this.s)*100}%, ${qd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function M2(e){return e=(e||0)%360,e<0?e+360:e}function qd(e){return Math.max(0,Math.min(1,e||0))}function zg(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const M0=e=>()=>e;function F7(e,t){return function(r){return e+r*t}}function B7(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function U7(e){return(e=+e)==1?RC:function(t,r){return r-t?B7(t,r,e):M0(isNaN(t)?r:t)}}function RC(e,t){var r=t-e;return r?F7(e,r):M0(isNaN(e)?t:e)}const I2=(function e(t){var r=U7(t);function n(i,o){var c=r((i=fx(i)).r,(o=fx(o)).r),u=r(i.g,o.g),f=r(i.b,o.b),h=RC(i.opacity,o.opacity);return function(m){return i.r=c(m),i.g=u(m),i.b=f(m),i.opacity=h(m),i+""}}return n.gamma=e,n})(1);function W7(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;ir&&(o=t.slice(r,o),u[c]?u[c]+=o:u[++c]=o),(n=n[0])===(i=i[0])?u[c]?u[c]+=i:u[++c]=i:(u[++c]=null,f.push({i:c,x:Kf(n,i)})),r=Fg.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function eB(e,t,r){var n=e[0],i=e[1],o=t[0],c=t[1];return i2?tB:eB,f=h=null,p}function p(v){return v==null||isNaN(v=+v)?o:(f||(f=u(e.map(n),t,r)))(n(c(v)))}return p.invert=function(v){return c(i((h||(h=u(t,e.map(n),Kf)))(v)))},p.domain=function(v){return arguments.length?(e=Array.from(v,Gf),m()):e.slice()},p.range=function(v){return arguments.length?(t=Array.from(v),m()):t.slice()},p.rangeRound=function(v){return t=Array.from(v),r=I0,m()},p.clamp=function(v){return arguments.length?(c=v?!0:gr,m()):c!==gr},p.interpolate=function(v){return arguments.length?(r=v,m()):r},p.unknown=function(v){return arguments.length?(o=v,p):o},function(v,b){return n=v,i=b,m()}}function T0(){return Jh()(gr,gr)}function rB(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Vf(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Vs(e){return e=Vf(Math.abs(e)),e?e[1]:NaN}function nB(e,t){return function(r,n){for(var i=r.length,o=[],c=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>n&&(u=Math.max(1,n-f)),o.push(r.substring(i-=u,i+u)),!((f+=u+1)>n));)u=e[c=(c+1)%e.length];return o.reverse().join(t)}}function iB(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var aB=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hc(e){if(!(t=aB.exec(e)))throw new Error("invalid format: "+e);var t;return new D0({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]})}Hc.prototype=D0.prototype;function D0(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+""}D0.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 oB(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var qf;function sB(e,t){var r=Vf(e,t);if(!r)return qf=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(qf=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,c=n.length;return o===c?n:o>c?n+new Array(o-c+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Vf(e,Math.max(0,t+o-1))[0]}function D2(e,t){var r=Vf(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const R2={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:rB,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)=>D2(e*100,t),r:D2,s:sB,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function L2(e){return e}var $2=Array.prototype.map,z2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lB(e){var t=e.grouping===void 0||e.thousands===void 0?L2:nB($2.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?L2:iB($2.call(e.numerals,String)),c=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(p,v){p=Hc(p);var b=p.fill,S=p.align,w=p.sign,k=p.symbol,N=p.zero,E=p.width,C=p.comma,A=p.precision,_=p.trim,O=p.type;O==="n"?(C=!0,O="g"):R2[O]||(A===void 0&&(A=12),_=!0,O="g"),(N||b==="0"&&S==="=")&&(N=!0,b="0",S="=");var I=(v&&v.prefix!==void 0?v.prefix:"")+(k==="$"?r:k==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),B=(k==="$"?n:/[%p]/.test(O)?c:"")+(v&&v.suffix!==void 0?v.suffix:""),F=R2[O],$=/[defgprs%]/.test(O);A=A===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function Q(U){var ge=I,ue=B,pe,se,ae;if(O==="c")ue=F(U)+ue,U="";else{U=+U;var Z=U<0||1/U<0;if(U=isNaN(U)?f:F(Math.abs(U),A),_&&(U=oB(U)),Z&&+U==0&&w!=="+"&&(Z=!1),ge=(Z?w==="("?w:u:w==="-"||w==="("?"":w)+ge,ue=(O==="s"&&!isNaN(U)&&qf!==void 0?z2[8+qf/3]:"")+ue+(Z&&w==="("?")":""),$){for(pe=-1,se=U.length;++peae||ae>57){ue=(ae===46?i+U.slice(pe+1):U.slice(pe))+ue,U=U.slice(0,pe);break}}}C&&!N&&(U=t(U,1/0));var re=ge.length+U.length+ue.length,ie=re>1)+ge+U+ue+ie.slice(re);break;default:U=ie+ge+U+ue;break}return o(U)}return Q.toString=function(){return p+""},Q}function m(p,v){var b=Math.max(-8,Math.min(8,Math.floor(Vs(v)/3)))*3,S=Math.pow(10,-b),w=h((p=Hc(p),p.type="f",p),{suffix:z2[8+b/3]});return function(k){return w(S*k)}}return{format:h,formatPrefix:m}}var Qd,R0,LC;cB({thousands:",",grouping:[3],currency:["$",""]});function cB(e){return Qd=lB(e),R0=Qd.format,LC=Qd.formatPrefix,Qd}function uB(e){return Math.max(0,-Vs(Math.abs(e)))}function dB(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vs(t)/3)))*3-Vs(Math.abs(e)))}function fB(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vs(t)-Vs(e))+1}function $C(e,t,r,n){var i=ux(e,t,r),o;switch(n=Hc(n??",f"),n.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=dB(i,c))&&(n.precision=o),LC(n,c)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=fB(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=uB(i))&&(n.precision=o-(n.type==="%")*2);break}}return R0(n)}function Na(e){var t=e.domain;return e.ticks=function(r){var n=t();return lx(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return $C(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,c=n[i],u=n[o],f,h,m=10;for(u0;){if(h=cx(c,u,r),h===f)return n[i]=c,n[o]=u,t(n);if(h>0)c=Math.floor(c/h)*h,u=Math.ceil(u/h)*h;else if(h<0)c=Math.ceil(c*h)/h,u=Math.floor(u*h)/h;else break;f=h}return e},e}function zC(){var e=T0();return e.copy=function(){return fu(e,zC())},ln.apply(e,arguments),Na(e)}function FC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Gf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return FC(e).unknown(t)},e=arguments.length?Array.from(e,Gf):[0,1],Na(r)}function BC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],c;return oMath.pow(e,t)}function vB(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 U2(e){return(t,r)=>-e(-t,r)}function L0(e){const t=e(F2,B2),r=t.domain;let n=10,i,o;function c(){return i=vB(n),o=gB(n),r()[0]<0?(i=U2(i),o=U2(o),e(hB,mB)):e(F2,B2),t}return t.base=function(u){return arguments.length?(n=+u,c()):n},t.domain=function(u){return arguments.length?(r(u),c()):r()},t.ticks=u=>{const f=r();let h=f[0],m=f[f.length-1];const p=m0){for(;v<=b;++v)for(S=1;Sm)break;N.push(w)}}else for(;v<=b;++v)for(S=n-1;S>=1;--S)if(w=v>0?S/o(-v):S*o(v),!(wm)break;N.push(w)}N.length*2{if(u==null&&(u=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Hc(f)).precision==null&&(f.trim=!0),f=R0(f)),u===1/0)return f;const h=Math.max(1,n*u/t.ticks().length);return m=>{let p=m/o(Math.round(i(m)));return p*nr(BC(r(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function UC(){const e=L0(Jh()).domain([1,10]);return e.copy=()=>fu(e,UC()).base(e.base()),ln.apply(e,arguments),e}function W2(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function H2(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function $0(e){var t=1,r=e(W2(t),H2(t));return r.constant=function(n){return arguments.length?e(W2(t=+n),H2(t)):t},Na(r)}function WC(){var e=$0(Jh());return e.copy=function(){return fu(e,WC()).constant(e.constant())},ln.apply(e,arguments)}function K2(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function xB(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function yB(e){return e<0?-e*e:e*e}function z0(e){var t=e(gr,gr),r=1;function n(){return r===1?e(gr,gr):r===.5?e(xB,yB):e(K2(r),K2(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Na(t)}function F0(){var e=z0(Jh());return e.copy=function(){return fu(e,F0()).exponent(e.exponent())},ln.apply(e,arguments),e}function bB(){return F0.apply(null,arguments).exponent(.5)}function G2(e){return Math.sign(e)*e*e}function wB(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function HC(){var e=T0(),t=[0,1],r=!1,n;function i(o){var c=wB(e(o));return isNaN(c)?n:r?Math.round(c):c}return i.invert=function(o){return e.invert(G2(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Gf)).map(G2)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return HC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ln.apply(i,arguments),Na(i)}function KC(){var e=[],t=[],r=[],n;function i(){var c=0,u=Math.max(1,t.length);for(r=new Array(u-1);++c0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[h-1],n[h]]},c.unknown=function(f){return arguments.length&&(o=f),c},c.thresholds=function(){return n.slice()},c.copy=function(){return GC().domain([e,t]).range(i).unknown(o)},ln.apply(Na(c),arguments)}function VC(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[uu(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var c=t.indexOf(o);return[e[c-1],e[c]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return VC().domain(e).range(t).unknown(r)},ln.apply(i,arguments)}const Bg=new Date,Ug=new Date;function It(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const c=i(o),u=i.ceil(o);return o-c(t(o=new Date(+o),c==null?1:Math.floor(c)),o),i.range=(o,c,u)=>{const f=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o0))return f;let h;do f.push(h=new Date(+o)),t(o,u),e(o);while(hIt(c=>{if(c>=c)for(;e(c),!o(c);)c.setTime(c-1)},(c,u)=>{if(c>=c)if(u<0)for(;++u<=0;)for(;t(c,-1),!o(c););else for(;--u>=0;)for(;t(c,1),!o(c););}),r&&(i.count=(o,c)=>(Bg.setTime(+o),Ug.setTime(+c),e(Bg),e(Ug),Math.floor(r(Bg,Ug))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?c=>n(c)%o===0:c=>i.count(0,c)%o===0):i)),i}const Qf=It(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Qf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?It(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Qf);Qf.range;const mi=1e3,rn=mi*60,pi=rn*60,wi=pi*24,B0=wi*7,V2=wi*30,Wg=wi*365,eo=It(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*mi)},(e,t)=>(t-e)/mi,e=>e.getUTCSeconds());eo.range;const U0=It(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mi)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getMinutes());U0.range;const W0=It(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getUTCMinutes());W0.range;const H0=It(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mi-e.getMinutes()*rn)},(e,t)=>{e.setTime(+e+t*pi)},(e,t)=>(t-e)/pi,e=>e.getHours());H0.range;const K0=It(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*pi)},(e,t)=>(t-e)/pi,e=>e.getUTCHours());K0.range;const hu=It(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rn)/wi,e=>e.getDate()-1);hu.range;const em=It(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/wi,e=>e.getUTCDate()-1);em.range;const qC=It(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/wi,e=>Math.floor(e/wi));qC.range;function Oo(e){return It(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*rn)/B0)}const tm=Oo(0),Yf=Oo(1),kB=Oo(2),jB=Oo(3),qs=Oo(4),SB=Oo(5),NB=Oo(6);tm.range;Yf.range;kB.range;jB.range;qs.range;SB.range;NB.range;function _o(e){return It(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/B0)}const rm=_o(0),Zf=_o(1),EB=_o(2),AB=_o(3),Qs=_o(4),CB=_o(5),PB=_o(6);rm.range;Zf.range;EB.range;AB.range;Qs.range;CB.range;PB.range;const G0=It(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());G0.range;const V0=It(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());V0.range;const ki=It(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());ki.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:It(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ki.range;const ji=It(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());ji.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:It(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ji.range;function QC(e,t,r,n,i,o){const c=[[eo,1,mi],[eo,5,5*mi],[eo,15,15*mi],[eo,30,30*mi],[o,1,rn],[o,5,5*rn],[o,15,15*rn],[o,30,30*rn],[i,1,pi],[i,3,3*pi],[i,6,6*pi],[i,12,12*pi],[n,1,wi],[n,2,2*wi],[r,1,B0],[t,1,V2],[t,3,3*V2],[e,1,Wg]];function u(h,m,p){const v=mk).right(c,v);if(b===c.length)return e.every(ux(h/Wg,m/Wg,p));if(b===0)return Qf.every(Math.max(ux(h,m,p),1));const[S,w]=c[v/c[b-1][2]53)return null;"w"in fe||(fe.w=1),"Z"in fe?(Be=Kg(fc(fe.y,0,1)),_e=Be.getUTCDay(),Be=_e>4||_e===0?Zf.ceil(Be):Zf(Be),Be=em.offset(Be,(fe.V-1)*7),fe.y=Be.getUTCFullYear(),fe.m=Be.getUTCMonth(),fe.d=Be.getUTCDate()+(fe.w+6)%7):(Be=Hg(fc(fe.y,0,1)),_e=Be.getDay(),Be=_e>4||_e===0?Yf.ceil(Be):Yf(Be),Be=hu.offset(Be,(fe.V-1)*7),fe.y=Be.getFullYear(),fe.m=Be.getMonth(),fe.d=Be.getDate()+(fe.w+6)%7)}else("W"in fe||"U"in fe)&&("w"in fe||(fe.w="u"in fe?fe.u%7:"W"in fe?1:0),_e="Z"in fe?Kg(fc(fe.y,0,1)).getUTCDay():Hg(fc(fe.y,0,1)).getDay(),fe.m=0,fe.d="W"in fe?(fe.w+6)%7+fe.W*7-(_e+5)%7:fe.w+fe.U*7-(_e+6)%7);return"Z"in fe?(fe.H+=fe.Z/100|0,fe.M+=fe.Z%100,Kg(fe)):Hg(fe)}}function B(J,xe,be,fe){for(var qe=0,Be=xe.length,_e=be.length,wt,tr;qe=_e)return-1;if(wt=xe.charCodeAt(qe++),wt===37){if(wt=xe.charAt(qe++),tr=_[wt in q2?xe.charAt(qe++):wt],!tr||(fe=tr(J,be,fe))<0)return-1}else if(wt!=be.charCodeAt(fe++))return-1}return fe}function F(J,xe,be){var fe=h.exec(xe.slice(be));return fe?(J.p=m.get(fe[0].toLowerCase()),be+fe[0].length):-1}function $(J,xe,be){var fe=b.exec(xe.slice(be));return fe?(J.w=S.get(fe[0].toLowerCase()),be+fe[0].length):-1}function Q(J,xe,be){var fe=p.exec(xe.slice(be));return fe?(J.w=v.get(fe[0].toLowerCase()),be+fe[0].length):-1}function U(J,xe,be){var fe=N.exec(xe.slice(be));return fe?(J.m=E.get(fe[0].toLowerCase()),be+fe[0].length):-1}function ge(J,xe,be){var fe=w.exec(xe.slice(be));return fe?(J.m=k.get(fe[0].toLowerCase()),be+fe[0].length):-1}function ue(J,xe,be){return B(J,t,xe,be)}function pe(J,xe,be){return B(J,r,xe,be)}function se(J,xe,be){return B(J,n,xe,be)}function ae(J){return c[J.getDay()]}function Z(J){return o[J.getDay()]}function re(J){return f[J.getMonth()]}function ie(J){return u[J.getMonth()]}function D(J){return i[+(J.getHours()>=12)]}function M(J){return 1+~~(J.getMonth()/3)}function q(J){return c[J.getUTCDay()]}function le(J){return o[J.getUTCDay()]}function oe(J){return f[J.getUTCMonth()]}function te(J){return u[J.getUTCMonth()]}function W(J){return i[+(J.getUTCHours()>=12)]}function ne(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var xe=O(J+="",C);return xe.toString=function(){return J},xe},parse:function(J){var xe=I(J+="",!1);return xe.toString=function(){return J},xe},utcFormat:function(J){var xe=O(J+="",A);return xe.toString=function(){return J},xe},utcParse:function(J){var xe=I(J+="",!0);return xe.toString=function(){return J},xe}}}var q2={"-":"",_:" ",0:"0"},Ht=/^\s*\d+/,DB=/^%/,RB=/[\\^$*+?|[\]().{}]/g;function Ye(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[t.toLowerCase(),r]))}function $B(e,t,r){var n=Ht.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function zB(e,t,r){var n=Ht.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function FB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function BB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function UB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Q2(e,t,r){var n=Ht.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Y2(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function WB(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function HB(e,t,r){var n=Ht.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function KB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Z2(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function GB(e,t,r){var n=Ht.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function X2(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function VB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function qB(e,t,r){var n=Ht.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function QB(e,t,r){var n=Ht.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function YB(e,t,r){var n=Ht.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function ZB(e,t,r){var n=DB.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function XB(e,t,r){var n=Ht.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function JB(e,t,r){var n=Ht.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function J2(e,t){return Ye(e.getDate(),t,2)}function eU(e,t){return Ye(e.getHours(),t,2)}function tU(e,t){return Ye(e.getHours()%12||12,t,2)}function rU(e,t){return Ye(1+hu.count(ki(e),e),t,3)}function YC(e,t){return Ye(e.getMilliseconds(),t,3)}function nU(e,t){return YC(e,t)+"000"}function iU(e,t){return Ye(e.getMonth()+1,t,2)}function aU(e,t){return Ye(e.getMinutes(),t,2)}function oU(e,t){return Ye(e.getSeconds(),t,2)}function sU(e){var t=e.getDay();return t===0?7:t}function lU(e,t){return Ye(tm.count(ki(e)-1,e),t,2)}function ZC(e){var t=e.getDay();return t>=4||t===0?qs(e):qs.ceil(e)}function cU(e,t){return e=ZC(e),Ye(qs.count(ki(e),e)+(ki(e).getDay()===4),t,2)}function uU(e){return e.getDay()}function dU(e,t){return Ye(Yf.count(ki(e)-1,e),t,2)}function fU(e,t){return Ye(e.getFullYear()%100,t,2)}function hU(e,t){return e=ZC(e),Ye(e.getFullYear()%100,t,2)}function mU(e,t){return Ye(e.getFullYear()%1e4,t,4)}function pU(e,t){var r=e.getDay();return e=r>=4||r===0?qs(e):qs.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function gU(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function eS(e,t){return Ye(e.getUTCDate(),t,2)}function vU(e,t){return Ye(e.getUTCHours(),t,2)}function xU(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function yU(e,t){return Ye(1+em.count(ji(e),e),t,3)}function XC(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function bU(e,t){return XC(e,t)+"000"}function wU(e,t){return Ye(e.getUTCMonth()+1,t,2)}function kU(e,t){return Ye(e.getUTCMinutes(),t,2)}function jU(e,t){return Ye(e.getUTCSeconds(),t,2)}function SU(e){var t=e.getUTCDay();return t===0?7:t}function NU(e,t){return Ye(rm.count(ji(e)-1,e),t,2)}function JC(e){var t=e.getUTCDay();return t>=4||t===0?Qs(e):Qs.ceil(e)}function EU(e,t){return e=JC(e),Ye(Qs.count(ji(e),e)+(ji(e).getUTCDay()===4),t,2)}function AU(e){return e.getUTCDay()}function CU(e,t){return Ye(Zf.count(ji(e)-1,e),t,2)}function PU(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function OU(e,t){return e=JC(e),Ye(e.getUTCFullYear()%100,t,2)}function _U(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function MU(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Qs(e):Qs.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function IU(){return"+0000"}function tS(){return"%"}function rS(e){return+e}function nS(e){return Math.floor(+e/1e3)}var us,eP,tP;TU({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 TU(e){return us=TB(e),eP=us.format,us.parse,tP=us.utcFormat,us.utcParse,us}function DU(e){return new Date(e)}function RU(e){return e instanceof Date?+e:+new Date(+e)}function q0(e,t,r,n,i,o,c,u,f,h){var m=T0(),p=m.invert,v=m.domain,b=h(".%L"),S=h(":%S"),w=h("%I:%M"),k=h("%I %p"),N=h("%a %d"),E=h("%b %d"),C=h("%B"),A=h("%Y");function _(O){return(f(O)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>S7(e,o/n))},r.copy=function(){return aP(t).domain(e)},Ai.apply(r,arguments)}function im(){var e=0,t=.5,r=1,n=1,i,o,c,u,f,h=gr,m,p=!1,v;function b(w){return isNaN(w=+w)?v:(w=.5+((w=+m(w))-o)*(n*w{if(e!=null){var n=e.scale,i=e.type;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return WU(n)?n:"point"}};function HU(e,t){for(var r=0,n=e.length,i=e[0]t)?r=o+1:n=o}return r}function dP(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var c;return(c=e(o))!==null&&c!==void 0?c:0}),i=e.range();if(!(r.length===0||i.length<2))return o=>{var c,u,f=HU(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(c=n[f-1])!==null&&c!==void 0?c:0,m=(u=n[f])!==null&&u!==void 0?u:0;return Math.abs(o-h)<=Math.abs(o-m)?r[f-1]:r[f]}}}function KU(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):dP(e,void 0)}function aS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);re.cartesianAxis.xAxis[t],Ci=(e,t)=>{var r=hP(e,t);return r??Ot},_t={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:px,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:au},mP=(e,t)=>e.cartesianAxis.yAxis[t],Pi=(e,t)=>{var r=mP(e,t);return r??_t},JU={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:""},X0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??JU},yr=(e,t,r)=>{switch(t){case"xAxis":return Ci(e,r);case"yAxis":return Pi(e,r);case"zAxis":return X0(e,r);case"angleAxis":return k0(e,r);case"radiusAxis":return j0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},eW=(e,t,r)=>{switch(t){case"xAxis":return Ci(e,r);case"yAxis":return Pi(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},mu=(e,t,r)=>{switch(t){case"xAxis":return Ci(e,r);case"yAxis":return Pi(e,r);case"angleAxis":return k0(e,r);case"radiusAxis":return j0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},pP=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function gP(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var vP=e=>e.graphicalItems.cartesianItems,tW=Y([Ut,Yh],gP),xP=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),dl=Y([vP,yr,tW],xP,{memoizeOptions:{resultEqualityCheck:Xh}}),yP=Y([dl],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(E0)),bP=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),rW=Y([dl],bP),wP=e=>e.map(t=>t.data).filter(Boolean).flat(1),nW=Y([dl],e=>e.some(t=>!t.data)),kP=Y([dl],wP,{memoizeOptions:{resultEqualityCheck:Xh}}),jP=(e,t)=>{var r=t.chartData,n=r===void 0?[]:r,i=t.dataStartIndex,o=t.dataEndIndex;return e.length>0?e:n.slice(i,o+1)},J0=Y([kP,Kh],jP),iW=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Ft(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Ft(i,n)}))):e.map(n=>({value:n})),SP=(e,t,r,n,i,o)=>{var c=n.chartData,u=c===void 0?[]:c,f=n.dataStartIndex,h=n.dataEndIndex,m=iW(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var p=u.slice(f,h+1),v=p.map(b=>({value:Ft(b,t.dataKey)})).filter(b=>b.value!=null);return[...v,...m]}return m},pu=Y([J0,yr,dl,Kh,nW,kP],SP);function Es(e){if(Vn(e)||e instanceof Date){var t=Number(e);if(He(t))return t}}function sS(e){if(Array.isArray(e)){var t=[Es(e[0]),Es(e[1])];return Un(t)?t:void 0}var r=Es(e);if(r!=null)return[r,r]}function Yn(e){return e.map(Es).filter(Cr)}function aW(e,t){var r=Es(e),n=Es(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var oW=Y([pu],e=>e==null?void 0:e.map(t=>t.value).sort(aW));function NP(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function sW(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!Gn(t))n=t;else if(Array.isArray(t)){var i=Yn(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:Yn(r.flatMap(o=>{var c=Ft(e,o.dataKey),u,f;if(Array.isArray(c)){var h=fP(c,2);u=h[0],f=h[1]}else u=f=c;if(!(!He(u)||!He(f)))return[n-u,n+f]}))}var Tt=e=>{var t=Wt(e),r=cl(e);return mu(e,t,r)},Ys=Y([Tt],e=>e==null?void 0:e.dataKey),lW=Y([yP,Kh,Tt],PC),EP=(e,t,r,n)=>{var i={},o=t.reduce((c,u)=>{if(u.stackId==null)return c;var f=c[u.stackId];return f==null&&(f=[]),f.push(u),c[u.stackId]=f,c},i);return Object.fromEntries(Object.entries(o).map(c=>{var u=fP(c,2),f=u[0],h=u[1],m=n?[...h].reverse():h,p=m.map(N0);return[f,{stackedData:Ez(e,p,r),graphicalItems:m}]}))},AP=Y([lW,yP,Gh,kC],EP),CP=(e,t,r,n)=>{var i=t.dataStartIndex,o=t.dataEndIndex;if(n==null&&r!=="zAxis")return Oz(e,i,o)},cW=Y([yr],e=>e.allowDataOverflow),ey=e=>{var t;if(e==null||!("domain"in e))return px;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=Yn(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:px},PP=Y([yr],ey),OP=Y([PP,cW],dC),uW=Y([AP,En,Ut,OP],CP,{memoizeOptions:{resultEqualityCheck:Zh}}),ty=e=>e.errorBars,dW=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>NP(r,n)),Jf=function(){for(var t=arguments.length,r=new Array(t),n=0;n5&&arguments[5]!==void 0?arguments[5]:[],u,f;if(n.length>0&&n.forEach(h=>{var m,p=h.data!=null?[...h.data]:c,v=(m=i[h.id])===null||m===void 0?void 0:m.filter(b=>NP(o,b));p.forEach(b=>{var S,w=Ft(b,(S=r.dataKey)!==null&&S!==void 0?S:h.dataKey),k=sW(b,w,v);if(k.length>=2){var N=Math.min(...k),E=Math.max(...k);(u==null||Nf)&&(f=E)}var C=sS(w);C!=null&&(u=u==null?C[0]:Math.min(u,C[0]),f=f==null?C[1]:Math.max(f,C[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var m=sS(Ft(h,r.dataKey));m!=null&&(u=u==null?m[0]:Math.min(u,m[0]),f=f==null?m[1]:Math.max(f,m[1]))}),He(u)&&He(f))return[u,f]},fW=Y([J0,yr,rW,ty,Ut,U9],_P,{memoizeOptions:{resultEqualityCheck:Zh}});function hW(e){var t=e.value;if(Vn(t)||t instanceof Date)return t}var mW=(e,t,r)=>{var n=e.map(hW).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&UE(n))?uC(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},MP=e=>e.referenceElements.dots,fl=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),pW=Y([MP,Ut,Yh],fl),IP=e=>e.referenceElements.areas,gW=Y([IP,Ut,Yh],fl),TP=e=>e.referenceElements.lines,vW=Y([TP,Ut,Yh],fl),DP=(e,t)=>{if(e!=null){var r=Yn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},xW=Y(pW,Ut,DP),RP=(e,t)=>{if(e!=null){var r=Yn(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},yW=Y([gW,Ut],RP);function bW(e){var t;if(e.x!=null)return Yn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:Yn(r)}function wW(e){var t;if(e.y!=null)return Yn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:Yn(r)}var LP=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?bW(n):wW(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},kW=Y([vW,Ut],LP),jW=Y(xW,kW,yW,(e,t,r)=>Jf(e,r,t)),$P=(e,t,r,n,i,o,c,u)=>{if(r!=null)return r;var f=c==="vertical"&&u==="xAxis"||c==="horizontal"&&u==="yAxis",h=f?Jf(n,o,i):Jf(o,i);return q9(t,h,e.allowDataOverflow)},SW=Y([yr,PP,OP,uW,fW,jW,ht,Ut],$P,{memoizeOptions:{resultEqualityCheck:Zh}}),NW=[0,1],zP=(e,t,r,n,i,o,c)=>{if(!((e==null||r==null||r.length===0)&&c===void 0)){var u=e.dataKey,f=e.type,h=Zn(t,o);if(h&&u==null){var m;return uC(0,(m=r==null?void 0:r.length)!==null&&m!==void 0?m:0)}return f==="category"?mW(n,e,h):i==="expand"&&!h?NW:c}},ry=Y([yr,ht,J0,pu,Gh,Ut,SW],zP),hl=Y([yr,pP,y0],uP),FP=(e,t,r)=>{var n=t.niceTicks;if(n!=="none"){var i=ey(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&Un(e)){if(o)return g2(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return v2(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&Un(e))return g2(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Un(e))return v2(e,t.tickCount,t.allowDecimals,"adaptive")}}},ny=Y([ry,mu,hl],FP),BP=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Un(t)&&Array.isArray(r)&&r.length>0){var i,o,c=t[0],u=(i=r[0])!==null&&i!==void 0?i:0,f=t[1],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(c,u),Math.max(f,h)]}return t},EW=Y([yr,ry,ny,Ut],BP),AW=Y(pu,yr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Yn(e.map(p=>p.value))).sort((p,v)=>p-v),i=n[0],o=n[n.length-1];if(i==null||o==null)return 1/0;var c=o-i;if(c===0)return 1/0;for(var u=0;ui,(e,t,r,n,i)=>{if(!He(e))return 0;var o=t==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var c=ja(r,e*o),u=e*o/2;return u-c-(u-c)/o*c}return 0}),CW=(e,t,r)=>{var n=Ci(e,t);return n==null||typeof n.padding!="string"?0:UP(e,"xAxis",t,r,n.padding)},PW=(e,t,r)=>{var n=Pi(e,t);return n==null||typeof n.padding!="string"?0:UP(e,"yAxis",t,r,n.padding)},OW=Y(Ci,CW,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var i=e.padding;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),_W=Y(Pi,PW,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var i=e.padding;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),WP=Y([er,OW,zh,$h,(e,t,r)=>r],(e,t,r,n,i)=>{var o=n.padding;return i?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),HP=Y([er,ht,_W,zh,$h,(e,t,r)=>r],(e,t,r,n,i,o)=>{var c=i.padding;return o?[n.height-c.bottom,c.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),gu=(e,t,r,n)=>{var i;switch(t){case"xAxis":return WP(e,r,n);case"yAxis":return HP(e,r,n);case"zAxis":return(i=X0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return EC(e);case"radiusAxis":return AC(e,r);default:return}},KP=Y([yr,gu],Vh),MW=Y([hl,EW],f7),iy=Y([yr,hl,MW,KP],Z0),GP=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var i=r.type,o=r.scale,c=Zn(e,n);if(c&&(i==="number"||o!=="auto"))return t.map(u=>u.value)}},ay=Y([ht,pu,mu,Ut],GP),am=Y([iy],A0);Y([iy],KU);Y([iy,oW],dP);Y([dl,ty,Ut],dW);function VP(e,t){return e.idt.id?1:0}var om=(e,t)=>t,sm=(e,t,r)=>r,IW=Y(Rh,om,sm,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(VP)),TW=Y(Lh,om,sm,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(VP)),qP=(e,t)=>({width:e.width,height:t.height}),DW=(e,t)=>{var r=typeof t.width=="number"?t.width:au;return{width:r,height:e.height}},RW=Y(er,Ci,qP),LW=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},$W=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},zW=Y(Ei,er,IW,om,sm,(e,t,r,n,i)=>{var o={},c;return r.forEach(u=>{var f=qP(t,u);c==null&&(c=LW(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;o[u.id]=c-Number(h)*f.height,c+=(h?-1:1)*f.height}),o}),FW=Y(Ni,er,TW,om,sm,(e,t,r,n,i)=>{var o={},c;return r.forEach(u=>{var f=DW(t,u);c==null&&(c=$W(t,n,e));var h=n==="left"&&!i||n==="right"&&i;o[u.id]=c-Number(h)*f.width,c+=(h?-1:1)*f.width}),o}),BW=(e,t)=>{var r=Ci(e,t);if(r!=null)return zW(e,r.orientation,r.mirror)},UW=Y([er,Ci,BW,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),WW=(e,t)=>{var r=Pi(e,t);if(r!=null)return FW(e,r.orientation,r.mirror)},HW=Y([er,Pi,WW,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),KW=Y(er,Pi,(e,t)=>{var r=typeof t.width=="number"?t.width:au;return{width:r,height:e.height}}),QP=(e,t,r,n)=>{if(r!=null){var i=r.allowDuplicatedCategory,o=r.type,c=r.dataKey,u=Zn(e,n),f=t.map(m=>m.value),h=f.filter(m=>m!=null);if(c&&u&&o==="category"&&i&&UE(h))return f}},oy=Y([ht,pu,yr,Ut],QP),lS=Y([ht,eW,hl,am,oy,ay,gu,ny,Ut],(e,t,r,n,i,o,c,u,f)=>{if(t!=null){var h=Zn(e,f);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:f,categoricalDomain:o,duplicateDomain:i,isCategorical:h,niceTicks:u,range:c,realScaleType:r,scale:n}}}),GW=(e,t,r,n,i,o,c,u,f)=>{if(!(t==null||n==null)){var h=Zn(e,f),m=t.type,p=t.ticks,v=t.tickCount,b=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,S=m==="category"&&n.bandwidth?n.bandwidth()/b:0;S=f==="angleAxis"&&o!=null&&o.length>=2?en(o[0]-o[1])*2*S:S;var w=p||i;return w?w.map((k,N)=>{var E=c?c.indexOf(k):k,C=n.map(E);return He(C)?{index:N,coordinate:C+S,value:k,offset:S}:null}).filter(Cr):h&&u?u.map((k,N)=>{var E=n.map(k);return He(E)?{coordinate:E+S,value:k,index:N,offset:S}:null}).filter(Cr):n.ticks?n.ticks(v).map((k,N)=>{var E=n.map(k);return He(E)?{coordinate:E+S,value:k,index:N,offset:S}:null}).filter(Cr):n.domain().map((k,N)=>{var E=n.map(k);return He(E)?{coordinate:E+S,value:c?c[k]:k,index:N,offset:S}:null}).filter(Cr)}},YP=Y([ht,mu,hl,am,ny,gu,oy,ay,Ut],GW),VW=(e,t,r,n,i,o,c)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var u=Zn(e,c),f=t.tickCount,h=0;return h=c==="angleAxis"&&(n==null?void 0:n.length)>=2?en(n[0]-n[1])*2*h:h,u&&o?o.map((m,p)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:m,index:p,offset:h}:null}).filter(Cr):r.ticks?r.ticks(f).map((m,p)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:m,index:p,offset:h}:null}).filter(Cr):r.domain().map((m,p)=>{var v=r.map(m);return He(v)?{coordinate:v+h,value:i?i[m]:m,index:p,offset:h}:null}).filter(Cr)}},ZP=Y([ht,mu,am,gu,oy,ay,Ut],VW),XP=Y(yr,am,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})}),qW=Y([yr,hl,ry,KP],Z0),QW=Y([qW],A0);Y((e,t,r)=>X0(e,r),QW,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})});var YW=Y([ht,Rh,Lh],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),ZW=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};Y([ZW],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var c=Math.abs(o.coordinate-t);ce.options.defaultTooltipEventType,e3=e=>e.options.validateTooltipEventTypes;function t3(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function vu(e,t){var r=JP(e),n=e3(e);return t3(t,r,n)}function XW(e){return Me(t=>vu(t,e))}var r3=(e,t)=>{var r,n=Number(t);if(!(Gn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},JW=e=>e.tooltip.settings,aa={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},eH={itemInteraction:{click:aa,hover:aa},axisInteraction:{click:aa,hover:aa},keyboardInteraction:aa,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}},n3=ur({name:"tooltip",initialState:eH,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:lt()},replaceTooltipEntrySettings:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:lt()},removeTooltipEntrySettings:{reducer(e,t){var r=tn(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:lt()},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}}}),cn=n3.actions,tH=cn.addTooltipEntrySettings,rH=cn.replaceTooltipEntrySettings,nH=cn.removeTooltipEntrySettings,iH=cn.setTooltipSettingsState,aH=cn.setActiveMouseOverItemIndex;cn.mouseLeaveItem;var i3=cn.mouseLeaveChart;cn.setActiveClickItemIndex;var a3=cn.setMouseOverAxisIndex,oH=cn.setMouseClickAxisIndex,yc=cn.setSyncInteraction,eh=cn.setKeyboardInteraction,sH=n3.reducer;function cS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yd(e){for(var t=1;t{if(t==null)return aa;var i=dH(e,t,r);if(i==null)return aa;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(fH(i)){if(o)return Yd(Yd({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Yd(Yd({},aa),{},{coordinate:i.coordinate})};function hH(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 r=Number(e);return Number.isFinite(r)?r:void 0}function mH(e,t){var r=hH(e),n=t[0],i=t[1];if(r===void 0)return!1;var o=Math.min(n,i),c=Math.max(n,i);return r>=o&&r<=c}function pH(e,t,r){if(r==null||t==null)return!0;var n=Ft(e,t);return n==null||!Un(r)?!0:mH(n,r)}var kc=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!He(o))return i;var c=0,u=1/0;t.length>0&&(u=t.length-1);var f=Math.max(c,Math.min(o,u)),h=t[f];return h==null||pH(h,r,n)?String(f):null},s3=(e,t,r,n,i,o,c)=>{if(o!=null){var u=c[0],f=u==null?void 0:u.getPosition(o);if(f!=null)return f;var h=i==null?void 0:i[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},l3=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(c=>{var u;return((u=c.settings)===null||u===void 0?void 0:u.graphicalItemId)===i})},c3=e=>e.options.tooltipPayloadSearcher,ml=e=>e.tooltip;function uS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dS(e){for(var t=1;te(t)}function fS(e){if(typeof e=="string")return e}function kH(e){if(!(e==null||typeof e!="object")){var t="name"in e?yH(e.name):void 0,r="unit"in e?bH(e.unit):void 0,n="dataKey"in e?wH(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?fS(e.color):void 0,c="fill"in e?fS(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:c}}}function jH(e,t){return e??t}var u3=(e,t,r,n,i,o,c)=>{if(!(t==null||o==null)){var u=r.chartData,f=r.computedData,h=r.dataStartIndex,m=r.dataEndIndex,p=[];return e.reduce((v,b)=>{var S,w=b.dataDefinedOnItem,k=b.settings,N=jH(w,u),E=Array.isArray(N)?DA(N,h,m):N,C=(S=k==null?void 0:k.dataKey)!==null&&S!==void 0?S:n,A=k==null?void 0:k.nameKey,_;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&c==="axis"?_=WE(E,n,i):_=o(E,t,f,A),Array.isArray(_))_.forEach(I=>{var B,F,$=kH(I),Q=$==null?void 0:$.name,U=$==null?void 0:$.dataKey,ge=$==null?void 0:$.payload,ue=dS(dS({},k),{},{name:Q,unit:$==null?void 0:$.unit,color:(B=$==null?void 0:$.color)!==null&&B!==void 0?B:k==null?void 0:k.color,fill:(F=$==null?void 0:$.fill)!==null&&F!==void 0?F:k==null?void 0:k.fill});v.push(oj({tooltipEntrySettings:ue,dataKey:U,payload:ge,value:Ft(ge,U),name:Q==null?void 0:String(Q)}))});else{var O;v.push(oj({tooltipEntrySettings:k,dataKey:C,payload:_,value:Ft(_,C),name:(O=Ft(_,A))!==null&&O!==void 0?O:k==null?void 0:k.name}))}return v},p)}},sy=Y([Tt,pP,y0],uP),SH=Y([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),NH=Y([Wt,cl],gP),Mo=Y([SH,Tt,NH],xP,{memoizeOptions:{resultEqualityCheck:Xh}}),EH=Y([Mo],e=>e.filter(E0)),d3=Y([Mo],wP,{memoizeOptions:{resultEqualityCheck:Xh}}),AH=Y([Mo],e=>e.some(t=>!t.data)),No=Y([d3,En],jP),CH=Y([EH,En,Tt],PC),ly=Y([No,Tt,Mo,En,AH,d3],SP),f3=Y([Tt],ey),PH=Y([Tt],e=>e.allowDataOverflow),h3=Y([f3,PH],dC),OH=Y([Mo],e=>e.filter(E0)),_H=Y([CH,OH,Gh,kC],EP),MH=Y([_H,En,Wt,h3],CP),IH=Y([Mo],bP),TH=Y([No,Tt,IH,ty,Wt,W9],_P,{memoizeOptions:{resultEqualityCheck:Zh}}),DH=Y([MP,Wt,cl],fl),RH=Y([DH,Wt],DP),LH=Y([IP,Wt,cl],fl),$H=Y([LH,Wt],RP),zH=Y([TP,Wt,cl],fl),FH=Y([zH,Wt],LP),BH=Y([RH,FH,$H],Jf),UH=Y([Tt,f3,h3,MH,TH,BH,ht,Wt],$P),Zs=Y([Tt,ht,No,ly,Gh,Wt,UH],zP),WH=Y([Zs,Tt,sy],FP),HH=Y([Tt,Zs,WH,Wt],BP),m3=e=>{var t=Wt(e),r=cl(e),n=!1;return gu(e,t,r,n)},p3=Y([Tt,m3],Vh),KH=Y([Tt,sy,HH,p3],Z0),g3=Y([KH],A0),GH=Y([ht,ly,Tt,Wt],QP),VH=Y([ht,ly,Tt,Wt],GP),qH=(e,t,r,n,i,o,c,u)=>{if(t){var f=t.type,h=Zn(e,u);if(n){var m=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,p=f==="category"&&n.bandwidth?n.bandwidth()/m:0;return p=u==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?en(i[0]-i[1])*2*p:p,h&&c?c.map((v,b)=>{var S=n.map(v);return He(S)?{coordinate:S+p,value:v,index:b,offset:p}:null}).filter(Cr):n.domain().map((v,b)=>{var S=n.map(v);return He(S)?{coordinate:S+p,value:o?o[v]:v,index:b,offset:p}:null}).filter(Cr)}}},Oi=Y([ht,Tt,sy,g3,m3,GH,VH,Wt],qH),cy=Y([JP,e3,JW],(e,t,r)=>t3(r.shared,e,t)),v3=e=>e.tooltip.settings.trigger,uy=e=>e.tooltip.settings.defaultIndex,xu=Y([ml,cy,v3,uy],o3),Kc=Y([xu,No,Ys,Zs],kc),x3=Y([Oi,Kc],r3),QH=Y([xu],e=>{if(e)return e.dataKey}),YH=Y([xu],e=>{if(e)return e.graphicalItemId}),y3=Y([ml,cy,v3,uy],l3),ZH=Y([Ni,Ei,ht,er,Oi,uy,y3],s3),XH=Y([xu,ZH],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),JH=Y([xu],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),eK=Y([y3,Kc,En,Ys,x3,c3,cy],u3),tK=Y([eK],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function hS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mS(e){for(var t=1;tMe(Tt),oK=()=>{var e=aK(),t=Me(Oi),r=Me(g3);return Of(!e||!r?void 0:mS(mS({},e),{},{scale:r}),t)};function pS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ds(e){for(var t=1;t{var i=t.find(o=>o&&o.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},dK=(e,t,r,n)=>{var i=t.find(h=>h&&h.index===r);if(i){if(e==="centric"){var o=i.coordinate,c=n.radius;return ds(ds(ds({},n),Zt(n.cx,n.cy,c,o)),{},{angle:o,radius:c})}var u=i.coordinate,f=n.angle;return ds(ds(ds({},n),Zt(n.cx,n.cy,u,f)),{},{angle:f,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function fK(e,t){var r=e.relativeX,n=e.relativeY;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var b3=(e,t,r,n,i)=>{var o,c=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(c<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var u=0;u0?(f=r[u-1])===null||f===void 0?void 0:f.coordinate:(h=r[c-1])===null||h===void 0?void 0:h.coordinate,S=(m=r[u])===null||m===void 0?void 0:m.coordinate,w=u>=c-1?(p=r[0])===null||p===void 0?void 0:p.coordinate:(v=r[u+1])===null||v===void 0?void 0:v.coordinate,k=void 0;if(!(b==null||S==null||w==null))if(en(S-b)!==en(w-S)){var N=[];if(en(w-S)===en(i[1]-i[0])){k=w;var E=S+i[1]-i[0];N[0]=Math.min(E,(E+b)/2),N[1]=Math.max(E,(E+b)/2)}else{k=b;var C=w+i[1]-i[0];N[0]=Math.min(S,(C+S)/2),N[1]=Math.max(S,(C+S)/2)}var A=[Math.min(S,(k+S)/2),Math.max(S,(k+S)/2)];if(e>A[0]&&e<=A[1]||e>=N[0]&&e<=N[1]){var _;return(_=r[u])===null||_===void 0?void 0:_.index}}else{var O=Math.min(b,w),I=Math.max(b,w);if(e>(O+S)/2&&e<=(I+S)/2){var B;return(B=r[u])===null||B===void 0?void 0:B.index}}}else if(t)for(var F=0;F($.coordinate+U.coordinate)/2||F>0&&F($.coordinate+U.coordinate)/2&&e<=($.coordinate+Q.coordinate)/2)return $.index}}return-1},w3=()=>Me(y0),dy=(e,t)=>t,k3=(e,t,r)=>r,fy=(e,t,r,n)=>n,hK=Y(Oi,e=>Nh(e,t=>t.coordinate)),hy=Y([ml,dy,k3,fy],o3),my=Y([hy,No,Ys,Zs],kc),mK=(e,t,r)=>{if(t!=null){var n=ml(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},j3=Y([ml,dy,k3,fy],l3),th=Y([Ni,Ei,ht,er,Oi,fy,j3],s3),pK=Y([hy,th],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),S3=Y([Oi,my],r3),gK=Y([j3,my,En,Ys,S3,c3,dy],u3),vK=Y([hy,my],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),xK=(e,t,r,n,i,o,c)=>{if(!(!e||!r||!n||!i)&&fK(e,c)){var u=_z(e,t),f=b3(u,o,i,r,n),h=uK(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},yK=(e,t,r,n,i,o,c)=>{if(!(!e||!n||!i||!o||!r)){var u=T9(e,r);if(u){var f=Mz(u,t),h=b3(f,c,o,n,i),m=dK(t,o,h,u);return{activeIndex:String(h),activeCoordinate:m}}}},bK=(e,t,r,n,i,o,c,u)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?xK(e,t,n,i,o,c,u):yK(e,t,r,n,i,o,c)},wK=Y(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),kK=Y(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(pr)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:d7}});function gS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vS(e){for(var t=1;tvS(vS({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),EK)},CK=new Set(Object.values(pr));function PK(e){return CK.has(e)}var N3=ur({name:"zIndex",initialState:AK,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:lt()},unregisterZIndexPortal:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!PK(r)&&delete e.zIndexMap[r])},prepare:lt()},registerZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload,n=r.zIndex,i=r.element,o=r.isPanorama;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=i:e.zIndexMap[n].element=i:e.zIndexMap[n]={consumers:0,element:o?void 0:i,panoramaElement:o?i:void 0}},prepare:lt()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var r=t.payload.zIndex;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:lt()}}}),lm=N3.actions,OK=lm.registerZIndexPortal,Gg=lm.unregisterZIndexPortal,_K=lm.registerZIndexPortalElement,MK=lm.unregisterZIndexPortalElement,IK=N3.reducer;function _i(e){var t=e.zIndex,r=e.children,n=g8(),i=n&&t!==void 0&&t!==0,o=Or(),c=x.useRef(void 0),u=x.useRef(new Set),f=At(),h=Me(p=>wK(p,t,o));if(x.useLayoutEffect(()=>{if(!i){var p=u.current;p.forEach(b=>{f(Gg({zIndex:b}))}),p.clear(),c.current=void 0;return}if(u.current.has(t)||(f(OK({zIndex:t})),u.current.add(t)),h){c.current=h;var v=u.current;v.forEach(b=>{b!==t&&(f(Gg({zIndex:b})),v.delete(b))})}},[f,t,i,h]),x.useLayoutEffect(()=>{var p=u.current;return()=>{p.forEach(v=>{f(Gg({zIndex:v}))}),p.clear()}},[f]),!i)return r;var m=h??c.current;return m?gh.createPortal(r,m):null}function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;tx.useContext(E3),Vg={exports:{}},yS;function BK(){return yS||(yS=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,p,v){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new i(m,p||f,v),S=r?r+h:h;return f._events[S]?f._events[S].fn?f._events[S]=[f._events[S],b]:f._events[S].push(b):(f._events[S]=b,f._eventsCount++),f}function c(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],m,p;if(this._eventsCount===0)return h;for(p in m=this._events)t.call(m,p)&&h.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},u.prototype.listeners=function(h){var m=r?r+h:h,p=this._events[m];if(!p)return[];if(p.fn)return[p.fn];for(var v=0,b=p.length,S=new Array(b);v{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Gn(r))return e[r]}},KK={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},A3=ur({name:"options",initialState:KK,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),GK=A3.reducer,VK=A3.actions.createEventEmitter;function qK(e){return e.tooltip.syncInteraction}var QK={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},C3=ur({name:"chartData",initialState:QK,reducers:{setChartData(e,t){if(e.chartData=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 r=t.payload,n=r.startIndex,i=r.endIndex;n!=null&&(e.dataStartIndex=n),i!=null&&(e.dataEndIndex=i)}}}),py=C3.actions,wS=py.setChartData,YK=py.setDataStartEndIndexes;py.setComputedData;var ZK=C3.reducer,XK=["x","y"];function kS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fs(e){for(var t=1;tf.rootProps.className);x.useEffect(()=>{if(e==null)return al;var f=(h,m,p)=>{if(t!==p&&e===h){if(m.payload.active===!1){r(yc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(c&&m!==null&&m!==void 0&&(v=m.payload)!==null&&v!==void 0&&v.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,S=b.x,w=b.y,k=rG(b,XK),N=m.payload.sourceViewBox,E=N.x,C=N.y,A=N.width,_=N.height,O=fs(fs({},k),{},{x:c.x+(A?(S-E)/A:0)*c.width,y:c.y+(_?(w-C)/_:0)*c.height});r(fs(fs({},m),{},{payload:fs(fs({},m.payload),{},{coordinate:O})}))}else r(m);return}if(i!=null){var I;if(typeof n=="function"){var B={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},F=n(i,B);I=i[F]}else n==="value"&&(I=i.find(ae=>String(ae.value)===m.payload.label));var $=m.payload.coordinate;if($==null||c==null){r(yc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(I==null){r(yc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var Q=$.x,U=$.y,ge=Math.min(Q,c.x+c.width),ue=Math.min(U,c.y+c.height),pe={x:o==="horizontal"?I.coordinate:ge,y:o==="horizontal"?ue:I.coordinate},se=yc({active:m.payload.active,coordinate:pe,dataKey:m.payload.dataKey,index:String(I.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});r(se)}}};return Gc.on(vx,f),()=>{Gc.off(vx,f)}},[u,r,t,e,n,i,o,c])}function aG(){var e=Me(b0),t=Me(w0),r=At();x.useEffect(()=>{if(e==null)return al;var n=(i,o,c)=>{t!==c&&e===i&&r(YK(o))};return Gc.on(bS,n),()=>{Gc.off(bS,n)}},[r,t,e])}function oG(){var e=At();x.useEffect(()=>{e(VK())},[e]),iG(),aG()}function sG(e,t,r,n,i,o){var c=Me(S=>mK(S,e,t)),u=Me(YH),f=Me(w0),h=Me(b0),m=Me(jC),p=Me(qK),v=(p==null?void 0:p.sourceViewBox)!=null,b=Fh();x.useEffect(()=>{if(!v&&h!=null&&f!=null){var S=yc({active:o,coordinate:r,dataKey:c,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:b,graphicalItemId:u});Gc.emit(vx,h,S,f)}},[v,r,c,u,i,n,f,h,m,o,b])}function jS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function SS(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{I(iH({shared:E,trigger:C,axisId:O,active:i,defaultIndex:B}))},[I,E,C,O,i,B]);var F=Fh(),$=rC(),Q=XW(E),U=(t=Me(be=>vK(be,Q,C,B)))!==null&&t!==void 0?t:{},ge=U.activeIndex,ue=U.isActive,pe=Me(be=>gK(be,Q,C,B)),se=Me(be=>S3(be,Q,C,B)),ae=Me(be=>pK(be,Q,C,B)),Z=pe,re=FK(),ie=(r=i??ue)!==null&&r!==void 0?r:!1,D=v$([Z,ie]),M=dG(D,2),q=M[0],le=M[1],oe=Q==="axis"?se:void 0;sG(Q,C,ae,oe,ge,ie);var te=_??re;if(te==null||F==null||Q==null)return null;var W=Z??ES;ie||(W=ES),h&&W.length&&(W=F6(W.filter(be=>be.value!=null&&(be.hide!==!0||n.includeHidden)),v,gG));var ne=W.length>0,J=SS(SS({},n),{},{payload:W,label:oe,active:ie,activeIndex:ge,coordinate:ae,accessibilityLayer:$}),xe=x.createElement(CF,{allowEscapeViewBox:o,animationDuration:c,animationEasing:u,isAnimationActive:m,active:ie,coordinate:ae,hasPayload:ne,offset:p,position:b,reverseDirection:S,useTranslate3d:w,viewBox:F,wrapperStyle:k,lastBoundingBox:q,innerRef:le,hasPortalFromProps:!!_},vG(f,J));return x.createElement(x.Fragment,null,gh.createPortal(xe,te),ie&&x.createElement(zK,{cursor:N,tooltipEventType:Q,coordinate:ae,payload:W,index:ge}))}function bG(e,t,r){return(t=wG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wG(e){var t=kG(e,"string");return typeof t=="symbol"?t:t+""}function kG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class jG{constructor(t){bG(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function AS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function SG(e){for(var t=1;t{try{var r=document.getElementById(PS);r||(r=document.createElement("span"),r.setAttribute("id",PS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,PG,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},jc=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||cu.isSsr)return{width:0,height:0};if(!P3.enableCache)return OS(t,r);var n=OG(t,r),i=CS.get(n);if(i)return i;var o=OS(t,r);return CS.set(n,o),o},O3;function rh(e,t){return TG(e)||IG(e,t)||MG(e,t)||_G()}function _G(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MG(e,t){if(e){if(typeof e=="string")return _S(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_S(e,t):void 0}}function _S(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);re.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=e.breakAll,n=e.style;try{var i=[];Xt(t)||(r?i=t.toString().split(""):i=t.toString().split(M3));var o=i.map(u=>({word:u,width:jc(u,n).width})),c=r?0:jc(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:c}}catch{return null}};function T3(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function eV(e){return Xt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var D3=(e,t,r,n)=>e.reduce((i,o)=>{var c=o.word,u=o.width,f=i[i.length-1];if(f&&u!=null&&(t==null||n||f.width+u+re.reduce((t,r)=>t.width>r.width?t:r),tV="…",$S=(e,t,r,n,i,o,c,u)=>{var f=e.slice(0,t),h=I3({breakAll:r,style:n,children:f+tV});if(!h)return[!1,[]];var m=D3(h.wordsWithComputedWidth,o,c,u),p=m.length>i||R3(m).width>Number(o);return[p,m]},rV=(e,t,r,n,i)=>{var o=e.maxLines,c=e.children,u=e.style,f=e.breakAll,h=Ae(o),m=String(c),p=D3(t,n,r,i);if(!h||i)return p;var v=p.length>o||R3(p).width>Number(n);if(!v)return p;for(var b=0,S=m.length-1,w=0,k;b<=S&&w<=m.length-1;){var N=Math.floor((b+S)/2),E=N-1,C=$S(m,E,f,u,o,n,r,i),A=RS(C,2),_=A[0],O=A[1],I=$S(m,N,f,u,o,n,r,i),B=RS(I,1),F=B[0];if(!_&&!F&&(b=N+1),_&&F&&(S=N-1),!_&&F){k=O;break}w++}return k||p},zS=e=>{var t=Xt(e)?[]:e.toString().split(M3);return[{words:t,width:void 0}]},nV=e=>{var t=e.width,r=e.scaleToFit,n=e.children,i=e.style,o=e.breakAll,c=e.maxLines;if((t||r)&&!cu.isSsr){var u,f,h=I3({breakAll:o,children:n,style:i});if(h){var m=h.wordsWithComputedWidth,p=h.spaceWidth;u=m,f=p}else return zS(n);return rV({breakAll:o,children:n,maxLines:c,style:i},u,f,t,!!r)}return zS(n)},L3="#808080",iV={angle:0,breakAll:!1,capHeight:"0.71em",fill:L3,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},gy=x.forwardRef((e,t)=>{var r=sn(e,iV),n=r.x,i=r.y,o=r.lineHeight,c=r.capHeight,u=r.fill,f=r.scaleToFit,h=r.textAnchor,m=r.verticalAnchor,p=DS(r,VG),v=x.useMemo(()=>nV({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:f,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,f,p.style,p.width]),b=p.dx,S=p.dy,w=p.angle,k=p.className,N=p.breakAll,E=DS(p,qG);if(!Vn(n)||!Vn(i)||v.length===0)return null;var C=Number(n)+(Ae(b)?b:0),A=Number(i)+(Ae(S)?S:0);if(!He(C)||!He(A))return null;var _;switch(m){case"start":_=qg("calc(".concat(c,")"));break;case"middle":_=qg("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(c," / 2))"));break;default:_=qg("calc(".concat(v.length-1," * -").concat(o,")"));break}var O=[],I=v[0];if(f&&I!=null){var B=I.width,F=p.width;O.push("scale(".concat(Ae(F)&&Ae(B)?F/B:1,")"))}return w&&O.push("rotate(".concat(w,", ").concat(C,", ").concat(A,")")),O.length&&(E.transform=O.join(" ")),x.createElement("text",xx({},nn(E),{ref:t,x:C,y:A,className:nt("recharts-text",k),textAnchor:h,fill:u.includes("url")?L3:u}),v.map(($,Q)=>{var U=$.words.join(N?"":" ");return x.createElement("tspan",{x:C,dy:Q===0?_:o,key:"".concat(U,"-").concat(Q)},U)}))});gy.displayName="Text";function FS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dn(e){for(var t=1;t{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,o=e.parentViewBox,c=u0(t),u=c.x,f=c.y,h=c.height,m=c.upperWidth,p=c.lowerWidth,v=u,b=u+(m-p)/2,S=(v+b)/2,w=(m+p)/2,k=v+m/2,N=h>=0?1:-1,E=N*i,C=N>0?"end":"start",A=N>0?"start":"end",_=m>=0?1:-1,O=_*i,I=_>0?"end":"start",B=_>0?"start":"end",F=o;if(r==="top"){var $={x:v+m/2,y:f-E,horizontalAnchor:"middle",verticalAnchor:C};return F&&($.height=Math.max(f-F.y,0),$.width=m),$}if(r==="bottom"){var Q={x:b+p/2,y:f+h+E,horizontalAnchor:"middle",verticalAnchor:A};return F&&(Q.height=Math.max(F.y+F.height-(f+h),0),Q.width=p),Q}if(r==="left"){var U={x:S-O,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"};return F&&(U.width=Math.max(U.x-F.x,0),U.height=h),U}if(r==="right"){var ge={x:S+w+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"};return F&&(ge.width=Math.max(F.x+F.width-ge.x,0),ge.height=h),ge}var ue=F?{width:w,height:h}:{};return r==="insideLeft"?Dn({x:S+O,y:f+h/2,horizontalAnchor:B,verticalAnchor:"middle"},ue):r==="insideRight"?Dn({x:S+w-O,y:f+h/2,horizontalAnchor:I,verticalAnchor:"middle"},ue):r==="insideTop"?Dn({x:v+m/2,y:f+E,horizontalAnchor:"middle",verticalAnchor:A},ue):r==="insideBottom"?Dn({x:b+p/2,y:f+h-E,horizontalAnchor:"middle",verticalAnchor:C},ue):r==="insideTopLeft"?Dn({x:v+O,y:f+E,horizontalAnchor:B,verticalAnchor:A},ue):r==="insideTopRight"?Dn({x:v+m-O,y:f+E,horizontalAnchor:I,verticalAnchor:A},ue):r==="insideBottomLeft"?Dn({x:b+O,y:f+h-E,horizontalAnchor:B,verticalAnchor:C},ue):r==="insideBottomRight"?Dn({x:b+p-O,y:f+h-E,horizontalAnchor:I,verticalAnchor:C},ue):r&&typeof r=="object"&&(Ae(r.x)||bo(r.x))&&(Ae(r.y)||bo(r.y))?Dn({x:u+ja(r.x,w),y:f+ja(r.y,h),horizontalAnchor:"end",verticalAnchor:"end"},ue):Dn({x:k,y:f+h/2,horizontalAnchor:"middle",verticalAnchor:"middle"},ue)},cV=["labelRef"],uV=["content"];function BS(e,t){if(e==null)return{};var r,n,i=dV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var t=e.x,r=e.y,n=e.upperWidth,i=e.lowerWidth,o=e.width,c=e.height,u=e.children,f=x.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:c}),[t,r,n,i,o,c]);return x.createElement($3.Provider,{value:f},u)},z3=()=>{var e=x.useContext($3),t=Fh();return e||(t?u0(t):void 0)},gV=x.createContext(null),vV=()=>{var e=x.useContext(gV),t=Me(CC);return e||t},xV=e=>{var t=e.value,r=e.formatter,n=Xt(e.children)?t:e.children;return typeof r=="function"?r(n):n},vy=e=>e!=null&&typeof e=="function",yV=(e,t)=>{var r=en(t-e),n=Math.min(Math.abs(t-e),360);return r*n},bV=(e,t,r,n,i)=>{var o=e.offset,c=e.className,u=i.cx,f=i.cy,h=i.innerRadius,m=i.outerRadius,p=i.startAngle,v=i.endAngle,b=i.clockWise,S=(h+m)/2,w=yV(p,v),k=w>=0?1:-1,N,E;switch(t){case"insideStart":N=p+k*o,E=b;break;case"insideEnd":N=v-k*o,E=!b;break;case"end":N=v+k*o,E=b;break;default:throw new Error("Unsupported position ".concat(t))}E=w<=0?E:!E;var C=Zt(u,f,S,N),A=Zt(u,f,S,N+(E?1:-1)*359),_="M".concat(C.x,",").concat(C.y,` - A`).concat(S,",").concat(S,",0,1,").concat(E?0:1,`, - `).concat(A.x,",").concat(A.y),O=Xt(e.id)?Mc("recharts-radial-line-"):e.id;return x.createElement("text",fi({},n,{dominantBaseline:"central",className:nt("recharts-radial-bar-label",c)}),x.createElement("defs",null,x.createElement("path",{id:O,d:_})),x.createElement("textPath",{xlinkHref:"#".concat(O)},r))},wV=(e,t,r)=>{var n=e.cx,i=e.cy,o=e.innerRadius,c=e.outerRadius,u=e.startAngle,f=e.endAngle,h=(u+f)/2;if(r==="outside"){var m=Zt(n,i,c+t,h),p=m.x,v=m.y;return{x:p,y:v,textAnchor:p>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var b=(o+c)/2,S=Zt(n,i,b,h),w=S.x,k=S.y;return{x:w,y:k,textAnchor:"middle",verticalAnchor:"middle"}},cf=e=>e!=null&&"cx"in e&&Ae(e.cx),kV={angle:0,offset:5,zIndex:pr.label,position:"middle",textBreakAll:!1};function jV(e){if(!cf(e))return e;var t=e.cx,r=e.cy,n=e.outerRadius,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function ia(e){var t=sn(e,kV),r=t.viewBox,n=t.parentViewBox,i=t.position,o=t.value,c=t.children,u=t.content,f=t.className,h=f===void 0?"":f,m=t.textBreakAll,p=t.labelRef,v=vV(),b=z3(),S=i==="center"?b:v??b,w,k,N;r==null?w=S:cf(r)?w=r:w=u0(r);var E=jV(w);if(!w||Xt(o)&&Xt(c)&&!x.isValidElement(u)&&typeof u!="function")return null;var C=bc(bc({},t),{},{viewBox:w});if(x.isValidElement(u)){C.labelRef;var A=BS(C,cV);return x.cloneElement(u,A)}if(typeof u=="function"){C.content;var _=BS(C,uV);if(k=x.createElement(u,_),x.isValidElement(k))return k}else k=xV(t);var O=nn(t);if(cf(w)){if(i==="insideStart"||i==="insideEnd"||i==="end")return bV(t,i,k,O,w);N=wV(w,t.offset,t.position)}else{if(!E)return null;var I=lV({viewBox:E,position:i,offset:t.offset,parentViewBox:cf(n)?void 0:n});N=bc(bc({x:I.x,y:I.y,textAnchor:I.horizontalAnchor,verticalAnchor:I.verticalAnchor},I.width!==void 0?{width:I.width}:{}),I.height!==void 0?{height:I.height}:{})}return x.createElement(_i,{zIndex:t.zIndex},x.createElement(gy,fi({ref:p,className:nt("recharts-label",h)},O,N,{textAnchor:T3(O.textAnchor)?O.textAnchor:N.textAnchor,breakAll:m}),k))}ia.displayName="Label";var SV=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?x.createElement(ia,fi({key:"label-implicit"},n)):Vn(e)?x.createElement(ia,fi({key:"label-implicit",value:e},n)):x.isValidElement(e)?e.type===ia?x.cloneElement(e,bc({key:"label-implicit"},n)):x.createElement(ia,fi({key:"label-implicit",content:e},n)):vy(e)?x.createElement(ia,fi({key:"label-implicit",content:e},n)):e&&typeof e=="object"?x.createElement(ia,fi({},e,{key:"label-implicit"},n)):null};function NV(e){var t=e.label,r=e.labelRef,n=z3();return SV(t,n,r)||null}var EV=["valueAccessor"],AV=["dataKey","clockWise","id","textBreakAll","zIndex"];function nh(){return nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(eV(t))return t},F3=x.createContext(void 0),OV=F3.Provider,B3=x.createContext(void 0);B3.Provider;function _V(){return x.useContext(F3)}function MV(){return x.useContext(B3)}function uf(e){var t=e.valueAccessor,r=t===void 0?PV:t,n=WS(e,EV),i=n.dataKey;n.clockWise;var o=n.id,c=n.textBreakAll,u=n.zIndex,f=WS(n,AV),h=_V(),m=MV(),p=h||m;return!p||!p.length?null:x.createElement(_i,{zIndex:u??pr.label},x.createElement(an,{className:"recharts-label-list"},p.map((v,b)=>{var S,w=Xt(i)?r(v,b):Ft(v.payload,i),k=Xt(o)?{}:{id:"".concat(o,"-").concat(b)};return x.createElement(ia,nh({key:"label-".concat(b)},nn(v),f,k,{fill:(S=n.fill)!==null&&S!==void 0?S:v.fill,parentViewBox:v.parentViewBox,value:w,textBreakAll:c,viewBox:v.viewBox,index:b,zIndex:0}))})))}uf.displayName="LabelList";function IV(e){var t=e.label;return t?t===!0?x.createElement(uf,{key:"labelList-implicit"}):x.isValidElement(t)||vy(t)?x.createElement(uf,{key:"labelList-implicit",content:t}):typeof t=="object"?x.createElement(uf,nh({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function yx(){return yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t=e.cx,r=e.cy,n=e.r,i=e.className,o=nt("recharts-dot",i);return Ae(t)&&Ae(r)&&Ae(n)?x.createElement("circle",yx({},kn(e),e0(e),{className:o,cx:t,cy:r,r:n})):null},TV={radiusAxis:{},angleAxis:{}},W3=ur({name:"polarAxis",initialState:TV,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),cm=W3.actions;cm.addRadiusAxis;cm.removeRadiusAxis;cm.addAngleAxis;cm.removeAngleAxis;var DV=W3.reducer;function RV(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var H3=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function HS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function KS(e){for(var t=1;t{n||(i.current===null?r(tH(t)):i.current!==t&&r(rH({prev:i.current,next:t})),i.current=t)},[t,r,n]),x.useLayoutEffect(()=>()=>{i.current&&(r(nH(i.current)),i.current=null)},[r]),null}function GV(e){var t=e.legendPayload,r=At(),n=Or(),i=x.useRef(null);return x.useLayoutEffect(()=>{n||(i.current===null?r(P8(t)):i.current!==t&&r(O8({prev:i.current,next:t})),i.current=t)},[r,n,t]),x.useLayoutEffect(()=>()=>{i.current&&(r(_8(i.current)),i.current=null)},[r]),null}function VV(e,t){return ZV(e)||YV(e,t)||QV(e,t)||qV()}function qV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QV(e,t){if(e){if(typeof e=="string")return GS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GS(e,t):void 0}}function GS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r2&&arguments[2]!==void 0?arguments[2]:[],n=[];for(var i of r)n.push({status:"removed",prev:i});for(var o=0;oe[Math.floor(o*r)]);return yy(n,t)}function eq(e,t){var r=t.map((n,i)=>e[i]);return yy(r,t)}function tq(e,t){for(var r=new Map,n=0;n{var b=r(p,v);if(b!=null){var S=n.get(b);if(S!==void 0)return i.add(b),S}}),c=[];for(var u of n){var f=VV(u,2),h=f[0],m=f[1];i.has(h)||c.push(m)}return yy(o,t,c)}function bx(e,t,r){return t==null?null:e==null?t.map(n=>({status:"added",next:n})):r===xy?JV(e,t):r===XV?eq(e,t):rq(e,t,r)}function G3(e,t){var r=x.useRef(e),n=x.useRef(t.current),i=x.useRef(!0);r.current!==e&&(r.current=e,n.current=t.current,i.current=!1);var o=x.useCallback(function(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(u===0){i.current=!0;return}u===1&&(n.current=c),u>0&&i.current&&f&&(t.current=c)},[t]);return{startValue:n.current,syncStepValue:o}}function nq(e,t){return sq(e)||oq(e,t)||aq(e,t)||iq()}function iq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aq(e,t){if(e){if(typeof e=="string")return VS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?VS(e,t):void 0}}function VS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{typeof e=="function"&&e(),o(!0)},[e]),u=x.useCallback(()=>{typeof t=="function"&&t(),o(!1)},[t]);return{isAnimating:i,handleAnimationStart:c,handleAnimationEnd:u}}function cq(e){var t,r=e.animationInput,n=e.animationIdPrefix,i=e.items,o=e.previousItemsRef,c=e.isAnimationActive,u=e.animationBegin,f=e.animationDuration,h=e.animationEasing,m=e.onAnimationStart,p=e.onAnimationEnd,v=e.animationInterpolateFn,b=e.animationMatchBy,S=e.shouldUpdatePreviousRef,w=e.children,k=e.layout,N=sC(r,n),E=G3(N,o),C=(t=E.startValue)!==null&&t!==void 0?t:null,A=bx(C,i,b??xy);return x.createElement(oC,{animationId:N,begin:u,duration:f,isActive:c,easing:h,onAnimationEnd:p,onAnimationStart:m,key:N},_=>{var O=C==null,I=i==null?i:v(A,_,k),B=S?S(_):_>0;return E.syncStepValue(I,_,B),I==null?null:w(I,_,O)})}var Qg;function uq(e,t){return mq(e)||hq(e,t)||fq(e,t)||dq()}function dq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -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 qS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qS(e,t):void 0}}function qS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var e=x.useState(()=>Mc("uid-")),t=uq(e,1),r=t[0];return r},V3=(Qg=fh.useId)!==null&&Qg!==void 0?Qg:pq;function gq(e,t){var r=V3();return t||(e?"".concat(e,"-").concat(r):r)}var vq=x.createContext(void 0),xq=e=>{var t=e.id,r=e.type,n=e.children,i=gq("recharts-".concat(r),t);return x.createElement(vq.Provider,{value:i},n(i))},yq={cartesianItems:[],polarItems:[]},q3=ur({name:"graphicalItems",initialState:yq,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:lt()},replaceCartesianGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=i)},prepare:lt()},removeCartesianGraphicalItem:{reducer(e,t){var r=tn(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:lt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:lt()},removePolarGraphicalItem:{reducer(e,t){var r=tn(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:lt()},replacePolarGraphicalItem:{reducer(e,t){var r=t.payload,n=r.prev,i=r.next,o=tn(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=i)},prepare:lt()}}}),pl=q3.actions,bq=pl.addCartesianGraphicalItem,wq=pl.replaceCartesianGraphicalItem,kq=pl.removeCartesianGraphicalItem;pl.addPolarGraphicalItem;pl.removePolarGraphicalItem;pl.replacePolarGraphicalItem;var jq=q3.reducer,Sq=e=>{var t=At(),r=x.useRef(null);return x.useLayoutEffect(()=>{r.current===null?t(bq(e)):r.current!==e&&t(wq({prev:r.current,next:e})),r.current=e},[t,e]),x.useLayoutEffect(()=>()=>{r.current&&(t(kq(r.current)),r.current=null)},[t]),null},Nq=x.memo(Sq),Eq=["points"];function QS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yg(e){for(var t=1;t{var N,E,C=Yg(Yg(Yg({r:3},c),v),{},{index:k,cx:(N=w.x)!==null&&N!==void 0?N:void 0,cy:(E=w.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:w.value,payload:w.payload,points:t});return x.createElement(Mq,{key:"dot-".concat(k),option:r,dotProps:C,className:i})}),S={};return u&&f!=null&&(S.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(f,")")),x.createElement(_i,{zIndex:m},x.createElement(an,ih({className:n},S),b))}function YS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ZS(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),qq=Y([Vq,Ni,Ei],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),by=()=>Me(qq),Qq=()=>Me(tK);function XS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zg(e){for(var t=1;t{var t=e.point,r=e.childIndex,n=e.mainColor,i=e.activeDot,o=e.dataKey,c=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var u={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=Zg(Zg(Zg({},u),kh(i)),e0(i)),h;return x.isValidElement(i)?h=x.cloneElement(i,f):typeof i=="function"?h=i(f):h=x.createElement(U3,f),x.createElement(an,{className:"recharts-active-dot",clipPath:c},h)};function JS(e){var t=e.points,r=e.mainColor,n=e.activeDot,i=e.itemDataKey,o=e.clipPath,c=e.zIndex,u=c===void 0?pr.activeDot:c,f=Me(Kc),h=Qq();if(t==null||h==null)return null;var m=t.find(p=>h.includes(p.payload));return Xt(m)?null:x.createElement(_i,{zIndex:u},x.createElement(Jq,{point:m,childIndex:Number(f),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var eQ=e=>{var t=e.chartData,r=At(),n=Or();return x.useEffect(()=>n?()=>{}:(r(wS(t)),()=>{r(wS(void 0))}),[t,r,n]),null},eN={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},Z3=ur({name:"brush",initialState:eN,reducers:{setBrushSettings(e,t){return t.payload==null?eN:t.payload}}});Z3.actions.setBrushSettings;var tQ=Z3.reducer;function rQ(e){return(e%180+180)%180}var nQ=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=rQ(i),c=o*Math.PI/180,u=Math.atan(n/r),f=c>u&&c{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=tn(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=tn(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=tn(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),gl=X3.actions;gl.addDot;gl.removeDot;gl.addArea;gl.removeArea;gl.addLine;gl.removeLine;var aQ=X3.reducer;function oQ(e,t){return uQ(e)||cQ(e,t)||lQ(e,t)||sQ()}function sQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lQ(e,t){if(e){if(typeof e=="string")return tN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tN(e,t):void 0}}function tN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{var t=e.children,r=x.useState("".concat(Mc("recharts"),"-clip")),n=oQ(r,1),i=n[0],o=by();if(o==null)return null;var c=o.x,u=o.y,f=o.width,h=o.height;return x.createElement(dQ.Provider,{value:i},x.createElement("defs",null,x.createElement("clipPath",{id:i},x.createElement("rect",{x:c,y:u,height:h,width:f}))),t)};function J3(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;ne*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function pQ(e,t){return J3(e,t+1)}function gQ(e,t,r,n,i){for(var o=(n||[]).slice(),c=t.start,u=t.end,f=0,h=1,m=c,p=function(){var S=n==null?void 0:n[f];if(S===void 0)return{v:J3(n,h)};var w=f,k,N=()=>(k===void 0&&(k=r(S,w)),k),E=S.coordinate,C=f===0||Vc(e,E,N,m,u);C||(f=0,m=c,h+=1),C&&(m=E+e*(N()/2+i),f+=h)},v;h<=o.length;)if(v=p(),v)return v.v;return[]}function vQ(e,t,r,n,i){var o=(n||[]).slice(),c=o.length;if(c===0)return[];for(var u=t.start,f=t.end,h=1;h<=c;h++){for(var m=(c-1)%h,p=u,v=!0,b=function(){var A=n[w];if(A==null)return 0;var _=w,O,I=()=>(O===void 0&&(O=r(A,_)),O),B=A.coordinate,F=w===m||Vc(e,B,I,p,f);if(!F)return v=!1,1;F&&(p=B+e*(I()/2+i))},S,w=m;w(w===void 0&&(w=r(b,v)),w);if(v===c-1){var N=e*(S.coordinate+e*k()/2-f);o[v]=S=sr(sr({},S),{},{tickCoord:N>0?S.coordinate-N*e:S.coordinate})}else o[v]=S=sr(sr({},S),{},{tickCoord:S.coordinate});if(S.tickCoord!=null){var E=Vc(e,S.tickCoord,k,u,f);E&&(f=S.tickCoord-e*(k()/2+i),o[v]=sr(sr({},S),{},{isShow:!0}))}},m=c-1;m>=0;m--)h(m);return o}function kQ(e,t,r,n,i,o){var c=(n||[]).slice(),u=c.length,f=t.start,h=t.end;if(o){var m=n[u-1];if(m!=null){var p=r(m,u-1),v=e*(m.coordinate+e*p/2-h);if(c[u-1]=m=sr(sr({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var b=Vc(e,m.tickCoord,()=>p,f,h);b&&(h=m.tickCoord-e*(p/2+i),c[u-1]=sr(sr({},m),{},{isShow:!0}))}}}for(var S=o?u-1:u,w=function(E){var C=c[E];if(C==null)return 1;var A=C,_,O=()=>(_===void 0&&(_=r(C,E)),_);if(E===0){var I=e*(A.coordinate-e*O()/2-f);c[E]=A=sr(sr({},A),{},{tickCoord:I<0?A.coordinate-I*e:A.coordinate})}else c[E]=A=sr(sr({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var B=Vc(e,A.tickCoord,O,f,h);B&&(f=A.tickCoord+e*(O()/2+i),c[E]=sr(sr({},A),{},{isShow:!0}))}},k=0;k{var I=typeof h=="function"?h(_.value,O):_.value;return S==="width"?hQ(jc(I,{fontSize:t,letterSpacing:r}),w,p):jc(I,{fontSize:t,letterSpacing:r})[S]},N=i[0],E=i[1],C=i.length>=2&&N!=null&&E!=null?en(E.coordinate-N.coordinate):1,A=mQ(o,C,S);return f==="equidistantPreserveStart"?gQ(C,A,k,i,c):f==="equidistantPreserveEnd"?vQ(C,A,k,i,c):(f==="preserveStart"||f==="preserveStartEnd"?b=kQ(C,A,k,i,c,f==="preserveStartEnd"):b=wQ(C,A,k,i,c),b.filter(_=>_.isShow))}var jQ=e=>{var t=e.ticks,r=e.label,n=e.labelGapWithTick,i=n,o=e.tickSize,c=o===void 0?0:o,u=e.tickMargin,f=u===void 0?0:u,h=0;if(t){Array.from(t).forEach(b=>{if(b){var S=b.getBoundingClientRect();S.width>h&&(h=S.width)}});var m=r?r.getBoundingClientRect().width:0,p=c+f,v=h+p+m+(r?i:0);return Math.round(v)}return 0},SQ={xAxis:{},yAxis:{}},eO=ur({name:"renderedTicks",initialState:SQ,reducers:{setRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId,o=r.ticks;e[n][i]=o},removeRenderedTicks:(e,t)=>{var r=t.payload,n=r.axisType,i=r.axisId;delete e[n][i]}}}),tO=eO.actions,NQ=tO.setRenderedTicks,EQ=tO.removeRenderedTicks,AQ=eO.reducer,CQ=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function nN(e,t){return MQ(e)||_Q(e,t)||OQ(e,t)||PQ()}function PQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -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 iN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?iN(e,t):void 0}}function iN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n==null||r==null)return al;var o=t.map(c=>({value:c.value,coordinate:c.coordinate,offset:c.offset,index:c.index}));return i(NQ({ticks:o,axisId:n,axisType:r})),()=>{i(EQ({axisId:n,axisType:r}))}},[i,t,n,r]),null}var HQ=x.forwardRef((e,t)=>{var r=e.ticks,n=r===void 0?[]:r,i=e.tick,o=e.tickLine,c=e.stroke,u=e.tickFormatter,f=e.unit,h=e.padding,m=e.tickTextProps,p=e.orientation,v=e.mirror,b=e.x,S=e.y,w=e.width,k=e.height,N=e.tickSize,E=e.tickMargin,C=e.fontSize,A=e.letterSpacing,_=e.getTicksConfig,O=e.events,I=e.axisType,B=e.axisId,F=wy(bt(bt({},_),{},{ticks:n}),C,A),$=kn(_),Q=kh(i),U=T3($.textAnchor)?$.textAnchor:FQ(p,v),ge=BQ(p,v),ue={};typeof o=="object"&&(ue=o);var pe=bt(bt({},$),{},{fill:"none"},ue),se=F.map(re=>bt({entry:re},zQ(re,b,S,w,k,p,N,v,E))),ae=se.map(re=>{var ie=re.entry,D=re.line;return x.createElement(an,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(ie.value,"-").concat(ie.coordinate,"-").concat(ie.tickCoord)},o&&x.createElement("line",Eo({},pe,D,{className:nt("recharts-cartesian-axis-tick-line",Po(o,"className"))})))}),Z=se.map((re,ie)=>{var D,M,q=re.entry,le=re.tick,oe=bt(bt(bt(bt({verticalAnchor:ge},$),{},{textAnchor:U,stroke:"none",fill:c},le),{},{index:ie,payload:q,visibleTicksCount:F.length,tickFormatter:u,padding:h},m),{},{angle:(D=(M=m==null?void 0:m.angle)!==null&&M!==void 0?M:$.angle)!==null&&D!==void 0?D:0}),te=bt(bt({},oe),Q);return x.createElement(an,Eo({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(q.value,"-").concat(q.coordinate,"-").concat(q.tickCoord)},qL(O,q,ie)),i&&x.createElement(UQ,{option:i,tickProps:te,value:"".concat(typeof u=="function"?u(q.value,ie):q.value).concat(f||"")}))});return x.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(I,"-ticks")},x.createElement(WQ,{ticks:F,axisId:B,axisType:I}),Z.length>0&&x.createElement(_i,{zIndex:pr.label},x.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(I,"-tick-labels"),ref:t},Z)),ae.length>0&&x.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(I,"-tick-lines")},ae))}),KQ=x.forwardRef((e,t)=>{var r=e.axisLine,n=e.width,i=e.height,o=e.className,c=e.hide,u=e.ticks,f=e.axisType,h=e.axisId,m=IQ(e,CQ),p=x.useState(""),v=nN(p,2),b=v[0],S=v[1],w=x.useState(""),k=nN(w,2),N=k[0],E=k[1],C=x.useRef(null);x.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return jQ({ticks:C.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var A=x.useCallback(_=>{if(_){var O=_.getElementsByClassName("recharts-cartesian-axis-tick-value");C.current=O;var I=O[0];if(I){var B=window.getComputedStyle(I),F=B.fontSize,$=B.letterSpacing;(F!==b||$!==N)&&(S(F),E($))}}},[b,N]);return c||n!=null&&n<=0||i!=null&&i<=0?null:x.createElement(_i,{zIndex:e.zIndex},x.createElement(an,{className:nt("recharts-cartesian-axis",o)},x.createElement($Q,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:kn(e)}),x.createElement(HQ,{ref:A,axisType:f,events:m,fontSize:b,getTicksConfig:e,height:e.height,letterSpacing:N,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:u,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),x.createElement(pV,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},x.createElement(NV,{label:e.label,labelRef:e.labelRef}),e.children)))}),ky=x.forwardRef((e,t)=>{var r=sn(e,xi);return x.createElement(KQ,Eo({},r,{ref:t}))});ky.displayName="CartesianAxis";var GQ=["x1","y1","x2","y2","key"],VQ=["offset"],qQ=["xAxisId","yAxisId"],QQ=["xAxisId","yAxisId"];function oN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cr(e){for(var t=1;t{var t=e.fill;if(!t||t==="none")return null;var r=e.fillOpacity,n=e.x,i=e.y,o=e.width,c=e.height,u=e.ry;return x.createElement("rect",{x:n,y:i,ry:u,width:o,height:c,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function rO(e){var t=e.option,r=e.lineItemProps,n;if(x.isValidElement(t))n=x.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,o=r.x1,c=r.y1,u=r.x2,f=r.y2,h=r.key,m=ah(r,GQ),p=(i=kn(m))!==null&&i!==void 0?i:{};p.offset;var v=ah(p,VQ);n=x.createElement("line",to({},v,{x1:o,y1:c,x2:u,y2:f,fill:"none",key:h}))}return n}function tY(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,o=e.horizontalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var c=ah(e,qQ),u=o.map((f,h)=>{var m=cr(cr({},c),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(h),index:h});return x.createElement(rO,{key:"line-".concat(h),option:i,lineItemProps:m})});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function rY(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,o=e.verticalPoints;if(!i||!o||!o.length)return null;e.xAxisId,e.yAxisId;var c=ah(e,QQ),u=o.map((f,h)=>{var m=cr(cr({},c),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(h),index:h});return x.createElement(rO,{option:i,lineItemProps:m,key:"line-".concat(h)})});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function nY(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,o=e.width,c=e.height,u=e.horizontalPoints,f=e.horizontal,h=f===void 0?!0:f;if(!h||!t||!t.length||u==null)return null;var m=u.map(v=>Math.round(v+i-i)).sort((v,b)=>v-b);i!==m[0]&&m.unshift(0);var p=m.map((v,b)=>{var S=m[b+1],w=S==null,k=w?i+c-v:S-v;if(k<=0)return null;var N=b%t.length;return x.createElement("rect",{key:"react-".concat(b),y:v,x:n,height:k,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function iY(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,o=e.x,c=e.y,u=e.width,f=e.height,h=e.verticalPoints;if(!r||!n||!n.length)return null;var m=h.map(v=>Math.round(v+o-o)).sort((v,b)=>v-b);o!==m[0]&&m.unshift(0);var p=m.map((v,b)=>{var S=m[b+1],w=S==null,k=w?o+u-v:S-v;if(k<=0)return null;var N=b%n.length;return x.createElement("rect",{key:"react-".concat(b),x:v,y:c,width:k,height:f,stroke:"none",fill:n[N],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var aY=(e,t)=>{var r=e.xAxis,n=e.width,i=e.height,o=e.offset;return RA(wy(cr(cr(cr({},xi),r),{},{ticks:LA(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},oY=(e,t)=>{var r=e.yAxis,n=e.width,i=e.height,o=e.offset;return RA(wy(cr(cr(cr({},xi),r),{},{ticks:LA(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},sY={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:pr.grid};function nO(e){var t=KA(),r=GA(),n=HA(),i=cr(cr({},sn(e,sY)),{},{x:Ae(e.x)?e.x:n.left,y:Ae(e.y)?e.y:n.top,width:Ae(e.width)?e.width:n.width,height:Ae(e.height)?e.height:n.height}),o=i.xAxisId,c=i.yAxisId,u=i.x,f=i.y,h=i.width,m=i.height,p=i.syncWithTicks,v=i.horizontalValues,b=i.verticalValues,S=Or(),w=Me(F=>lS(F,"xAxis",o,S)),k=Me(F=>lS(F,"yAxis",c,S));if(!qn(h)||!qn(m)||!Ae(u)||!Ae(f))return null;var N=i.verticalCoordinatesGenerator||aY,E=i.horizontalCoordinatesGenerator||oY,C=i.horizontalPoints,A=i.verticalPoints;if((!C||!C.length)&&typeof E=="function"){var _=v&&v.length,O=E({yAxis:k?cr(cr({},k),{},{ticks:_?v:k.ticks}):void 0,width:t??h,height:r??m,offset:n},_?!0:p);_f(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(C=O)}if((!A||!A.length)&&typeof N=="function"){var I=b&&b.length,B=N({xAxis:w?cr(cr({},w),{},{ticks:I?b:w.ticks}):void 0,width:t??h,height:r??m,offset:n},I?!0:p);_f(Array.isArray(B),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(A=B)}return x.createElement(_i,{zIndex:i.zIndex},x.createElement("g",{className:"recharts-cartesian-grid"},x.createElement(eY,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),x.createElement(nY,to({},i,{horizontalPoints:C})),x.createElement(iY,to({},i,{verticalPoints:A})),x.createElement(tY,to({},i,{offset:n,horizontalPoints:C,xAxis:w,yAxis:k})),x.createElement(rY,to({},i,{offset:n,verticalPoints:A,xAxis:w,yAxis:k}))))}nO.displayName="CartesianGrid";var lY={},iO=ur({name:"errorBars",initialState:lY,reducers:{addErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]||(e[n]=[]),e[n].push(i)},replaceErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.prev,o=r.next;e[n]&&(e[n]=e[n].map(c=>c.dataKey===i.dataKey&&c.direction===i.direction?o:c))},removeErrorBar:(e,t)=>{var r=t.payload,n=r.itemId,i=r.errorBar;e[n]&&(e[n]=e[n].filter(o=>o.dataKey!==i.dataKey||o.direction!==i.direction))}}}),jy=iO.actions;jy.addErrorBar;jy.replaceErrorBar;jy.removeErrorBar;var cY=iO.reducer;function aO(e,t){var r,n,i=Me(h=>Ci(h,e)),o=Me(h=>Pi(h,t)),c=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:Ot.allowDataOverflow,u=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:_t.allowDataOverflow,f=c||u;return{needClip:f,needClipX:c,needClipY:u}}function uY(e){var t=e.xAxisId,r=e.yAxisId,n=e.clipPathId,i=by(),o=aO(t,r),c=o.needClipX,u=o.needClipY,f=o.needClip,h=Me(C=>WP(C,t,!1)),m=Me(C=>HP(C,r,!1));if(!f||!i)return null;var p=i.x,v=i.y,b=i.width,S=i.height,w=c&&h?Math.min(h[0],h[1]):p-b/2,k=u&&m?Math.min(m[0],m[1]):v-S/2,N=c&&h?Math.abs(h[1]-h[0]):b*2,E=u&&m?Math.abs(m[1]-m[0]):S*2;return x.createElement("clipPath",{id:"clipPath-".concat(n)},x.createElement("rect",{x:w,y:k,width:N,height:E}))}function dY(e){var t=kh(e),r=3,n=2;if(t!=null){var i=t.r,o=t.strokeWidth,c=Number(i),u=Number(o);return(Number.isNaN(c)||c<0)&&(c=r),(Number.isNaN(u)||u<0)&&(u=n),{r:c,strokeWidth:u}}return{r,strokeWidth:n}}function Sy(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:Q3}function Ny(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:Q3}var oO=(e,t,r)=>XP(e,"xAxis",Sy(e,t),r),sO=(e,t,r)=>ZP(e,"xAxis",Sy(e,t),r),lO=(e,t,r)=>XP(e,"yAxis",Ny(e,t),r),cO=(e,t,r)=>ZP(e,"yAxis",Ny(e,t),r),fY=Y([ht,oO,lO,sO,cO],(e,t,r,n,i)=>Zn(e,"xAxis")?Of(t,n,!1):Of(r,i,!1)),hY=(e,t)=>t,uO=Y([vP,hY],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),dO=e=>{var t=ht(e),r=Zn(t,"xAxis");return r?"yAxis":"xAxis"},mY=(e,t)=>{var r=dO(e);return r==="yAxis"?Ny(e,t):Sy(e,t)},pY=(e,t,r)=>AP(e,dO(e),mY(e,t),r),gY=Y([uO,pY],(e,t)=>{var r;if(!(e==null||t==null)){var n=e.stackId,i=N0(e);if(!(n==null||i==null)){var o=(r=t[n])===null||r===void 0?void 0:r.stackedData,c=o==null?void 0:o.find(u=>u.key===i);if(c!=null)return c.map(u=>[u[0],u[1]])}}}),vY=Y([ht,oO,lO,sO,cO,gY,B9,fY,uO,i7],(e,t,r,n,i,o,c,u,f,h)=>{var m=c.chartData,p=c.dataStartIndex,v=c.dataEndIndex;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||u==null)){var b=f.data,S;if(b&&b.length>0?S=b:S=m==null?void 0:m.slice(p,v+1),S!=null)return WY({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:p,areaSettings:f,stackedData:o,displayedData:S,chartBaseValue:h,bandSize:u})}}),xY=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],yY=["id","baseLine"];function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.y||0));return Ae(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(p=>p.y||0),m)),Ae(m)?x.createElement("rect",{x:up.x||0));return Ae(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(p=>p.x||0),m)),Ae(m)?x.createElement("rect",{x:0,y:ue==null?[]:t===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>r.status==="matched"?[Xs(Xs({},r.next),{},{x:hi(r.prev.x,r.next.x,t),y:hi(r.prev.y,r.next.y,t)})]:r.status==="added"?[r.next]:[]),hO={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:xy,animationInterpolateFn:_Y,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:SY,xAxisId:0,yAxisId:0,zIndex:pr.area};function sh(e,t){return e&&e!=="none"?e:t}var MY=e=>{var t=e.dataKey,r=e.name,n=e.stroke,i=e.fill,o=e.legendType,c=e.hide;return[{inactive:c,dataKey:t,type:o,color:sh(n,i),value:$A(r,t),payload:e}]},IY=x.memo(e=>{var t=e.dataKey,r=e.data,n=e.stroke,i=e.strokeWidth,o=e.fill,c=e.name,u=e.hide,f=e.unit,h=e.tooltipType,m=e.id,p={dataDefinedOnItem:r,getPosition:al,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:$A(c,t),hide:u,type:h,color:sh(n,o),unit:f,graphicalItemId:m}};return x.createElement(KV,{tooltipEntrySettings:p})});function TY(e){var t=e.clipPathId,r=e.points,n=e.props,i=n.needClip,o=n.dot,c=n.dataKey,u=kn(n);return x.createElement(Tq,{points:r,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:c,baseProps:u,needClip:i,clipPathId:t})}function DY(e){var t=e.showLabels,r=e.children,n=e.points,i=n.map(o=>{var c,u,f={x:(c=o.x)!==null&&c!==void 0?c:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Xs(Xs({},f),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return x.createElement(OV,{value:t?i:void 0},r)}function RY(e){var t=e.points,r=e.baseLine,n=e.needClip,i=e.clipPathId,o=e.props,c=e.animationElapsedTime,u=e.isAnimating,f=e.isEntrance,h=o.layout,m=o.type,p=o.stroke,v=o.connectNulls,b=o.isRange,S=o.shape,w=o.id,k=fO(o,NY),N=nn(k),E=Xs(Xs({},N),{},{id:w,points:t,connectNulls:v,type:m,baseLine:r,layout:h,stroke:p,isRange:b,animationElapsedTime:c,isAnimating:u,isEntrance:f});return x.createElement(x.Fragment,null,(t==null?void 0:t.length)>1&&x.createElement(an,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},x.createElement(HV,{option:S,DefaultShape:hO.shape,shapeProps:E})),x.createElement(TY,{points:t,props:k,clipPathId:i}))}function LY(e,t,r){if(Ae(e)){var n=Ae(t)?t:void 0;return hi(n,e,r)}if(Xt(e)||Gn(e)){var i=Ae(t)?t:void 0;return hi(i,0,r)}return e}function $Y(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=e.previousPointsRef,o=e.previousBaselineRef,c=n.points,u=n.baseLine,f=n.isAnimationActive,h=n.animationBegin,m=n.animationDuration,p=n.animationEasing,v=n.animationMatchBy,b=n.animationInterpolateFn,S=x.useMemo(()=>({points:c,baseLine:u}),[c,u]),w=G3(S,o),k=d0(),N=lq(n.onAnimationStart,n.onAnimationEnd),E=N.isAnimating,C=N.handleAnimationStart,A=N.handleAnimationEnd,_=w.startValue;if(k==null)return null;var O;return Array.isArray(u)&&Array.isArray(_)?O=bx(_,u,v):Array.isArray(u)?O=bx(null,u,v):O=null,x.createElement(cq,{animationInput:S,animationIdPrefix:"recharts-area-",items:c,previousItemsRef:i,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:p,onAnimationStart:C,onAnimationEnd:A,animationInterpolateFn:b,animationMatchBy:v,layout:k},(I,B,F)=>{var $;return B===1?$=u:Array.isArray(u)?$=b(O,B,k):$=F?u:LY(u,_,B),w.syncStepValue($,B),x.createElement(DY,{showLabels:!E,points:c},n.children,x.createElement(RY,{points:I,baseLine:$,needClip:t,clipPathId:r,props:n,animationElapsedTime:B,isAnimating:E||B<1,isEntrance:F}),x.createElement(IV,{label:n.label}))})}function zY(e){var t=e.needClip,r=e.clipPathId,n=e.props,i=x.useRef(null),o=x.useRef();return x.createElement($Y,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:o})}class FY extends x.PureComponent{render(){var t=this.props,r=t.hide,n=t.dot,i=t.points,o=t.className,c=t.top,u=t.left,f=t.needClip,h=t.xAxisId,m=t.yAxisId,p=t.width,v=t.height,b=t.id,S=t.baseLine,w=t.zIndex;if(r)return null;var k=nt("recharts-area",o),N=b,E=dY(n),C=E.r,A=E.strokeWidth,_=H3(n),O=C*2+A,I=f?"url(#clipPath-".concat(_?"":"dots-").concat(N,")"):void 0;return x.createElement(_i,{zIndex:w},x.createElement(an,{className:k},f&&x.createElement("defs",null,x.createElement(uY,{clipPathId:N,xAxisId:h,yAxisId:m}),!_&&x.createElement("clipPath",{id:"clipPath-dots-".concat(N)},x.createElement("rect",{x:u-O/2,y:c-O/2,width:p+O,height:v+O}))),x.createElement(zY,{needClip:f,clipPathId:N,props:this.props})),x.createElement(JS,{points:i,mainColor:sh(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}),this.props.isRange&&Array.isArray(S)&&x.createElement(JS,{points:S,mainColor:sh(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:I}))}}function BY(e){var t,r=e.activeDot,n=e.animationBegin,i=e.animationDuration,o=e.animationEasing,c=e.connectNulls,u=e.dot,f=e.fill,h=e.fillOpacity,m=e.hide,p=e.isAnimationActive,v=e.legendType,b=e.stroke,S=e.xAxisId,w=e.yAxisId,k=fO(e,EY),N=ol(),E=w3(),C=aO(S,w),A=C.needClip,_=Or(),O=(t=Me(pe=>vY(pe,e.id,_)))!==null&&t!==void 0?t:{},I=O.points,B=O.isRange,F=O.baseLine,$=by();if(N!=="horizontal"&&N!=="vertical"||$==null||E!=="AreaChart"&&E!=="ComposedChart")return null;var Q=$.height,U=$.width,ge=$.x,ue=$.y;return!I||!I.length?null:x.createElement(FY,oh({},k,{activeDot:r,animationBegin:n,animationDuration:i,animationEasing:o,baseLine:F,connectNulls:c,dot:u,fill:f,fillOpacity:h,height:Q,hide:m,layout:N,isAnimationActive:p,isRange:B,legendType:v,needClip:A,points:I,stroke:b,width:U,left:ge,top:ue,xAxisId:S,yAxisId:w}))}var UY=(e,t,r,n,i)=>{var o=r??t;if(Ae(o))return o;var c=e==="horizontal"?i:n,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),h=Math.min(u[0],u[1]);return o==="dataMin"?h:o==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]};function WY(e){var t=e.areaSettings,r=t.connectNulls,n=t.baseValue,i=t.dataKey,o=e.stackedData,c=e.layout,u=e.chartBaseValue,f=e.xAxis,h=e.yAxis,m=e.displayedData,p=e.dataStartIndex,v=e.xAxisTicks,b=e.yAxisTicks,S=e.bandSize,w=o&&o.length,k=UY(c,u,n,f,h),N=c==="horizontal",E=!1,C=m.map((_,O)=>{var I,B,F,$;if(w)$=o[p+O];else{var Q=Ft(_,i);Array.isArray(Q)?($=Q,E=!0):$=[k,Q]}var U=(I=(B=$)===null||B===void 0?void 0:B[1])!==null&&I!==void 0?I:null,ge=U==null||w&&!r&&Ft(_,i)==null;if(N){var ue;return{x:nj({axis:f,ticks:v,bandSize:S,entry:_,index:O}),y:ge?null:(ue=h.scale.map(U))!==null&&ue!==void 0?ue:null,value:$,payload:_}}return{x:ge?null:(F=f.scale.map(U))!==null&&F!==void 0?F:null,y:nj({axis:h,ticks:b,bandSize:S,entry:_,index:O}),value:$,payload:_}}),A;return w||E?A=C.map(_=>{var O,I=Array.isArray(_.value)?_.value[0]:null;if(N){var B;return{x:_.x,y:I!=null&&_.y!=null&&(B=h.scale.map(I))!==null&&B!==void 0?B:null,payload:_.payload}}return{x:I!=null&&(O=f.scale.map(I))!==null&&O!==void 0?O:null,y:_.y,payload:_.payload}}):A=N?h.scale.map(k):f.scale.map(k),{points:C,baseLine:A??0,isRange:E}}function HY(e){var t=sn(e,hO),r=Or();return x.createElement(xq,{id:t.id,type:"area"},n=>x.createElement(x.Fragment,null,x.createElement(GV,{legendPayload:MY(t)}),x.createElement(IY,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),x.createElement(Nq,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:Az(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),x.createElement(BY,oh({},t,{id:n}))))}var mO=x.memo(HY,Hh);mO.displayName="Area";var KY=["domain","range"],GY=["domain","range"];function cN(e,t){if(e==null)return{};var r,n,i=VY(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{if(c!=null)return fN(fN({},o),{},{type:c})},[o,c]);return x.useLayoutEffect(()=>{u!=null&&(r.current===null?t(zq(u)):r.current!==u&&t(Fq({prev:r.current,next:u})),r.current=u)},[u,t]),x.useLayoutEffect(()=>()=>{r.current&&(t(Bq(r.current)),r.current=null)},[t]),null}var rZ=e=>{var t=e.xAxisId,r=e.className,n=Me(FA),i=Or(),o="xAxis",c=Me(v=>YP(v,o,t,i)),u=Me(v=>RW(v,t)),f=Me(v=>UW(v,t)),h=Me(v=>hP(v,t));if(u==null||f==null||h==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var m=kx(e,QY);h.id,h.scale;var p=kx(h,YY);return x.createElement(ky,wx({},m,p,{x:f.x,y:f.y,width:u.width,height:u.height,className:nt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:c,axisType:o,axisId:t}))},nZ={allowDataOverflow:Ot.allowDataOverflow,allowDecimals:Ot.allowDecimals,allowDuplicatedCategory:Ot.allowDuplicatedCategory,angle:Ot.angle,axisLine:xi.axisLine,height:Ot.height,hide:!1,includeHidden:Ot.includeHidden,interval:Ot.interval,label:!1,minTickGap:Ot.minTickGap,mirror:Ot.mirror,orientation:Ot.orientation,padding:Ot.padding,reversed:Ot.reversed,scale:Ot.scale,tick:Ot.tick,tickCount:Ot.tickCount,tickLine:xi.tickLine,tickSize:xi.tickSize,type:Ot.type,niceTicks:Ot.niceTicks,xAxisId:0},iZ=e=>{var t=sn(e,nZ);return x.createElement(x.Fragment,null,x.createElement(tZ,{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}),x.createElement(rZ,t))},gO=x.memo(iZ,pO);gO.displayName="XAxis";var aZ=["type"],oZ=["dangerouslySetInnerHTML","ticks","scale"],sZ=["id","scale"];function jx(){return jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(c!=null)return mN(mN({},o),{},{type:c})},[c,o]);return x.useLayoutEffect(()=>{u!=null&&(r.current===null?t(Uq(u)):r.current!==u&&t(Wq({prev:r.current,next:u})),r.current=u)},[u,t]),x.useLayoutEffect(()=>()=>{r.current&&(t(Hq(r.current)),r.current=null)},[t]),null}function hZ(e){var t=e.yAxisId,r=e.className,n=e.width,i=e.label,o=x.useRef(null),c=x.useRef(null),u=Me(FA),f=Or(),h=At(),m="yAxis",p=Me(N=>KW(N,t)),v=Me(N=>HW(N,t)),b=Me(N=>YP(N,m,t,f)),S=Me(N=>mP(N,t));if(x.useLayoutEffect(()=>{if(!(n!=="auto"||!p||vy(i)||x.isValidElement(i)||S==null)){var N=o.current;if(N){var E=N.getCalculatedWidth();Math.round(p.width)!==Math.round(E)&&h(Kq({id:t,width:E}))}}},[b,p,h,i,t,n,S]),p==null||v==null||S==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var w=Sx(e,oZ);S.id,S.scale;var k=Sx(S,sZ);return x.createElement(ky,jx({},w,k,{ref:o,labelRef:c,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:p.width,height:p.height,className:nt("recharts-".concat(m," ").concat(m),r),viewBox:u,ticks:b,axisType:m,axisId:t}))}var mZ={allowDataOverflow:_t.allowDataOverflow,allowDecimals:_t.allowDecimals,allowDuplicatedCategory:_t.allowDuplicatedCategory,angle:_t.angle,axisLine:xi.axisLine,hide:!1,includeHidden:_t.includeHidden,interval:_t.interval,label:!1,minTickGap:_t.minTickGap,mirror:_t.mirror,orientation:_t.orientation,padding:_t.padding,reversed:_t.reversed,scale:_t.scale,tick:_t.tick,tickCount:_t.tickCount,tickLine:xi.tickLine,tickSize:xi.tickSize,type:_t.type,niceTicks:_t.niceTicks,width:_t.width,yAxisId:0},pZ=e=>{var t=sn(e,mZ);return x.createElement(x.Fragment,null,x.createElement(fZ,{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}),x.createElement(hZ,t))},vO=x.memo(pZ,pO);vO.displayName="YAxis";var gZ=(e,t)=>t,Ey=Y([gZ,ht,CC,Wt,p3,Oi,hK,er],bK);function vZ(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Ay(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(vZ(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var c=(u,f)=>({relativeX:Math.round((u-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(u=>c(u.clientX,u.clientY)):c(e.clientX,e.clientY)}var xO=Ur("mouseClick"),yO=iu();yO.startListening({actionCreator:xO,effect:(e,t)=>{var r=e.payload,n=Ey(t.getState(),Ay(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(oH({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Nx=Ur("mouseMove"),bO=iu(),hs=null,Wa=null,Xg=null;bO.startListening({actionCreator:Nx,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=n.eventSettings,o=i.throttleDelay,c=i.throttledEvents,u=c==="all"||(c==null?void 0:c.includes("mousemove"));hs!==null&&(cancelAnimationFrame(hs),hs=null),Wa!==null&&(typeof o!="number"||!u)&&(clearTimeout(Wa),Wa=null),Xg=Ay(r);var f=()=>{var h=t.getState(),m=vu(h,h.tooltip.settings.shared);if(!Xg){hs=null,Wa=null;return}if(m==="axis"){var p=Ey(h,Xg);(p==null?void 0:p.activeIndex)!=null?t.dispatch(a3({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(i3())}hs=null,Wa=null};if(!u){f();return}o==="raf"?hs=requestAnimationFrame(f):typeof o=="number"&&Wa===null&&(Wa=setTimeout(f,o))}});function xZ(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<>":t}var pN={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},wO=ur({name:"rootProps",initialState:pN,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:pN.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}}}),yZ=wO.reducer,bZ=wO.actions.updateOptions,wZ=null,kZ={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)},kO=ur({name:"polarOptions",initialState:wZ,reducers:kZ});kO.actions.updatePolarOptions;var jZ=kO.reducer,jO=Ur("keyDown"),SO=Ur("focus"),NO=Ur("blur"),um=iu(),ms=null,Ha=null,Xd=null;um.startListening({actionCreator:jO,effect:(e,t)=>{Xd=e.payload,ms!==null&&(cancelAnimationFrame(ms),ms=null);var r=t.getState(),n=r.eventSettings,i=n.throttleDelay,o=n.throttledEvents,c=o==="all"||o.includes("keydown");Ha!==null&&(typeof i!="number"||!c)&&(clearTimeout(Ha),Ha=null);var u=()=>{try{var f=t.getState(),h=f.rootProps.accessibilityLayer!==!1;if(!h)return;var m=f.tooltip.keyboardInteraction,p=Xd;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var v=kc(m,No(f),Ys(f),Zs(f)),b=v==null?-1:Number(v),S=!Number.isFinite(b)||b<0,w=Oi(f),k=No(f),N=vu(f,f.tooltip.settings.shared);if(p==="Enter"){if(S)return;var E=th(f,N,"hover",String(m.index));t.dispatch(eh({active:!m.active,activeIndex:m.index,activeCoordinate:E}));return}var C=YW(f),A=C==="left-to-right"?1:-1,_=p==="ArrowRight"?1:-1,O;if(S){var I=Ys(f),B=Zs(f),F=_*A,$=pe=>({active:!1,index:String(pe),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(O=-1,F>0){for(var Q=0;Q=0;U--)if(kc($(U),k,I,B)!=null){O=U;break}if(O<0)return}else{O=b+_*A;var ge=(w==null?void 0:w.length)||k.length;if(ge===0||O>=ge||O<0)return}var ue=th(f,N,"hover",String(O));t.dispatch(eh({active:!0,activeIndex:O.toString(),activeCoordinate:ue}))}finally{ms=null,Ha=null}};if(!c){u();return}i==="raf"?ms=requestAnimationFrame(u):typeof i=="number"&&Ha===null&&(u(),Xd=null,Ha=setTimeout(()=>{Xd?u():(Ha=null,ms=null)},i))}});um.startListening({actionCreator:SO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;if(!i.active&&i.index==null){var o="0",c=vu(r,r.tooltip.settings.shared),u=th(r,c,"hover",String(o));t.dispatch(eh({active:!0,activeIndex:o,activeCoordinate:u}))}}}});um.startListening({actionCreator:NO,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var i=r.tooltip.keyboardInteraction;i.active&&t.dispatch(eh({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function EO(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var Zr=Ur("externalEvent"),AO=iu(),Jd=new Map,pc=new Map,Jg=new Map;AO.startListening({actionCreator:Zr,effect:(e,t)=>{var r=e.payload,n=r.handler,i=r.reactEvent;if(n!=null){var o=i.type,c=EO(i);Jg.set(o,{handler:n,reactEvent:c});var u=Jd.get(o);u!==void 0&&(cancelAnimationFrame(u),Jd.delete(o));var f=t.getState(),h=f.eventSettings,m=h.throttleDelay,p=h.throttledEvents,v=p,b=v==="all"||(v==null?void 0:v.includes(o)),S=pc.get(o);S!==void 0&&(typeof m!="number"||!b)&&(clearTimeout(S),pc.delete(o));var w=()=>{var E=Jg.get(o);try{if(!E)return;var C=E.handler,A=E.reactEvent,_=t.getState(),O={activeCoordinate:XH(_),activeDataKey:QH(_),activeIndex:Kc(_),activeLabel:x3(_),activeTooltipIndex:Kc(_),isTooltipActive:JH(_)};C&&C(O,A)}finally{Jd.delete(o),pc.delete(o),Jg.delete(o)}};if(!b){w();return}if(m==="raf"){var k=requestAnimationFrame(w);Jd.set(o,k)}else if(typeof m=="number"){if(!pc.has(o)){w();var N=setTimeout(w,m);pc.set(o,N)}}else w()}}});var SZ=Y([ml],e=>e.tooltipItemPayloads),NZ=Y([SZ,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var i=n.getPosition;if(i!=null)return i(t)}}}),CO=Ur("touchMove"),PO=iu(),Ka=null,ea=null,gN=null,gc=null;PO.startListening({actionCreator:CO,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){gc=EO(r);var n=t.getState(),i=n.eventSettings,o=i.throttleDelay,c=i.throttledEvents,u=c==="all"||c.includes("touchmove");Ka!==null&&(cancelAnimationFrame(Ka),Ka=null),ea!==null&&(typeof o!="number"||!u)&&(clearTimeout(ea),ea=null),gN=Array.from(r.touches).map(h=>Ay({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var f=()=>{if(gc!=null){var h=t.getState(),m=vu(h,h.tooltip.settings.shared);if(m==="axis"){var p,v=(p=gN)===null||p===void 0?void 0:p[0];if(v==null){Ka=null,ea=null;return}var b=Ey(h,v);(b==null?void 0:b.activeIndex)!=null&&t.dispatch(a3({activeIndex:b.activeIndex,activeDataKey:void 0,activeCoordinate:b.activeCoordinate}))}else if(m==="item"){var S,w=gc.touches[0];if(document.elementFromPoint==null||w==null)return;var k=document.elementFromPoint(w.clientX,w.clientY);if(!k||!k.getAttribute)return;var N=k.getAttribute(Tz),E=(S=k.getAttribute(Dz))!==null&&S!==void 0?S:void 0,C=Mo(h).find(O=>O.id===E);if(N==null||C==null||E==null)return;var A=C.dataKey,_=NZ(h,N,E);t.dispatch(aH({activeDataKey:A,activeIndex:N,activeCoordinate:_,activeGraphicalItemId:E}))}Ka=null,ea=null}};if(!u){f();return}o==="raf"?Ka=requestAnimationFrame(f):typeof o=="number"&&ea===null&&(f(),gc=null,ea=setTimeout(()=>{gc?f():(ea=null,Ka=null)},o))}}});var OO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},_O=ur({name:"eventSettings",initialState:OO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),EZ=_O.actions.setEventSettings,AZ=_O.reducer,CZ=sA({brush:tQ,cartesianAxis:Gq,chartData:ZK,errorBars:cY,eventSettings:AZ,graphicalItems:jq,layout:xz,legend:M8,options:GK,polarAxis:DV,polarOptions:jZ,referenceElements:aQ,renderedTicks:AQ,rootProps:yZ,tooltip:sH,zIndex:IK}),PZ=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return W$({reducer:CZ,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([yO.middleware,bO.middleware,um.middleware,AO.middleware,PO.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(kA({type:"raf"}))},devTools:{serialize:{replacer:xZ},name:"recharts-".concat(r)}})};function OZ(e){var t=e.preloadedState,r=e.children,n=e.reduxStoreName,i=Or(),o=x.useRef(null);if(i)return r;o.current==null&&(o.current=PZ(t,n));var c=r0;return x.createElement(q8,{context:c,store:o.current},r)}function _Z(e){var t=e.layout,r=e.margin,n=At(),i=Or();return x.useEffect(()=>{i||(n(pz(t)),n(mz(r)))},[n,i,t,r]),null}var MZ=x.memo(_Z,Hh);function IZ(e){var t=At();return x.useEffect(()=>{t(bZ(e))},[t,e]),null}var TZ=e=>{var t=At();return x.useEffect(()=>{t(EZ(e))},[t,e]),null},DZ=x.memo(TZ,Hh);function vN(e){var t=e.zIndex,r=e.isPanorama,n=x.useRef(null),i=At();return x.useLayoutEffect(()=>(n.current&&i(_K({zIndex:t,element:n.current,isPanorama:r})),()=>{i(MK({zIndex:t,isPanorama:r}))}),[i,t,r]),x.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function xN(e){var t=e.children,r=e.isPanorama,n=Me(kK);if(!n||n.length===0)return t;var i=n.filter(c=>c<0),o=n.filter(c=>c>0);return x.createElement(x.Fragment,null,i.map(c=>x.createElement(vN,{key:c,zIndex:c,isPanorama:r})),t,o.map(c=>x.createElement(vN,{key:c,zIndex:c,isPanorama:r})))}var RZ=["children"];function LZ(e,t){if(e==null)return{};var r,n,i=$Z(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=KA(),n=GA(),i=rC();if(!qn(r)||!qn(n))return null;var o=e.children,c=e.otherAttributes,u=e.title,f=e.desc,h,m;return c!=null&&(typeof c.tabIndex=="number"?h=c.tabIndex:h=i?0:void 0,typeof c.role=="string"?m=c.role:m=i?"application":void 0),x.createElement(NE,lh({},c,{title:u,desc:f,role:m,tabIndex:h,width:r,height:n,style:zZ,ref:t}),o)}),BZ=e=>{var t=e.children,r=Me(zh);if(!r)return null;var n=r.width,i=r.height,o=r.y,c=r.x;return x.createElement(NE,{width:n,height:i,x:c,y:o},t)},yN=x.forwardRef((e,t)=>{var r=e.children,n=LZ(e,RZ),i=Or();return i?x.createElement(BZ,null,x.createElement(xN,{isPanorama:!0},r)):x.createElement(FZ,lh({ref:t},n),x.createElement(xN,{isPanorama:!1},r))});function UZ(e,t){return GZ(e)||KZ(e,t)||HZ(e,t)||WZ()}function WZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HZ(e,t){if(e){if(typeof e=="string")return bN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bN(e,t):void 0}}function bN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r{if(n!=null){var c=n.getBoundingClientRect(),u=c.width/n.offsetWidth;He(u)&&u!==o&&e(vz(u))}},[n,e,o]),i}function wN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qZ(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r(oG(),null);function uh(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var nX=x.forwardRef((e,t)=>{var r,n,i=x.useRef(null),o=x.useState({containerWidth:uh((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:uh((n=e.style)===null||n===void 0?void 0:n.height)}),c=ch(o,2),u=c[0],f=c[1],h=x.useCallback((p,v)=>{f(b=>{var S=Math.round(p),w=Math.round(v);return b.containerWidth===S&&b.containerHeight===w?b:{containerWidth:S,containerHeight:w}})},[]),m=x.useCallback(p=>{if(typeof t=="function"&&t(p),i.current!=null&&(i.current.disconnect(),i.current=null),p!=null&&typeof ResizeObserver<"u"){var v=p.getBoundingClientRect(),b=v.width,S=v.height;h(b,S);var w=N=>{var E=N[0];if(E!=null){var C=E.contentRect,A=C.width,_=C.height;h(A,_)}},k=new ResizeObserver(w);k.observe(p),i.current=k}},[t,h]);return x.useEffect(()=>()=>{var p=i.current;p!=null&&p.disconnect()},[h]),x.createElement(x.Fragment,null,x.createElement(ou,{width:u.containerWidth,height:u.containerHeight}),x.createElement("div",ba({ref:m},e)))}),iX=x.forwardRef((e,t)=>{var r=e.width,n=e.height,i=x.useState({containerWidth:uh(r),containerHeight:uh(n)}),o=ch(i,2),c=o[0],u=o[1],f=x.useCallback((m,p)=>{u(v=>{var b=Math.round(m),S=Math.round(p);return v.containerWidth===b&&v.containerHeight===S?v:{containerWidth:b,containerHeight:S}})},[]),h=x.useCallback(m=>{if(typeof t=="function"&&t(m),m!=null){var p=m.getBoundingClientRect(),v=p.width,b=p.height;f(v,b)}},[t,f]);return x.createElement(x.Fragment,null,x.createElement(ou,{width:c.containerWidth,height:c.containerHeight}),x.createElement("div",ba({ref:h},e)))}),aX=x.forwardRef((e,t)=>{var r=e.width,n=e.height;return x.createElement(x.Fragment,null,x.createElement(ou,{width:r,height:n}),x.createElement("div",ba({ref:t},e)))}),oX=x.forwardRef((e,t)=>{var r=e.width,n=e.height;return typeof r=="string"||typeof n=="string"?x.createElement(iX,ba({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?x.createElement(aX,ba({},e,{width:r,height:n,ref:t})):x.createElement(x.Fragment,null,x.createElement(ou,{width:r,height:n}),x.createElement("div",ba({ref:t},e)))});function sX(e){return e?nX:oX}var lX=x.forwardRef((e,t)=>{var r=e.children,n=e.className,i=e.height,o=e.onClick,c=e.onContextMenu,u=e.onDoubleClick,f=e.onMouseDown,h=e.onMouseEnter,m=e.onMouseLeave,p=e.onMouseMove,v=e.onMouseUp,b=e.onTouchEnd,S=e.onTouchMove,w=e.onTouchStart,k=e.style,N=e.width,E=e.responsive,C=e.dispatchTouchEvents,A=C===void 0?!0:C,_=x.useRef(null),O=At(),I=x.useState(null),B=ch(I,2),F=B[0],$=B[1],Q=x.useState(null),U=ch(Q,2),ge=U[0],ue=U[1],pe=VZ(),se=c0(),ae=(se==null?void 0:se.width)>0?se.width:N,Z=(se==null?void 0:se.height)>0?se.height:i,re=x.useCallback(_e=>{pe(_e),typeof t=="function"&&t(_e),$(_e),ue(_e),_e!=null&&(_.current=_e)},[pe,t,$,ue]),ie=x.useCallback(_e=>{O(xO(_e)),O(Zr({handler:o,reactEvent:_e}))},[O,o]),D=x.useCallback(_e=>{O(Nx(_e)),O(Zr({handler:h,reactEvent:_e}))},[O,h]),M=x.useCallback(_e=>{O(i3()),O(Zr({handler:m,reactEvent:_e}))},[O,m]),q=x.useCallback(_e=>{O(Nx(_e)),O(Zr({handler:p,reactEvent:_e}))},[O,p]),le=x.useCallback(()=>{O(SO())},[O]),oe=x.useCallback(()=>{O(NO())},[O]),te=x.useCallback(_e=>{O(jO(_e.key))},[O]),W=x.useCallback(_e=>{O(Zr({handler:c,reactEvent:_e}))},[O,c]),ne=x.useCallback(_e=>{O(Zr({handler:u,reactEvent:_e}))},[O,u]),J=x.useCallback(_e=>{O(Zr({handler:f,reactEvent:_e}))},[O,f]),xe=x.useCallback(_e=>{O(Zr({handler:v,reactEvent:_e}))},[O,v]),be=x.useCallback(_e=>{O(Zr({handler:w,reactEvent:_e}))},[O,w]),fe=x.useCallback(_e=>{A&&O(CO(_e)),O(Zr({handler:S,reactEvent:_e}))},[O,A,S]),qe=x.useCallback(_e=>{O(Zr({handler:b,reactEvent:_e}))},[O,b]),Be=sX(E);return x.createElement(E3.Provider,{value:F},x.createElement(kL.Provider,{value:ge},x.createElement(Be,{width:ae??(k==null?void 0:k.width),height:Z??(k==null?void 0:k.height),className:nt("recharts-wrapper",n),style:qZ({position:"relative",cursor:"default",width:ae,height:Z},k),onClick:ie,onContextMenu:W,onDoubleClick:ne,onFocus:le,onBlur:oe,onKeyDown:te,onMouseDown:J,onMouseEnter:D,onMouseLeave:M,onMouseMove:q,onMouseUp:xe,onTouchEnd:qe,onTouchMove:fe,onTouchStart:be,ref:re},x.createElement(rX,null),r)))}),cX=["width","height","responsive","children","className","style","compact","title","desc"];function uX(e,t){if(e==null)return{};var r,n,i=dX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=e.width,n=e.height,i=e.responsive,o=e.children,c=e.className,u=e.style,f=e.compact,h=e.title,m=e.desc,p=uX(e,cX),v=kn(p);return f?x.createElement(x.Fragment,null,x.createElement(ou,{width:r,height:n}),x.createElement(yN,{otherAttributes:v,title:h,desc:m},o)):x.createElement(lX,{className:c,style:u,width:r,height:n,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},x.createElement(yN,{otherAttributes:v,title:h,desc:m,ref:t},x.createElement(fQ,null,o)))});function Ex(){return Ex=Object.assign?Object.assign.bind():function(e){for(var t=1;tx.createElement(yX,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:bX,tooltipPayloadSearcher:HK,categoricalChartProps:e,ref:t}));const kX="rgba(130,130,150,0.14)",SN="rgba(130,130,150,0.85)";function jX(e){if(e<=0)return 10;const t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function MO(e,t){return`${t==="%"?Math.round(e):e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString()}${t}`}function SX({active:e,payload:t,unit:r}){return!e||!(t!=null&&t.length)?null:s.jsx("div",{className:"rounded-lg border border-border/70 bg-popover/95 px-3 py-2 shadow-xl backdrop-blur",children:s.jsx("div",{className:"space-y-1",children:t.map(n=>s.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[s.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:n.color}}),s.jsx("span",{className:"uppercase tracking-wider text-muted-foreground",children:n.name}),s.jsx("span",{className:"ml-auto pl-3 font-bold tabular-nums text-foreground",children:MO(n.value,r)})]},n.dataKey))})})}function IO({data:e,series:t,unit:r="%",yMode:n="percent",height:i=176}){const o=e.reduce((u,f)=>t.reduce((h,m)=>Math.max(h,Number(f[m.key])||0),u),0),c=n==="percent"?Math.min(100,Math.max(25,Math.ceil(o*1.2/25)*25)):Math.max(jX(o*1.15),10);return s.jsx("div",{style:{height:i},className:"w-full",children:s.jsx(m8,{width:"100%",height:"100%",children:s.jsxs(wX,{data:e,margin:{top:8,right:6,bottom:0,left:-12},children:[s.jsx("defs",{children:t.map(u=>s.jsxs("linearGradient",{id:`grad-${u.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u.color,stopOpacity:.22}),s.jsx("stop",{offset:"100%",stopColor:u.color,stopOpacity:0})]},u.key))}),s.jsx(nO,{vertical:!1,stroke:kX}),s.jsx(gO,{dataKey:"t",hide:!0}),s.jsx(vO,{domain:[0,c],ticks:[0,c/2,c],tickFormatter:u=>MO(u,r),width:42,axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:SN}}),s.jsx(yG,{content:s.jsx(SX,{unit:r}),cursor:{stroke:SN,strokeOpacity:.4,strokeDasharray:"3 3"}}),t.map(u=>s.jsx(mO,{type:"monotone",dataKey:u.key,name:u.label,stroke:u.color,strokeWidth:2,fill:`url(#grad-${u.key})`,dot:!1,activeDot:{r:3,strokeWidth:0},isAnimationActive:!1,connectNulls:!0},u.key))]})})})}const NX=[{key:"cpu",label:"CPU",color:"#2dd4bf"},{key:"ram",label:"RAM",color:"#38bdf8"},{key:"gpu",label:"GPU",color:"#a78bfa"},{key:"disk",label:"Disk",color:"#fbbf24"}];function TO(){var c,u,f,h;const{sys:e,hist:t}=dL(),r=!!(e!=null&&e.gpu&&e.gpu.busy_percent!=null&&e.gpu.gtt_used!=null&&e.gpu.gtt_total!=null),n=NX.filter(m=>m.key!=="gpu"||r),i={cpu:(c=e==null?void 0:e.cpu)==null?void 0:c.percent,ram:(u=e==null?void 0:e.ram)==null?void 0:u.percent,gpu:r?e.gpu.busy_percent:null,disk:(f=e==null?void 0:e.disk)==null?void 0:f.percent},o={cpu:(h=e==null?void 0:e.cpu)!=null&&h.cores?`${e.cpu.cores} Cores`:"",ram:e?`${Jr(e.ram.used)}/${Jr(e.ram.total)} GB`:"",gpu:r?`${Jr(e.gpu.gtt_used)}/${Jr(e.gpu.gtt_total)} GB`:"",disk:e!=null&&e.disk?`${Jr(e.disk.used)}/${Jr(e.disk.total)} GB`:""};return s.jsxs("div",{className:"flex flex-col justify-between rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[s.jsx(yi,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"System-Status"}),s.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mb-2 grid grid-cols-2 gap-x-4 gap-y-1.5",children:n.map(m=>s.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[s.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{background:m.color}}),s.jsx("span",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:m.label}),s.jsxs("span",{className:"shrink-0 font-mono text-xs font-bold tabular-nums text-foreground",children:[Math.round(i[m.key]??0),"%"]}),o[m.key]&&s.jsx("span",{className:"truncate font-mono text-[10px] text-muted-foreground/60",children:o[m.key]})]},m.key))}),s.jsx(IO,{data:t,series:n,unit:"%",yMode:"percent",height:176})]}):s.jsx("div",{className:"flex h-44 items-center justify-center text-xs text-muted-foreground",children:"Lade Systemdaten…"})]}),(e==null?void 0:e.temp)&&(e.temp.cpu||e.temp.gpu)&&s.jsxs("div",{className:"mt-3 flex gap-4 border-t border-border/30 pt-3 font-mono text-xs text-muted-foreground/80",children:[e.temp.cpu!=null&&s.jsxs("span",{children:["CPU Temp: ",e.temp.cpu," °C"]}),e.temp.gpu!=null&&s.jsxs("span",{children:["GPU Temp: ",e.temp.gpu," °C"]})]})]})}const NN=[{key:"prompt",label:"Prompt",color:"#f59e0b"},{key:"completion",label:"Antwort",color:"#2dd4bf"}];function DO(){const{data:e}=dE(3e3),t=oL(),r=t[t.length-1],n=r?Math.round(r.prompt+r.completion):0;return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[s.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(hh,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Token-Durchsatz"}),s.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),e&&s.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[s.jsx("span",{className:"font-space text-3xl font-bold tracking-tight text-foreground tabular-nums",children:n.toLocaleString("de-DE")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"tok/s aktuell"})]}),e&&s.jsxs("div",{className:"mt-0.5 space-y-0.5 font-mono text-[11px] text-muted-foreground/70",children:[s.jsxs("div",{children:[e.total_tokens.toLocaleString("de-DE")," Tokens gesamt · ",s.jsxs("span",{className:"text-emerald-400/90",children:[e.saved_eur.toLocaleString("de-DE",{minimumFractionDigits:2})," € gespart"]})]}),s.jsxs("div",{className:"text-muted-foreground/55",children:["Input ",e.prompt_tokens.toLocaleString("de-DE")," · Output ",e.completion_tokens.toLocaleString("de-DE")]})]})]}),s.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1.5 pt-1",children:NN.map(i=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:i.color}}),s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:i.label}),s.jsx("span",{className:"font-mono text-xs font-bold tabular-nums text-foreground",children:Math.round((r==null?void 0:r[i.key])??0)})]},i.key))})]}),e?s.jsx(IO,{data:t,series:NN,unit:" tok/s",yMode:"auto",height:150}):s.jsx("div",{className:"flex h-[150px] items-center justify-center text-xs text-muted-foreground",children:"Lade Durchsatz…"}),s.jsx("div",{className:"mt-2 border-t border-border/30 pt-2 text-[10px] text-muted-foreground/70",children:"Durchsatz aus dem Gateway abgeleitet (Prefill vs. Generierung). Flach bei Leerlauf."})]})}function EX(){const{data:e}=wh(3e4),{data:t}=Si(),r=((e==null?void 0:e.os)||0)+((e==null?void 0:e.engine)||0)+((e==null?void 0:e.swap)||0)+((e==null?void 0:e.models)||0),n=()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}})),i=(t==null?void 0:t.models)??[],o=(t==null?void 0:t.running)??[],c=i.find(m=>m.role==="hermes"),u=i.find(m=>m.role==="coder-lite")||i.find(m=>m.role==="coder"),f=m=>m?o.includes(m):!1,h=m=>{var p;return((p=m==null?void 0:m.split("/").pop())==null?void 0:p.replace(/\.gguf$/i,""))||"—"};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Basisstation"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Geht's der Box gut, gibt's Updates, was läuft gerade."})]}),s.jsx(cL,{frame:"box"}),s.jsxs("button",{onClick:n,className:ee("w-full flex items-center gap-3 rounded-2xl border p-4 text-left transition-all cursor-pointer",r>0?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10":"border-border/60 bg-card/45 hover:border-primary/40"),children:[r>0?s.jsx(FM,{className:"h-6 w-6 shrink-0 text-amber-400"}):s.jsx(Mt,{className:"h-6 w-6 shrink-0 text-emerald-400"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:ee("text-sm font-semibold",r>0?"text-amber-400":"text-foreground"),children:r>0?`${r} Update${r===1?"":"s"} verfügbar`:"Alles aktuell"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:r>0?"Antippen, um zu sehen, was genau aktualisiert wird.":"Keine ausstehenden Updates."})]}),r>0&&s.jsxs("span",{className:"shrink-0 flex items-center gap-1 text-xs font-semibold text-amber-400",children:["Ansehen ",s.jsx(Kn,{className:"h-4 w-4"})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:"Was gerade läuft"}),s.jsx("div",{className:"rounded-2xl border border-border/60 overflow-hidden",children:[{icon:yi,label:"Lucys Hirn",model:c==null?void 0:c.name,warm:f(c==null?void 0:c.name)},{icon:Fs,label:"Coder (Vibe-Coding)",model:u==null?void 0:u.name,warm:f(u==null?void 0:u.name)}].map(m=>s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/40 last:border-0",children:[s.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full",m.warm?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40")}),s.jsx(m.icon,{className:"h-4 w-4 text-muted-foreground shrink-0"}),s.jsx("span",{className:"text-sm text-foreground w-40 shrink-0",children:m.label}),s.jsx("span",{className:"text-xs text-muted-foreground flex-1 truncate font-mono",children:h(m.model)}),s.jsx("span",{className:ee("text-xs shrink-0",m.warm?"text-emerald-400":"text-muted-foreground"),children:m.model?m.warm?"warm":"bereit":"nicht gesetzt"})]},m.label))})]}),s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsx(TO,{}),s.jsx(DO,{})]})]})}const AX=e=>!!dt(e).protected;function CX({role:e,roleRec:t,models:r,onAssign:n,onClose:i}){var f,h;const o=t&&t.role===e?t:null,c={};o==null||o.models.forEach(m=>{c[m.name]=m});const u=o?o.models.map(m=>r.find(p=>p.name===m.name)).filter(Boolean):r;return s.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm flex items-center justify-center p-4 overscroll-contain",role:"dialog","aria-modal":"true","aria-label":`${dt(e).label} konfigurieren`,children:s.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/80 bg-card p-6 shadow-2xl space-y-4 animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary flex items-center gap-1.5",children:[s.jsx(mo,{role:e})," festlegen"]}),s.jsx("button",{onClick:i,className:"p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Wähle ein Modell für ",s.jsx("strong",{className:"text-foreground",children:dt(e).label}),s.jsx("span",{className:"block text-[10px] text-muted-foreground/70 mt-0.5",children:dt(e).desc})]}),(o==null?void 0:o.recommended)&&s.jsxs("button",{onClick:()=>n(o.recommended),title:(f=c[o.recommended])==null?void 0:f.reason,className:"shrink-0 h-7 px-3 text-[11px] font-semibold text-primary border border-primary/50 bg-primary/10 hover:bg-primary/20 rounded-lg cursor-pointer flex items-center gap-1",children:[s.jsx(wa,{className:"h-3 w-3"})," Auto: ",(h=o.recommended.split("/").pop())==null?void 0:h.replace(/\.gguf$/i,"")]})]}),s.jsxs("div",{className:"space-y-1.5 max-h-60 overflow-y-auto pr-1",children:[AX(e)?s.jsx("div",{className:"w-full px-3 py-2 rounded-lg text-[11px] text-muted-foreground border border-border/30 bg-background/20 flex items-center gap-1.5",children:"🔒 Diese Rolle ist lebenswichtig und kann nicht leer bleiben — wähle stattdessen ein anderes Modell."}):s.jsx("button",{onClick:()=>n(""),className:"w-full text-left px-3 py-2 rounded-lg text-xs hover:bg-accent text-red-400 font-semibold cursor-pointer border border-red-500/20 bg-red-500/5 flex items-center justify-between",children:s.jsx("span",{children:"Zuweisung entfernen"})}),u.map(m=>{var w;const p=c[m.name],v=m.role===e,b=!!(p!=null&&p.recommended),S=!!p&&!p.suitable;return s.jsxs("button",{onClick:()=>n(m.name),className:ee("w-full text-left px-3 py-2.5 rounded-lg text-xs hover:bg-accent flex items-center justify-between font-mono cursor-pointer border",b?"border-primary/50 bg-primary/10":v?"text-primary font-bold bg-primary/5 border-primary/30":S?"border-border/20 bg-background/10 opacity-60":"text-foreground bg-background/20 border-border/30"),children:[s.jsxs("div",{className:"flex flex-col text-left min-w-0",children:[s.jsxs("span",{className:"truncate max-w-[260px] font-semibold flex items-center gap-1.5",children:[(w=m.name.split("/").pop())==null?void 0:w.replace(/\.gguf$/i,""),b&&s.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wide text-primary bg-primary/15 px-1.5 py-0.5 rounded",children:"Empfohlen"})]}),s.jsx("span",{className:"text-[9px] text-muted-foreground mt-0.5",children:p?`${p.params_b}B · ${m.quant} · ${p.reason}`:`${lr(m.size_bytes)} · ${m.quant}`})]}),v&&s.jsx(Mt,{className:"h-4 w-4 shrink-0 text-primary"})]},m.name)})]})]})})}const PX=["fast","heavy","heavy_chars"],OX=["coder_lite","coder","coding_escalate_chars"];function _X(){const e=Hr(),{data:t,isLoading:r}=xR(),[n,i]=x.useState(null),[o,c]=x.useState(!1),[u,f]=x.useState(""),[h,m]=x.useState(0);if(x.useEffect(()=>{t!=null&&t.policy&&!n&&i({...t.policy})},[t,n]),r||!t||!n)return s.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-xs text-muted-foreground",children:"Lade Routing-Policy…"});const p=N=>t.fields.find(E=>E.key===N),v=Object.keys(n).some(N=>n[N]!==t.policy[N]),b=(N,E)=>{i(C=>C&&{...C,[N]:E}),f("")},S=N=>b(N,t.defaults[N]);async function w(){if(!n)return;const N={};for(const E of Object.keys(n))n[E]!==t.policy[E]&&(N[E]=n[E]);if(Object.keys(N).length!==0){c(!0),f("");try{const{policy:E}=await fR(N);i({...E}),e.invalidateQueries({queryKey:$e.routingPolicy}),e.invalidateQueries({queryKey:$e.routing}),m(Date.now()),setTimeout(()=>m(0),2e3)}catch(E){f(E.message||String(E))}finally{c(!1)}}}function k({k:N}){const E=p(N),C=n[N],A=n[N]===t.defaults[N];return s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("label",{className:"text-[10px] font-semibold text-muted-foreground",children:E.label}),!A&&s.jsxs("button",{onClick:()=>S(N),className:"flex items-center gap-0.5 text-[9px] text-muted-foreground/60 hover:text-foreground transition-colors cursor-pointer",title:`Auf Default zurücksetzen (${String(t.defaults[N])||"leer"})`,children:[s.jsx(Lx,{className:"h-2.5 w-2.5"})," Default"]})]}),E.type==="bool"?s.jsxs("button",{onClick:()=>b(N,!C),className:ee("flex h-8 w-full items-center justify-between rounded-lg border px-3 text-[11px] font-semibold transition-all cursor-pointer",C?"border-emerald-500/40 bg-emerald-500/10 text-emerald-300":"border-border/40 bg-background/40 text-muted-foreground"),children:[s.jsx("span",{children:C?"An":"Aus"}),s.jsx("span",{className:ee("h-3.5 w-3.5 rounded-full transition-colors",C?"bg-emerald-400":"bg-muted-foreground/40")})]}):E.type==="int"?s.jsx("input",{type:"number",value:C,min:E.min,max:E.max,"aria-label":E.label,onChange:_=>b(N,Number(_.target.value)),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"}):s.jsx("input",{type:"text",value:C,"aria-label":E.label,spellCheck:!1,placeholder:N==="coder_lite"?"(leer = aus)":"",onChange:_=>b(N,_.target.value),className:"h-8 w-full rounded-lg border border-border/40 bg-background/40 px-3 font-mono text-[11px] text-foreground outline-none focus:border-primary/50"})]})}return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(bI,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Lane-Routing & Policy"}),s.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-300 border border-emerald-500/20",children:"hot-reload"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[u&&s.jsx("span",{className:"text-[10px] text-red-400 max-w-[280px] truncate",title:u,children:u}),h>0&&s.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-emerald-400",children:[s.jsx(Mt,{className:"h-3.5 w-3.5"})," gespeichert"]}),s.jsxs("button",{onClick:w,disabled:!v||o,className:ee("h-8 px-4 rounded-lg text-[10px] font-bold uppercase tracking-wide transition-all flex items-center gap-1.5",v&&!o?"bg-primary text-primary-foreground hover:opacity-90 cursor-pointer shadow-md shadow-primary/10":"bg-background/40 text-muted-foreground/50 border border-border/40 cursor-not-allowed"),children:[o?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):null,"Speichern"]})]})]}),s.jsxs("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed -mt-1",children:["Welches echte Modell hinter den virtuellen Lanes ",s.jsx("code",{className:"text-cyan-300",children:"chat"})," und"," ",s.jsx("code",{className:"text-cyan-300",children:"coding"})," steckt. Änderungen greifen sofort (kein Neustart). Die Keyword-Heuristiken bleiben im Code."]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[s.jsx(lI,{className:"h-4 w-4 text-teal-400"}),s.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"chat"}),s.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(= auto)"})]}),PX.map(N=>s.jsx(k,{k:N},N))]}),s.jsxs("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2 border-b border-border/30 pb-2",children:[s.jsx(HM,{className:"h-4 w-4 text-indigo-400"}),s.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground",children:"coding"}),s.jsx("span",{className:"text-[9px] text-muted-foreground/60 font-mono",children:"(agentisch → immer Coder)"})]}),OX.map(N=>s.jsx(k,{k:N},N))]})]}),s.jsx("div",{className:"rounded-xl border border-border/40 bg-background/25 p-4",children:s.jsx("div",{className:"max-w-xs",children:s.jsx(k,{k:"fast_no_think"})})})]})}function MX(){var ge,ue,pe;const e=Hr(),{data:t}=Si(4e3),{data:r}=Gx(),{data:n}=Co(),{data:i}=fE(),{showAlert:o,dialogElement:c}=Nn(),[u,f]=x.useState(!1),[h,m]=x.useState(!1),p=(t==null?void 0:t.models)??[],v=(t==null?void 0:t.running)??[],b=(ge=r==null?void 0:r.groups)==null?void 0:ge.brains,S=(b==null?void 0:b.members)??[],w=se=>p.find(ae=>ae.name===se),k=se=>{var ae;return((ae=se.split("/").pop())==null?void 0:ae.replace(/\.gguf$/i,""))||se},N=S.map(w).filter(Boolean),E=1024**3,C=i==null?void 0:i.budget,A=N.reduce((se,ae)=>se+(ae.size_bytes||0),0)/E,_=((ue=n==null?void 0:n.gpu)==null?void 0:ue.gtt_total)||((pe=n==null?void 0:n.gpu)==null?void 0:pe.vram_total)||0,O=(C==null?void 0:C.gtt_gb)||(_?_/E:0),I=(C==null?void 0:C.warm_projected_gb)??A,B=O>0?Math.min(100,I/O*100):0,F=p.filter(se=>!S.includes(se.name)&&!se.incomplete);async function $(se){m(!0);try{await sE("brains",se,(b==null?void 0:b.swap)??!1,(b==null?void 0:b.persist)??!0),e.invalidateQueries({queryKey:$e.groups}),e.invalidateQueries({queryKey:$e.models}),e.invalidateQueries({queryKey:$e.hermesBrain})}catch(ae){o("Fehler",`Immer-bereit-Set konnte nicht geändert werden: ${(ae==null?void 0:ae.message)||ae}`)}finally{m(!1)}}function Q(se){const ae=w(se);if(ae&&dt(ae.role).protected){o("Geschützt",`„${dt(ae.role).label}" ist lebenswichtig und bleibt immer bereit.`);return}$(S.filter(Z=>Z!==se))}function U(se){f(!1),$([...S,se])}return b?s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-4",children:[s.jsx(EN,{}),s.jsxs("div",{className:"space-y-1.5",children:[N.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground",children:"Noch keine Modelle im Set."}),N.map(se=>{const ae=v.includes(se.name),Z=dt(se.role).protected;return s.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border/30 bg-background/20 p-2.5",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[s.jsx("span",{className:ee("h-2 w-2 shrink-0 rounded-full ring-2 ring-black/40",ae?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40"),title:ae?"Gerade warm (bereit)":"Reserviert — lädt bei Bedarf sofort"}),se.role&&s.jsx(mo,{role:se.role,dense:!0,className:"shrink-0"}),s.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",title:se.name,children:k(se.name)}),s.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:lr(se.size_bytes)})]}),Z?s.jsx("span",{className:"shrink-0 text-[10px] font-semibold text-muted-foreground",title:"Lebenswichtig — bleibt immer im Set.",children:"🔒"}):s.jsx("button",{onClick:()=>Q(se.name),disabled:h,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground transition-colors hover:bg-red-500/5 hover:text-red-400 cursor-pointer disabled:opacity-50",title:"Aus dem Immer-bereit-Set nehmen (lädt dann nur noch bei Bedarf)",children:s.jsx(Br,{className:"h-3.5 w-3.5"})})]},se.name)})]}),s.jsxs("button",{onClick:()=>f(!0),disabled:h||F.length===0,className:"flex h-8 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border/50 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground transition-colors hover:border-primary/40 hover:text-primary cursor-pointer disabled:opacity-50",children:[s.jsx(hf,{className:"h-3.5 w-3.5"})," Modell dauerhaft bereithalten"]}),s.jsxs("div",{className:"rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",title:"Modellgewichte + KV-Cache, berechnet aus den echten Architektur-Daten jedes Modells (Layer × KV-Köpfe × Kontext) und seiner KV-Quantisierung. So viel legt llama.cpp beim Laden wirklich für den eingestellten Kontext an — kein Aufschlag mehr.",children:[s.jsx(ga,{className:"h-3.5 w-3.5"})," Reserviert fürs Set"]}),s.jsxs("span",{className:"font-mono font-bold text-foreground",children:[I.toFixed(1),O>0?` / ${O.toFixed(0)}`:""," GB"]})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:s.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",B>=85?"bg-red-500":B>=65?"bg-amber-500":"bg-teal-500"),style:{width:`${B}%`}})}),C&&!C.fits&&s.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-[11px] text-amber-400",children:[s.jsx(vr,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),s.jsxs("span",{children:["Zusammen mit dem größten Gelegenheits-Modell (~",C.largest_ondemand_gb," GB) wird der Speicher knapp. Das Set bleibt dabei immer geladen — wird es wirklich eng, schlägt das Laden des großen Modells fehl (es wartet dann, statt das Set zu verdrängen)."]})]}),C&&C.fits&&s.jsxs("p",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-emerald-400",children:[s.jsx(Mt,{className:"h-3.5 w-3.5 shrink-0"})," Passt auch neben dem größten Gelegenheits-Modell — nichts wird verdrängt."]})]}),u&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-label":"Modell zum Immer-bereit-Set hinzufügen",children:s.jsxs("div",{className:"w-full max-w-md space-y-3 rounded-2xl border border-border/80 bg-card p-6 shadow-2xl animate-in fade-in zoom-in-95 duration-200",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 pb-2",children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-primary",children:"Dauerhaft bereithalten"}),s.jsx("button",{onClick:()=>f(!1),className:"rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer",children:s.jsx(Br,{className:"h-4 w-4"})})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Wähle ein Modell, das ohne Ladezeit bereitstehen soll:"}),s.jsx("div",{className:"max-h-60 space-y-1.5 overflow-y-auto pr-1",children:F.map(se=>s.jsxs("button",{onClick:()=>U(se.name),className:"flex w-full items-center justify-between gap-2 rounded-lg border border-border/30 bg-background/20 px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[se.role&&s.jsx(mo,{role:se.role,dense:!0,className:"shrink-0"}),s.jsx("span",{className:"truncate font-mono text-xs font-semibold text-foreground",children:k(se.name)})]}),s.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:lr(se.size_bytes)})]},se.name))})]})}),c]}):s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10",children:[s.jsx(EN,{}),s.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Es gibt noch kein Immer-bereit-Set. Es entsteht automatisch, sobald Lucys Hirn zugewiesen ist."}),c]})}function EN(){return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(wa,{className:"h-4.5 w-4.5 text-primary"}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-bold uppercase tracking-wide text-foreground",children:"Immer-bereit-Set"}),s.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Diese Modelle hält Lucy immer bereit — sie antworten ohne Ladezeit."})]})]})}function IX(){var Be,_e,wt,tr;const e=Hr(),{data:t,isLoading:r,error:n}=Si(4e3),{data:i}=wh(4e3),{data:o}=fE(),{data:c}=Co(),{data:u}=Gx(),{showAlert:f,showConfirm:h,showPrompt:m,dialogElement:p}=Nn(),v=Wx(),b=K=>!!dt(K).protected,S=(t==null?void 0:t.models)??[],w=(t==null?void 0:t.running)??[],k=n?String(n):"",N=()=>{e.invalidateQueries({queryKey:$e.models}),e.invalidateQueries({queryKey:$e.routing})},E=(Be=u==null?void 0:u.groups)==null?void 0:Be.brains,C=(E==null?void 0:E.members)??[],A=K=>C.includes(K),_=C.some(K=>w.includes(K));async function O(K){if(!E){f("Keine brains-Gruppe","Es existiert noch keine Ko-Residenz-Gruppe „brains“ in der Engine-Konfiguration. Lege sie erst über die Gruppen-Verwaltung an.");return}const Pe=C.includes(K)?C.filter(Ze=>Ze!==K):[...C,K];try{await sE("brains",Pe,E.swap??!1,E.persist??!0),e.invalidateQueries({queryKey:$e.groups}),N()}catch(Ze){f("Fehler",`Ko-Residenz konnte nicht geändert werden: ${Ze.message||Ze}`)}}const[I,B]=x.useState(null),[F,$]=x.useState(null),[Q,U]=x.useState(null),[ge,ue]=x.useState("grid"),[pe,se]=x.useState("all"),ae=S.filter(K=>pe==="in_use"?!!K.role||w.includes(K.name):!0);async function Z(K){try{await ye(`/api/models/${encodeURIComponent(K)}/load`,{method:"POST"}),N()}catch(Ce){f("Fehler",`Fehler beim Laden des Modells: ${Ce.message}`)}}async function re(K){if(E&&_&&!A(K)){const Ce=C.filter(Pe=>w.includes(Pe)).map(Pe=>Pe.split("/").pop()).join(", ");h("Verdrängt das Hirn?",`„${K.split("/").pop()}“ ist nicht in der Ko-Residenz-Gruppe „brains“. Beim Laden wirft es das aktuell warme Hirn (${Ce}) raus — Lucy verliert Hirn bzw. Augen. - -Trotzdem exklusiv laden? Tipp: Mit dem 🧠-Schalter machst du das Modell dauerhaft ko-resident, dann bleiben beide warm.`,()=>Z(K));return}Z(K)}async function ie(K){const Ce=S.find(Pe=>Pe.name===K);if(Ce&&b(Ce.role)){f("Geschützt",`„${dt(Ce.role).label}" ist lebenswichtig für Lucy und bleibt geladen. Zum Entladen erst im Experten-Modus die Rolle einem anderen Modell geben.`);return}try{await ye(`/api/models/${encodeURIComponent(K)}/unload`,{method:"POST"}),N()}catch(Pe){f("Fehler",`Fehler beim Entladen des Modells: ${Pe.message}`)}}async function D(){try{await ye("/api/models/unload",{method:"POST"}),N()}catch(K){f("Fehler",`Fehler beim Entladen aller Modelle: ${K.message}`)}}async function M(K,Ce){try{const Pe=await ye(`/api/models/${encodeURIComponent(Ce)}/role`,{method:"POST",body:JSON.stringify({role:K||null})});N(),Pe!=null&&Pe.warning&&f("Hirn gesetzt — Hinweis",Pe.warning)}catch(Pe){f("Fehler",`Fehler beim Zuweisen der Rolle: ${Pe.message||Pe}`)}}function q(K){B(K),$(null),ye(`/api/roles/${encodeURIComponent(K)}/recommend`).then(Ce=>$(Ce)).catch(()=>{})}async function le(K,Ce){let Pe=null;try{Pe=await ye(`/api/models/${encodeURIComponent(K)}/ctx/auto`)}catch{}const Ze=Pe?`Optimal für dein Setup: ${(Pe.ctx/1024).toFixed(0)}k (${Pe.ctx}) — GTT ${Pe.gtt_gb} GB − reserviert ${Pe.reserved_gb} GB (${Pe.mode}) → ${Pe.budget_gb} GB frei. »Auto« trägt diesen Wert ein.`:"Gib die gewünschte Kontextlänge in Tokens an:";m("Kontextlänge anpassen",Ze,String(Ce||32768),async et=>{if(et)try{await ye(`/api/models/${encodeURIComponent(K)}/ctx`,{method:"POST",body:JSON.stringify({ctx:parseInt(et,10)})}),N()}catch(dr){f("Fehler",`Fehler beim Setzen des Kontexts: ${dr.message||dr}`)}},void 0,Pe?{autoValue:String(Pe.ctx),autoLabel:`Auto (${(Pe.ctx/1024).toFixed(0)}k)`}:void 0)}async function oe(K){const Ce=S.find(Pe=>Pe.name===K);if(Ce&&b(Ce.role)){f("Geschützt",`„${dt(Ce.role).label}" ist lebenswichtig für Lucy und kann nicht gelöscht werden. Weise die Rolle zuerst einem anderen Modell zu.`);return}h("Modell löschen?",`Modell '${K}' und alle zugehörigen GGUF-Dateien unwiderruflich von der Box löschen?`,async()=>{try{await ye(`/api/models/${encodeURIComponent(K)}`,{method:"DELETE"}),N()}catch(Pe){f("Fehler",`Fehler beim Löschen: ${Pe.message||Pe}`)}})}async function te(K,Ce,Pe,Ze){try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:Ce,quant:Pe,jinja:Ze})}),f("Herunterladen gestartet",`Download für '${K}' gestartet! Der Fortschritt wird oben angezeigt.`)}catch(et){f("Fehler",`Fehler beim Starten des Upgrades: ${et.message||et}`)}}async function W(K){const Ce=o==null?void 0:o.budget,Pe=Ce&&!Ce.fits?` - -⚠ Speicher-Warnung: Dieses Brain (~${Ce.brain_gb} GB) bleibt immer resident (persistent). Zusammen mit dem größten on-demand-Modell (~${Ce.largest_ondemand_gb} GB) sprengt das das Budget (${Ce.gtt_gb} GB) → beim Laden von heavy/coder droht ein Überlauf. Erwäge ein kleineres Brain oder weniger Kontext.`:"";h("Agent-Hirn aktualisieren?",`Neues Hermes-Modell '${K.split("/").pop()}' herunterladen und als Agent-Hirn (Rolle hermes) setzen? Hermes nutzt danach automatisch das neue Modell.${Pe}`,async()=>{try{await ye("/api/models/install",{method:"POST",body:JSON.stringify({repo:K,role:"hermes",quant:"Q4_K_M",jinja:!0})}),f("Download gestartet","Das neue Agent-Hirn wird geladen. Fortschritt oben."),N()}catch(Ze){f("Fehler",`Update fehlgeschlagen: ${Ze.message||Ze}`)}})}if(r)return s.jsx("div",{className:"text-xs text-muted-foreground py-12 text-center",children:"Initialisiere HUD Cockpit…"});if(k)return s.jsxs("div",{className:"rounded-xl border border-red-500/20 bg-red-500/5 p-4 text-xs text-red-400",children:["Gateway oder Engine nicht erreichbar (",k,")."]});const ne=S.filter(K=>w.includes(K.name)),J=ne.reduce((K,Ce)=>K+(Ce.size_bytes||0),0),xe=((_e=c==null?void 0:c.gpu)==null?void 0:_e.gtt_total)||((wt=c==null?void 0:c.gpu)==null?void 0:wt.vram_total)||0,be=((tr=c==null?void 0:c.gpu)==null?void 0:tr.gtt_used)||0,fe=16*1024**3,qe=xe>2*1024**3?xe:J>fe?J*1.2:fe;return s.jsxs("div",{className:"space-y-8",children:[s.jsx("style",{children:` - @keyframes flow-dash { - to { - stroke-dashoffset: -20; - } - } - .svg-flow-path { - stroke-dasharray: 4 6; - animation: flow-dash 1s linear infinite; - } - `}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ga,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"VRAM / Memory Belegung"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["Speicher-Pool: ",lr(J)," Gewichte",be>0?` · ${lr(be)} real belegt (inkl. KV)`:""," / ",lr(qe)]}),v&&w.length>0&&s.jsx("button",{onClick:D,className:"h-6 px-2.5 rounded border border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/10 text-amber-400 text-[9px] font-bold uppercase transition-all cursor-pointer",children:"Alle entladen"})]})]}),s.jsx("div",{className:"h-7 w-full rounded-xl bg-background/50 border border-border/40 overflow-hidden flex p-0.5 relative group",children:ne.length===0?s.jsx("div",{className:"w-full h-full flex items-center justify-center text-[10px] text-muted-foreground/60 italic font-mono select-none",children:"VRAM Leer — Auto-Swap lädt Modelle bei Anfrage"}):ne.map((K,Ce)=>{var et;const Pe=(K.size_bytes||0)/qe*100,Ze=["from-teal-500 to-emerald-500","from-indigo-500 to-blue-500","from-purple-500 to-pink-500","from-cyan-500 to-sky-500"][Ce%4];return s.jsxs("div",{style:{width:`${Pe}%`},className:ee("h-full rounded bg-gradient-to-r flex items-center justify-between px-2.5 transition-all text-white/95 shrink-0 shadow-inner select-none",Ze),title:`${K.name} (${lr(K.size_bytes)})`,children:[s.jsxs("span",{className:"text-[9px] font-bold truncate max-w-[120px] font-space tracking-wide",children:[K.role?`[${dt(K.role).short}] `:"",(et=K.name.split("/").pop())==null?void 0:et.replace(".gguf","")]}),s.jsx("span",{className:"text-[8px] font-mono opacity-80",children:lr(K.size_bytes)})]},K.name)})})]}),s.jsx(MX,{}),v&&s.jsx(_X,{}),s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[s.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground px-1",children:v?"Gateway Steckplatz-Belegung (Slot-Zuweisung)":"Wer macht was bei Lucy — zum Ändern antippen"}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:NR.map(K=>{var Ze;const Ce=S.find(et=>et.role===K),Pe=Ce?w.includes(Ce.name):!1;return s.jsxs("div",{onClick:()=>q(K),className:ee("rounded-xl border p-3 flex flex-col justify-between gap-2.5 transition-all cursor-pointer select-none text-left bg-background/25 hover:border-primary/45 hover:bg-background/40 group min-h-[90px]",Pe?"border-emerald-500/40 shadow-sm shadow-emerald-500/5":Ce?"border-primary/20 bg-primary/5":"border-border/30 border-dashed opacity-75"),children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(mo,{role:K}),Pe&&s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"})]}),s.jsx("div",{className:"text-[10px] font-mono font-medium truncate text-foreground/90 pr-1 font-space",title:Ce==null?void 0:Ce.name,children:Ce?(Ze=Ce.name.split("/").pop())==null?void 0:Ze.replace(/\.gguf$/i,""):"nicht zugewiesen"}),s.jsx("div",{className:"text-[8px] text-primary/70 group-hover:text-primary font-bold uppercase tracking-wider transition-colors font-space",children:"Ändern ➔"})]},K)})})]}),(o==null?void 0:o.current)&&s.jsxs("div",{className:"rounded-2xl border border-indigo-500/30 bg-indigo-500/5 backdrop-blur-md p-5 shadow-lg shadow-black/10 space-y-3.5",children:[s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Hn,{className:"h-4.5 w-4.5 text-indigo-400"}),s.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-foreground",children:"Agent-Hirn (Hermes)"}),o.current.version!=null&&s.jsxs("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded bg-indigo-500/15 text-indigo-300 border border-indigo-500/25",children:["v",o.current.version]})]}),s.jsx("button",{onClick:()=>window.dispatchEvent(new CustomEvent("mc-navigate",{detail:{view:"agent"}})),className:"h-7 px-3 rounded-lg border border-indigo-500/30 bg-indigo-500/5 text-indigo-300 text-[9px] font-bold uppercase hover:bg-indigo-500/15 transition-all cursor-pointer",title:"Hirn-Wechsel passiert jetzt zentral im Hermes-Tab",children:"Im Hermes-Tab wechseln →"})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-background/30 border border-border/30 p-3.5",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-xs font-mono font-bold text-foreground truncate",title:o.current.name,children:o.current.name.split("/").pop()}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[s.jsx("span",{children:o.current.params_b?`${o.current.params_b}B`:"—"}),s.jsx("span",{children:"•"}),s.jsx("span",{children:o.current.quant||"GGUF"}),s.jsx("span",{children:"•"}),s.jsx("span",{children:lr(o.current.size_bytes||0)})]})]}),o.update_available&&o.recommended?s.jsxs("button",{onClick:()=>W(o.recommended.repo),className:ee("h-8 px-3 shrink-0 flex items-center justify-center gap-1.5 rounded-lg text-[10px] font-bold uppercase transition-all cursor-pointer shadow-md",o.budget&&!o.budget.fits?"bg-red-500 text-white hover:bg-red-400 shadow-red-500/10":"bg-amber-500 text-black hover:bg-amber-400 shadow-amber-500/10"),children:[s.jsx(Bs,{className:"h-3.5 w-3.5"})," Aktualisieren"]}):s.jsxs("span",{className:"h-8 px-3 shrink-0 flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 uppercase tracking-wide bg-emerald-500/5 border border-emerald-500/15 rounded-lg select-none",children:[s.jsx(Mt,{className:"h-4 w-4"})," Neueste Generation"]})]}),o.update_available&&o.recommended&&s.jsxs("div",{className:"text-[10px] text-amber-400/90 flex items-center gap-1.5",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping shrink-0"}),"Neuere Generation verfügbar: ",s.jsx("span",{className:"font-mono font-bold",children:o.recommended.name.replace(/-GGUF$/i,"")}),"(v",o.recommended.version,", ",o.recommended.params_b,"B) — von NousResearch."]}),o.budget&&s.jsxs("div",{className:ee("text-[10px] flex items-start gap-1.5 leading-relaxed",o.budget.fits?"text-muted-foreground/80":"text-red-400 font-semibold"),children:[s.jsx(ga,{className:"h-3 w-3 shrink-0 mt-0.5"}),s.jsxs("span",{children:["Always-On-Brain ~",o.budget.brain_gb," GB + größtes on-demand (~",o.budget.largest_ondemand_gb," GB) = ",(o.budget.brain_gb+o.budget.largest_ondemand_gb).toFixed(1)," / ",o.budget.gtt_gb," GB",o.budget.fits?" · passt gleichzeitig ✓":" · passt NICHT gleichzeitig ⚠ — heavy/coder würden das Brain verdrängen. Kleineres Brain oder weniger Kontext."]})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 px-1",children:[s.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:["Installierte Modell-Bibliothek (",ae.length," von ",S.length,")"]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[s.jsx("button",{onClick:()=>se("all"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="all"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Vorhanden"}),s.jsx("button",{onClick:()=>se("in_use"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",pe==="in_use"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"In Benutzung"})]}),s.jsxs("div",{className:"flex rounded-lg border border-border/40 bg-card/45 p-0.5",children:[s.jsx("button",{onClick:()=>ue("grid"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="grid"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Grid"}),s.jsx("button",{onClick:()=>ue("list"),className:ee("px-2.5 py-1 rounded-md text-[9px] font-bold uppercase transition-all cursor-pointer",ge==="list"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"List"})]})]})]}),ge==="grid"?s.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:ae.length===0?s.jsx("div",{className:"col-span-full text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:pe==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ae.map(K=>{const Ce=w.includes(K.name),Pe=i==null?void 0:i.model_list.find(et=>et.role===K.role),Ze=pf(K.name);return s.jsxs("div",{className:ee("rounded-2xl border bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/10 flex flex-col justify-between gap-4 transition-all duration-300 hover:border-primary/40 group relative overflow-hidden",Ce?"border-primary/45 shadow-primary/5":K.role?"border-primary/30 bg-primary/5 shadow-inner":"border-border/60"),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"flex items-start justify-between gap-3",children:s.jsxs("div",{className:"flex gap-2.5 min-w-0",children:[s.jsx("div",{className:ee("w-7 h-7 rounded-lg border flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Ze.color),title:Ze.name,children:Ze.initial}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h3",{className:"text-xs font-bold tracking-tight text-foreground line-clamp-2 break-all font-mono",title:K.name,children:K.name.split("/").pop()}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mt-1",children:[s.jsx("span",{className:"text-[9px] font-mono text-muted-foreground bg-background/40 px-1.5 py-0.5 rounded border border-border/30",children:K.quant||"GGUF"}),Ce&&s.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-semibold text-emerald-400 uppercase tracking-wider",children:[s.jsx(hh,{className:"h-3 w-3 animate-pulse"})," Warm"]}),K.role&&s.jsx(mo,{role:K.role,dense:!0}),b(K.role)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[9px] font-semibold text-muted-foreground",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&A(K.name)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[9px] font-mono text-fuchsia-300 font-bold uppercase",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm, verdrängt es nicht.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[9px] font-mono text-cyan-400 font-bold uppercase",title:"Prompt Caching aktiv",children:"PC"}),v&&(K.spec_active?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[9px] font-mono text-emerald-400 font-bold uppercase",title:`Speculative Decoding aktiv (Draft: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:`Draft gesetzt (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel. Über 'Spec' neu konfigurieren.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[9px] font-mono text-violet-400 font-bold uppercase",title:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[9px] font-mono text-amber-400 font-bold uppercase",title:"GGUF-Datei fehlt — Modell kann nicht geladen werden",children:"⚠ Datei fehlt"})]})]})]})}),s.jsx("div",{className:"border-t border-border/30 pt-3 flex flex-wrap gap-1",children:s.jsx(Pv,{caps:K.capabilities})})]}),s.jsxs("div",{className:"space-y-3 pt-1",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-2 text-[10px] font-mono text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[s.jsx(ga,{className:"h-3.5 w-3.5 text-primary/80"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Größe"}),s.jsx("div",{className:"text-foreground font-semibold",children:lr(K.size_bytes)})]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 p-2 bg-background/20 rounded-lg border border-border/20",children:[s.jsx(f5,{className:"h-3.5 w-3.5 text-primary/80"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[8px] uppercase tracking-wider font-semibold text-muted-foreground/60",children:"Kontext"}),s.jsx("div",{className:"text-foreground font-semibold",children:Cv(K.ctx)})]})]})]}),Pe&&s.jsxs("div",{className:"p-3 bg-amber-500/5 border border-amber-500/30 rounded-xl space-y-2 flex flex-col justify-between shrink-0",children:[s.jsxs("div",{className:"text-[9px] font-semibold text-amber-400 flex items-center gap-1",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-ping"}),s.jsxs("span",{children:["Upgrade verfügbar: ",Pe.repo.split("/").pop()]})]}),s.jsxs("button",{onClick:()=>te(Pe.repo,K.role,K.quant||"Q4_K_M",K.capabilities.tools!=="no"),className:"h-7 w-full flex items-center justify-center gap-1 rounded-lg bg-amber-500 text-black text-[10px] font-bold hover:bg-amber-400 transition-colors cursor-pointer",children:[s.jsx(Bs,{className:"h-3 w-3"})," Smart-Swap starten"]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/20 pt-3 mt-auto",children:[(()=>{const et=b(K.role),dr=Ce&&et,Mi=K.incomplete&&!Ce||dr;return s.jsx("button",{onClick:()=>Ce?ie(K.name):re(K.name),disabled:Mi,title:dr?`„${dt(K.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("flex-1 h-7 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center justify-center gap-1",Mi?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ce?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:dr?"🔒 geladen":Ce?"Entladen":"Laden"})})(),v&&s.jsx("button",{onClick:()=>le(K.name,K.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-colors cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),v&&E&&s.jsx("button",{onClick:()=>O(K.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",A(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:A(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&s.jsxs("button",{onClick:()=>U(K),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[s.jsx(wa,{className:"h-3 w-3"})," Spec"]}),s.jsx("button",{onClick:()=>oe(K.name),disabled:b(K.role),className:ee("h-7 w-7 rounded-lg border border-border/40 flex items-center justify-center transition-colors",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${dt(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:s.jsx(Us,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})}):s.jsx("div",{className:"space-y-2",children:ae.length===0?s.jsx("div",{className:"text-xs text-muted-foreground border border-dashed border-border/60 rounded-2xl p-12 text-center select-none",children:pe==="in_use"?"Keine Modelle in Benutzung (keine Zuweisung oder warm geladene Modelle).":'Keine Modelle konfiguriert. Verwende den Tab "Modelle finden" zum Herunterladen.'}):ae.map(K=>{const Ce=w.includes(K.name),Pe=pf(K.name);return s.jsxs("div",{className:ee("rounded-xl border bg-card/45 backdrop-blur-md p-3.5 shadow-lg shadow-black/5 flex flex-col sm:flex-row sm:items-center justify-between gap-3 hover:border-primary/40 transition-all",Ce?"border-primary/45":K.role?"border-primary/30 bg-primary/5":"border-border/60"),children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx("div",{className:ee("w-8 h-8 rounded-lg border border-border/40 flex items-center justify-center font-bold text-xs shrink-0 shadow-sm",Pe.color),title:Pe.name,children:Pe.initial}),s.jsxs("div",{className:"min-w-0 text-left",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-xs font-bold text-foreground truncate max-w-[250px] sm:max-w-[400px] break-all font-mono",title:K.name,children:K.name.split("/").pop()}),K.role&&s.jsx(mo,{role:K.role,dense:!0,className:"shrink-0"}),b(K.role)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-background/40 border border-border/40 text-[8px] font-semibold text-muted-foreground shrink-0",title:"Lebenswichtig für Lucy — geschützt vor Löschen/Entladen.",children:"🔒 geschützt"}),v&&A(K.name)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-fuchsia-500/10 border border-fuchsia-500/30 text-[8px] font-mono text-fuchsia-300 font-bold uppercase shrink-0",title:"Ko-resident in der brains-Gruppe — bleibt mit dem Hirn gemeinsam warm.",children:"🧠 Ko-resident"}),v&&K.prompt_cache&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-cyan-500/10 border border-cyan-500/20 text-[8px] font-mono text-cyan-400 font-bold uppercase shrink-0",title:"Prompt Caching aktiv",children:"PC"}),v&&(K.spec_active?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 border border-emerald-500/20 text-[8px] font-mono text-emerald-400 font-bold uppercase shrink-0",title:`Speculative Decoding aktiv (Draft: ${K.spec_draft_model})`,children:"SPEC"}):K.spec_draft_model?s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:`Draft gesetzt (${K.spec_draft_model}), aber INAKTIV — --spec-type fehlt oder Vocab inkompatibel.`,children:"SPEC?"}):null),v&&K.parallel_slots>1&&s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-violet-500/10 border border-violet-500/20 text-[8px] font-mono text-violet-400 font-bold uppercase shrink-0",title:`${K.parallel_slots} parallele Slots aktiv`,children:["SLOTS: ",K.parallel_slots]}),K.incomplete&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20 text-[8px] font-mono text-amber-400 font-bold uppercase shrink-0",title:"GGUF-Datei fehlt",children:"⚠ Datei fehlt"}),Ce&&s.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] font-semibold text-emerald-400 uppercase tracking-wider shrink-0",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," warm"]})]}),s.jsxs("div",{className:"text-[10px] text-muted-foreground/80 flex items-center gap-2 mt-0.5",children:[s.jsxs("span",{children:["Größe: ",lr(K.size_bytes)]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:["Kontext: ",Cv(K.ctx)]}),s.jsx("span",{children:"•"}),s.jsx("span",{className:"font-mono text-[9px]",children:K.quant||"GGUF"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-3 shrink-0 self-end sm:self-auto",children:[s.jsx("div",{className:"hidden lg:flex flex-wrap gap-1",children:s.jsx(Pv,{caps:K.capabilities})}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[(()=>{const Ze=b(K.role),et=Ce&&Ze,dr=K.incomplete&&!Ce||et;return s.jsx("button",{onClick:()=>Ce?ie(K.name):re(K.name),disabled:dr,title:et?`„${dt(K.role).label}" bleibt geladen (geschützt).`:void 0,className:ee("h-7 px-3 rounded-lg text-[9px] font-bold uppercase transition-all border flex items-center gap-1",dr?"border-border/30 bg-background/10 text-muted-foreground/50 cursor-not-allowed":Ce?"border-amber-500/30 bg-amber-500/5 hover:bg-amber-500/15 text-amber-400 cursor-pointer":"border-primary/30 bg-primary/5 hover:bg-primary/15 text-primary cursor-pointer"),children:et?"🔒 geladen":Ce?"Entladen":"Laden"})})(),v&&s.jsx("button",{onClick:()=>le(K.name,K.ctx),className:"h-7 px-2.5 rounded-lg border border-border/40 text-[9px] font-bold uppercase hover:bg-accent text-muted-foreground transition-all cursor-pointer",title:"Kontextlänge anpassen",children:"Ctx"}),v&&E&&s.jsx("button",{onClick:()=>O(K.name),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-colors cursor-pointer",A(K.name)?"border-fuchsia-500/40 bg-fuchsia-500/10 text-fuchsia-300 hover:bg-fuchsia-500/20":"border-border/40 text-muted-foreground hover:bg-accent"),title:A(K.name)?"Ko-resident (brains): bleibt mit dem Hirn gemeinsam warm. Klick = aus der Gruppe nehmen.":"Zur brains-Gruppe hinzufügen — lädt dann ko-resident neben dem Hirn, statt es zu verdrängen.",children:"🧠"}),v&&s.jsxs("button",{onClick:()=>U(K),className:ee("h-7 px-2.5 rounded-lg border text-[9px] font-bold uppercase transition-all cursor-pointer flex items-center gap-1",K.spec_active?"border-emerald-500/30 text-emerald-400 hover:bg-emerald-500/10":K.spec_draft_model?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-border/40 text-muted-foreground hover:bg-accent"),title:"Speculative Draft konfigurieren (Vocab-geprüft)",children:[s.jsx(wa,{className:"h-3 w-3"})," Spec"]}),s.jsx("button",{onClick:()=>oe(K.name),disabled:b(K.role),className:ee("h-7 w-7 rounded-lg flex items-center justify-center border border-border/40 transition-all",b(K.role)?"text-muted-foreground/40 cursor-not-allowed":"text-muted-foreground hover:text-red-400 hover:bg-red-500/5 cursor-pointer"),"aria-label":"Modell löschen",title:b(K.role)?`„${dt(K.role).label}" ist geschützt und kann nicht gelöscht werden.`:"Modell löschen",children:s.jsx(Us,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]},K.name)})})]}),I&&s.jsx(CX,{role:I,roleRec:F,models:S,onAssign:K=>{M(I,K),B(null)},onClose:()=>B(null)}),Q&&s.jsx(pE,{model:Q,onClose:()=>U(null),onChanged:N}),p]})}function ev({icon:e,title:t,sub:r,onClick:n}){return s.jsxs("button",{onClick:n,className:"w-full flex items-center gap-4 rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 text-left transition-all hover:border-primary/40 cursor-pointer",children:[s.jsx(e,{className:"h-6 w-6 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-sm text-foreground",children:t}),s.jsx("div",{className:"text-xs text-muted-foreground",children:r})]}),s.jsx(Kn,{className:"h-5 w-5 text-muted-foreground shrink-0"})]})}function TX(){const[e,t]=x.useState(null);return e?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("button",{onClick:()=>t(null),className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[s.jsx(e5,{className:"h-4 w-4"})," Maschinenraum"]}),e==="modelle"?s.jsx(IX,{}):s.jsx(xE,{})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-space font-bold tracking-tight bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text text-transparent",children:"Maschinenraum"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nur nötig, wenn du wirklich was ändern willst."})]}),s.jsx(oE,{})]}),s.jsx(ev,{icon:yi,title:"Modelle",sub:"Hirne, Coder, Immer-bereit-Set, Bibliothek",onClick:()=>t("modelle")}),s.jsx(ev,{icon:p5,title:"Wartung und Logs",sub:"Updates, Backup, Dienste, Logs, Zugangsdaten",onClick:()=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:"maintenance"}}))}),s.jsx(ev,{icon:Hn,title:"Hermes und Verdrahtung",sub:"Agent, Gehirn-Modell, PC-Verbindung",onClick:()=>t("hermes")})]})}const DX=[{id:"start",label:"Start",icon:hh},{id:"vibe",label:"Vibe-Coding",icon:Fs},{id:"konstitution",label:"Konstitution",icon:TM},{id:"maschinenraum",label:"Maschinenraum",icon:tu}];function RX(){const[e,t]=x.useState("start"),[r,n]=x.useState(!1),[i,o]=x.useState("maintenance"),{data:c}=Kx();x.useEffect(()=>{const f=h=>{var m;o(((m=h.detail)==null?void 0:m.tab)||"maintenance"),n(!0)};return window.addEventListener("open-system-drawer",f),()=>window.removeEventListener("open-system-drawer",f)},[]);const u=c&&c.engine_reachable&&(c.brain?c.brain.ready:!0);return s.jsxs("div",{className:"flex h-full relative",children:[s.jsx("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:s.jsx("div",{className:"absolute inset-0 opacity-30 animate-aurora bg-gradient-to-tr from-teal-500/15 via-indigo-500/10 to-purple-500/15 blur-[130px]"})}),s.jsx(yE,{open:r,onClose:()=>n(!1),defaultTab:i}),s.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md",children:[s.jsxs("div",{className:"flex items-center gap-2 px-5 py-4 border-b border-border/40",children:[s.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20"}),s.jsxs("div",{className:"leading-tight",children:[s.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),s.jsx("div",{className:"text-[10px] text-muted-foreground",children:"3 · Prototyp"})]})]}),s.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4",children:DX.map(f=>s.jsxs("button",{onClick:()=>t(f.id),className:ee("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-all cursor-pointer",e===f.id?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[s.jsx(f.icon,{className:"h-4.5 w-4.5 shrink-0"})," ",f.label]},f.id))}),s.jsxs("div",{className:"px-3 py-3 border-t border-border/40 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 text-xs text-muted-foreground",children:[s.jsx("span",{className:ee("h-2 w-2 rounded-full",u?"bg-emerald-500 animate-pulse":"bg-amber-500")}),u?"Box läuft":"prüfen"]}),s.jsxs("a",{href:"#dashboard",className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[s.jsx(e5,{className:"h-3.5 w-3.5"})," zurück zu MC2"]})]})]}),s.jsxs("main",{className:"flex-1 min-w-0 overflow-y-auto p-6 scrollbar-thin",children:[e==="start"&&s.jsx(EX,{}),e==="vibe"&&s.jsx(gE,{}),e==="konstitution"&&s.jsx(vE,{}),e==="maschinenraum"&&s.jsx(TX,{})]})]})}const LX={ok:"bg-emerald-500",warn:"bg-amber-500",alert:"bg-red-500",muted:"bg-muted-foreground/40",loading:"bg-muted-foreground/40 animate-pulse"},$X={ok:"hover:border-emerald-500/40",warn:"hover:border-amber-500/50",alert:"hover:border-red-500/50",muted:"hover:border-primary/40",loading:"hover:border-border/60"};function ps({icon:e,title:t,value:r,unit:n,tone:i="muted",hint:o,onClick:c}){return s.jsxs("button",{onClick:c,className:ee("group relative flex flex-col items-start rounded-2xl border border-border/60 bg-card/45 p-5 text-left shadow-lg shadow-black/15 backdrop-blur-md transition-all duration-200 cursor-pointer hover:bg-card/70 hover:shadow-xl",$X[i]),children:[s.jsxs("div",{className:"mb-4 flex w-full items-center justify-between",children:[s.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-xl border border-border/40 bg-background/30 text-foreground/80 transition-colors group-hover:text-primary",children:s.jsx(e,{className:"h-5 w-5"})}),s.jsx("span",{className:ee("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",LX[i]),title:o})]}),s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[s.jsx("span",{className:"text-2xl font-bold tracking-tight text-foreground font-space tabular-nums",children:r}),n&&s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n})]}),s.jsxs("div",{className:"mt-1 flex w-full items-center justify-between",children:[s.jsx("span",{className:"text-sm font-semibold text-foreground/90",children:t}),s.jsx(Kn,{className:"h-4 w-4 text-muted-foreground/40 transition-all group-hover:translate-x-0.5 group-hover:text-primary"})]}),o&&s.jsx("span",{className:"mt-0.5 text-[11px] text-muted-foreground",children:o})]})}function zX(){var c;const{data:e=[]}=cE(150,6e4),[t,r]=x.useState(!1),n=e.find(u=>u.source==="chef-gutachter");if(!n)return null;const i=new Date(n.ts*1e3).toLocaleString("de-DE",{weekday:"long",day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}),o=(c=n.text.split(` -`).find(u=>u.trim().startsWith("VERDIKT:")))==null?void 0:c.replace(/^\s*VERDIKT:\s*/,"");return s.jsxs("div",{className:"rounded-2xl border border-violet-500/25 bg-violet-500/[0.05] p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("button",{onClick:()=>r(u=>!u),className:"flex w-full items-center gap-3 text-left cursor-pointer",children:[s.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-violet-500/30 bg-background/30 text-violet-300",children:s.jsx(d5,{className:"h-4.5 w-4.5"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block text-sm font-bold text-foreground",children:"Morgenlage"}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o||n.subject||"Nächtliches Gutachten über die autonome Arbeit"})]}),s.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground/60",children:i}),t?s.jsx(tl,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):s.jsx(Kn,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]}),t&&s.jsxs("div",{className:"mt-3 border-t border-violet-500/15 pt-3",children:[n.subject&&s.jsx("p",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-violet-300/80",children:n.subject}),s.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-foreground/85",children:n.text})]})]})}const AN={"":"einmalig",daily:"täglich",weekdays:"werktags",weekly:"wöchentlich"};function FX(){const{data:e=[],isLoading:t}=pR(),r=Hr(),{showAlert:n,showConfirm:i,dialogElement:o}=Nn(),[c,u]=x.useState(!1),[f,h]=x.useState(""),[m,p]=x.useState(""),[v,b]=x.useState(""),[S,w]=x.useState(!1),k=()=>r.invalidateQueries({queryKey:$e.reminders});async function N(){if(!(!f.trim()||!m)){w(!0);try{await ye("/api/reminders",{method:"POST",body:JSON.stringify({text:f,when:m,repeat:v})}),h(""),p(""),b(""),u(!1),k()}catch(A){n("Anlegen fehlgeschlagen",String((A==null?void 0:A.message)||A))}finally{w(!1)}}}function E(A,_){i("Erinnerung löschen?",`„${_}" wird entfernt.`,async()=>{try{await ye(`/api/reminders/${A}`,{method:"DELETE"}),k()}catch(O){n("Fehler",String((O==null?void 0:O.message)||O))}})}const C=[...e].sort((A,_)=>A.next_ts-_.next_ts);return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md",children:[s.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[s.jsxs("span",{className:"flex items-center gap-2 text-sm font-bold text-foreground",children:[s.jsx("span",{className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border/40 bg-background/30 text-amber-300",children:s.jsx(JN,{className:"h-4 w-4"})}),"Anstehendes"]}),s.jsxs("button",{onClick:()=>u(A=>!A),className:"flex h-8 items-center gap-1 rounded-lg border border-border/60 bg-background/30 px-2.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all cursor-pointer",children:[c?s.jsx(Br,{className:"h-3.5 w-3.5"}):s.jsx(hf,{className:"h-3.5 w-3.5"})," ",c?"Abbrechen":"Neu"]})]}),c&&s.jsxs("div",{className:"mb-3 space-y-2 rounded-xl border border-border/50 bg-background/30 p-3",children:[s.jsx("input",{value:f,onChange:A=>h(A.target.value),placeholder:"Woran soll Lucy erinnern?","aria-label":"Erinnerungstext",className:"h-9 w-full rounded-lg border border-border/60 bg-card/45 px-3 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("input",{type:"datetime-local",value:m,onChange:A=>p(A.target.value),"aria-label":"Zeitpunkt",className:"h-9 rounded-lg border border-border/60 bg-card/45 px-2 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50 [color-scheme:dark]"}),s.jsx("select",{value:v,onChange:A=>b(A.target.value),"aria-label":"Wiederholung",className:"h-9 cursor-pointer rounded-lg border border-border/60 bg-card/45 px-2 text-xs font-semibold text-foreground outline-none",children:Object.entries(AN).map(([A,_])=>s.jsx("option",{value:A,className:"bg-popover",children:_},A))}),s.jsxs("button",{onClick:N,disabled:S||!f.trim()||!m,className:"ml-auto flex h-9 items-center gap-1.5 rounded-lg bg-primary px-3 text-xs font-semibold text-primary-foreground hover:opacity-90 transition-all cursor-pointer disabled:opacity-50",children:[S?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(hf,{className:"h-3.5 w-3.5"})," Anlegen"]})]})]}),t?s.jsx("p",{className:"text-xs text-muted-foreground",children:"Wird geladen …"}):C.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:"Keine Erinnerungen. Lucy sagt dir hier (und per Stimme) Bescheid, wenn etwas ansteht."}):s.jsxs("div",{className:"space-y-1.5",children:[C.slice(0,6).map(A=>{const _=A.next_ts*1e3E(A.id,A.text),"aria-label":"Erinnerung löschen",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-border/40 text-muted-foreground opacity-0 transition-all hover:bg-red-500/5 hover:text-red-400 group-hover:opacity-100 cursor-pointer",children:s.jsx(Us,{className:"h-3.5 w-3.5"})})]},A.id)}),C.length>6&&s.jsxs("p",{className:"text-[10px] text-muted-foreground/60",children:["+",C.length-6," weitere"]})]}),o]})}const Js=[{key:"stt_ms",label:"STT",color:"#f59e0b"},{key:"vision_ms",label:"Sehen",color:"#a78bfa"},{key:"hirn_ms",label:"Hirn",color:"#2dd4bf"},{key:"gen_ms",label:"Antwort",color:"#60a5fa"}],ro=e=>e==null?"–":`${(e/1e3).toLocaleString("de-DE",{minimumFractionDigits:1,maximumFractionDigits:1})} s`;function BX(e){const t=Math.max(0,Date.now()/1e3-e);return t<60?`vor ${Math.round(t)} s`:t<3600?`vor ${Math.round(t/60)} min`:`vor ${Math.round(t/3600)} h`}function Ax(e){return Js.reduce((t,r)=>t+(e[r.key]??0),0)}function UX(e){let t=null;for(const r of Js){const n=e[r.key];n!=null&&(t==null||n>t.ms)&&(t={label:r.label,color:r.color,ms:n})}return t}function WX({t:e,scale:t}){const r=Js.map(n=>`${n.label} ${ro(e[n.key])}`).join(" · ")+(e.mem0_ms!=null?` (davon Mem0 ${ro(e.mem0_ms)})`:"");return s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"w-14 shrink-0 text-right font-mono text-[10px] text-muted-foreground/60",children:BX(e.ts)}),s.jsxs("div",{className:"relative h-4 flex-1 overflow-hidden rounded-sm bg-muted/25",title:r,children:[s.jsx("div",{className:"absolute inset-0 flex",children:Js.map(n=>{const i=e[n.key];return!i||i<=0?null:s.jsx("div",{style:{width:`${i/t*100}%`,background:n.color},className:"h-full first:rounded-l-sm"},n.key)})}),e.error&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-rose-500/15 text-[10px] font-semibold text-rose-300",children:"Fehler"})]}),s.jsx("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] font-semibold tabular-nums text-foreground",children:e.error?"–":ro(Ax(e))})]})}function HX(){const{data:e}=gR(12),t=e??[],r=Math.max(1,...t.map(o=>Ax(o))),n=t[0],i=n?UX(n):null;return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 backdrop-blur-md p-5 shadow-lg shadow-black/15",children:[s.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(o5,{className:"h-4.5 w-4.5 text-primary"}),s.jsx("h2",{className:"text-sm font-semibold uppercase tracking-wide text-foreground",children:"Latenz je Turn"}),s.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground/70",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500 animate-pulse"})," live"]})]}),n?s.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[s.jsx("span",{className:`font-space text-3xl font-bold tracking-tight tabular-nums ${n.error?"text-rose-400":"text-foreground"}`,children:n.error?"Fehler":ro(Ax(n))}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["letzter Turn",!n.error&&i&&s.jsxs(s.Fragment,{children:[" · Täter: ",s.jsx("span",{style:{color:i.color},className:"font-semibold",children:i.label})," ",ro(i.ms)]})]})]}):s.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:"Noch kein Voice-Turn aufgezeichnet."}),n&&!n.error&&s.jsxs("div",{className:"mt-0.5 font-mono text-[11px] text-muted-foreground/70",children:[Js.filter(o=>n[o.key]!=null).map(o=>`${o.label} ${ro(n[o.key])}`).join(" · "),n.mem0_ms!=null&&s.jsxs("span",{className:"text-muted-foreground/50",children:[" · davon Mem0 ",ro(n.mem0_ms)]})]})]}),s.jsx("div",{className:"flex shrink-0 flex-col items-end gap-1 pt-1",children:Js.map(o=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:o.color}}),s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:o.label})]},o.key))})]}),t.length>0?s.jsx("div",{className:"space-y-1.5",children:t.map(o=>s.jsx(WX,{t:o,scale:r},o.id))}):s.jsx("div",{className:"flex h-[120px] items-center justify-center px-6 text-center text-xs text-muted-foreground",children:"Sprich einmal mit Lucy — dann erscheint hier der Zeit-Wasserfall pro Turn, damit man den einen Hänger sofort sieht."}),s.jsx("div",{className:"mt-3 border-t border-border/30 pt-2 text-[10px] leading-relaxed text-muted-foreground/70",children:'„Hirn" = Zeit bis zum ersten Wort (Agent + Mem0-Suche + Modell); Tool-Runden stecken in „Antwort". Reine Telegram-Turns laufen an MC2 vorbei und erscheinen hier nicht.'})]})}const dh=e=>window.dispatchEvent(new CustomEvent("open-system-drawer",{detail:{tab:e}}));function KX({onNavigate:e}){var ge,ue,pe,se;const{data:t}=Si(4e3),{data:r}=uE(4e3),{data:n}=wh(8e3),{data:i}=Ev(),{data:o}=Vx(),{data:c}=hE(),{data:u}=lE(2e4),f=kE(),{showAlert:h,dialogElement:m}=Nn(),p=Hr(),[v,b]=x.useState({});async function S(ae,Z){b(re=>({...re,[ae]:!0}));try{if(Z.kind==="loadModel")await ye(`/api/models/${encodeURIComponent(Z.model)}/load`,{method:"POST"});else{const re=await ye("/api/maintenance/restart",{method:"POST",body:JSON.stringify({service:Z.service})});re.ok||h("Reparatur nicht ganz geklappt",(re.err||"Unbekannter Fehler")+(Z.needsSudo?` - -Tipp: Dafür wird evtl. das Box-Passwort gebraucht (oben rechts hinterlegen).`:""))}p.invalidateQueries({queryKey:$e.health}),p.invalidateQueries({queryKey:$e.services}),p.invalidateQueries({queryKey:$e.models})}catch(re){h("Reparatur fehlgeschlagen",String((re==null?void 0:re.message)||re))}finally{b(re=>({...re,[ae]:!1}))}}const w=((ge=t==null?void 0:t.running)==null?void 0:ge.length)??0,k=(r==null?void 0:r.services.filter(ae=>ae.ok).length)??0,N=(r==null?void 0:r.services.length)??0,E=N-k,C=(i==null?void 0:i.length)??0,A=(n?(n.os>0?1:0)+(n.engine>0?1:0)+(n.swap>0?1:0)+(n.models>0?1:0):0)+(((ue=n==null?void 0:n.components)==null?void 0:ue.filter(ae=>ae.update===!0).length)??0),_=(c==null?void 0:c.gateway.ok)&&(c==null?void 0:c.memory.ok),O=u!=null&&u.available?u.open_count:0,I=(pe=t==null?void 0:t.models)==null?void 0:pe.find(ae=>ae.role==="hermes"),B=I!=null&&I.name?(se=I.name.split("/").pop())==null?void 0:se.replace(/\.gguf$/i,""):"",F=i?i.filter(ae=>["auto","agent","hermes"].includes(ae.source)).length:0,$=r==null?void 0:r.services.filter(ae=>!ae.ok).map(ae=>ae.name).join(", "),Q=n?[n.os>0&&"OS",n.engine>0&&"Engine",n.swap>0&&"Swap",n.models>0&&"Modelle"].filter(Boolean):[],U=Q.length>0?Q.join(" + "):"";return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Cockpit"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Deine Box auf einen Blick — Details hinter jeder Kachel."})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 items-start",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[s.jsx(GX,{verdict:f.verdict,memory:f.memory,warns:f.warns}),s.jsx(zX,{}),s.jsxs("section",{children:[s.jsx(ef,{children:"Leistung"}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsx(TO,{}),s.jsx(DO,{})]}),s.jsx("div",{className:"mt-4",children:s.jsx(HX,{})})]}),s.jsxs("section",{children:[s.jsx(ef,{children:"Bereiche"}),s.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-3",children:[s.jsx(ps,{icon:eu,title:"Auftragsbuch",value:u!=null&&u.available?O:"—",unit:O===1?"Vorschlag":"Vorschläge",tone:u?O>0?"warn":"ok":"loading",hint:O>0?`${O} offene Patches`:"Keine ausstehenden Vorschläge",onClick:()=>e("auftraege")}),s.jsx(ps,{icon:ff,title:"Modelle",value:w,unit:"warm",tone:w>0?"ok":"muted",hint:B?`Hirn: ${B}`:"Kein Hermes-Modell geladen",onClick:()=>e("models")}),s.jsx(ps,{icon:Sa,title:"Gedächtnis",value:i?C:"…",unit:"Notizen",tone:i?"ok":"loading",hint:i?`${C} Fakten (${F} auto gelernt)`:"Gedächtnis-Pool laden...",onClick:()=>e("memory")}),s.jsx(ps,{icon:ph,title:"Dienste",value:r?`${k}/${N}`:"…",unit:"laufen",tone:r?E>0?"warn":"ok":"loading",hint:$?`Ausfall: ${$}`:"Alle Dienste online",onClick:()=>dh("maintenance")}),s.jsx(ps,{icon:$x,title:"Updates",value:n?A>0?A:"0":"…",unit:A>0?"bereit":"aktuell",tone:n?A>0?"warn":"ok":"loading",hint:A>0?`Verfügbar: ${U}`:"Alles auf dem neuesten Stand",onClick:()=>dh("maintenance")}),s.jsx(ps,{icon:Pc,title:"Verbinden",value:"Zed",unit:_?"· bereit":"",tone:c?_?"ok":"warn":"loading",hint:o!=null&&o.pc_executor_reachable?"IDE & PC online (:7777)":"IDE-Kopplung (PC offline)",onClick:()=>e("connect")})]})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(VX,{problems:f.problems,pendingCount:A,openAuftraege:O,busy:v,onRepair:S,onNavigate:e}),s.jsxs("section",{children:[s.jsx(ef,{children:"Anstehendes"}),s.jsx(FX,{})]}),s.jsxs("section",{children:[s.jsx(ef,{children:"Werkzeuge & Diagnose"}),s.jsx(qX,{agent:o,svcErrors:E,onNavigate:e})]})]})]}),m]})}function ef({children:e}){return s.jsx("p",{className:"mb-2 ml-0.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:e})}function GX({verdict:e,memory:t,warns:r}){const n=r.length?`${r[0].label}: ${r[0].detail}${r.length>1?` (+${r.length-1} weitere)`:""}`:t.status==="full"?t.text:"Nichts Schlimmes — nur ein Hinweis.",i={loading:{ring:"border-border/60 bg-card/45",icon:Bt,iconCls:"text-muted-foreground animate-spin",title:"Box wird geprüft …",sub:"Einen Moment."},gut:{ring:"border-emerald-500/40 bg-emerald-500/5",icon:Rx,iconCls:"text-emerald-400",title:"Box gesund",sub:"Alle wichtigen Dienste laufen."},warn:{ring:"border-amber-500/40 bg-amber-500/5",icon:vr,iconCls:"text-amber-400",title:"Kleinigkeit an der Box",sub:n},problem:{ring:"border-red-500/50 bg-red-500/5",icon:vr,iconCls:"text-red-400",title:"Box braucht Hilfe",sub:"Ein wichtiger Dienst hakt."}}[e],o=i.icon,c={ok:"text-emerald-400",warn:"text-amber-400",full:"text-red-400",unknown:"text-muted-foreground"}[t.status],u={ok:"bg-emerald-500",warn:"bg-amber-500",full:"bg-red-500",unknown:"bg-muted-foreground/40"}[t.status];return s.jsxs("div",{className:ee("flex flex-col gap-4 rounded-2xl border p-5 shadow-lg shadow-black/15 backdrop-blur-md transition-colors sm:flex-row sm:items-center sm:justify-between h-full",i.ring),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-border/40 bg-background/30",children:s.jsx(o,{className:ee("h-6 w-6",i.iconCls)})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h2",{className:"text-base font-bold tracking-tight text-foreground",children:i.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:i.sub})]})]}),s.jsxs("div",{className:"w-full max-w-[16rem] rounded-xl border border-border/30 bg-background/20 p-3",children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[11px]",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-semibold uppercase tracking-wider text-muted-foreground",children:[s.jsx(ga,{className:"h-3.5 w-3.5"})," Speicher"]}),s.jsx("span",{className:ee("font-mono font-bold",c),children:t.status==="unknown"?"—":`${t.usedGb.toFixed(0)} / ${t.totalGb.toFixed(0)} GB`})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full border border-border/30 bg-background/50",children:s.jsx("div",{className:ee("h-full rounded-full transition-all duration-500",u),style:{width:`${t.pct}%`}})})]})]})}function VX({problems:e,pendingCount:t,openAuftraege:r,busy:n,onRepair:i,onNavigate:o}){const c=t>0,u=r>0,f=e.length===0&&!c&&!u;return s.jsx("div",{className:"h-full flex flex-col justify-between",children:f?s.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-4 h-full",children:[s.jsx(Mt,{className:"h-5 w-5 shrink-0 text-emerald-400"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu tun"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Alles läuft. Du musst gerade nichts abnicken."})]})]}):s.jsxs("div",{className:"space-y-2 h-full flex flex-col justify-center",children:[e.map(h=>s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-2xl border border-red-500/25 bg-red-500/5 p-4",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-3 w-full",children:[s.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-red-500/30 bg-background/30 text-red-300",children:s.jsx(h.icon,{className:"h-4.5 w-4.5"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-sm font-bold text-foreground",children:h.label}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:h.detail})]})]}),h.repair&&s.jsxs("button",{onClick:()=>h.repair&&i(h.id,h.repair),disabled:!!n[h.id],className:"flex h-9 shrink-0 items-center gap-1.5 rounded-lg border border-red-500/40 bg-red-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300 transition-all hover:bg-red-500/20 cursor-pointer disabled:opacity-60 w-full sm:w-auto justify-center",children:[n[h.id]?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(tu,{className:"h-3.5 w-3.5"}),h.repair.label]})]},h.id)),u&&s.jsxs("button",{onClick:()=>o("auftraege"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-primary/30 bg-primary/5 p-4 text-left transition-all hover:bg-primary/10 cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-primary/30 bg-background/30 text-primary",children:s.jsx(eu,{className:"h-4.5 w-4.5"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-bold text-foreground",children:[r," Vorschl",r===1?"ag":"äge"," im Auftragsbuch"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Annehmen oder ablehnen."})]})]}),s.jsx(Kn,{className:"h-4 w-4 shrink-0 text-primary/70"})]}),c&&s.jsxs("button",{onClick:()=>dh("maintenance"),className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-left transition-all hover:bg-amber-500/10 cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-amber-500/30 bg-background/30 text-amber-300",children:s.jsx($x,{className:"h-4.5 w-4.5"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t," Update",t===1?"":"s"," bereit"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Ansehen und entscheiden."})]})]}),s.jsx(Kn,{className:"h-4 w-4 shrink-0 text-amber-300/70"})]})]})})}function qX({agent:e,svcErrors:t,onNavigate:r}){const n=[{label:"Hermes Agent",status:e?e.gateway_reachable?"Bereit":"Offline":"…",tone:e?e.gateway_reachable?"ok":"alert":"loading",action:()=>r("agent")},{label:"Direkte Box-Shell (SSH)",status:e?e.box_console_reachable?"Bereit":"Offline":"…",tone:e?e.box_console_reachable?"ok":"warn":"loading",action:()=>r("konsole")},{label:"Systemlogs & Diagnose",status:t>0?`${t} Fehler`:"Keine Fehler",tone:t>0?"alert":"ok",action:()=>dh("logs")},{label:"Interaktives Terminal",status:"Öffnen",tone:"muted",action:()=>r("terminal")},{label:"Wissens-Vault",status:"Öffnen",tone:"muted",action:()=>r("wissen")},{label:"Chronik & Zeitmaschine",status:"Öffnen",tone:"muted",action:()=>r("chronik")}];return s.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/30 p-4 space-y-3 shadow-sm",children:s.jsx("div",{className:"divide-y divide-border/20",children:n.map((i,o)=>{const c={loading:"bg-muted-foreground/45 animate-pulse",ok:"bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)]",warn:"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.4)]",alert:"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.4)]",muted:"bg-muted-foreground/30"}[i.tone];return s.jsxs("button",{onClick:i.action,className:"w-full py-2.5 px-1.5 flex items-center justify-between text-left hover:bg-card/45 rounded-lg transition-all group cursor-pointer text-xs",children:[s.jsx("span",{className:"text-muted-foreground group-hover:text-foreground transition-colors font-medium",children:i.label}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:ee("text-[10px] font-semibold font-mono",i.tone==="ok"?"text-emerald-400":i.tone==="warn"?"text-amber-400":i.tone==="alert"?"text-red-400":"text-muted-foreground/60"),children:i.status}),s.jsx("span",{className:ee("h-1.5 w-1.5 rounded-full",c)})]})]},o)})})})}const QX={wartung:"Werkstatt",orchestrator:"Orchestrator",doku:"Doku",feature:"Feature"},YX={laeuft:{label:"wird eingespielt …",cls:"text-sky-300 border-sky-500/40 bg-sky-500/10",spin:!0},rollback:{label:"Rollback läuft …",cls:"text-amber-300 border-amber-500/40 bg-amber-500/10",spin:!0},eingespielt:{label:"eingespielt ✓",cls:"text-emerald-300 border-emerald-500/40 bg-emerald-500/10"},fehlgeschlagen:{label:"fehlgeschlagen",cls:"text-red-300 border-red-500/40 bg-red-500/10"},zurueckgerollt:{label:"zurückgerollt",cls:"text-amber-300 border-amber-500/40 bg-amber-500/10"},kritisch:{label:"KRITISCH — Box prüfen",cls:"text-red-200 border-red-500/60 bg-red-500/20"},abgelehnt:{label:"abgelehnt",cls:"text-muted-foreground border-border/60 bg-background/30"}};function RO(e){return e?new Date(e*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}function ZX(){const{data:e,isLoading:t,refetch:r,isFetching:n}=lE(),i=Hr(),{showAlert:o,showConfirm:c,dialogElement:u}=Nn(),[f,h]=x.useState({}),m=()=>i.invalidateQueries({queryKey:$e.auftragsbuch});async function p(w,k,N,E){h(C=>({...C,[w]:!0}));try{await ye(k,{method:"POST",body:JSON.stringify(N)}),E&&o("Erledigt",E),m()}catch(C){o("Das hat nicht geklappt",String((C==null?void 0:C.message)||C))}finally{h(C=>({...C,[w]:!1}))}}const v=(e==null?void 0:e.items)??[],b=(e==null?void 0:e.skill_kandidaten)??[],S=v.length===0&&b.length===0;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Auftragsbuch"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Was die Box gebaut oder sich ausgedacht hat — du entscheidest. Annehmen spielt es mit Fangnetz ein (Health-Check, automatischer Rollback)."})]}),s.jsxs("button",{onClick:()=>r(),className:"flex h-9 items-center gap-1.5 rounded-lg border border-border/60 bg-card/45 px-3 text-xs font-semibold text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all cursor-pointer",children:[s.jsx(ho,{className:ee("h-3.5 w-3.5",n&&"animate-spin")})," Aktualisieren"]})]}),e&&!e.available&&s.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Das Auftragsbuch lebt auf der Box (liest die Gitea-Branches dort). Im lokalen Dev-Modus ist hier nichts zu sehen."}),t&&s.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[s.jsx(Bt,{className:"h-4 w-4 animate-spin"})," Vorschläge werden geladen …"]}),(e==null?void 0:e.available)&&S&&s.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-emerald-500/25 bg-emerald-500/5 p-5",children:[s.jsx(Mt,{className:"h-5 w-5 shrink-0 text-emerald-400"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Nichts zu entscheiden"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Keine offenen Vorschläge. Werkstatt, Orchestrator und Traum melden sich hier, sobald es etwas gibt."})]})]}),v.length>0&&s.jsxs("section",{className:"space-y-3",children:[s.jsxs(CN,{icon:YM,children:["Fertige Patches (",v.length,")"]}),v.map(w=>s.jsx(JX,{item:w,busy:f,onAct:p,showConfirm:c},w.branch))]}),b.length>0&&s.jsxs("section",{className:"space-y-3",children:[s.jsxs(CN,{icon:va,children:["Skill-Kandidaten aus dem Traum (",b.length,")"]}),b.map(w=>s.jsx(eJ,{k:w,busy:f,onAct:p,showConfirm:c},w.file))]}),u]})}function CN({icon:e,children:t}){return s.jsxs("p",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(e,{className:"h-3.5 w-3.5"})," ",t]})}function XX({item:e}){const t=e.status;if(!t)return null;const r=YX[t.state];return r?s.jsxs("span",{className:ee("flex items-center gap-1.5 rounded-lg border px-2 py-0.5 text-[10px] font-bold",r.cls),title:t.detail,children:[r.spin&&s.jsx(Bt,{className:"h-3 w-3 animate-spin"}),r.label]}):null}function JX({item:e,busy:t,onAct:r,showConfirm:n}){var b,S,w;const[i,o]=x.useState(!1),[c,u]=x.useState(null),[f,h]=x.useState(!1),m=((b=e.status)==null?void 0:b.state)==="laeuft"||((S=e.status)==null?void 0:S.state)==="rollback",p=((w=e.status)==null?void 0:w.state)==="eingespielt";async function v(){const k=!i;if(o(k),k&&c===null){h(!0);try{const N=await ye(`/api/auftragsbuch/diff?branch=${encodeURIComponent(e.branch)}`);u(N.diff+(N.truncated?` -… (gekürzt)`:""))}catch(N){u(`(Diff nicht ladbar: ${(N==null?void 0:N.message)||N})`)}finally{h(!1)}}}return s.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/45 p-4 shadow-lg shadow-black/15 backdrop-blur-md space-y-3",children:[s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:"rounded-md border border-primary/30 bg-primary/10 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-primary",children:QX[e.kind]??e.kind}),s.jsx("span",{className:"font-mono text-[11px] text-muted-foreground truncate",title:e.branch,children:e.branch}),s.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground/70",children:[s.jsx(mh,{className:"h-3 w-3"}),RO(e.ts)]}),s.jsx(XX,{item:e})]}),s.jsx("p",{className:"mt-1.5 text-sm font-semibold text-foreground",children:e.subject||"(ohne Titel)"}),e.body&&s.jsx("p",{className:"mt-1 whitespace-pre-wrap text-xs leading-relaxed text-muted-foreground line-clamp-6",children:e.body})]}),!m&&!p&&s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s.jsxs("button",{disabled:!!t[e.branch],onClick:()=>n("Vorschlag annehmen?",`'${e.branch}' wird auf main gemergt und live eingespielt. Die Zentrale startet dabei kurz neu. Geht der Health-Check danach rot, rollt die Box automatisch zurück.${e.frontend_ohne_build?` - -Achtung: Enthält Frontend-Quelltext ohne gebautes Bundle — die Oberfläche bleibt alt, bis am PC gebaut wird.`:""}`,()=>r(e.branch,"/api/auftragsbuch/annehmen",{branch:e.branch})),className:"flex h-9 items-center gap-1.5 rounded-lg border border-emerald-500/40 bg-emerald-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-emerald-300 transition-all hover:bg-emerald-500/20 cursor-pointer disabled:opacity-50",children:[t[e.branch]?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(Mt,{className:"h-3.5 w-3.5"})," Annehmen"]}),s.jsxs("button",{disabled:!!t["ab:"+e.branch],onClick:()=>n("Vorschlag ablehnen?",`Der Branch '${e.branch}' wird auf Gitea gelöscht. Die Arbeit bleibt in der Historie, aber die Karte verschwindet.`,()=>r("ab:"+e.branch,"/api/auftragsbuch/ablehnen",{branch:e.branch})),className:"flex h-9 items-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300/90 transition-all hover:bg-red-500/15 cursor-pointer disabled:opacity-50",children:[t["ab:"+e.branch]?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(Br,{className:"h-3.5 w-3.5"})," Ablehnen"]})]})]}),e.status&&(m||!p)&&e.status.detail&&s.jsx("p",{className:"text-[11px] text-muted-foreground",children:e.status.detail}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-muted-foreground",children:[s.jsxs("span",{className:"rounded bg-background/40 px-1.5 py-0.5 font-mono",children:[e.ahead," Commit",e.ahead===1?"":"s"]}),e.shortstat&&s.jsx("span",{className:"rounded bg-background/40 px-1.5 py-0.5 font-mono",children:e.shortstat.trim()}),e.behind>0&&s.jsxs("span",{className:"flex items-center gap-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-amber-300",title:"main ist seit diesem Vorschlag weitergelaufen",children:[s.jsx(vr,{className:"h-3 w-3"})," ",e.behind," hinter main"]}),e.frontend_ohne_build&&s.jsxs("span",{className:"flex items-center gap-1 rounded bg-amber-500/10 px-1.5 py-0.5 text-amber-300",title:"Die Box kann kein Frontend bauen (kein Node) — nach dem Annehmen bleibt die Oberfläche alt, bis am PC gebaut wird.",children:[s.jsx(vr,{className:"h-3 w-3"})," Frontend ohne Build"]})]}),s.jsxs("div",{children:[s.jsxs("button",{onClick:v,className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[i?s.jsx(tl,{className:"h-3.5 w-3.5"}):s.jsx(Kn,{className:"h-3.5 w-3.5"}),s.jsx(qM,{className:"h-3.5 w-3.5"})," ",e.files.length," Datei",e.files.length===1?"":"en"," — Änderungen ansehen"]}),i&&s.jsxs("div",{className:"mt-2 space-y-2",children:[s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.files.map(k=>s.jsxs("span",{className:"rounded bg-background/40 px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:[s.jsx("b",{className:ee(k.status.startsWith("A")&&"text-emerald-400",k.status.startsWith("D")&&"text-red-400",k.status.startsWith("M")&&"text-sky-400"),children:k.status})," ",k.path]},k.path)),e.files_truncated&&s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"…"})]}),s.jsx("div",{className:"max-h-96 overflow-auto rounded-xl border border-border/50 bg-background/50 p-3",children:f?s.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Diff wird geladen …"}):s.jsx("pre",{className:"text-[10px] leading-relaxed text-foreground/80 whitespace-pre",children:(c??"").split(` -`).map((k,N)=>s.jsx("span",{className:ee("block",k.startsWith("+")&&!k.startsWith("+++")&&"text-emerald-300/90 bg-emerald-500/5",k.startsWith("-")&&!k.startsWith("---")&&"text-red-300/90 bg-red-500/5",(k.startsWith("@@")||k.startsWith("diff "))&&"text-sky-300/90"),children:k||" "},N))})})]})]})]})}function eJ({k:e,busy:t,onAct:r,showConfirm:n}){const[i,o]=x.useState(!1);return s.jsxs("div",{className:"rounded-2xl border border-violet-500/25 bg-violet-500/[0.04] p-4 shadow-lg shadow-black/15 backdrop-blur-md space-y-3",children:[s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:"rounded-md border border-violet-500/30 bg-violet-500/10 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-violet-300",children:"Traum-Idee"}),s.jsx("span",{className:"font-mono text-[11px] text-muted-foreground truncate",children:e.file}),s.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-muted-foreground/70",children:[s.jsx(mh,{className:"h-3 w-3"}),RO(e.mtime)]})]}),s.jsx("p",{className:"mt-1.5 text-sm font-semibold text-foreground",children:e.title})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s.jsxs("button",{disabled:!!t["sk:"+e.file],onClick:()=>n("Werkstatt beauftragen?",`Der Kandidat '${e.title}' geht als Auftrag an die Werkstatt (Orchestrator, propose-only). Das Ergebnis erscheint später als neuer Patch-Vorschlag hier im Auftragsbuch — nichts geht ungefragt live.`,()=>r("sk:"+e.file,"/api/auftragsbuch/skill/annehmen",{file:e.file},"Die Werkstatt arbeitet. Das Ergebnis taucht als neuer Vorschlag im Auftragsbuch auf (das kann einige Minuten dauern).")),className:"flex h-9 items-center gap-1.5 rounded-lg border border-violet-500/40 bg-violet-500/10 px-3 text-[11px] font-bold uppercase tracking-wide text-violet-300 transition-all hover:bg-violet-500/20 cursor-pointer disabled:opacity-50",children:[t["sk:"+e.file]?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(JM,{className:"h-3.5 w-3.5"})," Beauftragen"]}),s.jsxs("button",{disabled:!!t["skab:"+e.file],onClick:()=>n("Kandidat verwerfen?",`'${e.title}' wandert ins Archiv des Wissens-Vaults (verworfen/). Der Traum schlägt ihn nicht erneut vor.`,()=>r("skab:"+e.file,"/api/auftragsbuch/skill/ablehnen",{file:e.file})),className:"flex h-9 items-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/5 px-3 text-[11px] font-bold uppercase tracking-wide text-red-300/90 transition-all hover:bg-red-500/15 cursor-pointer disabled:opacity-50",children:[t["skab:"+e.file]?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(Br,{className:"h-3.5 w-3.5"})," Verwerfen"]})]})]}),s.jsxs("button",{onClick:()=>o(c=>!c),className:"flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[i?s.jsx(tl,{className:"h-3.5 w-3.5"}):s.jsx(Kn,{className:"h-3.5 w-3.5"}),s.jsx(eu,{className:"h-3.5 w-3.5"})," Vorschlag lesen"]}),i&&s.jsx("pre",{className:"max-h-72 overflow-auto rounded-xl border border-border/50 bg-background/50 p-3 text-[11px] leading-relaxed text-foreground/85 whitespace-pre-wrap",children:e.preview})]})}const tJ={sentry:{icon:Rx,label:"Health-Wächter",cls:"text-red-300 bg-red-500/10 border-red-500/25"},alarm:{icon:$x,label:"Alarm",cls:"text-red-200 bg-red-500/15 border-red-500/40"},notify:{icon:IM,label:"Meldung",cls:"text-sky-300 bg-sky-500/10 border-sky-500/25"},"chef-gutachter":{icon:d5,label:"Morgenlage",cls:"text-violet-300 bg-violet-500/10 border-violet-500/25"},radar:{icon:mI,label:"Radar",cls:"text-teal-300 bg-teal-500/10 border-teal-500/25"},auftragsbuch:{icon:eu,label:"Auftragsbuch",cls:"text-primary bg-primary/10 border-primary/25"},zeitmaschine:{icon:Lx,label:"Zeitmaschine",cls:"text-amber-300 bg-amber-500/10 border-amber-500/25"},reminder:{icon:JN,label:"Erinnerung",cls:"text-amber-300 bg-amber-500/10 border-amber-500/25"},traum:{icon:va,label:"Traum",cls:"text-violet-300 bg-violet-500/10 border-violet-500/25"}},rJ={icon:sI,label:"Box",cls:"text-muted-foreground bg-background/40 border-border/50"};function nJ(e){return new Date(e*1e3).toLocaleDateString("de-DE",{weekday:"long",day:"2-digit",month:"long"})}function iJ(){const{data:e=[],isLoading:t}=cE(),[r,n]=x.useState(!0),i=x.useMemo(()=>{const o=[];for(const c of e){const u=nJ(c.ts),f=o[o.length-1];f&&f.day===u?f.items.push(c):o.push({day:u,items:[c]})}return o},[e]);return s.jsxs("div",{className:"space-y-7",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Chronik"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Was deine Box von allein getan und gemeldet hat — und die Zeitmaschine, falls du zu einem früheren Stand zurück willst."})]}),s.jsx(aJ,{}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("p",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(s5,{className:"h-3.5 w-3.5"})," Verlauf"]}),t&&s.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[s.jsx(Bt,{className:"h-4 w-4 animate-spin"})," Chronik wird geladen …"]}),!t&&e.length===0&&s.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 text-center text-xs text-muted-foreground",children:"Noch keine Einträge. Sobald die Box etwas von allein tut oder meldet (Updates, Wächter, Träume), steht es hier."}),i.map(({day:o,items:c})=>s.jsxs("div",{children:[s.jsx("p",{className:"mb-2 text-xs font-bold text-foreground/70",children:o}),s.jsxs("div",{className:"space-y-2 border-l-2 border-border/40 pl-4",children:[(r?c.slice(0,8):c).map(u=>{const f=tJ[u.source]??rJ,h=f.icon;return s.jsxs("div",{className:"relative rounded-xl border border-border/50 bg-card/40 p-3 backdrop-blur-sm",children:[s.jsx("span",{className:"absolute -left-[23px] top-4 h-2.5 w-2.5 rounded-full bg-border ring-4 ring-background/60"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs("span",{className:ee("flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-[10px] font-bold",f.cls),children:[s.jsx(h,{className:"h-3 w-3"})," ",f.label]}),u.subject&&s.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground",children:u.subject}),s.jsx("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground/60",children:new Date(u.ts*1e3).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})})]}),s.jsx("p",{className:"mt-1.5 whitespace-pre-wrap text-xs leading-relaxed text-foreground/85",children:u.text})]},u.id)}),r&&c.length>8&&s.jsxs("button",{onClick:()=>n(!1),className:"text-[11px] text-muted-foreground underline hover:text-foreground",children:[c.length-8," weitere anzeigen"]})]})]},o))]})]})}function aJ(){const{data:e}=mR(),t=Hr(),{showAlert:r,showConfirm:n,dialogElement:i}=Nn(),[o,c]=x.useState(null),[u,f]=x.useState(!1),[h,m]=x.useState(!1),p=(e==null?void 0:e.backups)??[],v=h?p:p.slice(0,4);function b(k){const N=k.snapshot.match(/^(\d{4})-?(\d{2})-?(\d{2})[T_-](\d{2})[-:]?(\d{2})/);return N?`${N[3]}.${N[2]}.${N[1]}, ${N[4]}:${N[5]} Uhr`:k.snapshot}async function S(k){c(k.file);try{await ye("/api/zeitmaschine/restore",{method:"POST",body:JSON.stringify({file:k.file})}),r("Zeitmaschine läuft","Die Wiederherstellung wurde gestartet. Die Dienste starten gleich neu — die Zentrale ist kurz weg und meldet sich von selbst zurück. Vorher wurde automatisch ein Sicherheits-Backup des jetzigen Zustands gemacht.")}catch(N){r("Start fehlgeschlagen",String((N==null?void 0:N.message)||N))}finally{c(null)}}async function w(){f(!0);try{const k=await ye("/api/system/backup",{method:"POST"});k.ok?r("Gesichert",`Snapshot ${k.snapshot} wurde angelegt.`):r("Backup fehlgeschlagen",k.error||"Unbekannter Fehler"),t.invalidateQueries({queryKey:$e.zeitmaschine})}catch(k){r("Backup fehlgeschlagen",String((k==null?void 0:k.message)||k))}finally{f(!1)}}return s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("p",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(Tw,{className:"h-3.5 w-3.5"})," Zeitmaschine — gesicherte Stände"]}),s.jsxs("button",{onClick:w,disabled:u||!(e!=null&&e.available),className:"flex h-8 items-center gap-1.5 rounded-lg border border-border/60 bg-card/45 px-2.5 text-[11px] font-semibold text-muted-foreground hover:text-foreground hover:border-primary/40 transition-all cursor-pointer disabled:opacity-50",children:[u?s.jsx(Bt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(Tw,{className:"h-3.5 w-3.5"})," Jetzt sichern"]})]}),e&&!e.available&&s.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Die Snapshots liegen auf der Box — im lokalen Dev-Modus nicht verfügbar."}),(e==null?void 0:e.available)&&p.length===0&&s.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-5 text-center text-xs text-muted-foreground",children:'Noch keine Snapshots. Das nächtliche Backup (03:30) legt sie automatisch an — oder „Jetzt sichern".'}),v.length>0&&s.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:v.map((k,N)=>s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-border/50 bg-card/40 p-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("p",{className:"text-xs font-semibold text-foreground",children:[b(k)," ",N===0&&s.jsx("span",{className:"ml-1 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[9px] font-bold text-emerald-300",children:"neuester"})]}),s.jsxs("p",{className:"font-mono text-[10px] text-muted-foreground/70 truncate",title:k.file,children:[k.size_mb.toLocaleString("de-DE")," MB · ",k.file]})]}),s.jsxs("button",{disabled:o!==null,onClick:()=>n("Wirklich zu diesem Stand zurück?",`Die Box wird auf den Snapshot vom ${b(k)} zurückgesetzt (Gedächtnis, Hermes-Config, Modell-Router). Der JETZIGE Zustand wird vorher automatisch gesichert — der Schritt ist also umkehrbar. Die Dienste starten neu, die Zentrale ist kurz weg.`,()=>S(k)),className:"flex h-8 shrink-0 items-center gap-1.5 rounded-lg border border-amber-500/40 bg-amber-500/10 px-2.5 text-[10px] font-bold uppercase tracking-wide text-amber-300 transition-all hover:bg-amber-500/20 cursor-pointer disabled:opacity-50",children:[o===k.file?s.jsx(Bt,{className:"h-3 w-3 animate-spin"}):s.jsx(Lx,{className:"h-3 w-3"})," Zurück"]})]},k.file))}),p.length>4&&!h&&s.jsxs("button",{onClick:()=>m(!0),className:"text-[11px] text-muted-foreground underline hover:text-foreground",children:["Alle ",p.length," Snapshots anzeigen"]}),i]})}const oJ={"":"Allgemein",traeume:"Träume",muster:"Muster","skill-kandidaten":"Skill-Kandidaten","skill-kandidaten/beauftragt":"Skill-Kandidaten · beauftragt","skill-kandidaten/verworfen":"Skill-Kandidaten · verworfen"};function sJ(){const{data:e,isLoading:t}=hR(),[r,n]=x.useState(null),[i,o]=x.useState(null),[c,u]=x.useState(!1),[f,h]=x.useState(""),m=x.useMemo(()=>(e==null?void 0:e.files)??[],[e]),p=x.useMemo(()=>{const w=new Map;for(const k of m)w.set(k.name.toLowerCase(),k.path);return w},[m]),v=x.useMemo(()=>{if(!f.trim())return m;const w=f.toLowerCase();return m.filter(k=>k.title.toLowerCase().includes(w)||k.path.toLowerCase().includes(w))},[m,f]),b=x.useMemo(()=>{const w=[];for(const k of v){const N=w.find(E=>E.dir===k.dir);N?N.files.push(k):w.push({dir:k.dir,files:[k]})}return w.sort((k,N)=>k.dir===""?-1:N.dir===""?1:k.dir.localeCompare(N.dir))},[v]);x.useEffect(()=>{if(!r&&m.length){const w=m.find(k=>k.path.toLowerCase()==="index.md");n((w==null?void 0:w.path)??m[0].path)}},[m,r]),x.useEffect(()=>{r&&(u(!0),ye(`/api/wissen/datei?pfad=${encodeURIComponent(r)}`).then(o).catch(()=>o({path:r,content:"*(Notiz nicht ladbar)*",mtime:0})).finally(()=>u(!1)))},[r]);const S=w=>{const k=p.get(w.toLowerCase());k&&n(k)};return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"bg-gradient-to-r from-foreground via-foreground to-primary bg-clip-text font-space text-2xl font-bold tracking-tight text-transparent",children:"Wissen"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Was sich die Box nachts erschließt — Traum-Notizen, Muster und Skill-Ideen aus dem Wissens-Vault, verlinkt wie ein Wiki."})]}),e&&!e.available&&s.jsx("div",{className:"rounded-2xl border border-amber-500/30 bg-amber-500/5 p-4 text-xs text-amber-300",children:"Der Wissens-Vault liegt auf der Box (~/wissens-vault) — im lokalen Dev-Modus nicht verfügbar."}),t&&s.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-border/60 bg-card/30 p-6 text-xs text-muted-foreground",children:[s.jsx(Bt,{className:"h-4 w-4 animate-spin"})," Vault wird geladen …"]}),(e==null?void 0:e.available)&&m.length===0&&s.jsx("div",{className:"rounded-2xl border border-dashed border-border/60 bg-card/20 p-8 text-center text-xs text-muted-foreground",children:"Noch keine Notizen. Der nächtliche Traum (03:15) legt sie an — morgen früh steht hier die erste."}),m.length>0&&s.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row",children:[s.jsxs("aside",{className:"w-full shrink-0 space-y-3 lg:w-72",children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{value:f,onChange:w=>h(w.target.value),type:"search",placeholder:"Notizen durchsuchen…","aria-label":"Notizen durchsuchen",className:"h-9 w-full rounded-lg border border-border/60 bg-card/45 pl-8 pr-3 text-xs text-foreground outline-none focus:ring-1 focus:ring-primary/50"}),s.jsx(rl,{className:"absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"})]}),s.jsx("div",{className:"max-h-[70vh] space-y-3 overflow-y-auto pr-1 scrollbar-thin",children:b.map(({dir:w,files:k})=>s.jsxs("div",{children:[s.jsxs("p",{className:"mb-1 flex items-center gap-1 text-[10px] font-bold uppercase tracking-wider text-muted-foreground/60",children:[s.jsx(a5,{className:"h-3 w-3"})," ",oJ[w]??w]}),s.jsx("div",{className:"space-y-0.5",children:k.map(N=>s.jsxs("button",{onClick:()=>n(N.path),className:ee("flex w-full items-center gap-1.5 rounded-lg px-2 py-1.5 text-left text-xs transition-all cursor-pointer",r===N.path?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[s.jsx(i5,{className:"h-3.5 w-3.5 shrink-0"}),s.jsx("span",{className:"truncate",title:N.title,children:N.name}),N.neu&&s.jsxs("span",{className:"ml-auto flex items-center gap-0.5 rounded bg-violet-500/15 px-1 py-0.5 text-[8px] font-bold uppercase text-violet-300",children:[s.jsx(va,{className:"h-2.5 w-2.5"}),"neu"]})]},N.path))})]},w||"__root"))})]}),s.jsx("div",{className:"min-w-0 flex-1 rounded-2xl border border-border/60 bg-card/45 p-5 shadow-lg shadow-black/15 backdrop-blur-md",children:c?s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(Bt,{className:"h-4 w-4 animate-spin"})," Notiz wird geladen …"]}):i?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-3 flex items-center justify-between border-b border-border/40 pb-2",children:[s.jsxs("span",{className:"flex items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[s.jsx(c5,{className:"h-3.5 w-3.5"})," ",i.path]}),i.mtime>0&&s.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["Stand ",new Date(i.mtime*1e3).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})]})]}),s.jsx(lJ,{text:i.content,onWikiLink:S,known:p})]}):null})]})]})}function lJ({text:e,onWikiLink:t,known:r}){const n=e.split(` -`),i=[];let o=[],c=null;const u=f=>{o.length&&(i.push(s.jsx("ul",{className:"mb-3 ml-4 list-disc space-y-1",children:o},f)),o=[])};return n.forEach((f,h)=>{const m=`l${h}`;if(c!==null){f.trimEnd()==="```"?(i.push(s.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px] leading-relaxed text-foreground/85",children:c.join(` -`)},m)),c=null):c.push(f);return}if(f.trimStart().startsWith("```")){u(m),c=[];return}const p=f.trimEnd();if(!p.trim()){u(m);return}const v=p.match(/^(#{1,4})\s+(.*)$/);if(v){u(m);const S=v[1].length,w=S===1?"text-lg font-bold mt-1 mb-3":S===2?"text-base font-bold mt-4 mb-2":"text-sm font-bold mt-3 mb-1.5";i.push(s.jsx("p",{className:ee(w,"font-space text-foreground"),children:tv(v[2],t,r,m)},m));return}const b=p.match(/^\s*[-*•]\s+(.*)$/);if(b){o.push(s.jsx("li",{className:"text-xs leading-relaxed text-foreground/85",children:tv(b[1],t,r,m)},m));return}u(m),i.push(s.jsx("p",{className:"mb-2 text-xs leading-relaxed text-foreground/85",children:tv(p,t,r,m)},m))}),u("end"),c!==null&&i.push(s.jsx("pre",{className:"mb-3 overflow-x-auto rounded-xl border border-border/50 bg-background/50 p-3 font-mono text-[11px]",children:c.join(` -`)},"code-end")),s.jsx("div",{className:"max-w-3xl",children:i})}function tv(e,t,r,n){return e.split(/(\[\[[^\]]+\]\]|\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g).map((o,c)=>{const u=`${n}-${c}`,f=o.match(/^\[\[([^\]|]+)(?:\|([^\]]+))?\]\]$/);if(f){const h=f[1].trim(),m=(f[2]??f[1]).trim();return r.has(h.toLowerCase())?s.jsx("button",{onClick:()=>t(h),className:"rounded bg-primary/10 px-1 text-primary underline decoration-primary/40 underline-offset-2 hover:bg-primary/20 cursor-pointer",children:m},u):s.jsx("span",{className:"rounded bg-background/40 px-1 text-muted-foreground",title:"Notiz existiert (noch) nicht",children:m},u)}return o.startsWith("**")&&o.endsWith("**")?s.jsx("b",{className:"font-semibold text-foreground",children:o.slice(2,-2)},u):o.startsWith("*")&&o.endsWith("*")&&o.length>2?s.jsx("i",{children:o.slice(1,-1)},u):o.startsWith("`")&&o.endsWith("`")?s.jsx("code",{className:"rounded bg-background/50 px-1 font-mono text-[11px] text-teal-300",children:o.slice(1,-1)},u):s.jsx("span",{children:o},u)})}function cJ(){var S,w,k,N,E;sL();const[e,t]=x.useState(()=>{const C=window.location.hash.slice(1);return gs.some(A=>A.id===C)?C:"dashboard"}),r=x.useCallback(C=>{window.location.hash.slice(1)===C?t(C):window.location.hash=C},[]),[n,i]=x.useState(()=>localStorage.getItem("mc_sidebar_collapsed")==="true"),[o,c]=x.useState(!1),[u,f]=x.useState("maintenance"),[h,m]=x.useState(()=>window.location.hash==="#mc3"),{data:p}=Kx(),{data:v}=Co(2e4);x.useEffect(()=>{document.documentElement.classList.add("dark")},[]),x.useEffect(()=>{const C=A=>{var O;f(((O=A.detail)==null?void 0:O.tab)||"maintenance"),c(!0)};return window.addEventListener("open-system-drawer",C),()=>window.removeEventListener("open-system-drawer",C)},[]),x.useEffect(()=>{const C=A=>{var O;const _=(O=A.detail)==null?void 0:O.view;_&&r(_)};return window.addEventListener("mc-navigate",C),()=>window.removeEventListener("mc-navigate",C)},[r]),x.useEffect(()=>{const C=()=>{m(window.location.hash==="#mc3");const A=window.location.hash.slice(1);gs.some(_=>_.id===A)&&t(A)};return window.addEventListener("hashchange",C),()=>window.removeEventListener("hashchange",C)},[]);const b=gs.find(C=>C.id===e);return h?s.jsx(RX,{}):s.jsxs("div",{className:"flex h-full relative",children:[s.jsxs("div",{className:"fixed inset-0 -z-50 pointer-events-none overflow-hidden bg-[hsl(224,30%,6%)]",children:[s.jsx("div",{className:"absolute inset-0 opacity-35 animate-aurora bg-gradient-to-tr from-teal-500/20 via-indigo-500/15 to-purple-500/20 blur-[130px]"}),s.jsx("div",{className:"absolute top-[-10%] left-[-10%] h-[50%] w-[50%] rounded-full bg-teal-500/15 blur-[160px]"}),s.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] h-[50%] w-[50%] rounded-full bg-purple-500/15 blur-[160px]"}),s.jsx("div",{className:"absolute top-[30%] right-[20%] h-[40%] w-[40%] rounded-full bg-indigo-500/10 blur-[140px]"})]}),s.jsx(_D,{onNavigate:r}),s.jsx(yE,{open:o,onClose:()=>c(!1),defaultTab:u}),s.jsxs("aside",{className:ee("flex shrink-0 flex-col border-r border-border/40 bg-card/45 backdrop-blur-md transition-all duration-300 ease-in-out",n?"w-16":"w-60"),children:[s.jsxs("div",{className:ee("flex items-center py-4 border-b border-border/40 shrink-0",n?"flex-col gap-3 px-2":"justify-between px-5"),children:[s.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[s.jsx("div",{className:"h-7 w-7 rounded-lg bg-primary shadow-md shadow-primary/20 shrink-0"}),!n&&s.jsxs("div",{className:"leading-tight",children:[s.jsx("div",{className:"text-sm font-semibold tracking-wide font-space",children:"Mission Control"}),s.jsx("div",{className:"text-xs text-muted-foreground",children:"2.0"})]})]}),s.jsx("button",{onClick:()=>{i(C=>{const A=!C;return localStorage.setItem("mc_sidebar_collapsed",A.toString()),A})},className:"p-1 rounded-md hover:bg-accent text-muted-foreground transition-colors cursor-pointer","aria-label":n?"Seitenleiste ausklappen":"Seitenleiste einklappen",title:n?"Maximieren":"Minimieren",children:n?s.jsx(Kn,{className:"h-4 w-4","aria-hidden":"true"}):s.jsx(zM,{className:"h-4 w-4","aria-hidden":"true"})})]}),s.jsx("nav",{className:"flex-1 space-y-1 px-3 py-4 overflow-y-auto",children:(()=>{let C=null;return gs.map(A=>{const _=A.group!==C;return C=A.group,s.jsxs("div",{className:"space-y-1",children:[_&&(n?C!==gs[0].group&&s.jsx("div",{className:"my-3 border-t border-border/30"}):s.jsx("div",{className:"mt-5 mb-1.5 px-3 text-[10px] font-bold uppercase tracking-widest text-muted-foreground/40 first:mt-0 select-none",children:A.group})),s.jsxs("a",{href:`#${A.id}`,"aria-current":e===A.id?"page":void 0,className:ee("flex w-full items-center rounded-md text-sm transition-all cursor-pointer",n?"justify-center p-2.5":"gap-3 px-3 py-2",e===A.id?"bg-primary/15 text-primary shadow-sm shadow-primary/5":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),title:n?A.label:void 0,"aria-label":n?A.label:void 0,children:[s.jsx(A.icon,{className:"h-4.5 w-4.5 shrink-0","aria-hidden":"true"}),!n&&s.jsx("span",{className:"truncate",children:A.label})]})]},A.id)})})()}),s.jsx("div",{className:ee("py-3 text-xs text-muted-foreground border-t border-border/40 shrink-0",n?"px-2 text-center":"px-5"),children:n?s.jsx("div",{className:"flex justify-center",children:s.jsx("span",{className:ee("h-2.5 w-2.5 rounded-full ring-2 ring-black/40",p?p.engine_reachable?p.brain&&!p.brain.ready?"bg-amber-500 animate-pulse":"bg-emerald-500 animate-pulse":"bg-amber-500":"bg-red-500"),title:p?p.engine_reachable?p.brain&&!p.brain.ready?`Hirn offline (${p.brain.model??"fast"})`:"Engine + Hirn online":"Engine offline":"Backend offline"})}):s.jsxs("div",{className:"space-y-2 text-left",children:[p?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:ee("h-2 w-2 rounded-full animate-pulse",p.engine_reachable?"bg-emerald-500":"bg-amber-500")}),s.jsxs("span",{className:"truncate",children:["Engine ",p.engine_reachable?"online":"offline"]})]}),p.brain&&!p.brain.ready&&s.jsxs("span",{className:"flex items-center gap-2 text-amber-400",title:`Agent-Hirn '${p.brain.model??"fast"}' lädt nicht/abgestürzt`,children:[s.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),s.jsxs("span",{className:"truncate",children:["Hirn offline",p.brain.model?` (${p.brain.model})`:""]})]})]}):s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"})," ",s.jsx("span",{className:"truncate",children:"Backend offline"})]}),(v==null?void 0:v.versions)&&s.jsxs("div",{className:"space-y-1 text-[9px] text-muted-foreground/60 mt-2 pt-2 border-t border-border/30",children:[s.jsxs("div",{className:"truncate",title:v.versions.mc2?`${v.versions.mc2.branch}-${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""} (${v.versions.mc2.date})`:"nicht gefunden",children:[s.jsx("strong",{children:"MC2:"})," ",v.versions.mc2?`${v.versions.mc2.hash}${v.versions.mc2.dirty?"*":""}`:"—"]}),s.jsxs("div",{className:"truncate",title:((S=v.versions.engine)==null?void 0:S.type)==="git"?`${v.versions.engine.branch}-${v.versions.engine.hash}${v.versions.engine.dirty?"*":""} (${v.versions.engine.date})`:((w=v.versions.engine)==null?void 0:w.version_text)||"unbekannt",children:[s.jsx("strong",{children:"Engine:"})," ",((k=v.versions.engine)==null?void 0:k.type)==="git"?`${v.versions.engine.hash}${v.versions.engine.dirty?"*":""}`:((E=(N=v.versions.engine)==null?void 0:N.version_text)==null?void 0:E.split(" ").pop())||"—"]}),s.jsxs("div",{className:"truncate",title:v.versions.hermes_agent?`${v.versions.hermes_agent.branch}-${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""} (${v.versions.hermes_agent.date})`:"nicht gefunden",children:[s.jsx("strong",{children:"Hermes Agent:"})," ",v.versions.hermes_agent?`${v.versions.hermes_agent.hash}${v.versions.hermes_agent.dirty?"*":""}`:"—"]})]})]})})]}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between border-b border-border/40 px-6 bg-card/20 backdrop-blur-sm",children:[s.jsx("div",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase font-sans",children:b.hint}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(oE,{}),s.jsx("a",{href:"https://git.tobisniceshomelab.ddnsfree.com/Hitonabi/mission-control-v2/src/branch/main/docs/BEDIENUNG.md",target:"_blank",rel:"noopener",className:"flex h-8 items-center rounded-md border border-border/40 bg-background/40 px-2.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer font-semibold",title:"Bedien-Anleitung",children:"Hilfe"}),s.jsxs("button",{onClick:()=>{const C=new KeyboardEvent("keydown",{key:"k",metaKey:!0});document.dispatchEvent(C)},className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/40 px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-all cursor-pointer",children:[s.jsx(KM,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"Suchen"}),s.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[9px]",children:"⌘K"})]})]})]}),s.jsxs("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin",children:[e==="dashboard"&&s.jsx(KX,{onNavigate:C=>r(C)}),e==="auftraege"&&s.jsx(ZX,{}),e==="models"&&s.jsx(zR,{}),e==="connect"&&s.jsx(gE,{}),e==="memory"&&s.jsx(vE,{}),e==="wissen"&&s.jsx(sJ,{}),e==="chronik"&&s.jsx(iJ,{}),e==="agent"&&s.jsx(xE,{}),e==="konsole"&&s.jsx(KR,{}),e==="guide"&&s.jsx(VR,{}),!["dashboard","auftraege","models","connect","memory","wissen","chronik","agent","konsole","guide"].includes(e)&&s.jsx(qR,{title:b.label,hint:b.hint})]})]})]})}class uJ extends Ox.Component{constructor(){super(...arguments);ns(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,n){console.error("Unbehandelter UI-Fehler:",r,n.componentStack)}render(){return this.state.error?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-950 text-neutral-200 p-8",children:s.jsxs("div",{className:"max-w-lg space-y-4 text-center",children:[s.jsx("div",{className:"text-2xl",children:"Da ist etwas schiefgelaufen."}),s.jsx("div",{className:"text-sm text-neutral-400 break-all",children:this.state.error.message}),s.jsx("button",{className:"px-4 py-2 rounded-lg bg-neutral-800 hover:bg-neutral-700 border border-neutral-700",onClick:()=>window.location.reload(),children:"Neu laden"})]})}):this.props.children}}const dJ=new gM({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});H4.createRoot(document.getElementById("root")).render(s.jsx(Ox.StrictMode,{children:s.jsx(uJ,{children:s.jsx(vM,{client:dJ,children:s.jsx(cJ,{})})})}));export{Ox as R,I2 as a,Y7 as b,Wc as c,j2 as d,ho as e,Px as g,Kf as i,s as j,S2 as m,P0 as o,x as r}; diff --git a/frontend/dist/index.html b/frontend/dist/index.html index e2618fe..b64cfb2 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -7,8 +7,8 @@ Mission Control 2.0 - - + +
diff --git a/frontend/src/views/MemoryView.tsx b/frontend/src/views/MemoryView.tsx index 7a61649..e60e4f0 100644 --- a/frontend/src/views/MemoryView.tsx +++ b/frontend/src/views/MemoryView.tsx @@ -1,7 +1,8 @@ -import { useState, useMemo, lazy, Suspense } from "react" +import { useState, useMemo, lazy, Suspense, useEffect } from "react" import { Trash2, Sparkles, User, Scroll, Shield, Clock, Search, Plus, BookOpen, Share2, List, MessagesSquare, X, Copy, Check, Terminal as TerminalIcon, Send, + Maximize2, Minimize2 } from "lucide-react" import { api, type DedupeResult } from "@/lib/api" import { useMemory, useMemoryGraph, useQueryClient } from "@/lib/queries" @@ -49,6 +50,7 @@ export function MemoryView() { const [view, setView] = useState<"liste" | "graph">("liste") const [showAdd, setShowAdd] = useState(false) const [selected, setSelected] = useState(null) + const [isExpanded, setIsExpanded] = useState(false) const qc = useQueryClient() const { showAlert, showConfirm, dialogElement } = useDialog() @@ -57,6 +59,18 @@ export function MemoryView() { const { data: graph } = useMemoryGraph(true) const error = itemsErr ? String(itemsErr) : "" + // Escape-Taste schließt den Vollbildmodus + useEffect(() => { + if (!isExpanded) return + const handleKeyDown = (e: KeyboardEvent) => { + if (e.key === "Escape") { + setIsExpanded(false) + } + } + window.addEventListener("keydown", handleKeyDown) + return () => window.removeEventListener("keydown", handleKeyDown) + }, [isExpanded]) + const reloadMemory = () => { qc.invalidateQueries({ queryKey: ["memory"] }) qc.invalidateQueries({ queryKey: ["memory-graph"] }) @@ -201,7 +215,12 @@ export function MemoryView() { ) : ( /* Der voll integrierte, schwebende Wissens-Hub */ -
+
{/* 1. GraphView nimmt auf Desktop 100% des Hintergrunds ein */}
@@ -215,19 +234,32 @@ export function MemoryView() { {/* 2. Schwebendes linkes Panel (Wissens-Liste) */}
{/* Header & Steuerung direkt im Panel */}
-
-

- Gedächtnis-Pool -

-

- IDEs & Gateway lesen und lernen hier per MCP. -

+
+
+

+ Gedächtnis-Pool +

+

+ IDEs & Gateway lesen und lernen hier per MCP. +

+
+ + {/* Maximize/Minimize Button für Desktop */} +
{/* Statistiken (Chips) */} @@ -376,7 +408,9 @@ export function MemoryView() { {sel && (