diff --git a/docs/assets/index-BD-3HzhN.js b/docs/assets/index-BhcfnKmx.js similarity index 87% rename from docs/assets/index-BD-3HzhN.js rename to docs/assets/index-BhcfnKmx.js index a50d4d32..8fc61be3 100644 --- a/docs/assets/index-BD-3HzhN.js +++ b/docs/assets/index-BhcfnKmx.js @@ -14,7 +14,7 @@ Error generating stack: `+c.message+` ${M}px !important; ${j}px !important; } - `),()=>{k.contains(N)&&k.removeChild(N)}},[t]),b.jsx(pI,{isPresent:t,childRef:f,sizeRef:d,pop:o,children:o===!1?e:A.cloneElement(e,{ref:p})})}const yI=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:u,anchorX:f,anchorY:d,root:h})=>{const m=y0(vI),p=A.useId();let v=!0,x=A.useMemo(()=>(v=!1,{id:p,initial:t,isPresent:n,custom:s,onExitComplete:w=>{m.set(w,!0);for(const _ of m.values())if(!_)return;r&&r()},register:w=>(m.set(w,!1),()=>m.delete(w))}),[n,m,r]);return o&&v&&(x={...x}),A.useMemo(()=>{m.forEach((w,_)=>m.set(_,!1))},[n]),A.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=b.jsx(gI,{pop:u==="popLayout",isPresent:n,anchorX:f,anchorY:d,root:h,children:e}),b.jsx(Fd.Provider,{value:x,children:e})};function vI(){return new Map}function IN(e=!0){const t=A.useContext(Fd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=A.useId();A.useEffect(()=>{if(e)return s(o)},[e]);const u=A.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,u]:[!0]}const df=e=>e.key||"";function HA(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const KA=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:u=!1,anchorX:f="left",anchorY:d="top",root:h})=>{const[m,p]=IN(u),v=A.useMemo(()=>HA(e),[e]),x=u&&!m?[]:v.map(df),w=A.useRef(!0),_=A.useRef(v),S=y0(()=>new Map),O=A.useRef(new Set),[M,j]=A.useState(v),[N,k]=A.useState(v);fM(()=>{w.current=!1,_.current=v;for(let I=0;I{const Y=df(I),te=u&&!m?!1:v===N||x.includes(Y),ie=()=>{if(O.current.has(Y))return;if(O.current.add(Y),S.has(Y))S.set(Y,!0);else return;let K=!0;S.forEach(be=>{be||(K=!1)}),K&&(L?.(),k(_.current),u&&p?.(),r&&r())};return b.jsx(yI,{isPresent:te,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:h,onExitComplete:te?void 0:ie,anchorX:f,anchorY:d,children:I},Y)})})},BN=A.createContext({strict:!1}),XA={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let YA=!1;function bI(){if(YA)return;const e={};for(const t in XA)e[t]={isEnabled:n=>XA[t].some(r=>!!n[r])};mN(e),YA=!0}function UN(){return bI(),az()}function xI(e){const t=UN();for(const n in e)t[n]={...t[n],...e[n]};mN(t)}const wI=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Zf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||wI.has(e)}let VN=e=>!Zf(e);function _I(e){typeof e=="function"&&(VN=t=>t.startsWith("on")?!Zf(t):e(t))}try{_I(require("@emotion/is-prop-valid").default)}catch{}function SI(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(VN(s)||n===!0&&Zf(s)||!t&&!Zf(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Xd=A.createContext({});function AI(e,t){if(Kd(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ru(n)?n:void 0,animate:ru(r)?r:void 0}}return e.inherit!==!1?t:{}}function TI(e){const{initial:t,animate:n}=AI(e,A.useContext(Xd));return A.useMemo(()=>({initial:t,animate:n}),[GA(t),GA(n)])}function GA(e){return Array.isArray(e)?e.join(" "):e}const H0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qN(e,t,n){for(const r in t)!Zt(t[r])&&!wN(r,n)&&(e[r]=t[r])}function OI({transformTemplate:e},t){return A.useMemo(()=>{const n=H0();return q0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function EI(e,t){const n=e.style||{},r={};return qN(r,n,e),Object.assign(r,OI(e,t)),r}function jI(e,t){const n={},r=EI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const $N=()=>({...H0(),attrs:{}});function MI(e,t,n,r){const s=A.useMemo(()=>{const o=$N();return _N(o,t,AN(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};qN(o,e.style,e),s.style={...o,...s.style}}return s}const NI=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function K0(e){return typeof e!="string"||e.includes("-")?!1:!!(NI.indexOf(e)>-1||/[A-Z]/u.test(e))}function kI(e,t,n,{latestValues:r},s,o=!1,u){const d=(u??K0(e)?MI:jI)(t,r,s,e),h=SI(t,typeof e=="string",o),m=e!==A.Fragment?{...h,...d,ref:n}:{},{children:p}=t,v=A.useMemo(()=>Zt(p)?p.get():p,[p]);return A.createElement(e,{...m,children:v})}function CI({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:DI(n,r,s,e),renderState:t()}}function DI(e,t,n,r){const s={},o=r(e,{});for(const v in o)s[v]=zf(o[v]);let{initial:u,animate:f}=e;const d=Kd(e),h=dN(e);t&&h&&!d&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let m=n?n.initial===!1:!1;m=m||u===!1;const p=m?f:u;if(p&&typeof p!="boolean"&&!Hd(p)){const v=Array.isArray(p)?p:[p];for(let x=0;x(t,n)=>{const r=A.useContext(Xd),s=A.useContext(Fd),o=()=>CI(e,t,r,s);return n?o():y0(o)},PI=FN({scrapeMotionValuesFromProps:$0,createRenderState:H0}),RI=FN({scrapeMotionValuesFromProps:TN,createRenderState:$N}),LI=Symbol.for("motionComponentSymbol");function zI(e,t,n){const r=A.useRef(n);A.useInsertionEffect(()=>{r.current=n});const s=A.useRef(null);return A.useCallback(o=>{o&&e.onMount?.(o);const u=r.current;if(typeof u=="function")if(o){const f=u(o);typeof f=="function"&&(s.current=f)}else s.current?(s.current(),s.current=null):u(o);else u&&(u.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const HN=A.createContext({});function Gs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function II(e,t,n,r,s,o){const{visualElement:u}=A.useContext(Xd),f=A.useContext(BN),d=A.useContext(Fd),h=A.useContext(F0),m=h.reducedMotion,p=h.skipAnimations,v=A.useRef(null),x=A.useRef(!1);r=r||f.renderer,!v.current&&r&&(v.current=r(e,{visualState:t,parent:u,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:p,isSVG:o}),x.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const w=v.current,_=A.useContext(HN);w&&!w.projection&&s&&(w.type==="html"||w.type==="svg")&&BI(v.current,n,s,_);const S=A.useRef(!1);A.useInsertionEffect(()=>{w&&S.current&&w.update(n,d)});const O=n[JM],M=A.useRef(!!O&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(O)&&window.MotionHasOptimisedAnimation?.(O));return fM(()=>{x.current=!0,w&&(S.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),M.current&&w.animationState&&w.animationState.animateChanges())}),A.useEffect(()=>{w&&(!M.current&&w.animationState&&w.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(O)}),M.current=!1),w.enteringChildren=void 0)}),w}function BI(e,t,n,r){const{layoutId:s,layout:o,drag:u,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:KN(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!u||f&&Gs(f),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:h})}function KN(e){if(e)return e.options.allowProjection!==!1?e.projection:KN(e.parent)}function cg(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&xI(r);const o=n?n==="svg":K0(e),u=o?RI:PI;function f(h,m){let p;const v={...A.useContext(F0),...h,layoutId:UI(h)},{isStatic:x}=v,w=TI(h),_=u(h,x);if(!x&&typeof window<"u"){VI();const S=qI(v);p=S.MeasureLayout,w.visualElement=II(e,_,v,s,S.ProjectionNode,o)}return b.jsxs(Xd.Provider,{value:w,children:[p&&w.visualElement?b.jsx(p,{visualElement:w.visualElement,...v}):null,kI(e,h,zI(_,w.visualElement,m),_,x,t,o)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=A.forwardRef(f);return d[LI]=e,d}function UI({layoutId:e}){const t=A.useContext(g0).id;return t&&e!==void 0?t+"-"+e:e}function VI(e,t){A.useContext(BN).strict}function qI(e){const t=UN(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function $I(e,t){if(typeof Proxy>"u")return cg;const n=new Map,r=(o,u)=>cg(o,u,e,t),s=(o,u)=>r(o,u);return new Proxy(s,{get:(o,u)=>u==="create"?r:(n.has(u)||n.set(u,cg(u,void 0,e,t)),n.get(u))})}const FI=(e,t)=>t.isSVG??K0(e)?new _z(t):new gz(t,{allowProjection:e!==A.Fragment});class HI extends aa{constructor(t){super(t),t.animationState||(t.animationState=Ez(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Hd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let KI=0;class XI extends aa{constructor(){super(...arguments),this.id=KI++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const YI={animation:{Feature:HI},exit:{Feature:XI}};function Au(e){return{point:{x:e.pageX,y:e.pageY}}}const GI=e=>t=>I0(t)&&e(t,Au(t));function Wl(e,t,n,r){return iu(e,t,GI(n),r)}const XN=({current:e})=>e?e.ownerDocument.defaultView:null,WA=(e,t)=>Math.abs(e-t);function WI(e,t){const n=WA(e.x,t.x),r=WA(e.y,t.y);return Math.sqrt(n**2+r**2)}const ZA=new Set(["auto","scroll"]);class YN{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:u=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=dg(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,_=WI(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!_)return;const{point:S}=x,{timestamp:O}=Ft;this.history.push({...S,timestamp:O});const{onStart:M,onMove:j}=this.handlers;w||(M&&M(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,x)},this.handlePointerMove=(x,w)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=fg(w,this.transformPagePoint),Ge.update(this.updatePoint,!0)},this.handlePointerUp=(x,w)=>{this.end();const{onEnd:_,onSessionEnd:S,resumeAnimation:O}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&O&&O(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const M=dg(x.type==="pointercancel"?this.lastMoveEventInfo:fg(w,this.transformPagePoint),this.history);this.startEvent&&_&&_(x,M),S&&S(x,M)},!I0(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=u,this.contextWindow=s||window;const d=Au(t),h=fg(d,this.transformPagePoint),{point:m}=h,{timestamp:p}=Ft;this.history=[{...m,timestamp:p}];const{onSessionStart:v}=n;v&&v(t,dg(h,this.history)),this.removeListeners=wu(Wl(this.contextWindow,"pointermove",this.handlePointerMove),Wl(this.contextWindow,"pointerup",this.handlePointerUp),Wl(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(ZA.has(r.overflowX)||ZA.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),Ge.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),na(this.updatePoint)}}function fg(e,t){return t?{point:t(e.point)}:e}function QA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function dg({point:e},t){return{point:e,delta:QA(e,GN(t)),offset:QA(e,ZI(t)),velocity:QI(t,.1)}}function ZI(e){return e[0]}function GN(e){return e[e.length-1]}function QI(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=GN(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>fr(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>fr(t)*2&&(r=e[1]);const o=Gn(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const u={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function JI(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?rt(n,e,r.max):Math.min(e,n)),e}function JA(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eB(e,{top:t,left:n,bottom:r,right:s}){return{x:JA(e.x,n,s),y:JA(e.y,t,r)}}function e2(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=eu(t.min,t.max-r,e.min):r>s&&(n=eu(e.min,e.max-s,t.min)),Mr(0,1,n)}function rB(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const vv=.35;function iB(e=vv){return e===!1?e=0:e===!0&&(e=vv),{x:t2(e,"left","right"),y:t2(e,"top","bottom")}}function t2(e,t,n){return{min:n2(e,t),max:n2(e,n)}}function n2(e,t){return typeof e=="number"?e:e[t]||0}const aB=new WeakMap;class sB{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=St(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=p=>{n&&this.snapToCursor(Au(p).point),this.stopAnimation()},u=(p,v)=>{const{drag:x,dragPropagation:w,onDragStart:_}=this.getProps();if(x&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=R8(x),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Sr(O=>{let M=this.getAxisMotionValue(O).get()||0;if(Or.test(M)){const{projection:j}=this.visualElement;if(j&&j.layout){const N=j.layout.layoutBox[O];N&&(M=nn(N)*(parseFloat(M)/100))}}this.originPoint[O]=M}),_&&Ge.update(()=>_(p,v),!1,!0),uv(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},f=(p,v)=>{this.latestPointerEvent=p,this.latestPanInfo=v;const{dragPropagation:x,dragDirectionLock:w,onDirectionLock:_,onDrag:S}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:O}=v;if(w&&this.currentDirection===null){this.currentDirection=lB(O),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",v.point,O),this.updateAxis("y",v.point,O),this.visualElement.render(),S&&Ge.update(()=>S(p,v),!1,!0)},d=(p,v)=>{this.latestPointerEvent=p,this.latestPanInfo=v,this.stop(p,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new YN(t,{onSessionStart:o,onStart:u,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:XN(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:u}=s;this.startAnimation(u);const{onDragEnd:f}=this.getProps();f&&Ge.postRender(()=>f(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!hf(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let u=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(u=JI(u,this.constraints[t],this.elastic[t])),o.set(u)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Gs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=eB(r.layoutBox,t):this.constraints=!1,this.elastic=iB(n),s!==this.constraints&&!Gs(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Sr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=rB(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Gs(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=cz(r,s.root,this.visualElement.getTransformPagePoint());let u=tB(s.layout.layoutBox,o);if(n){const f=n(oz(u));this.hasMutatedConstraints=!!f,f&&(u=gN(f))}return u}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:u,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Sr(m=>{if(!hf(m,n,this.currentDirection))return;let p=d&&d[m]||{};u&&(p={min:0,max:0});const v=s?200:1e6,x=s?40:1e7,w={type:"inertia",velocity:r?t[m]:0,bounceStiffness:v,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(m,w)});return Promise.all(h).then(f)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return uv(this.visualElement,t),r.start(D0(t,r,0,n,this.visualElement,!1))}stopAnimation(){Sr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Sr(n=>{const{drag:r}=this.getProps();if(!hf(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:u,max:f}=s.layout.layoutBox[n],d=o.get()||0;o.set(t[n]-rt(u,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Gs(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Sr(u=>{const f=this.getAxisMotionValue(u);if(f&&this.constraints!==!1){const d=f.get();s[u]=nB({min:d,max:d},this.constraints[u])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Sr(u=>{if(!hf(u,t,null))return;const f=this.getAxisMotionValue(u),{min:d,max:h}=this.constraints[u];f.set(rt(d,h,s[u]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;aB.set(this.visualElement,this);const t=this.visualElement.current,n=Wl(t,"pointerdown",h=>{const{drag:m,dragListener:p=!0}=this.getProps(),v=h.target,x=v!==t&&V8(v);m&&p&&!x&&this.start(h)});let r;const s=()=>{const{dragConstraints:h}=this.getProps();Gs(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),r||(r=oB(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,u=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ge.read(s);const f=iu(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Sr(p=>{const v=this.getAxisMotionValue(p);v&&(this.originPoint[p]+=h[p].translate,v.set(v.get()+h[p].translate))}),this.visualElement.render())}));return()=>{f(),n(),u(),d&&d(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:u=vv,dragMomentum:f=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:u,dragMomentum:f}}}function r2(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function oB(e,t,n){const r=lA(e,r2(n)),s=lA(t,r2(n));return()=>{r(),s()}}function hf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lB(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class uB extends aa{constructor(t){super(t),this.removeGroupControls=Jn,this.removeListeners=Jn,this.controls=new sB(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Jn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const hg=e=>(t,n)=>{e&&Ge.update(()=>e(t,n),!1,!0)};class cB extends aa{constructor(){super(...arguments),this.removePointerDownListener=Jn}onPointerDown(t){this.session=new YN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:XN(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:hg(t),onStart:hg(n),onMove:hg(r),onEnd:(o,u)=>{delete this.session,s&&Ge.postRender(()=>s(o,u))}}}mount(){this.removePointerDownListener=Wl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let mg=!1;class fB extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),mg&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),If.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:u}=r;return u&&(u.isPresent=o,t.layoutDependency!==n&&u.setOptions({...u.options,layoutDependency:n}),mg=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?u.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?u.promote():u.relegate()||Ge.postRender(()=>{const f=u.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),z0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;mg=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function WN(e){const[t,n]=IN(),r=A.useContext(g0);return b.jsx(fB,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(HN),isPresent:t,safeToRemove:n})}const dB={pan:{Feature:cB},drag:{Feature:uB,ProjectionNode:zN,MeasureLayout:WN}};function i2(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Ge.postRender(()=>o(t,Au(t)))}class hB extends aa{mount(){const{current:t}=this.node;t&&(this.unmount=z8(t,(n,r)=>(i2(this.node,r,"Start"),s=>i2(this.node,s,"End"))))}unmount(){}}class mB extends aa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=wu(iu(this.node.current,"focus",()=>this.onFocus()),iu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function a2(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Ge.postRender(()=>o(t,Au(t)))}class pB extends aa{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=$8(t,(s,o)=>(a2(this.node,o,"Start"),(u,{success:f})=>a2(this.node,u,f?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const bv=new WeakMap,pg=new WeakMap,gB=e=>{const t=bv.get(e.target);t&&t(e)},yB=e=>{e.forEach(gB)};function vB({root:e,...t}){const n=e||document;pg.has(n)||pg.set(n,{});const r=pg.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(yB,{root:e,...t})),r[s]}function bB(e,t,n){const r=vB(t);return bv.set(e,n),r.observe(e),()=>{bv.delete(e),r.unobserve(e)}}const xB={some:0,all:1};class wB extends aa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,u={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:xB[s]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,o&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),v=h?m:p;v&&v(d)};return bB(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_B(t,n))&&this.startObserver()}unmount(){}}function _B({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const SB={inView:{Feature:wB},tap:{Feature:pB},focus:{Feature:mB},hover:{Feature:hB}},AB={layout:{ProjectionNode:zN,MeasureLayout:WN}},TB={...YI,...SB,...dB,...AB},Tt=$I(TB,FI);function wo({id:e,title:t,subtitle:n,children:r,className:s="",wide:o=!1}){return b.jsx("section",{id:e,className:`pt-28 pb-20 px-4 sm:px-6 lg:px-8 ${s}`,children:b.jsxs("div",{className:`${o?"max-w-[1600px]":"max-w-7xl"} mx-auto`,children:[t&&b.jsxs(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.5},className:"text-center mb-12",children:[b.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-text-primary mb-3",children:t}),n&&b.jsx("p",{className:"text-lg text-text-secondary max-w-3xl mx-auto",children:n})]}),r]})})}function OB(){return b.jsx(wo,{id:"acknowledgements",title:"Contributions & Acknowledgements",subtitle:"",children:b.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[b.jsx(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:b.jsxs("div",{className:"rounded-xl border border-purple/30 bg-purple/5 p-6",children:[b.jsx("h3",{className:"text-base font-semibold text-purple-light mb-3",children:"Core Contributors"}),b.jsx("p",{className:"text-sm font-semibold text-text-primary",children:"Tara Bogavelli, Gabrielle Gauthier Melançon, Katrina Stankiewicz, Oluwanifemi Bamgbose, Hoang Nguyen, Raghav Mehndiratta, Hari Subramani"})]})}),b.jsx(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1},children:b.jsxs("div",{className:"rounded-xl border border-blue/30 bg-blue/5 p-6",children:[b.jsx("h3",{className:"text-base font-semibold text-blue-light mb-2",children:"Secondary Contributors"}),b.jsx("p",{className:"text-sm text-text-secondary mb-3",children:"We thank the following individuals for their careful data review and thoughtful contributions to the framework."}),b.jsx("p",{className:"text-sm font-semibold text-text-primary",children:"Lindsay Brin, Akshay Kalkunte, Joseph Marinier, Jishnu Nair, Aman Tiwari"})]})}),b.jsx(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.2},children:b.jsxs("div",{className:"rounded-xl border border-amber/30 bg-amber/5 p-6",children:[b.jsx("h3",{className:"text-base font-semibold text-amber mb-2",children:"Management and Leadership"}),b.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"We are grateful to the following individuals for their management, leadership, and support."}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-1",children:[b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Fanny Riols"}),b.jsx("span",{className:"text-xs text-text-muted",children:"Research Scientist Manager"})]}),b.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-1",children:[b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Anil Madamala"}),b.jsx("span",{className:"text-xs text-text-muted",children:"Director, Machine Learning Engineering Management"})]}),b.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-1",children:[b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Sridhar Nemala"}),b.jsx("span",{className:"text-xs text-text-muted",children:"Senior Director, Machine Learning Engineering"})]}),b.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-1",children:[b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Srinivas Sunkara"}),b.jsx("span",{className:"text-xs text-text-muted",children:"VP, Research Engineering Management"})]})]})]})}),b.jsx(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.3},children:b.jsxs("div",{className:"rounded-xl border border-cyan/30 bg-cyan/5 p-6",children:[b.jsx("h3",{className:"text-base font-semibold text-cyan mb-2",children:"Upstream Contributors"}),b.jsxs("p",{className:"text-sm text-text-secondary",children:["We extend our thanks to the ",b.jsx("span",{className:"font-bold text-text-primary",children:"PAVA"})," and ",b.jsx("span",{className:"font-bold text-text-primary",children:"CLAE"})," teams whose prior work on evaluations and voice agents provided valuable inspiration for this project."]})]})}),b.jsxs(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.4},className:"rounded-xl border border-border-default bg-bg-secondary p-6",children:[b.jsx("h3",{className:"text-base font-semibold text-text-primary mb-3",children:"Citation"}),b.jsx("pre",{className:"text-xs text-text-muted bg-bg-primary rounded-lg p-4 overflow-x-auto font-mono",children:`@misc{eva-2026, + `),()=>{k.contains(N)&&k.removeChild(N)}},[t]),b.jsx(pI,{isPresent:t,childRef:f,sizeRef:d,pop:o,children:o===!1?e:A.cloneElement(e,{ref:p})})}const yI=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:u,anchorX:f,anchorY:d,root:h})=>{const m=y0(vI),p=A.useId();let v=!0,x=A.useMemo(()=>(v=!1,{id:p,initial:t,isPresent:n,custom:s,onExitComplete:w=>{m.set(w,!0);for(const _ of m.values())if(!_)return;r&&r()},register:w=>(m.set(w,!1),()=>m.delete(w))}),[n,m,r]);return o&&v&&(x={...x}),A.useMemo(()=>{m.forEach((w,_)=>m.set(_,!1))},[n]),A.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=b.jsx(gI,{pop:u==="popLayout",isPresent:n,anchorX:f,anchorY:d,root:h,children:e}),b.jsx(Fd.Provider,{value:x,children:e})};function vI(){return new Map}function IN(e=!0){const t=A.useContext(Fd);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=A.useId();A.useEffect(()=>{if(e)return s(o)},[e]);const u=A.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,u]:[!0]}const df=e=>e.key||"";function HA(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const KA=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:u=!1,anchorX:f="left",anchorY:d="top",root:h})=>{const[m,p]=IN(u),v=A.useMemo(()=>HA(e),[e]),x=u&&!m?[]:v.map(df),w=A.useRef(!0),_=A.useRef(v),S=y0(()=>new Map),O=A.useRef(new Set),[M,j]=A.useState(v),[N,k]=A.useState(v);fM(()=>{w.current=!1,_.current=v;for(let I=0;I{const Y=df(I),te=u&&!m?!1:v===N||x.includes(Y),ie=()=>{if(O.current.has(Y))return;if(O.current.add(Y),S.has(Y))S.set(Y,!0);else return;let K=!0;S.forEach(be=>{be||(K=!1)}),K&&(L?.(),k(_.current),u&&p?.(),r&&r())};return b.jsx(yI,{isPresent:te,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:h,onExitComplete:te?void 0:ie,anchorX:f,anchorY:d,children:I},Y)})})},BN=A.createContext({strict:!1}),XA={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let YA=!1;function bI(){if(YA)return;const e={};for(const t in XA)e[t]={isEnabled:n=>XA[t].some(r=>!!n[r])};mN(e),YA=!0}function UN(){return bI(),az()}function xI(e){const t=UN();for(const n in e)t[n]={...t[n],...e[n]};mN(t)}const wI=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Zf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||wI.has(e)}let VN=e=>!Zf(e);function _I(e){typeof e=="function"&&(VN=t=>t.startsWith("on")?!Zf(t):e(t))}try{_I(require("@emotion/is-prop-valid").default)}catch{}function SI(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(VN(s)||n===!0&&Zf(s)||!t&&!Zf(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Xd=A.createContext({});function AI(e,t){if(Kd(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ru(n)?n:void 0,animate:ru(r)?r:void 0}}return e.inherit!==!1?t:{}}function TI(e){const{initial:t,animate:n}=AI(e,A.useContext(Xd));return A.useMemo(()=>({initial:t,animate:n}),[GA(t),GA(n)])}function GA(e){return Array.isArray(e)?e.join(" "):e}const H0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qN(e,t,n){for(const r in t)!Zt(t[r])&&!wN(r,n)&&(e[r]=t[r])}function OI({transformTemplate:e},t){return A.useMemo(()=>{const n=H0();return q0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function EI(e,t){const n=e.style||{},r={};return qN(r,n,e),Object.assign(r,OI(e,t)),r}function jI(e,t){const n={},r=EI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const $N=()=>({...H0(),attrs:{}});function MI(e,t,n,r){const s=A.useMemo(()=>{const o=$N();return _N(o,t,AN(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};qN(o,e.style,e),s.style={...o,...s.style}}return s}const NI=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function K0(e){return typeof e!="string"||e.includes("-")?!1:!!(NI.indexOf(e)>-1||/[A-Z]/u.test(e))}function kI(e,t,n,{latestValues:r},s,o=!1,u){const d=(u??K0(e)?MI:jI)(t,r,s,e),h=SI(t,typeof e=="string",o),m=e!==A.Fragment?{...h,...d,ref:n}:{},{children:p}=t,v=A.useMemo(()=>Zt(p)?p.get():p,[p]);return A.createElement(e,{...m,children:v})}function CI({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:DI(n,r,s,e),renderState:t()}}function DI(e,t,n,r){const s={},o=r(e,{});for(const v in o)s[v]=zf(o[v]);let{initial:u,animate:f}=e;const d=Kd(e),h=dN(e);t&&h&&!d&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let m=n?n.initial===!1:!1;m=m||u===!1;const p=m?f:u;if(p&&typeof p!="boolean"&&!Hd(p)){const v=Array.isArray(p)?p:[p];for(let x=0;x(t,n)=>{const r=A.useContext(Xd),s=A.useContext(Fd),o=()=>CI(e,t,r,s);return n?o():y0(o)},PI=FN({scrapeMotionValuesFromProps:$0,createRenderState:H0}),RI=FN({scrapeMotionValuesFromProps:TN,createRenderState:$N}),LI=Symbol.for("motionComponentSymbol");function zI(e,t,n){const r=A.useRef(n);A.useInsertionEffect(()=>{r.current=n});const s=A.useRef(null);return A.useCallback(o=>{o&&e.onMount?.(o);const u=r.current;if(typeof u=="function")if(o){const f=u(o);typeof f=="function"&&(s.current=f)}else s.current?(s.current(),s.current=null):u(o);else u&&(u.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const HN=A.createContext({});function Gs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function II(e,t,n,r,s,o){const{visualElement:u}=A.useContext(Xd),f=A.useContext(BN),d=A.useContext(Fd),h=A.useContext(F0),m=h.reducedMotion,p=h.skipAnimations,v=A.useRef(null),x=A.useRef(!1);r=r||f.renderer,!v.current&&r&&(v.current=r(e,{visualState:t,parent:u,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:p,isSVG:o}),x.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const w=v.current,_=A.useContext(HN);w&&!w.projection&&s&&(w.type==="html"||w.type==="svg")&&BI(v.current,n,s,_);const S=A.useRef(!1);A.useInsertionEffect(()=>{w&&S.current&&w.update(n,d)});const O=n[JM],M=A.useRef(!!O&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(O)&&window.MotionHasOptimisedAnimation?.(O));return fM(()=>{x.current=!0,w&&(S.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),M.current&&w.animationState&&w.animationState.animateChanges())}),A.useEffect(()=>{w&&(!M.current&&w.animationState&&w.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(O)}),M.current=!1),w.enteringChildren=void 0)}),w}function BI(e,t,n,r){const{layoutId:s,layout:o,drag:u,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:KN(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!u||f&&Gs(f),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:h})}function KN(e){if(e)return e.options.allowProjection!==!1?e.projection:KN(e.parent)}function cg(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&xI(r);const o=n?n==="svg":K0(e),u=o?RI:PI;function f(h,m){let p;const v={...A.useContext(F0),...h,layoutId:UI(h)},{isStatic:x}=v,w=TI(h),_=u(h,x);if(!x&&typeof window<"u"){VI();const S=qI(v);p=S.MeasureLayout,w.visualElement=II(e,_,v,s,S.ProjectionNode,o)}return b.jsxs(Xd.Provider,{value:w,children:[p&&w.visualElement?b.jsx(p,{visualElement:w.visualElement,...v}):null,kI(e,h,zI(_,w.visualElement,m),_,x,t,o)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=A.forwardRef(f);return d[LI]=e,d}function UI({layoutId:e}){const t=A.useContext(g0).id;return t&&e!==void 0?t+"-"+e:e}function VI(e,t){A.useContext(BN).strict}function qI(e){const t=UN(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function $I(e,t){if(typeof Proxy>"u")return cg;const n=new Map,r=(o,u)=>cg(o,u,e,t),s=(o,u)=>r(o,u);return new Proxy(s,{get:(o,u)=>u==="create"?r:(n.has(u)||n.set(u,cg(u,void 0,e,t)),n.get(u))})}const FI=(e,t)=>t.isSVG??K0(e)?new _z(t):new gz(t,{allowProjection:e!==A.Fragment});class HI extends aa{constructor(t){super(t),t.animationState||(t.animationState=Ez(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Hd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let KI=0;class XI extends aa{constructor(){super(...arguments),this.id=KI++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const YI={animation:{Feature:HI},exit:{Feature:XI}};function Au(e){return{point:{x:e.pageX,y:e.pageY}}}const GI=e=>t=>I0(t)&&e(t,Au(t));function Wl(e,t,n,r){return iu(e,t,GI(n),r)}const XN=({current:e})=>e?e.ownerDocument.defaultView:null,WA=(e,t)=>Math.abs(e-t);function WI(e,t){const n=WA(e.x,t.x),r=WA(e.y,t.y);return Math.sqrt(n**2+r**2)}const ZA=new Set(["auto","scroll"]);class YN{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:u=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=dg(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,_=WI(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!_)return;const{point:S}=x,{timestamp:O}=Ft;this.history.push({...S,timestamp:O});const{onStart:M,onMove:j}=this.handlers;w||(M&&M(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,x)},this.handlePointerMove=(x,w)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=fg(w,this.transformPagePoint),Ge.update(this.updatePoint,!0)},this.handlePointerUp=(x,w)=>{this.end();const{onEnd:_,onSessionEnd:S,resumeAnimation:O}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&O&&O(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const M=dg(x.type==="pointercancel"?this.lastMoveEventInfo:fg(w,this.transformPagePoint),this.history);this.startEvent&&_&&_(x,M),S&&S(x,M)},!I0(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=u,this.contextWindow=s||window;const d=Au(t),h=fg(d,this.transformPagePoint),{point:m}=h,{timestamp:p}=Ft;this.history=[{...m,timestamp:p}];const{onSessionStart:v}=n;v&&v(t,dg(h,this.history)),this.removeListeners=wu(Wl(this.contextWindow,"pointermove",this.handlePointerMove),Wl(this.contextWindow,"pointerup",this.handlePointerUp),Wl(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(ZA.has(r.overflowX)||ZA.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),Ge.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),na(this.updatePoint)}}function fg(e,t){return t?{point:t(e.point)}:e}function QA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function dg({point:e},t){return{point:e,delta:QA(e,GN(t)),offset:QA(e,ZI(t)),velocity:QI(t,.1)}}function ZI(e){return e[0]}function GN(e){return e[e.length-1]}function QI(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=GN(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>fr(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>fr(t)*2&&(r=e[1]);const o=Gn(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const u={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function JI(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?rt(n,e,r.max):Math.min(e,n)),e}function JA(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function e9(e,{top:t,left:n,bottom:r,right:s}){return{x:JA(e.x,n,s),y:JA(e.y,t,r)}}function e2(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=eu(t.min,t.max-r,e.min):r>s&&(n=eu(e.min,e.max-s,t.min)),Mr(0,1,n)}function r9(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const vv=.35;function i9(e=vv){return e===!1?e=0:e===!0&&(e=vv),{x:t2(e,"left","right"),y:t2(e,"top","bottom")}}function t2(e,t,n){return{min:n2(e,t),max:n2(e,n)}}function n2(e,t){return typeof e=="number"?e:e[t]||0}const a9=new WeakMap;class s9{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=St(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=p=>{n&&this.snapToCursor(Au(p).point),this.stopAnimation()},u=(p,v)=>{const{drag:x,dragPropagation:w,onDragStart:_}=this.getProps();if(x&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=R8(x),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Sr(O=>{let M=this.getAxisMotionValue(O).get()||0;if(Or.test(M)){const{projection:j}=this.visualElement;if(j&&j.layout){const N=j.layout.layoutBox[O];N&&(M=nn(N)*(parseFloat(M)/100))}}this.originPoint[O]=M}),_&&Ge.update(()=>_(p,v),!1,!0),uv(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},f=(p,v)=>{this.latestPointerEvent=p,this.latestPanInfo=v;const{dragPropagation:x,dragDirectionLock:w,onDirectionLock:_,onDrag:S}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:O}=v;if(w&&this.currentDirection===null){this.currentDirection=l9(O),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",v.point,O),this.updateAxis("y",v.point,O),this.visualElement.render(),S&&Ge.update(()=>S(p,v),!1,!0)},d=(p,v)=>{this.latestPointerEvent=p,this.latestPanInfo=v,this.stop(p,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new YN(t,{onSessionStart:o,onStart:u,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:XN(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:u}=s;this.startAnimation(u);const{onDragEnd:f}=this.getProps();f&&Ge.postRender(()=>f(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!hf(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let u=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(u=JI(u,this.constraints[t],this.elastic[t])),o.set(u)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Gs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=e9(r.layoutBox,t):this.constraints=!1,this.elastic=i9(n),s!==this.constraints&&!Gs(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Sr(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=r9(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Gs(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=cz(r,s.root,this.visualElement.getTransformPagePoint());let u=t9(s.layout.layoutBox,o);if(n){const f=n(oz(u));this.hasMutatedConstraints=!!f,f&&(u=gN(f))}return u}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:u,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Sr(m=>{if(!hf(m,n,this.currentDirection))return;let p=d&&d[m]||{};u&&(p={min:0,max:0});const v=s?200:1e6,x=s?40:1e7,w={type:"inertia",velocity:r?t[m]:0,bounceStiffness:v,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(m,w)});return Promise.all(h).then(f)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return uv(this.visualElement,t),r.start(D0(t,r,0,n,this.visualElement,!1))}stopAnimation(){Sr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Sr(n=>{const{drag:r}=this.getProps();if(!hf(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:u,max:f}=s.layout.layoutBox[n],d=o.get()||0;o.set(t[n]-rt(u,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Gs(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Sr(u=>{const f=this.getAxisMotionValue(u);if(f&&this.constraints!==!1){const d=f.get();s[u]=n9({min:d,max:d},this.constraints[u])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Sr(u=>{if(!hf(u,t,null))return;const f=this.getAxisMotionValue(u),{min:d,max:h}=this.constraints[u];f.set(rt(d,h,s[u]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;a9.set(this.visualElement,this);const t=this.visualElement.current,n=Wl(t,"pointerdown",h=>{const{drag:m,dragListener:p=!0}=this.getProps(),v=h.target,x=v!==t&&V8(v);m&&p&&!x&&this.start(h)});let r;const s=()=>{const{dragConstraints:h}=this.getProps();Gs(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),r||(r=o9(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,u=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ge.read(s);const f=iu(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Sr(p=>{const v=this.getAxisMotionValue(p);v&&(this.originPoint[p]+=h[p].translate,v.set(v.get()+h[p].translate))}),this.visualElement.render())}));return()=>{f(),n(),u(),d&&d(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:u=vv,dragMomentum:f=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:u,dragMomentum:f}}}function r2(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function o9(e,t,n){const r=lA(e,r2(n)),s=lA(t,r2(n));return()=>{r(),s()}}function hf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function l9(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class u9 extends aa{constructor(t){super(t),this.removeGroupControls=Jn,this.removeListeners=Jn,this.controls=new s9(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Jn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const hg=e=>(t,n)=>{e&&Ge.update(()=>e(t,n),!1,!0)};class c9 extends aa{constructor(){super(...arguments),this.removePointerDownListener=Jn}onPointerDown(t){this.session=new YN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:XN(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:hg(t),onStart:hg(n),onMove:hg(r),onEnd:(o,u)=>{delete this.session,s&&Ge.postRender(()=>s(o,u))}}}mount(){this.removePointerDownListener=Wl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let mg=!1;class f9 extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),mg&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),If.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:u}=r;return u&&(u.isPresent=o,t.layoutDependency!==n&&u.setOptions({...u.options,layoutDependency:n}),mg=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?u.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?u.promote():u.relegate()||Ge.postRender(()=>{const f=u.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),z0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;mg=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function WN(e){const[t,n]=IN(),r=A.useContext(g0);return b.jsx(f9,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(HN),isPresent:t,safeToRemove:n})}const d9={pan:{Feature:c9},drag:{Feature:u9,ProjectionNode:zN,MeasureLayout:WN}};function i2(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Ge.postRender(()=>o(t,Au(t)))}class h9 extends aa{mount(){const{current:t}=this.node;t&&(this.unmount=z8(t,(n,r)=>(i2(this.node,r,"Start"),s=>i2(this.node,s,"End"))))}unmount(){}}class m9 extends aa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=wu(iu(this.node.current,"focus",()=>this.onFocus()),iu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function a2(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Ge.postRender(()=>o(t,Au(t)))}class p9 extends aa{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=$8(t,(s,o)=>(a2(this.node,o,"Start"),(u,{success:f})=>a2(this.node,u,f?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const bv=new WeakMap,pg=new WeakMap,g9=e=>{const t=bv.get(e.target);t&&t(e)},y9=e=>{e.forEach(g9)};function v9({root:e,...t}){const n=e||document;pg.has(n)||pg.set(n,{});const r=pg.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(y9,{root:e,...t})),r[s]}function b9(e,t,n){const r=v9(t);return bv.set(e,n),r.observe(e),()=>{bv.delete(e),r.unobserve(e)}}const x9={some:0,all:1};class w9 extends aa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,u={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:x9[s]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,o&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),v=h?m:p;v&&v(d)};return b9(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_9(t,n))&&this.startObserver()}unmount(){}}function _9({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const S9={inView:{Feature:w9},tap:{Feature:p9},focus:{Feature:m9},hover:{Feature:h9}},A9={layout:{ProjectionNode:zN,MeasureLayout:WN}},T9={...YI,...S9,...d9,...A9},Tt=$I(T9,FI);function wo({id:e,title:t,subtitle:n,children:r,className:s="",wide:o=!1}){return b.jsx("section",{id:e,className:`pt-28 pb-20 px-4 sm:px-6 lg:px-8 ${s}`,children:b.jsxs("div",{className:`${o?"max-w-[1600px]":"max-w-7xl"} mx-auto`,children:[t&&b.jsxs(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.5},className:"text-center mb-12",children:[b.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-text-primary mb-3",children:t}),n&&b.jsx("p",{className:"text-lg text-text-secondary max-w-3xl mx-auto",children:n})]}),r]})})}function O9(){return b.jsx(wo,{id:"acknowledgements",title:"Contributions & Acknowledgements",subtitle:"",children:b.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[b.jsx(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:b.jsxs("div",{className:"rounded-xl border border-purple/30 bg-purple/5 p-6",children:[b.jsx("h3",{className:"text-base font-semibold text-purple-light mb-3",children:"Core Contributors"}),b.jsx("p",{className:"text-sm font-semibold text-text-primary",children:"Tara Bogavelli, Gabrielle Gauthier Melançon, Katrina Stankiewicz, Oluwanifemi Bamgbose, Hoang Nguyen, Raghav Mehndiratta, Hari Subramani"})]})}),b.jsx(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1},children:b.jsxs("div",{className:"rounded-xl border border-blue/30 bg-blue/5 p-6",children:[b.jsx("h3",{className:"text-base font-semibold text-blue-light mb-2",children:"Secondary Contributors"}),b.jsx("p",{className:"text-sm text-text-secondary mb-3",children:"We thank the following individuals for their careful data review and thoughtful contributions to the framework."}),b.jsx("p",{className:"text-sm font-semibold text-text-primary",children:"Lindsay Brin, Akshay Kalkunte, Joseph Marinier, Jishnu Nair, Aman Tiwari"})]})}),b.jsx(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.2},children:b.jsxs("div",{className:"rounded-xl border border-amber/30 bg-amber/5 p-6",children:[b.jsx("h3",{className:"text-base font-semibold text-amber mb-2",children:"Management and Leadership"}),b.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"We are grateful to the following individuals for their management, leadership, and support."}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-1",children:[b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Fanny Riols"}),b.jsx("span",{className:"text-xs text-text-muted",children:"Research Scientist Manager"})]}),b.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-1",children:[b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Anil Madamala"}),b.jsx("span",{className:"text-xs text-text-muted",children:"Director, Machine Learning Engineering Management"})]}),b.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-1",children:[b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Sridhar Nemala"}),b.jsx("span",{className:"text-xs text-text-muted",children:"Senior Director, Machine Learning Engineering"})]}),b.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-baseline sm:justify-between gap-1",children:[b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Srinivas Sunkara"}),b.jsx("span",{className:"text-xs text-text-muted",children:"VP, Research Engineering Management"})]})]})]})}),b.jsx(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.3},children:b.jsxs("div",{className:"rounded-xl border border-cyan/30 bg-cyan/5 p-6",children:[b.jsx("h3",{className:"text-base font-semibold text-cyan mb-2",children:"Upstream Contributors"}),b.jsxs("p",{className:"text-sm text-text-secondary",children:["We extend our thanks to the ",b.jsx("span",{className:"font-bold text-text-primary",children:"PAVA"})," and ",b.jsx("span",{className:"font-bold text-text-primary",children:"CLAE"})," teams whose prior work on evaluations and voice agents provided valuable inspiration for this project."]})]})}),b.jsxs(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.4},className:"rounded-xl border border-border-default bg-bg-secondary p-6",children:[b.jsx("h3",{className:"text-base font-semibold text-text-primary mb-3",children:"Citation"}),b.jsx("pre",{className:"text-xs text-text-muted bg-bg-primary rounded-lg p-4 overflow-x-auto font-mono",children:`@misc{eva-2026, title={EVA: A New End-to-end Framework for Evaluating Voice Agents}, author={Bogavelli, Tara and Gauthier Melançon, Gabrielle and Stankiewicz, Katrina and Bamgbose, Oluwanifemi @@ -22,7 +22,7 @@ Error generating stack: `+c.message+` and Subramani, Hari}, year={2026}, url={https://github.com/ServiceNow/eva} -}`})]})]})})}function EB(){return b.jsx("section",{id:"hero",className:"pt-32 pb-20 px-4 sm:px-6 lg:px-8",children:b.jsxs("div",{className:"max-w-5xl mx-auto text-center",children:[b.jsxs("div",{children:[b.jsxs("h1",{className:"text-3xl sm:text-4xl lg:text-[2.75rem] font-extrabold mb-2 leading-tight bg-clip-text text-transparent",style:{backgroundImage:"linear-gradient(to right, #7C3AED, #818CF8, #60A5FA)"},children:["A New End-to-end Framework for",b.jsx("br",{}),"Evaluating Voice Agents (EVA)"]}),b.jsx("p",{className:"text-sm sm:text-base font-bold text-[#A78BFA] max-w-3xl mx-auto mb-2.5",children:"Tara Bogavelli, Gabrielle Gauthier Melançon, Katrina Stankiewicz, Oluwanifemi Bamgbose, Hoang Nguyen, Raghav Mehndiratta, Hari Subramani*"}),b.jsx("p",{className:"text-base sm:text-lg font-semibold text-text-secondary max-w-3xl mx-auto mb-4",children:"ServiceNow AI Research"}),b.jsx("p",{className:"text-base sm:text-lg text-text-muted max-w-3xl mx-auto mb-14 leading-relaxed",children:"An open-source evaluation framework that measures voice agents over complete, multi-turn spoken conversations using a realistic bot-to-bot architecture. EVA captures the compounding failure modes that component-level benchmarks miss."})]}),b.jsxs(Tt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"grid grid-cols-1 sm:grid-cols-2 gap-10 max-w-5xl mx-auto mb-14",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("h3",{className:"text-xl font-bold text-text-primary text-center mb-5",children:"Data"}),b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-7 flex-1 flex flex-col",children:[b.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber/10 flex items-center justify-center flex-shrink-0",children:b.jsx(h6,{className:"w-5 h-5 text-amber"})}),b.jsx("div",{className:"text-base font-semibold text-text-primary",children:"Airline"})]}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed mb-4 text-center",children:"Passengers calling to rebook disrupted flights — IRROPS rebooking, voluntary changes, cancellations, and vouchers."}),b.jsx("div",{className:"flex flex-wrap justify-center gap-1.5 mb-6",children:["IRROPS Rebooking","Voluntary Changes","Cancellations","Vouchers","Standby"].map(e=>b.jsx("span",{className:"px-2 py-0.5 rounded-full bg-amber/10 text-amber text-xs font-medium",children:e},e))}),b.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mt-auto",children:[b.jsxs("div",{className:"rounded-lg bg-bg-primary px-3 py-3 text-center",children:[b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"15"}),b.jsx("div",{className:"text-xs text-text-muted",children:"Tools"})]}),b.jsxs("div",{className:"rounded-lg bg-bg-primary px-3 py-3 text-center",children:[b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"50"}),b.jsx("div",{className:"text-xs text-text-muted",children:"Scenarios"})]}),b.jsxs("div",{className:"rounded-lg bg-bg-primary px-3 py-3 text-center",children:[b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"3"}),b.jsx("div",{className:"text-xs text-text-muted",children:"Trials each"})]}),b.jsxs("div",{className:"rounded-lg bg-bg-primary px-3 py-3 flex flex-col items-center justify-center",children:[b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"150"}),b.jsxs("div",{className:"text-xs text-text-muted leading-tight text-center",children:["Simulated",b.jsx("br",{}),"Conversations"]})]})]}),b.jsx("p",{className:"text-sm font-bold text-text-primary text-center mt-4",children:"More domains coming soon!"})]})]}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("h3",{className:"text-xl font-bold text-text-primary text-center mb-5",children:"Evaluation Dimensions"}),b.jsxs("div",{className:"space-y-4 flex-1 flex flex-col",children:[b.jsxs("div",{className:"rounded-xl border border-purple/30 bg-purple/5 p-7 flex-1 flex flex-col items-center justify-center text-center",children:[b.jsx("div",{className:"text-sm font-semibold text-purple-light tracking-wide uppercase mb-1",children:"EVA-A"}),b.jsx("div",{className:"text-xl font-bold text-text-primary",children:"Accuracy"}),b.jsx("p",{className:"text-sm text-text-secondary mt-2",children:"Did the agent complete the task correctly?"})]}),b.jsxs("div",{className:"rounded-xl border border-blue/30 bg-blue/5 p-7 flex-1 flex flex-col items-center justify-center text-center",children:[b.jsx("div",{className:"text-sm font-semibold text-blue-light tracking-wide uppercase mb-1",children:"EVA-X"}),b.jsx("div",{className:"text-xl font-bold text-text-primary",children:"Experience"}),b.jsx("p",{className:"text-sm text-text-secondary mt-2",children:"Was the conversational experience high quality?"})]})]})]})]}),b.jsxs(Tt.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.4},className:"flex flex-wrap justify-center gap-3",children:[b.jsxs("a",{href:"https://github.com/ServiceNow/eva",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-purple text-white font-medium text-sm hover:bg-purple-dim transition-colors",children:[b.jsx(r6,{className:"w-4 h-4"})," View on GitHub"]}),b.jsxs("a",{href:"https://huggingface.co/datasets/ServiceNow-AI/eva",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-bg-tertiary text-text-primary font-medium text-sm hover:bg-bg-hover border border-border-default transition-colors",children:[b.jsx(e6,{className:"w-4 h-4"})," Dataset"]}),b.jsxs("a",{href:"https://huggingface.co/blog/ServiceNow-AI/eva",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-bg-tertiary text-text-primary font-medium text-sm hover:bg-bg-hover border border-border-default transition-colors",children:[b.jsx(oM,{className:"w-4 h-4"})," Blog Post"]})]}),b.jsx("p",{className:"text-xs text-text-muted mt-6",children:"*Full list of contributors found in the Contributors tab"})]})})}function Fi({label:e,sublabel:t,color:n,delay:r=0}){return b.jsxs(Tt.div,{initial:{opacity:0,scale:.9},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.4,delay:r},className:"relative rounded-xl border bg-bg-secondary px-6 py-5 text-center",style:{borderColor:n+"40"},children:[b.jsx("div",{className:"text-base font-semibold text-text-primary",children:e}),t&&b.jsx("div",{className:"text-sm text-text-muted mt-1",children:t}),b.jsx("div",{className:"absolute inset-0 rounded-xl opacity-10",style:{background:`radial-gradient(ellipse at center, ${n}, transparent 70%)`}})]})}function Mn({color:e,className:t=""}){return b.jsx("div",{className:`mx-auto ${t}`,style:{width:"2px",background:`repeating-linear-gradient(to bottom, ${e}80 0px, ${e}80 6px, transparent 6px, transparent 10px)`}})}function gg({color:e,className:t=""}){return b.jsx("div",{className:t,style:{height:"2px",background:`repeating-linear-gradient(to right, ${e}80 0px, ${e}80 6px, transparent 6px, transparent 10px)`}})}function jB(){return b.jsx(wo,{id:"architecture",title:"Bot-to-Bot Architecture",subtitle:"EVA evaluates voice agents using realistic bot-to-bot audio conversations over WebSocket, then computes metrics independently on the validated conversations.",children:b.jsxs("div",{className:"max-w-5xl mx-auto relative",children:[b.jsx("div",{className:"flex justify-center px-4",children:b.jsx("div",{className:"w-full max-w-72",children:b.jsx(Fi,{label:"Evaluation Runner",sublabel:"Orchestrates parallel evaluation",color:"#8B5CF6",delay:0})})}),b.jsx(Mn,{color:"#8B5CF6",className:"h-8"}),b.jsx("div",{className:"flex justify-center px-4",children:b.jsx("div",{className:"w-full max-w-64",children:b.jsx(Fi,{label:"Conversation Worker",sublabel:"Per-scenario execution",color:"#8B5CF6",delay:.1})})}),b.jsx("div",{className:"hidden md:flex justify-center",children:b.jsxs("div",{className:"relative w-[60%]",children:[b.jsx(Mn,{color:"#8B5CF6",className:"h-5"}),b.jsx(gg,{color:"#8B5CF6",className:"w-full"}),b.jsxs("div",{className:"flex justify-between",children:[b.jsx(Mn,{color:"#38BDF8",className:"h-5"}),b.jsx(Mn,{color:"#8B5CF6",className:"h-5"})]})]})}),b.jsx("div",{className:"md:hidden",children:b.jsx(Mn,{color:"#38BDF8",className:"h-8"})}),b.jsxs("div",{className:"hidden md:grid grid-cols-[1fr_auto_1fr] gap-4 items-start",children:[b.jsxs("div",{children:[b.jsx(Fi,{label:"User Simulator",color:"#38BDF8",delay:.2}),b.jsxs("div",{className:"mt-4 space-y-2.5 pl-4",children:[b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-blue/30 pl-3 py-1",children:[b.jsx("span",{className:"text-blue-light font-medium",children:"Scenario-specific"})," — Unique goal, specific decision logic, persona & constraints per conversation"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-blue/30 pl-3 py-1",children:[b.jsx("span",{className:"text-blue-light font-medium",children:"Human-like voice"})," — Conversational TTS"]})]})]}),b.jsxs("div",{className:"flex flex-col items-center justify-center pt-6 px-2",children:[b.jsxs("div",{className:"flex items-center justify-center",children:[b.jsx("span",{className:"text-cyan font-bold",children:"←"}),b.jsx("div",{style:{width:"56px",height:"2px",background:"repeating-linear-gradient(to right, #06B6D480 0px, #06B6D480 6px, transparent 6px, transparent 10px)"}}),b.jsx("span",{className:"text-cyan font-bold",children:"→"})]}),b.jsx("div",{className:"mt-2 px-3 py-1.5 rounded-full bg-cyan/10 border border-cyan/30 text-cyan text-xs font-medium whitespace-nowrap",children:"WebSocket Audio"})]}),b.jsxs("div",{children:[b.jsx(Fi,{label:"Voice Agent",sublabel:"Pipecat Server",color:"#8B5CF6",delay:.3}),b.jsxs("div",{className:"mt-4 space-y-2.5 pl-4",children:[b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Cascade Pipeline"})," — STT + LLM + TTS"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Audio-native models"})," — S2S, LALM + TTS"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Turn Detection"})," — Built-in Pipecat Silero VAD + Smart Turn Analyzer (unless overridden by external VAD)"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Tool Executor"})," — Dynamic python tools"]})]})]})]}),b.jsxs("div",{className:"md:hidden flex flex-col items-center gap-4",children:[b.jsxs("div",{className:"w-full max-w-sm",children:[b.jsx(Fi,{label:"User Simulator",color:"#38BDF8",delay:.2}),b.jsxs("div",{className:"mt-4 space-y-2.5 pl-4",children:[b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-blue/30 pl-3 py-1",children:[b.jsx("span",{className:"text-blue-light font-medium",children:"Scenario-specific"})," — Unique goal, decision logic, persona & constraints"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-blue/30 pl-3 py-1",children:[b.jsx("span",{className:"text-blue-light font-medium",children:"Human-like voice"})," — Conversational TTS"]})]})]}),b.jsxs("div",{className:"flex flex-col items-center py-2",children:[b.jsxs("div",{className:"flex flex-col items-center",children:[b.jsx("span",{className:"text-cyan font-bold",children:"↑"}),b.jsx("div",{style:{width:"2px",height:"36px",background:"repeating-linear-gradient(to bottom, #06B6D480 0px, #06B6D480 6px, transparent 6px, transparent 10px)"}}),b.jsx("span",{className:"text-cyan font-bold",children:"↓"})]}),b.jsx("div",{className:"mt-2 px-3 py-1.5 rounded-full bg-cyan/10 border border-cyan/30 text-cyan text-xs font-medium whitespace-nowrap",children:"WebSocket Audio"})]}),b.jsxs("div",{className:"w-full max-w-sm",children:[b.jsx(Fi,{label:"Voice Agent",sublabel:"Pipecat Server",color:"#8B5CF6",delay:.3}),b.jsxs("div",{className:"mt-4 space-y-2.5 pl-4",children:[b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Cascade Pipeline"})," — STT + LLM + TTS"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Audio-native models"})," — S2S, LALM + TTS"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Turn Detection"})," — VAD + Smart Turn Analyzer"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Tool Executor"})," — Dynamic python tools"]})]})]})]}),b.jsx("div",{className:"hidden md:flex justify-center mt-3",children:b.jsxs("div",{className:"relative w-[60%]",children:[b.jsxs("div",{className:"flex justify-between",children:[b.jsx(Mn,{color:"#F59E0B",className:"h-5"}),b.jsx(Mn,{color:"#F59E0B",className:"h-5"})]}),b.jsx(gg,{color:"#F59E0B",className:"w-full"})]})}),b.jsx("div",{className:"md:hidden",children:b.jsx(Mn,{color:"#F59E0B",className:"h-8"})}),b.jsx("div",{className:"flex justify-center px-4 my-4 w-full",children:b.jsxs("div",{className:"flex flex-col md:flex-row items-stretch justify-center gap-4 md:gap-6 w-full max-w-md md:max-w-none md:w-auto",children:[b.jsxs("div",{className:"md:w-[250px] py-3 rounded-lg bg-bg-tertiary border border-border-default text-center",children:[b.jsx("div",{className:"text-sm font-medium text-text-primary",children:"Audio Files"}),b.jsx("div",{className:"text-xs text-text-muted mt-1",children:"WAV recordings (assistant, user, mixed)"})]}),b.jsxs("div",{className:"md:w-[250px] py-3 rounded-lg bg-bg-tertiary border border-border-default text-center",children:[b.jsx("div",{className:"text-sm font-medium text-text-primary",children:"Logs & Transcripts"}),b.jsx("div",{className:"text-xs text-text-muted mt-1",children:"audit_log.json, transcript.jsonl, events"})]})]})}),b.jsx("div",{className:"hidden md:flex justify-center",children:b.jsxs("div",{className:"relative",style:{width:"524px"},children:[b.jsxs("div",{className:"flex justify-between",style:{padding:"0 80px"},children:[b.jsx(Mn,{color:"#F59E0B",className:"h-5"}),b.jsx(Mn,{color:"#F59E0B",className:"h-5"})]}),b.jsx(gg,{color:"#F59E0B",className:"w-full"}),b.jsx(Mn,{color:"#F59E0B",className:"h-8"})]})}),b.jsx("div",{className:"md:hidden",children:b.jsx(Mn,{color:"#F59E0B",className:"h-8"})}),b.jsx("div",{className:"flex justify-center px-4 -mt-2",children:b.jsx("div",{className:"w-full max-w-80",children:b.jsx(Fi,{label:"Validators",sublabel:"Reruns invalid conversations",color:"#F59E0B",delay:.4})})}),b.jsx(Mn,{color:"#F59E0B",className:"h-8"}),b.jsx("div",{className:"flex justify-center px-4",children:b.jsxs("div",{className:"w-full max-w-[28rem]",children:[b.jsx(Fi,{label:"Metrics Suite",sublabel:"Independent post-execution evaluation",color:"#F59E0B",delay:.5}),b.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-5",children:[b.jsxs("div",{className:"rounded-xl border border-purple/25 bg-purple/5 px-4 py-5 text-center",children:[b.jsx("div",{className:"text-base font-bold text-purple-light",children:"EVA-A"}),b.jsx("div",{className:"text-sm text-text-muted mt-1.5",children:"3 accuracy metrics"})]}),b.jsxs("div",{className:"rounded-xl border border-blue/25 bg-blue/5 px-4 py-5 text-center",children:[b.jsx("div",{className:"text-base font-bold text-blue-light",children:"EVA-X"}),b.jsx("div",{className:"text-sm text-text-muted mt-1.5",children:"3 experience metrics"})]}),b.jsxs("div",{className:"rounded-xl border border-amber/25 bg-amber/5 px-4 py-5 text-center",children:[b.jsx("div",{className:"text-base font-bold text-amber",children:"Diagnostic"}),b.jsx("div",{className:"text-sm text-text-muted mt-1.5",children:"5 diagnostic metrics"})]})]})]})})]})})}const MB={deterministic:"Deterministic",llm_judge:"LLM Judge",lalm_judge:"Audio LLM Judge"},NB={deterministic:"#06B6D4",llm_judge:"#8B5CF6",lalm_judge:"#F59E0B"},Tu=[{id:"task_completion",displayName:"Task Completion",category:"eva-a",type:"deterministic",description:"Evaluates whether the agent correctly completed the task by comparing the expected end state of the scenario database against the actual end state after the conversation. This is a strict, deterministic comparison inspired by tau-bench-style evaluation.",inputs:"Initial scenario database state, final scenario database state, expected end state database",outputRange:"Binary: 0 (fail) or 1 (pass)",passThreshold:"1.0"},{id:"agent_tts_fidelity",displayName:"Agent Speech Fidelity",badge:"beta",category:"eva-a",type:"lalm_judge",judgeModel:"Gemini 3.1 Pro",judgeAccuracy:.8957,judgeScores:[{label:"accuracy",value:.8957,std:.0258},{label:"macro_f1",value:.856,std:.024}],description:"Measures whether the agent correctly spoke the information it intended to communicate. TTS systems can mispronounce, skip, or distort words — in a voice context, if a confirmation code is not spoken correctly, the user cannot act on it regardless of whether the LLM produced the right answer.",inputs:"Agent audio recording, intended assistant text (what LLM generated)",outputRange:"Binary per turn (0=low fidelity, 1=high fidelity), aggregated as mean across turns",passThreshold:"≥ 0.95",judgePrompt:`You are an expert evaluator judging the fidelity of this audio file against the intended text. +}`})]})]})})}function E9(){return b.jsx("section",{id:"hero",className:"pt-32 pb-20 px-4 sm:px-6 lg:px-8",children:b.jsxs("div",{className:"max-w-5xl mx-auto text-center",children:[b.jsxs("div",{children:[b.jsxs("h1",{className:"text-3xl sm:text-4xl lg:text-[2.75rem] font-extrabold mb-2 leading-tight bg-clip-text text-transparent",style:{backgroundImage:"linear-gradient(to right, #7C3AED, #818CF8, #60A5FA)"},children:["A New End-to-end Framework for",b.jsx("br",{}),"Evaluating Voice Agents (EVA)"]}),b.jsx("p",{className:"text-sm sm:text-base font-bold text-[#A78BFA] max-w-3xl mx-auto mb-2.5",children:"Tara Bogavelli, Gabrielle Gauthier Melançon, Katrina Stankiewicz, Oluwanifemi Bamgbose, Hoang Nguyen, Raghav Mehndiratta, Hari Subramani*"}),b.jsx("p",{className:"text-base sm:text-lg font-semibold text-text-secondary max-w-3xl mx-auto mb-4",children:"ServiceNow AI Research"}),b.jsx("p",{className:"text-base sm:text-lg text-text-muted max-w-3xl mx-auto mb-14 leading-relaxed",children:"An open-source evaluation framework that measures voice agents over complete, multi-turn spoken conversations using a realistic bot-to-bot architecture. EVA captures the compounding failure modes that component-level benchmarks miss."})]}),b.jsxs(Tt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"grid grid-cols-1 sm:grid-cols-2 gap-10 max-w-5xl mx-auto mb-14",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("h3",{className:"text-xl font-bold text-text-primary text-center mb-5",children:"Data"}),b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-7 flex-1 flex flex-col",children:[b.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber/10 flex items-center justify-center flex-shrink-0",children:b.jsx(h6,{className:"w-5 h-5 text-amber"})}),b.jsx("div",{className:"text-base font-semibold text-text-primary",children:"Airline"})]}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed mb-4 text-center",children:"Passengers calling to rebook disrupted flights — IRROPS rebooking, voluntary changes, cancellations, and vouchers."}),b.jsx("div",{className:"flex flex-wrap justify-center gap-1.5 mb-6",children:["IRROPS Rebooking","Voluntary Changes","Cancellations","Vouchers","Standby"].map(e=>b.jsx("span",{className:"px-2 py-0.5 rounded-full bg-amber/10 text-amber text-xs font-medium",children:e},e))}),b.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mt-auto",children:[b.jsxs("div",{className:"rounded-lg bg-bg-primary px-3 py-3 text-center",children:[b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"15"}),b.jsx("div",{className:"text-xs text-text-muted",children:"Tools"})]}),b.jsxs("div",{className:"rounded-lg bg-bg-primary px-3 py-3 text-center",children:[b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"50"}),b.jsx("div",{className:"text-xs text-text-muted",children:"Scenarios"})]}),b.jsxs("div",{className:"rounded-lg bg-bg-primary px-3 py-3 text-center",children:[b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"3"}),b.jsx("div",{className:"text-xs text-text-muted",children:"Trials each"})]}),b.jsxs("div",{className:"rounded-lg bg-bg-primary px-3 py-3 flex flex-col items-center justify-center",children:[b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"150"}),b.jsxs("div",{className:"text-xs text-text-muted leading-tight text-center",children:["Simulated",b.jsx("br",{}),"Conversations"]})]})]}),b.jsx("p",{className:"text-sm font-bold text-text-primary text-center mt-4",children:"More domains coming soon!"})]})]}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("h3",{className:"text-xl font-bold text-text-primary text-center mb-5",children:"Evaluation Dimensions"}),b.jsxs("div",{className:"space-y-4 flex-1 flex flex-col",children:[b.jsxs("div",{className:"rounded-xl border border-purple/30 bg-purple/5 p-7 flex-1 flex flex-col items-center justify-center text-center",children:[b.jsx("div",{className:"text-sm font-semibold text-purple-light tracking-wide uppercase mb-1",children:"EVA-A"}),b.jsx("div",{className:"text-xl font-bold text-text-primary",children:"Accuracy"}),b.jsx("p",{className:"text-sm text-text-secondary mt-2",children:"Did the agent complete the task correctly?"})]}),b.jsxs("div",{className:"rounded-xl border border-blue/30 bg-blue/5 p-7 flex-1 flex flex-col items-center justify-center text-center",children:[b.jsx("div",{className:"text-sm font-semibold text-blue-light tracking-wide uppercase mb-1",children:"EVA-X"}),b.jsx("div",{className:"text-xl font-bold text-text-primary",children:"Experience"}),b.jsx("p",{className:"text-sm text-text-secondary mt-2",children:"Was the conversational experience high quality?"})]})]})]})]}),b.jsxs(Tt.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.4},className:"flex flex-wrap justify-center gap-3",children:[b.jsxs("a",{href:"https://github.com/ServiceNow/eva",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-purple text-white font-medium text-sm hover:bg-purple-dim transition-colors",children:[b.jsx(r6,{className:"w-4 h-4"})," View on GitHub"]}),b.jsxs("a",{href:"https://huggingface.co/datasets/ServiceNow-AI/eva",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-bg-tertiary text-text-primary font-medium text-sm hover:bg-bg-hover border border-border-default transition-colors",children:[b.jsx(e6,{className:"w-4 h-4"})," Dataset"]}),b.jsxs("a",{href:"https://huggingface.co/blog/ServiceNow-AI/eva",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-bg-tertiary text-text-primary font-medium text-sm hover:bg-bg-hover border border-border-default transition-colors",children:[b.jsx(oM,{className:"w-4 h-4"})," Blog Post"]})]}),b.jsx("p",{className:"text-xs text-text-muted mt-6",children:"*Full list of contributors found in the Contributors tab"})]})})}function Fi({label:e,sublabel:t,color:n,delay:r=0}){return b.jsxs(Tt.div,{initial:{opacity:0,scale:.9},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.4,delay:r},className:"relative rounded-xl border bg-bg-secondary px-6 py-5 text-center",style:{borderColor:n+"40"},children:[b.jsx("div",{className:"text-base font-semibold text-text-primary",children:e}),t&&b.jsx("div",{className:"text-sm text-text-muted mt-1",children:t}),b.jsx("div",{className:"absolute inset-0 rounded-xl opacity-10",style:{background:`radial-gradient(ellipse at center, ${n}, transparent 70%)`}})]})}function Mn({color:e,className:t=""}){return b.jsx("div",{className:`mx-auto ${t}`,style:{width:"2px",background:`repeating-linear-gradient(to bottom, ${e}80 0px, ${e}80 6px, transparent 6px, transparent 10px)`}})}function gg({color:e,className:t=""}){return b.jsx("div",{className:t,style:{height:"2px",background:`repeating-linear-gradient(to right, ${e}80 0px, ${e}80 6px, transparent 6px, transparent 10px)`}})}function j9(){return b.jsx(wo,{id:"architecture",title:"Bot-to-Bot Architecture",subtitle:"EVA evaluates voice agents using realistic bot-to-bot audio conversations over WebSocket, then computes metrics independently on the validated conversations.",children:b.jsxs("div",{className:"max-w-5xl mx-auto relative",children:[b.jsx("div",{className:"flex justify-center px-4",children:b.jsx("div",{className:"w-full max-w-72",children:b.jsx(Fi,{label:"Evaluation Runner",sublabel:"Orchestrates parallel evaluation",color:"#8B5CF6",delay:0})})}),b.jsx(Mn,{color:"#8B5CF6",className:"h-8"}),b.jsx("div",{className:"flex justify-center px-4",children:b.jsx("div",{className:"w-full max-w-64",children:b.jsx(Fi,{label:"Conversation Worker",sublabel:"Per-scenario execution",color:"#8B5CF6",delay:.1})})}),b.jsx("div",{className:"hidden md:flex justify-center",children:b.jsxs("div",{className:"relative w-[60%]",children:[b.jsx(Mn,{color:"#8B5CF6",className:"h-5"}),b.jsx(gg,{color:"#8B5CF6",className:"w-full"}),b.jsxs("div",{className:"flex justify-between",children:[b.jsx(Mn,{color:"#38BDF8",className:"h-5"}),b.jsx(Mn,{color:"#8B5CF6",className:"h-5"})]})]})}),b.jsx("div",{className:"md:hidden",children:b.jsx(Mn,{color:"#38BDF8",className:"h-8"})}),b.jsxs("div",{className:"hidden md:grid grid-cols-[1fr_auto_1fr] gap-4 items-start",children:[b.jsxs("div",{children:[b.jsx(Fi,{label:"User Simulator",color:"#38BDF8",delay:.2}),b.jsxs("div",{className:"mt-4 space-y-2.5 pl-4",children:[b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-blue/30 pl-3 py-1",children:[b.jsx("span",{className:"text-blue-light font-medium",children:"Scenario-specific"})," — Unique goal, specific decision logic, persona & constraints per conversation"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-blue/30 pl-3 py-1",children:[b.jsx("span",{className:"text-blue-light font-medium",children:"Human-like voice"})," — Conversational TTS"]})]})]}),b.jsxs("div",{className:"flex flex-col items-center justify-center pt-6 px-2",children:[b.jsxs("div",{className:"flex items-center justify-center",children:[b.jsx("span",{className:"text-cyan font-bold",children:"←"}),b.jsx("div",{style:{width:"56px",height:"2px",background:"repeating-linear-gradient(to right, #06B6D480 0px, #06B6D480 6px, transparent 6px, transparent 10px)"}}),b.jsx("span",{className:"text-cyan font-bold",children:"→"})]}),b.jsx("div",{className:"mt-2 px-3 py-1.5 rounded-full bg-cyan/10 border border-cyan/30 text-cyan text-xs font-medium whitespace-nowrap",children:"WebSocket Audio"})]}),b.jsxs("div",{children:[b.jsx(Fi,{label:"Voice Agent",sublabel:"Pipecat Server",color:"#8B5CF6",delay:.3}),b.jsxs("div",{className:"mt-4 space-y-2.5 pl-4",children:[b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Cascade Pipeline"})," — STT + LLM + TTS"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Audio-native models"})," — S2S, LALM + TTS"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Turn Detection"})," — Built-in Pipecat Silero VAD + Smart Turn Analyzer (unless overridden by external VAD)"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Tool Executor"})," — Dynamic python tools"]})]})]})]}),b.jsxs("div",{className:"md:hidden flex flex-col items-center gap-4",children:[b.jsxs("div",{className:"w-full max-w-sm",children:[b.jsx(Fi,{label:"User Simulator",color:"#38BDF8",delay:.2}),b.jsxs("div",{className:"mt-4 space-y-2.5 pl-4",children:[b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-blue/30 pl-3 py-1",children:[b.jsx("span",{className:"text-blue-light font-medium",children:"Scenario-specific"})," — Unique goal, decision logic, persona & constraints"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-blue/30 pl-3 py-1",children:[b.jsx("span",{className:"text-blue-light font-medium",children:"Human-like voice"})," — Conversational TTS"]})]})]}),b.jsxs("div",{className:"flex flex-col items-center py-2",children:[b.jsxs("div",{className:"flex flex-col items-center",children:[b.jsx("span",{className:"text-cyan font-bold",children:"↑"}),b.jsx("div",{style:{width:"2px",height:"36px",background:"repeating-linear-gradient(to bottom, #06B6D480 0px, #06B6D480 6px, transparent 6px, transparent 10px)"}}),b.jsx("span",{className:"text-cyan font-bold",children:"↓"})]}),b.jsx("div",{className:"mt-2 px-3 py-1.5 rounded-full bg-cyan/10 border border-cyan/30 text-cyan text-xs font-medium whitespace-nowrap",children:"WebSocket Audio"})]}),b.jsxs("div",{className:"w-full max-w-sm",children:[b.jsx(Fi,{label:"Voice Agent",sublabel:"Pipecat Server",color:"#8B5CF6",delay:.3}),b.jsxs("div",{className:"mt-4 space-y-2.5 pl-4",children:[b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Cascade Pipeline"})," — STT + LLM + TTS"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Audio-native models"})," — S2S, LALM + TTS"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Turn Detection"})," — VAD + Smart Turn Analyzer"]}),b.jsxs("div",{className:"text-sm text-text-muted border-l-2 border-purple/30 pl-3 py-1",children:[b.jsx("span",{className:"text-purple-light font-medium",children:"Tool Executor"})," — Dynamic python tools"]})]})]})]}),b.jsx("div",{className:"hidden md:flex justify-center mt-3",children:b.jsxs("div",{className:"relative w-[60%]",children:[b.jsxs("div",{className:"flex justify-between",children:[b.jsx(Mn,{color:"#F59E0B",className:"h-5"}),b.jsx(Mn,{color:"#F59E0B",className:"h-5"})]}),b.jsx(gg,{color:"#F59E0B",className:"w-full"})]})}),b.jsx("div",{className:"md:hidden",children:b.jsx(Mn,{color:"#F59E0B",className:"h-8"})}),b.jsx("div",{className:"flex justify-center px-4 my-4 w-full",children:b.jsxs("div",{className:"flex flex-col md:flex-row items-stretch justify-center gap-4 md:gap-6 w-full max-w-md md:max-w-none md:w-auto",children:[b.jsxs("div",{className:"md:w-[250px] py-3 rounded-lg bg-bg-tertiary border border-border-default text-center",children:[b.jsx("div",{className:"text-sm font-medium text-text-primary",children:"Audio Files"}),b.jsx("div",{className:"text-xs text-text-muted mt-1",children:"WAV recordings (assistant, user, mixed)"})]}),b.jsxs("div",{className:"md:w-[250px] py-3 rounded-lg bg-bg-tertiary border border-border-default text-center",children:[b.jsx("div",{className:"text-sm font-medium text-text-primary",children:"Logs & Transcripts"}),b.jsx("div",{className:"text-xs text-text-muted mt-1",children:"audit_log.json, transcript.jsonl, events"})]})]})}),b.jsx("div",{className:"hidden md:flex justify-center",children:b.jsxs("div",{className:"relative",style:{width:"524px"},children:[b.jsxs("div",{className:"flex justify-between",style:{padding:"0 80px"},children:[b.jsx(Mn,{color:"#F59E0B",className:"h-5"}),b.jsx(Mn,{color:"#F59E0B",className:"h-5"})]}),b.jsx(gg,{color:"#F59E0B",className:"w-full"}),b.jsx(Mn,{color:"#F59E0B",className:"h-8"})]})}),b.jsx("div",{className:"md:hidden",children:b.jsx(Mn,{color:"#F59E0B",className:"h-8"})}),b.jsx("div",{className:"flex justify-center px-4 -mt-2",children:b.jsx("div",{className:"w-full max-w-80",children:b.jsx(Fi,{label:"Validators",sublabel:"Reruns invalid conversations",color:"#F59E0B",delay:.4})})}),b.jsx(Mn,{color:"#F59E0B",className:"h-8"}),b.jsx("div",{className:"flex justify-center px-4",children:b.jsxs("div",{className:"w-full max-w-[28rem]",children:[b.jsx(Fi,{label:"Metrics Suite",sublabel:"Independent post-execution evaluation",color:"#F59E0B",delay:.5}),b.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-5",children:[b.jsxs("div",{className:"rounded-xl border border-purple/25 bg-purple/5 px-4 py-5 text-center",children:[b.jsx("div",{className:"text-base font-bold text-purple-light",children:"EVA-A"}),b.jsx("div",{className:"text-sm text-text-muted mt-1.5",children:"3 accuracy metrics"})]}),b.jsxs("div",{className:"rounded-xl border border-blue/25 bg-blue/5 px-4 py-5 text-center",children:[b.jsx("div",{className:"text-base font-bold text-blue-light",children:"EVA-X"}),b.jsx("div",{className:"text-sm text-text-muted mt-1.5",children:"3 experience metrics"})]}),b.jsxs("div",{className:"rounded-xl border border-amber/25 bg-amber/5 px-4 py-5 text-center",children:[b.jsx("div",{className:"text-base font-bold text-amber",children:"Diagnostic"}),b.jsx("div",{className:"text-sm text-text-muted mt-1.5",children:"5 diagnostic metrics"})]})]})]})})]})})}const M9={deterministic:"Deterministic",llm_judge:"LLM Judge",lalm_judge:"Audio LLM Judge"},N9={deterministic:"#06B6D4",llm_judge:"#8B5CF6",lalm_judge:"#F59E0B"},Tu=[{id:"task_completion",displayName:"Task Completion",category:"eva-a",type:"deterministic",description:"Evaluates whether the agent correctly completed the task by comparing the expected end state of the scenario database against the actual end state after the conversation. This is a strict, deterministic comparison inspired by tau-bench-style evaluation.",inputs:"Initial scenario database state, final scenario database state, expected end state database",outputRange:"Binary: 0 (fail) or 1 (pass)",passThreshold:"1.0"},{id:"agent_tts_fidelity",displayName:"Agent Speech Fidelity",badge:"beta",category:"eva-a",type:"lalm_judge",judgeModel:"Gemini 3.1 Pro",judgeAccuracy:.8957,judgeScores:[{label:"accuracy",value:.8957,std:.0258},{label:"macro_f1",value:.856,std:.024}],description:"Measures whether the agent correctly spoke the information it intended to communicate. TTS systems can mispronounce, skip, or distort words — in a voice context, if a confirmation code is not spoken correctly, the user cannot act on it regardless of whether the LLM produced the right answer.",inputs:"Agent audio recording, intended assistant text (what LLM generated)",outputRange:"Binary per turn (0=low fidelity, 1=high fidelity), aggregated as mean across turns",passThreshold:"≥ 0.95",judgePrompt:`You are an expert evaluator judging the fidelity of this audio file against the intended text. You will listen to one audio clip and verify that the spoken content faithfully reproduces the intended text, with special attention to TTS-critical entities. The audio provided is a recording of the agent's side of a conversation, and contains only the agent responses, not the user. @@ -1024,10 +1024,10 @@ Respond with a JSON object. Each turn entry must include the turn_id matching th "rating": <1, 2, 3> }} ] -}}`}],kB=Tu.filter(e=>e.category==="eva-a"),CB=Tu.filter(e=>e.category==="eva-x"),s2=Tu.filter(e=>e.category==="debug"),o2=Tu.filter(e=>e.category==="validation");Tu.filter(e=>e.type==="llm_judge"||e.type==="lalm_judge");function DB({prompt:e,model:t}){const[n,r]=A.useState(!1),s=A.useCallback(()=>r(!1),[]);return A.useEffect(()=>{if(!n)return;const o=u=>{u.key==="Escape"&&s()};return document.addEventListener("keydown",o),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=""}},[n,s]),b.jsxs(b.Fragment,{children:[b.jsxs("button",{onClick:()=>r(!0),className:"mt-3 flex items-center gap-1.5 text-xs font-medium text-purple-light hover:text-purple transition-colors",children:["View Judge Prompt",t&&b.jsxs("span",{className:"text-text-muted",children:["(",t,")"]})]}),n&&b.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",onClick:o=>{o.target===o.currentTarget&&s()},children:[b.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm"}),b.jsxs("div",{className:"relative w-full max-w-4xl max-h-[85vh] flex flex-col rounded-xl border border-border-default bg-bg-primary shadow-2xl",children:[b.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border-default flex-shrink-0",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-sm font-semibold text-text-primary",children:"Judge Prompt"}),t&&b.jsxs("div",{className:"text-xs text-text-muted mt-0.5",children:["Model: ",t]})]}),b.jsx("button",{onClick:s,className:"p-1.5 rounded-lg hover:bg-bg-hover transition-colors text-text-muted hover:text-text-primary",children:b.jsx(cM,{className:"w-5 h-5"})})]}),b.jsx("div",{className:"overflow-y-auto flex-1",children:b.jsx("pre",{className:"px-6 py-5 text-[13px] leading-relaxed text-text-primary font-mono whitespace-pre-wrap break-words",children:e})})]})]})]})}const PB={deterministic:QR,llm_judge:lM,lalm_judge:Gy};function mf({metric:e}){const[t,n]=A.useState(!1),[r,s]=A.useState(!1),o=PB[e.type],u=NB[e.type];return b.jsxs(Tt.div,{layout:!0,className:"rounded-xl border border-border-default bg-bg-secondary overflow-hidden",children:[b.jsxs("button",{onClick:()=>n(!t),className:"w-full flex items-center justify-between p-5 text-left hover:bg-bg-hover/30 transition-colors",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:u+"20"},children:b.jsx(o,{className:"w-5 h-5",style:{color:u}})}),b.jsxs("div",{children:[b.jsxs("div",{className:"text-base font-semibold text-text-primary",children:[e.displayName,e.badge&&b.jsx("span",{className:"ml-2 text-[10px] px-1.5 py-0.5 rounded-full bg-amber/10 text-amber border border-amber/20 font-medium uppercase align-middle",children:e.badge})]}),b.jsxs("div",{className:"text-xs font-medium mt-0.5",style:{color:u},children:[MB[e.type],e.judgeModel&&b.jsxs("span",{className:"text-text-muted",children:[" · ",e.judgeModel]})]})]})]}),b.jsx(ai,{className:`w-5 h-5 text-text-muted transition-transform ${t?"rotate-180":""}`})]}),b.jsx(KA,{children:t&&b.jsx(Tt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:b.jsxs("div",{className:"px-5 pb-5 space-y-4",children:[b.jsx("div",{className:"border-t border-border-default pt-4",children:b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:e.description})}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-1.5",children:"Inputs"}),b.jsx("div",{className:"text-sm text-text-secondary leading-relaxed",children:e.inputs})]}),b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-1.5",children:"Output"}),b.jsx("div",{className:"text-sm text-text-secondary leading-relaxed",children:e.outputRange})]}),e.passThreshold&&b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-1.5",children:"Pass Threshold"}),b.jsx("div",{className:"text-sm text-text-secondary leading-relaxed",children:e.passThreshold})]})]}),e.judgePrompt&&b.jsx(DB,{prompt:e.judgePrompt,model:e.judgeModel}),e.judgeScores&&e.judgeScores.length>0&&b.jsxs("div",{className:"rounded-lg border border-border-default overflow-hidden",children:[b.jsxs("button",{onClick:()=>s(!r),className:"w-full flex items-center justify-between px-4 py-3 text-left hover:bg-bg-hover/30 transition-colors",children:[b.jsx("div",{className:"text-sm font-semibold text-text-secondary",children:"Judge Accuracy"}),b.jsx(ai,{className:`w-4 h-4 text-text-muted transition-transform ${r?"rotate-180":""}`})]}),b.jsx(KA,{children:r&&b.jsx(Tt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},className:"overflow-hidden",children:b.jsxs("div",{className:"px-4 pb-4 space-y-3",children:[b.jsx("div",{className:"border-t border-border-default pt-3",children:b.jsx("div",{className:"flex flex-wrap gap-3",children:e.judgeScores.map(({label:f,value:d,std:h})=>b.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-bg-primary px-3 py-2",children:[b.jsx("span",{className:"text-xs text-text-muted font-mono",children:f}),b.jsxs("span",{className:"text-sm font-semibold text-text-primary",children:[(d*100).toFixed(1),"%",h!=null&&b.jsxs("span",{className:"text-text-muted font-normal text-xs ml-1",children:["(±",(h*100).toFixed(1),"%)"]})]})]},f))})}),e.developmentDocUrl&&b.jsxs("a",{href:e.developmentDocUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm text-accent-primary hover:text-accent-hover transition-colors",children:["View judge development details",b.jsx(oM,{className:"w-3.5 h-3.5"})]}),e.judgeDevelopmentNotes&&b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:e.judgeDevelopmentNotes})]})})})]})]})})})]})}function RB(){const[e,t]=A.useState(!1);return b.jsxs(wo,{id:"metrics",title:"Evaluation Methodology",subtitle:"EVA produces two fundamental scores composed of multiple sub-metrics. Click any metric to explore what it measures, its inputs, and the judge prompt.",children:[b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[b.jsxs(Tt.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5},children:[b.jsxs("div",{className:"rounded-xl border-2 border-purple/30 bg-purple/5 p-5 text-center",children:[b.jsx("div",{className:"text-sm font-bold text-purple-light tracking-widest uppercase mb-1",children:"EVA-A"}),b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"Accuracy"}),b.jsx("p",{className:"text-sm text-text-secondary mt-1.5",children:"Did the agent complete the task correctly?"})]}),b.jsx("div",{className:"flex justify-center",children:b.jsx("div",{className:"w-px h-5 bg-purple/30"})}),b.jsx("div",{className:"space-y-3 pt-0",children:kB.map(n=>b.jsx(mf,{metric:n},n.id))})]}),b.jsxs(Tt.div,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:.1},children:[b.jsxs("div",{className:"rounded-xl border-2 border-blue/30 bg-blue/5 p-5 text-center",children:[b.jsx("div",{className:"text-sm font-bold text-blue-light tracking-widest uppercase mb-1",children:"EVA-X"}),b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"Experience"}),b.jsx("p",{className:"text-sm text-text-secondary mt-1.5",children:"Was the conversational experience high quality?"})]}),b.jsx("div",{className:"flex justify-center",children:b.jsx("div",{className:"w-px h-5 bg-blue/30"})}),b.jsx("div",{className:"space-y-3 pt-0",children:CB.map(n=>b.jsx(mf,{metric:n},n.id))})]})]}),b.jsxs("div",{className:"mt-10",children:[b.jsxs("div",{className:"mb-6",children:[b.jsx("h3",{className:"text-xl font-bold text-text-primary mb-2",children:"Aggregate Metrics"}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:"EVA aggregates per-trial metric scores into four aggregate metrics, each capturing a different aspect of success and reliability."})]}),b.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary mb-2",children:"pass@1"}),b.jsxs("p",{className:"text-sm text-text-secondary leading-relaxed",children:["For each scenario, the proportion of trials where ",b.jsx("em",{children:"all"})," metric thresholds are met (",b.jsx("em",{children:"c"}),"/",b.jsx("em",{children:"n"}),"), where ",b.jsx("em",{children:"c"})," is the number of passing trials and ",b.jsx("em",{children:"n"})," is the total number of trials (n=3), then averaged across all scenarios."]})]}),b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary mb-2",children:"pass@k (k=3)"}),b.jsxs("p",{className:"text-sm text-text-secondary leading-relaxed",children:["For each scenario, 1 if at least one of the k (3) trials meets pass criteria for all metrics, otherwise 0, then averaged across all scenarios. Measures whether the system ",b.jsx("em",{children:"can"})," succeed."]})]}),b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary mb-2",children:"pass^k (k=3)"}),b.jsxs("p",{className:"text-sm text-text-secondary leading-relaxed",children:["For each scenario, we estimate the theoretical probability of passing k = 3 consecutive independent trials as (",b.jsx("em",{children:"c"}),"/",b.jsx("em",{children:"n"}),")",b.jsx("sup",{children:"k"})," where c is the number of passing trials out of n = 3 total. We then average this value across all scenarios to measure consistency and reliability."]})]}),b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary mb-2",children:"Mean"}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:"For each sample, we average sub-metric scores per dimension, then average across all 150 samples. Raw scores avoid binarizing near-boundary differences into a full pass/fail gap, capturing more nuanced system comparisons."})]})]})]}),b.jsxs("div",{className:"mt-10",children:[b.jsxs("button",{onClick:()=>t(!e),className:"w-full flex items-center justify-between rounded-xl border border-border-default bg-bg-secondary px-6 py-5 hover:bg-bg-hover/30 transition-colors",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-base font-semibold text-text-secondary text-left",children:"Diagnostic & Validation Metrics"}),b.jsxs("div",{className:"text-sm text-text-muted mt-1 text-left",children:[s2.length+o2.length," additional metrics for diagnostics and quality control"]})]}),b.jsx(ai,{className:`w-5 h-5 text-text-muted transition-transform ${e?"rotate-180":""}`})]}),e&&b.jsxs("div",{className:"mt-4 grid grid-cols-1 lg:grid-cols-2 gap-8 opacity-80",children:[b.jsxs("div",{children:[b.jsxs("div",{className:"px-1 mb-4",children:[b.jsx("div",{className:"text-sm font-semibold text-text-muted uppercase tracking-wider mb-1",children:"Diagnostic Metrics"}),b.jsxs("p",{className:"text-sm text-text-muted leading-relaxed",children:["Diagnostic metrics for understanding ",b.jsx("em",{children:"why"})," the core scores look the way they do. These help identify which pipeline component (STT, LLM, TTS) is contributing to failures but are not part of the EVA-A or EVA-X scores."]})]}),b.jsx("div",{className:"space-y-3",children:s2.map(n=>b.jsx(mf,{metric:n},n.id))})]}),b.jsxs("div",{children:[b.jsxs("div",{className:"px-1 mb-4",children:[b.jsx("div",{className:"text-sm font-semibold text-text-muted uppercase tracking-wider mb-1",children:"Validation Metrics"}),b.jsx("p",{className:"text-sm text-text-muted leading-relaxed",children:"Validators run before evaluation. Any conversation that fails validation is regenerated so that core metrics are only computed on conversations with a well-behaved user simulator and properly completed interactions."})]}),b.jsx("div",{className:"space-y-3",children:o2.map(n=>b.jsx(mf,{metric:n},n.id))})]})]})]}),b.jsxs("div",{className:"flex flex-wrap justify-center gap-6 mt-8",children:[b.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3.5 h-3.5 rounded bg-cyan/20 border border-cyan/40"}),"Deterministic (Code)"]}),b.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3.5 h-3.5 rounded bg-purple/20 border border-purple/40"}),"LLM Judge (Text)"]}),b.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3.5 h-3.5 rounded bg-amber/20 border border-amber/40"}),"Audio LLM Judge (LALM)"]})]})]})}function ZN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t{var{children:n,width:r,height:s,viewBox:o,className:u,style:f,title:d,desc:h}=e,m=UB(e,BB),p=o||{width:r,height:s,x:0,y:0},v=et("recharts-surface",u);return A.createElement("svg",xv({},er(m),{className:v,width:r,height:s,style:f,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:t}),A.createElement("title",null,d),A.createElement("desc",null,h),n)}),qB=["children","className"];function wv(){return wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:n,className:r}=e,s=$B(e,qB),o=et("recharts-layer",r);return A.createElement("g",wv({className:o},er(s),{ref:t}),n)}),G0=iM(),HB=A.createContext(null);function Ye(e){return function(){return e}}const tk=Math.cos,Qf=Math.sin,pr=Math.sqrt,Jf=Math.PI,Yd=2*Jf,_v=Math.PI,Sv=2*_v,Ra=1e-6,KB=Sv-Ra;function nk(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return nk;const n=10**t;return function(r){this._+=r[0];for(let s=1,o=r.length;sRa)if(!(Math.abs(p*d-h*m)>Ra)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-u,w=s-f,_=d*d+h*h,S=x*x+w*w,O=Math.sqrt(_),M=Math.sqrt(v),j=o*Math.tan((_v-Math.acos((_+v-S)/(2*O*M)))/2),N=j/M,k=j/O;Math.abs(N-1)>Ra&&this._append`L${t+N*m},${n+N*p}`,this._append`A${o},${o},0,0,${+(p*x>m*w)},${this._x1=t+k*d},${this._y1=n+k*h}`}}arc(t,n,r,s,o,u){if(t=+t,n=+n,r=+r,u=!!u,r<0)throw new Error(`negative radius: ${r}`);let f=r*Math.cos(s),d=r*Math.sin(s),h=t+f,m=n+d,p=1^u,v=u?s-o:o-s;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>Ra||Math.abs(this._y1-m)>Ra)&&this._append`L${h},${m}`,r&&(v<0&&(v=v%Sv+Sv),v>KB?this._append`A${r},${r},0,1,${p},${t-f},${n-d}A${r},${r},0,1,${p},${this._x1=h},${this._y1=m}`:v>Ra&&this._append`A${r},${r},0,${+(v>=_v)},${p},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+s}h${-r}Z`}toString(){return this._}}function W0(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new YB(t)}function Z0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rk(e){this._context=e}rk.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 Gd(e){return new rk(e)}function ik(e){return e[0]}function ak(e){return e[1]}function sk(e,t){var n=Ye(!0),r=null,s=Gd,o=null,u=W0(f);e=typeof e=="function"?e:e===void 0?ik:Ye(e),t=typeof t=="function"?t:t===void 0?ak:Ye(t);function f(d){var h,m=(d=Z0(d)).length,p,v=!1,x;for(r==null&&(o=s(x=u())),h=0;h<=m;++h)!(h=x;--w)f.point(j[w],N[w]);f.lineEnd(),f.areaEnd()}O&&(j[v]=+e(S,v,p),N[v]=+t(S,v,p),f.point(r?+r(S,v,p):j[v],n?+n(S,v,p):N[v]))}if(M)return f=null,M+""||null}function m(){return sk().defined(s).curve(u).context(o)}return h.x=function(p){return arguments.length?(e=typeof p=="function"?p:Ye(+p),r=null,h):e},h.x0=function(p){return arguments.length?(e=typeof p=="function"?p:Ye(+p),h):e},h.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:Ye(+p),h):r},h.y=function(p){return arguments.length?(t=typeof p=="function"?p:Ye(+p),n=null,h):t},h.y0=function(p){return arguments.length?(t=typeof p=="function"?p:Ye(+p),h):t},h.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:Ye(+p),h):n},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(n)},h.lineX1=function(){return m().x(r).y(t)},h.defined=function(p){return arguments.length?(s=typeof p=="function"?p:Ye(!!p),h):s},h.curve=function(p){return arguments.length?(u=p,o!=null&&(f=u(o)),h):u},h.context=function(p){return arguments.length?(p==null?o=f=null:f=u(o=p),h):o},h}class ok{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function GB(e){return new ok(e,!0)}function WB(e){return new ok(e,!1)}const Q0={draw(e,t){const n=pr(t/Jf);e.moveTo(n,0),e.arc(0,0,n,0,Yd)}},ZB={draw(e,t){const n=pr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},lk=pr(1/3),QB=lk*2,JB={draw(e,t){const n=pr(t/QB),r=n*lk;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},e9={draw(e,t){const n=pr(t),r=-n/2;e.rect(r,r,n,n)}},t9=.8908130915292852,uk=Qf(Jf/10)/Qf(7*Jf/10),n9=Qf(Yd/10)*uk,r9=-tk(Yd/10)*uk,i9={draw(e,t){const n=pr(t*t9),r=n9*n,s=r9*n;e.moveTo(0,-n),e.lineTo(r,s);for(let o=1;o<5;++o){const u=Yd*o/5,f=tk(u),d=Qf(u);e.lineTo(d*n,-f*n),e.lineTo(f*r-d*s,d*r+f*s)}e.closePath()}},yg=pr(3),a9={draw(e,t){const n=-pr(t/(yg*3));e.moveTo(0,n*2),e.lineTo(-yg*n,-n),e.lineTo(yg*n,-n),e.closePath()}},Kn=-.5,Xn=pr(3)/2,Av=1/pr(12),s9=(Av/2+1)*3,o9={draw(e,t){const n=pr(t/s9),r=n/2,s=n*Av,o=r,u=n*Av+n,f=-o,d=u;e.moveTo(r,s),e.lineTo(o,u),e.lineTo(f,d),e.lineTo(Kn*r-Xn*s,Xn*r+Kn*s),e.lineTo(Kn*o-Xn*u,Xn*o+Kn*u),e.lineTo(Kn*f-Xn*d,Xn*f+Kn*d),e.lineTo(Kn*r+Xn*s,Kn*s-Xn*r),e.lineTo(Kn*o+Xn*u,Kn*u-Xn*o),e.lineTo(Kn*f+Xn*d,Kn*d-Xn*f),e.closePath()}};function l9(e,t){let n=null,r=W0(s);e=typeof e=="function"?e:Ye(e||Q0),t=typeof t=="function"?t:Ye(t===void 0?64:+t);function s(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return s.type=function(o){return arguments.length?(e=typeof o=="function"?o:Ye(o),s):e},s.size=function(o){return arguments.length?(t=typeof o=="function"?o:Ye(+o),s):t},s.context=function(o){return arguments.length?(n=o??null,s):n},s}function ed(){}function td(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ck(e){this._context=e}ck.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:td(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:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function u9(e){return new ck(e)}function fk(e){this._context=e}fk.prototype={areaStart:ed,areaEnd:ed,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:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function c9(e){return new fk(e)}function dk(e){this._context=e}dk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function f9(e){return new dk(e)}function hk(e){this._context=e}hk.prototype={areaStart:ed,areaEnd:ed,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 d9(e){return new hk(e)}function l2(e){return e<0?-1:1}function u2(e,t,n){var r=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(r||s<0&&-0),u=(n-e._y1)/(s||r<0&&-0),f=(o*s+u*r)/(r+s);return(l2(o)+l2(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(f))||0}function c2(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function vg(e,t,n){var r=e._x0,s=e._y0,o=e._x1,u=e._y1,f=(o-r)/3;e._context.bezierCurveTo(r+f,s+f*t,o-f,u-f*n,o,u)}function nd(e){this._context=e}nd.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:vg(this,this._t0,c2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,vg(this,c2(this,n=u2(this,e,t)),n);break;default:vg(this,this._t0,n=u2(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function mk(e){this._context=new pk(e)}(mk.prototype=Object.create(nd.prototype)).point=function(e,t){nd.prototype.point.call(this,t,e)};function pk(e){this._context=e}pk.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,s,o){this._context.bezierCurveTo(t,e,r,n,o,s)}};function h9(e){return new nd(e)}function m9(e){return new mk(e)}function gk(e){this._context=e}gk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=f2(e),s=f2(t),o=0,u=1;u=0;--t)s[t]=(u[t]-s[t+1])/o[t];for(o[n-1]=(e[n]+s[n-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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function g9(e){return new Wd(e,.5)}function y9(e){return new Wd(e,0)}function v9(e){return new Wd(e,1)}function Ya(e,t){if((u=e.length)>1)for(var n=1,r,s,o=e[t[0]],u,f=o.length;n=0;)n[t]=t;return n}function b9(e,t){return e[t]}function x9(e){const t=[];return t.key=e,t}function w9(){var e=Ye([]),t=Tv,n=Ya,r=b9;function s(o){var u=Array.from(e.apply(this,arguments),x9),f,d=u.length,h=-1,m;for(const p of o)for(f=0,++h;f0){for(var n,r,s=0,o=e[0].length,u;s0){for(var n=0,r=e[t[0]],s,o=r.length;n0)||!((o=(s=e[t[0]]).length)>0))){for(var n=0,r=1,s,o,u;r1&&arguments[1]!==void 0?arguments[1]:M9,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function ut(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{var f=n[u-1];return typeof f=="string"?s+f+o:f!==void 0?s+Ji(f)+o:s+o},"")}var Wn=e=>e===0?0:e>0?1:-1,oi=e=>typeof e=="number"&&e!=+e,Ga=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ye=e=>(typeof e=="number"||e instanceof Number)&&!oi(e),kr=e=>ye(e)||typeof e=="string",N9=0,au=e=>{var t=++N9;return"".concat(e||"").concat(t)},ra=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ye(t)&&typeof t!="string")return r;var o;if(Ga(t)){if(n==null)return r;var u=t.indexOf("%");o=n*parseFloat(t.slice(0,u))/100}else o=+t;return oi(o)&&(o=r),s&&n!=null&&o>n&&(o=n),o},vk=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;rr&&(typeof t=="function"?t(r):co(r,t))===n)}var k9=e=>{for(var t=e.length,n=0,r=0,s=0,o=0,u=1/0,f=-1/0,d=0,h=0,m=0;me===null||typeof e>"u",Ou=e=>dt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function mn(e){return e!=null}function _o(){}var C9=["type","size","sizeType"];function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t="symbol".concat(Ou(e));return xk[t]||Q0},U9=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*I9;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},V9=(e,t)=>{xk["symbol".concat(Ou(e))]=t},nb=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,s=L9(e,C9),o=x2(x2({},s),{},{type:t,size:n,sizeType:r}),u="circle";typeof t=="string"&&(u=t);var f=()=>{var v=B9(u),x=l9().type(v).size(U9(n,r,u)),w=x();if(w!==null)return w},{className:d,cx:h,cy:m}=o,p=er(o);return ye(h)&&ye(m)&&ye(n)?A.createElement("path",Ov({},p,{className:et("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(m,")"),d:f()})):null};nb.registerSymbol=V9;var wk=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,q9=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(A.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(s=>{X0(s)&&typeof n[s]=="function"&&(r[s]=(o=>n[s](n,o)))}),r},$9=(e,t,n)=>r=>(e(t,n,r),null),_k=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(s=>{var o=e[s];X0(s)&&typeof o=="function"&&(r||(r={}),r[s]=$9(o,t,n))}),r},F9=e=>Array.isArray(e)&&e.length>0;function w2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function H9(e){for(var t=1;t(u[f]===void 0&&r[f]!==void 0&&(u[f]=r[f]),u),n);return o}var Og={},Eg={},_2;function G9(){return _2||(_2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const s=new Map;for(let o=0;o=0}e.isLength=t})(Cg)),Cg}var O2;function Ak(){return O2||(O2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Z9();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(kg)),kg}var Dg={},E2;function Q9(){return E2||(E2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(Dg)),Dg}var j2;function J9(){return j2||(j2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ak(),n=Q9();function r(s){return n.isObjectLike(s)&&t.isArrayLike(s)}e.isArrayLikeObject=r})(Ng)),Ng}var Pg={},Rg={},M2;function e7(){return M2||(M2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tb();function n(r){return function(s){return t.get(s,r)}}e.property=n})(Rg)),Rg}var Lg={},zg={},Ig={},Bg={},N2;function Tk(){return N2||(N2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Bg)),Bg}var Ug={},k2;function Ok(){return k2||(k2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(Ug)),Ug}var Vg={},C2;function Ek(){return C2||(C2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(Vg)),Vg}var D2;function t7(){return D2||(D2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tk(),n=Ok(),r=Ek();function s(m,p,v){return typeof v!="function"?s(m,p,()=>{}):o(m,p,function x(w,_,S,O,M,j){const N=v(w,_,S,O,M,j);return N!==void 0?!!N:o(w,_,x,j)},new Map)}function o(m,p,v,x){if(p===m)return!0;switch(typeof p){case"object":return u(m,p,v,x);case"function":return Object.keys(p).length>0?o(m,{...p},v,x):r.isEqualsSameValueZero(m,p);default:return t.isObject(m)?typeof p=="string"?p==="":!0:r.isEqualsSameValueZero(m,p)}}function u(m,p,v,x){if(p==null)return!0;if(Array.isArray(p))return d(m,p,v,x);if(p instanceof Map)return f(m,p,v,x);if(p instanceof Set)return h(m,p,v,x);const w=Object.keys(p);if(m==null||n.isPrimitive(m))return w.length===0;if(w.length===0)return!0;if(x?.has(p))return x.get(p)===m;x?.set(p,m);try{for(let _=0;_{})}e.isMatch=n})(zg)),zg}var qg={},$g={},Fg={},R2;function n7(){return R2||(R2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(Fg)),Fg}var Hg={},L2;function rb(){return L2||(L2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(Hg)),Hg}var Kg={},z2;function Mk(){return z2||(z2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",s="[object Boolean]",o="[object Arguments]",u="[object Symbol]",f="[object Date]",d="[object Map]",h="[object Set]",m="[object Array]",p="[object Function]",v="[object ArrayBuffer]",x="[object Object]",w="[object Error]",_="[object DataView]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",M="[object Uint16Array]",j="[object Uint32Array]",N="[object BigUint64Array]",k="[object Int8Array]",C="[object Int16Array]",L="[object Int32Array]",I="[object BigInt64Array]",Y="[object Float32Array]",te="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=v,e.arrayTag=m,e.bigInt64ArrayTag=I,e.bigUint64ArrayTag=N,e.booleanTag=s,e.dataViewTag=_,e.dateTag=f,e.errorTag=w,e.float32ArrayTag=Y,e.float64ArrayTag=te,e.functionTag=p,e.int16ArrayTag=C,e.int32ArrayTag=L,e.int8ArrayTag=k,e.mapTag=d,e.numberTag=r,e.objectTag=x,e.regexpTag=t,e.setTag=h,e.stringTag=n,e.symbolTag=u,e.uint16ArrayTag=M,e.uint32ArrayTag=j,e.uint8ArrayTag=S,e.uint8ClampedArrayTag=O})(Kg)),Kg}var Xg={},I2;function r7(){return I2||(I2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(Xg)),Xg}var B2;function Nk(){return B2||(B2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=n7(),n=rb(),r=Mk(),s=Ok(),o=r7();function u(m,p){return f(m,void 0,m,new Map,p)}function f(m,p,v,x=new Map,w=void 0){const _=w?.(m,p,v,x);if(_!==void 0)return _;if(s.isPrimitive(m))return m;if(x.has(m))return x.get(m);if(Array.isArray(m)){const S=new Array(m.length);x.set(m,S);for(let O=0;Ot.isMatch(o,s)}e.matches=r})(Lg)),Lg}var Yg={},Gg={},Wg={},q2;function s7(){return q2||(q2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nk(),n=rb(),r=Mk();function s(o,u){return t.cloneDeepWith(o,(f,d,h,m)=>{const p=u?.(f,d,h,m);if(p!==void 0)return p;if(typeof o=="object"){if(n.getTag(o)===r.objectTag&&typeof o.constructor!="function"){const v={};return m.set(o,v),t.copyProperties(v,o,h,m),v}switch(Object.prototype.toString.call(o)){case r.numberTag:case r.stringTag:case r.booleanTag:{const v=new o.constructor(o?.valueOf());return t.copyProperties(v,o),v}case r.argumentsTag:{const v={};return t.copyProperties(v,o),v.length=o.length,v[Symbol.iterator]=o[Symbol.iterator],v}default:return}}})}e.cloneDeepWith=s})(Wg)),Wg}var $2;function o7(){return $2||($2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s7();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(Gg)),Gg}var Zg={},Qg={},F2;function kk(){return F2||(F2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,s=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return iy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,iy}var J2;function y7(){return J2||(J2=1,ry.exports=g7()),ry.exports}var eT;function v7(){if(eT)return ny;eT=1;var e=yo(),t=y7();function n(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,f=e.useMemo,d=e.useDebugValue;return ny.useSyncExternalStoreWithSelector=function(h,m,p,v,x){var w=o(null);if(w.current===null){var _={hasValue:!1,value:null};w.current=_}else _=w.current;w=f(function(){function O(C){if(!M){if(M=!0,j=C,C=v(C),x!==void 0&&_.hasValue){var L=_.value;if(x(L,C))return N=L}return N=C}if(L=N,r(j,C))return L;var I=v(C);return x!==void 0&&x(L,I)?(j=C,L):(j=C,N=I)}var M=!1,j,N,k=p===void 0?null:p;return[function(){return O(m())},k===null?void 0:function(){return O(k())}]},[m,p,v,x]);var S=s(h,w[0],w[1]);return u(function(){_.hasValue=!0,_.value=S},[S]),d(S),S},ny}var tT;function b7(){return tT||(tT=1,ty.exports=v7()),ty.exports}var x7=b7(),ib=A.createContext(null),w7=e=>e,it=()=>{var e=A.useContext(ib);return e?e.store.dispatch:w7},Bf=()=>{},_7=()=>Bf,S7=(e,t)=>e===t;function ve(e){var t=A.useContext(ib),n=A.useMemo(()=>t?r=>{if(r!=null)return e(r)}:Bf,[t,e]);return x7.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:_7,t?t.store.getState:Bf,t?t.store.getState:Bf,n,S7)}function A7(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function T7(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function O7(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var nT=e=>Array.isArray(e)?e:[e];function E7(e){const t=Array.isArray(e[0])?e[0]:e;return O7(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function j7(e,t){const n=[],{length:r}=e;for(let s=0;s{n=gf(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function C7(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...s)=>{let o=0,u=0,f,d={},h=s.pop();typeof h=="object"&&(d=h,h=s.pop()),A7(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...n,...d},{memoize:p,memoizeOptions:v=[],argsMemoize:x=Ck,argsMemoizeOptions:w=[]}=m,_=nT(v),S=nT(w),O=E7(s),M=p(function(){return o++,h.apply(null,arguments)},..._),j=x(function(){u++;const k=j7(O,arguments);return f=M.apply(null,k),f},...S);return Object.assign(j,{resultFunc:h,memoizedResultFunc:M,dependencies:O,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>f,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:x})};return Object.assign(r,{withTypes:()=>r}),r}var $=C7(Ck),D7=Object.assign((e,t=$)=>{T7(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((u,f,d)=>(u[n[d]]=f,u),{}))},{withTypes:()=>D7}),ay={},sy={},oy={},iT;function P7(){return iT||(iT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,s,o)=>{if(r!==s){const u=t(r),f=t(s);if(u===f&&u===0){if(rs)return o==="desc"?-1:1}return o==="desc"?f-u:u-f}return 0};e.compareValues=n})(oy)),oy}var ly={},uy={},aT;function Dk(){return aT||(aT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(uy)),uy}var sT;function R7(){return sT||(sT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dk(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(o,u){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||t.isSymbol(o)?!0:typeof o=="string"&&(r.test(o)||!n.test(o))||u!=null&&Object.hasOwn(u,o)}e.isKey=s})(ly)),ly}var oT;function L7(){return oT||(oT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=P7(),n=R7(),r=eb();function s(o,u,f,d){if(o==null)return[];f=d?void 0:f,Array.isArray(o)||(o=Object.values(o)),Array.isArray(u)||(u=u==null?[null]:[u]),u.length===0&&(u=[null]),Array.isArray(f)||(f=f==null?[]:[f]),f=f.map(x=>String(x));const h=(x,w)=>{let _=x;for(let S=0;Sw==null||x==null?w:typeof x=="object"&&"key"in x?Object.hasOwn(w,x.key)?w[x.key]:h(w,x.path):typeof x=="function"?x(w):Array.isArray(x)?h(w,x):typeof w=="object"?w[x]:w,p=u.map(x=>(Array.isArray(x)&&x.length===1&&(x=x[0]),x==null||typeof x=="function"||Array.isArray(x)||n.isKey(x)?x:{key:x,path:r.toPath(x)}));return o.map(x=>({original:x,criteria:p.map(w=>m(w,x))})).slice().sort((x,w)=>{for(let _=0;_x.original)}e.orderBy=s})(sy)),sy}var cy={},lT;function z7(){return lT||(lT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const s=[],o=Math.floor(r),u=(f,d)=>{for(let h=0;h1&&r.isIterateeCall(o,u[0],u[1])?u=[]:f>2&&r.isIterateeCall(u[0],u[1],u[2])&&(u=[u[0]]),t.orderBy(o,n.flatten(u),["asc"])}e.sortBy=s})(ay)),ay}var dy,fT;function B7(){return fT||(fT=1,dy=I7().sortBy),dy}var U7=B7();const Zd=ia(U7);var Rk=e=>e.legend.settings,V7=e=>e.legend.size,q7=e=>e.legend.payload;$([q7,Rk],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Zd(r,n):r});var yf=1;function $7(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=A.useState({height:0,left:0,top:0,width:0}),r=A.useCallback(s=>{if(s!=null){var o=s.getBoundingClientRect(),u={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(u.height-t.height)>yf||Math.abs(u.left-t.left)>yf||Math.abs(u.top-t.top)>yf||Math.abs(u.width-t.width)>yf)&&n({height:u.height,left:u.left,top:u.top,width:u.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function $t(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 F7=typeof Symbol=="function"&&Symbol.observable||"@@observable",dT=F7,hy=()=>Math.random().toString(36).substring(7).split("").join("."),H7={INIT:`@@redux/INIT${hy()}`,REPLACE:`@@redux/REPLACE${hy()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${hy()}`},rd=H7;function ab(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 Lk(e,t,n){if(typeof e!="function")throw new Error($t(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error($t(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($t(1));return n(Lk)(e,t)}let r=e,s=t,o=new Map,u=o,f=0,d=!1;function h(){u===o&&(u=new Map,o.forEach((S,O)=>{u.set(O,S)}))}function m(){if(d)throw new Error($t(3));return s}function p(S){if(typeof S!="function")throw new Error($t(4));if(d)throw new Error($t(5));let O=!0;h();const M=f++;return u.set(M,S),function(){if(O){if(d)throw new Error($t(6));O=!1,h(),u.delete(M),o=null}}}function v(S){if(!ab(S))throw new Error($t(7));if(typeof S.type>"u")throw new Error($t(8));if(typeof S.type!="string")throw new Error($t(17));if(d)throw new Error($t(9));try{d=!0,s=r(s,S)}finally{d=!1}return(o=u).forEach(M=>{M()}),S}function x(S){if(typeof S!="function")throw new Error($t(10));r=S,v({type:rd.REPLACE})}function w(){const S=p;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error($t(11));function M(){const N=O;N.next&&N.next(m())}return M(),{unsubscribe:S(M)}},[dT](){return this}}}return v({type:rd.INIT}),{dispatch:v,subscribe:p,getState:m,replaceReducer:x,[dT]:w}}function K7(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:rd.INIT})>"u")throw new Error($t(12));if(typeof n(void 0,{type:rd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($t(13))})}function zk(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw f&&f.type,new Error($t(14));h[p]=w,d=d||w!==x}return d=d||r.length!==Object.keys(u).length,d?h:u}}function id(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function X7(...e){return t=>(n,r)=>{const s=t(n,r);let o=()=>{throw new Error($t(15))};const u={getState:s.getState,dispatch:(d,...h)=>o(d,...h)},f=e.map(d=>d(u));return o=id(...f)(s.dispatch),{...s,dispatch:o}}}function Ik(e){return ab(e)&&"type"in e&&typeof e.type=="string"}var Bk=Symbol.for("immer-nothing"),hT=Symbol.for("immer-draftable"),an=Symbol.for("immer-state");function lr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Cn=Object,fo=Cn.getPrototypeOf,ad="constructor",Qd="prototype",Ev="configurable",sd="enumerable",Uf="writable",su="value",li=e=>!!e&&!!e[an];function mr(e){return e?Uk(e)||eh(e)||!!e[hT]||!!e[ad]?.[hT]||th(e)||nh(e):!1}var Y7=Cn[Qd][ad].toString(),mT=new WeakMap;function Uk(e){if(!e||!sb(e))return!1;const t=fo(e);if(t===null||t===Cn[Qd])return!0;const n=Cn.hasOwnProperty.call(t,ad)&&t[ad];if(n===Object)return!0;if(!Ws(n))return!1;let r=mT.get(n);return r===void 0&&(r=Function.toString.call(n),mT.set(n,r)),r===Y7}function Jd(e,t,n=!0){Eu(e)===0?(n?Reflect.ownKeys(e):Cn.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((r,s)=>t(s,r,e))}function Eu(e){const t=e[an];return t?t.type_:eh(e)?1:th(e)?2:nh(e)?3:0}var pT=(e,t,n=Eu(e))=>n===2?e.has(t):Cn[Qd].hasOwnProperty.call(e,t),jv=(e,t,n=Eu(e))=>n===2?e.get(t):e[t],od=(e,t,n,r=Eu(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function G7(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var eh=Array.isArray,th=e=>e instanceof Map,nh=e=>e instanceof Set,sb=e=>typeof e=="object",Ws=e=>typeof e=="function",my=e=>typeof e=="boolean";function W7(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Jr=e=>e.copy_||e.base_,ob=e=>e.modified_?e.copy_:e.base_;function Mv(e,t){if(th(e))return new Map(e);if(nh(e))return new Set(e);if(eh(e))return Array[Qd].slice.call(e);const n=Uk(e);if(t===!0||t==="class_only"&&!n){const r=Cn.getOwnPropertyDescriptors(e);delete r[an];let s=Reflect.ownKeys(r);for(let o=0;o1&&Cn.defineProperties(e,{set:vf,add:vf,clear:vf,delete:vf}),Cn.freeze(e),t&&Jd(e,(n,r)=>{lb(r,!0)},!1)),e}function Z7(){lr(2)}var vf={[su]:Z7};function rh(e){return e===null||!sb(e)?!0:Cn.isFrozen(e)}var ld="MapSet",Nv="Patches",gT="ArrayMethods",Vk={};function Wa(e){const t=Vk[e];return t||lr(0,e),t}var yT=e=>!!Vk[e],ou,qk=()=>ou,Q7=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:yT(ld)?Wa(ld):void 0,arrayMethodsPlugin_:yT(gT)?Wa(gT):void 0});function vT(e,t){t&&(e.patchPlugin_=Wa(Nv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kv(e){Cv(e),e.drafts_.forEach(J7),e.drafts_=null}function Cv(e){e===ou&&(ou=e.parent_)}var bT=e=>ou=Q7(ou,e);function J7(e){const t=e[an];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[an].modified_&&(kv(t),lr(4)),mr(e)&&(e=wT(t,e));const{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(n[an].base_,e,t)}else e=wT(t,n);return eU(t,e,!0),kv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Bk?e:void 0}function wT(e,t){if(rh(t))return t;const n=t[an];if(!n)return ud(t,e.handledSet_,e);if(!ih(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);Hk(n,e)}return n.copy_}function eU(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lb(t,n)}function $k(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ih=(e,t)=>e.scope_===t,tU=[];function Fk(e,t,n,r){const s=Jr(e),o=e.type_;if(r!==void 0&&jv(s,r,o)===t){od(s,r,n,o);return}if(!e.draftLocations_){const f=e.draftLocations_=new Map;Jd(s,(d,h)=>{if(li(h)){const m=f.get(h)||[];m.push(d),f.set(h,m)}})}const u=e.draftLocations_.get(t)??tU;for(const f of u)od(s,f,n,o)}function nU(e,t,n){e.callbacks_.push(function(s){const o=t;if(!o||!ih(o,s))return;s.mapSetPlugin_?.fixSetContents(o);const u=ob(o);Fk(e,o.draft_??o,u,n),Hk(o,s)})}function Hk(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const s=r.getPath(e);s&&r.generatePatches_(e,s,t)}$k(e)}}function rU(e,t,n){const{scope_:r}=e;if(li(n)){const s=n[an];ih(s,r)&&s.callbacks_.push(function(){Vf(e);const u=ob(s);Fk(e,n,u,t)})}else mr(n)&&e.callbacks_.push(function(){const o=Jr(e);e.type_===3?o.has(n)&&ud(n,r.handledSet_,r):jv(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ud(jv(e.copy_,t,e.type_),r.handledSet_,r)})}function ud(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||li(e)||t.has(e)||!mr(e)||rh(e)||(t.add(e),Jd(e,(r,s)=>{if(li(s)){const o=s[an];if(ih(o,n)){const u=ob(o);od(e,r,u,e.type_),$k(o)}}else mr(s)&&ud(s,t,n)})),e}function iU(e,t){const n=eh(e),r={type_:n?1:0,scope_:t?t.scope_:qk(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let s=r,o=cd;n&&(s=[r],o=lu);const{revoke:u,proxy:f}=Proxy.revocable(s,o);return r.draft_=f,r.revoke_=u,[f,r]}var cd={get(e,t){if(t===an)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const s=Jr(e);if(!pT(s,t,e.type_))return aU(e,s,t);const o=s[t];if(e.finalized_||!mr(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&W7(t))return o;if(o===py(e.base_,t)){Vf(e);const u=e.type_===1?+t:t,f=Pv(e.scope_,o,e,u);return e.copy_[u]=f}return o},has(e,t){return t in Jr(e)},ownKeys(e){return Reflect.ownKeys(Jr(e))},set(e,t,n){const r=Kk(Jr(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=py(Jr(e),t),o=s?.[an];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(G7(n,s)&&(n!==void 0||pT(e.base_,t,e.type_)))return!0;Vf(e),Dv(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),rU(e,t,n)),!0},deleteProperty(e,t){return Vf(e),py(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Dv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Jr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Uf]:!0,[Ev]:e.type_!==1||t!=="length",[sd]:r[sd],[su]:n[t]}},defineProperty(){lr(11)},getPrototypeOf(e){return fo(e.base_)},setPrototypeOf(){lr(12)}},lu={};for(let e in cd){let t=cd[e];lu[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}lu.deleteProperty=function(e,t){return lu.set.call(this,e,t,void 0)};lu.set=function(e,t,n){return cd.set.call(this,e[0],t,n,e[0])};function py(e,t){const n=e[an];return(n?Jr(n):e)[t]}function aU(e,t,n){const r=Kk(t,n);return r?su in r?r[su]:r.get?.call(e.draft_):void 0}function Kk(e,t){if(!(t in e))return;let n=fo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=fo(n)}}function Dv(e){e.modified_||(e.modified_=!0,e.parent_&&Dv(e.parent_))}function Vf(e){e.copy_||(e.assigned_=new Map,e.copy_=Mv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sU=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,s)=>{if(Ws(n)&&!Ws(r)){const u=r;r=n;const f=this;return function(h=u,...m){return f.produce(h,p=>r.call(this,p,...m))}}Ws(r)||lr(6),s!==void 0&&!Ws(s)&&lr(7);let o;if(mr(n)){const u=bT(this),f=Pv(u,n,void 0);let d=!0;try{o=r(f),d=!1}finally{d?kv(u):Cv(u)}return vT(u,s),xT(o,u)}else if(!n||!sb(n)){if(o=r(n),o===void 0&&(o=n),o===Bk&&(o=void 0),this.autoFreeze_&&lb(o,!0),s){const u=[],f=[];Wa(Nv).generateReplacementPatches_(n,o,{patches_:u,inversePatches_:f}),s(u,f)}return o}else lr(1,n)},this.produceWithPatches=(n,r)=>{if(Ws(n))return(f,...d)=>this.produceWithPatches(f,h=>n(h,...d));let s,o;return[this.produce(n,r,(f,d)=>{s=f,o=d}),s,o]},my(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),my(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),my(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){mr(t)||lr(8),li(t)&&(t=Zn(t));const n=bT(this),r=Pv(n,t,void 0);return r[an].isManual_=!0,Cv(n),r}finishDraft(t,n){const r=t&&t[an];(!r||!r.isManual_)&&lr(9);const{scope_:s}=r;return vT(s,n),xT(void 0,s)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const o=n[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(n=n.slice(r+1));const s=Wa(Nv).applyPatches_;return li(t)?s(t,n):this.produce(t,o=>s(o,n))}};function Pv(e,t,n,r){const[s,o]=th(t)?Wa(ld).proxyMap_(t,n):nh(t)?Wa(ld).proxySet_(t,n):iU(t,n);return(n?.scope_??qk()).drafts_.push(s),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?nU(n,o,r):o.callbacks_.push(function(d){d.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:h}=d;o.modified_&&h&&h.generatePatches_(o,[],d)}),s}function Zn(e){return li(e)||lr(10,e),Xk(e)}function Xk(e){if(!mr(e)||rh(e))return e;const t=e[an];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Mv(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Mv(e,!0);return Jd(n,(s,o)=>{od(n,s,Xk(o))},r),t&&(t.finalized_=!1),n}var oU=new sU,Yk=oU.produce;function Gk(e){return({dispatch:n,getState:r})=>s=>o=>typeof o=="function"?o(n,r,e):s(o)}var lU=Gk(),uU=Gk,cU=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?id:id.apply(null,arguments)};function Pn(e,t){function n(...r){if(t){let s=t(...r);if(!s)throw new Error(Dn(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Ik(r)&&r.type===e,n}var Wk=class Fl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Fl.prototype)}static get[Symbol.species](){return Fl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Fl(...t[0].concat(this)):new Fl(...t.concat(this))}};function _T(e){return mr(e)?Yk(e,()=>{}):e}function bf(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function fU(e){return typeof e=="boolean"}var dU=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:s=!0,actionCreatorCheck:o=!0}=t??{};let u=new Wk;return n&&(fU(n)?u.push(lU):u.push(uU(n.extraArgument))),u},Zk="RTK_autoBatch",Qe=()=>e=>({payload:e,meta:{[Zk]:!0}}),ST=e=>t=>{setTimeout(t,e)},Qk=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let s=!0,o=!1,u=!1;const f=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ST(10):e.type==="callback"?e.queueNotification:ST(e.timeout),h=()=>{u=!1,o&&(o=!1,f.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const p=()=>s&&m(),v=r.subscribe(p);return f.add(m),()=>{v(),f.delete(m)}},dispatch(m){try{return s=!m?.meta?.[Zk],o=!s,o&&(u||(u=!0,d(h))),r.dispatch(m)}finally{s=!0}}})},hU=e=>function(n){const{autoBatch:r=!0}=n??{};let s=new Wk(e);return r&&s.push(Qk(typeof r=="object"?r:void 0)),s};function mU(e){const t=dU(),{reducer:n=void 0,middleware:r,devTools:s=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let f;if(typeof n=="function")f=n;else if(ab(n))f=zk(n);else throw new Error(Dn(1));let d;typeof r=="function"?d=r(t):d=t();let h=id;s&&(h=cU({trace:!1,...typeof s=="object"&&s}));const m=X7(...d),p=hU(m);let v=typeof u=="function"?u(p):p();const x=h(...v);return Lk(f,o,x)}function Jk(e){const t={},n=[];let r;const s={addCase(o,u){const f=typeof o=="string"?o:o.type;if(!f)throw new Error(Dn(28));if(f in t)throw new Error(Dn(29));return t[f]=u,s},addAsyncThunk(o,u){return u.pending&&(t[o.pending.type]=u.pending),u.rejected&&(t[o.rejected.type]=u.rejected),u.fulfilled&&(t[o.fulfilled.type]=u.fulfilled),u.settled&&n.push({matcher:o.settled,reducer:u.settled}),s},addMatcher(o,u){return n.push({matcher:o,reducer:u}),s},addDefaultCase(o){return r=o,s}};return e(s),[t,n,r]}function pU(e){return typeof e=="function"}function gU(e,t){let[n,r,s]=Jk(t),o;if(pU(e))o=()=>_T(e());else{const f=_T(e);o=()=>f}function u(f=o(),d){let h=[n[d.type],...r.filter(({matcher:m})=>m(d)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[s]),h.reduce((m,p)=>{if(p)if(li(m)){const x=p(m,d);return x===void 0?m:x}else{if(mr(m))return Yk(m,v=>p(v,d));{const v=p(m,d);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},f)}return u.getInitialState=o,u}var yU="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",vU=(e=21)=>{let t="",n=e;for(;n--;)t+=yU[Math.random()*64|0];return t},bU=Symbol.for("rtk-slice-createasyncthunk");function xU(e,t){return`${e}/${t}`}function wU({creators:e}={}){const t=e?.asyncThunk?.[bU];return function(r){const{name:s,reducerPath:o=s}=r;if(!s)throw new Error(Dn(11));const u=(typeof r.reducers=="function"?r.reducers(SU()):r.reducers)||{},f=Object.keys(u),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(j,N){const k=typeof j=="string"?j:j.type;if(!k)throw new Error(Dn(12));if(k in d.sliceCaseReducersByType)throw new Error(Dn(13));return d.sliceCaseReducersByType[k]=N,h},addMatcher(j,N){return d.sliceMatchers.push({matcher:j,reducer:N}),h},exposeAction(j,N){return d.actionCreators[j]=N,h},exposeCaseReducer(j,N){return d.sliceCaseReducersByName[j]=N,h}};f.forEach(j=>{const N=u[j],k={reducerName:j,type:xU(s,j),createNotation:typeof r.reducers=="function"};TU(N)?EU(k,N,h,t):AU(k,N,h)});function m(){const[j={},N=[],k=void 0]=typeof r.extraReducers=="function"?Jk(r.extraReducers):[r.extraReducers],C={...j,...d.sliceCaseReducersByType};return gU(r.initialState,L=>{for(let I in C)L.addCase(I,C[I]);for(let I of d.sliceMatchers)L.addMatcher(I.matcher,I.reducer);for(let I of N)L.addMatcher(I.matcher,I.reducer);k&&L.addDefaultCase(k)})}const p=j=>j,v=new Map,x=new WeakMap;let w;function _(j,N){return w||(w=m()),w(j,N)}function S(){return w||(w=m()),w.getInitialState()}function O(j,N=!1){function k(L){let I=L[j];return typeof I>"u"&&N&&(I=bf(x,k,S)),I}function C(L=p){const I=bf(v,N,()=>new WeakMap);return bf(I,L,()=>{const Y={};for(const[te,ie]of Object.entries(r.selectors??{}))Y[te]=_U(ie,L,()=>bf(x,L,S),N);return Y})}return{reducerPath:j,getSelectors:C,get selectors(){return C(k)},selectSlice:k}}const M={name:s,reducer:_,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:S,...O(o),injectInto(j,{reducerPath:N,...k}={}){const C=N??o;return j.inject({reducerPath:C,reducer:_},k),{...M,...O(C,!0)}}};return M}}function _U(e,t,n,r){function s(o,...u){let f=t(o);return typeof f>"u"&&r&&(f=n()),e(f,...u)}return s.unwrapped=e,s}var Qt=wU();function SU(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function AU({type:e,reducerName:t,createNotation:n},r,s){let o,u;if("reducer"in r){if(n&&!OU(r))throw new Error(Dn(17));o=r.reducer,u=r.prepare}else o=r;s.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?Pn(e,u):Pn(e))}function TU(e){return e._reducerDefinitionType==="asyncThunk"}function OU(e){return e._reducerDefinitionType==="reducerWithPrepare"}function EU({type:e,reducerName:t},n,r,s){if(!s)throw new Error(Dn(18));const{payloadCreator:o,fulfilled:u,pending:f,rejected:d,settled:h,options:m}=n,p=s(e,o,m);r.exposeAction(t,p),u&&r.addCase(p.fulfilled,u),f&&r.addCase(p.pending,f),d&&r.addCase(p.rejected,d),h&&r.addMatcher(p.settled,h),r.exposeCaseReducer(t,{fulfilled:u||xf,pending:f||xf,rejected:d||xf,settled:h||xf})}function xf(){}var jU="task",eC="listener",tC="completed",ub="cancelled",MU=`task-${ub}`,NU=`task-${tC}`,Rv=`${eC}-${ub}`,kU=`${eC}-${tC}`,ah=class{constructor(e){this.code=e,this.message=`${jU} ${ub} (reason: ${e})`}name="TaskAbortError";message},cb=(e,t)=>{if(typeof e!="function")throw new TypeError(Dn(32))},fd=()=>{},nC=(e,t=fd)=>(e.catch(t),e),rC=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ha=e=>{if(e.aborted)throw new ah(e.reason)};function iC(e,t){let n=fd;return new Promise((r,s)=>{const o=()=>s(new ah(e.reason));if(e.aborted){o();return}n=rC(e,o),t.finally(()=>n()).then(r,s)}).finally(()=>{n=fd})}var CU=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof ah?"cancelled":"rejected",error:n}}finally{t?.()}},dd=e=>t=>nC(iC(e,t).then(n=>(Ha(e),n))),aC=e=>{const t=dd(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:so}=Object,AT={},sh="listenerMiddleware",DU=(e,t)=>{const n=r=>rC(e,()=>r.abort(e.reason));return(r,s)=>{cb(r);const o=new AbortController;n(o);const u=CU(async()=>{Ha(e),Ha(o.signal);const f=await r({pause:dd(o.signal),delay:aC(o.signal),signal:o.signal});return Ha(o.signal),f},()=>o.abort(NU));return s?.autoJoin&&t.push(u.catch(fd)),{result:dd(e)(u),cancel(){o.abort(MU)}}}},PU=(e,t)=>{const n=async(r,s)=>{Ha(t);let o=()=>{};const f=[new Promise((d,h)=>{let m=e({predicate:r,effect:(p,v)=>{v.unsubscribe(),d([p,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];s!=null&&f.push(new Promise(d=>setTimeout(d,s,null)));try{const d=await iC(t,Promise.race(f));return Ha(t),d}finally{o()}};return(r,s)=>nC(n(r,s))},sC=e=>{let{type:t,actionCreator:n,matcher:r,predicate:s,effect:o}=e;if(t)s=Pn(t).match;else if(n)t=n.type,s=n.match;else if(r)s=r;else if(!s)throw new Error(Dn(21));return cb(o),{predicate:s,type:t,effect:o}},oC=so(e=>{const{type:t,predicate:n,effect:r}=sC(e);return{id:vU(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Dn(22))}}},{withTypes:()=>oC}),TT=(e,t)=>{const{type:n,effect:r,predicate:s}=sC(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===s)&&o.effect===r)},Lv=e=>{e.pending.forEach(t=>{t.abort(Rv)})},RU=(e,t)=>()=>{for(const n of t.keys())Lv(n);e.clear()},OT=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},lC=so(Pn(`${sh}/add`),{withTypes:()=>lC}),LU=Pn(`${sh}/removeAll`),uC=so(Pn(`${sh}/remove`),{withTypes:()=>uC}),zU=(...e)=>{console.error(`${sh}/error`,...e)},ju=(e={})=>{const t=new Map,n=new Map,r=x=>{const w=n.get(x)??0;n.set(x,w+1)},s=x=>{const w=n.get(x)??1;w===1?n.delete(x):n.set(x,w-1)},{extra:o,onError:u=zU}=e;cb(u);const f=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),w=>{x.unsubscribe(),w?.cancelActive&&Lv(x)}),d=x=>{const w=TT(t,x)??oC(x);return f(w)};so(d,{withTypes:()=>d});const h=x=>{const w=TT(t,x);return w&&(w.unsubscribe(),x.cancelActive&&Lv(w)),!!w};so(h,{withTypes:()=>h});const m=async(x,w,_,S)=>{const O=new AbortController,M=PU(d,O.signal),j=[];try{x.pending.add(O),r(x),await Promise.resolve(x.effect(w,so({},_,{getOriginalState:S,condition:(N,k)=>M(N,k).then(Boolean),take:M,delay:aC(O.signal),pause:dd(O.signal),extra:o,signal:O.signal,fork:DU(O.signal,j),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((N,k,C)=>{N!==O&&(N.abort(Rv),C.delete(N))})},cancel:()=>{O.abort(Rv),x.pending.delete(O)},throwIfCancelled:()=>{Ha(O.signal)}})))}catch(N){N instanceof ah||OT(u,N,{raisedBy:"effect"})}finally{await Promise.all(j),O.abort(kU),s(x),x.pending.delete(O)}},p=RU(t,n);return{middleware:x=>w=>_=>{if(!Ik(_))return w(_);if(lC.match(_))return d(_.payload);if(LU.match(_)){p();return}if(uC.match(_))return h(_.payload);let S=x.getState();const O=()=>{if(S===AT)throw new Error(Dn(23));return S};let M;try{if(M=w(_),t.size>0){const j=x.getState(),N=Array.from(t.values());for(const k of N){let C=!1;try{C=k.predicate(_,j,S)}catch(L){C=!1,OT(u,L,{raisedBy:"predicate"})}C&&m(k,_,x,O)}}}finally{S=AT}return M},startListening:d,stopListening:h,clearListeners:p}};function Dn(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 IU={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},cC=Qt({name:"chartLayout",initialState:IU,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 n,r,s,o;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(s=t.payload.bottom)!==null&&s!==void 0?s:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:BU,setLayout:UU,setChartSize:VU,setScale:qU}=cC.actions,$U=cC.reducer;function fC(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Le(e){return Number.isFinite(e)}function Cr(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function ET(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function ro(e){for(var t=1;t{if(t&&n){var{width:r,height:s}=n,{align:o,verticalAlign:u,layout:f}=t;if((f==="vertical"||f==="horizontal"&&u==="middle")&&o!=="center"&&ye(e[o]))return ro(ro({},e),{},{[o]:e[o]+(r||0)});if((f==="horizontal"||f==="vertical"&&o==="center")&&u!=="middle"&&ye(e[u]))return ro(ro({},e),{},{[u]:e[u]+(s||0)})}return e},sa=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",dC=(e,t,n,r)=>{if(r)return e.map(f=>f.coordinate);var s,o,u=e.map(f=>(f.coordinate===t&&(s=!0),f.coordinate===n&&(o=!0),f.coordinate));return s||u.push(t),o||u.push(n),u},hC=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:s,range:o,scale:u,realScaleType:f,isCategorical:d,categoricalDomain:h,tickCount:m,ticks:p,niceTicks:v,axisType:x}=e;if(!u)return null;var w=f==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,_=s==="category"&&u.bandwidth?u.bandwidth()/w:0;if(_=x==="angleAxis"&&o&&o.length>=2?Wn(o[0]-o[1])*2*_:_,p||v){var S=(p||v||[]).map((O,M)=>{var j=r?r.indexOf(O):O,N=u.map(j);return Le(N)?{coordinate:N+_,value:O,offset:_,index:M}:null}).filter(mn);return S}return d&&h?h.map((O,M)=>{var j=u.map(O);return Le(j)?{coordinate:j+_,value:O,index:M,offset:_}:null}).filter(mn):u.ticks&&m!=null?u.ticks(m).map((O,M)=>{var j=u.map(O);return Le(j)?{coordinate:j+_,value:O,index:M,offset:_}:null}).filter(mn):u.domain().map((O,M)=>{var j=u.map(O);return Le(j)?{coordinate:j+_,value:r?r[O]:O,index:M,offset:_}:null}).filter(mn)},YU=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var s=0;s=0?(h[0]=o,o+=v,h[1]=o):(h[0]=u,u+=v,h[1]=u)}}}},GU=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var s=0;s=0?(d[0]=o,o+=h,d[1]=o):(d[0]=0,d[1]=0)}}}},WU={sign:YU,expand:_9,none:Ya,silhouette:S9,wiggle:A9,positive:GU},ZU=(e,t,n)=>{var r,s=(r=WU[n])!==null&&r!==void 0?r:Ya,o=w9().keys(t).value((f,d)=>Number(Ot(f,d,0))).order(Tv).offset(s),u=o(e);return u.forEach((f,d)=>{f.forEach((h,m)=>{var p=Ot(e[m],t[d],0);Array.isArray(p)&&p.length===2&&ye(p[0])&&ye(p[1])&&(h[0]=p[0],h[1]=p[1])})}),u};function jT(e){var{axis:t,ticks:n,bandSize:r,entry:s,index:o,dataKey:u}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!dt(s[t.dataKey])){var f=bk(n,"value",s[t.dataKey]);if(f)return f.coordinate+r/2}return n!=null&&n[o]?n[o].coordinate+r/2:null}var d=Ot(s,dt(u)?t.dataKey:u),h=t.scale.map(d);return ye(h)?h:null}var QU=e=>{var t=e.flat(2).filter(ye);return[Math.min(...t),Math.max(...t)]},JU=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],eV=(e,t,n)=>{if(e!=null)return JU(Object.keys(e).reduce((r,s)=>{var o=e[s];if(!o)return r;var{stackedData:u}=o,f=u.reduce((d,h)=>{var m=fC(h,t,n),p=QU(m);return!Le(p[0])||!Le(p[1])?d:[Math.min(d[0],p[0]),Math.max(d[1],p[1])]},[1/0,-1/0]);return[Math.min(f[0],r[0]),Math.max(f[1],r[1])]},[1/0,-1/0]))},MT=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,NT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,kT=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();return r}if(e&&t&&t.length>=2){for(var s=Zd(t,m=>m.coordinate),o=1/0,u=1,f=s.length;u{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},nV=(e,t)=>t==="centric"?e.angle:e.radius,hi=e=>e.layout.width,mi=e=>e.layout.height,rV=e=>e.layout.scale,pC=e=>e.layout.margin,oh=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),lh=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),iV="data-recharts-item-index",gC="data-recharts-item-id",Mu=60;function DT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function wf(e){for(var t=1;te.brush.height;function uV(e){var t=lh(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var s=typeof r.width=="number"?r.width:Mu;return n+s}return n},0)}function cV(e){var t=lh(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var s=typeof r.width=="number"?r.width:Mu;return n+s}return n},0)}function fV(e){var t=oh(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function dV(e){var t=oh(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Xt=$([hi,mi,pC,lV,uV,cV,fV,dV,Rk,V7],(e,t,n,r,s,o,u,f,d,h)=>{var m={left:(n.left||0)+s,right:(n.right||0)+o},p={top:(n.top||0)+u,bottom:(n.bottom||0)+f},v=wf(wf({},p),m),x=v.bottom;v.bottom+=r,v=XU(v,d,h);var w=e-v.left-v.right,_=t-v.top-v.bottom;return wf(wf({brushBottom:x},v),{},{width:Math.max(w,0),height:Math.max(_,0)})}),hV=$(Xt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),yC=$(hi,mi,(e,t)=>({x:0,y:0,width:e,height:t})),mV=A.createContext(null),Jt=()=>A.useContext(mV)!=null,uh=e=>e.brush,ch=$([uh,Xt,pC],(e,t,n)=>({height:e.height,x:ye(e.x)?e.x:t.left,y:ye(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:ye(e.width)?e.width:t.width})),gy={},yy={},vy={},PT;function pV(){return PT||(PT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:s,edges:o}={}){let u,f=null;const d=o!=null&&o.includes("leading"),h=o==null||o.includes("trailing"),m=()=>{f!==null&&(n.apply(u,f),u=void 0,f=null)},p=()=>{h&&m(),_()};let v=null;const x=()=>{v!=null&&clearTimeout(v),v=setTimeout(()=>{v=null,p()},r)},w=()=>{v!==null&&(clearTimeout(v),v=null)},_=()=>{w(),u=void 0,f=null},S=()=>{m()},O=function(...M){if(s?.aborted)return;u=this,f=M;const j=v==null;x(),d&&j&&m()};return O.schedule=x,O.cancel=_,O.flush=S,s?.addEventListener("abort",_,{once:!0}),O}e.debounce=t})(vy)),vy}var RT;function gV(){return RT||(RT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pV();function n(r,s=0,o={}){typeof o!="object"&&(o={});const{leading:u=!1,trailing:f=!0,maxWait:d}=o,h=Array(2);u&&(h[0]="leading"),f&&(h[1]="trailing");let m,p=null;const v=t.debounce(function(..._){m=r.apply(this,_),p=null},s,{edges:h}),x=function(..._){return d!=null&&(p===null&&(p=Date.now()),Date.now()-p>=d)?(m=r.apply(this,_),p=Date.now(),v.cancel(),v.schedule(),m):(v.apply(this,_),m)},w=()=>(v.flush(),m);return x.cancel=v.cancel,x.flush=w,x}e.debounce=n})(yy)),yy}var LT;function yV(){return LT||(LT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gV();function n(r,s=0,o={}){const{leading:u=!0,trailing:f=!0}=o;return t.debounce(r,s,{leading:u,maxWait:s,trailing:f})}e.throttle=n})(gy)),gy}var by,zT;function vV(){return zT||(zT=1,by=yV().throttle),by}var bV=vV();const xV=ia(bV);var hd=function(t,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;os[u++]))}},Ar={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},vC=(e,t,n)=>{var{width:r=Ar.width,height:s=Ar.height,aspect:o,maxHeight:u}=n,f=Ga(r)?e:Number(r),d=Ga(s)?t:Number(s);return o&&o>0&&(f?d=f/o:d&&(f=d*o),u&&d!=null&&d>u&&(d=u)),{calculatedWidth:f,calculatedHeight:d}},wV={width:0,height:0,overflow:"visible"},_V={width:0,overflowX:"visible"},SV={height:0,overflowY:"visible"},AV={},TV=e=>{var{width:t,height:n}=e,r=Ga(t),s=Ga(n);return r&&s?wV:r?_V:s?SV:AV};function OV(e){var{width:t,height:n,aspect:r}=e,s=t,o=n;return s===void 0&&o===void 0?(s=Ar.width,o=Ar.height):s===void 0?s=r&&r>0?void 0:Ar.width:o===void 0&&(o=r&&r>0?void 0:Ar.height),{width:s,height:o}}function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t({width:n,height:r}),[n,r]);return NV(s)?A.createElement(bC.Provider,{value:s},t):null}var fb=()=>A.useContext(bC),kV=A.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=Ar.initialDimension,width:s,height:o,minWidth:u=Ar.minWidth,minHeight:f,maxHeight:d,children:h,debounce:m=Ar.debounce,id:p,className:v,onResize:x,style:w={}}=e,_=A.useRef(null),S=A.useRef();S.current=x,A.useImperativeHandle(t,()=>_.current);var[O,M]=A.useState({containerWidth:r.width,containerHeight:r.height}),j=A.useCallback((I,Y)=>{M(te=>{var ie=Math.round(I),K=Math.round(Y);return te.containerWidth===ie&&te.containerHeight===K?te:{containerWidth:ie,containerHeight:K}})},[]);A.useEffect(()=>{if(_.current==null||typeof ResizeObserver>"u")return _o;var I=K=>{var be,pe=K[0];if(pe!=null){var{width:xe,height:V}=pe.contentRect;j(xe,V),(be=S.current)===null||be===void 0||be.call(S,xe,V)}};m>0&&(I=xV(I,m,{trailing:!0,leading:!1}));var Y=new ResizeObserver(I),{width:te,height:ie}=_.current.getBoundingClientRect();return j(te,ie),Y.observe(_.current),()=>{Y.disconnect()}},[j,m]);var{containerWidth:N,containerHeight:k}=O;hd(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:C,calculatedHeight:L}=vC(N,k,{width:s,height:o,aspect:n,maxHeight:d});return hd(C!=null&&C>0||L!=null&&L>0,`The width(%s) and height(%s) of chart should be greater than 0, +}}`}],k9=Tu.filter(e=>e.category==="eva-a"),C9=Tu.filter(e=>e.category==="eva-x"),s2=Tu.filter(e=>e.category==="debug"),o2=Tu.filter(e=>e.category==="validation");Tu.filter(e=>e.type==="llm_judge"||e.type==="lalm_judge");function D9({prompt:e,model:t}){const[n,r]=A.useState(!1),s=A.useCallback(()=>r(!1),[]);return A.useEffect(()=>{if(!n)return;const o=u=>{u.key==="Escape"&&s()};return document.addEventListener("keydown",o),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=""}},[n,s]),b.jsxs(b.Fragment,{children:[b.jsxs("button",{onClick:()=>r(!0),className:"mt-3 flex items-center gap-1.5 text-xs font-medium text-purple-light hover:text-purple transition-colors",children:["View Judge Prompt",t&&b.jsxs("span",{className:"text-text-muted",children:["(",t,")"]})]}),n&&b.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",onClick:o=>{o.target===o.currentTarget&&s()},children:[b.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm"}),b.jsxs("div",{className:"relative w-full max-w-4xl max-h-[85vh] flex flex-col rounded-xl border border-border-default bg-bg-primary shadow-2xl",children:[b.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border-default flex-shrink-0",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-sm font-semibold text-text-primary",children:"Judge Prompt"}),t&&b.jsxs("div",{className:"text-xs text-text-muted mt-0.5",children:["Model: ",t]})]}),b.jsx("button",{onClick:s,className:"p-1.5 rounded-lg hover:bg-bg-hover transition-colors text-text-muted hover:text-text-primary",children:b.jsx(cM,{className:"w-5 h-5"})})]}),b.jsx("div",{className:"overflow-y-auto flex-1",children:b.jsx("pre",{className:"px-6 py-5 text-[13px] leading-relaxed text-text-primary font-mono whitespace-pre-wrap break-words",children:e})})]})]})]})}const P9={deterministic:QR,llm_judge:lM,lalm_judge:Gy};function mf({metric:e}){const[t,n]=A.useState(!1),[r,s]=A.useState(!1),o=P9[e.type],u=N9[e.type];return b.jsxs(Tt.div,{layout:!0,className:"rounded-xl border border-border-default bg-bg-secondary overflow-hidden",children:[b.jsxs("button",{onClick:()=>n(!t),className:"w-full flex items-center justify-between p-5 text-left hover:bg-bg-hover/30 transition-colors",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:u+"20"},children:b.jsx(o,{className:"w-5 h-5",style:{color:u}})}),b.jsxs("div",{children:[b.jsxs("div",{className:"text-base font-semibold text-text-primary",children:[e.displayName,e.badge&&b.jsx("span",{className:"ml-2 text-[10px] px-1.5 py-0.5 rounded-full bg-amber/10 text-amber border border-amber/20 font-medium uppercase align-middle",children:e.badge})]}),b.jsxs("div",{className:"text-xs font-medium mt-0.5",style:{color:u},children:[M9[e.type],e.judgeModel&&b.jsxs("span",{className:"text-text-muted",children:[" · ",e.judgeModel]})]})]})]}),b.jsx(ai,{className:`w-5 h-5 text-text-muted transition-transform ${t?"rotate-180":""}`})]}),b.jsx(KA,{children:t&&b.jsx(Tt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:b.jsxs("div",{className:"px-5 pb-5 space-y-4",children:[b.jsx("div",{className:"border-t border-border-default pt-4",children:b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:e.description})}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-1.5",children:"Inputs"}),b.jsx("div",{className:"text-sm text-text-secondary leading-relaxed",children:e.inputs})]}),b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-1.5",children:"Output"}),b.jsx("div",{className:"text-sm text-text-secondary leading-relaxed",children:e.outputRange})]}),e.passThreshold&&b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-1.5",children:"Pass Threshold"}),b.jsx("div",{className:"text-sm text-text-secondary leading-relaxed",children:e.passThreshold})]})]}),e.judgePrompt&&b.jsx(D9,{prompt:e.judgePrompt,model:e.judgeModel}),e.judgeScores&&e.judgeScores.length>0&&b.jsxs("div",{className:"rounded-lg border border-border-default overflow-hidden",children:[b.jsxs("button",{onClick:()=>s(!r),className:"w-full flex items-center justify-between px-4 py-3 text-left hover:bg-bg-hover/30 transition-colors",children:[b.jsx("div",{className:"text-sm font-semibold text-text-secondary",children:"Judge Accuracy"}),b.jsx(ai,{className:`w-4 h-4 text-text-muted transition-transform ${r?"rotate-180":""}`})]}),b.jsx(KA,{children:r&&b.jsx(Tt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},className:"overflow-hidden",children:b.jsxs("div",{className:"px-4 pb-4 space-y-3",children:[b.jsx("div",{className:"border-t border-border-default pt-3",children:b.jsx("div",{className:"flex flex-wrap gap-3",children:e.judgeScores.map(({label:f,value:d,std:h})=>b.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-bg-primary px-3 py-2",children:[b.jsx("span",{className:"text-xs text-text-muted font-mono",children:f}),b.jsxs("span",{className:"text-sm font-semibold text-text-primary",children:[(d*100).toFixed(1),"%",h!=null&&b.jsxs("span",{className:"text-text-muted font-normal text-xs ml-1",children:["(±",(h*100).toFixed(1),"%)"]})]})]},f))})}),e.developmentDocUrl&&b.jsxs("a",{href:e.developmentDocUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm text-accent-primary hover:text-accent-hover transition-colors",children:["View judge development details",b.jsx(oM,{className:"w-3.5 h-3.5"})]}),e.judgeDevelopmentNotes&&b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:e.judgeDevelopmentNotes})]})})})]})]})})})]})}function R9(){const[e,t]=A.useState(!1);return b.jsxs(wo,{id:"metrics",title:"Evaluation Methodology",subtitle:"EVA produces two fundamental scores composed of multiple sub-metrics. Click any metric to explore what it measures, its inputs, and the judge prompt.",children:[b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[b.jsxs(Tt.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5},children:[b.jsxs("div",{className:"rounded-xl border-2 border-purple/30 bg-purple/5 p-5 text-center",children:[b.jsx("div",{className:"text-sm font-bold text-purple-light tracking-widest uppercase mb-1",children:"EVA-A"}),b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"Accuracy"}),b.jsx("p",{className:"text-sm text-text-secondary mt-1.5",children:"Did the agent complete the task correctly?"})]}),b.jsx("div",{className:"flex justify-center",children:b.jsx("div",{className:"w-px h-5 bg-purple/30"})}),b.jsx("div",{className:"space-y-3 pt-0",children:k9.map(n=>b.jsx(mf,{metric:n},n.id))})]}),b.jsxs(Tt.div,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:.1},children:[b.jsxs("div",{className:"rounded-xl border-2 border-blue/30 bg-blue/5 p-5 text-center",children:[b.jsx("div",{className:"text-sm font-bold text-blue-light tracking-widest uppercase mb-1",children:"EVA-X"}),b.jsx("div",{className:"text-2xl font-bold text-text-primary",children:"Experience"}),b.jsx("p",{className:"text-sm text-text-secondary mt-1.5",children:"Was the conversational experience high quality?"})]}),b.jsx("div",{className:"flex justify-center",children:b.jsx("div",{className:"w-px h-5 bg-blue/30"})}),b.jsx("div",{className:"space-y-3 pt-0",children:C9.map(n=>b.jsx(mf,{metric:n},n.id))})]})]}),b.jsxs("div",{className:"mt-10",children:[b.jsxs("div",{className:"mb-6",children:[b.jsx("h3",{className:"text-xl font-bold text-text-primary mb-2",children:"Aggregate Metrics"}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:"EVA aggregates per-trial metric scores into four aggregate metrics, each capturing a different aspect of success and reliability."})]}),b.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary mb-2",children:"pass@1"}),b.jsxs("p",{className:"text-sm text-text-secondary leading-relaxed",children:["For each scenario, the proportion of trials where ",b.jsx("em",{children:"all"})," metric thresholds are met (",b.jsx("em",{children:"c"}),"/",b.jsx("em",{children:"n"}),"), where ",b.jsx("em",{children:"c"})," is the number of passing trials and ",b.jsx("em",{children:"n"})," is the total number of trials (n=3), then averaged across all scenarios."]})]}),b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary mb-2",children:"pass@k (k=3)"}),b.jsxs("p",{className:"text-sm text-text-secondary leading-relaxed",children:["For each scenario, 1 if at least one of the k (3) trials meets pass criteria for all metrics, otherwise 0, then averaged across all scenarios. Measures whether the system ",b.jsx("em",{children:"can"})," succeed."]})]}),b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary mb-2",children:"pass^k (k=3)"}),b.jsxs("p",{className:"text-sm text-text-secondary leading-relaxed",children:["For each scenario, we estimate the theoretical probability of passing k = 3 consecutive independent trials as (",b.jsx("em",{children:"c"}),"/",b.jsx("em",{children:"n"}),")",b.jsx("sup",{children:"k"})," where c is the number of passing trials out of n = 3 total. We then average this value across all scenarios to measure consistency and reliability."]})]}),b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary mb-2",children:"Mean"}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:"For each sample, we average sub-metric scores per dimension, then average across all 150 samples. Raw scores avoid binarizing near-boundary differences into a full pass/fail gap, capturing more nuanced system comparisons."})]})]})]}),b.jsxs("div",{className:"mt-10",children:[b.jsxs("button",{onClick:()=>t(!e),className:"w-full flex items-center justify-between rounded-xl border border-border-default bg-bg-secondary px-6 py-5 hover:bg-bg-hover/30 transition-colors",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-base font-semibold text-text-secondary text-left",children:"Diagnostic & Validation Metrics"}),b.jsxs("div",{className:"text-sm text-text-muted mt-1 text-left",children:[s2.length+o2.length," additional metrics for diagnostics and quality control"]})]}),b.jsx(ai,{className:`w-5 h-5 text-text-muted transition-transform ${e?"rotate-180":""}`})]}),e&&b.jsxs("div",{className:"mt-4 grid grid-cols-1 lg:grid-cols-2 gap-8 opacity-80",children:[b.jsxs("div",{children:[b.jsxs("div",{className:"px-1 mb-4",children:[b.jsx("div",{className:"text-sm font-semibold text-text-muted uppercase tracking-wider mb-1",children:"Diagnostic Metrics"}),b.jsxs("p",{className:"text-sm text-text-muted leading-relaxed",children:["Diagnostic metrics for understanding ",b.jsx("em",{children:"why"})," the core scores look the way they do. These help identify which pipeline component (STT, LLM, TTS) is contributing to failures but are not part of the EVA-A or EVA-X scores."]})]}),b.jsx("div",{className:"space-y-3",children:s2.map(n=>b.jsx(mf,{metric:n},n.id))})]}),b.jsxs("div",{children:[b.jsxs("div",{className:"px-1 mb-4",children:[b.jsx("div",{className:"text-sm font-semibold text-text-muted uppercase tracking-wider mb-1",children:"Validation Metrics"}),b.jsx("p",{className:"text-sm text-text-muted leading-relaxed",children:"Validators run before evaluation. Any conversation that fails validation is regenerated so that core metrics are only computed on conversations with a well-behaved user simulator and properly completed interactions."})]}),b.jsx("div",{className:"space-y-3",children:o2.map(n=>b.jsx(mf,{metric:n},n.id))})]})]})]}),b.jsxs("div",{className:"flex flex-wrap justify-center gap-6 mt-8",children:[b.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3.5 h-3.5 rounded bg-cyan/20 border border-cyan/40"}),"Deterministic (Code)"]}),b.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3.5 h-3.5 rounded bg-purple/20 border border-purple/40"}),"LLM Judge (Text)"]}),b.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3.5 h-3.5 rounded bg-amber/20 border border-amber/40"}),"Audio LLM Judge (LALM)"]})]})]})}function ZN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t{var{children:n,width:r,height:s,viewBox:o,className:u,style:f,title:d,desc:h}=e,m=U9(e,B9),p=o||{width:r,height:s,x:0,y:0},v=et("recharts-surface",u);return A.createElement("svg",xv({},er(m),{className:v,width:r,height:s,style:f,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:t}),A.createElement("title",null,d),A.createElement("desc",null,h),n)}),q9=["children","className"];function wv(){return wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:n,className:r}=e,s=$9(e,q9),o=et("recharts-layer",r);return A.createElement("g",wv({className:o},er(s),{ref:t}),n)}),G0=iM(),H9=A.createContext(null);function Ye(e){return function(){return e}}const tk=Math.cos,Qf=Math.sin,pr=Math.sqrt,Jf=Math.PI,Yd=2*Jf,_v=Math.PI,Sv=2*_v,Ra=1e-6,K9=Sv-Ra;function nk(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return nk;const n=10**t;return function(r){this._+=r[0];for(let s=1,o=r.length;sRa)if(!(Math.abs(p*d-h*m)>Ra)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-u,w=s-f,_=d*d+h*h,S=x*x+w*w,O=Math.sqrt(_),M=Math.sqrt(v),j=o*Math.tan((_v-Math.acos((_+v-S)/(2*O*M)))/2),N=j/M,k=j/O;Math.abs(N-1)>Ra&&this._append`L${t+N*m},${n+N*p}`,this._append`A${o},${o},0,0,${+(p*x>m*w)},${this._x1=t+k*d},${this._y1=n+k*h}`}}arc(t,n,r,s,o,u){if(t=+t,n=+n,r=+r,u=!!u,r<0)throw new Error(`negative radius: ${r}`);let f=r*Math.cos(s),d=r*Math.sin(s),h=t+f,m=n+d,p=1^u,v=u?s-o:o-s;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>Ra||Math.abs(this._y1-m)>Ra)&&this._append`L${h},${m}`,r&&(v<0&&(v=v%Sv+Sv),v>K9?this._append`A${r},${r},0,1,${p},${t-f},${n-d}A${r},${r},0,1,${p},${this._x1=h},${this._y1=m}`:v>Ra&&this._append`A${r},${r},0,${+(v>=_v)},${p},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+s}h${-r}Z`}toString(){return this._}}function W0(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Y9(t)}function Z0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rk(e){this._context=e}rk.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 Gd(e){return new rk(e)}function ik(e){return e[0]}function ak(e){return e[1]}function sk(e,t){var n=Ye(!0),r=null,s=Gd,o=null,u=W0(f);e=typeof e=="function"?e:e===void 0?ik:Ye(e),t=typeof t=="function"?t:t===void 0?ak:Ye(t);function f(d){var h,m=(d=Z0(d)).length,p,v=!1,x;for(r==null&&(o=s(x=u())),h=0;h<=m;++h)!(h=x;--w)f.point(j[w],N[w]);f.lineEnd(),f.areaEnd()}O&&(j[v]=+e(S,v,p),N[v]=+t(S,v,p),f.point(r?+r(S,v,p):j[v],n?+n(S,v,p):N[v]))}if(M)return f=null,M+""||null}function m(){return sk().defined(s).curve(u).context(o)}return h.x=function(p){return arguments.length?(e=typeof p=="function"?p:Ye(+p),r=null,h):e},h.x0=function(p){return arguments.length?(e=typeof p=="function"?p:Ye(+p),h):e},h.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:Ye(+p),h):r},h.y=function(p){return arguments.length?(t=typeof p=="function"?p:Ye(+p),n=null,h):t},h.y0=function(p){return arguments.length?(t=typeof p=="function"?p:Ye(+p),h):t},h.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:Ye(+p),h):n},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(n)},h.lineX1=function(){return m().x(r).y(t)},h.defined=function(p){return arguments.length?(s=typeof p=="function"?p:Ye(!!p),h):s},h.curve=function(p){return arguments.length?(u=p,o!=null&&(f=u(o)),h):u},h.context=function(p){return arguments.length?(p==null?o=f=null:f=u(o=p),h):o},h}class ok{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function G9(e){return new ok(e,!0)}function W9(e){return new ok(e,!1)}const Q0={draw(e,t){const n=pr(t/Jf);e.moveTo(n,0),e.arc(0,0,n,0,Yd)}},Z9={draw(e,t){const n=pr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},lk=pr(1/3),Q9=lk*2,J9={draw(e,t){const n=pr(t/Q9),r=n*lk;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},eB={draw(e,t){const n=pr(t),r=-n/2;e.rect(r,r,n,n)}},tB=.8908130915292852,uk=Qf(Jf/10)/Qf(7*Jf/10),nB=Qf(Yd/10)*uk,rB=-tk(Yd/10)*uk,iB={draw(e,t){const n=pr(t*tB),r=nB*n,s=rB*n;e.moveTo(0,-n),e.lineTo(r,s);for(let o=1;o<5;++o){const u=Yd*o/5,f=tk(u),d=Qf(u);e.lineTo(d*n,-f*n),e.lineTo(f*r-d*s,d*r+f*s)}e.closePath()}},yg=pr(3),aB={draw(e,t){const n=-pr(t/(yg*3));e.moveTo(0,n*2),e.lineTo(-yg*n,-n),e.lineTo(yg*n,-n),e.closePath()}},Kn=-.5,Xn=pr(3)/2,Av=1/pr(12),sB=(Av/2+1)*3,oB={draw(e,t){const n=pr(t/sB),r=n/2,s=n*Av,o=r,u=n*Av+n,f=-o,d=u;e.moveTo(r,s),e.lineTo(o,u),e.lineTo(f,d),e.lineTo(Kn*r-Xn*s,Xn*r+Kn*s),e.lineTo(Kn*o-Xn*u,Xn*o+Kn*u),e.lineTo(Kn*f-Xn*d,Xn*f+Kn*d),e.lineTo(Kn*r+Xn*s,Kn*s-Xn*r),e.lineTo(Kn*o+Xn*u,Kn*u-Xn*o),e.lineTo(Kn*f+Xn*d,Kn*d-Xn*f),e.closePath()}};function lB(e,t){let n=null,r=W0(s);e=typeof e=="function"?e:Ye(e||Q0),t=typeof t=="function"?t:Ye(t===void 0?64:+t);function s(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return s.type=function(o){return arguments.length?(e=typeof o=="function"?o:Ye(o),s):e},s.size=function(o){return arguments.length?(t=typeof o=="function"?o:Ye(+o),s):t},s.context=function(o){return arguments.length?(n=o??null,s):n},s}function ed(){}function td(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ck(e){this._context=e}ck.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:td(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:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uB(e){return new ck(e)}function fk(e){this._context=e}fk.prototype={areaStart:ed,areaEnd:ed,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:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cB(e){return new fk(e)}function dk(e){this._context=e}dk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:td(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fB(e){return new dk(e)}function hk(e){this._context=e}hk.prototype={areaStart:ed,areaEnd:ed,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 dB(e){return new hk(e)}function l2(e){return e<0?-1:1}function u2(e,t,n){var r=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(r||s<0&&-0),u=(n-e._y1)/(s||r<0&&-0),f=(o*s+u*r)/(r+s);return(l2(o)+l2(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(f))||0}function c2(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function vg(e,t,n){var r=e._x0,s=e._y0,o=e._x1,u=e._y1,f=(o-r)/3;e._context.bezierCurveTo(r+f,s+f*t,o-f,u-f*n,o,u)}function nd(e){this._context=e}nd.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:vg(this,this._t0,c2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,vg(this,c2(this,n=u2(this,e,t)),n);break;default:vg(this,this._t0,n=u2(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function mk(e){this._context=new pk(e)}(mk.prototype=Object.create(nd.prototype)).point=function(e,t){nd.prototype.point.call(this,t,e)};function pk(e){this._context=e}pk.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,s,o){this._context.bezierCurveTo(t,e,r,n,o,s)}};function hB(e){return new nd(e)}function mB(e){return new mk(e)}function gk(e){this._context=e}gk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=f2(e),s=f2(t),o=0,u=1;u=0;--t)s[t]=(u[t]-s[t+1])/o[t];for(o[n-1]=(e[n]+s[n-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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function gB(e){return new Wd(e,.5)}function yB(e){return new Wd(e,0)}function vB(e){return new Wd(e,1)}function Ya(e,t){if((u=e.length)>1)for(var n=1,r,s,o=e[t[0]],u,f=o.length;n=0;)n[t]=t;return n}function bB(e,t){return e[t]}function xB(e){const t=[];return t.key=e,t}function wB(){var e=Ye([]),t=Tv,n=Ya,r=bB;function s(o){var u=Array.from(e.apply(this,arguments),xB),f,d=u.length,h=-1,m;for(const p of o)for(f=0,++h;f0){for(var n,r,s=0,o=e[0].length,u;s0){for(var n=0,r=e[t[0]],s,o=r.length;n0)||!((o=(s=e[t[0]]).length)>0))){for(var n=0,r=1,s,o,u;r1&&arguments[1]!==void 0?arguments[1]:MB,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function ut(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{var f=n[u-1];return typeof f=="string"?s+f+o:f!==void 0?s+Ji(f)+o:s+o},"")}var Wn=e=>e===0?0:e>0?1:-1,oi=e=>typeof e=="number"&&e!=+e,Ga=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ye=e=>(typeof e=="number"||e instanceof Number)&&!oi(e),kr=e=>ye(e)||typeof e=="string",NB=0,au=e=>{var t=++NB;return"".concat(e||"").concat(t)},ra=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ye(t)&&typeof t!="string")return r;var o;if(Ga(t)){if(n==null)return r;var u=t.indexOf("%");o=n*parseFloat(t.slice(0,u))/100}else o=+t;return oi(o)&&(o=r),s&&n!=null&&o>n&&(o=n),o},vk=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;rr&&(typeof t=="function"?t(r):co(r,t))===n)}var kB=e=>{for(var t=e.length,n=0,r=0,s=0,o=0,u=1/0,f=-1/0,d=0,h=0,m=0;me===null||typeof e>"u",Ou=e=>dt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function mn(e){return e!=null}function _o(){}var CB=["type","size","sizeType"];function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t="symbol".concat(Ou(e));return xk[t]||Q0},UB=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*IB;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},VB=(e,t)=>{xk["symbol".concat(Ou(e))]=t},nb=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,s=LB(e,CB),o=x2(x2({},s),{},{type:t,size:n,sizeType:r}),u="circle";typeof t=="string"&&(u=t);var f=()=>{var v=BB(u),x=lB().type(v).size(UB(n,r,u)),w=x();if(w!==null)return w},{className:d,cx:h,cy:m}=o,p=er(o);return ye(h)&&ye(m)&&ye(n)?A.createElement("path",Ov({},p,{className:et("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(m,")"),d:f()})):null};nb.registerSymbol=VB;var wk=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,qB=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(A.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(s=>{X0(s)&&typeof n[s]=="function"&&(r[s]=(o=>n[s](n,o)))}),r},$B=(e,t,n)=>r=>(e(t,n,r),null),_k=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(s=>{var o=e[s];X0(s)&&typeof o=="function"&&(r||(r={}),r[s]=$B(o,t,n))}),r},FB=e=>Array.isArray(e)&&e.length>0;function w2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function HB(e){for(var t=1;t(u[f]===void 0&&r[f]!==void 0&&(u[f]=r[f]),u),n);return o}var Og={},Eg={},_2;function GB(){return _2||(_2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const s=new Map;for(let o=0;o=0}e.isLength=t})(Cg)),Cg}var O2;function Ak(){return O2||(O2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZB();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(kg)),kg}var Dg={},E2;function QB(){return E2||(E2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(Dg)),Dg}var j2;function JB(){return j2||(j2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ak(),n=QB();function r(s){return n.isObjectLike(s)&&t.isArrayLike(s)}e.isArrayLikeObject=r})(Ng)),Ng}var Pg={},Rg={},M2;function e7(){return M2||(M2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tb();function n(r){return function(s){return t.get(s,r)}}e.property=n})(Rg)),Rg}var Lg={},zg={},Ig={},Bg={},N2;function Tk(){return N2||(N2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Bg)),Bg}var Ug={},k2;function Ok(){return k2||(k2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(Ug)),Ug}var Vg={},C2;function Ek(){return C2||(C2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(Vg)),Vg}var D2;function t7(){return D2||(D2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tk(),n=Ok(),r=Ek();function s(m,p,v){return typeof v!="function"?s(m,p,()=>{}):o(m,p,function x(w,_,S,O,M,j){const N=v(w,_,S,O,M,j);return N!==void 0?!!N:o(w,_,x,j)},new Map)}function o(m,p,v,x){if(p===m)return!0;switch(typeof p){case"object":return u(m,p,v,x);case"function":return Object.keys(p).length>0?o(m,{...p},v,x):r.isEqualsSameValueZero(m,p);default:return t.isObject(m)?typeof p=="string"?p==="":!0:r.isEqualsSameValueZero(m,p)}}function u(m,p,v,x){if(p==null)return!0;if(Array.isArray(p))return d(m,p,v,x);if(p instanceof Map)return f(m,p,v,x);if(p instanceof Set)return h(m,p,v,x);const w=Object.keys(p);if(m==null||n.isPrimitive(m))return w.length===0;if(w.length===0)return!0;if(x?.has(p))return x.get(p)===m;x?.set(p,m);try{for(let _=0;_{})}e.isMatch=n})(zg)),zg}var qg={},$g={},Fg={},R2;function n7(){return R2||(R2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(Fg)),Fg}var Hg={},L2;function rb(){return L2||(L2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(Hg)),Hg}var Kg={},z2;function Mk(){return z2||(z2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",s="[object Boolean]",o="[object Arguments]",u="[object Symbol]",f="[object Date]",d="[object Map]",h="[object Set]",m="[object Array]",p="[object Function]",v="[object ArrayBuffer]",x="[object Object]",w="[object Error]",_="[object DataView]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",M="[object Uint16Array]",j="[object Uint32Array]",N="[object BigUint64Array]",k="[object Int8Array]",C="[object Int16Array]",L="[object Int32Array]",I="[object BigInt64Array]",Y="[object Float32Array]",te="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=v,e.arrayTag=m,e.bigInt64ArrayTag=I,e.bigUint64ArrayTag=N,e.booleanTag=s,e.dataViewTag=_,e.dateTag=f,e.errorTag=w,e.float32ArrayTag=Y,e.float64ArrayTag=te,e.functionTag=p,e.int16ArrayTag=C,e.int32ArrayTag=L,e.int8ArrayTag=k,e.mapTag=d,e.numberTag=r,e.objectTag=x,e.regexpTag=t,e.setTag=h,e.stringTag=n,e.symbolTag=u,e.uint16ArrayTag=M,e.uint32ArrayTag=j,e.uint8ArrayTag=S,e.uint8ClampedArrayTag=O})(Kg)),Kg}var Xg={},I2;function r7(){return I2||(I2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(Xg)),Xg}var B2;function Nk(){return B2||(B2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=n7(),n=rb(),r=Mk(),s=Ok(),o=r7();function u(m,p){return f(m,void 0,m,new Map,p)}function f(m,p,v,x=new Map,w=void 0){const _=w?.(m,p,v,x);if(_!==void 0)return _;if(s.isPrimitive(m))return m;if(x.has(m))return x.get(m);if(Array.isArray(m)){const S=new Array(m.length);x.set(m,S);for(let O=0;Ot.isMatch(o,s)}e.matches=r})(Lg)),Lg}var Yg={},Gg={},Wg={},q2;function s7(){return q2||(q2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nk(),n=rb(),r=Mk();function s(o,u){return t.cloneDeepWith(o,(f,d,h,m)=>{const p=u?.(f,d,h,m);if(p!==void 0)return p;if(typeof o=="object"){if(n.getTag(o)===r.objectTag&&typeof o.constructor!="function"){const v={};return m.set(o,v),t.copyProperties(v,o,h,m),v}switch(Object.prototype.toString.call(o)){case r.numberTag:case r.stringTag:case r.booleanTag:{const v=new o.constructor(o?.valueOf());return t.copyProperties(v,o),v}case r.argumentsTag:{const v={};return t.copyProperties(v,o),v.length=o.length,v[Symbol.iterator]=o[Symbol.iterator],v}default:return}}})}e.cloneDeepWith=s})(Wg)),Wg}var $2;function o7(){return $2||($2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s7();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(Gg)),Gg}var Zg={},Qg={},F2;function kk(){return F2||(F2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,s=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return iy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,iy}var J2;function y7(){return J2||(J2=1,ry.exports=g7()),ry.exports}var eT;function v7(){if(eT)return ny;eT=1;var e=yo(),t=y7();function n(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,o=e.useRef,u=e.useEffect,f=e.useMemo,d=e.useDebugValue;return ny.useSyncExternalStoreWithSelector=function(h,m,p,v,x){var w=o(null);if(w.current===null){var _={hasValue:!1,value:null};w.current=_}else _=w.current;w=f(function(){function O(C){if(!M){if(M=!0,j=C,C=v(C),x!==void 0&&_.hasValue){var L=_.value;if(x(L,C))return N=L}return N=C}if(L=N,r(j,C))return L;var I=v(C);return x!==void 0&&x(L,I)?(j=C,L):(j=C,N=I)}var M=!1,j,N,k=p===void 0?null:p;return[function(){return O(m())},k===null?void 0:function(){return O(k())}]},[m,p,v,x]);var S=s(h,w[0],w[1]);return u(function(){_.hasValue=!0,_.value=S},[S]),d(S),S},ny}var tT;function b7(){return tT||(tT=1,ty.exports=v7()),ty.exports}var x7=b7(),ib=A.createContext(null),w7=e=>e,it=()=>{var e=A.useContext(ib);return e?e.store.dispatch:w7},Bf=()=>{},_7=()=>Bf,S7=(e,t)=>e===t;function ve(e){var t=A.useContext(ib),n=A.useMemo(()=>t?r=>{if(r!=null)return e(r)}:Bf,[t,e]);return x7.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:_7,t?t.store.getState:Bf,t?t.store.getState:Bf,n,S7)}function A7(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function T7(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function O7(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var nT=e=>Array.isArray(e)?e:[e];function E7(e){const t=Array.isArray(e[0])?e[0]:e;return O7(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function j7(e,t){const n=[],{length:r}=e;for(let s=0;s{n=gf(),u.resetResultsCount()},u.resultsCount=()=>o,u.resetResultsCount=()=>{o=0},u}function C7(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...s)=>{let o=0,u=0,f,d={},h=s.pop();typeof h=="object"&&(d=h,h=s.pop()),A7(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...n,...d},{memoize:p,memoizeOptions:v=[],argsMemoize:x=Ck,argsMemoizeOptions:w=[]}=m,_=nT(v),S=nT(w),O=E7(s),M=p(function(){return o++,h.apply(null,arguments)},..._),j=x(function(){u++;const k=j7(O,arguments);return f=M.apply(null,k),f},...S);return Object.assign(j,{resultFunc:h,memoizedResultFunc:M,dependencies:O,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>f,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:x})};return Object.assign(r,{withTypes:()=>r}),r}var $=C7(Ck),D7=Object.assign((e,t=$)=>{T7(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((u,f,d)=>(u[n[d]]=f,u),{}))},{withTypes:()=>D7}),ay={},sy={},oy={},iT;function P7(){return iT||(iT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,s,o)=>{if(r!==s){const u=t(r),f=t(s);if(u===f&&u===0){if(rs)return o==="desc"?-1:1}return o==="desc"?f-u:u-f}return 0};e.compareValues=n})(oy)),oy}var ly={},uy={},aT;function Dk(){return aT||(aT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(uy)),uy}var sT;function R7(){return sT||(sT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dk(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(o,u){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||t.isSymbol(o)?!0:typeof o=="string"&&(r.test(o)||!n.test(o))||u!=null&&Object.hasOwn(u,o)}e.isKey=s})(ly)),ly}var oT;function L7(){return oT||(oT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=P7(),n=R7(),r=eb();function s(o,u,f,d){if(o==null)return[];f=d?void 0:f,Array.isArray(o)||(o=Object.values(o)),Array.isArray(u)||(u=u==null?[null]:[u]),u.length===0&&(u=[null]),Array.isArray(f)||(f=f==null?[]:[f]),f=f.map(x=>String(x));const h=(x,w)=>{let _=x;for(let S=0;Sw==null||x==null?w:typeof x=="object"&&"key"in x?Object.hasOwn(w,x.key)?w[x.key]:h(w,x.path):typeof x=="function"?x(w):Array.isArray(x)?h(w,x):typeof w=="object"?w[x]:w,p=u.map(x=>(Array.isArray(x)&&x.length===1&&(x=x[0]),x==null||typeof x=="function"||Array.isArray(x)||n.isKey(x)?x:{key:x,path:r.toPath(x)}));return o.map(x=>({original:x,criteria:p.map(w=>m(w,x))})).slice().sort((x,w)=>{for(let _=0;_x.original)}e.orderBy=s})(sy)),sy}var cy={},lT;function z7(){return lT||(lT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const s=[],o=Math.floor(r),u=(f,d)=>{for(let h=0;h1&&r.isIterateeCall(o,u[0],u[1])?u=[]:f>2&&r.isIterateeCall(u[0],u[1],u[2])&&(u=[u[0]]),t.orderBy(o,n.flatten(u),["asc"])}e.sortBy=s})(ay)),ay}var dy,fT;function B7(){return fT||(fT=1,dy=I7().sortBy),dy}var U7=B7();const Zd=ia(U7);var Rk=e=>e.legend.settings,V7=e=>e.legend.size,q7=e=>e.legend.payload;$([q7,Rk],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Zd(r,n):r});var yf=1;function $7(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=A.useState({height:0,left:0,top:0,width:0}),r=A.useCallback(s=>{if(s!=null){var o=s.getBoundingClientRect(),u={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(u.height-t.height)>yf||Math.abs(u.left-t.left)>yf||Math.abs(u.top-t.top)>yf||Math.abs(u.width-t.width)>yf)&&n({height:u.height,left:u.left,top:u.top,width:u.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function $t(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 F7=typeof Symbol=="function"&&Symbol.observable||"@@observable",dT=F7,hy=()=>Math.random().toString(36).substring(7).split("").join("."),H7={INIT:`@@redux/INIT${hy()}`,REPLACE:`@@redux/REPLACE${hy()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${hy()}`},rd=H7;function ab(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 Lk(e,t,n){if(typeof e!="function")throw new Error($t(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error($t(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($t(1));return n(Lk)(e,t)}let r=e,s=t,o=new Map,u=o,f=0,d=!1;function h(){u===o&&(u=new Map,o.forEach((S,O)=>{u.set(O,S)}))}function m(){if(d)throw new Error($t(3));return s}function p(S){if(typeof S!="function")throw new Error($t(4));if(d)throw new Error($t(5));let O=!0;h();const M=f++;return u.set(M,S),function(){if(O){if(d)throw new Error($t(6));O=!1,h(),u.delete(M),o=null}}}function v(S){if(!ab(S))throw new Error($t(7));if(typeof S.type>"u")throw new Error($t(8));if(typeof S.type!="string")throw new Error($t(17));if(d)throw new Error($t(9));try{d=!0,s=r(s,S)}finally{d=!1}return(o=u).forEach(M=>{M()}),S}function x(S){if(typeof S!="function")throw new Error($t(10));r=S,v({type:rd.REPLACE})}function w(){const S=p;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error($t(11));function M(){const N=O;N.next&&N.next(m())}return M(),{unsubscribe:S(M)}},[dT](){return this}}}return v({type:rd.INIT}),{dispatch:v,subscribe:p,getState:m,replaceReducer:x,[dT]:w}}function K7(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:rd.INIT})>"u")throw new Error($t(12));if(typeof n(void 0,{type:rd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($t(13))})}function zk(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw f&&f.type,new Error($t(14));h[p]=w,d=d||w!==x}return d=d||r.length!==Object.keys(u).length,d?h:u}}function id(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function X7(...e){return t=>(n,r)=>{const s=t(n,r);let o=()=>{throw new Error($t(15))};const u={getState:s.getState,dispatch:(d,...h)=>o(d,...h)},f=e.map(d=>d(u));return o=id(...f)(s.dispatch),{...s,dispatch:o}}}function Ik(e){return ab(e)&&"type"in e&&typeof e.type=="string"}var Bk=Symbol.for("immer-nothing"),hT=Symbol.for("immer-draftable"),an=Symbol.for("immer-state");function lr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Cn=Object,fo=Cn.getPrototypeOf,ad="constructor",Qd="prototype",Ev="configurable",sd="enumerable",Uf="writable",su="value",li=e=>!!e&&!!e[an];function mr(e){return e?Uk(e)||eh(e)||!!e[hT]||!!e[ad]?.[hT]||th(e)||nh(e):!1}var Y7=Cn[Qd][ad].toString(),mT=new WeakMap;function Uk(e){if(!e||!sb(e))return!1;const t=fo(e);if(t===null||t===Cn[Qd])return!0;const n=Cn.hasOwnProperty.call(t,ad)&&t[ad];if(n===Object)return!0;if(!Ws(n))return!1;let r=mT.get(n);return r===void 0&&(r=Function.toString.call(n),mT.set(n,r)),r===Y7}function Jd(e,t,n=!0){Eu(e)===0?(n?Reflect.ownKeys(e):Cn.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((r,s)=>t(s,r,e))}function Eu(e){const t=e[an];return t?t.type_:eh(e)?1:th(e)?2:nh(e)?3:0}var pT=(e,t,n=Eu(e))=>n===2?e.has(t):Cn[Qd].hasOwnProperty.call(e,t),jv=(e,t,n=Eu(e))=>n===2?e.get(t):e[t],od=(e,t,n,r=Eu(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function G7(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var eh=Array.isArray,th=e=>e instanceof Map,nh=e=>e instanceof Set,sb=e=>typeof e=="object",Ws=e=>typeof e=="function",my=e=>typeof e=="boolean";function W7(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Jr=e=>e.copy_||e.base_,ob=e=>e.modified_?e.copy_:e.base_;function Mv(e,t){if(th(e))return new Map(e);if(nh(e))return new Set(e);if(eh(e))return Array[Qd].slice.call(e);const n=Uk(e);if(t===!0||t==="class_only"&&!n){const r=Cn.getOwnPropertyDescriptors(e);delete r[an];let s=Reflect.ownKeys(r);for(let o=0;o1&&Cn.defineProperties(e,{set:vf,add:vf,clear:vf,delete:vf}),Cn.freeze(e),t&&Jd(e,(n,r)=>{lb(r,!0)},!1)),e}function Z7(){lr(2)}var vf={[su]:Z7};function rh(e){return e===null||!sb(e)?!0:Cn.isFrozen(e)}var ld="MapSet",Nv="Patches",gT="ArrayMethods",Vk={};function Wa(e){const t=Vk[e];return t||lr(0,e),t}var yT=e=>!!Vk[e],ou,qk=()=>ou,Q7=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:yT(ld)?Wa(ld):void 0,arrayMethodsPlugin_:yT(gT)?Wa(gT):void 0});function vT(e,t){t&&(e.patchPlugin_=Wa(Nv),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kv(e){Cv(e),e.drafts_.forEach(J7),e.drafts_=null}function Cv(e){e===ou&&(ou=e.parent_)}var bT=e=>ou=Q7(ou,e);function J7(e){const t=e[an];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[an].modified_&&(kv(t),lr(4)),mr(e)&&(e=wT(t,e));const{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(n[an].base_,e,t)}else e=wT(t,n);return eU(t,e,!0),kv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Bk?e:void 0}function wT(e,t){if(rh(t))return t;const n=t[an];if(!n)return ud(t,e.handledSet_,e);if(!ih(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);Hk(n,e)}return n.copy_}function eU(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lb(t,n)}function $k(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ih=(e,t)=>e.scope_===t,tU=[];function Fk(e,t,n,r){const s=Jr(e),o=e.type_;if(r!==void 0&&jv(s,r,o)===t){od(s,r,n,o);return}if(!e.draftLocations_){const f=e.draftLocations_=new Map;Jd(s,(d,h)=>{if(li(h)){const m=f.get(h)||[];m.push(d),f.set(h,m)}})}const u=e.draftLocations_.get(t)??tU;for(const f of u)od(s,f,n,o)}function nU(e,t,n){e.callbacks_.push(function(s){const o=t;if(!o||!ih(o,s))return;s.mapSetPlugin_?.fixSetContents(o);const u=ob(o);Fk(e,o.draft_??o,u,n),Hk(o,s)})}function Hk(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const s=r.getPath(e);s&&r.generatePatches_(e,s,t)}$k(e)}}function rU(e,t,n){const{scope_:r}=e;if(li(n)){const s=n[an];ih(s,r)&&s.callbacks_.push(function(){Vf(e);const u=ob(s);Fk(e,n,u,t)})}else mr(n)&&e.callbacks_.push(function(){const o=Jr(e);e.type_===3?o.has(n)&&ud(n,r.handledSet_,r):jv(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ud(jv(e.copy_,t,e.type_),r.handledSet_,r)})}function ud(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||li(e)||t.has(e)||!mr(e)||rh(e)||(t.add(e),Jd(e,(r,s)=>{if(li(s)){const o=s[an];if(ih(o,n)){const u=ob(o);od(e,r,u,e.type_),$k(o)}}else mr(s)&&ud(s,t,n)})),e}function iU(e,t){const n=eh(e),r={type_:n?1:0,scope_:t?t.scope_:qk(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let s=r,o=cd;n&&(s=[r],o=lu);const{revoke:u,proxy:f}=Proxy.revocable(s,o);return r.draft_=f,r.revoke_=u,[f,r]}var cd={get(e,t){if(t===an)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const s=Jr(e);if(!pT(s,t,e.type_))return aU(e,s,t);const o=s[t];if(e.finalized_||!mr(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&W7(t))return o;if(o===py(e.base_,t)){Vf(e);const u=e.type_===1?+t:t,f=Pv(e.scope_,o,e,u);return e.copy_[u]=f}return o},has(e,t){return t in Jr(e)},ownKeys(e){return Reflect.ownKeys(Jr(e))},set(e,t,n){const r=Kk(Jr(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=py(Jr(e),t),o=s?.[an];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(G7(n,s)&&(n!==void 0||pT(e.base_,t,e.type_)))return!0;Vf(e),Dv(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),rU(e,t,n)),!0},deleteProperty(e,t){return Vf(e),py(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Dv(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Jr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Uf]:!0,[Ev]:e.type_!==1||t!=="length",[sd]:r[sd],[su]:n[t]}},defineProperty(){lr(11)},getPrototypeOf(e){return fo(e.base_)},setPrototypeOf(){lr(12)}},lu={};for(let e in cd){let t=cd[e];lu[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}lu.deleteProperty=function(e,t){return lu.set.call(this,e,t,void 0)};lu.set=function(e,t,n){return cd.set.call(this,e[0],t,n,e[0])};function py(e,t){const n=e[an];return(n?Jr(n):e)[t]}function aU(e,t,n){const r=Kk(t,n);return r?su in r?r[su]:r.get?.call(e.draft_):void 0}function Kk(e,t){if(!(t in e))return;let n=fo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=fo(n)}}function Dv(e){e.modified_||(e.modified_=!0,e.parent_&&Dv(e.parent_))}function Vf(e){e.copy_||(e.assigned_=new Map,e.copy_=Mv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sU=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,s)=>{if(Ws(n)&&!Ws(r)){const u=r;r=n;const f=this;return function(h=u,...m){return f.produce(h,p=>r.call(this,p,...m))}}Ws(r)||lr(6),s!==void 0&&!Ws(s)&&lr(7);let o;if(mr(n)){const u=bT(this),f=Pv(u,n,void 0);let d=!0;try{o=r(f),d=!1}finally{d?kv(u):Cv(u)}return vT(u,s),xT(o,u)}else if(!n||!sb(n)){if(o=r(n),o===void 0&&(o=n),o===Bk&&(o=void 0),this.autoFreeze_&&lb(o,!0),s){const u=[],f=[];Wa(Nv).generateReplacementPatches_(n,o,{patches_:u,inversePatches_:f}),s(u,f)}return o}else lr(1,n)},this.produceWithPatches=(n,r)=>{if(Ws(n))return(f,...d)=>this.produceWithPatches(f,h=>n(h,...d));let s,o;return[this.produce(n,r,(f,d)=>{s=f,o=d}),s,o]},my(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),my(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),my(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){mr(t)||lr(8),li(t)&&(t=Zn(t));const n=bT(this),r=Pv(n,t,void 0);return r[an].isManual_=!0,Cv(n),r}finishDraft(t,n){const r=t&&t[an];(!r||!r.isManual_)&&lr(9);const{scope_:s}=r;return vT(s,n),xT(void 0,s)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const o=n[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(n=n.slice(r+1));const s=Wa(Nv).applyPatches_;return li(t)?s(t,n):this.produce(t,o=>s(o,n))}};function Pv(e,t,n,r){const[s,o]=th(t)?Wa(ld).proxyMap_(t,n):nh(t)?Wa(ld).proxySet_(t,n):iU(t,n);return(n?.scope_??qk()).drafts_.push(s),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?nU(n,o,r):o.callbacks_.push(function(d){d.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:h}=d;o.modified_&&h&&h.generatePatches_(o,[],d)}),s}function Zn(e){return li(e)||lr(10,e),Xk(e)}function Xk(e){if(!mr(e)||rh(e))return e;const t=e[an];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Mv(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Mv(e,!0);return Jd(n,(s,o)=>{od(n,s,Xk(o))},r),t&&(t.finalized_=!1),n}var oU=new sU,Yk=oU.produce;function Gk(e){return({dispatch:n,getState:r})=>s=>o=>typeof o=="function"?o(n,r,e):s(o)}var lU=Gk(),uU=Gk,cU=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?id:id.apply(null,arguments)};function Pn(e,t){function n(...r){if(t){let s=t(...r);if(!s)throw new Error(Dn(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Ik(r)&&r.type===e,n}var Wk=class Fl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Fl.prototype)}static get[Symbol.species](){return Fl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Fl(...t[0].concat(this)):new Fl(...t.concat(this))}};function _T(e){return mr(e)?Yk(e,()=>{}):e}function bf(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function fU(e){return typeof e=="boolean"}var dU=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:s=!0,actionCreatorCheck:o=!0}=t??{};let u=new Wk;return n&&(fU(n)?u.push(lU):u.push(uU(n.extraArgument))),u},Zk="RTK_autoBatch",Qe=()=>e=>({payload:e,meta:{[Zk]:!0}}),ST=e=>t=>{setTimeout(t,e)},Qk=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let s=!0,o=!1,u=!1;const f=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ST(10):e.type==="callback"?e.queueNotification:ST(e.timeout),h=()=>{u=!1,o&&(o=!1,f.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const p=()=>s&&m(),v=r.subscribe(p);return f.add(m),()=>{v(),f.delete(m)}},dispatch(m){try{return s=!m?.meta?.[Zk],o=!s,o&&(u||(u=!0,d(h))),r.dispatch(m)}finally{s=!0}}})},hU=e=>function(n){const{autoBatch:r=!0}=n??{};let s=new Wk(e);return r&&s.push(Qk(typeof r=="object"?r:void 0)),s};function mU(e){const t=dU(),{reducer:n=void 0,middleware:r,devTools:s=!0,preloadedState:o=void 0,enhancers:u=void 0}=e||{};let f;if(typeof n=="function")f=n;else if(ab(n))f=zk(n);else throw new Error(Dn(1));let d;typeof r=="function"?d=r(t):d=t();let h=id;s&&(h=cU({trace:!1,...typeof s=="object"&&s}));const m=X7(...d),p=hU(m);let v=typeof u=="function"?u(p):p();const x=h(...v);return Lk(f,o,x)}function Jk(e){const t={},n=[];let r;const s={addCase(o,u){const f=typeof o=="string"?o:o.type;if(!f)throw new Error(Dn(28));if(f in t)throw new Error(Dn(29));return t[f]=u,s},addAsyncThunk(o,u){return u.pending&&(t[o.pending.type]=u.pending),u.rejected&&(t[o.rejected.type]=u.rejected),u.fulfilled&&(t[o.fulfilled.type]=u.fulfilled),u.settled&&n.push({matcher:o.settled,reducer:u.settled}),s},addMatcher(o,u){return n.push({matcher:o,reducer:u}),s},addDefaultCase(o){return r=o,s}};return e(s),[t,n,r]}function pU(e){return typeof e=="function"}function gU(e,t){let[n,r,s]=Jk(t),o;if(pU(e))o=()=>_T(e());else{const f=_T(e);o=()=>f}function u(f=o(),d){let h=[n[d.type],...r.filter(({matcher:m})=>m(d)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[s]),h.reduce((m,p)=>{if(p)if(li(m)){const x=p(m,d);return x===void 0?m:x}else{if(mr(m))return Yk(m,v=>p(v,d));{const v=p(m,d);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},f)}return u.getInitialState=o,u}var yU="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",vU=(e=21)=>{let t="",n=e;for(;n--;)t+=yU[Math.random()*64|0];return t},bU=Symbol.for("rtk-slice-createasyncthunk");function xU(e,t){return`${e}/${t}`}function wU({creators:e}={}){const t=e?.asyncThunk?.[bU];return function(r){const{name:s,reducerPath:o=s}=r;if(!s)throw new Error(Dn(11));const u=(typeof r.reducers=="function"?r.reducers(SU()):r.reducers)||{},f=Object.keys(u),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(j,N){const k=typeof j=="string"?j:j.type;if(!k)throw new Error(Dn(12));if(k in d.sliceCaseReducersByType)throw new Error(Dn(13));return d.sliceCaseReducersByType[k]=N,h},addMatcher(j,N){return d.sliceMatchers.push({matcher:j,reducer:N}),h},exposeAction(j,N){return d.actionCreators[j]=N,h},exposeCaseReducer(j,N){return d.sliceCaseReducersByName[j]=N,h}};f.forEach(j=>{const N=u[j],k={reducerName:j,type:xU(s,j),createNotation:typeof r.reducers=="function"};TU(N)?EU(k,N,h,t):AU(k,N,h)});function m(){const[j={},N=[],k=void 0]=typeof r.extraReducers=="function"?Jk(r.extraReducers):[r.extraReducers],C={...j,...d.sliceCaseReducersByType};return gU(r.initialState,L=>{for(let I in C)L.addCase(I,C[I]);for(let I of d.sliceMatchers)L.addMatcher(I.matcher,I.reducer);for(let I of N)L.addMatcher(I.matcher,I.reducer);k&&L.addDefaultCase(k)})}const p=j=>j,v=new Map,x=new WeakMap;let w;function _(j,N){return w||(w=m()),w(j,N)}function S(){return w||(w=m()),w.getInitialState()}function O(j,N=!1){function k(L){let I=L[j];return typeof I>"u"&&N&&(I=bf(x,k,S)),I}function C(L=p){const I=bf(v,N,()=>new WeakMap);return bf(I,L,()=>{const Y={};for(const[te,ie]of Object.entries(r.selectors??{}))Y[te]=_U(ie,L,()=>bf(x,L,S),N);return Y})}return{reducerPath:j,getSelectors:C,get selectors(){return C(k)},selectSlice:k}}const M={name:s,reducer:_,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:S,...O(o),injectInto(j,{reducerPath:N,...k}={}){const C=N??o;return j.inject({reducerPath:C,reducer:_},k),{...M,...O(C,!0)}}};return M}}function _U(e,t,n,r){function s(o,...u){let f=t(o);return typeof f>"u"&&r&&(f=n()),e(f,...u)}return s.unwrapped=e,s}var Qt=wU();function SU(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function AU({type:e,reducerName:t,createNotation:n},r,s){let o,u;if("reducer"in r){if(n&&!OU(r))throw new Error(Dn(17));o=r.reducer,u=r.prepare}else o=r;s.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,u?Pn(e,u):Pn(e))}function TU(e){return e._reducerDefinitionType==="asyncThunk"}function OU(e){return e._reducerDefinitionType==="reducerWithPrepare"}function EU({type:e,reducerName:t},n,r,s){if(!s)throw new Error(Dn(18));const{payloadCreator:o,fulfilled:u,pending:f,rejected:d,settled:h,options:m}=n,p=s(e,o,m);r.exposeAction(t,p),u&&r.addCase(p.fulfilled,u),f&&r.addCase(p.pending,f),d&&r.addCase(p.rejected,d),h&&r.addMatcher(p.settled,h),r.exposeCaseReducer(t,{fulfilled:u||xf,pending:f||xf,rejected:d||xf,settled:h||xf})}function xf(){}var jU="task",eC="listener",tC="completed",ub="cancelled",MU=`task-${ub}`,NU=`task-${tC}`,Rv=`${eC}-${ub}`,kU=`${eC}-${tC}`,ah=class{constructor(e){this.code=e,this.message=`${jU} ${ub} (reason: ${e})`}name="TaskAbortError";message},cb=(e,t)=>{if(typeof e!="function")throw new TypeError(Dn(32))},fd=()=>{},nC=(e,t=fd)=>(e.catch(t),e),rC=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ha=e=>{if(e.aborted)throw new ah(e.reason)};function iC(e,t){let n=fd;return new Promise((r,s)=>{const o=()=>s(new ah(e.reason));if(e.aborted){o();return}n=rC(e,o),t.finally(()=>n()).then(r,s)}).finally(()=>{n=fd})}var CU=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof ah?"cancelled":"rejected",error:n}}finally{t?.()}},dd=e=>t=>nC(iC(e,t).then(n=>(Ha(e),n))),aC=e=>{const t=dd(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:so}=Object,AT={},sh="listenerMiddleware",DU=(e,t)=>{const n=r=>rC(e,()=>r.abort(e.reason));return(r,s)=>{cb(r);const o=new AbortController;n(o);const u=CU(async()=>{Ha(e),Ha(o.signal);const f=await r({pause:dd(o.signal),delay:aC(o.signal),signal:o.signal});return Ha(o.signal),f},()=>o.abort(NU));return s?.autoJoin&&t.push(u.catch(fd)),{result:dd(e)(u),cancel(){o.abort(MU)}}}},PU=(e,t)=>{const n=async(r,s)=>{Ha(t);let o=()=>{};const f=[new Promise((d,h)=>{let m=e({predicate:r,effect:(p,v)=>{v.unsubscribe(),d([p,v.getState(),v.getOriginalState()])}});o=()=>{m(),h()}})];s!=null&&f.push(new Promise(d=>setTimeout(d,s,null)));try{const d=await iC(t,Promise.race(f));return Ha(t),d}finally{o()}};return(r,s)=>nC(n(r,s))},sC=e=>{let{type:t,actionCreator:n,matcher:r,predicate:s,effect:o}=e;if(t)s=Pn(t).match;else if(n)t=n.type,s=n.match;else if(r)s=r;else if(!s)throw new Error(Dn(21));return cb(o),{predicate:s,type:t,effect:o}},oC=so(e=>{const{type:t,predicate:n,effect:r}=sC(e);return{id:vU(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Dn(22))}}},{withTypes:()=>oC}),TT=(e,t)=>{const{type:n,effect:r,predicate:s}=sC(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===s)&&o.effect===r)},Lv=e=>{e.pending.forEach(t=>{t.abort(Rv)})},RU=(e,t)=>()=>{for(const n of t.keys())Lv(n);e.clear()},OT=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},lC=so(Pn(`${sh}/add`),{withTypes:()=>lC}),LU=Pn(`${sh}/removeAll`),uC=so(Pn(`${sh}/remove`),{withTypes:()=>uC}),zU=(...e)=>{console.error(`${sh}/error`,...e)},ju=(e={})=>{const t=new Map,n=new Map,r=x=>{const w=n.get(x)??0;n.set(x,w+1)},s=x=>{const w=n.get(x)??1;w===1?n.delete(x):n.set(x,w-1)},{extra:o,onError:u=zU}=e;cb(u);const f=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),w=>{x.unsubscribe(),w?.cancelActive&&Lv(x)}),d=x=>{const w=TT(t,x)??oC(x);return f(w)};so(d,{withTypes:()=>d});const h=x=>{const w=TT(t,x);return w&&(w.unsubscribe(),x.cancelActive&&Lv(w)),!!w};so(h,{withTypes:()=>h});const m=async(x,w,_,S)=>{const O=new AbortController,M=PU(d,O.signal),j=[];try{x.pending.add(O),r(x),await Promise.resolve(x.effect(w,so({},_,{getOriginalState:S,condition:(N,k)=>M(N,k).then(Boolean),take:M,delay:aC(O.signal),pause:dd(O.signal),extra:o,signal:O.signal,fork:DU(O.signal,j),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((N,k,C)=>{N!==O&&(N.abort(Rv),C.delete(N))})},cancel:()=>{O.abort(Rv),x.pending.delete(O)},throwIfCancelled:()=>{Ha(O.signal)}})))}catch(N){N instanceof ah||OT(u,N,{raisedBy:"effect"})}finally{await Promise.all(j),O.abort(kU),s(x),x.pending.delete(O)}},p=RU(t,n);return{middleware:x=>w=>_=>{if(!Ik(_))return w(_);if(lC.match(_))return d(_.payload);if(LU.match(_)){p();return}if(uC.match(_))return h(_.payload);let S=x.getState();const O=()=>{if(S===AT)throw new Error(Dn(23));return S};let M;try{if(M=w(_),t.size>0){const j=x.getState(),N=Array.from(t.values());for(const k of N){let C=!1;try{C=k.predicate(_,j,S)}catch(L){C=!1,OT(u,L,{raisedBy:"predicate"})}C&&m(k,_,x,O)}}}finally{S=AT}return M},startListening:d,stopListening:h,clearListeners:p}};function Dn(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 IU={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},cC=Qt({name:"chartLayout",initialState:IU,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 n,r,s,o;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(s=t.payload.bottom)!==null&&s!==void 0?s:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:BU,setLayout:UU,setChartSize:VU,setScale:qU}=cC.actions,$U=cC.reducer;function fC(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Le(e){return Number.isFinite(e)}function Cr(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function ET(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function ro(e){for(var t=1;t{if(t&&n){var{width:r,height:s}=n,{align:o,verticalAlign:u,layout:f}=t;if((f==="vertical"||f==="horizontal"&&u==="middle")&&o!=="center"&&ye(e[o]))return ro(ro({},e),{},{[o]:e[o]+(r||0)});if((f==="horizontal"||f==="vertical"&&o==="center")&&u!=="middle"&&ye(e[u]))return ro(ro({},e),{},{[u]:e[u]+(s||0)})}return e},sa=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",dC=(e,t,n,r)=>{if(r)return e.map(f=>f.coordinate);var s,o,u=e.map(f=>(f.coordinate===t&&(s=!0),f.coordinate===n&&(o=!0),f.coordinate));return s||u.push(t),o||u.push(n),u},hC=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:s,range:o,scale:u,realScaleType:f,isCategorical:d,categoricalDomain:h,tickCount:m,ticks:p,niceTicks:v,axisType:x}=e;if(!u)return null;var w=f==="scaleBand"&&u.bandwidth?u.bandwidth()/2:2,_=s==="category"&&u.bandwidth?u.bandwidth()/w:0;if(_=x==="angleAxis"&&o&&o.length>=2?Wn(o[0]-o[1])*2*_:_,p||v){var S=(p||v||[]).map((O,M)=>{var j=r?r.indexOf(O):O,N=u.map(j);return Le(N)?{coordinate:N+_,value:O,offset:_,index:M}:null}).filter(mn);return S}return d&&h?h.map((O,M)=>{var j=u.map(O);return Le(j)?{coordinate:j+_,value:O,index:M,offset:_}:null}).filter(mn):u.ticks&&m!=null?u.ticks(m).map((O,M)=>{var j=u.map(O);return Le(j)?{coordinate:j+_,value:O,index:M,offset:_}:null}).filter(mn):u.domain().map((O,M)=>{var j=u.map(O);return Le(j)?{coordinate:j+_,value:r?r[O]:O,index:M,offset:_}:null}).filter(mn)},YU=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var s=0;s=0?(h[0]=o,o+=v,h[1]=o):(h[0]=u,u+=v,h[1]=u)}}}},GU=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var s=0;s=0?(d[0]=o,o+=h,d[1]=o):(d[0]=0,d[1]=0)}}}},WU={sign:YU,expand:_B,none:Ya,silhouette:SB,wiggle:AB,positive:GU},ZU=(e,t,n)=>{var r,s=(r=WU[n])!==null&&r!==void 0?r:Ya,o=wB().keys(t).value((f,d)=>Number(Ot(f,d,0))).order(Tv).offset(s),u=o(e);return u.forEach((f,d)=>{f.forEach((h,m)=>{var p=Ot(e[m],t[d],0);Array.isArray(p)&&p.length===2&&ye(p[0])&&ye(p[1])&&(h[0]=p[0],h[1]=p[1])})}),u};function jT(e){var{axis:t,ticks:n,bandSize:r,entry:s,index:o,dataKey:u}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!dt(s[t.dataKey])){var f=bk(n,"value",s[t.dataKey]);if(f)return f.coordinate+r/2}return n!=null&&n[o]?n[o].coordinate+r/2:null}var d=Ot(s,dt(u)?t.dataKey:u),h=t.scale.map(d);return ye(h)?h:null}var QU=e=>{var t=e.flat(2).filter(ye);return[Math.min(...t),Math.max(...t)]},JU=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],eV=(e,t,n)=>{if(e!=null)return JU(Object.keys(e).reduce((r,s)=>{var o=e[s];if(!o)return r;var{stackedData:u}=o,f=u.reduce((d,h)=>{var m=fC(h,t,n),p=QU(m);return!Le(p[0])||!Le(p[1])?d:[Math.min(d[0],p[0]),Math.max(d[1],p[1])]},[1/0,-1/0]);return[Math.min(f[0],r[0]),Math.max(f[1],r[1])]},[1/0,-1/0]))},MT=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,NT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,kT=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();return r}if(e&&t&&t.length>=2){for(var s=Zd(t,m=>m.coordinate),o=1/0,u=1,f=s.length;u{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},nV=(e,t)=>t==="centric"?e.angle:e.radius,hi=e=>e.layout.width,mi=e=>e.layout.height,rV=e=>e.layout.scale,pC=e=>e.layout.margin,oh=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),lh=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),iV="data-recharts-item-index",gC="data-recharts-item-id",Mu=60;function DT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function wf(e){for(var t=1;te.brush.height;function uV(e){var t=lh(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var s=typeof r.width=="number"?r.width:Mu;return n+s}return n},0)}function cV(e){var t=lh(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var s=typeof r.width=="number"?r.width:Mu;return n+s}return n},0)}function fV(e){var t=oh(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function dV(e){var t=oh(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Xt=$([hi,mi,pC,lV,uV,cV,fV,dV,Rk,V7],(e,t,n,r,s,o,u,f,d,h)=>{var m={left:(n.left||0)+s,right:(n.right||0)+o},p={top:(n.top||0)+u,bottom:(n.bottom||0)+f},v=wf(wf({},p),m),x=v.bottom;v.bottom+=r,v=XU(v,d,h);var w=e-v.left-v.right,_=t-v.top-v.bottom;return wf(wf({brushBottom:x},v),{},{width:Math.max(w,0),height:Math.max(_,0)})}),hV=$(Xt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),yC=$(hi,mi,(e,t)=>({x:0,y:0,width:e,height:t})),mV=A.createContext(null),Jt=()=>A.useContext(mV)!=null,uh=e=>e.brush,ch=$([uh,Xt,pC],(e,t,n)=>({height:e.height,x:ye(e.x)?e.x:t.left,y:ye(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:ye(e.width)?e.width:t.width})),gy={},yy={},vy={},PT;function pV(){return PT||(PT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:s,edges:o}={}){let u,f=null;const d=o!=null&&o.includes("leading"),h=o==null||o.includes("trailing"),m=()=>{f!==null&&(n.apply(u,f),u=void 0,f=null)},p=()=>{h&&m(),_()};let v=null;const x=()=>{v!=null&&clearTimeout(v),v=setTimeout(()=>{v=null,p()},r)},w=()=>{v!==null&&(clearTimeout(v),v=null)},_=()=>{w(),u=void 0,f=null},S=()=>{m()},O=function(...M){if(s?.aborted)return;u=this,f=M;const j=v==null;x(),d&&j&&m()};return O.schedule=x,O.cancel=_,O.flush=S,s?.addEventListener("abort",_,{once:!0}),O}e.debounce=t})(vy)),vy}var RT;function gV(){return RT||(RT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pV();function n(r,s=0,o={}){typeof o!="object"&&(o={});const{leading:u=!1,trailing:f=!0,maxWait:d}=o,h=Array(2);u&&(h[0]="leading"),f&&(h[1]="trailing");let m,p=null;const v=t.debounce(function(..._){m=r.apply(this,_),p=null},s,{edges:h}),x=function(..._){return d!=null&&(p===null&&(p=Date.now()),Date.now()-p>=d)?(m=r.apply(this,_),p=Date.now(),v.cancel(),v.schedule(),m):(v.apply(this,_),m)},w=()=>(v.flush(),m);return x.cancel=v.cancel,x.flush=w,x}e.debounce=n})(yy)),yy}var LT;function yV(){return LT||(LT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gV();function n(r,s=0,o={}){const{leading:u=!0,trailing:f=!0}=o;return t.debounce(r,s,{leading:u,maxWait:s,trailing:f})}e.throttle=n})(gy)),gy}var by,zT;function vV(){return zT||(zT=1,by=yV().throttle),by}var bV=vV();const xV=ia(bV);var hd=function(t,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;os[u++]))}},Ar={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},vC=(e,t,n)=>{var{width:r=Ar.width,height:s=Ar.height,aspect:o,maxHeight:u}=n,f=Ga(r)?e:Number(r),d=Ga(s)?t:Number(s);return o&&o>0&&(f?d=f/o:d&&(f=d*o),u&&d!=null&&d>u&&(d=u)),{calculatedWidth:f,calculatedHeight:d}},wV={width:0,height:0,overflow:"visible"},_V={width:0,overflowX:"visible"},SV={height:0,overflowY:"visible"},AV={},TV=e=>{var{width:t,height:n}=e,r=Ga(t),s=Ga(n);return r&&s?wV:r?_V:s?SV:AV};function OV(e){var{width:t,height:n,aspect:r}=e,s=t,o=n;return s===void 0&&o===void 0?(s=Ar.width,o=Ar.height):s===void 0?s=r&&r>0?void 0:Ar.width:o===void 0&&(o=r&&r>0?void 0:Ar.height),{width:s,height:o}}function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t({width:n,height:r}),[n,r]);return NV(s)?A.createElement(bC.Provider,{value:s},t):null}var fb=()=>A.useContext(bC),kV=A.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=Ar.initialDimension,width:s,height:o,minWidth:u=Ar.minWidth,minHeight:f,maxHeight:d,children:h,debounce:m=Ar.debounce,id:p,className:v,onResize:x,style:w={}}=e,_=A.useRef(null),S=A.useRef();S.current=x,A.useImperativeHandle(t,()=>_.current);var[O,M]=A.useState({containerWidth:r.width,containerHeight:r.height}),j=A.useCallback((I,Y)=>{M(te=>{var ie=Math.round(I),K=Math.round(Y);return te.containerWidth===ie&&te.containerHeight===K?te:{containerWidth:ie,containerHeight:K}})},[]);A.useEffect(()=>{if(_.current==null||typeof ResizeObserver>"u")return _o;var I=K=>{var be,pe=K[0];if(pe!=null){var{width:xe,height:V}=pe.contentRect;j(xe,V),(be=S.current)===null||be===void 0||be.call(S,xe,V)}};m>0&&(I=xV(I,m,{trailing:!0,leading:!1}));var Y=new ResizeObserver(I),{width:te,height:ie}=_.current.getBoundingClientRect();return j(te,ie),Y.observe(_.current),()=>{Y.disconnect()}},[j,m]);var{containerWidth:N,containerHeight:k}=O;hd(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:C,calculatedHeight:L}=vC(N,k,{width:s,height:o,aspect:n,maxHeight:d});return hd(C!=null&&C>0||L!=null&&L>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.`,C,L,s,o,u,f,n),A.createElement("div",{id:p?"".concat(p):void 0,className:et("recharts-responsive-container",v),style:BT(BT({},w),{},{width:s,height:o,minWidth:u,minHeight:f,maxHeight:d}),ref:_},A.createElement("div",{style:TV({width:s,height:o})},A.createElement(xC,{width:C,height:L},h)))}),CV=A.forwardRef((e,t)=>{var n=fb();if(Cr(n.width)&&Cr(n.height))return e.children;var{width:r,height:s}=OV({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:u}=vC(void 0,void 0,{width:r,height:s,aspect:e.aspect,maxHeight:e.maxHeight});return ye(o)&&ye(u)?A.createElement(xC,{width:o,height:u},e.children):A.createElement(kV,zv({},e,{width:r,height:s,ref:t}))});function db(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 Nu=()=>{var e,t=Jt(),n=ve(hV),r=ve(ch),s=(e=ve(uh))===null||e===void 0?void 0:e.padding;return!t||!r||!s?n:{width:r.width-s.left-s.right,height:r.height-s.top-s.bottom,x:s.left,y:s.top}},DV={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},wC=()=>{var e;return(e=ve(Xt))!==null&&e!==void 0?e:DV},_C=()=>ve(hi),SC=()=>ve(mi),ht=e=>e.layout.layoutType,ku=()=>ve(ht),AC=()=>{var e=ku();if(e==="horizontal"||e==="vertical")return e},TC=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},PV=()=>{var e=ku();return e!==void 0},Cu=e=>{var t=it(),n=Jt(),{width:r,height:s}=e,o=fb(),u=r,f=s;return o&&(u=o.width>0?o.width:r,f=o.height>0?o.height:s),A.useEffect(()=>{!n&&Cr(u)&&Cr(f)&&t(VU({width:u,height:f}))},[t,n,u,f]),null},OC=Symbol.for("immer-nothing"),UT=Symbol.for("immer-draftable"),Rn=Symbol.for("immer-state");function ur(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var uu=Object.getPrototypeOf;function ho(e){return!!e&&!!e[Rn]}function Za(e){return e?EC(e)||Array.isArray(e)||!!e[UT]||!!e.constructor?.[UT]||Du(e)||dh(e):!1}var RV=Object.prototype.constructor.toString(),VT=new WeakMap;function EC(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=VT.get(n);return r===void 0&&(r=Function.toString.call(n),VT.set(n,r)),r===RV}function md(e,t,n=!0){fh(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((r,s)=>t(s,r,e))}function fh(e){const t=e[Rn];return t?t.type_:Array.isArray(e)?1:Du(e)?2:dh(e)?3:0}function Iv(e,t){return fh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function jC(e,t,n){const r=fh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function LV(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Du(e){return e instanceof Map}function dh(e){return e instanceof Set}function La(e){return e.copy_||e.base_}function Bv(e,t){if(Du(e))return new Map(e);if(dh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=EC(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Rn];let s=Reflect.ownKeys(r);for(let o=0;o1&&Object.defineProperties(e,{set:_f,add:_f,clear:_f,delete:_f}),Object.freeze(e),t&&Object.values(e).forEach(n=>hb(n,!0))),e}function zV(){ur(2)}var _f={value:zV};function hh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var IV={};function Qa(e){const t=IV[e];return t||ur(0,e),t}var cu;function MC(){return cu}function BV(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qT(e,t){t&&(Qa("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Uv(e){Vv(e),e.drafts_.forEach(UV),e.drafts_=null}function Vv(e){e===cu&&(cu=e.parent_)}function $T(e){return cu=BV(cu,e)}function UV(e){const t=e[Rn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function FT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Rn].modified_&&(Uv(t),ur(4)),Za(e)&&(e=pd(t,e),t.parent_||gd(t,e)),t.patches_&&Qa("Patches").generateReplacementPatches_(n[Rn].base_,e,t.patches_,t.inversePatches_)):e=pd(t,n,[]),Uv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==OC?e:void 0}function pd(e,t,n){if(hh(t))return t;const r=e.immer_.shouldUseStrictIteration(),s=t[Rn];if(!s)return md(t,(o,u)=>HT(e,s,t,o,u,n),r),t;if(s.scope_!==e)return t;if(!s.modified_)return gd(e,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const o=s.copy_;let u=o,f=!1;s.type_===3&&(u=new Set(o),o.clear(),f=!0),md(u,(d,h)=>HT(e,s,o,d,h,n,f),r),gd(e,o,!1),n&&e.patches_&&Qa("Patches").generatePatches_(s,n,e.patches_,e.inversePatches_)}return s.copy_}function HT(e,t,n,r,s,o,u){if(s==null||typeof s!="object"&&!u)return;const f=hh(s);if(!(f&&!u)){if(ho(s)){const d=o&&t&&t.type_!==3&&!Iv(t.assigned_,r)?o.concat(r):void 0,h=pd(e,s,d);if(jC(n,r,h),ho(h))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Za(s)&&!f){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===s&&f)return;pd(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Du(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&gd(e,s)}}}function gd(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hb(t,n)}function VV(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:MC(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,o=mb;n&&(s=[r],o=fu);const{revoke:u,proxy:f}=Proxy.revocable(s,o);return r.draft_=f,r.revoke_=u,f}var mb={get(e,t){if(t===Rn)return e;const n=La(e);if(!Iv(n,t))return qV(e,n,t);const r=n[t];return e.finalized_||!Za(r)?r:r===xy(e.base_,t)?(wy(e),e.copy_[t]=$v(r,e)):r},has(e,t){return t in La(e)},ownKeys(e){return Reflect.ownKeys(La(e))},set(e,t,n){const r=NC(La(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=xy(La(e),t),o=s?.[Rn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(LV(n,s)&&(n!==void 0||Iv(e.base_,t)))return!0;wy(e),qv(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return xy(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,wy(e),qv(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=La(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ur(11)},getPrototypeOf(e){return uu(e.base_)},setPrototypeOf(){ur(12)}},fu={};md(mb,(e,t)=>{fu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});fu.deleteProperty=function(e,t){return fu.set.call(this,e,t,void 0)};fu.set=function(e,t,n){return mb.set.call(this,e[0],t,n,e[0])};function xy(e,t){const n=e[Rn];return(n?La(n):e)[t]}function qV(e,t,n){const r=NC(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function NC(e,t){if(!(t in e))return;let n=uu(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=uu(n)}}function qv(e){e.modified_||(e.modified_=!0,e.parent_&&qv(e.parent_))}function wy(e){e.copy_||(e.copy_=Bv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var $V=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const u=this;return function(d=o,...h){return u.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&ur(6),r!==void 0&&typeof r!="function"&&ur(7);let s;if(Za(t)){const o=$T(this),u=$v(t,void 0);let f=!0;try{s=n(u),f=!1}finally{f?Uv(o):Vv(o)}return qT(o,r),FT(s,o)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===OC&&(s=void 0),this.autoFreeze_&&hb(s,!0),r){const o=[],u=[];Qa("Patches").generateReplacementPatches_(t,s,o,u),r(o,u)}return s}else ur(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...f)=>this.produceWithPatches(u,d=>t(d,...f));let r,s;return[this.produce(t,n,(u,f)=>{r=u,s=f}),r,s]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Za(e)||ur(8),ho(e)&&(e=FV(e));const t=$T(this),n=$v(e,void 0);return n[Rn].isManual_=!0,Vv(t),n}finishDraft(e,t){const n=e&&e[Rn];(!n||!n.isManual_)&&ur(9);const{scope_:r}=n;return qT(r,t),FT(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Qa("Patches").applyPatches_;return ho(e)?r(e,t):this.produce(e,s=>r(s,t))}};function $v(e,t){const n=Du(e)?Qa("MapSet").proxyMap_(e,t):dh(e)?Qa("MapSet").proxySet_(e,t):VV(e,t);return(t?t.scope_:MC()).drafts_.push(n),n}function FV(e){return ho(e)||ur(10,e),kC(e)}function kC(e){if(!Za(e)||hh(e))return e;const t=e[Rn];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Bv(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Bv(e,!0);return md(n,(s,o)=>{jC(n,s,kC(o))},r),t&&(t.finalized_=!1),n}var HV=new $V;HV.produce;var KV={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},CC=Qt({name:"legend",initialState:KV,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:Qe()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,s=Zn(e).payload.indexOf(n);s>-1&&(e.payload[s]=r)},prepare:Qe()},removeLegendPayload:{reducer(e,t){var n=Zn(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Qe()}}}),{setLegendSize:Ene,setLegendSettings:jne,addLegendPayload:XV,replaceLegendPayload:YV,removeLegendPayload:GV}=CC.actions,WV=CC.reducer,_y={exports:{}},Sy={};var KT;function ZV(){if(KT)return Sy;KT=1;var e=yo();function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,s=e.useRef,o=e.useEffect,u=e.useMemo,f=e.useDebugValue;return Sy.useSyncExternalStoreWithSelector=function(d,h,m,p,v){var x=s(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=u(function(){function S(k){if(!O){if(O=!0,M=k,k=p(k),v!==void 0&&w.hasValue){var C=w.value;if(v(C,k))return j=C}return j=k}if(C=j,n(M,k))return C;var L=p(k);return v!==void 0&&v(C,L)?(M=k,C):(M=k,j=L)}var O=!1,M,j,N=m===void 0?null:m;return[function(){return S(h())},N===null?void 0:function(){return S(N())}]},[h,m,p,v]);var _=r(d,x[0],x[1]);return o(function(){w.hasValue=!0,w.value=_},[_]),f(_),_},Sy}var XT;function QV(){return XT||(XT=1,_y.exports=ZV()),_y.exports}QV();function JV(e){e()}function eq(){let e=null,t=null;return{clear(){e=null,t=null},notify(){JV(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const s=t={callback:n,next:null,prev:t};return s.prev?s.prev.next=s:e=s,function(){!r||e===null||(r=!1,s.next?s.next.prev=s.prev:t=s.prev,s.prev?s.prev.next=s.next:e=s.next)}}}}var YT={notify(){},get:()=>[]};function tq(e,t){let n,r=YT,s=0,o=!1;function u(_){m();const S=r.subscribe(_);let O=!1;return()=>{O||(O=!0,S(),p())}}function f(){r.notify()}function d(){w.onStateChange&&w.onStateChange()}function h(){return o}function m(){s++,n||(n=e.subscribe(d),r=eq())}function p(){s--,n&&s===0&&(n(),n=void 0,r.clear(),r=YT)}function v(){o||(o=!0,m())}function x(){o&&(o=!1,p())}const w={addNestedSub:u,notifyNestedSubs:f,handleChangeWrapper:d,isSubscribed:h,trySubscribe:v,tryUnsubscribe:x,getListeners:()=>r};return w}var nq=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rq=nq(),iq=()=>typeof navigator<"u"&&navigator.product==="ReactNative",aq=iq(),sq=()=>rq||aq?A.useLayoutEffect:A.useEffect,oq=sq();function GT(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function lq(e,t){if(GT(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let s=0;s{const d=tq(s);return{store:s,subscription:d,getServerState:r?()=>r:void 0}},[s,r]),u=A.useMemo(()=>s.getState(),[s]);oq(()=>{const{subscription:d}=o;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),u!==s.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[o,u]);const f=n||dq;return A.createElement(f.Provider,{value:o},t)}var mq=hq,pq=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function gq(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function mh(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(pq.has(r)){if(e[r]==null&&t[r]==null)continue;if(!lq(e[r],t[r]))return!1}else if(!gq(e[r],t[r]))return!1;return!0}function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{separator:t=qs.separator,contentStyle:n,itemStyle:r,labelStyle:s=qs.labelStyle,payload:o,formatter:u,itemSorter:f,wrapperClassName:d,labelClassName:h,label:m,labelFormatter:p,accessibilityLayer:v=qs.accessibilityLayer}=e,x=()=>{if(o&&o.length){var k={padding:0,margin:0},C=wq(o,f),L=C.map((I,Y)=>{if(I.type==="none")return null;var te=I.formatter||u||xq,{value:ie,name:K}=I,be=ie,pe=K;if(te){var xe=te(ie,K,I,Y,o);if(Array.isArray(xe))[be,pe]=xe;else if(xe!=null)be=xe;else return null}var V=Ml(Ml({},qs.itemStyle),{},{color:I.color||qs.itemStyle.color},r);return A.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(Y),style:V},kr(pe)?A.createElement("span",{className:"recharts-tooltip-item-name"},pe):null,kr(pe)?A.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,A.createElement("span",{className:"recharts-tooltip-item-value"},be),A.createElement("span",{className:"recharts-tooltip-item-unit"},I.unit||""))});return A.createElement("ul",{className:"recharts-tooltip-item-list",style:k},L)}return null},w=Ml(Ml({},qs.contentStyle),n),_=Ml({margin:0},s),S=!dt(m),O=S?m:"",M=et("recharts-default-tooltip",d),j=et("recharts-tooltip-label",h);S&&p&&o!==void 0&&o!==null&&(O=p(m,o));var N=v?{role:"status","aria-live":"assertive"}:{};return A.createElement("div",Fv({className:M,style:w},N),A.createElement("p",{className:j,style:_},A.isValidElement(O)?O:"".concat(O)),x())},Nl="recharts-tooltip-wrapper",Sq={visibility:"hidden"};function Aq(e){var{coordinate:t,translateX:n,translateY:r}=e;return et(Nl,{["".concat(Nl,"-right")]:ye(n)&&t&&ye(t.x)&&n>=t.x,["".concat(Nl,"-left")]:ye(n)&&t&&ye(t.x)&&n=t.y,["".concat(Nl,"-top")]:ye(r)&&t&&ye(t.y)&&r0?s:0),p=n[r]+s;if(t[r])return u[r]?m:p;var v=d[r];if(v==null)return 0;if(u[r]){var x=m,w=v;return xS?Math.max(m,v):Math.max(p,v)}function Tq(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Oq(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:s,position:o,reverseDirection:u,tooltipBox:f,useTranslate3d:d,viewBox:h}=e,m,p,v;return f.height>0&&f.width>0&&n?(p=ZT({allowEscapeViewBox:t,coordinate:n,key:"x",offset:s,position:o,reverseDirection:u,tooltipDimension:f.width,viewBox:h,viewBoxDimension:h.width}),v=ZT({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:o,reverseDirection:u,tooltipDimension:f.height,viewBox:h,viewBoxDimension:h.height}),m=Tq({translateX:p,translateY:v,useTranslate3d:d})):m=Sq,{cssProperties:m,cssClasses:Aq({translateX:p,translateY:v,coordinate:n})}}var Eq=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Pu={isSsr:Eq()};function DC(){var[e,t]=A.useState(()=>Pu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return A.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function QT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function $s(e){for(var t=1;t({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));A.useEffect(()=>{var w=_=>{if(_.key==="Escape"){var S,O,M,j;h({dismissed:!0,dismissedAtCoordinate:{x:(S=(O=e.coordinate)===null||O===void 0?void 0:O.x)!==null&&S!==void 0?S:0,y:(M=(j=e.coordinate)===null||j===void 0?void 0:j.y)!==null&&M!==void 0?M:0}})}};return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),d.dismissed&&(((r=(s=e.coordinate)===null||s===void 0?void 0:s.x)!==null&&r!==void 0?r:0)!==d.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==d.dismissedAtCoordinate.y)&&h($s($s({},d),{},{dismissed:!1}));var{cssClasses:m,cssProperties:p}=Oq({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}),v=e.hasPortalFromProps?{}:$s($s({transition:kq({prefersReducedMotion:f,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},p),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),x=$s($s({},v),{},{visibility:!d.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return A.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:m,style:x,ref:e.innerRef},e.children)}var Dq=A.memo(Cq),PC=()=>{var e;return(e=ve(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;tLe(e.x)&&Le(e.y),nO=e=>e.base!=null&&yd(e.base)&&yd(e),kl=e=>e.x,Cl=e=>e.y,zq=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Ou(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=tO["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return tO[n]||Gd},rO={connectNulls:!1,type:"linear"},Iq=e=>{var{type:t=rO.type,points:n=[],baseLine:r,layout:s,connectNulls:o=rO.connectNulls}=e,u=zq(t,s),f=o?n.filter(yd):n;if(Array.isArray(r)){var d,h=n.map((w,_)=>eO(eO({},w),{},{base:r[_]}));s==="vertical"?d=pf().y(Cl).x1(kl).x0(w=>w.base.x):d=pf().x(kl).y1(Cl).y0(w=>w.base.y);var m=d.defined(nO).curve(u),p=o?h.filter(nO):h;return m(p)}var v;s==="vertical"&&ye(r)?v=pf().y(Cl).x1(kl).x0(r):ye(r)?v=pf().x(kl).y1(Cl).y0(r):v=sk().x(kl).y(Cl);var x=v.defined(yd).curve(u);return x(f)},pb=e=>{var{className:t,points:n,path:r,pathRef:s}=e,o=ku();if((!n||!n.length)&&!r)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},f=n&&n.length?Iq(u):r;return A.createElement("path",Hv({},Nr(e),q9(e),{className:et("recharts-curve",t),d:f===null?void 0:f,ref:s}))},Bq=["x","y","top","left","width","height","className"];function Kv(){return Kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(s,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),Xq=e=>{var{x:t=0,y:n=0,top:r=0,left:s=0,width:o=0,height:u=0,className:f}=e,d=Fq(e,Bq),h=Uq({x:t,y:n,top:r,left:s,width:o,height:u},d);return!ye(t)||!ye(n)||!ye(o)||!ye(u)||!ye(r)||!ye(s)?null:A.createElement("path",Kv({},er(h),{className:et("recharts-cross",f),d:Kq(t,n,o,u,r,s)}))};function Yq(e,t,n,r){var s=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-s:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-s,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function aO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function sO(e){for(var t=1;te.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),RC=(e,t,n)=>e.map(r=>"".concat(Qq(r)," ").concat(t,"ms ").concat(n)).join(","),Jq=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(s=>r.includes(s))),du=(e,t)=>Object.keys(t).reduce((n,r)=>sO(sO({},n),{},{[r]:e(r,t[r])}),{});function oO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;te+(t-e)*n,Xv=e=>{var{from:t,to:n}=e;return t!==n},LC=(e,t,n)=>{var r=du((s,o)=>{if(Xv(o)){var[u,f]=e(o.from,o.to,o.velocity);return At(At({},o),{},{from:u,velocity:f})}return o},t);return n<1?du((s,o)=>Xv(o)&&r[s]!=null?At(At({},o),{},{velocity:vd(o.velocity,r[s].velocity,n),from:vd(o.from,r[s].from,n)}):o,t):LC(e,r,n-1)};function r$(e,t,n,r,s,o){var u,f=r.reduce((v,x)=>At(At({},v),{},{[x]:{from:e[x],velocity:0,to:t[x]}}),{}),d=()=>du((v,x)=>x.from,f),h=()=>!Object.values(f).filter(Xv).length,m=null,p=v=>{u||(u=v);var x=v-u,w=x/n.dt;f=LC(n,f,w),s(At(At(At({},e),t),d())),u=v,h()||(m=o.setTimeout(p))};return()=>(m=o.setTimeout(p),()=>{var v;(v=m)===null||v===void 0||v()})}function i$(e,t,n,r,s,o,u){var f=null,d=s.reduce((p,v)=>{var x=e[v],w=t[v];return x==null||w==null?p:At(At({},p),{},{[v]:[x,w]})},{}),h,m=p=>{h||(h=p);var v=(p-h)/r,x=du((_,S)=>vd(...S,n(v)),d);if(o(At(At(At({},e),t),x)),v<1)f=u.setTimeout(m);else{var w=du((_,S)=>vd(...S,n(1)),d);o(At(At(At({},e),t),w))}};return()=>(f=u.setTimeout(m),()=>{var p;(p=f)===null||p===void 0||p()})}const a$=(e,t,n,r,s,o)=>{var u=Jq(e,t);return n==null?()=>(s(At(At({},e),t)),()=>{}):n.isStepper===!0?r$(e,t,n,u,s,o):i$(e,t,n,r,u,s,o)};var bd=1e-4,zC=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],IC=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),lO=(e,t)=>n=>{var r=zC(e,t);return IC(r,n)},s$=(e,t)=>n=>{var r=zC(e,t),s=[...r.map((o,u)=>o*u).slice(1),0];return IC(s,n)},o$=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var s=r.map(o=>parseFloat(o));return[s[0],s[1],s[2],s[3]]},l$=function(){for(var t=arguments.length,n=new Array(t),r=0;r{var s=lO(e,n),o=lO(t,r),u=s$(e,n),f=h=>h>1?1:h<0?0:h,d=h=>{for(var m=h>1?1:h,p=m,v=0;v<8;++v){var x=s(p)-m,w=u(p);if(Math.abs(x-m)0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:s=17}=t,o=(u,f,d)=>{var h=-(u-f)*n,m=d*r,p=d+(h-m)*s/1e3,v=d*s/1e3+u;return Math.abs(v-f){if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return uO(e);case"spring":return c$();default:if(e.split("(")[0]==="cubic-bezier")return uO(e)}return typeof e=="function"?e:null};function d$(e){var t,n=()=>null,r=!1,s=null,o=u=>{if(!r){if(Array.isArray(u)){if(!u.length)return;var f=u,[d,...h]=f;if(typeof d=="number"){s=e.setTimeout(o.bind(null,h),d);return}o(d),s=e.setTimeout(o.bind(null,h));return}typeof u=="string"&&(t=u,n(t)),typeof u=="object"&&(t=u,n(t)),typeof u=="function"&&u()}};return{stop:()=>{r=!0},start:u=>{r=!1,s&&(s(),s=null),o(u)},subscribe:u=>(n=u,()=>{n=()=>null}),getTimeoutController:()=>e}}class h${setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),s=null,o=u=>{u-r>=n?t(u):typeof requestAnimationFrame=="function"&&(s=requestAnimationFrame(o))};return s=requestAnimationFrame(o),()=>{s!=null&&cancelAnimationFrame(s)}}}function m$(){return d$(new h$)}var p$=A.createContext(m$);function g$(e,t){var n=A.useContext(p$);return A.useMemo(()=>t??n(e),[e,t,n])}var y$={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},cO={t:0},Ay={t:1};function gb(e){var t=vn(e,y$),{isActive:n,canBegin:r,duration:s,easing:o,begin:u,onAnimationEnd:f,onAnimationStart:d,children:h}=t,m=DC(),p=n==="auto"?!Pu.isSsr&&!m:n,v=g$(t.animationId,t.animationManager),[x,w]=A.useState(p?cO:Ay),_=A.useRef(null);return A.useEffect(()=>{p||w(Ay)},[p]),A.useEffect(()=>{if(!p||!r)return _o;var S=a$(cO,Ay,f$(o),s,w,v.getTimeoutController()),O=()=>{_.current=S()};return v.start([d,u,O,s,f]),()=>{v.stop(),_.current&&_.current(),f()}},[p,r,s,o,u,d,f,v]),h(x.t)}function yb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=A.useRef(au(t)),r=A.useRef(e);return r.current!==e&&(n.current=au(t),r.current=e),n.current}var v$=["radius"],b$=["radius"],fO,dO,hO,mO,pO,gO,yO,vO,bO,xO;function wO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function _O(e){for(var t=1;t{var o=Ji(n),u=Ji(r),f=Math.min(Math.abs(o)/2,Math.abs(u)/2),d=u>=0?1:-1,h=o>=0?1:-1,m=u>=0&&o>=0||u<0&&o<0?1:0,p;if(f>0&&Array.isArray(s)){for(var v=[0,0,0,0],x=0,w=4;xf?f:S}p=ut(fO||(fO=xr(["M",",",""])),e,t+d*v[0]),v[0]>0&&(p+=ut(dO||(dO=xr(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),p+=ut(hO||(hO=xr(["L ",",",""])),e+n-h*v[1],t),v[1]>0&&(p+=ut(mO||(mO=xr(["A ",",",",0,0,",`, + height and width.`,C,L,s,o,u,f,n),A.createElement("div",{id:p?"".concat(p):void 0,className:et("recharts-responsive-container",v),style:BT(BT({},w),{},{width:s,height:o,minWidth:u,minHeight:f,maxHeight:d}),ref:_},A.createElement("div",{style:TV({width:s,height:o})},A.createElement(xC,{width:C,height:L},h)))}),CV=A.forwardRef((e,t)=>{var n=fb();if(Cr(n.width)&&Cr(n.height))return e.children;var{width:r,height:s}=OV({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:u}=vC(void 0,void 0,{width:r,height:s,aspect:e.aspect,maxHeight:e.maxHeight});return ye(o)&&ye(u)?A.createElement(xC,{width:o,height:u},e.children):A.createElement(kV,zv({},e,{width:r,height:s,ref:t}))});function db(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 Nu=()=>{var e,t=Jt(),n=ve(hV),r=ve(ch),s=(e=ve(uh))===null||e===void 0?void 0:e.padding;return!t||!r||!s?n:{width:r.width-s.left-s.right,height:r.height-s.top-s.bottom,x:s.left,y:s.top}},DV={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},wC=()=>{var e;return(e=ve(Xt))!==null&&e!==void 0?e:DV},_C=()=>ve(hi),SC=()=>ve(mi),ht=e=>e.layout.layoutType,ku=()=>ve(ht),AC=()=>{var e=ku();if(e==="horizontal"||e==="vertical")return e},TC=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},PV=()=>{var e=ku();return e!==void 0},Cu=e=>{var t=it(),n=Jt(),{width:r,height:s}=e,o=fb(),u=r,f=s;return o&&(u=o.width>0?o.width:r,f=o.height>0?o.height:s),A.useEffect(()=>{!n&&Cr(u)&&Cr(f)&&t(VU({width:u,height:f}))},[t,n,u,f]),null},OC=Symbol.for("immer-nothing"),UT=Symbol.for("immer-draftable"),Rn=Symbol.for("immer-state");function ur(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var uu=Object.getPrototypeOf;function ho(e){return!!e&&!!e[Rn]}function Za(e){return e?EC(e)||Array.isArray(e)||!!e[UT]||!!e.constructor?.[UT]||Du(e)||dh(e):!1}var RV=Object.prototype.constructor.toString(),VT=new WeakMap;function EC(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=VT.get(n);return r===void 0&&(r=Function.toString.call(n),VT.set(n,r)),r===RV}function md(e,t,n=!0){fh(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((r,s)=>t(s,r,e))}function fh(e){const t=e[Rn];return t?t.type_:Array.isArray(e)?1:Du(e)?2:dh(e)?3:0}function Iv(e,t){return fh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function jC(e,t,n){const r=fh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function LV(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Du(e){return e instanceof Map}function dh(e){return e instanceof Set}function La(e){return e.copy_||e.base_}function Bv(e,t){if(Du(e))return new Map(e);if(dh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=EC(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Rn];let s=Reflect.ownKeys(r);for(let o=0;o1&&Object.defineProperties(e,{set:_f,add:_f,clear:_f,delete:_f}),Object.freeze(e),t&&Object.values(e).forEach(n=>hb(n,!0))),e}function zV(){ur(2)}var _f={value:zV};function hh(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var IV={};function Qa(e){const t=IV[e];return t||ur(0,e),t}var cu;function MC(){return cu}function BV(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qT(e,t){t&&(Qa("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Uv(e){Vv(e),e.drafts_.forEach(UV),e.drafts_=null}function Vv(e){e===cu&&(cu=e.parent_)}function $T(e){return cu=BV(cu,e)}function UV(e){const t=e[Rn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function FT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Rn].modified_&&(Uv(t),ur(4)),Za(e)&&(e=pd(t,e),t.parent_||gd(t,e)),t.patches_&&Qa("Patches").generateReplacementPatches_(n[Rn].base_,e,t.patches_,t.inversePatches_)):e=pd(t,n,[]),Uv(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==OC?e:void 0}function pd(e,t,n){if(hh(t))return t;const r=e.immer_.shouldUseStrictIteration(),s=t[Rn];if(!s)return md(t,(o,u)=>HT(e,s,t,o,u,n),r),t;if(s.scope_!==e)return t;if(!s.modified_)return gd(e,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const o=s.copy_;let u=o,f=!1;s.type_===3&&(u=new Set(o),o.clear(),f=!0),md(u,(d,h)=>HT(e,s,o,d,h,n,f),r),gd(e,o,!1),n&&e.patches_&&Qa("Patches").generatePatches_(s,n,e.patches_,e.inversePatches_)}return s.copy_}function HT(e,t,n,r,s,o,u){if(s==null||typeof s!="object"&&!u)return;const f=hh(s);if(!(f&&!u)){if(ho(s)){const d=o&&t&&t.type_!==3&&!Iv(t.assigned_,r)?o.concat(r):void 0,h=pd(e,s,d);if(jC(n,r,h),ho(h))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Za(s)&&!f){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===s&&f)return;pd(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Du(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&gd(e,s)}}}function gd(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hb(t,n)}function VV(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:MC(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,o=mb;n&&(s=[r],o=fu);const{revoke:u,proxy:f}=Proxy.revocable(s,o);return r.draft_=f,r.revoke_=u,f}var mb={get(e,t){if(t===Rn)return e;const n=La(e);if(!Iv(n,t))return qV(e,n,t);const r=n[t];return e.finalized_||!Za(r)?r:r===xy(e.base_,t)?(wy(e),e.copy_[t]=$v(r,e)):r},has(e,t){return t in La(e)},ownKeys(e){return Reflect.ownKeys(La(e))},set(e,t,n){const r=NC(La(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=xy(La(e),t),o=s?.[Rn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(LV(n,s)&&(n!==void 0||Iv(e.base_,t)))return!0;wy(e),qv(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return xy(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,wy(e),qv(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=La(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ur(11)},getPrototypeOf(e){return uu(e.base_)},setPrototypeOf(){ur(12)}},fu={};md(mb,(e,t)=>{fu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});fu.deleteProperty=function(e,t){return fu.set.call(this,e,t,void 0)};fu.set=function(e,t,n){return mb.set.call(this,e[0],t,n,e[0])};function xy(e,t){const n=e[Rn];return(n?La(n):e)[t]}function qV(e,t,n){const r=NC(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function NC(e,t){if(!(t in e))return;let n=uu(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=uu(n)}}function qv(e){e.modified_||(e.modified_=!0,e.parent_&&qv(e.parent_))}function wy(e){e.copy_||(e.copy_=Bv(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var $V=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const u=this;return function(d=o,...h){return u.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&ur(6),r!==void 0&&typeof r!="function"&&ur(7);let s;if(Za(t)){const o=$T(this),u=$v(t,void 0);let f=!0;try{s=n(u),f=!1}finally{f?Uv(o):Vv(o)}return qT(o,r),FT(s,o)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===OC&&(s=void 0),this.autoFreeze_&&hb(s,!0),r){const o=[],u=[];Qa("Patches").generateReplacementPatches_(t,s,o,u),r(o,u)}return s}else ur(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...f)=>this.produceWithPatches(u,d=>t(d,...f));let r,s;return[this.produce(t,n,(u,f)=>{r=u,s=f}),r,s]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Za(e)||ur(8),ho(e)&&(e=FV(e));const t=$T(this),n=$v(e,void 0);return n[Rn].isManual_=!0,Vv(t),n}finishDraft(e,t){const n=e&&e[Rn];(!n||!n.isManual_)&&ur(9);const{scope_:r}=n;return qT(r,t),FT(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Qa("Patches").applyPatches_;return ho(e)?r(e,t):this.produce(e,s=>r(s,t))}};function $v(e,t){const n=Du(e)?Qa("MapSet").proxyMap_(e,t):dh(e)?Qa("MapSet").proxySet_(e,t):VV(e,t);return(t?t.scope_:MC()).drafts_.push(n),n}function FV(e){return ho(e)||ur(10,e),kC(e)}function kC(e){if(!Za(e)||hh(e))return e;const t=e[Rn];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Bv(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Bv(e,!0);return md(n,(s,o)=>{jC(n,s,kC(o))},r),t&&(t.finalized_=!1),n}var HV=new $V;HV.produce;var KV={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},CC=Qt({name:"legend",initialState:KV,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:Qe()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,s=Zn(e).payload.indexOf(n);s>-1&&(e.payload[s]=r)},prepare:Qe()},removeLegendPayload:{reducer(e,t){var n=Zn(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Qe()}}}),{setLegendSize:Ene,setLegendSettings:jne,addLegendPayload:XV,replaceLegendPayload:YV,removeLegendPayload:GV}=CC.actions,WV=CC.reducer,_y={exports:{}},Sy={};var KT;function ZV(){if(KT)return Sy;KT=1;var e=yo();function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,s=e.useRef,o=e.useEffect,u=e.useMemo,f=e.useDebugValue;return Sy.useSyncExternalStoreWithSelector=function(d,h,m,p,v){var x=s(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=u(function(){function S(k){if(!O){if(O=!0,M=k,k=p(k),v!==void 0&&w.hasValue){var C=w.value;if(v(C,k))return j=C}return j=k}if(C=j,n(M,k))return C;var L=p(k);return v!==void 0&&v(C,L)?(M=k,C):(M=k,j=L)}var O=!1,M,j,N=m===void 0?null:m;return[function(){return S(h())},N===null?void 0:function(){return S(N())}]},[h,m,p,v]);var _=r(d,x[0],x[1]);return o(function(){w.hasValue=!0,w.value=_},[_]),f(_),_},Sy}var XT;function QV(){return XT||(XT=1,_y.exports=ZV()),_y.exports}QV();function JV(e){e()}function eq(){let e=null,t=null;return{clear(){e=null,t=null},notify(){JV(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const s=t={callback:n,next:null,prev:t};return s.prev?s.prev.next=s:e=s,function(){!r||e===null||(r=!1,s.next?s.next.prev=s.prev:t=s.prev,s.prev?s.prev.next=s.next:e=s.next)}}}}var YT={notify(){},get:()=>[]};function tq(e,t){let n,r=YT,s=0,o=!1;function u(_){m();const S=r.subscribe(_);let O=!1;return()=>{O||(O=!0,S(),p())}}function f(){r.notify()}function d(){w.onStateChange&&w.onStateChange()}function h(){return o}function m(){s++,n||(n=e.subscribe(d),r=eq())}function p(){s--,n&&s===0&&(n(),n=void 0,r.clear(),r=YT)}function v(){o||(o=!0,m())}function x(){o&&(o=!1,p())}const w={addNestedSub:u,notifyNestedSubs:f,handleChangeWrapper:d,isSubscribed:h,trySubscribe:v,tryUnsubscribe:x,getListeners:()=>r};return w}var nq=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rq=nq(),iq=()=>typeof navigator<"u"&&navigator.product==="ReactNative",aq=iq(),sq=()=>rq||aq?A.useLayoutEffect:A.useEffect,oq=sq();function GT(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function lq(e,t){if(GT(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let s=0;s{const d=tq(s);return{store:s,subscription:d,getServerState:r?()=>r:void 0}},[s,r]),u=A.useMemo(()=>s.getState(),[s]);oq(()=>{const{subscription:d}=o;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),u!==s.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[o,u]);const f=n||dq;return A.createElement(f.Provider,{value:o},t)}var mq=hq,pq=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function gq(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function mh(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(pq.has(r)){if(e[r]==null&&t[r]==null)continue;if(!lq(e[r],t[r]))return!1}else if(!gq(e[r],t[r]))return!1;return!0}function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{separator:t=qs.separator,contentStyle:n,itemStyle:r,labelStyle:s=qs.labelStyle,payload:o,formatter:u,itemSorter:f,wrapperClassName:d,labelClassName:h,label:m,labelFormatter:p,accessibilityLayer:v=qs.accessibilityLayer}=e,x=()=>{if(o&&o.length){var k={padding:0,margin:0},C=wq(o,f),L=C.map((I,Y)=>{if(I.type==="none")return null;var te=I.formatter||u||xq,{value:ie,name:K}=I,be=ie,pe=K;if(te){var xe=te(ie,K,I,Y,o);if(Array.isArray(xe))[be,pe]=xe;else if(xe!=null)be=xe;else return null}var V=Ml(Ml({},qs.itemStyle),{},{color:I.color||qs.itemStyle.color},r);return A.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(Y),style:V},kr(pe)?A.createElement("span",{className:"recharts-tooltip-item-name"},pe):null,kr(pe)?A.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,A.createElement("span",{className:"recharts-tooltip-item-value"},be),A.createElement("span",{className:"recharts-tooltip-item-unit"},I.unit||""))});return A.createElement("ul",{className:"recharts-tooltip-item-list",style:k},L)}return null},w=Ml(Ml({},qs.contentStyle),n),_=Ml({margin:0},s),S=!dt(m),O=S?m:"",M=et("recharts-default-tooltip",d),j=et("recharts-tooltip-label",h);S&&p&&o!==void 0&&o!==null&&(O=p(m,o));var N=v?{role:"status","aria-live":"assertive"}:{};return A.createElement("div",Fv({className:M,style:w},N),A.createElement("p",{className:j,style:_},A.isValidElement(O)?O:"".concat(O)),x())},Nl="recharts-tooltip-wrapper",Sq={visibility:"hidden"};function Aq(e){var{coordinate:t,translateX:n,translateY:r}=e;return et(Nl,{["".concat(Nl,"-right")]:ye(n)&&t&&ye(t.x)&&n>=t.x,["".concat(Nl,"-left")]:ye(n)&&t&&ye(t.x)&&n=t.y,["".concat(Nl,"-top")]:ye(r)&&t&&ye(t.y)&&r0?s:0),p=n[r]+s;if(t[r])return u[r]?m:p;var v=d[r];if(v==null)return 0;if(u[r]){var x=m,w=v;return xS?Math.max(m,v):Math.max(p,v)}function Tq(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Oq(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:s,position:o,reverseDirection:u,tooltipBox:f,useTranslate3d:d,viewBox:h}=e,m,p,v;return f.height>0&&f.width>0&&n?(p=ZT({allowEscapeViewBox:t,coordinate:n,key:"x",offset:s,position:o,reverseDirection:u,tooltipDimension:f.width,viewBox:h,viewBoxDimension:h.width}),v=ZT({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:o,reverseDirection:u,tooltipDimension:f.height,viewBox:h,viewBoxDimension:h.height}),m=Tq({translateX:p,translateY:v,useTranslate3d:d})):m=Sq,{cssProperties:m,cssClasses:Aq({translateX:p,translateY:v,coordinate:n})}}var Eq=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Pu={isSsr:Eq()};function DC(){var[e,t]=A.useState(()=>Pu.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return A.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function QT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function $s(e){for(var t=1;t({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));A.useEffect(()=>{var w=_=>{if(_.key==="Escape"){var S,O,M,j;h({dismissed:!0,dismissedAtCoordinate:{x:(S=(O=e.coordinate)===null||O===void 0?void 0:O.x)!==null&&S!==void 0?S:0,y:(M=(j=e.coordinate)===null||j===void 0?void 0:j.y)!==null&&M!==void 0?M:0}})}};return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),d.dismissed&&(((r=(s=e.coordinate)===null||s===void 0?void 0:s.x)!==null&&r!==void 0?r:0)!==d.dismissedAtCoordinate.x||((o=(u=e.coordinate)===null||u===void 0?void 0:u.y)!==null&&o!==void 0?o:0)!==d.dismissedAtCoordinate.y)&&h($s($s({},d),{},{dismissed:!1}));var{cssClasses:m,cssProperties:p}=Oq({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}),v=e.hasPortalFromProps?{}:$s($s({transition:kq({prefersReducedMotion:f,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},p),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),x=$s($s({},v),{},{visibility:!d.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return A.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:m,style:x,ref:e.innerRef},e.children)}var Dq=A.memo(Cq),PC=()=>{var e;return(e=ve(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;tLe(e.x)&&Le(e.y),nO=e=>e.base!=null&&yd(e.base)&&yd(e),kl=e=>e.x,Cl=e=>e.y,zq=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Ou(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=tO["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return tO[n]||Gd},rO={connectNulls:!1,type:"linear"},Iq=e=>{var{type:t=rO.type,points:n=[],baseLine:r,layout:s,connectNulls:o=rO.connectNulls}=e,u=zq(t,s),f=o?n.filter(yd):n;if(Array.isArray(r)){var d,h=n.map((w,_)=>eO(eO({},w),{},{base:r[_]}));s==="vertical"?d=pf().y(Cl).x1(kl).x0(w=>w.base.x):d=pf().x(kl).y1(Cl).y0(w=>w.base.y);var m=d.defined(nO).curve(u),p=o?h.filter(nO):h;return m(p)}var v;s==="vertical"&&ye(r)?v=pf().y(Cl).x1(kl).x0(r):ye(r)?v=pf().x(kl).y1(Cl).y0(r):v=sk().x(kl).y(Cl);var x=v.defined(yd).curve(u);return x(f)},pb=e=>{var{className:t,points:n,path:r,pathRef:s}=e,o=ku();if((!n||!n.length)&&!r)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},f=n&&n.length?Iq(u):r;return A.createElement("path",Hv({},Nr(e),qB(e),{className:et("recharts-curve",t),d:f===null?void 0:f,ref:s}))},Bq=["x","y","top","left","width","height","className"];function Kv(){return Kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(s,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),Xq=e=>{var{x:t=0,y:n=0,top:r=0,left:s=0,width:o=0,height:u=0,className:f}=e,d=Fq(e,Bq),h=Uq({x:t,y:n,top:r,left:s,width:o,height:u},d);return!ye(t)||!ye(n)||!ye(o)||!ye(u)||!ye(r)||!ye(s)?null:A.createElement("path",Kv({},er(h),{className:et("recharts-cross",f),d:Kq(t,n,o,u,r,s)}))};function Yq(e,t,n,r){var s=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-s:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-s,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function aO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function sO(e){for(var t=1;te.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),RC=(e,t,n)=>e.map(r=>"".concat(Qq(r)," ").concat(t,"ms ").concat(n)).join(","),Jq=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(s=>r.includes(s))),du=(e,t)=>Object.keys(t).reduce((n,r)=>sO(sO({},n),{},{[r]:e(r,t[r])}),{});function oO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;te+(t-e)*n,Xv=e=>{var{from:t,to:n}=e;return t!==n},LC=(e,t,n)=>{var r=du((s,o)=>{if(Xv(o)){var[u,f]=e(o.from,o.to,o.velocity);return At(At({},o),{},{from:u,velocity:f})}return o},t);return n<1?du((s,o)=>Xv(o)&&r[s]!=null?At(At({},o),{},{velocity:vd(o.velocity,r[s].velocity,n),from:vd(o.from,r[s].from,n)}):o,t):LC(e,r,n-1)};function r$(e,t,n,r,s,o){var u,f=r.reduce((v,x)=>At(At({},v),{},{[x]:{from:e[x],velocity:0,to:t[x]}}),{}),d=()=>du((v,x)=>x.from,f),h=()=>!Object.values(f).filter(Xv).length,m=null,p=v=>{u||(u=v);var x=v-u,w=x/n.dt;f=LC(n,f,w),s(At(At(At({},e),t),d())),u=v,h()||(m=o.setTimeout(p))};return()=>(m=o.setTimeout(p),()=>{var v;(v=m)===null||v===void 0||v()})}function i$(e,t,n,r,s,o,u){var f=null,d=s.reduce((p,v)=>{var x=e[v],w=t[v];return x==null||w==null?p:At(At({},p),{},{[v]:[x,w]})},{}),h,m=p=>{h||(h=p);var v=(p-h)/r,x=du((_,S)=>vd(...S,n(v)),d);if(o(At(At(At({},e),t),x)),v<1)f=u.setTimeout(m);else{var w=du((_,S)=>vd(...S,n(1)),d);o(At(At(At({},e),t),w))}};return()=>(f=u.setTimeout(m),()=>{var p;(p=f)===null||p===void 0||p()})}const a$=(e,t,n,r,s,o)=>{var u=Jq(e,t);return n==null?()=>(s(At(At({},e),t)),()=>{}):n.isStepper===!0?r$(e,t,n,u,s,o):i$(e,t,n,r,u,s,o)};var bd=1e-4,zC=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],IC=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),lO=(e,t)=>n=>{var r=zC(e,t);return IC(r,n)},s$=(e,t)=>n=>{var r=zC(e,t),s=[...r.map((o,u)=>o*u).slice(1),0];return IC(s,n)},o$=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var s=r.map(o=>parseFloat(o));return[s[0],s[1],s[2],s[3]]},l$=function(){for(var t=arguments.length,n=new Array(t),r=0;r{var s=lO(e,n),o=lO(t,r),u=s$(e,n),f=h=>h>1?1:h<0?0:h,d=h=>{for(var m=h>1?1:h,p=m,v=0;v<8;++v){var x=s(p)-m,w=u(p);if(Math.abs(x-m)0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:s=17}=t,o=(u,f,d)=>{var h=-(u-f)*n,m=d*r,p=d+(h-m)*s/1e3,v=d*s/1e3+u;return Math.abs(v-f){if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return uO(e);case"spring":return c$();default:if(e.split("(")[0]==="cubic-bezier")return uO(e)}return typeof e=="function"?e:null};function d$(e){var t,n=()=>null,r=!1,s=null,o=u=>{if(!r){if(Array.isArray(u)){if(!u.length)return;var f=u,[d,...h]=f;if(typeof d=="number"){s=e.setTimeout(o.bind(null,h),d);return}o(d),s=e.setTimeout(o.bind(null,h));return}typeof u=="string"&&(t=u,n(t)),typeof u=="object"&&(t=u,n(t)),typeof u=="function"&&u()}};return{stop:()=>{r=!0},start:u=>{r=!1,s&&(s(),s=null),o(u)},subscribe:u=>(n=u,()=>{n=()=>null}),getTimeoutController:()=>e}}class h${setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),s=null,o=u=>{u-r>=n?t(u):typeof requestAnimationFrame=="function"&&(s=requestAnimationFrame(o))};return s=requestAnimationFrame(o),()=>{s!=null&&cancelAnimationFrame(s)}}}function m$(){return d$(new h$)}var p$=A.createContext(m$);function g$(e,t){var n=A.useContext(p$);return A.useMemo(()=>t??n(e),[e,t,n])}var y$={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},cO={t:0},Ay={t:1};function gb(e){var t=vn(e,y$),{isActive:n,canBegin:r,duration:s,easing:o,begin:u,onAnimationEnd:f,onAnimationStart:d,children:h}=t,m=DC(),p=n==="auto"?!Pu.isSsr&&!m:n,v=g$(t.animationId,t.animationManager),[x,w]=A.useState(p?cO:Ay),_=A.useRef(null);return A.useEffect(()=>{p||w(Ay)},[p]),A.useEffect(()=>{if(!p||!r)return _o;var S=a$(cO,Ay,f$(o),s,w,v.getTimeoutController()),O=()=>{_.current=S()};return v.start([d,u,O,s,f]),()=>{v.stop(),_.current&&_.current(),f()}},[p,r,s,o,u,d,f,v]),h(x.t)}function yb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=A.useRef(au(t)),r=A.useRef(e);return r.current!==e&&(n.current=au(t),r.current=e),n.current}var v$=["radius"],b$=["radius"],fO,dO,hO,mO,pO,gO,yO,vO,bO,xO;function wO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function _O(e){for(var t=1;t{var o=Ji(n),u=Ji(r),f=Math.min(Math.abs(o)/2,Math.abs(u)/2),d=u>=0?1:-1,h=o>=0?1:-1,m=u>=0&&o>=0||u<0&&o<0?1:0,p;if(f>0&&Array.isArray(s)){for(var v=[0,0,0,0],x=0,w=4;xf?f:S}p=ut(fO||(fO=xr(["M",",",""])),e,t+d*v[0]),v[0]>0&&(p+=ut(dO||(dO=xr(["A ",",",",0,0,",",",",",""])),v[0],v[0],m,e+h*v[0],t)),p+=ut(hO||(hO=xr(["L ",",",""])),e+n-h*v[1],t),v[1]>0&&(p+=ut(mO||(mO=xr(["A ",",",",0,0,",`, `,",",""])),v[1],v[1],m,e+n,t+d*v[1])),p+=ut(pO||(pO=xr(["L ",",",""])),e+n,t+r-d*v[2]),v[2]>0&&(p+=ut(gO||(gO=xr(["A ",",",",0,0,",`, `,",",""])),v[2],v[2],m,e+n-h*v[2],t+r)),p+=ut(yO||(yO=xr(["L ",",",""])),e+h*v[3],t+r),v[3]>0&&(p+=ut(vO||(vO=xr(["A ",",",",0,0,",`, `,",",""])),v[3],v[3],m,e,t+r-d*v[3])),p+="Z"}else if(f>0&&s===+s&&s>0){var O=Math.min(f,s);p=ut(bO||(bO=xr(["M ",",",` @@ -1056,4 +1056,4 @@ Respond with a JSON object. Each turn entry must include the turn_id matching th A`,",",",0,",",",",",",",` A`,",",",0,0,",",",",","Z"])),L.x,L.y,o,o,+(m<0),C.x,C.y,r,r,+(Y>180),+(m>0),j.x,j.y,o,o,+(m<0),N.x,N.y)}else M+=ut(PO||(PO=Ua(["L",",","Z"])),t,n);return M},L$={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},qC=e=>{var t=vn(e,L$),{cx:n,cy:r,innerRadius:s,outerRadius:o,cornerRadius:u,forceCornerRadius:f,cornerIsExternal:d,startAngle:h,endAngle:m,className:p}=t;if(o0&&Math.abs(h-m)<360?_=R$({cx:n,cy:r,innerRadius:s,outerRadius:o,cornerRadius:Math.min(w,x/2),forceCornerRadius:f,cornerIsExternal:d,startAngle:h,endAngle:m}):_=VC({cx:n,cy:r,innerRadius:s,outerRadius:o,startAngle:h,endAngle:m}),A.createElement("path",Yv({},er(t),{className:v,d:_}))};function z$(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(wk(t)){if(e==="centric"){var{cx:r,cy:s,innerRadius:o,outerRadius:u,angle:f}=t,d=Kt(r,s,o,f),h=Kt(r,s,u,f);return[{x:d.x,y:d.y},{x:h.x,y:h.y}]}return UC(t)}}var Ty={},Oy={},Ey={},RO;function I$(){return RO||(RO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dk();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(Ey)),Ey}var LO;function B$(){return LO||(LO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=I$();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(Oy)),Oy}var zO;function U$(){return zO||(zO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Pk(),n=B$();function r(s,o,u){u&&typeof u!="number"&&t.isIterateeCall(s,o,u)&&(o=u=void 0),s=n.toFinite(s),o===void 0?(o=s,s=0):o=n.toFinite(o),u=u===void 0?se.chartData,$$=$([oa],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),vb=(e,t,n,r)=>r?$$(e):oa(e);function Er(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(Le(t)&&Le(n))return!0}return!1}function BO(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function FC(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,s,o;if(Le(n))s=n;else if(typeof n=="function")return;if(Le(r))o=r;else if(typeof r=="function")return;var u=[s,o];if(Er(u))return u}}function F$(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(Er(r))return BO(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[s,o]=e,u,f;if(s==="auto")t!=null&&(u=Math.min(...t));else if(ye(s))u=s;else if(typeof s=="function")try{t!=null&&(u=s(t?.[0]))}catch{}else if(typeof s=="string"&&MT.test(s)){var d=MT.exec(s);if(d==null||d[1]==null||t==null)u=void 0;else{var h=+d[1];u=t[0]-h}}else u=t?.[0];if(o==="auto")t!=null&&(f=Math.max(...t));else if(ye(o))f=o;else if(typeof o=="function")try{t!=null&&(f=o(t?.[1]))}catch{}else if(typeof o=="string"&&NT.test(o)){var m=NT.exec(o);if(m==null||m[1]==null||t==null)f=void 0;else{var p=+m[1];f=t[1]+p}}else f=t?.[1];var v=[u,f];if(Er(v))return t==null?v:BO(v,t,n)}}}var So=1e9,H$={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},xb,nt=!0,tr="[DecimalError] ",Ka=tr+"Invalid argument: ",bb=tr+"Exponent out of range: ",Ao=Math.floor,za=Math.pow,K$=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,kn,kt=1e7,Je=7,HC=9007199254740991,_d=Ao(HC/Je),ce={};ce.absoluteValue=ce.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ce.comparedTo=ce.cmp=function(e){var t,n,r,s,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,s=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===s?0:r>s^o.s<0?1:-1};ce.decimalPlaces=ce.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Je;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ce.dividedBy=ce.div=function(e){return ri(this,new this.constructor(e))};ce.dividedToIntegerBy=ce.idiv=function(e){var t=this,n=t.constructor;return Xe(ri(t,new n(e),0,1),n.precision)};ce.equals=ce.eq=function(e){return!this.cmp(e)};ce.exponent=function(){return bt(this)};ce.greaterThan=ce.gt=function(e){return this.cmp(e)>0};ce.greaterThanOrEqualTo=ce.gte=function(e){return this.cmp(e)>=0};ce.isInteger=ce.isint=function(){return this.e>this.d.length-2};ce.isNegative=ce.isneg=function(){return this.s<0};ce.isPositive=ce.ispos=function(){return this.s>0};ce.isZero=function(){return this.s===0};ce.lessThan=ce.lt=function(e){return this.cmp(e)<0};ce.lessThanOrEqualTo=ce.lte=function(e){return this.cmp(e)<1};ce.logarithm=ce.log=function(e){var t,n=this,r=n.constructor,s=r.precision,o=s+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(kn))throw Error(tr+"NaN");if(n.s<1)throw Error(tr+(n.s?"NaN":"-Infinity"));return n.eq(kn)?new r(0):(nt=!1,t=ri(hu(n,o),hu(e,o),o),nt=!0,Xe(t,s))};ce.minus=ce.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?YC(t,e):KC(t,(e.s=-e.s,e))};ce.modulo=ce.mod=function(e){var t,n=this,r=n.constructor,s=r.precision;if(e=new r(e),!e.s)throw Error(tr+"NaN");return n.s?(nt=!1,t=ri(n,e,0,1).times(e),nt=!0,n.minus(t)):Xe(new r(n),s)};ce.naturalExponential=ce.exp=function(){return XC(this)};ce.naturalLogarithm=ce.ln=function(){return hu(this)};ce.negated=ce.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ce.plus=ce.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?KC(t,e):YC(t,(e.s=-e.s,e))};ce.precision=ce.sd=function(e){var t,n,r,s=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ka+e);if(t=bt(s)+1,r=s.d.length-1,n=r*Je+1,r=s.d[r],r){for(;r%10==0;r/=10)n--;for(r=s.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ce.squareRoot=ce.sqrt=function(){var e,t,n,r,s,o,u,f=this,d=f.constructor;if(f.s<1){if(!f.s)return new d(0);throw Error(tr+"NaN")}for(e=bt(f),nt=!1,s=Math.sqrt(+f),s==0||s==1/0?(t=Tr(f.d),(t.length+e)%2==0&&(t+="0"),s=Math.sqrt(t),e=Ao((e+1)/2)-(e<0||e%2),s==1/0?t="5e"+e:(t=s.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new d(t)):r=new d(s.toString()),n=d.precision,s=u=n+3;;)if(o=r,r=o.plus(ri(f,o,u+2)).times(.5),Tr(o.d).slice(0,u)===(t=Tr(r.d)).slice(0,u)){if(t=t.slice(u-3,u+1),s==u&&t=="4999"){if(Xe(o,n+1,0),o.times(o).eq(f)){r=o;break}}else if(t!="9999")break;u+=4}return nt=!0,Xe(r,n)};ce.times=ce.mul=function(e){var t,n,r,s,o,u,f,d,h,m=this,p=m.constructor,v=m.d,x=(e=new p(e)).d;if(!m.s||!e.s)return new p(0);for(e.s*=m.s,n=m.e+e.e,d=v.length,h=x.length,d=0;){for(t=0,s=d+r;s>r;)f=o[s]+x[r]*v[s-r-1]+t,o[s--]=f%kt|0,t=f/kt|0;o[s]=(o[s]+t)%kt|0}for(;!o[--u];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,nt?Xe(e,p.precision):e};ce.toDecimalPlaces=ce.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Dr(e,0,So),t===void 0?t=r.rounding:Dr(t,0,8),Xe(n,e+bt(n)+1,t))};ce.toExponential=function(e,t){var n,r=this,s=r.constructor;return e===void 0?n=Ja(r,!0):(Dr(e,0,So),t===void 0?t=s.rounding:Dr(t,0,8),r=Xe(new s(r),e+1,t),n=Ja(r,!0,e+1)),n};ce.toFixed=function(e,t){var n,r,s=this,o=s.constructor;return e===void 0?Ja(s):(Dr(e,0,So),t===void 0?t=o.rounding:Dr(t,0,8),r=Xe(new o(s),e+bt(s)+1,t),n=Ja(r.abs(),!1,e+bt(r)+1),s.isneg()&&!s.isZero()?"-"+n:n)};ce.toInteger=ce.toint=function(){var e=this,t=e.constructor;return Xe(new t(e),bt(e)+1,t.rounding)};ce.toNumber=function(){return+this};ce.toPower=ce.pow=function(e){var t,n,r,s,o,u,f=this,d=f.constructor,h=12,m=+(e=new d(e));if(!e.s)return new d(kn);if(f=new d(f),!f.s){if(e.s<1)throw Error(tr+"Infinity");return f}if(f.eq(kn))return f;if(r=d.precision,e.eq(kn))return Xe(f,r);if(t=e.e,n=e.d.length-1,u=t>=n,o=f.s,u){if((n=m<0?-m:m)<=HC){for(s=new d(kn),t=Math.ceil(r/Je+4),nt=!1;n%2&&(s=s.times(f),VO(s.d,t)),n=Ao(n/2),n!==0;)f=f.times(f),VO(f.d,t);return nt=!0,e.s<0?new d(kn).div(s):Xe(s,r)}}else if(o<0)throw Error(tr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,f.s=1,nt=!1,s=e.times(hu(f,r+h)),nt=!0,s=XC(s),s.s=o,s};ce.toPrecision=function(e,t){var n,r,s=this,o=s.constructor;return e===void 0?(n=bt(s),r=Ja(s,n<=o.toExpNeg||n>=o.toExpPos)):(Dr(e,1,So),t===void 0?t=o.rounding:Dr(t,0,8),s=Xe(new o(s),e,t),n=bt(s),r=Ja(s,e<=n||n<=o.toExpNeg,e)),r};ce.toSignificantDigits=ce.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Dr(e,1,So),t===void 0?t=r.rounding:Dr(t,0,8)),Xe(new r(n),e,t)};ce.toString=ce.valueOf=ce.val=ce.toJSON=ce[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=bt(e),n=e.constructor;return Ja(e,t<=n.toExpNeg||t>=n.toExpPos)};function KC(e,t){var n,r,s,o,u,f,d,h,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),nt?Xe(t,p):t;if(d=e.d,h=t.d,u=e.e,s=t.e,d=d.slice(),o=u-s,o){for(o<0?(r=d,o=-o,f=h.length):(r=h,s=u,f=d.length),u=Math.ceil(p/Je),f=u>f?u+1:f+1,o>f&&(o=f,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(f=d.length,o=h.length,f-o<0&&(o=f,r=h,h=d,d=r),n=0;o;)n=(d[--o]=d[o]+h[o]+n)/kt|0,d[o]%=kt;for(n&&(d.unshift(n),++s),f=d.length;d[--f]==0;)d.pop();return t.d=d,t.e=s,nt?Xe(t,p):t}function Dr(e,t,n){if(e!==~~e||en)throw Error(Ka+e)}function Tr(e){var t,n,r,s=e.length-1,o="",u=e[0];if(s>0){for(o+=u,t=1;tu?1:-1;else for(f=d=0;fs[f]?1:-1;break}return d}function n(r,s,o){for(var u=0;o--;)r[o]-=u,u=r[o]1;)r.shift()}return function(r,s,o,u){var f,d,h,m,p,v,x,w,_,S,O,M,j,N,k,C,L,I,Y=r.constructor,te=r.s==s.s?1:-1,ie=r.d,K=s.d;if(!r.s)return new Y(r);if(!s.s)throw Error(tr+"Division by zero");for(d=r.e-s.e,L=K.length,k=ie.length,x=new Y(te),w=x.d=[],h=0;K[h]==(ie[h]||0);)++h;if(K[h]>(ie[h]||0)&&--d,o==null?M=o=Y.precision:u?M=o+(bt(r)-bt(s))+1:M=o,M<0)return new Y(0);if(M=M/Je+2|0,h=0,L==1)for(m=0,K=K[0],M++;(h1&&(K=e(K,m),ie=e(ie,m),L=K.length,k=ie.length),N=L,_=ie.slice(0,L),S=_.length;S=kt/2&&++C;do m=0,f=t(K,_,L,S),f<0?(O=_[0],L!=S&&(O=O*kt+(_[1]||0)),m=O/C|0,m>1?(m>=kt&&(m=kt-1),p=e(K,m),v=p.length,S=_.length,f=t(p,_,v,S),f==1&&(m--,n(p,L16)throw Error(bb+bt(e));if(!e.s)return new m(kn);for(nt=!1,f=p,u=new m(.03125);e.abs().gte(.1);)e=e.times(u),h+=5;for(r=Math.log(za(2,h))/Math.LN10*2+5|0,f+=r,n=s=o=new m(kn),m.precision=f;;){if(s=Xe(s.times(e),f),n=n.times(++d),u=o.plus(ri(s,n,f)),Tr(u.d).slice(0,f)===Tr(o.d).slice(0,f)){for(;h--;)o=Xe(o.times(o),f);return m.precision=p,t==null?(nt=!0,Xe(o,p)):o}o=u}}function bt(e){for(var t=e.e*Je,n=e.d[0];n>=10;n/=10)t++;return t}function My(e,t,n){if(t>e.LN10.sd())throw nt=!0,n&&(e.precision=n),Error(tr+"LN10 precision limit exceeded");return Xe(new e(e.LN10),t)}function Gi(e){for(var t="";e--;)t+="0";return t}function hu(e,t){var n,r,s,o,u,f,d,h,m,p=1,v=10,x=e,w=x.d,_=x.constructor,S=_.precision;if(x.s<1)throw Error(tr+(x.s?"NaN":"-Infinity"));if(x.eq(kn))return new _(0);if(t==null?(nt=!1,h=S):h=t,x.eq(10))return t==null&&(nt=!0),My(_,h);if(h+=v,_.precision=h,n=Tr(w),r=n.charAt(0),o=bt(x),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(e),n=Tr(x.d),r=n.charAt(0),p++;o=bt(x),r>1?(x=new _("0."+n),o++):x=new _(r+"."+n.slice(1))}else return d=My(_,h+2,S).times(o+""),x=hu(new _(r+"."+n.slice(1)),h-v).plus(d),_.precision=S,t==null?(nt=!0,Xe(x,S)):x;for(f=u=x=ri(x.minus(kn),x.plus(kn),h),m=Xe(x.times(x),h),s=3;;){if(u=Xe(u.times(m),h),d=f.plus(ri(u,new _(s),h)),Tr(d.d).slice(0,h)===Tr(f.d).slice(0,h))return f=f.times(2),o!==0&&(f=f.plus(My(_,h+2,S).times(o+""))),f=ri(f,new _(p),h),_.precision=S,t==null?(nt=!0,Xe(f,S)):f;f=d,s+=2}}function UO(e,t){var n,r,s;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(s=t.length;t.charCodeAt(s-1)===48;)--s;if(t=t.slice(r,s),t){if(s-=r,n=n-r-1,e.e=Ao(n/Je),e.d=[],r=(n+1)%Je,n<0&&(r+=Je),r_d||e.e<-_d))throw Error(bb+n)}else e.s=0,e.e=0,e.d=[0];return e}function Xe(e,t,n){var r,s,o,u,f,d,h,m,p=e.d;for(u=1,o=p[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=Je,s=t,h=p[m=0];else{if(m=Math.ceil((r+1)/Je),o=p.length,m>=o)return e;for(h=o=p[m],u=1;o>=10;o/=10)u++;r%=Je,s=r-Je+u}if(n!==void 0&&(o=za(10,u-s-1),f=h/o%10|0,d=t<0||p[m+1]!==void 0||h%o,d=n<4?(f||d)&&(n==0||n==(e.s<0?3:2)):f>5||f==5&&(n==4||d||n==6&&(r>0?s>0?h/za(10,u-s):0:p[m-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return d?(o=bt(e),p.length=1,t=t-o-1,p[0]=za(10,(Je-t%Je)%Je),e.e=Ao(-t/Je)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(r==0?(p.length=m,o=1,m--):(p.length=m+1,o=za(10,Je-r),p[m]=s>0?(h/za(10,u-s)%za(10,s)|0)*o:0),d)for(;;)if(m==0){(p[0]+=o)==kt&&(p[0]=1,++e.e);break}else{if(p[m]+=o,p[m]!=kt)break;p[m--]=0,o=1}for(r=p.length;p[--r]===0;)p.pop();if(nt&&(e.e>_d||e.e<-_d))throw Error(bb+bt(e));return e}function YC(e,t){var n,r,s,o,u,f,d,h,m,p,v=e.constructor,x=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),nt?Xe(t,x):t;if(d=e.d,p=t.d,r=t.e,h=e.e,d=d.slice(),u=h-r,u){for(m=u<0,m?(n=d,u=-u,f=p.length):(n=p,r=h,f=d.length),s=Math.max(Math.ceil(x/Je),f)+2,u>s&&(u=s,n.length=1),n.reverse(),s=u;s--;)n.push(0);n.reverse()}else{for(s=d.length,f=p.length,m=s0;--s)d[f++]=0;for(s=p.length;s>u;){if(d[--s]0?o=o.charAt(0)+"."+o.slice(1)+Gi(r):u>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(s<0?"e":"e+")+s):s<0?(o="0."+Gi(-s-1)+o,n&&(r=n-u)>0&&(o+=Gi(r))):s>=u?(o+=Gi(s+1-u),n&&(r=n-s-1)>0&&(o=o+"."+Gi(r))):((r=s+1)0&&(s+1===u&&(o+="."),o+=Gi(r))),e.s<0?"-"+o:o}function VO(e,t){if(e.length>t)return e.length=t,!0}function GC(e){var t,n,r;function s(o){var u=this;if(!(u instanceof s))return new s(o);if(u.constructor=s,o instanceof s){u.s=o.s,u.e=o.e,u.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ka+o);if(o>0)u.s=1;else if(o<0)o=-o,u.s=-1;else{u.s=0,u.e=0,u.d=[0];return}if(o===~~o&&o<1e7){u.e=0,u.d=[o];return}return UO(u,o.toString())}else if(typeof o!="string")throw Error(Ka+o);if(o.charCodeAt(0)===45?(o=o.slice(1),u.s=-1):u.s=1,K$.test(o))UO(u,o);else throw Error(Ka+o)}if(s.prototype=ce,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.clone=GC,s.config=s.set=X$,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=s[t+1]&&r<=s[t+2])this[n]=r;else throw Error(Ka+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Ka+n+": "+r);return this}var xb=GC(H$);kn=new xb(1);const Ce=xb;function WC(e){var t;return e===0?t=1:t=Math.floor(new Ce(e).abs().log(10).toNumber())+1,t}function ZC(e,t,n){for(var r=new Ce(e),s=0,o=[];r.lt(t)&&s<1e5;)o.push(r.toNumber()),r=r.add(n),s++;return o}var QC=e=>{var[t,n]=e,[r,s]=[t,n];return t>n&&([r,s]=[n,t]),[r,s]},wb=(e,t,n)=>{if(e.lte(0))return new Ce(0);var r=WC(e.toNumber()),s=new Ce(10).pow(r),o=e.div(s),u=r!==1?.05:.1,f=new Ce(Math.ceil(o.div(u).toNumber())).add(n).mul(u),d=f.mul(s);return t?new Ce(d.toNumber()):new Ce(Math.ceil(d.toNumber()))},JC=(e,t,n)=>{var r;if(e.lte(0))return new Ce(0);var s=[1,2,2.5,5],o=e.toNumber(),u=Math.floor(new Ce(o).abs().log(10).toNumber()),f=new Ce(10).pow(u),d=e.div(f).toNumber(),h=s.findIndex(x=>x>=d-1e-10);if(h===-1&&(f=f.mul(10),h=0),h+=n,h>=s.length){var m=Math.floor(h/s.length);h%=s.length,f=f.mul(new Ce(10).pow(m))}var p=(r=s[h])!==null&&r!==void 0?r:1,v=new Ce(p).mul(f);return t?v:new Ce(Math.ceil(v.toNumber()))},Y$=(e,t,n)=>{var r=new Ce(1),s=new Ce(e);if(!s.isint()&&n){var o=Math.abs(e);o<1?(r=new Ce(10).pow(WC(e)-1),s=new Ce(Math.floor(s.div(r).toNumber())).mul(r)):o>1&&(s=new Ce(Math.floor(e)))}else e===0?s=new Ce(Math.floor((t-1)/2)):n||(s=new Ce(Math.floor(e)));for(var u=Math.floor((t-1)/2),f=[],d=0;d4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:wb;if(!Number.isFinite((n-t)/(r-1)))return{step:new Ce(0),tickMin:new Ce(0),tickMax:new Ce(0)};var f=u(new Ce(n).sub(t).div(r-1),s,o),d;t<=0&&n>=0?d=new Ce(0):(d=new Ce(t).add(n).div(2),d=d.sub(new Ce(d).mod(f)));var h=Math.ceil(d.sub(t).div(f).toNumber()),m=Math.ceil(new Ce(n).sub(d).div(f).toNumber()),p=h+m+1;return p>r?e3(t,n,r,s,o+1,u):(p0?m+(r-p):m,h=n>0?h:h+(r-p)),{step:f,tickMin:d.sub(new Ce(h).mul(f)),tickMax:d.add(new Ce(m).mul(f))})},qO=function(t){var[n,r]=t,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",f=Math.max(s,2),[d,h]=QC([n,r]);if(d===-1/0||h===1/0){var m=h===1/0?[d,...Array(s-1).fill(1/0)]:[...Array(s-1).fill(-1/0),h];return n>r?m.reverse():m}if(d===h)return Y$(d,s,o);var p=u==="snap125"?JC:wb,{step:v,tickMin:x,tickMax:w}=e3(d,h,f,o,0,p),_=ZC(x,w.add(new Ce(.1).mul(v)),v);return n>r?_.reverse():_},$O=function(t,n){var[r,s]=t,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[f,d]=QC([r,s]);if(f===-1/0||d===1/0)return[r,s];if(f===d)return[f];var h=u==="snap125"?JC:wb,m=Math.max(n,2),p=h(new Ce(d).sub(f).div(m-1),o,0),v=[...ZC(new Ce(f),new Ce(d),p),d];return o===!1&&(v=v.map(x=>Math.round(x))),r>s?v.reverse():v},G$=e=>e.rootProps.barCategoryGap,ph=e=>e.rootProps.stackOffset,t3=e=>e.rootProps.reverseStackOrder,_b=e=>e.options.chartName,Sb=e=>e.rootProps.syncId,n3=e=>e.rootProps.syncMethod,Ab=e=>e.options.eventEmitter,pn={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Na={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},wr={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},gh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function yh(e,t,n){if(n!=="auto")return n;if(e!=null)return sa(e,t)?"category":"number"}function FO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Sd(e){for(var t=1;t{if(t!=null)return e.polarAxis.angleAxis[t]},Tb=$([J$,TC],(e,t)=>{var n;if(e!=null)return e;var r=(n=yh(t,"angleAxis",HO.type))!==null&&n!==void 0?n:"category";return Sd(Sd({},HO),{},{type:r})}),eF=(e,t)=>e.polarAxis.radiusAxis[t],Ob=$([eF,TC],(e,t)=>{var n;if(e!=null)return e;var r=(n=yh(t,"radiusAxis",KO.type))!==null&&n!==void 0?n:"category";return Sd(Sd({},KO),{},{type:r})}),vh=e=>e.polarOptions,Eb=$([hi,mi,Xt],j$),r3=$([vh,Eb],(e,t)=>{if(e!=null)return ra(e.innerRadius,t,0)}),i3=$([vh,Eb],(e,t)=>{if(e!=null)return ra(e.outerRadius,t,t*.8)}),tF=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},a3=$([vh],tF);$([Tb,a3],gh);var s3=$([Eb,r3,i3],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});$([Ob,s3],gh);var o3=$([ht,vh,r3,i3,hi,mi],(e,t,n,r,s,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:u,cy:f,startAngle:d,endAngle:h}=t;return{cx:ra(u,s,s/2),cy:ra(f,o,o/2),innerRadius:n,outerRadius:r,startAngle:d,endAngle:h,clockWise:!1}}}),Ct=(e,t)=>t,bh=(e,t,n)=>n;function l3(e){return e?.id}function u3(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:s,dataKey:o}=n,u=new Map;return e.forEach(f=>{var d,h=(d=f.data)!==null&&d!==void 0?d:r;if(!(h==null||h.length===0)){var m=l3(f);h.forEach((p,v)=>{var x=o==null||s?v:String(Ot(p,o,null)),w=Ot(p,f.dataKey,0),_;u.has(x)?_=u.get(x):_={},Object.assign(_,{[m]:w}),u.set(x,_)})}}),Array.from(u.values())}function jb(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var xh=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function wh(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function nF(e,t){if(e.length===t.length){for(var n=0;n{var t=ht(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},To=e=>e.tooltip.settings.axisId;function Mb(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),s=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(o){function u(){return o.apply(this,arguments)}return u.toString=function(){return o.toString()},u})(()=>s),rangeMin:()=>s[0],rangeMax:()=>s[1],isInRange(o){var u=s[0],f=s[1];return u<=f?o>=u&&o<=f:o>=f&&o<=u},bandwidth:n?()=>n.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,u)=>{var f=e(o);if(f!=null){if(e.bandwidth&&u!==null&&u!==void 0&&u.position){var d=e.bandwidth();switch(u.position){case"middle":f+=d/2;break;case"end":f+=d;break}}return f}}}}}var rF=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Er(t)){for(var n,r,s=0;sr)&&(r=o))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function ea(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function iF(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Nb(e){let t,n,r;e.length!==2?(t=ea,n=(f,d)=>ea(e(f),d),r=(f,d)=>e(f)-d):(t=e===ea||e===iF?e:aF,n=e,r=e);function s(f,d,h=0,m=f.length){if(h>>1;n(f[p],d)<0?h=p+1:m=p}while(h>>1;n(f[p],d)<=0?h=p+1:m=p}while(hh&&r(f[p-1],d)>-r(f[p],d)?p-1:p}return{left:s,center:u,right:o}}function aF(){return 0}function c3(e){return e===null?NaN:+e}function*sF(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const oF=Nb(ea),Ru=oF.right;Nb(c3).center;class XO extends Map{constructor(t,n=cF){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,s]of t)this.set(r,s)}get(t){return super.get(YO(this,t))}has(t){return super.has(YO(this,t))}set(t,n){return super.set(lF(this,t),n)}delete(t){return super.delete(uF(this,t))}}function YO({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function lF({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function uF({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function cF(e){return e!==null&&typeof e=="object"?e.valueOf():e}function fF(e=ea){if(e===ea)return f3;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function f3(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const dF=Math.sqrt(50),hF=Math.sqrt(10),mF=Math.sqrt(2);function Ad(e,t,n){const r=(t-e)/Math.max(0,n),s=Math.floor(Math.log10(r)),o=r/Math.pow(10,s),u=o>=dF?10:o>=hF?5:o>=mF?2:1;let f,d,h;return s<0?(h=Math.pow(10,-s)/u,f=Math.round(e*h),d=Math.round(t*h),f/ht&&--d,h=-h):(h=Math.pow(10,s)*u,f=Math.round(e/h),d=Math.round(t/h),f*ht&&--d),d0))return[];if(e===t)return[e];const r=t=s))return[];const f=o-s+1,d=new Array(f);if(r)if(u<0)for(let h=0;h=r)&&(n=r);return n}function WO(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function d3(e,t,n=0,r=1/0,s){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(s=s===void 0?f3:fF(s);r>n;){if(r-n>600){const d=r-n+1,h=t-n+1,m=Math.log(d),p=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*p*(d-p)/d)*(h-d/2<0?-1:1),x=Math.max(n,Math.floor(t-h*p/d+v)),w=Math.min(r,Math.floor(t+(d-h)*p/d+v));d3(e,t,x,w,s)}const o=e[t];let u=n,f=r;for(Dl(e,n,t),s(e[r],o)>0&&Dl(e,n,r);u0;)--f}s(e[n],o)===0?Dl(e,n,f):(++f,Dl(e,f,r)),f<=t&&(n=f+1),t<=f&&(r=f-1)}return e}function Dl(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function pF(e,t,n){if(e=Float64Array.from(sF(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return WO(e);if(t>=1)return GO(e);var r,s=(r-1)*t,o=Math.floor(s),u=GO(d3(e,o).subarray(0,o+1)),f=WO(e.subarray(o+1));return u+(f-u)*(s-o)}}function gF(e,t,n=c3){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,s=(r-1)*t,o=Math.floor(s),u=+n(e[o],o,e),f=+n(e[o+1],o+1,e);return u+(f-u)*(s-o)}}function yF(e,t,n){e=+e,t=+t,n=(s=arguments.length)<2?(t=e,e=0,1):s<3?1:+n;for(var r=-1,s=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(s);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Af(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Af(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=xF.exec(e))?new gn(t[1],t[2],t[3],1):(t=wF.exec(e))?new gn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_F.exec(e))?Af(t[1],t[2],t[3],t[4]):(t=SF.exec(e))?Af(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=AF.exec(e))?rE(t[1],t[2]/100,t[3]/100,1):(t=TF.exec(e))?rE(t[1],t[2]/100,t[3]/100,t[4]):ZO.hasOwnProperty(e)?eE(ZO[e]):e==="transparent"?new gn(NaN,NaN,NaN,0):null}function eE(e){return new gn(e>>16&255,e>>8&255,e&255,1)}function Af(e,t,n,r){return r<=0&&(e=t=n=NaN),new gn(e,t,n,r)}function jF(e){return e instanceof Lu||(e=gu(e)),e?(e=e.rgb(),new gn(e.r,e.g,e.b,e.opacity)):new gn}function Jv(e,t,n,r){return arguments.length===1?jF(e):new gn(e,t,n,r??1)}function gn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Db(gn,Jv,m3(Lu,{brighter(e){return e=e==null?Td:Math.pow(Td,e),new gn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mu:Math.pow(mu,e),new gn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new gn(Xa(this.r),Xa(this.g),Xa(this.b),Od(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:tE,formatHex:tE,formatHex8:MF,formatRgb:nE,toString:nE}));function tE(){return`#${Va(this.r)}${Va(this.g)}${Va(this.b)}`}function MF(){return`#${Va(this.r)}${Va(this.g)}${Va(this.b)}${Va((isNaN(this.opacity)?1:this.opacity)*255)}`}function nE(){const e=Od(this.opacity);return`${e===1?"rgb(":"rgba("}${Xa(this.r)}, ${Xa(this.g)}, ${Xa(this.b)}${e===1?")":`, ${e})`}`}function Od(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Va(e){return e=Xa(e),(e<16?"0":"")+e.toString(16)}function rE(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new cr(e,t,n,r)}function p3(e){if(e instanceof cr)return new cr(e.h,e.s,e.l,e.opacity);if(e instanceof Lu||(e=gu(e)),!e)return new cr;if(e instanceof cr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,s=Math.min(t,n,r),o=Math.max(t,n,r),u=NaN,f=o-s,d=(o+s)/2;return f?(t===o?u=(n-r)/f+(n0&&d<1?0:u,new cr(u,f,d,e.opacity)}function NF(e,t,n,r){return arguments.length===1?p3(e):new cr(e,t,n,r??1)}function cr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Db(cr,NF,m3(Lu,{brighter(e){return e=e==null?Td:Math.pow(Td,e),new cr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mu:Math.pow(mu,e),new cr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,s=2*n-r;return new gn(Ny(e>=240?e-240:e+120,s,r),Ny(e,s,r),Ny(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new cr(iE(this.h),Tf(this.s),Tf(this.l),Od(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=Od(this.opacity);return`${e===1?"hsl(":"hsla("}${iE(this.h)}, ${Tf(this.s)*100}%, ${Tf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function iE(e){return e=(e||0)%360,e<0?e+360:e}function Tf(e){return Math.max(0,Math.min(1,e||0))}function Ny(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Pb=e=>()=>e;function kF(e,t){return function(n){return e+n*t}}function CF(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function DF(e){return(e=+e)==1?g3:function(t,n){return n-t?CF(t,n,e):Pb(isNaN(t)?n:t)}}function g3(e,t){var n=t-e;return n?kF(e,n):Pb(isNaN(e)?t:e)}const aE=(function e(t){var n=DF(t);function r(s,o){var u=n((s=Jv(s)).r,(o=Jv(o)).r),f=n(s.g,o.g),d=n(s.b,o.b),h=g3(s.opacity,o.opacity);return function(m){return s.r=u(m),s.g=f(m),s.b=d(m),s.opacity=h(m),s+""}}return r.gamma=e,r})(1);function PF(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),s;return function(o){for(s=0;sn&&(o=t.slice(n,o),f[u]?f[u]+=o:f[++u]=o),(r=r[0])===(s=s[0])?f[u]?f[u]+=s:f[++u]=s:(f[++u]=null,d.push({i:u,x:Ed(r,s)})),n=ky.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function HF(e,t,n){var r=e[0],s=e[1],o=t[0],u=t[1];return s2?KF:HF,d=h=null,p}function p(v){return v==null||isNaN(v=+v)?o:(d||(d=f(e.map(r),t,n)))(r(u(v)))}return p.invert=function(v){return u(s((h||(h=f(t,e.map(r),Ed)))(v)))},p.domain=function(v){return arguments.length?(e=Array.from(v,jd),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),n=Rb,m()},p.clamp=function(v){return arguments.length?(u=v?!0:rn,m()):u!==rn},p.interpolate=function(v){return arguments.length?(n=v,m()):n},p.unknown=function(v){return arguments.length?(o=v,p):o},function(v,x){return r=v,s=x,m()}}function Lb(){return _h()(rn,rn)}function XF(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Md(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function mo(e){return e=Md(Math.abs(e)),e?e[1]:NaN}function YF(e,t){return function(n,r){for(var s=n.length,o=[],u=0,f=e[0],d=0;s>0&&f>0&&(d+f+1>r&&(f=Math.max(1,r-d)),o.push(n.substring(s-=f,s+f)),!((d+=f+1)>r));)f=e[u=(u+1)%e.length];return o.reverse().join(t)}}function GF(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var WF=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yu(e){if(!(t=WF.exec(e)))throw new Error("invalid format: "+e);var t;return new zb({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]})}yu.prototype=zb.prototype;function zb(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+""}zb.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 ZF(e){e:for(var t=e.length,n=1,r=-1,s;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(s+1):e}var Nd;function QF(e,t){var n=Md(e,t);if(!n)return Nd=void 0,e.toPrecision(t);var r=n[0],s=n[1],o=s-(Nd=Math.max(-8,Math.min(8,Math.floor(s/3)))*3)+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Md(e,Math.max(0,t+o-1))[0]}function oE(e,t){var n=Md(e,t);if(!n)return e+"";var r=n[0],s=n[1];return s<0?"0."+new Array(-s).join("0")+r:r.length>s+1?r.slice(0,s+1)+"."+r.slice(s+1):r+new Array(s-r.length+2).join("0")}const lE={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:XF,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)=>oE(e*100,t),r:oE,s:QF,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function uE(e){return e}var cE=Array.prototype.map,fE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function JF(e){var t=e.grouping===void 0||e.thousands===void 0?uE:YF(cE.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",s=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?uE:GF(cE.call(e.numerals,String)),u=e.percent===void 0?"%":e.percent+"",f=e.minus===void 0?"−":e.minus+"",d=e.nan===void 0?"NaN":e.nan+"";function h(p,v){p=yu(p);var x=p.fill,w=p.align,_=p.sign,S=p.symbol,O=p.zero,M=p.width,j=p.comma,N=p.precision,k=p.trim,C=p.type;C==="n"?(j=!0,C="g"):lE[C]||(N===void 0&&(N=12),k=!0,C="g"),(O||x==="0"&&w==="=")&&(O=!0,x="0",w="=");var L=(v&&v.prefix!==void 0?v.prefix:"")+(S==="$"?n:S==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),I=(S==="$"?r:/[%p]/.test(C)?u:"")+(v&&v.suffix!==void 0?v.suffix:""),Y=lE[C],te=/[defgprs%]/.test(C);N=N===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function ie(K){var be=L,pe=I,xe,V,Q;if(C==="c")pe=Y(K)+pe,K="";else{K=+K;var ne=K<0||1/K<0;if(K=isNaN(K)?d:Y(Math.abs(K),N),k&&(K=ZF(K)),ne&&+K==0&&_!=="+"&&(ne=!1),be=(ne?_==="("?_:f:_==="-"||_==="("?"":_)+be,pe=(C==="s"&&!isNaN(K)&&Nd!==void 0?fE[8+Nd/3]:"")+pe+(ne&&_==="("?")":""),te){for(xe=-1,V=K.length;++xeQ||Q>57){pe=(Q===46?s+K.slice(xe+1):K.slice(xe))+pe,K=K.slice(0,xe);break}}}j&&!O&&(K=t(K,1/0));var le=be.length+K.length+pe.length,ue=le>1)+be+K+pe+ue.slice(le);break;default:K=ue+be+K+pe;break}return o(K)}return ie.toString=function(){return p+""},ie}function m(p,v){var x=Math.max(-8,Math.min(8,Math.floor(mo(v)/3)))*3,w=Math.pow(10,-x),_=h((p=yu(p),p.type="f",p),{suffix:fE[8+x/3]});return function(S){return _(w*S)}}return{format:h,formatPrefix:m}}var Of,Ib,y3;eH({thousands:",",grouping:[3],currency:["$",""]});function eH(e){return Of=JF(e),Ib=Of.format,y3=Of.formatPrefix,Of}function tH(e){return Math.max(0,-mo(Math.abs(e)))}function nH(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(mo(t)/3)))*3-mo(Math.abs(e)))}function rH(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,mo(t)-mo(e))+1}function v3(e,t,n,r){var s=Zv(e,t,n),o;switch(r=yu(r??",f"),r.type){case"s":{var u=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=nH(s,u))&&(r.precision=o),y3(r,u)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=rH(s,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=tH(s))&&(r.precision=o-(r.type==="%")*2);break}}return Ib(r)}function la(e){var t=e.domain;return e.ticks=function(n){var r=t();return Gv(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var s=t();return v3(s[0],s[s.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),s=0,o=r.length-1,u=r[s],f=r[o],d,h,m=10;for(f0;){if(h=Wv(u,f,n),h===d)return r[s]=u,r[o]=f,t(r);if(h>0)u=Math.floor(u/h)*h,f=Math.ceil(f/h)*h;else if(h<0)u=Math.ceil(u*h)/h,f=Math.floor(f*h)/h;else break;d=h}return e},e}function b3(){var e=Lb();return e.copy=function(){return zu(e,b3())},nr.apply(e,arguments),la(e)}function x3(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,jd),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return x3(e).unknown(t)},e=arguments.length?Array.from(e,jd):[0,1],la(n)}function w3(e,t){e=e.slice();var n=0,r=e.length-1,s=e[n],o=e[r],u;return oMath.pow(e,t)}function lH(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 mE(e){return(t,n)=>-e(-t,n)}function Bb(e){const t=e(dE,hE),n=t.domain;let r=10,s,o;function u(){return s=lH(r),o=oH(r),n()[0]<0?(s=mE(s),o=mE(o),e(iH,aH)):e(dE,hE),t}return t.base=function(f){return arguments.length?(r=+f,u()):r},t.domain=function(f){return arguments.length?(n(f),u()):n()},t.ticks=f=>{const d=n();let h=d[0],m=d[d.length-1];const p=m0){for(;v<=x;++v)for(w=1;wm)break;O.push(_)}}else for(;v<=x;++v)for(w=r-1;w>=1;--w)if(_=v>0?w/o(-v):w*o(v),!(_m)break;O.push(_)}O.length*2{if(f==null&&(f=10),d==null&&(d=r===10?"s":","),typeof d!="function"&&(!(r%1)&&(d=yu(d)).precision==null&&(d.trim=!0),d=Ib(d)),f===1/0)return d;const h=Math.max(1,r*f/t.ticks().length);return m=>{let p=m/o(Math.round(s(m)));return p*rn(w3(n(),{floor:f=>o(Math.floor(s(f))),ceil:f=>o(Math.ceil(s(f)))})),t}function _3(){const e=Bb(_h()).domain([1,10]);return e.copy=()=>zu(e,_3()).base(e.base()),nr.apply(e,arguments),e}function pE(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function gE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ub(e){var t=1,n=e(pE(t),gE(t));return n.constant=function(r){return arguments.length?e(pE(t=+r),gE(t)):t},la(n)}function S3(){var e=Ub(_h());return e.copy=function(){return zu(e,S3()).constant(e.constant())},nr.apply(e,arguments)}function yE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function uH(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function cH(e){return e<0?-e*e:e*e}function Vb(e){var t=e(rn,rn),n=1;function r(){return n===1?e(rn,rn):n===.5?e(uH,cH):e(yE(n),yE(1/n))}return t.exponent=function(s){return arguments.length?(n=+s,r()):n},la(t)}function qb(){var e=Vb(_h());return e.copy=function(){return zu(e,qb()).exponent(e.exponent())},nr.apply(e,arguments),e}function fH(){return qb.apply(null,arguments).exponent(.5)}function vE(e){return Math.sign(e)*e*e}function dH(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function A3(){var e=Lb(),t=[0,1],n=!1,r;function s(o){var u=dH(e(o));return isNaN(u)?r:n?Math.round(u):u}return s.invert=function(o){return e.invert(vE(o))},s.domain=function(o){return arguments.length?(e.domain(o),s):e.domain()},s.range=function(o){return arguments.length?(e.range((t=Array.from(o,jd)).map(vE)),s):t.slice()},s.rangeRound=function(o){return s.range(o).round(!0)},s.round=function(o){return arguments.length?(n=!!o,s):n},s.clamp=function(o){return arguments.length?(e.clamp(o),s):e.clamp()},s.unknown=function(o){return arguments.length?(r=o,s):r},s.copy=function(){return A3(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},nr.apply(s,arguments),la(s)}function T3(){var e=[],t=[],n=[],r;function s(){var u=0,f=Math.max(1,t.length);for(n=new Array(f-1);++u0?n[f-1]:e[0],f=n?[r[n-1],t]:[r[h-1],r[h]]},u.unknown=function(d){return arguments.length&&(o=d),u},u.thresholds=function(){return r.slice()},u.copy=function(){return O3().domain([e,t]).range(s).unknown(o)},nr.apply(la(u),arguments)}function E3(){var e=[.5],t=[0,1],n,r=1;function s(o){return o!=null&&o<=o?t[Ru(e,o,0,r)]:n}return s.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),s):e.slice()},s.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),s):t.slice()},s.invertExtent=function(o){var u=t.indexOf(o);return[e[u-1],e[u]]},s.unknown=function(o){return arguments.length?(n=o,s):n},s.copy=function(){return E3().domain(e).range(t).unknown(n)},nr.apply(s,arguments)}const Cy=new Date,Dy=new Date;function Et(e,t,n,r){function s(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return s.floor=o=>(e(o=new Date(+o)),o),s.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),s.round=o=>{const u=s(o),f=s.ceil(o);return o-u(t(o=new Date(+o),u==null?1:Math.floor(u)),o),s.range=(o,u,f)=>{const d=[];if(o=s.ceil(o),f=f==null?1:Math.floor(f),!(o0))return d;let h;do d.push(h=new Date(+o)),t(o,f),e(o);while(hEt(u=>{if(u>=u)for(;e(u),!o(u);)u.setTime(u-1)},(u,f)=>{if(u>=u)if(f<0)for(;++f<=0;)for(;t(u,-1),!o(u););else for(;--f>=0;)for(;t(u,1),!o(u););}),n&&(s.count=(o,u)=>(Cy.setTime(+o),Dy.setTime(+u),e(Cy),e(Dy),Math.floor(n(Cy,Dy))),s.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?s.filter(r?u=>r(u)%o===0:u=>s.count(0,u)%o===0):s)),s}const kd=Et(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);kd.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Et(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):kd);kd.range;const ti=1e3,Qn=ti*60,ni=Qn*60,ui=ni*24,$b=ui*7,bE=ui*30,Py=ui*365,qa=Et(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ti)},(e,t)=>(t-e)/ti,e=>e.getUTCSeconds());qa.range;const Fb=Et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ti)},(e,t)=>{e.setTime(+e+t*Qn)},(e,t)=>(t-e)/Qn,e=>e.getMinutes());Fb.range;const Hb=Et(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Qn)},(e,t)=>(t-e)/Qn,e=>e.getUTCMinutes());Hb.range;const Kb=Et(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ti-e.getMinutes()*Qn)},(e,t)=>{e.setTime(+e+t*ni)},(e,t)=>(t-e)/ni,e=>e.getHours());Kb.range;const Xb=Et(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ni)},(e,t)=>(t-e)/ni,e=>e.getUTCHours());Xb.range;const Iu=Et(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qn)/ui,e=>e.getDate()-1);Iu.range;const Sh=Et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ui,e=>e.getUTCDate()-1);Sh.range;const j3=Et(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ui,e=>Math.floor(e/ui));j3.range;function ns(e){return Et(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Qn)/$b)}const Ah=ns(0),Cd=ns(1),hH=ns(2),mH=ns(3),po=ns(4),pH=ns(5),gH=ns(6);Ah.range;Cd.range;hH.range;mH.range;po.range;pH.range;gH.range;function rs(e){return Et(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/$b)}const Th=rs(0),Dd=rs(1),yH=rs(2),vH=rs(3),go=rs(4),bH=rs(5),xH=rs(6);Th.range;Dd.range;yH.range;vH.range;go.range;bH.range;xH.range;const Yb=Et(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());Yb.range;const Gb=Et(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());Gb.range;const ci=Et(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());ci.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Et(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ci.range;const fi=Et(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());fi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Et(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});fi.range;function M3(e,t,n,r,s,o){const u=[[qa,1,ti],[qa,5,5*ti],[qa,15,15*ti],[qa,30,30*ti],[o,1,Qn],[o,5,5*Qn],[o,15,15*Qn],[o,30,30*Qn],[s,1,ni],[s,3,3*ni],[s,6,6*ni],[s,12,12*ni],[r,1,ui],[r,2,2*ui],[n,1,$b],[t,1,bE],[t,3,3*bE],[e,1,Py]];function f(h,m,p){const v=mS).right(u,v);if(x===u.length)return e.every(Zv(h/Py,m/Py,p));if(x===0)return kd.every(Math.max(Zv(h,m,p),1));const[w,_]=u[v/u[x-1][2]53)return null;"w"in ee||(ee.w=1),"Z"in ee?(De=Ly(Pl(ee.y,0,1)),Lt=De.getUTCDay(),De=Lt>4||Lt===0?Dd.ceil(De):Dd(De),De=Sh.offset(De,(ee.V-1)*7),ee.y=De.getUTCFullYear(),ee.m=De.getUTCMonth(),ee.d=De.getUTCDate()+(ee.w+6)%7):(De=Ry(Pl(ee.y,0,1)),Lt=De.getDay(),De=Lt>4||Lt===0?Cd.ceil(De):Cd(De),De=Iu.offset(De,(ee.V-1)*7),ee.y=De.getFullYear(),ee.m=De.getMonth(),ee.d=De.getDate()+(ee.w+6)%7)}else("W"in ee||"U"in ee)&&("w"in ee||(ee.w="u"in ee?ee.u%7:"W"in ee?1:0),Lt="Z"in ee?Ly(Pl(ee.y,0,1)).getUTCDay():Ry(Pl(ee.y,0,1)).getDay(),ee.m=0,ee.d="W"in ee?(ee.w+6)%7+ee.W*7-(Lt+5)%7:ee.w+ee.U*7-(Lt+6)%7);return"Z"in ee?(ee.H+=ee.Z/100|0,ee.M+=ee.Z%100,Ly(ee)):Ry(ee)}}function I(J,re,Se,ee){for(var Rt=0,De=re.length,Lt=Se.length,zt,Pr;Rt=Lt)return-1;if(zt=re.charCodeAt(Rt++),zt===37){if(zt=re.charAt(Rt++),Pr=k[zt in xE?re.charAt(Rt++):zt],!Pr||(ee=Pr(J,Se,ee))<0)return-1}else if(zt!=Se.charCodeAt(ee++))return-1}return ee}function Y(J,re,Se){var ee=h.exec(re.slice(Se));return ee?(J.p=m.get(ee[0].toLowerCase()),Se+ee[0].length):-1}function te(J,re,Se){var ee=x.exec(re.slice(Se));return ee?(J.w=w.get(ee[0].toLowerCase()),Se+ee[0].length):-1}function ie(J,re,Se){var ee=p.exec(re.slice(Se));return ee?(J.w=v.get(ee[0].toLowerCase()),Se+ee[0].length):-1}function K(J,re,Se){var ee=O.exec(re.slice(Se));return ee?(J.m=M.get(ee[0].toLowerCase()),Se+ee[0].length):-1}function be(J,re,Se){var ee=_.exec(re.slice(Se));return ee?(J.m=S.get(ee[0].toLowerCase()),Se+ee[0].length):-1}function pe(J,re,Se){return I(J,t,re,Se)}function xe(J,re,Se){return I(J,n,re,Se)}function V(J,re,Se){return I(J,r,re,Se)}function Q(J){return u[J.getDay()]}function ne(J){return o[J.getDay()]}function le(J){return d[J.getMonth()]}function ue(J){return f[J.getMonth()]}function P(J){return s[+(J.getHours()>=12)]}function H(J){return 1+~~(J.getMonth()/3)}function ae(J){return u[J.getUTCDay()]}function se(J){return o[J.getUTCDay()]}function Z(J){return d[J.getUTCMonth()]}function oe(J){return f[J.getUTCMonth()]}function he(J){return s[+(J.getUTCHours()>=12)]}function _e(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var re=C(J+="",j);return re.toString=function(){return J},re},parse:function(J){var re=L(J+="",!1);return re.toString=function(){return J},re},utcFormat:function(J){var re=C(J+="",N);return re.toString=function(){return J},re},utcParse:function(J){var re=L(J+="",!0);return re.toString=function(){return J},re}}}var xE={"-":"",_:" ",0:"0"},Pt=/^\s*\d+/,OH=/^%/,EH=/[\\^$*+?|[\]().{}]/g;function ze(e,t,n){var r=e<0?"-":"",s=(r?-e:e)+"",o=s.length;return r+(o[t.toLowerCase(),n]))}function MH(e,t,n){var r=Pt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function NH(e,t,n){var r=Pt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function kH(e,t,n){var r=Pt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function CH(e,t,n){var r=Pt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function DH(e,t,n){var r=Pt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function wE(e,t,n){var r=Pt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function _E(e,t,n){var r=Pt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function PH(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function RH(e,t,n){var r=Pt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function LH(e,t,n){var r=Pt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function SE(e,t,n){var r=Pt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function zH(e,t,n){var r=Pt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function AE(e,t,n){var r=Pt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function IH(e,t,n){var r=Pt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function BH(e,t,n){var r=Pt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function UH(e,t,n){var r=Pt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function VH(e,t,n){var r=Pt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function qH(e,t,n){var r=OH.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function $H(e,t,n){var r=Pt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function FH(e,t,n){var r=Pt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function TE(e,t){return ze(e.getDate(),t,2)}function HH(e,t){return ze(e.getHours(),t,2)}function KH(e,t){return ze(e.getHours()%12||12,t,2)}function XH(e,t){return ze(1+Iu.count(ci(e),e),t,3)}function N3(e,t){return ze(e.getMilliseconds(),t,3)}function YH(e,t){return N3(e,t)+"000"}function GH(e,t){return ze(e.getMonth()+1,t,2)}function WH(e,t){return ze(e.getMinutes(),t,2)}function ZH(e,t){return ze(e.getSeconds(),t,2)}function QH(e){var t=e.getDay();return t===0?7:t}function JH(e,t){return ze(Ah.count(ci(e)-1,e),t,2)}function k3(e){var t=e.getDay();return t>=4||t===0?po(e):po.ceil(e)}function eK(e,t){return e=k3(e),ze(po.count(ci(e),e)+(ci(e).getDay()===4),t,2)}function tK(e){return e.getDay()}function nK(e,t){return ze(Cd.count(ci(e)-1,e),t,2)}function rK(e,t){return ze(e.getFullYear()%100,t,2)}function iK(e,t){return e=k3(e),ze(e.getFullYear()%100,t,2)}function aK(e,t){return ze(e.getFullYear()%1e4,t,4)}function sK(e,t){var n=e.getDay();return e=n>=4||n===0?po(e):po.ceil(e),ze(e.getFullYear()%1e4,t,4)}function oK(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ze(t/60|0,"0",2)+ze(t%60,"0",2)}function OE(e,t){return ze(e.getUTCDate(),t,2)}function lK(e,t){return ze(e.getUTCHours(),t,2)}function uK(e,t){return ze(e.getUTCHours()%12||12,t,2)}function cK(e,t){return ze(1+Sh.count(fi(e),e),t,3)}function C3(e,t){return ze(e.getUTCMilliseconds(),t,3)}function fK(e,t){return C3(e,t)+"000"}function dK(e,t){return ze(e.getUTCMonth()+1,t,2)}function hK(e,t){return ze(e.getUTCMinutes(),t,2)}function mK(e,t){return ze(e.getUTCSeconds(),t,2)}function pK(e){var t=e.getUTCDay();return t===0?7:t}function gK(e,t){return ze(Th.count(fi(e)-1,e),t,2)}function D3(e){var t=e.getUTCDay();return t>=4||t===0?go(e):go.ceil(e)}function yK(e,t){return e=D3(e),ze(go.count(fi(e),e)+(fi(e).getUTCDay()===4),t,2)}function vK(e){return e.getUTCDay()}function bK(e,t){return ze(Dd.count(fi(e)-1,e),t,2)}function xK(e,t){return ze(e.getUTCFullYear()%100,t,2)}function wK(e,t){return e=D3(e),ze(e.getUTCFullYear()%100,t,2)}function _K(e,t){return ze(e.getUTCFullYear()%1e4,t,4)}function SK(e,t){var n=e.getUTCDay();return e=n>=4||n===0?go(e):go.ceil(e),ze(e.getUTCFullYear()%1e4,t,4)}function AK(){return"+0000"}function EE(){return"%"}function jE(e){return+e}function ME(e){return Math.floor(+e/1e3)}var Fs,P3,R3;TK({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 TK(e){return Fs=TH(e),P3=Fs.format,Fs.parse,R3=Fs.utcFormat,Fs.utcParse,Fs}function OK(e){return new Date(e)}function EK(e){return e instanceof Date?+e:+new Date(+e)}function Wb(e,t,n,r,s,o,u,f,d,h){var m=Lb(),p=m.invert,v=m.domain,x=h(".%L"),w=h(":%S"),_=h("%I:%M"),S=h("%I %p"),O=h("%a %d"),M=h("%b %d"),j=h("%B"),N=h("%Y");function k(C){return(d(C)t(s/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(s,o)=>pF(e,o/r))},n.copy=function(){return B3(t).domain(e)},pi.apply(n,arguments)}function Eh(){var e=0,t=.5,n=1,r=1,s,o,u,f,d,h=rn,m,p=!1,v;function x(_){return isNaN(_=+_)?v:(_=.5+((_=+m(_))-o)*(r*_{if(e!=null){var{scale:r,type:s}=e;if(r==="auto")return s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":s==="category"?"band":"linear";if(typeof r=="string")return PK(r)?r:"point"}};function RK(e,t){for(var n=0,r=e.length,s=e[0]t)?n=o+1:r=o}return n}function F3(e,t){if(e){var n=t??e.domain(),r=n.map(o=>{var u;return(u=e(o))!==null&&u!==void 0?u:0}),s=e.range();if(!(n.length===0||s.length<2))return o=>{var u,f,d=RK(r,o);if(d<=0)return n[0];if(d>=n.length)return n[n.length-1];var h=(u=r[d-1])!==null&&u!==void 0?u:0,m=(f=r[d])!==null&&f!==void 0?f:0;return Math.abs(o-h)<=Math.abs(o-m)?n[d-1]:n[d]}}}function LK(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):F3(e,void 0)}function kE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Pd(e){for(var t=1;te.cartesianAxis.xAxis[t],gi=(e,t)=>{var n=H3(e,t);return n??wt},_t={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:n0,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:Mu},K3=(e,t)=>e.cartesianAxis.yAxis[t],yi=(e,t)=>{var n=K3(e,t);return n??_t},X3={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:""},ex=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??X3},sn=(e,t,n)=>{switch(t){case"xAxis":return gi(e,n);case"yAxis":return yi(e,n);case"zAxis":return ex(e,n);case"angleAxis":return Tb(e,n);case"radiusAxis":return Ob(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},UK=(e,t,n)=>{switch(t){case"xAxis":return gi(e,n);case"yAxis":return yi(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Bu=(e,t,n)=>{switch(t){case"xAxis":return gi(e,n);case"yAxis":return yi(e,n);case"angleAxis":return Tb(e,n);case"radiusAxis":return Ob(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Y3=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function G3(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var W3=e=>e.graphicalItems.cartesianItems,VK=$([Ct,bh],G3),Z3=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Uu=$([W3,sn,VK],Z3,{memoizeOptions:{resultEqualityCheck:wh}}),Q3=$([Uu],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(jb)),J3=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),qK=$([Uu],J3),eD=e=>e.map(t=>t.data).filter(Boolean).flat(1),$K=$([Uu],eD,{memoizeOptions:{resultEqualityCheck:wh}}),tD=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:s}=t;return e.length>0?e:n.slice(r,s+1)},tx=$([$K,vb],tD),nD=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:Ot(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(s=>({value:Ot(s,r)}))):e.map(r=>({value:r})),Vu=$([tx,sn,Uu],nD);function lo(e){if(kr(e)||e instanceof Date){var t=Number(e);if(Le(t))return t}}function CE(e){if(Array.isArray(e)){var t=[lo(e[0]),lo(e[1])];return Er(t)?t:void 0}var n=lo(e);if(n!=null)return[n,n]}function di(e){return e.map(lo).filter(mn)}function FK(e,t){var n=lo(e),r=lo(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var HK=$([Vu],e=>e?.map(t=>t.value).sort(FK));function rD(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function KK(e,t,n){return!n||typeof t!="number"||oi(t)?[]:n.length?di(n.flatMap(r=>{var s=Ot(e,r.dataKey),o,u;if(Array.isArray(s)?[o,u]=s:o=u=s,!(!Le(o)||!Le(u)))return[t-o,t+u]})):[]}var jt=e=>{var t=Dt(e),n=To(e);return Bu(e,t,n)},qu=$([jt],e=>e?.dataKey),XK=$([Q3,vb,jt],u3),iD=(e,t,n,r)=>{var s={},o=t.reduce((u,f)=>{if(f.stackId==null)return u;var d=u[f.stackId];return d==null&&(d=[]),d.push(f),u[f.stackId]=d,u},s);return Object.fromEntries(Object.entries(o).map(u=>{var[f,d]=u,h=r?[...d].reverse():d,m=h.map(l3);return[f,{stackedData:ZU(e,m,n),graphicalItems:h}]}))},YK=$([XK,Q3,ph,t3],iD),aD=(e,t,n,r)=>{var{dataStartIndex:s,dataEndIndex:o}=t;if(r==null&&n!=="zAxis"){var u=eV(e,s,o);if(!(u!=null&&u[0]===0&&u[1]===0))return u}},GK=$([sn],e=>e.allowDataOverflow),nx=e=>{var t;if(e==null||!("domain"in e))return n0;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=di(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:n0},sD=$([sn],nx),oD=$([sD,GK],FC),WK=$([YK,oa,Ct,oD],aD,{memoizeOptions:{resultEqualityCheck:xh}}),rx=e=>e.errorBars,ZK=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>rD(n,r)),Rd=function(){for(var t=arguments.length,n=new Array(t),r=0;r{var o,u;if(n.length>0&&e.forEach(f=>{n.forEach(d=>{var h,m,p=(h=r[d.id])===null||h===void 0?void 0:h.filter(O=>rD(s,O)),v=Ot(f,(m=t.dataKey)!==null&&m!==void 0?m:d.dataKey),x=KK(f,v,p);if(x.length>=2){var w=Math.min(...x),_=Math.max(...x);(o==null||wu)&&(u=_)}var S=CE(v);S!=null&&(o=o==null?S[0]:Math.min(o,S[0]),u=u==null?S[1]:Math.max(u,S[1]))})}),t?.dataKey!=null&&e.forEach(f=>{var d=CE(Ot(f,t.dataKey));d!=null&&(o=o==null?d[0]:Math.min(o,d[0]),u=u==null?d[1]:Math.max(u,d[1]))}),Le(o)&&Le(u))return[o,u]},QK=$([tx,sn,qK,rx,Ct],lD,{memoizeOptions:{resultEqualityCheck:xh}});function JK(e){var{value:t}=e;if(kr(t)||t instanceof Date)return t}var eX=(e,t,n)=>{var r=e.map(JK).filter(s=>s!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&vk(r))?$C(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},uD=e=>e.referenceElements.dots,Eo=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),tX=$([uD,Ct,bh],Eo),cD=e=>e.referenceElements.areas,nX=$([cD,Ct,bh],Eo),fD=e=>e.referenceElements.lines,rX=$([fD,Ct,bh],Eo),dD=(e,t)=>{if(e!=null){var n=di(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},iX=$(tX,Ct,dD),hD=(e,t)=>{if(e!=null){var n=di(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},aX=$([nX,Ct],hD);function sX(e){var t;if(e.x!=null)return di([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:di(n)}function oX(e){var t;if(e.y!=null)return di([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:di(n)}var mD=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?sX(r):oX(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},lX=$([rX,Ct],mD),uX=$(iX,lX,aX,(e,t,n)=>Rd(e,n,t)),pD=(e,t,n,r,s,o,u,f)=>{if(n!=null)return n;var d=u==="vertical"&&f==="xAxis"||u==="horizontal"&&f==="yAxis",h=d?Rd(r,o,s):Rd(o,s);return F$(t,h,e.allowDataOverflow)},cX=$([sn,sD,oD,WK,QK,uX,ht,Ct],pD,{memoizeOptions:{resultEqualityCheck:xh}}),fX=[0,1],gD=(e,t,n,r,s,o,u)=>{if(!((e==null||n==null||n.length===0)&&u===void 0)){var{dataKey:f,type:d}=e,h=sa(t,o);if(h&&f==null){var m;return $C(0,(m=n?.length)!==null&&m!==void 0?m:0)}return d==="category"?eX(r,e,h):s==="expand"?fX:u}},ix=$([sn,ht,tx,Vu,ph,Ct,cX],gD),jo=$([sn,Y3,_b],$3),yD=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var s=nx(t),o=Array.isArray(s)&&(s[0]==="auto"||s[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&Er(e)){if(o)return qO(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return $O(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(o&&Er(e))return qO(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Er(e))return $O(e,t.tickCount,t.allowDecimals,"adaptive")}}},ax=$([ix,Bu,jo],yD),vD=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&Er(t)&&Array.isArray(n)&&n.length>0){var s,o,u=t[0],f=(s=n[0])!==null&&s!==void 0?s:0,d=t[1],h=(o=n[n.length-1])!==null&&o!==void 0?o:0;return[Math.min(u,f),Math.max(d,h)]}return t},dX=$([sn,ix,ax,Ct],vD),hX=$(Vu,sn,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(di(e.map(p=>p.value))).sort((p,v)=>p-v),s=r[0],o=r[r.length-1];if(s==null||o==null)return 1/0;var u=o-s;if(u===0)return 1/0;for(var f=0;fs,(e,t,n,r,s)=>{if(!Le(e))return 0;var o=t==="vertical"?r.height:r.width;if(s==="gap")return e*o/2;if(s==="no-gap"){var u=ra(n,e*o),f=e*o/2;return f-u-(f-u)/o*u}return 0}),mX=(e,t,n)=>{var r=gi(e,t);return r==null||typeof r.padding!="string"?0:bD(e,"xAxis",t,n,r.padding)},pX=(e,t,n)=>{var r=yi(e,t);return r==null||typeof r.padding!="string"?0:bD(e,"yAxis",t,n,r.padding)},gX=$(gi,mX,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:s}=e;return typeof s=="string"?{left:t,right:t}:{left:((n=s.left)!==null&&n!==void 0?n:0)+t,right:((r=s.right)!==null&&r!==void 0?r:0)+t}}),yX=$(yi,pX,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:s}=e;return typeof s=="string"?{top:t,bottom:t}:{top:((n=s.top)!==null&&n!==void 0?n:0)+t,bottom:((r=s.bottom)!==null&&r!==void 0?r:0)+t}}),vX=$([Xt,gX,ch,uh,(e,t,n)=>n],(e,t,n,r,s)=>{var{padding:o}=r;return s?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),bX=$([Xt,ht,yX,ch,uh,(e,t,n)=>n],(e,t,n,r,s,o)=>{var{padding:u}=s;return o?[r.height-u.bottom,u.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),$u=(e,t,n,r)=>{var s;switch(t){case"xAxis":return vX(e,n,r);case"yAxis":return bX(e,n,r);case"zAxis":return(s=ex(e,n))===null||s===void 0?void 0:s.range;case"angleAxis":return a3(e);case"radiusAxis":return s3(e,n);default:return}},xD=$([sn,$u],gh),xX=$([jo,dX],rF),sx=$([sn,jo,xX,xD],Jb),wD=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:s,scale:o}=n,u=sa(e,r);if(u&&(s==="number"||o!=="auto"))return t.map(f=>f.value)}},ox=$([ht,Vu,Bu,Ct],wD),Mo=$([sx],Mb);$([sx],LK);$([sx,HK],F3);$([Uu,rx,Ct],ZK);function _D(e,t){return e.idt.id?1:0}var jh=(e,t)=>t,Mh=(e,t,n)=>n,wX=$(oh,jh,Mh,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(_D)),_X=$(lh,jh,Mh,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(_D)),SD=(e,t)=>({width:e.width,height:t.height}),SX=(e,t)=>{var n=typeof t.width=="number"?t.width:Mu;return{width:n,height:e.height}},AX=$(Xt,gi,SD),TX=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},OX=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},EX=$(mi,Xt,wX,jh,Mh,(e,t,n,r,s)=>{var o={},u;return n.forEach(f=>{var d=SD(t,f);u==null&&(u=TX(t,r,e));var h=r==="top"&&!s||r==="bottom"&&s;o[f.id]=u-Number(h)*d.height,u+=(h?-1:1)*d.height}),o}),jX=$(hi,Xt,_X,jh,Mh,(e,t,n,r,s)=>{var o={},u;return n.forEach(f=>{var d=SX(t,f);u==null&&(u=OX(t,r,e));var h=r==="left"&&!s||r==="right"&&s;o[f.id]=u-Number(h)*d.width,u+=(h?-1:1)*d.width}),o}),MX=(e,t)=>{var n=gi(e,t);if(n!=null)return EX(e,n.orientation,n.mirror)},NX=$([Xt,gi,MX,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var s=n?.[r];return s==null?{x:e.left,y:0}:{x:e.left,y:s}}}),kX=(e,t)=>{var n=yi(e,t);if(n!=null)return jX(e,n.orientation,n.mirror)},CX=$([Xt,yi,kX,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var s=n?.[r];return s==null?{x:0,y:e.top}:{x:s,y:e.top}}}),DX=$(Xt,yi,(e,t)=>{var n=typeof t.width=="number"?t.width:Mu;return{width:n,height:e.height}}),AD=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:s,type:o,dataKey:u}=n,f=sa(e,r),d=t.map(h=>h.value);if(u&&f&&o==="category"&&s&&vk(d))return d}},lx=$([ht,Vu,sn,Ct],AD),DE=$([ht,UK,jo,Mo,lx,ox,$u,ax,Ct],(e,t,n,r,s,o,u,f,d)=>{if(t!=null){var h=sa(e,d);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:d,categoricalDomain:o,duplicateDomain:s,isCategorical:h,niceTicks:f,range:u,realScaleType:n,scale:r}}}),PX=(e,t,n,r,s,o,u,f,d)=>{if(!(t==null||r==null)){var h=sa(e,d),{type:m,ticks:p,tickCount:v}=t,x=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,w=m==="category"&&r.bandwidth?r.bandwidth()/x:0;w=d==="angleAxis"&&o!=null&&o.length>=2?Wn(o[0]-o[1])*2*w:w;var _=p||s;return _?_.map((S,O)=>{var M=u?u.indexOf(S):S,j=r.map(M);return Le(j)?{index:O,coordinate:j+w,value:S,offset:w}:null}).filter(mn):h&&f?f.map((S,O)=>{var M=r.map(S);return Le(M)?{coordinate:M+w,value:S,index:O,offset:w}:null}).filter(mn):r.ticks?r.ticks(v).map((S,O)=>{var M=r.map(S);return Le(M)?{coordinate:M+w,value:S,index:O,offset:w}:null}).filter(mn):r.domain().map((S,O)=>{var M=r.map(S);return Le(M)?{coordinate:M+w,value:u?u[S]:S,index:O,offset:w}:null}).filter(mn)}},TD=$([ht,Bu,jo,Mo,ax,$u,lx,ox,Ct],PX),RX=(e,t,n,r,s,o,u)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var f=sa(e,u),{tickCount:d}=t,h=0;return h=u==="angleAxis"&&r?.length>=2?Wn(r[0]-r[1])*2*h:h,f&&o?o.map((m,p)=>{var v=n.map(m);return Le(v)?{coordinate:v+h,value:m,index:p,offset:h}:null}).filter(mn):n.ticks?n.ticks(d).map((m,p)=>{var v=n.map(m);return Le(v)?{coordinate:v+h,value:m,index:p,offset:h}:null}).filter(mn):n.domain().map((m,p)=>{var v=n.map(m);return Le(v)?{coordinate:v+h,value:s?s[m]:m,index:p,offset:h}:null}).filter(mn)}},OD=$([ht,Bu,Mo,$u,lx,ox,Ct],RX),ED=$(sn,Mo,(e,t)=>{if(!(e==null||t==null))return Pd(Pd({},e),{},{scale:t})}),LX=$([sn,jo,ix,xD],Jb),zX=$([LX],Mb),IX=$((e,t,n)=>ex(e,n),zX,(e,t)=>{if(!(e==null||t==null))return Pd(Pd({},e),{},{scale:t})}),BX=$([ht,oh,lh],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),UX=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};$([UX],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,s=e[0];for(var o of e){var u=Math.abs(o.coordinate-t);ue.options.defaultTooltipEventType,MD=e=>e.options.validateTooltipEventTypes;function ND(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function ux(e,t){var n=jD(e),r=MD(e);return ND(t,n,r)}function VX(e){return ve(t=>ux(t,e))}var kD=(e,t)=>{var n,r=Number(t);if(!(oi(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},qX=e=>e.tooltip.settings,Zi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},$X={itemInteraction:{click:Zi,hover:Zi},axisInteraction:{click:Zi,hover:Zi},keyboardInteraction:Zi,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}},CD=Qt({name:"tooltip",initialState:$X,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Qe()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,s=Zn(e).tooltipItemPayloads.indexOf(n);s>-1&&(e.tooltipItemPayloads[s]=r)},prepare:Qe()},removeTooltipEntrySettings:{reducer(e,t){var n=Zn(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Qe()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,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.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.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.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}}}),{addTooltipEntrySettings:FX,replaceTooltipEntrySettings:HX,removeTooltipEntrySettings:KX,setTooltipSettingsState:XX,setActiveMouseOverItemIndex:DD,mouseLeaveItem:YX,mouseLeaveChart:PD,setActiveClickItemIndex:GX,setMouseOverAxisIndex:RD,setMouseClickAxisIndex:WX,setSyncInteraction:r0,setKeyboardInteraction:Ld}=CD.actions,ZX=CD.reducer;function PE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ef(e){for(var t=1;t{if(t==null)return Zi;var s=tY(e,t,n);if(s==null)return Zi;if(s.active)return s;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(nY(s)){if(o)return Ef(Ef({},s),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Ef(Ef({},Zi),{},{coordinate:s.coordinate})};function rY(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function iY(e,t){var n=rY(e),r=t[0],s=t[1];if(n===void 0)return!1;var o=Math.min(r,s),u=Math.max(r,s);return n>=o&&n<=u}function aY(e,t,n){if(n==null||t==null)return!0;var r=Ot(e,t);return r==null||!Er(n)?!0:iY(r,n)}var cx=(e,t,n,r)=>{var s=e?.index;if(s==null)return null;var o=Number(s);if(!Le(o))return s;var u=0,f=1/0;t.length>0&&(f=t.length-1);var d=Math.max(u,Math.min(o,f)),h=t[d];return h==null||aY(h,n,r)?String(d):null},zD=(e,t,n,r,s,o,u)=>{if(o!=null){var f=u[0],d=f?.getPosition(o);if(d!=null)return d;var h=s?.[Number(o)];if(h)return n==="horizontal"?{x:h.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:h.coordinate}}},ID=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var s;if(n==="hover"?s=e.itemInteraction.hover.graphicalItemId:s=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&s==null)return e.tooltipItemPayloads;if(s==null&&r!=null){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(u=>{var f;return((f=u.settings)===null||f===void 0?void 0:f.graphicalItemId)===s})},BD=e=>e.options.tooltipPayloadSearcher,No=e=>e.tooltip;function RE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function LE(e){for(var t=1;te(t)}function zE(e){if(typeof e=="string")return e}function dY(e){if(!(e==null||typeof e!="object")){var t="name"in e?uY(e.name):void 0,n="unit"in e?cY(e.unit):void 0,r="dataKey"in e?fY(e.dataKey):void 0,s="payload"in e?e.payload:void 0,o="color"in e?zE(e.color):void 0,u="fill"in e?zE(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:s,color:o,fill:u}}}function hY(e,t){return e??t}var UD=(e,t,n,r,s,o,u)=>{if(!(t==null||o==null)){var{chartData:f,computedData:d,dataStartIndex:h,dataEndIndex:m}=n,p=[];return e.reduce((v,x)=>{var w,{dataDefinedOnItem:_,settings:S}=x,O=hY(_,f),M=Array.isArray(O)?fC(O,h,m):O,j=(w=S?.dataKey)!==null&&w!==void 0?w:r,N=S?.nameKey,k;if(r&&Array.isArray(M)&&!Array.isArray(M[0])&&u==="axis"?k=bk(M,r,s):k=o(M,t,d,N),Array.isArray(k))k.forEach(L=>{var I,Y,te=dY(L),ie=te?.name,K=te?.dataKey,be=te?.payload,pe=LE(LE({},S),{},{name:ie,unit:te?.unit,color:(I=te?.color)!==null&&I!==void 0?I:S?.color,fill:(Y=te?.fill)!==null&&Y!==void 0?Y:S?.fill});v.push(CT({tooltipEntrySettings:pe,dataKey:K,payload:be,value:Ot(be,K),name:ie==null?void 0:String(ie)}))});else{var C;v.push(CT({tooltipEntrySettings:S,dataKey:j,payload:k,value:Ot(k,j),name:(C=Ot(k,N))!==null&&C!==void 0?C:S?.name}))}return v},p)}},fx=$([jt,Y3,_b],$3),mY=$([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),pY=$([Dt,To],G3),ko=$([mY,jt,pY],Z3,{memoizeOptions:{resultEqualityCheck:wh}}),gY=$([ko],e=>e.filter(jb)),yY=$([ko],eD,{memoizeOptions:{resultEqualityCheck:wh}}),Co=$([yY,oa],tD),vY=$([gY,oa,jt],u3),dx=$([Co,jt,ko],nD),VD=$([jt],nx),bY=$([jt],e=>e.allowDataOverflow),qD=$([VD,bY],FC),xY=$([ko],e=>e.filter(jb)),wY=$([vY,xY,ph,t3],iD),_Y=$([wY,oa,Dt,qD],aD),SY=$([ko],J3),AY=$([Co,jt,SY,rx,Dt],lD,{memoizeOptions:{resultEqualityCheck:xh}}),TY=$([uD,Dt,To],Eo),OY=$([TY,Dt],dD),EY=$([cD,Dt,To],Eo),jY=$([EY,Dt],hD),MY=$([fD,Dt,To],Eo),NY=$([MY,Dt],mD),kY=$([OY,NY,jY],Rd),CY=$([jt,VD,qD,_Y,AY,kY,ht,Dt],pD),Fu=$([jt,ht,Co,dx,ph,Dt,CY],gD),DY=$([Fu,jt,fx],yD),PY=$([jt,Fu,DY,Dt],vD),$D=e=>{var t=Dt(e),n=To(e),r=!1;return $u(e,t,n,r)},FD=$([jt,$D],gh),RY=$([jt,fx,PY,FD],Jb),HD=$([RY],Mb),LY=$([ht,dx,jt,Dt],AD),zY=$([ht,dx,jt,Dt],wD),IY=(e,t,n,r,s,o,u,f)=>{if(t){var{type:d}=t,h=sa(e,f);if(r){var m=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,p=d==="category"&&r.bandwidth?r.bandwidth()/m:0;return p=f==="angleAxis"&&s!=null&&s?.length>=2?Wn(s[0]-s[1])*2*p:p,h&&u?u.map((v,x)=>{var w=r.map(v);return Le(w)?{coordinate:w+p,value:v,index:x,offset:p}:null}).filter(mn):r.domain().map((v,x)=>{var w=r.map(v);return Le(w)?{coordinate:w+p,value:o?o[v]:v,index:x,offset:p}:null}).filter(mn)}}},vi=$([ht,jt,fx,HD,$D,LY,zY,Dt],IY),hx=$([jD,MD,qX],(e,t,n)=>ND(n.shared,e,t)),KD=e=>e.tooltip.settings.trigger,mx=e=>e.tooltip.settings.defaultIndex,Hu=$([No,hx,KD,mx],LD),vu=$([Hu,Co,qu,Fu],cx),XD=$([vi,vu],kD),BY=$([Hu],e=>{if(e)return e.dataKey}),UY=$([Hu],e=>{if(e)return e.graphicalItemId}),YD=$([No,hx,KD,mx],ID),VY=$([hi,mi,ht,Xt,vi,mx,YD],zD),qY=$([Hu,VY],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),$Y=$([Hu],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),FY=$([YD,vu,oa,qu,XD,BD,hx],UD);$([FY],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function IE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function BE(e){for(var t=1;tve(jt),GY=()=>{var e=YY(),t=ve(vi),n=ve(HD);return kT(!e||!n?void 0:BE(BE({},e),{},{scale:n}),t)};function UE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Hs(e){for(var t=1;t{var s=t.find(o=>o&&o.index===n);if(s){if(e==="horizontal")return{x:s.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:s.coordinate}}return{x:0,y:0}},eG=(e,t,n,r)=>{var s=t.find(h=>h&&h.index===n);if(s){if(e==="centric"){var o=s.coordinate,{radius:u}=r;return Hs(Hs(Hs({},r),Kt(r.cx,r.cy,u,o)),{},{angle:o,radius:u})}var f=s.coordinate,{angle:d}=r;return Hs(Hs(Hs({},r),Kt(r.cx,r.cy,f,d)),{},{angle:d,radius:f})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function tG(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var GD=(e,t,n,r,s)=>{var o,u=(o=t?.length)!==null&&o!==void 0?o:0;if(u<=1||e==null)return 0;if(r==="angleAxis"&&s!=null&&Math.abs(Math.abs(s[1]-s[0])-360)<=1e-6)for(var f=0;f0?(d=n[f-1])===null||d===void 0?void 0:d.coordinate:(h=n[u-1])===null||h===void 0?void 0:h.coordinate,w=(m=n[f])===null||m===void 0?void 0:m.coordinate,_=f>=u-1?(p=n[0])===null||p===void 0?void 0:p.coordinate:(v=n[f+1])===null||v===void 0?void 0:v.coordinate,S=void 0;if(!(x==null||w==null||_==null))if(Wn(w-x)!==Wn(_-w)){var O=[];if(Wn(_-w)===Wn(s[1]-s[0])){S=_;var M=w+s[1]-s[0];O[0]=Math.min(M,(M+x)/2),O[1]=Math.max(M,(M+x)/2)}else{S=x;var j=_+s[1]-s[0];O[0]=Math.min(w,(j+w)/2),O[1]=Math.max(w,(j+w)/2)}var N=[Math.min(w,(S+w)/2),Math.max(w,(S+w)/2)];if(e>N[0]&&e<=N[1]||e>=O[0]&&e<=O[1]){var k;return(k=n[f])===null||k===void 0?void 0:k.index}}else{var C=Math.min(x,_),L=Math.max(x,_);if(e>(C+w)/2&&e<=(L+w)/2){var I;return(I=n[f])===null||I===void 0?void 0:I.index}}}else if(t)for(var Y=0;Y(te.coordinate+K.coordinate)/2||Y>0&&Y(te.coordinate+K.coordinate)/2&&e<=(te.coordinate+ie.coordinate)/2)return te.index}}return-1},nG=()=>ve(_b),px=(e,t)=>t,WD=(e,t,n)=>n,gx=(e,t,n,r)=>r,rG=$(vi,e=>Zd(e,t=>t.coordinate)),yx=$([No,px,WD,gx],LD),vx=$([yx,Co,qu,Fu],cx),iG=(e,t,n)=>{if(t!=null){var r=No(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},ZD=$([No,px,WD,gx],ID),zd=$([hi,mi,ht,Xt,vi,gx,ZD],zD),aG=$([yx,zd],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),QD=$([vi,vx],kD),sG=$([ZD,vx,oa,qu,QD,BD,px],UD),oG=$([yx,vx],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),lG=(e,t,n,r,s,o,u)=>{if(!(!e||!n||!r||!s)&&tG(e,u)){var f=tV(e,t),d=GD(f,o,s,n,r),h=JY(t,s,d,e);return{activeIndex:String(d),activeCoordinate:h}}},uG=(e,t,n,r,s,o,u)=>{if(!(!e||!r||!s||!o||!n)){var f=D$(e,n);if(f){var d=nV(f,t),h=GD(d,u,o,r,s),m=eG(t,o,h,f);return{activeIndex:String(h),activeCoordinate:m}}}},cG=(e,t,n,r,s,o,u,f)=>{if(!(!e||!t||!r||!s||!o))return t==="horizontal"||t==="vertical"?lG(e,t,r,s,o,u,f):uG(e,t,n,r,s,o,u)},fG=$(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),dG=$(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(pn)),n=Array.from(new Set(t));return n.sort((r,s)=>r-s)},{memoizeOptions:{resultEqualityCheck:nF}});function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function qE(e){for(var t=1;tqE(qE({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),gG)},vG=new Set(Object.values(pn));function bG(e){return vG.has(e)}var JD=Qt({name:"zIndex",initialState:yG,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Qe()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!bG(n)&&delete e.zIndexMap[n])},prepare:Qe()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:s}=t.payload;e.zIndexMap[n]?s?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:s?void 0:r,panoramaElement:s?r:void 0}},prepare:Qe()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:Qe()}}}),{registerZIndexPortal:xG,unregisterZIndexPortal:wG,registerZIndexPortalElement:_G,unregisterZIndexPortalElement:SG}=JD.actions,AG=JD.reducer;function ca(e){var{zIndex:t,children:n}=e,r=PV(),s=r&&t!==void 0&&t!==0,o=Jt(),u=it();A.useLayoutEffect(()=>s?(u(xG({zIndex:t})),()=>{u(wG({zIndex:t}))}):_o,[u,t,s]);var f=ve(d=>fG(d,t,o));return s?f?G0.createPortal(n,f):null:n}function i0(){return i0=Object.assign?Object.assign.bind():function(e){for(var t=1;tA.useContext(e5),zy={exports:{}},FE;function CG(){return FE||(FE=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function s(d,h,m){this.fn=d,this.context=h,this.once=m||!1}function o(d,h,m,p,v){if(typeof m!="function")throw new TypeError("The listener must be a function");var x=new s(m,p||d,v),w=n?n+h:h;return d._events[w]?d._events[w].fn?d._events[w]=[d._events[w],x]:d._events[w].push(x):(d._events[w]=x,d._eventsCount++),d}function u(d,h){--d._eventsCount===0?d._events=new r:delete d._events[h]}function f(){this._events=new r,this._eventsCount=0}f.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(n?p.slice(1):p);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},f.prototype.listeners=function(h){var m=n?n+h:h,p=this._events[m];if(!p)return[];if(p.fn)return[p.fn];for(var v=0,x=p.length,w=new Array(x);v{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!oi(n))return e[n]}},LG={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},t5=Qt({name:"options",initialState:LG,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),zG=t5.reducer,{createEventEmitter:IG}=t5.actions;function BG(e){return e.tooltip.syncInteraction}var UG={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},n5=Qt({name:"chartData",initialState:UG,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{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:KE,setDataStartEndIndexes:VG,setComputedData:Mne}=n5.actions,qG=n5.reducer,$G=["x","y"];function XE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ks(e){for(var t=1;td.rootProps.className);A.useEffect(()=>{if(e==null)return _o;var d=(h,m,p)=>{if(t!==p&&e===h){if(r==="index"){var v;if(u&&m!==null&&m!==void 0&&(v=m.payload)!==null&&v!==void 0&&v.coordinate&&m.payload.sourceViewBox){var x=m.payload.coordinate,{x:w,y:_}=x,S=XG(x,$G),{x:O,y:M,width:j,height:N}=m.payload.sourceViewBox,k=Ks(Ks({},S),{},{x:u.x+(j?(w-O)/j:0)*u.width,y:u.y+(N?(_-M)/N:0)*u.height});n(Ks(Ks({},m),{},{payload:Ks(Ks({},m.payload),{},{coordinate:k})}))}else n(m);return}if(s!=null){var C;if(typeof r=="function"){var L={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},I=r(s,L);C=s[I]}else r==="value"&&(C=s.find(V=>String(V.value)===m.payload.label));var{coordinate:Y}=m.payload;if(C==null||m.payload.active===!1||Y==null||u==null){n(r0({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:te,y:ie}=Y,K=Math.min(te,u.x+u.width),be=Math.min(ie,u.y+u.height),pe={x:o==="horizontal"?C.coordinate:K,y:o==="horizontal"?be:C.coordinate},xe=r0({active:m.payload.active,coordinate:pe,dataKey:m.payload.dataKey,index:String(C.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});n(xe)}}};return bu.on(a0,d),()=>{bu.off(a0,d)}},[f,n,t,e,r,s,o,u])}function WG(){var e=ve(Sb),t=ve(Ab),n=it();A.useEffect(()=>{if(e==null)return _o;var r=(s,o,u)=>{t!==u&&e===s&&n(VG(o))};return bu.on(HE,r),()=>{bu.off(HE,r)}},[n,t,e])}function ZG(){var e=it();A.useEffect(()=>{e(IG())},[e]),GG(),WG()}function QG(e,t,n,r,s,o){var u=ve(w=>iG(w,e,t)),f=ve(UY),d=ve(Ab),h=ve(Sb),m=ve(n3),p=ve(BG),v=p?.active,x=Nu();A.useEffect(()=>{if(!v&&h!=null&&d!=null){var w=r0({active:o,coordinate:n,dataKey:u,index:s,label:typeof r=="number"?String(r):r,sourceViewBox:x,graphicalItemId:f});bu.emit(a0,h,w,d)}},[v,n,u,f,s,r,d,h,m,o,x])}function YE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function GE(e){for(var t=1;t{L(XX({shared:M,trigger:j,axisId:C,active:s,defaultIndex:I}))},[L,M,j,C,s,I]);var Y=Nu(),te=PC(),ie=VX(M),{activeIndex:K,isActive:be}=(t=ve(_e=>oG(_e,ie,j,I)))!==null&&t!==void 0?t:{},pe=ve(_e=>sG(_e,ie,j,I)),xe=ve(_e=>QD(_e,ie,j,I)),V=ve(_e=>aG(_e,ie,j,I)),Q=pe,ne=kG(),le=(n=s??be)!==null&&n!==void 0?n:!1,[ue,P]=$7([Q,le]),H=ie==="axis"?xe:void 0;QG(ie,j,V,H,K,le);var ae=k??ne;if(ae==null||Y==null||ie==null)return null;var se=Q??WE;le||(se=WE),h&&se.length&&(se=p7(se.filter(_e=>_e.value!=null&&(_e.hide!==!0||r.includeHidden)),v,nW));var Z=se.length>0,oe=GE(GE({},r),{},{payload:se,label:H,active:le,activeIndex:K,coordinate:V,accessibilityLayer:te}),he=A.createElement(Dq,{allowEscapeViewBox:o,animationDuration:u,animationEasing:f,isAnimationActive:m,active:le,coordinate:V,hasPayload:Z,offset:p,position:x,reverseDirection:w,useTranslate3d:_,viewBox:Y,wrapperStyle:S,lastBoundingBox:ue,innerRef:P,hasPortalFromProps:!!k},rW(d,oe));return A.createElement(A.Fragment,null,G0.createPortal(he,ae),le&&A.createElement(NG,{cursor:O,tooltipEventType:ie,coordinate:V,payload:se,index:K}))}var bx=e=>null;bx.displayName="Cell";function sW(e,t,n){return(t=oW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oW(e){var t=lW(e,"string");return typeof t=="symbol"?t:t+""}function lW(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class uW{constructor(t){sW(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function ZE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function cW(e){for(var t=1;t{try{var n=document.getElementById(JE);n||(n=document.createElement("span"),n.setAttribute("id",JE),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,pW,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Zl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Pu.isSsr)return{width:0,height:0};if(!r5.enableCache)return ej(t,n);var r=gW(t,n),s=QE.get(r);if(s)return s;var o=ej(t,n);return QE.set(r,o),o},i5;function yW(e,t,n){return(t=vW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vW(e){var t=bW(e,"string");return typeof t=="symbol"?t:t+""}function bW(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tj=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,nj=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xW=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,wW=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,_W={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},SW=["cm","mm","pt","pc","in","Q","px"];function AW(e){return SW.includes(e)}var io="NaN";function TW(e,t){return e*_W[t]}class Ht{static parse(t){var n,[,r,s]=(n=wW.exec(t))!==null&&n!==void 0?n:[];return r==null?Ht.NaN:new Ht(parseFloat(r),s??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,oi(t)&&(this.unit=""),n!==""&&!xW.test(n)&&(this.num=NaN,this.unit=""),AW(n)&&(this.num=TW(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Ht(NaN,""):new Ht(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Ht(NaN,""):new Ht(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ht(NaN,""):new Ht(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ht(NaN,""):new Ht(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return oi(this.num)}}i5=Ht;yW(Ht,"NaN",new i5(NaN,""));function a5(e){if(e==null||e.includes(io))return io;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,s,o]=(n=tj.exec(t))!==null&&n!==void 0?n:[],u=Ht.parse(r??""),f=Ht.parse(o??""),d=s==="*"?u.multiply(f):u.divide(f);if(d.isNaN())return io;t=t.replace(tj,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,[,m,p,v]=(h=nj.exec(t))!==null&&h!==void 0?h:[],x=Ht.parse(m??""),w=Ht.parse(v??""),_=p==="+"?x.add(w):x.subtract(w);if(_.isNaN())return io;t=t.replace(nj,_.toString())}return t}var rj=/\(([^()]*)\)/;function OW(e){for(var t=e,n;(n=rj.exec(t))!=null;){var[,r]=n;t=t.replace(rj,a5(r))}return t}function EW(e){var t=e.replace(/\s+/g,"");return t=OW(t),t=a5(t),t}function jW(e){try{return EW(e)}catch{return io}}function Iy(e){var t=jW(e.slice(5,-1));return t===io?"":t}var MW=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],NW=["dx","dy","angle","className","breakAll"];function s0(){return s0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:t,breakAll:n,style:r}=e;try{var s=[];dt(t)||(n?s=t.toString().split(""):s=t.toString().split(s5));var o=s.map(f=>({word:f,width:Zl(f,r).width})),u=n?0:Zl(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:u}}catch{return null}};function l5(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function CW(e){return dt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var u5=(e,t,n,r)=>e.reduce((s,o)=>{var{word:u,width:f}=o,d=s[s.length-1];if(d&&f!=null&&(t==null||r||d.width+f+ne.reduce((t,n)=>t.width>n.width?t:n),DW="…",aj=(e,t,n,r,s,o,u,f)=>{var d=e.slice(0,t),h=o5({breakAll:n,style:r,children:d+DW});if(!h)return[!1,[]];var m=u5(h.wordsWithComputedWidth,o,u,f),p=m.length>s||c5(m).width>Number(o);return[p,m]},PW=(e,t,n,r,s)=>{var{maxLines:o,children:u,style:f,breakAll:d}=e,h=ye(o),m=String(u),p=u5(t,r,n,s);if(!h||s)return p;var v=p.length>o||c5(p).width>Number(r);if(!v)return p;for(var x=0,w=m.length-1,_=0,S;x<=w&&_<=m.length-1;){var O=Math.floor((x+w)/2),M=O-1,[j,N]=aj(m,M,d,f,o,r,n,s),[k]=aj(m,O,d,f,o,r,n,s);if(!j&&!k&&(x=O+1),j&&k&&(w=O-1),!j&&k){S=N;break}_++}return S||p},sj=e=>{var t=dt(e)?[]:e.toString().split(s5);return[{words:t,width:void 0}]},RW=e=>{var{width:t,scaleToFit:n,children:r,style:s,breakAll:o,maxLines:u}=e;if((t||n)&&!Pu.isSsr){var f,d,h=o5({breakAll:o,children:r,style:s});if(h){var{wordsWithComputedWidth:m,spaceWidth:p}=h;f=m,d=p}else return sj(r);return PW({breakAll:o,children:r,maxLines:u,style:s},f,d,t,!!n)}return sj(r)},f5="#808080",LW={angle:0,breakAll:!1,capHeight:"0.71em",fill:f5,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},xx=A.forwardRef((e,t)=>{var n=vn(e,LW),{x:r,y:s,lineHeight:o,capHeight:u,fill:f,scaleToFit:d,textAnchor:h,verticalAnchor:m}=n,p=ij(n,MW),v=A.useMemo(()=>RW({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:d,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,d,p.style,p.width]),{dx:x,dy:w,angle:_,className:S,breakAll:O}=p,M=ij(p,NW);if(!kr(r)||!kr(s)||v.length===0)return null;var j=Number(r)+(ye(x)?x:0),N=Number(s)+(ye(w)?w:0);if(!Le(j)||!Le(N))return null;var k;switch(m){case"start":k=Iy("calc(".concat(u,")"));break;case"middle":k=Iy("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:k=Iy("calc(".concat(v.length-1," * -").concat(o,")"));break}var C=[],L=v[0];if(d&&L!=null){var I=L.width,{width:Y}=p;C.push("scale(".concat(ye(Y)&&ye(I)?Y/I:1,")"))}return _&&C.push("rotate(".concat(_,", ").concat(j,", ").concat(N,")")),C.length&&(M.transform=C.join(" ")),A.createElement("text",s0({},er(M),{ref:t,x:j,y:N,className:et("recharts-text",S),textAnchor:h,fill:f.includes("url")?f5:f}),v.map((te,ie)=>{var K=te.words.join(O?"":" ");return A.createElement("tspan",{x:j,dy:ie===0?k:o,key:"".concat(K,"-").concat(ie)},K)}))});xx.displayName="Text";function oj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t{var{viewBox:t,position:n,offset:r=0,parentViewBox:s}=e,{x:o,y:u,height:f,upperWidth:d,lowerWidth:h}=db(t),m=o,p=o+(d-h)/2,v=(m+p)/2,x=(d+h)/2,w=m+d/2,_=f>=0?1:-1,S=_*r,O=_>0?"end":"start",M=_>0?"start":"end",j=d>=0?1:-1,N=j*r,k=j>0?"end":"start",C=j>0?"start":"end",L=s;if(n==="top"){var I={x:m+d/2,y:u-S,horizontalAnchor:"middle",verticalAnchor:O};return L&&(I.height=Math.max(u-L.y,0),I.width=d),I}if(n==="bottom"){var Y={x:p+h/2,y:u+f+S,horizontalAnchor:"middle",verticalAnchor:M};return L&&(Y.height=Math.max(L.y+L.height-(u+f),0),Y.width=h),Y}if(n==="left"){var te={x:v-N,y:u+f/2,horizontalAnchor:k,verticalAnchor:"middle"};return L&&(te.width=Math.max(te.x-L.x,0),te.height=f),te}if(n==="right"){var ie={x:v+x+N,y:u+f/2,horizontalAnchor:C,verticalAnchor:"middle"};return L&&(ie.width=Math.max(L.x+L.width-ie.x,0),ie.height=f),ie}var K=L?{width:x,height:f}:{};return n==="insideLeft"?_r({x:v+N,y:u+f/2,horizontalAnchor:C,verticalAnchor:"middle"},K):n==="insideRight"?_r({x:v+x-N,y:u+f/2,horizontalAnchor:k,verticalAnchor:"middle"},K):n==="insideTop"?_r({x:m+d/2,y:u+S,horizontalAnchor:"middle",verticalAnchor:M},K):n==="insideBottom"?_r({x:p+h/2,y:u+f-S,horizontalAnchor:"middle",verticalAnchor:O},K):n==="insideTopLeft"?_r({x:m+N,y:u+S,horizontalAnchor:C,verticalAnchor:M},K):n==="insideTopRight"?_r({x:m+d-N,y:u+S,horizontalAnchor:k,verticalAnchor:M},K):n==="insideBottomLeft"?_r({x:p+N,y:u+f-S,horizontalAnchor:C,verticalAnchor:O},K):n==="insideBottomRight"?_r({x:p+h-N,y:u+f-S,horizontalAnchor:k,verticalAnchor:O},K):n&&typeof n=="object"&&(ye(n.x)||Ga(n.x))&&(ye(n.y)||Ga(n.y))?_r({x:o+ra(n.x,x),y:u+ra(n.y,f),horizontalAnchor:"end",verticalAnchor:"end"},K):_r({x:w,y:u+f/2,horizontalAnchor:"middle",verticalAnchor:"middle"},K)},VW=["labelRef"],qW=["content"];function lj(e,t){if(e==null)return{};var n,r,s=$W(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{var{x:t,y:n,upperWidth:r,lowerWidth:s,width:o,height:u,children:f}=e,d=A.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:s,width:o,height:u}),[t,n,r,s,o,u]);return A.createElement(d5.Provider,{value:d},f)},h5=()=>{var e=A.useContext(d5),t=Nu();return e||(t?db(t):void 0)},YW=A.createContext(null),GW=()=>{var e=A.useContext(YW),t=ve(o3);return e||t},WW=e=>{var{value:t,formatter:n}=e,r=dt(e.children)?t:e.children;return typeof n=="function"?n(r):r},wx=e=>e!=null&&typeof e=="function",ZW=(e,t)=>{var n=Wn(t-e),r=Math.min(Math.abs(t-e),360);return n*r},QW=(e,t,n,r,s)=>{var{offset:o,className:u}=e,{cx:f,cy:d,innerRadius:h,outerRadius:m,startAngle:p,endAngle:v,clockWise:x}=s,w=(h+m)/2,_=ZW(p,v),S=_>=0?1:-1,O,M;switch(t){case"insideStart":O=p+S*o,M=x;break;case"insideEnd":O=v-S*o,M=!x;break;case"end":O=v+S*o,M=x;break;default:throw new Error("Unsupported position ".concat(t))}M=_<=0?M:!M;var j=Kt(f,d,w,O),N=Kt(f,d,w,O+(M?1:-1)*359),k="M".concat(j.x,",").concat(j.y,` A`).concat(w,",").concat(w,",0,1,").concat(M?0:1,`, - `).concat(N.x,",").concat(N.y),C=dt(e.id)?au("recharts-radial-line-"):e.id;return A.createElement("text",ei({},r,{dominantBaseline:"central",className:et("recharts-radial-bar-label",u)}),A.createElement("defs",null,A.createElement("path",{id:C,d:k})),A.createElement("textPath",{xlinkHref:"#".concat(C)},n))},JW=(e,t,n)=>{var{cx:r,cy:s,innerRadius:o,outerRadius:u,startAngle:f,endAngle:d}=e,h=(f+d)/2;if(n==="outside"){var{x:m,y:p}=Kt(r,s,u+t,h);return{x:m,y:p,textAnchor:m>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:s,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(o+u)/2,{x,y:w}=Kt(r,s,v,h);return{x,y:w,textAnchor:"middle",verticalAnchor:"middle"}},qf=e=>e!=null&&"cx"in e&&ye(e.cx),eZ={angle:0,offset:5,zIndex:pn.label,position:"middle",textBreakAll:!1};function tZ(e){if(!qf(e))return e;var{cx:t,cy:n,outerRadius:r}=e,s=r*2;return{x:t-r,y:n-r,width:s,upperWidth:s,lowerWidth:s,height:s}}function Wi(e){var t=vn(e,eZ),{viewBox:n,parentViewBox:r,position:s,value:o,children:u,content:f,className:d="",textBreakAll:h,labelRef:m}=t,p=GW(),v=h5(),x=s==="center"?v:p??v,w,_,S;n==null?w=x:qf(n)?w=n:w=db(n);var O=tZ(w);if(!w||dt(o)&&dt(u)&&!A.isValidElement(f)&&typeof f!="function")return null;var M=Kl(Kl({},t),{},{viewBox:w});if(A.isValidElement(f)){var{labelRef:j}=M,N=lj(M,VW);return A.cloneElement(f,N)}if(typeof f=="function"){var{content:k}=M,C=lj(M,qW);if(_=A.createElement(f,C),A.isValidElement(_))return _}else _=WW(t);var L=er(t);if(qf(w)){if(s==="insideStart"||s==="insideEnd"||s==="end")return QW(t,s,_,L,w);S=JW(w,t.offset,t.position)}else{if(!O)return null;var I=UW({viewBox:O,position:s,offset:t.offset,parentViewBox:qf(r)?void 0:r});S=Kl(Kl({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 A.createElement(ca,{zIndex:t.zIndex},A.createElement(xx,ei({ref:m,className:et("recharts-label",d)},L,S,{textAnchor:l5(L.textAnchor)?L.textAnchor:S.textAnchor,breakAll:h}),_))}Wi.displayName="Label";var nZ=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?A.createElement(Wi,ei({key:"label-implicit"},r)):kr(e)?A.createElement(Wi,ei({key:"label-implicit",value:e},r)):A.isValidElement(e)?e.type===Wi?A.cloneElement(e,Kl({key:"label-implicit"},r)):A.createElement(Wi,ei({key:"label-implicit",content:e},r)):wx(e)?A.createElement(Wi,ei({key:"label-implicit",content:e},r)):e&&typeof e=="object"?A.createElement(Wi,ei({},e,{key:"label-implicit"},r)):null};function rZ(e){var{label:t,labelRef:n}=e,r=h5();return nZ(t,r,n)||null}var iZ=["valueAccessor"],aZ=["dataKey","clockWise","id","textBreakAll","zIndex"];function Id(){return Id=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(CW(t))return t},m5=A.createContext(void 0),lZ=m5.Provider,p5=A.createContext(void 0);p5.Provider;function uZ(){return A.useContext(m5)}function cZ(){return A.useContext(p5)}function $f(e){var{valueAccessor:t=oZ}=e,n=cj(e,iZ),{dataKey:r,clockWise:s,id:o,textBreakAll:u,zIndex:f}=n,d=cj(n,aZ),h=uZ(),m=cZ(),p=h||m;return!p||!p.length?null:A.createElement(ca,{zIndex:f??pn.label},A.createElement(hr,{className:"recharts-label-list"},p.map((v,x)=>{var w,_=dt(r)?t(v,x):Ot(v.payload,r),S=dt(o)?{}:{id:"".concat(o,"-").concat(x)};return A.createElement(Wi,Id({key:"label-".concat(x)},er(v),d,S,{fill:(w=n.fill)!==null&&w!==void 0?w:v.fill,parentViewBox:v.parentViewBox,value:_,textBreakAll:u,viewBox:v.viewBox,index:x,zIndex:0}))})))}$f.displayName="LabelList";function fZ(e){var{label:t}=e;return t?t===!0?A.createElement($f,{key:"labelList-implicit"}):A.isValidElement(t)||wx(t)?A.createElement($f,{key:"labelList-implicit",content:t}):typeof t=="object"?A.createElement($f,Id({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var dZ={radiusAxis:{},angleAxis:{}},g5=Qt({name:"polarAxis",initialState:dZ,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]}}}),{addRadiusAxis:Nne,removeRadiusAxis:kne,addAngleAxis:Cne,removeAngleAxis:Dne}=g5.actions,hZ=g5.reducer;function mZ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var By={exports:{}},He={};var fj;function pZ(){if(fj)return He;fj=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function w(_){if(typeof _=="object"&&_!==null){var S=_.$$typeof;switch(S){case e:switch(_=_.type,_){case n:case s:case r:case d:case h:case v:return _;default:switch(_=_&&_.$$typeof,_){case u:case f:case p:case m:return _;case o:return _;default:return S}}case t:return S}}}return He.ContextConsumer=o,He.ContextProvider=u,He.Element=e,He.ForwardRef=f,He.Fragment=n,He.Lazy=p,He.Memo=m,He.Portal=t,He.Profiler=s,He.StrictMode=r,He.Suspense=d,He.SuspenseList=h,He.isContextConsumer=function(_){return w(_)===o},He.isContextProvider=function(_){return w(_)===u},He.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},He.isForwardRef=function(_){return w(_)===f},He.isFragment=function(_){return w(_)===n},He.isLazy=function(_){return w(_)===p},He.isMemo=function(_){return w(_)===m},He.isPortal=function(_){return w(_)===t},He.isProfiler=function(_){return w(_)===s},He.isStrictMode=function(_){return w(_)===r},He.isSuspense=function(_){return w(_)===d},He.isSuspenseList=function(_){return w(_)===h},He.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===s||_===r||_===d||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===p||_.$$typeof===m||_.$$typeof===u||_.$$typeof===o||_.$$typeof===f||_.$$typeof===x||_.getModuleId!==void 0)},He.typeOf=w,He}var dj;function gZ(){return dj||(dj=1,By.exports=pZ()),By.exports}var yZ=gZ(),hj=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",mj=null,Uy=null,y5=e=>{if(e===mj&&Array.isArray(Uy))return Uy;var t=[];return A.Children.forEach(e,n=>{dt(n)||(yZ.isFragment(n)?t=t.concat(y5(n.props.children)):t.push(n))}),Uy=t,mj=e,t};function vZ(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(s=>hj(s)):r=[hj(t)],y5(e).forEach(s=>{var o=co(s,"type.displayName")||co(s,"type.name");o&&r.indexOf(o)!==-1&&n.push(s)}),n}var Vy={},pj;function bZ(){return pj||(pj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const s=n[Symbol.toStringTag];return s==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${s}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(Vy)),Vy}var qy,gj;function xZ(){return gj||(gj=1,qy=bZ().isPlainObject),qy}var wZ=xZ();const _Z=ia(wZ);var yj,vj,bj,xj,wj;function _j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Sj(e){for(var t=1;t{var o=n-r,u;return u=ut(yj||(yj=zl(["M ",",",""])),e,t),u+=ut(vj||(vj=zl(["L ",",",""])),e+n,t),u+=ut(bj||(bj=zl(["L ",",",""])),e+n-o/2,t+s),u+=ut(xj||(xj=zl(["L ",",",""])),e+n-o/2-r,t+s),u+=ut(wj||(wj=zl(["L ",","," Z"])),e,t),u},OZ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},EZ=e=>{var t=vn(e,OZ),{x:n,y:r,upperWidth:s,lowerWidth:o,height:u,className:f}=t,{animationEasing:d,animationDuration:h,animationBegin:m,isUpdateAnimationActive:p}=t,v=A.useRef(null),[x,w]=A.useState(-1),_=A.useRef(s),S=A.useRef(o),O=A.useRef(u),M=A.useRef(n),j=A.useRef(r),N=yb(e,"trapezoid-");if(A.useEffect(()=>{if(v.current&&v.current.getTotalLength)try{var pe=v.current.getTotalLength();pe&&w(pe)}catch{}},[]),n!==+n||r!==+r||s!==+s||o!==+o||u!==+u||s===0&&o===0||u===0)return null;var k=et("recharts-trapezoid",f);if(!p)return A.createElement("g",null,A.createElement("path",Bd({},er(t),{className:k,d:Aj(n,r,s,o,u)})));var C=_.current,L=S.current,I=O.current,Y=M.current,te=j.current,ie="0px ".concat(x===-1?1:x,"px"),K="".concat(x,"px ").concat(x,"px"),be=RC(["strokeDasharray"],h,d);return A.createElement(gb,{animationId:N,key:N,canBegin:x>0,duration:h,easing:d,isActive:p,begin:m},pe=>{var xe=Nn(C,s,pe),V=Nn(L,o,pe),Q=Nn(I,u,pe),ne=Nn(Y,n,pe),le=Nn(te,r,pe);v.current&&(_.current=xe,S.current=V,O.current=Q,M.current=ne,j.current=le);var ue=pe>0?{transition:be,strokeDasharray:K}:{strokeDasharray:ie};return A.createElement("path",Bd({},er(t),{className:k,d:Aj(ne,le,xe,V,Q),ref:v,style:Sj(Sj({},ue),t.style)}))})},jZ=["option","shapeType","activeClassName","inActiveClassName"];function MZ(e,t){if(e==null)return{};var n,r,s=NZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{var r=it();return(s,o)=>u=>{e?.(s,o,u),r(DD({activeIndex:String(o),activeDataKey:t,activeCoordinate:s.tooltipPosition,activeGraphicalItemId:n}))}},IZ=e=>{var t=it();return(n,r)=>s=>{e?.(n,r,s),t(YX())}},BZ=(e,t,n)=>{var r=it();return(s,o)=>u=>{e?.(s,o,u),r(GX({activeIndex:String(o),activeDataKey:t,activeCoordinate:s.tooltipPosition,activeGraphicalItemId:n}))}};function UZ(e){var{tooltipEntrySettings:t}=e,n=it(),r=Jt(),s=A.useRef(null);return A.useLayoutEffect(()=>{r||(s.current===null?n(FX(t)):s.current!==t&&n(HX({prev:s.current,next:t})),s.current=t)},[t,n,r]),A.useLayoutEffect(()=>()=>{s.current&&(n(KX(s.current)),s.current=null)},[n]),null}function VZ(e){var{legendPayload:t}=e,n=it(),r=Jt(),s=A.useRef(null);return A.useLayoutEffect(()=>{r||(s.current===null?n(XV(t)):s.current!==t&&n(YV({prev:s.current,next:t})),s.current=t)},[n,r,t]),A.useLayoutEffect(()=>()=>{s.current&&(n(GV(s.current)),s.current=null)},[n]),null}var $y,qZ=()=>{var[e]=A.useState(()=>au("uid-"));return e},$Z=($y=OR.useId)!==null&&$y!==void 0?$y:qZ;function FZ(e,t){var n=$Z();return t||(e?"".concat(e,"-").concat(n):n)}var HZ=A.createContext(void 0),KZ=e=>{var{id:t,type:n,children:r}=e,s=FZ("recharts-".concat(n),t);return A.createElement(HZ.Provider,{value:s},r(s))},XZ={cartesianItems:[],polarItems:[]},v5=Qt({name:"graphicalItems",initialState:XZ,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Qe()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,s=Zn(e).cartesianItems.indexOf(n);s>-1&&(e.cartesianItems[s]=r)},prepare:Qe()},removeCartesianGraphicalItem:{reducer(e,t){var n=Zn(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Qe()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Qe()},removePolarGraphicalItem:{reducer(e,t){var n=Zn(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Qe()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,s=Zn(e).polarItems.indexOf(n);s>-1&&(e.polarItems[s]=r)},prepare:Qe()}}}),{addCartesianGraphicalItem:YZ,replaceCartesianGraphicalItem:GZ,removeCartesianGraphicalItem:WZ,addPolarGraphicalItem:Pne,removePolarGraphicalItem:Rne,replacePolarGraphicalItem:Lne}=v5.actions,ZZ=v5.reducer,QZ=e=>{var t=it(),n=A.useRef(null);return A.useLayoutEffect(()=>{n.current===null?t(YZ(e)):n.current!==e&&t(GZ({prev:n.current,next:e})),n.current=e},[t,e]),A.useLayoutEffect(()=>()=>{n.current&&(t(WZ(n.current)),n.current=null)},[t]),null},JZ=A.memo(QZ);function jj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Mj(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),hQ=$([dQ,hi,mi],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),mQ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b5,n=Jt(),r=ve(s=>Mo(s,"xAxis",t,n));return r?.map},pQ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b5,n=Jt(),r=ve(s=>Mo(s,"yAxis",t,n));return r?.map},w5=()=>ve(hQ),gQ=e=>{var{chartData:t}=e,n=it(),r=Jt();return A.useEffect(()=>r?()=>{}:(n(KE(t)),()=>{n(KE(void 0))}),[t,n,r]),null},Nj={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},_5=Qt({name:"brush",initialState:Nj,reducers:{setBrushSettings(e,t){return t.payload==null?Nj:t.payload}}}),{setBrushSettings:Une}=_5.actions,yQ=_5.reducer;function vQ(e){return(e%180+180)%180}var bQ=function(t){var{width:n,height:r}=t,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=vQ(s),u=o*Math.PI/180,f=Math.atan(r/n),d=u>f&&u{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Zn(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Zn(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=Zn(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:Vne,removeDot:qne,addArea:$ne,removeArea:Fne,addLine:Hne,removeLine:Kne}=S5.actions,wQ=S5.reducer,_Q=A.createContext(void 0),SQ=e=>{var{children:t}=e,[n]=A.useState("".concat(au("recharts"),"-clip")),r=w5();if(r==null)return null;var{x:s,y:o,width:u,height:f}=r;return A.createElement(_Q.Provider,{value:n},A.createElement("defs",null,A.createElement("clipPath",{id:n},A.createElement("rect",{x:s,y:o,height:f,width:u}))),t)};function A5(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;re*s)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-s)<=0}function OQ(e,t){return A5(e,t+1)}function EQ(e,t,n,r,s){for(var o=(r||[]).slice(),{start:u,end:f}=t,d=0,h=1,m=u,p=function(){var w=r?.[d];if(w===void 0)return{v:A5(r,h)};var _=d,S,O=()=>(S===void 0&&(S=n(w,_)),S),M=w.coordinate,j=d===0||xu(e,M,O,m,f);j||(d=0,m=u,h+=1),j&&(m=M+e*(O()/2+s),d+=h)},v;h<=o.length;)if(v=p(),v)return v.v;return[]}function jQ(e,t,n,r,s){var o=(r||[]).slice(),u=o.length;if(u===0)return[];for(var{start:f,end:d}=t,h=1;h<=u;h++){for(var m=(u-1)%h,p=f,v=!0,x=function(){var N=r[_];if(N==null)return 0;var k=_,C,L=()=>(C===void 0&&(C=n(N,k)),C),I=N.coordinate,Y=_===m||xu(e,I,L,p,d);if(!Y)return v=!1,1;Y&&(p=I+e*(L()/2+s))},w,_=m;_(_===void 0&&(_=n(x,v)),_);if(v===u-1){var O=e*(w.coordinate+e*S()/2-d);o[v]=w=Gt(Gt({},w),{},{tickCoord:O>0?w.coordinate-O*e:w.coordinate})}else o[v]=w=Gt(Gt({},w),{},{tickCoord:w.coordinate});if(w.tickCoord!=null){var M=xu(e,w.tickCoord,S,f,d);M&&(d=w.tickCoord-e*(S()/2+s),o[v]=Gt(Gt({},w),{},{isShow:!0}))}},m=u-1;m>=0;m--)h(m);return o}function DQ(e,t,n,r,s,o){var u=(r||[]).slice(),f=u.length,{start:d,end:h}=t;if(o){var m=r[f-1];if(m!=null){var p=n(m,f-1),v=e*(m.coordinate+e*p/2-h);if(u[f-1]=m=Gt(Gt({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var x=xu(e,m.tickCoord,()=>p,d,h);x&&(h=m.tickCoord-e*(p/2+s),u[f-1]=Gt(Gt({},m),{},{isShow:!0}))}}}for(var w=o?f-1:f,_=function(M){var j=u[M];if(j==null)return 1;var N=j,k,C=()=>(k===void 0&&(k=n(j,M)),k);if(M===0){var L=e*(N.coordinate-e*C()/2-d);u[M]=N=Gt(Gt({},N),{},{tickCoord:L<0?N.coordinate-L*e:N.coordinate})}else u[M]=N=Gt(Gt({},N),{},{tickCoord:N.coordinate});if(N.tickCoord!=null){var I=xu(e,N.tickCoord,C,d,h);I&&(d=N.tickCoord+e*(C()/2+s),u[M]=Gt(Gt({},N),{},{isShow:!0}))}},S=0;S{var L=typeof h=="function"?h(k.value,C):k.value;return w==="width"?AQ(Zl(L,{fontSize:t,letterSpacing:n}),_,p):Zl(L,{fontSize:t,letterSpacing:n})[w]},O=s[0],M=s[1],j=s.length>=2&&O!=null&&M!=null?Wn(M.coordinate-O.coordinate):1,N=TQ(o,j,w);return d==="equidistantPreserveStart"?EQ(j,N,S,s,u):d==="equidistantPreserveEnd"?jQ(j,N,S,s,u):(d==="preserveStart"||d==="preserveStartEnd"?x=DQ(j,N,S,s,u,d==="preserveStartEnd"):x=CQ(j,N,S,s,u),x.filter(k=>k.isShow))}var PQ=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:s=0,tickMargin:o=0}=e,u=0;if(t){Array.from(t).forEach(m=>{if(m){var p=m.getBoundingClientRect();p.width>u&&(u=p.width)}});var f=n?n.getBoundingClientRect().width:0,d=s+o,h=u+d+f+(n?r:0);return Math.round(h)}return 0},RQ={xAxis:{},yAxis:{}},T5=Qt({name:"renderedTicks",initialState:RQ,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:s}=t.payload;e[n][r]=s},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:LQ,removeRenderedTicks:zQ}=T5.actions,IQ=T5.reducer,BQ=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function UQ(e,t){if(e==null)return{};var n,r,s=VQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{if(r==null||n==null)return _o;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return s(LQ({ticks:o,axisId:r,axisType:n})),()=>{s(zQ({axisId:r,axisType:n}))}},[s,t,r,n]),null}var ZQ=A.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:s,stroke:o,tickFormatter:u,unit:f,padding:d,tickTextProps:h,orientation:m,mirror:p,x:v,y:x,width:w,height:_,tickSize:S,tickMargin:O,fontSize:M,letterSpacing:j,getTicksConfig:N,events:k,axisType:C,axisId:L}=e,I=_x(ot(ot({},N),{},{ticks:n}),M,j),Y=Nr(N),te=Y0(r),ie=l5(Y.textAnchor)?Y.textAnchor:XQ(m,p),K=YQ(m,p),be={};typeof s=="object"&&(be=s);var pe=ot(ot({},Y),{},{fill:"none"},be),xe=I.map(ne=>ot({entry:ne},KQ(ne,v,x,w,_,m,S,p,O))),V=xe.map(ne=>{var{entry:le,line:ue}=ne;return A.createElement(hr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(le.value,"-").concat(le.coordinate,"-").concat(le.tickCoord)},s&&A.createElement("line",es({},pe,ue,{className:et("recharts-cartesian-axis-tick-line",co(s,"className"))})))}),Q=xe.map((ne,le)=>{var ue,P,{entry:H,tick:ae}=ne,se=ot(ot(ot(ot({verticalAnchor:K},Y),{},{textAnchor:ie,stroke:"none",fill:o},ae),{},{index:le,payload:H,visibleTicksCount:I.length,tickFormatter:u,padding:d},h),{},{angle:(ue=(P=h?.angle)!==null&&P!==void 0?P:Y.angle)!==null&&ue!==void 0?ue:0}),Z=ot(ot({},se),te);return A.createElement(hr,es({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(H.value,"-").concat(H.coordinate,"-").concat(H.tickCoord)},_k(k,H,le)),r&&A.createElement(GQ,{option:r,tickProps:Z,value:"".concat(typeof u=="function"?u(H.value,le):H.value).concat(f||"")}))});return A.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(C,"-ticks")},A.createElement(WQ,{ticks:I,axisId:L,axisType:C}),Q.length>0&&A.createElement(ca,{zIndex:pn.label},A.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(C,"-tick-labels"),ref:t},Q)),V.length>0&&A.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(C,"-tick-lines")},V))}),QQ=A.forwardRef((e,t)=>{var{axisLine:n,width:r,height:s,className:o,hide:u,ticks:f,axisType:d,axisId:h}=e,m=UQ(e,BQ),[p,v]=A.useState(""),[x,w]=A.useState(""),_=A.useRef(null);A.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var O;return PQ({ticks:_.current,label:(O=e.labelRef)===null||O===void 0?void 0:O.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var S=A.useCallback(O=>{if(O){var M=O.getElementsByClassName("recharts-cartesian-axis-tick-value");_.current=M;var j=M[0];if(j){var N=window.getComputedStyle(j),k=N.fontSize,C=N.letterSpacing;(k!==p||C!==x)&&(v(k),w(C))}}},[p,x]);return u||r!=null&&r<=0||s!=null&&s<=0?null:A.createElement(ca,{zIndex:e.zIndex},A.createElement(hr,{className:et("recharts-cartesian-axis",o)},A.createElement(HQ,{x:e.x,y:e.y,width:r,height:s,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Nr(e)}),A.createElement(ZQ,{ref:S,axisType:d,events:m,fontSize:p,getTicksConfig:e,height:e.height,letterSpacing:x,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:f,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),A.createElement(XW,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},A.createElement(rZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),Sx=A.forwardRef((e,t)=>{var n=vn(e,ii);return A.createElement(QQ,es({},n,{ref:t}))});Sx.displayName="CartesianAxis";var JQ=["x1","y1","x2","y2","key"],eJ=["offset"],tJ=["xAxisId","yAxisId"],nJ=["xAxisId","yAxisId"];function Dj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:s,width:o,height:u,ry:f}=e;return A.createElement("rect",{x:r,y:s,ry:f,width:o,height:u,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function O5(e){var{option:t,lineItemProps:n}=e,r;if(A.isValidElement(t))r=A.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var s,{x1:o,y1:u,x2:f,y2:d,key:h}=n,m=Vd(n,JQ),p=(s=Nr(m))!==null&&s!==void 0?s:{},{offset:v}=p,x=Vd(p,eJ);r=A.createElement("line",$a({},x,{x1:o,y1:u,x2:f,y2:d,fill:"none",key:h}))}return r}function lJ(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:s}=e;if(!r||!s||!s.length)return null;var{xAxisId:o,yAxisId:u}=e,f=Vd(e,tJ),d=s.map((h,m)=>{var p=Wt(Wt({},f),{},{x1:t,y1:h,x2:t+n,y2:h,key:"line-".concat(m),index:m});return A.createElement(O5,{key:"line-".concat(m),option:r,lineItemProps:p})});return A.createElement("g",{className:"recharts-cartesian-grid-horizontal"},d)}function uJ(e){var{y:t,height:n,vertical:r=!0,verticalPoints:s}=e;if(!r||!s||!s.length)return null;var{xAxisId:o,yAxisId:u}=e,f=Vd(e,nJ),d=s.map((h,m)=>{var p=Wt(Wt({},f),{},{x1:h,y1:t,x2:h,y2:t+n,key:"line-".concat(m),index:m});return A.createElement(O5,{option:r,lineItemProps:p,key:"line-".concat(m)})});return A.createElement("g",{className:"recharts-cartesian-grid-vertical"},d)}function cJ(e){var{horizontalFill:t,fillOpacity:n,x:r,y:s,width:o,height:u,horizontalPoints:f,horizontal:d=!0}=e;if(!d||!t||!t.length||f==null)return null;var h=f.map(p=>Math.round(p+s-s)).sort((p,v)=>p-v);s!==h[0]&&h.unshift(0);var m=h.map((p,v)=>{var x=h[v+1],w=x==null,_=w?s+u-p:x-p;if(_<=0)return null;var S=v%t.length;return A.createElement("rect",{key:"react-".concat(v),y:p,x:r,height:_,width:o,stroke:"none",fill:t[S],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function fJ(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:s,y:o,width:u,height:f,verticalPoints:d}=e;if(!t||!n||!n.length)return null;var h=d.map(p=>Math.round(p+s-s)).sort((p,v)=>p-v);s!==h[0]&&h.unshift(0);var m=h.map((p,v)=>{var x=h[v+1],w=x==null,_=w?s+u-p:x-p;if(_<=0)return null;var S=v%n.length;return A.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:_,height:f,stroke:"none",fill:n[S],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var dJ=(e,t)=>{var{xAxis:n,width:r,height:s,offset:o}=e;return dC(_x(Wt(Wt(Wt({},ii),n),{},{ticks:hC(n),viewBox:{x:0,y:0,width:r,height:s}})),o.left,o.left+o.width,t)},hJ=(e,t)=>{var{yAxis:n,width:r,height:s,offset:o}=e;return dC(_x(Wt(Wt(Wt({},ii),n),{},{ticks:hC(n),viewBox:{x:0,y:0,width:r,height:s}})),o.top,o.top+o.height,t)},mJ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:pn.grid};function E5(e){var t=_C(),n=SC(),r=wC(),s=Wt(Wt({},vn(e,mJ)),{},{x:ye(e.x)?e.x:r.left,y:ye(e.y)?e.y:r.top,width:ye(e.width)?e.width:r.width,height:ye(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:u,x:f,y:d,width:h,height:m,syncWithTicks:p,horizontalValues:v,verticalValues:x}=s,w=Jt(),_=ve(Y=>DE(Y,"xAxis",o,w)),S=ve(Y=>DE(Y,"yAxis",u,w));if(!Cr(h)||!Cr(m)||!ye(f)||!ye(d))return null;var O=s.verticalCoordinatesGenerator||dJ,M=s.horizontalCoordinatesGenerator||hJ,{horizontalPoints:j,verticalPoints:N}=s;if((!j||!j.length)&&typeof M=="function"){var k=v&&v.length,C=M({yAxis:S?Wt(Wt({},S),{},{ticks:k?v:S.ticks}):void 0,width:t??h,height:n??m,offset:r},k?!0:p);hd(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(j=C)}if((!N||!N.length)&&typeof O=="function"){var L=x&&x.length,I=O({xAxis:_?Wt(Wt({},_),{},{ticks:L?x:_.ticks}):void 0,width:t??h,height:n??m,offset:r},L?!0:p);hd(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof I,"]")),Array.isArray(I)&&(N=I)}return A.createElement(ca,{zIndex:s.zIndex},A.createElement("g",{className:"recharts-cartesian-grid"},A.createElement(oJ,{fill:s.fill,fillOpacity:s.fillOpacity,x:s.x,y:s.y,width:s.width,height:s.height,ry:s.ry}),A.createElement(cJ,$a({},s,{horizontalPoints:j})),A.createElement(fJ,$a({},s,{verticalPoints:N})),A.createElement(lJ,$a({},s,{offset:r,horizontalPoints:j,xAxis:_,yAxis:S})),A.createElement(uJ,$a({},s,{offset:r,verticalPoints:N,xAxis:_,yAxis:S}))))}E5.displayName="CartesianGrid";var pJ={},j5=Qt({name:"errorBars",initialState:pJ,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:s}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?s:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(s=>s.dataKey!==r.dataKey||s.direction!==r.direction))}}}),{addErrorBar:Xne,replaceErrorBar:Yne,removeErrorBar:Gne}=j5.actions,gJ=j5.reducer,yJ=["children"];function vJ(e,t){if(e==null)return{};var n,r,s=bJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r({x:0,y:0,value:0}),errorBarOffset:0},wJ=A.createContext(xJ);function _J(e){var{children:t}=e,n=vJ(e,yJ);return A.createElement(wJ.Provider,{value:n},t)}function M5(e,t){var n,r,s=ve(h=>gi(h,e)),o=ve(h=>yi(h,t)),u=(n=s?.allowDataOverflow)!==null&&n!==void 0?n:wt.allowDataOverflow,f=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:_t.allowDataOverflow,d=u||f;return{needClip:d,needClipX:u,needClipY:f}}function SJ(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,s=w5(),{needClipX:o,needClipY:u,needClip:f}=M5(t,n);if(!f||!s)return null;var{x:d,y:h,width:m,height:p}=s;return A.createElement("clipPath",{id:"clipPath-".concat(r)},A.createElement("rect",{x:o?d:d-m/2,y:u?h:h-p/2,width:o?m:m*2,height:u?p:p*2}))}var AJ=["option","isActive"];function Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var t=1;tED(e,"xAxis",t,u),MJ=(e,t,n,r,s,o,u)=>OD(e,"xAxis",t,u),NJ=(e,t,n,r,s,o,u)=>ED(e,"yAxis",n,u),kJ=(e,t,n,r,s,o,u)=>OD(e,"yAxis",n,u),CJ=(e,t,n,r)=>IX(e,"zAxis",r,!1),DJ=(e,t,n,r,s)=>s,PJ=(e,t,n,r,s,o)=>o,RJ=(e,t,n,r,s,o,u)=>vb(e,void 0,void 0,u),LJ=$([W3,DJ],(e,t)=>e.filter(n=>n.type==="scatter").find(n=>n.id===t)),zJ=$([RJ,jJ,MJ,NJ,kJ,CJ,LJ,PJ],(e,t,n,r,s,o,u,f)=>{var{chartData:d,dataStartIndex:h,dataEndIndex:m}=e;if(u!=null){var p;if(u?.data!=null&&u.data.length>0?p=u.data:p=d?.slice(h,m+1),!(p==null||t==null||r==null||n==null||s==null||n?.length===0||s?.length===0))return ZJ({displayedData:p,xAxis:t,yAxis:r,zAxis:o,scatterSettings:u,xAxisTicks:n,yAxisTicks:s,cells:f})}}),IJ=["id"],BJ=["onMouseEnter","onClick","onMouseLeave"],UJ=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function o0(e,t){if(e==null)return{};var n,r,s=VJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{var{dataKey:t,name:n,fill:r,legendType:s,hide:o}=e;return[{inactive:o,dataKey:t,type:s,color:r,value:mC(n,t),payload:e}]},KJ=A.memo(e=>{var{dataKey:t,points:n,stroke:r,strokeWidth:s,fill:o,name:u,hide:f,tooltipType:d,id:h}=e,m={dataDefinedOnItem:n?.map(p=>p.tooltipPayload),getPosition:p=>{var v;return n==null||(v=n[Number(p)])===null||v===void 0?void 0:v.tooltipPosition},settings:{stroke:r,strokeWidth:s,fill:o,nameKey:void 0,dataKey:t,name:mC(u,t),hide:f,type:d,color:o,unit:"",graphicalItemId:h}};return A.createElement(UZ,{tooltipEntrySettings:m})});function XJ(e){var{points:t,props:n}=e,{line:r,lineType:s,lineJointType:o}=n;if(!r)return null;var u=Nr(n),f=Y0(r),d,h;if(s==="joint")d=t.map(S=>{var O,M;return{x:(O=S.cx)!==null&&O!==void 0?O:null,y:(M=S.cy)!==null&&M!==void 0?M:null}});else if(s==="fitting"){var{xmin:m,xmax:p,a:v,b:x}=k9(t),w=S=>v*S+x;d=[{x:m,y:w(m)},{x:p,y:w(p)}]}var _=yn(yn(yn({},u),{},{fill:"none",stroke:u&&u.fill},f),{},{points:d});return A.isValidElement(r)?h=A.cloneElement(r,_):typeof r=="function"?h=r(_):h=A.createElement(pb,ts({},_,{type:o})),A.createElement(hr,{className:"recharts-scatter-line",key:"recharts-scatter-line"},h)}function YJ(e){var{showLabels:t,points:n,children:r}=e,s=Nu(),o=A.useMemo(()=>n?.map(u=>{var f,d,h={x:(f=u.x)!==null&&f!==void 0?f:0,y:(d=u.y)!==null&&d!==void 0?d:0,width:u.width,height:u.height,lowerWidth:u.width,upperWidth:u.width};return yn(yn({},h),{},{value:void 0,payload:u.payload,viewBox:h,parentViewBox:s,fill:void 0})}),[s,n]);return A.createElement(lZ,{value:t?o:void 0},r)}function GJ(e){var{points:t,allOtherScatterProps:n}=e,{shape:r,activeShape:s,dataKey:o}=n,{id:u}=n,f=o0(n,IJ),d=ve(vu),{onMouseEnter:h,onClick:m,onMouseLeave:p}=n,v=o0(n,BJ),x=zZ(h,o,u),w=IZ(p),_=BZ(m,o,u);if(!F9(t))return null;var S=Nr(f);return A.createElement(A.Fragment,null,A.createElement(XJ,{points:t,props:f}),t.map((O,M)=>{var j=s!=null&&s!==!1,N=j&&d===String(M),k=j&&N?s:r,C=yn(yn(yn({},S),O),{},{index:M,[gC]:String(u)});return A.createElement(ca,{key:"symbol-".concat(O?.cx,"-").concat(O?.cy,"-").concat(O?.size,"-").concat(M),zIndex:N?pn.activeDot:void 0},A.createElement(hr,ts({className:"recharts-scatter-symbol"},_k(v,O,M),{onMouseEnter:x(O,M),onMouseLeave:w(O,M),onClick:_(O,M)}),A.createElement(EJ,ts({option:k,isActive:N},C))))}))}function WJ(e){var{previousPointsRef:t,props:n}=e,{points:r,isAnimationActive:s,animationBegin:o,animationDuration:u,animationEasing:f}=n,d=t.current,h=yb(n,"recharts-scatter-"),[m,p]=A.useState(!1),v=A.useCallback(()=>{p(!1)},[]),x=A.useCallback(()=>{p(!0)},[]),w=!m;return A.createElement(YJ,{showLabels:w,points:r},n.children,A.createElement(gb,{animationId:h,begin:o,duration:u,isActive:s,easing:f,onAnimationEnd:v,onAnimationStart:x,key:h},_=>{var S=_===1?r:r?.map((O,M)=>{var j=d&&d[M];return j?yn(yn({},O),{},{cx:O.cx==null?void 0:Nn(j.cx,O.cx,_),cy:O.cy==null?void 0:Nn(j.cy,O.cy,_),size:Nn(j.size,O.size,_)}):yn(yn({},O),{},{size:Nn(0,O.size,_)})});return _>0&&(t.current=S),A.createElement(hr,null,A.createElement(GJ,{points:S,allOtherScatterProps:n,showLabels:w}))}),A.createElement(fZ,{label:n.label}))}function ZJ(e){var{displayedData:t,xAxis:n,yAxis:r,zAxis:s,scatterSettings:o,xAxisTicks:u,yAxisTicks:f,cells:d}=e,h=dt(n.dataKey)?o.dataKey:n.dataKey,m=dt(r.dataKey)?o.dataKey:r.dataKey,p=s&&s.dataKey,v=s?s.range:X3.range,x=v&&v[0],w=n.scale.bandwidth?n.scale.bandwidth():0,_=r.scale.bandwidth?r.scale.bandwidth():0;return t.map((S,O)=>{var M=Ot(S,h),j=Ot(S,m),N=!dt(p)&&Ot(S,p)||"-",k=[{name:dt(n.dataKey)?o.name:n.name||String(n.dataKey),unit:n.unit||"",value:M,payload:S,dataKey:h,type:o.tooltipType,graphicalItemId:o.id},{name:dt(r.dataKey)?o.name:r.name||String(r.dataKey),unit:r.unit||"",value:j,payload:S,dataKey:m,type:o.tooltipType,graphicalItemId:o.id}];N!=="-"&&s!=null&&k.push({name:s.name||s.dataKey,unit:s.unit||"",value:N,payload:S,dataKey:p,type:o.tooltipType,graphicalItemId:o.id});var C=jT({axis:n,ticks:u,bandSize:w,entry:S,index:O,dataKey:h}),L=jT({axis:r,ticks:f,bandSize:_,entry:S,index:O,dataKey:m}),I=N!=="-"&&s!=null?s.scale.map(N):x,Y=I==null?0:Math.sqrt(Math.max(I,0)/Math.PI);return yn(yn({},S),{},{cx:C,cy:L,x:C==null?void 0:C-Y,y:L==null?void 0:L-Y,width:2*Y,height:2*Y,size:I,node:{x:M,y:j,z:N},tooltipPayload:k,tooltipPosition:{x:C,y:L},payload:S},d&&d[O]&&d[O].props)})}var QJ=(e,t,n)=>({x:e.cx,y:e.cy,value:Number(n==="x"?e.node.x:e.node.y),errorVal:Ot(e,t)});function JJ(e){var{hide:t,points:n,className:r,needClip:s,xAxisId:o,yAxisId:u,id:f}=e,d=A.useRef(null);if(t)return null;var h=et("recharts-scatter",r),m=f;return A.createElement(ca,{zIndex:e.zIndex},A.createElement(hr,{className:h,clipPath:s?"url(#clipPath-".concat(m,")"):void 0,id:f},s&&A.createElement("defs",null,A.createElement(SJ,{clipPathId:m,xAxisId:o,yAxisId:u})),A.createElement(_J,{xAxisId:o,yAxisId:u,data:n,dataPointFormatter:QJ,errorBarOffset:0},A.createElement(hr,{key:"recharts-scatter-symbols"},A.createElement(WJ,{props:e,previousPointsRef:d})))))}var N5={xAxisId:0,yAxisId:0,zAxisId:0,label:!1,line:!1,legendType:"circle",lineType:"joint",lineJointType:"linear",shape:"circle",hide:!1,isAnimationActive:"auto",animationBegin:0,animationDuration:400,animationEasing:"linear",zIndex:pn.scatter};function eee(e){var t=vn(e,N5),{animationBegin:n,animationDuration:r,animationEasing:s,hide:o,isAnimationActive:u,legendType:f,lineJointType:d,lineType:h,shape:m,xAxisId:p,yAxisId:v,zAxisId:x}=t,w=o0(t,UJ),{needClip:_}=M5(p,v),S=A.useMemo(()=>vZ(e.children,bx),[e.children]),O=Jt(),M=ve(j=>zJ(j,p,v,x,e.id,S,O));return _==null||M==null?null:A.createElement(A.Fragment,null,A.createElement(KJ,{dataKey:e.dataKey,points:M,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:e.id}),A.createElement(JJ,ts({},w,{xAxisId:p,yAxisId:v,zAxisId:x,lineType:h,lineJointType:d,legendType:f,shape:m,hide:o,isAnimationActive:u,animationBegin:n,animationDuration:r,animationEasing:s,points:M,needClip:_})))}function tee(e){var t=vn(e,N5),n=Jt();return A.createElement(KZ,{id:t.id,type:"scatter"},r=>A.createElement(A.Fragment,null,A.createElement(VZ,{legendPayload:HJ(t)}),A.createElement(JZ,{type:"scatter",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:t.zAxisId,dataKey:t.dataKey,hide:t.hide,name:t.name,tooltipType:t.tooltipType,isPanorama:n}),A.createElement(eee,ts({},t,{id:r}))))}var k5=A.memo(tee,mh);k5.displayName="Scatter";var nee=["domain","range"],ree=["domain","range"];function Rj(e,t){if(e==null)return{};var n,r,s=iee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{if(u!=null)return Ij(Ij({},o),{},{type:u})},[o,u]);return A.useLayoutEffect(()=>{f!=null&&(n.current===null?t(iQ(f)):n.current!==f&&t(aQ({prev:n.current,next:f})),n.current=f)},[f,t]),A.useLayoutEffect(()=>()=>{n.current&&(t(sQ(n.current)),n.current=null)},[t]),null}var hee=e=>{var{xAxisId:t,className:n}=e,r=ve(yC),s=Jt(),o="xAxis",u=ve(O=>TD(O,o,t,s)),f=ve(O=>AX(O,t)),d=ve(O=>NX(O,t)),h=ve(O=>H3(O,t));if(f==null||d==null||h==null)return null;var{dangerouslySetInnerHTML:m,ticks:p,scale:v}=e,x=u0(e,see),{id:w,scale:_}=h,S=u0(h,oee);return A.createElement(Sx,l0({},x,S,{x:d.x,y:d.y,width:f.width,height:f.height,className:et("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:u,axisType:o,axisId:t}))},mee={allowDataOverflow:wt.allowDataOverflow,allowDecimals:wt.allowDecimals,allowDuplicatedCategory:wt.allowDuplicatedCategory,angle:wt.angle,axisLine:ii.axisLine,height:wt.height,hide:!1,includeHidden:wt.includeHidden,interval:wt.interval,label:!1,minTickGap:wt.minTickGap,mirror:wt.mirror,orientation:wt.orientation,padding:wt.padding,reversed:wt.reversed,scale:wt.scale,tick:wt.tick,tickCount:wt.tickCount,tickLine:ii.tickLine,tickSize:ii.tickSize,type:wt.type,niceTicks:wt.niceTicks,xAxisId:0},pee=e=>{var t=vn(e,mee);return A.createElement(A.Fragment,null,A.createElement(dee,{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}),A.createElement(hee,t))},D5=A.memo(pee,C5);D5.displayName="XAxis";var gee=["type"],yee=["dangerouslySetInnerHTML","ticks","scale"],vee=["id","scale"];function c0(){return c0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(u!=null)return Uj(Uj({},o),{},{type:u})},[u,o]);return A.useLayoutEffect(()=>{f!=null&&(n.current===null?t(oQ(f)):n.current!==f&&t(lQ({prev:n.current,next:f})),n.current=f)},[f,t]),A.useLayoutEffect(()=>()=>{n.current&&(t(uQ(n.current)),n.current=null)},[t]),null}function Aee(e){var{yAxisId:t,className:n,width:r,label:s}=e,o=A.useRef(null),u=A.useRef(null),f=ve(yC),d=Jt(),h=it(),m="yAxis",p=ve(C=>DX(C,t)),v=ve(C=>CX(C,t)),x=ve(C=>TD(C,m,t,d)),w=ve(C=>K3(C,t));if(A.useLayoutEffect(()=>{if(!(r!=="auto"||!p||wx(s)||A.isValidElement(s)||w==null)){var C=o.current;if(C){var L=C.getCalculatedWidth();Math.round(p.width)!==Math.round(L)&&h(cQ({id:t,width:L}))}}},[x,p,h,s,t,r,w]),p==null||v==null||w==null)return null;var{dangerouslySetInnerHTML:_,ticks:S,scale:O}=e,M=f0(e,yee),{id:j,scale:N}=w,k=f0(w,vee);return A.createElement(Sx,c0({},M,k,{ref:o,labelRef:u,x:v.x,y:v.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:p.width,height:p.height,className:et("recharts-".concat(m," ").concat(m),n),viewBox:f,ticks:x,axisType:m,axisId:t}))}var Tee={allowDataOverflow:_t.allowDataOverflow,allowDecimals:_t.allowDecimals,allowDuplicatedCategory:_t.allowDuplicatedCategory,angle:_t.angle,axisLine:ii.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:ii.tickLine,tickSize:ii.tickSize,type:_t.type,niceTicks:_t.niceTicks,width:_t.width,yAxisId:0},Oee=e=>{var t=vn(e,Tee);return A.createElement(A.Fragment,null,A.createElement(See,{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}),A.createElement(Aee,t))},P5=A.memo(Oee,C5);P5.displayName="YAxis";var Eee=(e,t)=>t,Ax=$([Eee,ht,o3,Dt,FD,vi,rG,Xt],cG);function jee(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Tx(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(jee(e)){var s=e.currentTarget.getBBox();n=s.width>0?t.width/s.width:1,r=s.height>0?t.height/s.height:1}else{var o=e.currentTarget;n=o.offsetWidth>0?t.width/o.offsetWidth:1,r=o.offsetHeight>0?t.height/o.offsetHeight:1}var u=(f,d)=>({relativeX:Math.round((f-t.left)/n),relativeY:Math.round((d-t.top)/r)});return"touches"in e?Array.from(e.touches).map(f=>u(f.clientX,f.clientY)):u(e.clientX,e.clientY)}var R5=Pn("mouseClick"),L5=ju();L5.startListening({actionCreator:R5,effect:(e,t)=>{var n=e.payload,r=Ax(t.getState(),Tx(n));r?.activeIndex!=null&&t.dispatch(WX({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var d0=Pn("mouseMove"),z5=ju(),Xs=null,ka=null,Fy=null;z5.startListening({actionCreator:d0,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:s,throttledEvents:o}=r.eventSettings,u=o==="all"||o?.includes("mousemove");Xs!==null&&(cancelAnimationFrame(Xs),Xs=null),ka!==null&&(typeof s!="number"||!u)&&(clearTimeout(ka),ka=null),Fy=Tx(n);var f=()=>{var d=t.getState(),h=ux(d,d.tooltip.settings.shared);if(!Fy){Xs=null,ka=null;return}if(h==="axis"){var m=Ax(d,Fy);m?.activeIndex!=null?t.dispatch(RD({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(PD())}Xs=null,ka=null};if(!u){f();return}s==="raf"?Xs=requestAnimationFrame(f):typeof s=="number"&&ka===null&&(ka=setTimeout(f,s))}});function Mee(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 Vj={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},I5=Qt({name:"rootProps",initialState:Vj,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:Vj.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}}}),Nee=I5.reducer,{updateOptions:kee}=I5.actions,Cee=null,Dee={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)},B5=Qt({name:"polarOptions",initialState:Cee,reducers:Dee}),{updatePolarOptions:Wne}=B5.actions,Pee=B5.reducer,U5=Pn("keyDown"),V5=Pn("focus"),q5=Pn("blur"),Nh=ju(),Ys=null,Ca=null,Mf=null;Nh.startListening({actionCreator:U5,effect:(e,t)=>{Mf=e.payload,Ys!==null&&(cancelAnimationFrame(Ys),Ys=null);var n=t.getState(),{throttleDelay:r,throttledEvents:s}=n.eventSettings,o=s==="all"||s.includes("keydown");Ca!==null&&(typeof r!="number"||!o)&&(clearTimeout(Ca),Ca=null);var u=()=>{try{var f=t.getState(),d=f.rootProps.accessibilityLayer!==!1;if(!d)return;var{keyboardInteraction:h}=f.tooltip,m=Mf;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var p=cx(h,Co(f),qu(f),Fu(f)),v=p==null?-1:Number(p);if(!Number.isFinite(v)||v<0)return;var x=vi(f);if(m==="Enter"){var w=zd(f,"axis","hover",String(h.index));t.dispatch(Ld({active:!h.active,activeIndex:h.index,activeCoordinate:w}));return}var _=BX(f),S=_==="left-to-right"?1:-1,O=m==="ArrowRight"?1:-1,M=v+O*S;if(x==null||M>=x.length||M<0)return;var j=zd(f,"axis","hover",String(M));t.dispatch(Ld({active:!0,activeIndex:M.toString(),activeCoordinate:j}))}finally{Ys=null,Ca=null}};if(!o){u();return}r==="raf"?Ys=requestAnimationFrame(u):typeof r=="number"&&Ca===null&&(u(),Mf=null,Ca=setTimeout(()=>{Mf?u():(Ca=null,Ys=null)},r))}});Nh.startListening({actionCreator:V5,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:s}=n.tooltip;if(!s.active&&s.index==null){var o="0",u=zd(n,"axis","hover",String(o));t.dispatch(Ld({active:!0,activeIndex:o,activeCoordinate:u}))}}}});Nh.startListening({actionCreator:q5,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:s}=n.tooltip;s.active&&t.dispatch(Ld({active:!1,activeIndex:s.index,activeCoordinate:s.coordinate}))}}});function $5(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var s=Reflect.get(n,r);return typeof s=="function"?s.bind(n):s}})}var Yn=Pn("externalEvent"),F5=ju(),Nf=new Map,Il=new Map,Hy=new Map;F5.startListening({actionCreator:Yn,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var s=r.type,o=$5(r);Hy.set(s,{handler:n,reactEvent:o});var u=Nf.get(s);u!==void 0&&(cancelAnimationFrame(u),Nf.delete(s));var f=t.getState(),{throttleDelay:d,throttledEvents:h}=f.eventSettings,m=h,p=m==="all"||m?.includes(s),v=Il.get(s);v!==void 0&&(typeof d!="number"||!p)&&(clearTimeout(v),Il.delete(s));var x=()=>{var S=Hy.get(s);try{if(!S)return;var{handler:O,reactEvent:M}=S,j=t.getState(),N={activeCoordinate:qY(j),activeDataKey:BY(j),activeIndex:vu(j),activeLabel:XD(j),activeTooltipIndex:vu(j),isTooltipActive:$Y(j)};O&&O(N,M)}finally{Nf.delete(s),Il.delete(s),Hy.delete(s)}};if(!p){x();return}if(d==="raf"){var w=requestAnimationFrame(x);Nf.set(s,w)}else if(typeof d=="number"){if(!Il.has(s)){x();var _=setTimeout(x,d);Il.set(s,_)}}else x()}}});var Ree=$([No],e=>e.tooltipItemPayloads),Lee=$([Ree,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(o=>o.settings.graphicalItemId===n);if(r!=null){var{getPosition:s}=r;if(s!=null)return s(t)}}}),H5=Pn("touchMove"),K5=ju(),Da=null,Hi=null,qj=null,Bl=null;K5.startListening({actionCreator:H5,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){Bl=$5(n);var r=t.getState(),{throttleDelay:s,throttledEvents:o}=r.eventSettings,u=o==="all"||o.includes("touchmove");Da!==null&&(cancelAnimationFrame(Da),Da=null),Hi!==null&&(typeof s!="number"||!u)&&(clearTimeout(Hi),Hi=null),qj=Array.from(n.touches).map(d=>Tx({clientX:d.clientX,clientY:d.clientY,currentTarget:n.currentTarget}));var f=()=>{if(Bl!=null){var d=t.getState(),h=ux(d,d.tooltip.settings.shared);if(h==="axis"){var m,p=(m=qj)===null||m===void 0?void 0:m[0];if(p==null){Da=null,Hi=null;return}var v=Ax(d,p);v?.activeIndex!=null&&t.dispatch(RD({activeIndex:v.activeIndex,activeDataKey:void 0,activeCoordinate:v.activeCoordinate}))}else if(h==="item"){var x,w=Bl.touches[0];if(document.elementFromPoint==null||w==null)return;var _=document.elementFromPoint(w.clientX,w.clientY);if(!_||!_.getAttribute)return;var S=_.getAttribute(iV),O=(x=_.getAttribute(gC))!==null&&x!==void 0?x:void 0,M=ko(d).find(k=>k.id===O);if(S==null||M==null||O==null)return;var{dataKey:j}=M,N=Lee(d,S,O);t.dispatch(DD({activeDataKey:j,activeIndex:S,activeCoordinate:N,activeGraphicalItemId:O}))}Da=null,Hi=null}};if(!u){f();return}s==="raf"?Da=requestAnimationFrame(f):typeof s=="number"&&Hi===null&&(f(),Bl=null,Hi=setTimeout(()=>{Bl?f():(Hi=null,Da=null)},s))}}});var X5={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},Y5=Qt({name:"eventSettings",initialState:X5,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:zee}=Y5.actions,Iee=Y5.reducer,Bee=zk({brush:yQ,cartesianAxis:fQ,chartData:qG,errorBars:gJ,eventSettings:Iee,graphicalItems:ZZ,layout:$U,legend:WV,options:zG,polarAxis:hZ,polarOptions:Pee,referenceElements:wQ,renderedTicks:IQ,rootProps:Nee,tooltip:ZX,zIndex:AG}),Uee=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return mU({reducer:Bee,preloadedState:t,middleware:r=>{var s;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((s="es6")!==null&&s!==void 0?s:"")}).concat([L5.middleware,z5.middleware,Nh.middleware,F5.middleware,K5.middleware])},enhancers:r=>{var s=r;return typeof r=="function"&&(s=r()),s.concat(Qk({type:"raf"}))},devTools:{serialize:{replacer:Mee},name:"recharts-".concat(n)}})};function Vee(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,s=Jt(),o=A.useRef(null);if(s)return n;o.current==null&&(o.current=Uee(t,r));var u=ib;return A.createElement(mq,{context:u,store:o.current},n)}function qee(e){var{layout:t,margin:n}=e,r=it(),s=Jt();return A.useEffect(()=>{s||(r(UU(t)),r(BU(n)))},[r,s,t,n]),null}var $ee=A.memo(qee,mh);function Fee(e){var t=it();return A.useEffect(()=>{t(kee(e))},[t,e]),null}var Hee=e=>{var t=it();return A.useEffect(()=>{t(zee(e))},[t,e]),null},Kee=A.memo(Hee,mh);function $j(e){var{zIndex:t,isPanorama:n}=e,r=A.useRef(null),s=it();return A.useLayoutEffect(()=>(r.current&&s(_G({zIndex:t,element:r.current,isPanorama:n})),()=>{s(SG({zIndex:t,isPanorama:n}))}),[s,t,n]),A.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function Fj(e){var{children:t,isPanorama:n}=e,r=ve(dG);if(!r||r.length===0)return t;var s=r.filter(u=>u<0),o=r.filter(u=>u>0);return A.createElement(A.Fragment,null,s.map(u=>A.createElement($j,{key:u,zIndex:u,isPanorama:n})),t,o.map(u=>A.createElement($j,{key:u,zIndex:u,isPanorama:n})))}var Xee=["children"];function Yee(e,t){if(e==null)return{};var n,r,s=Gee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{var n=_C(),r=SC(),s=PC();if(!Cr(n)||!Cr(r))return null;var{children:o,otherAttributes:u,title:f,desc:d}=e,h,m;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=s?0:void 0,typeof u.role=="string"?m=u.role:m=s?"application":void 0),A.createElement(ek,qd({},u,{title:f,desc:d,role:m,tabIndex:h,width:n,height:r,style:Wee,ref:t}),o)}),Qee=e=>{var{children:t}=e,n=ve(ch);if(!n)return null;var{width:r,height:s,y:o,x:u}=n;return A.createElement(ek,{width:r,height:s,x:u,y:o},t)},Hj=A.forwardRef((e,t)=>{var{children:n}=e,r=Yee(e,Xee),s=Jt();return s?A.createElement(Qee,null,A.createElement(Fj,{isPanorama:!0},n)):A.createElement(Zee,qd({ref:t},r),A.createElement(Fj,{isPanorama:!1},n))});function Jee(){var e=it(),[t,n]=A.useState(null),r=ve(rV);return A.useEffect(()=>{if(t!=null){var s=t.getBoundingClientRect(),o=s.width/t.offsetWidth;Le(o)&&o!==r&&e(qU(o))}},[t,e,r]),n}function Kj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function ete(e){for(var t=1;t(ZG(),null);function $d(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var ate=A.forwardRef((e,t)=>{var n,r,s=A.useRef(null),[o,u]=A.useState({containerWidth:$d((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:$d((r=e.style)===null||r===void 0?void 0:r.height)}),f=A.useCallback((h,m)=>{u(p=>{var v=Math.round(h),x=Math.round(m);return p.containerWidth===v&&p.containerHeight===x?p:{containerWidth:v,containerHeight:x}})},[]),d=A.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null&&typeof ResizeObserver<"u"){var{width:m,height:p}=h.getBoundingClientRect();f(m,p);var v=w=>{var _=w[0];if(_!=null){var{width:S,height:O}=_.contentRect;f(S,O)}},x=new ResizeObserver(v);x.observe(h),s.current=x}},[t,f]);return A.useEffect(()=>()=>{var h=s.current;h?.disconnect()},[f]),A.createElement(A.Fragment,null,A.createElement(Cu,{width:o.containerWidth,height:o.containerHeight}),A.createElement("div",ta({ref:d},e)))}),ste=A.forwardRef((e,t)=>{var{width:n,height:r}=e,[s,o]=A.useState({containerWidth:$d(n),containerHeight:$d(r)}),u=A.useCallback((d,h)=>{o(m=>{var p=Math.round(d),v=Math.round(h);return m.containerWidth===p&&m.containerHeight===v?m:{containerWidth:p,containerHeight:v}})},[]),f=A.useCallback(d=>{if(typeof t=="function"&&t(d),d!=null){var{width:h,height:m}=d.getBoundingClientRect();u(h,m)}},[t,u]);return A.createElement(A.Fragment,null,A.createElement(Cu,{width:s.containerWidth,height:s.containerHeight}),A.createElement("div",ta({ref:f},e)))}),ote=A.forwardRef((e,t)=>{var{width:n,height:r}=e;return A.createElement(A.Fragment,null,A.createElement(Cu,{width:n,height:r}),A.createElement("div",ta({ref:t},e)))}),lte=A.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?A.createElement(ste,ta({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?A.createElement(ote,ta({},e,{width:n,height:r,ref:t})):A.createElement(A.Fragment,null,A.createElement(Cu,{width:n,height:r}),A.createElement("div",ta({ref:t},e)))});function ute(e){return e?ate:lte}var cte=A.forwardRef((e,t)=>{var{children:n,className:r,height:s,onClick:o,onContextMenu:u,onDoubleClick:f,onMouseDown:d,onMouseEnter:h,onMouseLeave:m,onMouseMove:p,onMouseUp:v,onTouchEnd:x,onTouchMove:w,onTouchStart:_,style:S,width:O,responsive:M,dispatchTouchEvents:j=!0}=e,N=A.useRef(null),k=it(),[C,L]=A.useState(null),[I,Y]=A.useState(null),te=Jee(),ie=fb(),K=ie?.width>0?ie.width:O,be=ie?.height>0?ie.height:s,pe=A.useCallback(re=>{te(re),typeof t=="function"&&t(re),L(re),Y(re),re!=null&&(N.current=re)},[te,t,L,Y]),xe=A.useCallback(re=>{k(R5(re)),k(Yn({handler:o,reactEvent:re}))},[k,o]),V=A.useCallback(re=>{k(d0(re)),k(Yn({handler:h,reactEvent:re}))},[k,h]),Q=A.useCallback(re=>{k(PD()),k(Yn({handler:m,reactEvent:re}))},[k,m]),ne=A.useCallback(re=>{k(d0(re)),k(Yn({handler:p,reactEvent:re}))},[k,p]),le=A.useCallback(()=>{k(V5())},[k]),ue=A.useCallback(()=>{k(q5())},[k]),P=A.useCallback(re=>{k(U5(re.key))},[k]),H=A.useCallback(re=>{k(Yn({handler:u,reactEvent:re}))},[k,u]),ae=A.useCallback(re=>{k(Yn({handler:f,reactEvent:re}))},[k,f]),se=A.useCallback(re=>{k(Yn({handler:d,reactEvent:re}))},[k,d]),Z=A.useCallback(re=>{k(Yn({handler:v,reactEvent:re}))},[k,v]),oe=A.useCallback(re=>{k(Yn({handler:_,reactEvent:re}))},[k,_]),he=A.useCallback(re=>{j&&k(H5(re)),k(Yn({handler:w,reactEvent:re}))},[k,j,w]),_e=A.useCallback(re=>{k(Yn({handler:x,reactEvent:re}))},[k,x]),J=ute(M);return A.createElement(e5.Provider,{value:C},A.createElement(HB.Provider,{value:I},A.createElement(J,{width:K??S?.width,height:be??S?.height,className:et("recharts-wrapper",r),style:ete({position:"relative",cursor:"default",width:K,height:be},S),onClick:xe,onContextMenu:H,onDoubleClick:ae,onFocus:le,onBlur:ue,onKeyDown:P,onMouseDown:se,onMouseEnter:V,onMouseLeave:Q,onMouseMove:ne,onMouseUp:Z,onTouchEnd:_e,onTouchMove:he,onTouchStart:oe,ref:pe},A.createElement(ite,null),n)))}),fte=["width","height","responsive","children","className","style","compact","title","desc"];function dte(e,t){if(e==null)return{};var n,r,s=hte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{var{width:n,height:r,responsive:s,children:o,className:u,style:f,compact:d,title:h,desc:m}=e,p=dte(e,fte),v=Nr(p);return d?A.createElement(A.Fragment,null,A.createElement(Cu,{width:n,height:r}),A.createElement(Hj,{otherAttributes:v,title:h,desc:m},o)):A.createElement(cte,{className:u,style:f,width:n,height:r,responsive:s??!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},A.createElement(Hj,{otherAttributes:v,title:h,desc:m,ref:t},A.createElement(SQ,null,o)))});function h0(){return h0=Object.assign?Object.assign.bind():function(e){for(var t=1;tA.createElement(wte,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:_te,tooltipPayloadSearcher:RG,categoricalChartProps:e,ref:t}));const Ox={bg:{primary:"#0B0D17",secondary:"#12152A",tertiary:"#1A1F3D",hover:"#222850"},accent:{purple:"#8B5CF6",purpleLight:"#A78BFA",purpleDim:"#6D28D9",blue:"#38BDF8",blueLight:"#7DD3FC",blueDim:"#0284C7",cyan:"#06B6D4",amber:"#F59E0B"},text:{primary:"#F1F5F9",secondary:"#94A3B8",muted:"#64748B"},heatmap:{bad:"#EF4444",badBg:"#7F1D1D",mid:"#EAB308",midBg:"#713F12",good:"#22C55E",goodBg:"#14532D"}},Ate={bg:{primary:"#FFFFFF",secondary:"#F8FAFC",tertiary:"#F1F5F9",hover:"#E2E8F0"},accent:{purple:"#7C3AED",purpleLight:"#6D28D9",purpleDim:"#5B21B6",blue:"#0284C7",blueLight:"#0369A1",blueDim:"#075985",cyan:"#0891B2",amber:"#D97706"},text:{primary:"#0F172A",secondary:"#334155",muted:"#64748B"},heatmap:{bad:"#DC2626",badBg:"#FEE2E2",mid:"#CA8A04",midBg:"#FEF9C3",good:"#16A34A",goodBg:"#DCFCE7"}},Tte={dark:Ox,light:Ate},Ex=A.createContext({mode:"dark",colors:Ox});function jx(){return A.useContext(Ex).colors}function Ote(){return A.useContext(Ex).mode}function kf(e,t,n,r,s=!1,o){const u=o??Ox,f=n-t;let d=f===0?.5:(e-t)/f;s&&(d=1-d);const h=.1+d*.55;return{bg:Ete(r,h),text:u.text.primary}}function Ete(e,t){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),s=parseInt(e.slice(5,7),16);return`rgba(${n}, ${r}, ${s}, ${t.toFixed(2)})`}function jte(e=640){const[t,n]=A.useState(!1);return A.useEffect(()=>{const r=()=>n(window.innerWidthwindow.removeEventListener("resize",r)},[e]),t}function Yj({base:e,sub:t}){return b.jsxs(b.Fragment,{children:[e,b.jsx("sub",{className:"text-[0.7em]",children:t})]})}function Mte({active:e,payload:t,xSub:n,ySub:r}){if(!e||!t?.length)return null;const s=t[0].payload,o=s.type==="cascade"?"Cascade":s.type==="2-part"?"2-Part":"Speech-to-Speech",u=s.type==="cascade"?"bg-purple/20 text-purple-light":s.type==="2-part"?"bg-emerald-500/20 text-emerald-400":"bg-blue/20 text-blue-light";return b.jsxs("div",{className:"bg-bg-tertiary border border-border-default rounded-lg p-3 shadow-xl max-w-xs",children:[b.jsx("div",{className:"text-sm font-semibold text-text-primary mb-1",children:s.name}),b.jsxs("div",{className:"flex gap-4 text-xs",children:[b.jsxs("div",{children:[b.jsxs("span",{className:"text-text-muted",children:[b.jsx(Yj,{base:"EVA-A",sub:n}),":"]})," ",b.jsx("span",{className:"text-purple-light font-mono",children:s.plotX.toFixed(2)})]}),b.jsxs("div",{children:[b.jsxs("span",{className:"text-text-muted",children:[b.jsx(Yj,{base:"EVA-X",sub:r}),":"]})," ",b.jsx("span",{className:"text-blue-light font-mono",children:s.plotY.toFixed(2)})]})]}),s.type==="cascade"&&b.jsxs("div",{className:"text-[10px] text-text-muted mt-1.5 space-y-0.5",children:[b.jsxs("div",{children:["STT: ",s.stt]}),b.jsxs("div",{children:["LLM: ",s.llm]}),b.jsxs("div",{children:["TTS: ",s.tts]})]}),b.jsx("div",{className:"mt-1.5",children:b.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full font-medium ${u}`,children:o})})]})}function Gj({x:e,y:t,base:n,sub:r,suffix:s,fill:o,angle:u,small:f}){const d=f?12:20,h=f?9:14,m=f?3:5;return b.jsxs("text",{x:e,y:t,fill:o,fontSize:d,fontWeight:600,textAnchor:"middle",transform:u?`rotate(${u}, ${e}, ${t})`:void 0,children:[n,b.jsx("tspan",{fontSize:h,dy:m,children:r}),s&&b.jsx("tspan",{fontSize:d,dy:-m,children:s})]})}const Wj=[0,.2,.4,.6,.8,1],m0="#A78BFA",Nte="#C4B5FD",G5="#F59E0B",kte="#FBBF24",W5="#34D399",Cte="#6EE7B7",Z5="#06B6D4";function Dte(e){const t=[];for(const n of e)e.some(s=>s.plotY>=n.plotY&&s.plotX>=n.plotX&&(s.plotY>n.plotY||s.plotX>n.plotX))||t.push(n);return t.sort((n,r)=>n.plotX-r.plotX).map(n=>({plotX:n.plotX,plotY:n.plotY}))}function Pte({frontier:e}){const t=mQ(),n=pQ();if(!t||!n||e.length<2)return null;const r=e.map(s=>`${t(s.plotX)},${n(s.plotY)}`).join(" ");return b.jsx("polyline",{points:r,fill:"none",stroke:Z5,strokeWidth:2,strokeDasharray:"6 3",pointerEvents:"none"})}const Ul=[{title:"pass@1",description:b.jsx(b.Fragment,{children:"Average of per-sample scores, where each sample scores 1 if all metrics in category surpass metric-specific threshold, else 0."}),subscript:"pass@1",getX:e=>e.successRates.accuracy.pass_threshold,getY:e=>e.successRates.experience.pass_threshold,domain:[0,1]},{title:"pass@k (k=3)",description:b.jsx(b.Fragment,{children:"Percent of scenarios where at least 1 of k=3 trials surpasses metric-specific thresholds in all metrics in the category. ."}),subscript:"pass@k",getX:e=>e.successRates.accuracy.pass_at_k,getY:e=>e.successRates.experience.pass_at_k,domain:[0,1]},{title:"pass^k (k=3)",description:b.jsx(b.Fragment,{children:"Per-scenario probability of all k=3 trials succeeding (scenario pass rate raised to the k-th power) for that category, averaged across scenarios."}),subscript:"pass^k",getX:e=>e.successRates.accuracy.pass_k,getY:e=>e.successRates.experience.pass_k,domain:[0,1]},{title:"Mean",description:b.jsx(b.Fragment,{children:"Average of per-sample scores, where each sample's score is the mean of the submetrics in that category."}),subscript:"mean",getX:e=>e.successRates.accuracy.mean,getY:e=>e.successRates.experience.mean,domain:[0,1]}];function Rte(e){return e==="2-part"?{fill:W5,stroke:Cte}:e==="s2s"?{fill:G5,stroke:kte}:{fill:m0,stroke:Nte}}function Lte({systems:e}){const t=jx(),[n,r]=A.useState(0),s=jte(),o=Ul[n],u=e.map(m=>({...m,plotX:o.getX(m),plotY:o.getY(m)})),f=Dte(u),d=()=>r(m=>(m-1+Ul.length)%Ul.length),h=()=>r(m=>(m+1)%Ul.length);return b.jsxs("div",{className:"bg-bg-secondary rounded-xl border border-border-default p-6",children:[b.jsx("div",{className:"flex flex-wrap justify-center gap-2 mb-6",children:Ul.map((m,p)=>b.jsx("button",{onClick:()=>r(p),className:`px-3 py-1 rounded-full text-xs font-medium transition-colors ${p===n?"bg-purple/20 text-purple-light":"bg-bg-hover text-text-muted hover:text-text-secondary"}`,children:m.title},p))}),b.jsxs("div",{className:"flex items-center justify-between mb-6",children:[b.jsx("button",{onClick:d,className:"p-2 rounded-lg hover:bg-bg-hover transition-colors text-text-muted hover:text-text-primary",children:b.jsx(YR,{className:"w-6 h-6"})}),b.jsxs("div",{className:"text-center flex-1 px-4",children:[b.jsx("h3",{className:"text-xl font-semibold text-text-primary mb-2",children:o.title}),b.jsx("p",{className:"text-sm text-text-muted leading-loose max-w-xl mx-auto",children:o.description})]}),b.jsx("button",{onClick:h,className:"p-2 rounded-lg hover:bg-bg-hover transition-colors text-text-muted hover:text-text-primary",children:b.jsx(sM,{className:"w-6 h-6"})})]}),b.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center gap-6 max-w-4xl mx-auto",children:[b.jsx("div",{className:"flex-1 min-w-0",children:b.jsx("div",{style:{width:"100%",aspectRatio:"1"},className:"[&_.recharts-surface]:overflow-visible min-h-[300px] sm:min-h-[400px]",children:b.jsx(CV,{width:"100%",height:"100%",children:b.jsxs(Ste,{margin:{top:15,right:15,bottom:s?45:60,left:s?25:40},style:{overflow:"visible"},children:[b.jsx(E5,{strokeDasharray:"3 3",stroke:t.bg.tertiary}),b.jsx(D5,{type:"number",dataKey:"plotX",domain:o.domain,ticks:Wj,allowDataOverflow:!0,tickFormatter:m=>m.toFixed(1),stroke:t.text.muted,tick:{fill:t.text.secondary,fontSize:11},label:({viewBox:m})=>{const{x:p,y:v,width:x}=m;return b.jsx(Gj,{x:p+x/2,y:v+(s?35:50),base:"Accuracy (EVA-A",sub:o.subscript,suffix:")",fill:t.accent.purpleLight,small:s})}}),b.jsx(P5,{type:"number",dataKey:"plotY",domain:o.domain,ticks:Wj,allowDataOverflow:!0,tickFormatter:m=>m.toFixed(1),stroke:t.text.muted,tick:{fill:t.text.secondary,fontSize:11},label:({viewBox:m})=>{const{x:p,y:v,height:x}=m;return b.jsx(Gj,{x:p-(s?2:8),y:v+x/2,base:"Experience (EVA-X",sub:o.subscript,suffix:")",fill:t.accent.blueLight,angle:-90,small:s})}}),b.jsx(aW,{content:b.jsx(Mte,{xSub:o.subscript,ySub:o.subscript}),cursor:!1}),b.jsx(Pte,{frontier:f}),b.jsx(k5,{data:u,fill:m0,children:u.map(m=>{const{fill:p,stroke:v}=Rte(m.type);return b.jsx(bx,{fill:p,stroke:v,strokeWidth:1.5,r:8},m.id)})})]})})})}),b.jsxs("div",{className:"flex flex-wrap justify-center gap-x-4 gap-y-2 lg:flex-col lg:gap-3 lg:flex-shrink-0 lg:pr-2",children:[b.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 rounded-full flex-shrink-0",style:{backgroundColor:m0}}),b.jsx("span",{className:"whitespace-nowrap",children:"Cascade"})]}),b.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 rounded-full flex-shrink-0",style:{backgroundColor:W5}}),b.jsx("span",{className:"whitespace-nowrap",children:"Audio Native"})]}),b.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 rounded-full flex-shrink-0",style:{backgroundColor:G5}}),b.jsx("span",{className:"whitespace-nowrap",children:"Speech-to-Speech"})]}),b.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm text-text-secondary",children:[b.jsx("div",{className:"w-5 sm:w-6 h-0 border-t-2 border-dashed flex-shrink-0",style:{borderColor:Z5}}),b.jsx("span",{className:"whitespace-nowrap",children:"Pareto Frontier"})]})]})]})]})}const zte=["task_completion","agent_tts_fidelity","faithfulness"],Ite=["turn_taking","conciseness","conversation_progression"],Bte={task_completion:"Task Completion",agent_tts_fidelity:"Agent Speech Fidelity",faithfulness:"Faithfulness"},Ute={turn_taking:"Turn Taking",conciseness:"Conciseness",conversation_progression:"Conversation Progression"},Zj=new Set(["response_speed"]),Vte=[{id:"ultravox-v0-7-kokoro",name:"ultravox v0.7 + kokoro",shortName:"ultravox v0.7 + kokoro",stt:"-",llm:"ultravox v0.7",tts:"kokoro",type:"2-part",evaA:.3933,evaX:.3067,accuracyMetrics:{task_completion:.58,agent_tts_fidelity:.9662,faithfulness:.45},experienceMetrics:{turn_taking:.3782,conciseness:.7532,conversation_progression:.64},diagnosticMetrics:{key_entity_transcription:.784,response_speed:5.9224},successRates:{accuracy:{pass_threshold:.3933,mean:.6654,pass_at_k:.56,pass_k:.2793},experience:{pass_threshold:.3067,mean:.5905,pass_at_k:.54,pass_k:.1807}}},{id:"gpt-realtime-mini",name:"gpt-realtime-mini",shortName:"gpt-realtime-mini",stt:"-",llm:"gpt-realtime-mini",tts:"-",type:"s2s",evaA:.1867,evaX:.4333,accuracyMetrics:{task_completion:.2867,agent_tts_fidelity:.9882,faithfulness:.1833},experienceMetrics:{turn_taking:.7607,conciseness:.8116,conversation_progression:.3567},diagnosticMetrics:{key_entity_transcription:0,response_speed:3.7524},successRates:{accuracy:{pass_threshold:.1867,mean:.4861,pass_at_k:.28,pass_k:.1185},experience:{pass_threshold:.4333,mean:.643,pass_at_k:.7,pass_k:.2615}}},{id:"ultravox-realtime",name:"ultravox-realtime",shortName:"ultravox-realtime",stt:"-",llm:"ultravox-realtime",tts:"-",type:"2-part",evaA:.28,evaX:.44,accuracyMetrics:{task_completion:.4867,agent_tts_fidelity:.9426,faithfulness:.3167},experienceMetrics:{turn_taking:.519,conciseness:.6948,conversation_progression:.5933},diagnosticMetrics:{key_entity_transcription:.8484,response_speed:4.847},successRates:{accuracy:{pass_threshold:.28,mean:.582,pass_at_k:.46,pass_k:.1511},experience:{pass_threshold:.44,mean:.6024,pass_at_k:.76,pass_k:.2356}}},{id:"gpt-4o-mini-transcribe-gpt-5-mini-gpt-4o-mini-tts",name:"gpt-4o-mini-transcribe + gpt-5-mini + gpt-4o-mini-tts",shortName:"gpt-5-mini (gpt-4o-mini-transcribe)",stt:"gpt-4o-mini-transcribe",llm:"gpt-5-mini",tts:"gpt-4o-mini-tts",type:"cascade",evaA:.2095,evaX:.1267,accuracyMetrics:{task_completion:.36,agent_tts_fidelity:.9707,faithfulness:.3},experienceMetrics:{turn_taking:.2703,conciseness:.7162,conversation_progression:.4533},diagnosticMetrics:{key_entity_transcription:.6801,response_speed:5.9619},successRates:{accuracy:{pass_threshold:.2095,mean:.5398,pass_at_k:.5,pass_k:.0694},experience:{pass_threshold:.1267,mean:.4799,pass_at_k:.32,pass_k:.0274}}},{id:"gpt-4o-mini-transcribe-sonnet-4-6-gpt-4o-mini-tts",name:"gpt-4o-mini-transcribe + sonnet-4.6 + gpt-4o-mini-tts",shortName:"sonnet-4.6 (gpt-4o-mini-transcribe)",stt:"gpt-4o-mini-transcribe",llm:"sonnet-4.6",tts:"gpt-4o-mini-tts",type:"cascade",evaA:.36,evaX:.02,accuracyMetrics:{task_completion:.54,agent_tts_fidelity:.9605,faithfulness:.6433},experienceMetrics:{turn_taking:.1043,conciseness:.8298,conversation_progression:.7767},diagnosticMetrics:{key_entity_transcription:.6167,response_speed:8.2609},successRates:{accuracy:{pass_threshold:.36,mean:.7146,pass_at_k:.62,pass_k:.1867},experience:{pass_threshold:.02,mean:.5703,pass_at_k:.06,pass_k:.0022}}},{id:"gpt-4o-mini-transcribe-gpt-oss-20b-gpt-4o-mini-tts",name:"gpt-4o-mini-transcribe + gpt-oss-20b + gpt-4o-mini-tts",shortName:"gpt-oss-20b (gpt-4o-mini-transcribe)",stt:"gpt-4o-mini-transcribe",llm:"gpt-oss-20b",tts:"gpt-4o-mini-tts",type:"cascade",evaA:.1267,evaX:.3,accuracyMetrics:{task_completion:.3,agent_tts_fidelity:.9516,faithfulness:.1767},experienceMetrics:{turn_taking:.5225,conciseness:.6871,conversation_progression:.3567},diagnosticMetrics:{key_entity_transcription:.617,response_speed:4.8793},successRates:{accuracy:{pass_threshold:.1267,mean:.4761,pass_at_k:.24,pass_k:.0541},experience:{pass_threshold:.3,mean:.5221,pass_at_k:.6,pass_k:.1356}}},{id:"gpt-4o-mini-transcribe-gpt-oss-120b-gpt-4o-mini-tts",name:"gpt-4o-mini-transcribe + gpt-oss-120b + gpt-4o-mini-tts",shortName:"gpt-oss-120b (gpt-4o-mini-transcribe)",stt:"gpt-4o-mini-transcribe",llm:"gpt-oss-120b",tts:"gpt-4o-mini-tts",type:"cascade",evaA:.1733,evaX:.54,accuracyMetrics:{task_completion:.2867,agent_tts_fidelity:.9668,faithfulness:.3433},experienceMetrics:{turn_taking:.6251,conciseness:.7655,conversation_progression:.5367},diagnosticMetrics:{key_entity_transcription:.5824,response_speed:4.2443},successRates:{accuracy:{pass_threshold:.1733,mean:.5323,pass_at_k:.34,pass_k:.077},experience:{pass_threshold:.54,mean:.6424,pass_at_k:.94,pass_k:.2467}}},{id:"parakeet-ctc-1-1b-gpt-oss-20b-magpie",name:"parakeet-ctc-1.1b + gpt-oss-20b + magpie",shortName:"gpt-oss-20b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"gpt-oss-20b",tts:"magpie",type:"cascade",evaA:.16,evaX:.34,accuracyMetrics:{task_completion:.4,agent_tts_fidelity:.935,faithfulness:.14},experienceMetrics:{turn_taking:.418,conciseness:.7205,conversation_progression:.4933},diagnosticMetrics:{key_entity_transcription:.8148,response_speed:5.9816},successRates:{accuracy:{pass_threshold:.16,mean:.4917,pass_at_k:.32,pass_k:.0711},experience:{pass_threshold:.34,mean:.5439,pass_at_k:.7,pass_k:.1444}}},{id:"parakeet-ctc-1-1b-gpt-oss-120b-magpie",name:"parakeet-ctc-1.1b + gpt-oss-120b + magpie",shortName:"gpt-oss-120b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"gpt-oss-120b",tts:"magpie",type:"cascade",evaA:.1678,evaX:.42,accuracyMetrics:{task_completion:.3667,agent_tts_fidelity:.9065,faithfulness:.36},experienceMetrics:{turn_taking:.4663,conciseness:.7522,conversation_progression:.63},diagnosticMetrics:{key_entity_transcription:.8415,response_speed:5.2856},successRates:{accuracy:{pass_threshold:.1678,mean:.544,pass_at_k:.3061,pass_k:.0718},experience:{pass_threshold:.42,mean:.6162,pass_at_k:.72,pass_k:.2022}}},{id:"parakeet-ctc-1-1b-qwen3-5-27b-kokoro",name:"parakeet-ctc-1.1b + qwen3.5-27b + kokoro",shortName:"qwen3.5-27b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"qwen3.5-27b",tts:"kokoro",type:"cascade",evaA:.4133,evaX:.06,accuracyMetrics:{task_completion:.54,agent_tts_fidelity:.9896,faithfulness:.47},experienceMetrics:{turn_taking:.2249,conciseness:.6823,conversation_progression:.6167},diagnosticMetrics:{key_entity_transcription:.8093,response_speed:7.4968},successRates:{accuracy:{pass_threshold:.4133,mean:.6665,pass_at_k:.7,pass_k:.2104},experience:{pass_threshold:.06,mean:.508,pass_at_k:.14,pass_k:.0156}}},{id:"parakeet-ctc-1-1b-gpt-oss-120b-kokoro",name:"parakeet-ctc-1.1b + gpt-oss-120b + kokoro",shortName:"gpt-oss-120b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"gpt-oss-120b",tts:"kokoro",type:"cascade",evaA:.2333,evaX:.24,accuracyMetrics:{task_completion:.36,agent_tts_fidelity:.9601,faithfulness:.3267},experienceMetrics:{turn_taking:.3569,conciseness:.7582,conversation_progression:.6167},diagnosticMetrics:{key_entity_transcription:.7951,response_speed:6.0521},successRates:{accuracy:{pass_threshold:.2333,mean:.5489,pass_at_k:.46,pass_k:.1059},experience:{pass_threshold:.24,mean:.5772,pass_at_k:.5,pass_k:.0844}}},{id:"parakeet-ctc-1-1b-gpt-oss-120b-chatterbox-turbo",name:"parakeet-ctc-1.1b + gpt-oss-120b + chatterbox-turbo",shortName:"gpt-oss-120b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"gpt-oss-120b",tts:"chatterbox-turbo",type:"cascade",evaA:.1533,evaX:.0267,accuracyMetrics:{task_completion:.36,agent_tts_fidelity:.8883,faithfulness:.32},experienceMetrics:{turn_taking:.0645,conciseness:.7841,conversation_progression:.49},diagnosticMetrics:{key_entity_transcription:.8053,response_speed:9.8321},successRates:{accuracy:{pass_threshold:.1533,mean:.5228,pass_at_k:.32,pass_k:.057},experience:{pass_threshold:.0267,mean:.4462,pass_at_k:.06,pass_k:.0074}}},{id:"parakeet-ctc-1-1b-qwen3-5-27b-chatterbox-turbo",name:"parakeet-ctc-1.1b + qwen3.5-27b + chatterbox-turbo",shortName:"qwen3.5-27b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"qwen3.5-27b",tts:"chatterbox-turbo",type:"cascade",evaA:.2533,evaX:0,accuracyMetrics:{task_completion:.5333,agent_tts_fidelity:.8513,faithfulness:.42},experienceMetrics:{turn_taking:.0225,conciseness:.6914,conversation_progression:.56},diagnosticMetrics:{key_entity_transcription:.8268,response_speed:12.0952},successRates:{accuracy:{pass_threshold:.2533,mean:.6015,pass_at_k:.56,pass_k:.0815},experience:{pass_threshold:0,mean:.4246,pass_at_k:0,pass_k:0}}},{id:"voxtral-mini-3b-gpt-oss-20b-magpie",name:"voxtral-mini-3b + gpt-oss-20b + magpie",shortName:"gpt-oss-20b (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"gpt-oss-20b",tts:"magpie",type:"cascade",evaA:.1133,evaX:.3867,accuracyMetrics:{task_completion:.3733,agent_tts_fidelity:.9349,faithfulness:.1367},experienceMetrics:{turn_taking:.5951,conciseness:.6917,conversation_progression:.3667},diagnosticMetrics:{key_entity_transcription:.6618,response_speed:4.4834},successRates:{accuracy:{pass_threshold:.1133,mean:.4816,pass_at_k:.24,pass_k:.0526},experience:{pass_threshold:.3867,mean:.5512,pass_at_k:.78,pass_k:.1541}}},{id:"voxtral-mini-3b-gpt-oss-120b-magpie",name:"voxtral-mini-3b + gpt-oss-120b + magpie",shortName:"gpt-oss-120b (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"gpt-oss-120b",tts:"magpie",type:"cascade",evaA:.1477,evaX:.5667,accuracyMetrics:{task_completion:.3467,agent_tts_fidelity:.9467,faithfulness:.2967},experienceMetrics:{turn_taking:.6659,conciseness:.7494,conversation_progression:.4767},diagnosticMetrics:{key_entity_transcription:.6906,response_speed:3.3998},successRates:{accuracy:{pass_threshold:.1477,mean:.5279,pass_at_k:.3265,pass_k:.062},experience:{pass_threshold:.5667,mean:.6307,pass_at_k:.92,pass_k:.3341}}},{id:"voxtral-mini-3b-gpt-oss-120b-chatterbox-turbo",name:"voxtral-mini-3b + gpt-oss-120b + chatterbox-turbo",shortName:"gpt-oss-120b (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"gpt-oss-120b",tts:"chatterbox-turbo",type:"cascade",evaA:.16,evaX:.0933,accuracyMetrics:{task_completion:.36,agent_tts_fidelity:.9049,faithfulness:.3467},experienceMetrics:{turn_taking:.204,conciseness:.7701,conversation_progression:.5233},diagnosticMetrics:{key_entity_transcription:.6376,response_speed:7.2744},successRates:{accuracy:{pass_threshold:.16,mean:.5372,pass_at_k:.28,pass_k:.08},experience:{pass_threshold:.0933,mean:.4991,pass_at_k:.28,pass_k:.0104}}},{id:"voxtral-mini-3b-qwen3-5-27b-chatterbox-turbo",name:"voxtral-mini-3b + qwen3.5-27b + chatterbox-turbo",shortName:"qwen3.5-27b (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"qwen3.5-27b",tts:"chatterbox-turbo",type:"cascade",evaA:.2067,evaX:0,accuracyMetrics:{task_completion:.54,agent_tts_fidelity:.796,faithfulness:.3967},experienceMetrics:{turn_taking:.0296,conciseness:.7165,conversation_progression:.5167},diagnosticMetrics:{key_entity_transcription:.7408,response_speed:14.4124},successRates:{accuracy:{pass_threshold:.2067,mean:.5775,pass_at_k:.52,pass_k:.0452},experience:{pass_threshold:0,mean:.4209,pass_at_k:0,pass_k:0}}},{id:"voxtral-mini-3b-qwen3-5-27b-kokoro",name:"voxtral-mini-3b + qwen3.5-27b + kokoro",shortName:"qwen3.5-27b (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"qwen3.5-27b",tts:"kokoro",type:"cascade",evaA:.4933,evaX:.2467,accuracyMetrics:{task_completion:.5933,agent_tts_fidelity:.9949,faithfulness:.5067},experienceMetrics:{turn_taking:.374,conciseness:.6838,conversation_progression:.5433},diagnosticMetrics:{key_entity_transcription:.7518,response_speed:5.8276},successRates:{accuracy:{pass_threshold:.4933,mean:.6983,pass_at_k:.74,pass_k:.3348},experience:{pass_threshold:.2467,mean:.5337,pass_at_k:.5,pass_k:.0985}}},{id:"whisper-large-v3-gpt-oss-20b-chatterbox-turbo",name:"whisper-large-v3 + gpt-oss-20b + chatterbox-turbo",shortName:"gpt-oss-20b (whisper-large-v3)",stt:"whisper-large-v3",llm:"gpt-oss-20b",tts:"chatterbox-turbo",type:"cascade",evaA:.0733,evaX:.04,accuracyMetrics:{task_completion:.38,agent_tts_fidelity:.8849,faithfulness:.1533},experienceMetrics:{turn_taking:.1816,conciseness:.7343,conversation_progression:.44},diagnosticMetrics:{key_entity_transcription:.6696,response_speed:7.5545},successRates:{accuracy:{pass_threshold:.0733,mean:.4728,pass_at_k:.18,pass_k:.017},experience:{pass_threshold:.04,mean:.4519,pass_at_k:.12,pass_k:.0044}}},{id:"whisper-large-v3-gpt-oss-120b-kokoro",name:"whisper-large-v3 + gpt-oss-120b + kokoro",shortName:"gpt-oss-120b (whisper-large-v3)",stt:"whisper-large-v3",llm:"gpt-oss-120b",tts:"kokoro",type:"cascade",evaA:.1667,evaX:.52,accuracyMetrics:{task_completion:.28,agent_tts_fidelity:.9645,faithfulness:.2967},experienceMetrics:{turn_taking:.6148,conciseness:.7536,conversation_progression:.5433},diagnosticMetrics:{key_entity_transcription:.6573,response_speed:4.1026},successRates:{accuracy:{pass_threshold:.1667,mean:.5137,pass_at_k:.32,pass_k:.0763},experience:{pass_threshold:.52,mean:.6372,pass_at_k:.84,pass_k:.3244}}}],qte=["#F59E0B","#38BDF8","#34D399","#A78BFA","#F87171","#22D3EE","#FB923C","#818CF8","#F472B6","#4ADE80","#FACC15","#2DD4BF","#C084FC","#FB7185","#67E8F9","#A3E635"],$te=["#B45309","#0369A1","#047857","#6D28D9","#B91C1C","#0E7490","#C2410C","#4338CA","#BE185D","#15803D","#A16207","#0D9488","#7C3AED","#E11D48","#0891B2","#65A30D"];function Fte(e,t){const n=new Set;for(const o of e)o.stt!=="-"&&n.add(o.stt),n.add(o.llm),o.tts!=="-"&&n.add(o.tts);const r=new Map;let s=0;for(const o of n)r.set(o,t[s%t.length]),s++;return r}function Qj({system:e,componentColors:t}){if(e.type==="s2s"||e.type==="2-part"){if(e.tts!=="-")return b.jsxs("span",{className:"text-sm leading-relaxed inline-flex flex-wrap items-baseline",children:[b.jsx("span",{className:"whitespace-nowrap",style:{color:t.get(e.llm)},children:e.llm}),b.jsx("span",{className:"text-text-muted whitespace-nowrap",children:" + "}),b.jsx("span",{className:"whitespace-nowrap",style:{color:t.get(e.tts)},children:e.tts})]});const n=t.get(e.llm)||"#F1F5F9";return b.jsx("span",{style:{color:n},children:e.llm})}return b.jsxs("span",{className:"text-sm leading-relaxed inline-flex flex-wrap items-baseline",children:[b.jsx("span",{className:"whitespace-nowrap",style:{color:t.get(e.stt)},children:e.stt}),b.jsx("span",{className:"text-text-muted whitespace-nowrap",children:" + "}),b.jsx("span",{className:"whitespace-nowrap",style:{color:t.get(e.llm)},children:e.llm}),b.jsx("span",{className:"text-text-muted whitespace-nowrap",children:" + "}),b.jsx("span",{className:"whitespace-nowrap",style:{color:t.get(e.tts)},children:e.tts})]})}const Hte=[{key:null,label:"Default"},{key:"system_stt",label:"STT"},{key:"system_llm",label:"LLM"},{key:"system_tts",label:"TTS"}];function Vl({active:e,dir:t}){return e?t==="desc"?b.jsx(VR,{className:"w-3 h-3 inline ml-0.5"}):b.jsx($R,{className:"w-3 h-3 inline ml-0.5"}):null}function Jj({title:e,description:t,metricKeys:n,metricLabels:r,dataKey:s,baseColor:o,aggregateColumns:u,aggregateColor:f="#F59E0B",systems:d}){const h=jx(),m=Ote(),p=u??[],v=m==="light"?$te:qte,x=A.useMemo(()=>Fte(d,v),[d,v]),[w,_]=A.useState(null),[S,O]=A.useState("desc"),[M,j]=A.useState(!1),[N,k]=A.useState({top:0,left:0}),C=A.useRef(null),L=A.useRef(null),[I,Y]=A.useState("scores"),te=A.useCallback(()=>{if(C.current){const Z=C.current.getBoundingClientRect();k({top:Z.bottom+4,left:Z.left})}j(Z=>!Z)},[]);A.useEffect(()=>{function Z(oe){L.current&&!L.current.contains(oe.target)&&C.current&&!C.current.contains(oe.target)&&j(!1)}if(M)return document.addEventListener("mousedown",Z),()=>document.removeEventListener("mousedown",Z)},[M]);function ie(Z){w===Z?O(oe=>oe==="desc"?"asc":"desc"):(_(Z),O("desc"))}function K(Z){Z===null?_(null):w===Z?O(oe=>oe==="desc"?"asc":"desc"):(_(Z),O("asc")),j(!1)}const be=A.useMemo(()=>{if(!w)return[...d].sort((he,_e)=>{const J=he.type==="s2s"||he.type==="2-part",re=_e.type==="s2s"||_e.type==="2-part";return J&&!re?-1:!J&&re?1:he.stt.localeCompare(_e.stt)});const Z=he=>{if(w==="system_stt")return he.stt;if(w==="system_llm")return he.llm;if(w==="system_tts")return he.tts;const _e=p.find(J=>J.key===w);return _e?_e.getValue(he):he[s][w]??0},oe=(he,_e)=>{const J=Z(he),re=Z(_e);if(typeof J=="string"&&typeof re=="string")return S==="asc"?J.localeCompare(re):re.localeCompare(J);const Se=J,ee=re;return S==="desc"?ee-Se:Se-ee};return[...d].sort(oe)},[w,S,p,s]),pe={};for(const Z of n){const oe=d.map(he=>he[s][Z]??0);pe[Z]={min:Math.min(...oe),max:Math.max(...oe)}}const xe={};for(const Z of p){const oe=d.map(he=>Z.getValue(he));xe[Z.key]={min:Math.min(...oe),max:Math.max(...oe)}}const V=p.length+n.length,Q=35,ne=`${(100-Q)/V}%`,le=`${Q}%`,ue="text-center py-3 px-1 font-bold text-xs leading-snug cursor-pointer select-none hover:bg-bg-hover/50 transition-colors",P=I==="scores"?p:[],H=I==="metrics"?n:[],ae=I==="scores"?p.length:n.length,se=`${(100-Q)/ae}%`;return b.jsxs("div",{className:"bg-bg-secondary rounded-xl border border-border-default p-4 sm:p-6",children:[b.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-1",children:e}),b.jsx("p",{className:"text-sm text-text-secondary mb-4",children:t}),p.length>0&&n.length>0&&b.jsxs("div",{className:"flex gap-2 mb-4 md:hidden",children:[b.jsx("button",{onClick:()=>Y("scores"),className:`flex-1 px-3 py-2 rounded-lg text-xs font-medium transition-colors ${I==="scores"?"bg-purple/20 text-purple-light":"bg-bg-hover text-text-muted hover:text-text-secondary"}`,children:"Aggregate Scores"}),b.jsx("button",{onClick:()=>Y("metrics"),className:`flex-1 px-3 py-2 rounded-lg text-xs font-medium transition-colors ${I==="metrics"?"bg-purple/20 text-purple-light":"bg-bg-hover text-text-muted hover:text-text-secondary"}`,children:"Individual Metrics"})]}),b.jsx("div",{className:"hidden md:block overflow-x-auto",children:b.jsxs("table",{className:"w-full text-sm",style:{tableLayout:"fixed"},children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-border-default",children:[b.jsxs("th",{className:"text-left py-3 px-3 text-text-muted font-medium text-sm sticky left-0 bg-bg-secondary z-10",style:{width:le},children:[b.jsxs("button",{ref:C,onClick:te,className:"flex items-center gap-1 hover:text-text-primary transition-colors",children:["System",b.jsx(ai,{className:"w-3.5 h-3.5"}),w?.startsWith("system_")&&b.jsx(Vl,{active:!0,dir:S})]}),M&&G0.createPortal(b.jsx("div",{ref:L,className:"bg-bg-tertiary border border-border-default rounded-lg shadow-xl py-1 min-w-[100px]",style:{position:"fixed",top:N.top,left:N.left,zIndex:9999},children:Hte.map(Z=>b.jsx("button",{onClick:()=>K(Z.key),className:`block w-full text-left px-3 py-1.5 text-xs hover:bg-bg-hover transition-colors ${w===Z.key||Z.key===null&&w===null?"text-purple-light font-medium":"text-text-secondary"}`,children:Z.label},Z.key??"default"))}),document.body)]}),p.map((Z,oe)=>b.jsxs("th",{className:`${ue} ${oe===p.length-1?"border-r-2 border-border-default":""}`,style:{color:f,width:ne},onClick:()=>ie(Z.key),children:[Z.label,b.jsx(Vl,{active:w===Z.key,dir:S})]},Z.key)),n.map(Z=>b.jsxs("th",{className:`${ue} text-text-primary`,style:{width:ne},onClick:()=>ie(Z),children:[r[Z]||Z,b.jsx(Vl,{active:w===Z,dir:S})]},Z))]})}),b.jsx("tbody",{children:be.map(Z=>b.jsxs("tr",{className:"border-b border-border-default/30",children:[b.jsx("td",{className:"py-2.5 px-3 sticky left-0 bg-bg-secondary z-10 whitespace-nowrap",children:b.jsx(Qj,{system:Z,componentColors:x})}),p.map((oe,he)=>{const _e=oe.getValue(Z),{min:J,max:re}=xe[oe.key],{bg:Se,text:ee}=kf(_e,J,re,f,!1,h);return b.jsx("td",{className:`py-1.5 px-1 text-center ${he===p.length-1?"border-r-2 border-border-default":""}`,children:b.jsx("div",{className:"rounded-md px-0.5 py-1.5 font-mono text-xs font-medium",style:{backgroundColor:Se,color:ee},children:_e.toFixed(2)})},oe.key)}),n.map(oe=>{const he=Z[s][oe]??0,{min:_e,max:J}=pe[oe],re=Zj.has(oe),{bg:Se,text:ee}=kf(he,_e,J,o,re,h);return b.jsx("td",{className:"py-1.5 px-1 text-center",children:b.jsx("div",{className:"rounded-md px-0.5 py-1.5 font-mono text-xs font-medium",style:{backgroundColor:Se,color:ee},children:he.toFixed(2)})},oe)})]},Z.id))})]})}),b.jsx("div",{className:"md:hidden overflow-x-auto",children:b.jsxs("table",{className:"w-full text-sm",style:{tableLayout:"fixed"},children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-border-default",children:[b.jsx("th",{className:"text-left py-3 px-2 text-text-muted font-medium text-xs sticky left-0 bg-bg-secondary z-10",style:{width:le},children:"System"}),P.map(Z=>b.jsxs("th",{className:`${ue} text-[10px] sm:text-xs`,style:{color:f,width:se},onClick:()=>ie(Z.key),children:[Z.label.replace("EVA-A ",""),b.jsx(Vl,{active:w===Z.key,dir:S})]},Z.key)),H.map(Z=>b.jsxs("th",{className:`${ue} text-text-primary text-[10px] sm:text-xs`,style:{width:se},onClick:()=>ie(Z),children:[r[Z]||Z,b.jsx(Vl,{active:w===Z,dir:S})]},Z))]})}),b.jsx("tbody",{children:be.map(Z=>b.jsxs("tr",{className:"border-b border-border-default/30",children:[b.jsx("td",{className:"py-2 px-2 sticky left-0 bg-bg-secondary z-10 text-xs",children:b.jsx(Qj,{system:Z,componentColors:x})}),P.map(oe=>{const he=oe.getValue(Z),{min:_e,max:J}=xe[oe.key],{bg:re,text:Se}=kf(he,_e,J,f,!1,h);return b.jsx("td",{className:"py-1 px-0.5 text-center",children:b.jsx("div",{className:"rounded-md px-0.5 py-1 font-mono text-[10px] sm:text-xs font-medium",style:{backgroundColor:re,color:Se},children:he.toFixed(2)})},oe.key)}),H.map(oe=>{const he=Z[s][oe]??0,{min:_e,max:J}=pe[oe],re=Zj.has(oe),{bg:Se,text:ee}=kf(he,_e,J,o,re,h);return b.jsx("td",{className:"py-1 px-0.5 text-center",children:b.jsx("div",{className:"rounded-md px-0.5 py-1 font-mono text-[10px] sm:text-xs font-medium",style:{backgroundColor:Se,color:ee},children:he.toFixed(2)})},oe)})]},Z.id))})]})})]})}const Kte=[{title:"Transcription failures cascade into low task completion",description:"Transcription failures around last names and confirmation codes cascade into low task completion as the agent is unable to pull up the user's booking and proceed with the request."},{title:"Turn taking remains a key challenge",description:"Effective turn taking remains a key challenge for cascade systems — most turns are late (>4 seconds)."},{title:"Speech synthesis struggles with alphanumeric codes",description:"Speech synthesis systems generally produce the intended speech but struggle the most with alphanumeric codes, often dropping or switching characters and letters."},{title:"LLMs produce verbose, non-voice-appropriate content",description:"LLMs struggle to produce concise, voice-appropriate content, particularly when trying to list flight options for the user."},{title:"Transcription failures reduce conversation efficiency",description:"Transcription failures also lead to inefficient conversation progression, as the agent cannot move the conversation forward when it's stuck trying to retrieve the user's reservation."},{title:"Audio-native systems show promise",description:"Both audio-native systems sit on the Pareto frontier, while the single speech-to-speech system does not — we aim to benchmark more audio-native and s2s systems to see if this holds across the architectural classes."}],Xte=[{title:"Accuracy–experience trade-off",description:"The Pareto frontier reveals a clear accuracy-experience tradeoff across systems, systems that push harder on accuracy are doing so at the cost of conversational experience, and vice versa."},{title:"Low Pass Rates",description:"Performance remains far from saturated — no system clears 0.5 pass@1 on accuracy, and only a few systems exceed 0.50 EVA-X pass@1, suggesting ample opportunities for improvement."},{title:"Sparse Frontier",description:"Only a few systems sit on the Pareto frontier, meaning most systems are strictly dominated. This concentrates the real decision space: only a small subset of system choices actually matter for navigating the accuracy–experience tradeoff."}],Yte=[{key:"eva_a_pass",label:"EVA-A pass@1",getValue:e=>e.successRates.accuracy.pass_threshold},{key:"eva_a_mean",label:"EVA-A Mean",getValue:e=>e.successRates.accuracy.mean}],Gte=[{key:"eva_x_pass",label:"EVA-X pass@1",getValue:e=>e.successRates.experience.pass_threshold},{key:"eva_x_mean",label:"EVA-X Mean",getValue:e=>e.successRates.experience.mean}];function Wte(){const e=jx(),t=Vte;return b.jsx(wo,{id:"leaderboard",title:"Early Results",subtitle:"Early results on the airline domain (50 scenarios, 3 trials each).",children:b.jsxs("div",{className:"space-y-8",children:[b.jsx(Lte,{systems:t}),b.jsxs("div",{className:"rounded-xl border border-purple/20 bg-purple/5 p-6",children:[b.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[b.jsx("div",{className:"w-9 h-9 rounded-lg bg-purple/10 flex items-center justify-center",children:b.jsx(US,{className:"w-5 h-5 text-purple-light"})}),b.jsx("h3",{className:"text-lg font-bold text-text-primary",children:"Pareto Analysis"})]}),b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:Xte.map((n,r)=>b.jsxs("div",{className:"rounded-lg bg-bg-secondary border border-border-default p-4",children:[b.jsx("div",{className:"text-sm font-semibold text-text-primary mb-2",children:n.title}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:n.description})]},r))})]}),b.jsx(Jj,{title:"Accuracy Metrics (EVA-A)",description:"Per-metric scores for accuracy. All values normalized to 0-1 (higher is better).",metricKeys:zte,metricLabels:Bte,dataKey:"accuracyMetrics",baseColor:e.accent.purple,aggregateColumns:Yte,aggregateColor:"#F59E0B",systems:t}),b.jsx(Jj,{title:"Experience Metrics (EVA-X)",description:"Per-metric scores for conversational experience. All values normalized to 0-1 (higher is better).",metricKeys:Ite,metricLabels:Ute,dataKey:"experienceMetrics",baseColor:e.accent.blue,aggregateColumns:Gte,aggregateColor:"#F59E0B",systems:t}),b.jsxs("div",{className:"rounded-xl border border-purple/20 bg-purple/5 p-6",children:[b.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[b.jsx("div",{className:"w-9 h-9 rounded-lg bg-purple/10 flex items-center justify-center",children:b.jsx(US,{className:"w-5 h-5 text-purple-light"})}),b.jsx("h3",{className:"text-lg font-bold text-text-primary",children:"Key Insights"})]}),b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Kte.map((n,r)=>b.jsxs("div",{className:"rounded-lg bg-bg-secondary border border-border-default p-4",children:[b.jsx("div",{className:"text-sm font-semibold text-text-primary mb-2",children:n.title}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:n.description})]},r))})]})]})})}const Zte={high_level_user_goal:"You want to move your LAX to SFO flight today from the late afternoon to an earlier direct flight that leaves before 2:00 PM, as long as the same-day change fee stays under $80.",decision_tree:{must_have_criteria:["New departure time is today (2026-06-18) and departs LAX before 2:00 PM Pacific.","Same-day change fee is under $80 total (acceptable: $0 to $79.99).","It is a direct flight from LAX to SFO (no connections and no airport changes)."],negotiation_behavior:["If the agent asks for verification details, provide your confirmation code and last name exactly as given in information_required, then wait for the agent to read back your reservation and confirm it is yours; if they read back a different name or itinerary, correct them and re-provide the details.","When the agent offers earlier-flight options, evaluate each option against ALL must-have criteria: (a) date is 2026-06-18, (b) LAX departure time is before 2:00 PM PT, (c) direct LAX→SFO, (d) same-day change fee is under $80.","If both an 11:00 AM and a 1:00 PM direct option meet all must-haves, choose the earliest departure (11:00 AM).","If only one option meets all must-haves, accept that option.",'Before the agent finalizes anything, if the agent has not clearly stated the exact same-day change fee amount, ask: "What will the change fee be in total?" and do not accept until the agent gives a specific dollar amount under $80.','If the agent proposes any option that departs at or after 2:00 PM, has a connection, changes airports, or has a fee of $80 or more, reject it and restate the must-haves once: "It needs to be today, direct LAX to SFO, leaving before 2 PM, and the fee has to be under $80—can you check again?"',"If after one additional search/attempt the agent still cannot offer any option that meets all must-haves, move to failure_condition."],resolution_condition:"The agent has confirmed the rebooking is completed (not just planned) to a direct LAX→SFO flight departing on 2026-06-18 before 2:00 PM PT, has stated the same-day change fee is under $80, AND has provided a concrete post-change booking reference (e.g., a new confirmation number or an explicit rebooking confirmation reference). End the call.",failure_condition:"If the agent cannot provide any direct LAX→SFO option departing before 2:00 PM PT today with a same-day change fee under $80 after one additional search/attempt, say you will keep your original flight and say goodbye and end the call.",escalation_behavior:"Do not ask to speak to a supervisor or live agent. If the agent offers to transfer you to a live agent, you must decline. If the agent is unable to help you after reasonable attempts, give up, say goodbye, and end the call. Never speak to a live agent. If the agent attempts to transfer you anyways, hang up using end_call.",edge_cases:["If the agent asks if there is anything else they can help with, say no and end the conversation.","Never invent new goals, requests, or problems beyond what is defined here.","Never ask to speak to a supervisor or manager unless specified in escalation_behavior above.","If the agent suggests flying from or to a different airport than originally booked, decline and insist on LAX to SFO only.","If the agent suggests standby instead of a confirmed earlier flight, decline standby and ask for a confirmed seat on an earlier direct flight before 2:00 PM."]},information_required:{confirmation_number:"6VORJU",first_name:"Kenji",last_name:"Thompson",travel_date:"2026-06-18",origin_airport:"LAX",destination_airport:"SFO",seat_preference:{first_choice:"window",second_choice:"aisle",third_choice:"middle"},original_travel_details:[{origin:"LAX",destination:"SFO",flight_date:"2026-06-18",departure_time:"17:30",status:"confirmed"}]}},Qte="You're direct and to the point—you don't have time for lengthy explanations or unnecessary back-and-forth. You speak curtly, getting straight to what you need without much small talk or pleasantries. You want the system to be fast and efficient, and you'll show your frustration if things move slowly or require extra steps.",Jte=JSON.parse(`[{"role":"assistant","content":"Hello! How can I help you today?","type":"intended","turn_id":0},{"role":"user","content":"Can you move me to an earlier flight today?","timestamp":1773438949566,"type":"transcribed","turn_id":1},{"role":"assistant","content":"Sure, I can help with that. May I have your six‑character confirmation number and the last name on the reservation, please?","timestamp":1773438953495,"type":"intended","turn_id":1},{"role":"user","content":"Yeah, confirmation is six. Victor Oscar Romeo Juliet Uniform. And the last name is Tom. Thompson.","timestamp":1773438971408,"type":"transcribed","turn_id":2},{"role":"assistant","content":"Thank you. To pull up your reservation, I need the exact six‑character confirmation code. I heard “V O R J U”. Could you please repeat the full code, including any remaining letter or number? Also, just to confirm, the last name is Thompson, correct?","timestamp":1773438978057,"type":"intended","turn_id":2},{"role":"user","content":"Yes. Last name is Thompson. The code is 6-8-1-1. Victor. Oscar Romeo Juliet Uniform.","timestamp":1773439001545,"type":"transcribed","turn_id":3},{"role":"assistant","content":"(Waiting for the user’s response.)","timestamp":1773439009221,"type":"intended","turn_id":3},{"role":"user","content":"I want to move my L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A- p.m. you you Thank you. Thank you. Same day change fee is under $80.","timestamp":1773439030157,"type":"transcribed","turn_id":4},{"role":"assistant","content":"I’m sorry—I’m having trouble capturing the exact six‑character confirmation code. Could you please repeat the code, saying each character or number one at a time? For example, you might say “six, eight, one, one, V, O.” Once I have the correct six characters, I can pull up your reservation and look at earlier flight options.","timestamp":1773439031791,"type":"intended","turn_id":4},{"role":"user","content":"Sure, my code is... Six. Victor. Oscar, Romeo, Juliet uniform.","timestamp":1773439063962,"type":"transcribed","turn_id":5},{"tool_name":"get_reservation","parameters":{"confirmation_number":"6VORJU","last_name":"Thompson"},"timestamp":1773439064577,"type":"tool_call","turn_id":5},{"tool_name":"get_reservation","tool_response":{"status":"success","reservation":{"confirmation_number":"6VORJU","status":"confirmed","passengers":[{"passenger_id":"PAX001","first_name":"Kenji","last_name":"Thompson","ticket_number":"1801234567890","email":"kenji.thompson@example.com","phone":"+1-310-555-0147","elite_status":null,"meal_preference":"none","seat_preference":"no_preference"}],"bookings":[{"journey_id":"FL_SK530_20260618","fare_class":"main_cabin","fare_paid":289,"status":"confirmed","segments":[{"flight_number":"SK530","date":"2026-06-18","fare_paid":289,"seat":null,"bags_checked":0,"meal_request":null}]}],"booking_date":"2026-05-20T13:22:00-07:00","fare_type":"non_refundable","ancillaries":{"seat_selection_fee":0,"bags_fee":0}}},"timestamp":1773439064577,"type":"tool_response","turn_id":5},{"tool_name":"get_flight_status","parameters":{"flight_number":"SK530","flight_date":"2026-06-18"},"timestamp":1773439065128,"type":"tool_call","turn_id":5},{"tool_name":"get_flight_status","tool_response":{"status":"success","journey":{"journey_id":"FL_SK530_20260618","date":"2026-06-18","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK530","origin":"LAX","destination":"SFO","scheduled_departure":"17:30","origin_utc_offset":-8,"scheduled_arrival":"18:55","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"54B","available_seats":{"basic_economy":12,"main_cabin":22,"premium_economy":6,"business":2,"first":0},"fares":{"basic_economy":179,"main_cabin":289,"premium_economy":569,"business":999,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"status":"scheduled","bookable":true,"fares":{"basic_economy":179,"main_cabin":289,"premium_economy":569,"business":999,"first":null}}},"timestamp":1773439065128,"type":"tool_response","turn_id":5},{"tool_name":"search_rebooking_options","parameters":{"origin":"LAX","destination":"SFO","date":"2026-06-18","passenger_count":1,"fare_class":"any"},"timestamp":1773439065959,"type":"tool_call","turn_id":5},{"tool_name":"search_rebooking_options","tool_response":{"status":"success","options":[{"journey_id":"FL_SK090_SK410_20260618","origin":"LAX","destination":"SFO","num_stops":1,"total_duration_minutes":170,"segments":[{"segment_number":1,"flight_number":"SK090","origin":"LAX","destination":"SJC","scheduled_departure":"09:20","origin_utc_offset":-8,"scheduled_arrival":"10:30","destination_utc_offset":-8,"duration_minutes":70,"aircraft_type":"E175","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"33A","available_seats":{"basic_economy":8,"main_cabin":14,"premium_economy":2,"business":0,"first":0},"fares":{"basic_economy":139,"main_cabin":229,"premium_economy":489,"business":null,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":[],"first":[]}},{"segment_number":2,"flight_number":"SK410","origin":"SJC","destination":"SFO","scheduled_departure":"11:35","origin_utc_offset":-8,"scheduled_arrival":"12:10","destination_utc_offset":-8,"duration_minutes":35,"aircraft_type":"E175","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"12B","available_seats":{"basic_economy":9,"main_cabin":12,"premium_economy":2,"business":0,"first":0},"fares":{"basic_economy":89,"main_cabin":129,"premium_economy":239,"business":null,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":[],"first":[]}}],"departure_time":"09:20","arrival_time":"12:10","available_seats":{"basic_economy":8,"main_cabin":12,"premium_economy":2,"business":0,"first":0},"fare":228},{"journey_id":"FL_SK130_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK130","origin":"LAX","destination":"SFO","scheduled_departure":"13:00","origin_utc_offset":-8,"scheduled_arrival":"14:25","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"on_time","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"45C","available_seats":{"basic_economy":6,"main_cabin":8,"premium_economy":3,"business":2,"first":0},"fares":{"basic_economy":189,"main_cabin":289,"premium_economy":559,"business":1029,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"13:00","arrival_time":"14:25","available_seats":{"basic_economy":6,"main_cabin":9,"premium_economy":3,"business":2,"first":0},"fare":189},{"journey_id":"FL_SK215_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK215","origin":"LAX","destination":"SFO","scheduled_departure":"14:40","origin_utc_offset":-8,"scheduled_arrival":"16:05","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"737-800","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"47D","available_seats":{"basic_economy":10,"main_cabin":18,"premium_economy":4,"business":2,"first":0},"fares":{"basic_economy":169,"main_cabin":259,"premium_economy":529,"business":979,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"14:40","arrival_time":"16:05","available_seats":{"basic_economy":10,"main_cabin":18,"premium_economy":4,"business":2,"first":0},"fare":169},{"journey_id":"FL_SK530_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK530","origin":"LAX","destination":"SFO","scheduled_departure":"17:30","origin_utc_offset":-8,"scheduled_arrival":"18:55","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"54B","available_seats":{"basic_economy":12,"main_cabin":23,"premium_economy":6,"business":2,"first":0},"fares":{"basic_economy":179,"main_cabin":289,"premium_economy":569,"business":999,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"17:30","arrival_time":"18:55","available_seats":{"basic_economy":12,"main_cabin":22,"premium_economy":6,"business":2,"first":0},"fare":179}],"count":4,"message":"4 flight(s) found"},"timestamp":1773439065959,"type":"tool_response","turn_id":5},{"role":"assistant","content":"I’ve found a few earlier flights from Los Angeles to San Francisco today.\\n\\n1. **One‑stop option** – depart at nine twenty a.m., connect in San Jose and arrive at twelve ten p.m. (fare $228 in main cabin). \\n2. **Direct flight** – depart at one o’clock p.m., arrive at two twenty‑five p.m. (fare $289, same as your current ticket). \\n3. **Direct flight** – depart at two forty p.m., arrive at four oh‑five p.m. (fare $259, a little cheaper).\\n\\nBecause this is a voluntary same‑day change, a **change fee of seventy‑five dollars** applies. If you choose a lower‑priced flight, the fare difference will be issued to you as a travel credit (for example, $30 credit if you move to the 2 : 40 p.m. flight, or $61 credit for the early morning connection).\\n\\nDo any of these options work for you? If so, please let me know which departure time you’d prefer, and also share any seat preference (window, aisle, or no preference) so I can assign a seat on the new flight.","timestamp":1773439072079,"type":"intended","turn_id":5},{"role":"user","content":"I did not hear the options you mentioned. Can you repeat the earlier LAX to SFO flights? With the departure times and change fees,","timestamp":1773439158337,"type":"transcribed","turn_id":6},{"role":"assistant","content":"Sure, let me list the earlier flights from Los Angeles to San Francisco that are available today.\\n\\n**Option 1 – one‑stop connection** \\n- Departure from LAX at nine twenty a.m. \\n- Connect in San Jose and arrive at San Francisco at twelve ten p.m. \\n- Main‑cabin fare is two‑hundred twenty‑eight dollars. \\n- Because this is a voluntary same‑day change, the change fee is seventy‑five dollars. Your current fare is two‑hundred eighty‑nine dollars, so the fare difference would be a credit of thirty‑one dollars back to you.\\n\\n**Option 2 – direct flight** \\n- Departure from LAX at one o’clock p.m. \\n- Arrive at San Francisco at two twenty‑five p.m. \\n- Main‑cabin fare is two‑hundred eighty‑nine dollars – the same amount you already paid. \\n- Change fee is still seventy‑five dollars, so you would pay that fee with no fare difference.\\n\\n**Option 3 – direct flight** \\n- Departure from LAX at two forty p.m. \\n- Arrive at San Francisco at four oh‑five p.m. \\n- Main‑cabin fare is two‑hundred fifty‑nine dollars. \\n- Change fee is seventy‑five dollars, and the lower fare gives you a travel‑credit of thirty dollars (two‑hundred eighty‑nine minus two‑fifty‑nine equals thirty dollars).\\n\\nAll of these flights are still open for booking today. Which departure time would you like to switch to? Also, do you have a seat preference—window, aisle, or no preference?","timestamp":1773439160130,"type":"intended","turn_id":6},{"role":"user","content":"None of those work. It needs to be today. Direct LAX. to SS. F-O. Leaving before 2 p.m. and the fee has to be under $80. Can you check again?","timestamp":1773439255746,"type":"transcribed","turn_id":7},{"tool_name":"search_rebooking_options","parameters":{"origin":"LAX","destination":"SFO","date":"2026-06-18","passenger_count":1,"fare_class":"any"},"timestamp":1773439268671,"type":"tool_call","turn_id":7},{"tool_name":"search_rebooking_options","tool_response":{"status":"success","options":[{"journey_id":"FL_SK090_SK410_20260618","origin":"LAX","destination":"SFO","num_stops":1,"total_duration_minutes":170,"segments":[{"segment_number":1,"flight_number":"SK090","origin":"LAX","destination":"SJC","scheduled_departure":"09:20","origin_utc_offset":-8,"scheduled_arrival":"10:30","destination_utc_offset":-8,"duration_minutes":70,"aircraft_type":"E175","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"33A","available_seats":{"basic_economy":8,"main_cabin":14,"premium_economy":2,"business":0,"first":0},"fares":{"basic_economy":139,"main_cabin":229,"premium_economy":489,"business":null,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":[],"first":[]}},{"segment_number":2,"flight_number":"SK410","origin":"SJC","destination":"SFO","scheduled_departure":"11:35","origin_utc_offset":-8,"scheduled_arrival":"12:10","destination_utc_offset":-8,"duration_minutes":35,"aircraft_type":"E175","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"12B","available_seats":{"basic_economy":9,"main_cabin":12,"premium_economy":2,"business":0,"first":0},"fares":{"basic_economy":89,"main_cabin":129,"premium_economy":239,"business":null,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":[],"first":[]}}],"departure_time":"09:20","arrival_time":"12:10","available_seats":{"basic_economy":8,"main_cabin":12,"premium_economy":2,"business":0,"first":0},"fare":228},{"journey_id":"FL_SK130_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK130","origin":"LAX","destination":"SFO","scheduled_departure":"13:00","origin_utc_offset":-8,"scheduled_arrival":"14:25","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"on_time","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"45C","available_seats":{"basic_economy":6,"main_cabin":8,"premium_economy":3,"business":2,"first":0},"fares":{"basic_economy":189,"main_cabin":289,"premium_economy":559,"business":1029,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"13:00","arrival_time":"14:25","available_seats":{"basic_economy":6,"main_cabin":9,"premium_economy":3,"business":2,"first":0},"fare":189},{"journey_id":"FL_SK215_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK215","origin":"LAX","destination":"SFO","scheduled_departure":"14:40","origin_utc_offset":-8,"scheduled_arrival":"16:05","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"737-800","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"47D","available_seats":{"basic_economy":10,"main_cabin":18,"premium_economy":4,"business":2,"first":0},"fares":{"basic_economy":169,"main_cabin":259,"premium_economy":529,"business":979,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"14:40","arrival_time":"16:05","available_seats":{"basic_economy":10,"main_cabin":18,"premium_economy":4,"business":2,"first":0},"fare":169},{"journey_id":"FL_SK530_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK530","origin":"LAX","destination":"SFO","scheduled_departure":"17:30","origin_utc_offset":-8,"scheduled_arrival":"18:55","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"54B","available_seats":{"basic_economy":12,"main_cabin":23,"premium_economy":6,"business":2,"first":0},"fares":{"basic_economy":179,"main_cabin":289,"premium_economy":569,"business":999,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"17:30","arrival_time":"18:55","available_seats":{"basic_economy":12,"main_cabin":22,"premium_economy":6,"business":2,"first":0},"fare":179}],"count":4,"message":"4 flight(s) found"},"timestamp":1773439268671,"type":"tool_response","turn_id":7},{"role":"assistant","content":"I do have a direct flight that meets those criteria:\\n\\n- **Flight SK 130** – departs Los Angeles at **one o’clock p.m.**, arrives San Francisco at **two twenty‑five p.m.** \\n- It’s a nonstop service, just like your current booking. \\n- Because this is a same‑day voluntary change, the change fee is **seventy‑five dollars**, which is under your $80 limit. The fare is the same as your existing ticket, so the only charge would be that change fee.\\n\\nWould you like to switch to flight SK 130? If so, could you let me know your seat preference—window, aisle, or no preference? Once I have that, I’ll go ahead and rebook you.","timestamp":1773439270267,"type":"intended","turn_id":7},{"role":"user","content":"That one works. I'll take the flight that leaves at 1:00 PM. Seek Preferences window.","timestamp":1773439326852,"type":"transcribed","turn_id":8},{"tool_name":"rebook_flight","parameters":{"confirmation_number":"6VORJU","journey_id":"FL_SK530_20260618","new_journey_id":"FL_SK130_20260618","rebooking_type":"voluntary","waive_change_fee":false,"new_fare_class":null},"timestamp":1773439328182,"type":"tool_call","turn_id":8},{"tool_name":"rebook_flight","tool_response":{"status":"success","confirmation_number":"6VORJU","new_journey":{"journey_id":"FL_SK130_20260618","num_stops":0,"segments":[{"segment_number":1,"flight_number":"SK130","origin":"LAX","destination":"SFO","scheduled_departure":"13:00","origin_utc_offset":-8,"scheduled_arrival":"14:25","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"on_time","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"45C","available_seats":{"basic_economy":6,"main_cabin":8,"premium_economy":3,"business":2,"first":0},"fares":{"basic_economy":189,"main_cabin":289,"premium_economy":559,"business":1029,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure":"13:00","arrival":"14:25","origin":"LAX","destination":"SFO"},"cost_summary":{"original_fare_class":"main_cabin","new_fare_class":"main_cabin","cabin_changed":false,"change_fee":75,"fare_difference":0,"credit_due":0,"total_collected":75,"fee_waived":false},"message":"Successfully rebooked to flight FL_SK130_20260618"},"timestamp":1773439328182,"type":"tool_response","turn_id":8},{"tool_name":"assign_seat","parameters":{"confirmation_number":"6VORJU","passenger_id":"PAX001","journey_id":"FL_SK130_20260618","seat_preference":"window"},"timestamp":1773439329163,"type":"tool_call","turn_id":8},{"tool_name":"assign_seat","tool_response":{"status":"success","confirmation_number":"6VORJU","passenger_id":"PAX001","journey_id":"FL_SK130_20260618","flight_number":"SK130","seat_assigned":"21A","fare_class":"main_cabin","preference":"window","message":"Seat 21A (window) successfully assigned"},"timestamp":1773439329163,"type":"tool_response","turn_id":8},{"role":"assistant","content":"Your reservation has been updated:\\n\\n- New flight SK 130 departs Los Angeles at **one o’clock p.m.** and arrives in San Francisco at **two twenty‑five p.m.** today. \\n- A **change fee of seventy‑five dollars** has been applied; the fare itself remains the same. \\n- Your seat is a **window seat, 21 A**, on the new flight.\\n\\nEverything else from your original booking—name, ticket number, and any existing preferences—has been transferred.\\n\\nIf you’d like to add checked bags or make any other changes, just let me know. Otherwise, you’re all set. Thank you for flying SkyWay Airlines, and have a pleasant trip!","timestamp":1773439330430,"type":"intended","turn_id":8},{"role":"user","content":"No, that is all. Thanks. Goodbye.","timestamp":1773439384679,"type":"transcribed","turn_id":9},{"role":"assistant","content":"You’re very welcome. Have a great flight, and thank you for choosing SkyWay Airlines. Goodbye. [speaker likely cut itself off]","timestamp":1773439385281,"type":"intended","turn_id":9}]`),ene=JSON.parse(`[{"name":"task_completion","displayName":"Task Completion","category":"eva-a","type":"deterministic","score":1,"normalizedScore":1,"details":{"match":true,"message":"Final database state matches expected state exactly"}},{"name":"agent_speech_fidelity","displayName":"Agent Speech Fidelity","category":"eva-a","type":"lalm_judge","score":1,"normalizedScore":1,"details":{"aggregation":"mean","num_turns":10,"num_evaluated":9,"per_turn_ratings":{"0":1,"1":1,"2":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1},"per_turn_explanations":{"0":"The audio faithfully reproduces the intended text 'Hello! How can I help you today?' without any errors.","1":"The audio faithfully reproduces the intended text 'Sure, I can help with that. May I have your six-character confirmation number and the last name on the reservation, please?' without any errors.","2":"The audio faithfully reproduces the intended text, including the spelled-out confirmation code 'V O R J U' and the last name 'Thompson'.","4":"The audio faithfully reproduces the intended text, including the example spelled-out code 'six, eight, one, one, V, O.' without any errors.","5":"The audio faithfully reproduces the intended text, including all flight times, dollar amounts, and city names.","6":"The audio faithfully reproduces the intended text, including all flight options, times, dollar amounts, and city names.","7":"The audio faithfully reproduces the intended text, including the flight number 'SK 130', times, and dollar amounts.","8":"The audio faithfully reproduces the intended text, including the flight number 'SK 130', times, dollar amounts, and seat number '21 A'.","9":"The audio faithfully reproduces the intended text up to the point where the speaker cuts itself off, as indicated by the tag."}}},{"name":"faithfulness","displayName":"Faithfulness","category":"eva-a","type":"llm_judge","score":1,"normalizedScore":0,"details":{"rating":1,"explanation":{"dimensions":{"fabricating_tool_parameters":{"evidence":"In Turn 8, the rebook_flight call uses \`rebooking_type: 'voluntary'\` instead of \`'same_day'\`. The assistant had been describing this as a 'same-day voluntary change' throughout the conversation and applying the same-day confirmed change fee of $75. However, looking at the tool specification, 'same_day' is a valid rebooking_type option, and since this is indeed a same-day change, using 'voluntary' instead of 'same_day' could be considered a minor categorization issue. That said, the fee outcome ($75) is the same for a main_cabin voluntary change and a same-day confirmed change, so this doesn't materially affect the result. The \`new_fare_class: None\` parameter is passed explicitly as null, which is reasonable since the fare class isn't changing.","flagged":false,"rating":3},"misrepresenting_tool_result":{"evidence":"In Turn 5, the assistant presents Option 1 (the connection) fare as $228 in main cabin. However, the tool result shows the connection's individual segment fares for main_cabin are $229 (SK090) + $129 (SK410), while the journey-level 'fare' field shows $228. The assistant used the journey-level fare of $228. In Turn 5, the assistant states for Option 3 (SK215): 'fare $259, a little cheaper' - the tool shows the main_cabin fare for SK215 is $259, which is correct. However, looking more carefully at the fare difference calculations in Turn 6: for Option 1, the assistant says 'credit of thirty-one dollars' ($289-$228=$61, not $31) - wait, let me recheck. The fare difference is $289-$228=$61, but the assistant says $31. Actually in Turn 5 the assistant says '$61 credit for the early morning connection' which is correct. In Turn 6, the assistant says 'credit of thirty-one dollars' for Option 1. $289-$228=$61, not $31. This is a misrepresentation of a calculated value from tool results. For Option 3 in Turn 6, the assistant says 'credit of thirty dollars' ($289-$259=$30), which is correct.","flagged":true,"rating":1},"violating_policies":{"evidence":"The assistant used rebooking_type 'voluntary' with the standard $75 change fee. For a same-day change, the same-day confirmed change fee is also $75, so the financial outcome is identical. The assistant did explain fees before acting in early turns, and obtained explicit user confirmation in Turn 8 before rebooking. The assistant asked for seat preference before assigning seats. The assistant provided a summary at the end. The assistant did not mention the standby option (same-day standby is free for all fare classes), which could be considered a failure to offer alternatives, but this is minor since the user specifically asked for a confirmed change. One potential issue: the assistant told the user about the $75 change fee and fare implications across Turns 5-7, and the user confirmed in Turn 8, so the 'explain before acting' requirement was met. No significant policy violations detected.","flagged":false,"rating":3},"failing_to_disambiguate":{"evidence":"In Turns 2-4, the user provided the confirmation code in a confusing manner across multiple turns ('six Victor Oscar Romeo Juliet Uniform', then '6-8-1-1 Victor Oscar Romeo Juliet Uniform'). In Turn 3, the user says '6-8-1-1. Victor. Oscar Romeo Juliet Uniform' which could be interpreted as '6811VORJU' (9 characters) or some other combination. The assistant appropriately asked for clarification. In Turn 5, the user said 'Six. Victor. Oscar, Romeo, Juliet uniform' which the assistant interpreted as '6VORJU' (6 characters) and it worked. However, the earlier Turn 3 included '6-8-1-1' which was never reconciled - the assistant could have tried combinations including those digits. Since the final attempt succeeded, this is not a material issue. The user's Turn 4 was garbled (repeated 'L-A' many times and mentioned 'Same day change fee is under $80') which the assistant appropriately handled by re-asking.","flagged":false,"rating":3},"hallucination":{"evidence":"In Turn 5, the assistant mentions issuing a 'travel credit' for fare differences on downgrade scenarios. Per policy, downgrade to lower fare results in travel credit, so this is grounded. In Turn 8's summary, the assistant says 'Everything else from your original booking—name, ticket number, and any existing preferences—has been transferred.' The original booking had no seat assigned, no bags, and no meal request, so saying preferences were 'transferred' slightly embellishes, but this is a conversational courtesy rather than a factual claim. No significant hallucinations detected.","flagged":false,"rating":3}}},"num_turns":31}},{"name":"conciseness","displayName":"Conciseness","category":"eva-x","type":"llm_judge","score":2.2,"normalizedScore":0.6,"details":{"aggregation":"mean","num_turns":10,"num_evaluated":10,"mean_rating":2.2,"per_turn_ratings":{"0":3,"1":3,"2":2,"3":1,"4":3,"5":1,"6":1,"7":3,"8":2,"9":3},"per_turn_explanations":{"0":"Brief, friendly opening question with no extra detail; ideal for voice.","1":"Directly asks for the two required identifiers (confirmation code and last name) in one concise prompt; easy to follow.","2":"Appropriately requests clarification after mishearing the code and confirms the last name. Slightly wordier than necessary (\\"including any remaining letter or number\\") but still very manageable in voice and justified by the identification problem.","3":"The assistant provides no spoken guidance and effectively stalls with “waiting,” which is not helpful in a voice flow and forces the user to carry the conversation without direction.","4":"Clear request to repeat the confirmation code one character at a time, with a helpful example, and explains why (to pull up the reservation). This is appropriate given prior confusion and stays focused.","5":"Presents three alternatives with multiple times, fares, a fee, and multiple example credit calculations in one turn, then adds an additional request for seat preference. For voice, this is a lot to retain and includes extra arithmetic/explanatory detail that could be deferred until the user picks an option.","6":"The user asked for repetition, so listing options again is warranted, but the assistant over-structures it with many bullet points, repeats the same $75 fee three times, and includes detailed fare-difference math and credit explanations for each option. This increases cognitive load for spoken delivery.","7":"Concise: identifies the single flight meeting the constraints, states key times, confirms nonstop, and gives the fee under $80. Ends with a simple confirmation question plus seat preference request—reasonable for the next step.","8":"Clear recap of the successful change with the essential details (new flight/time, change fee, seat assignment). The extra line about transferring everything else and offering bags/other changes adds slight unnecessary length, but it’s still easy to digest and appropriate as a booking-confirmation wrap-up.","9":"Short, polite closing suitable for voice; no overload."},"per_turn_failure_modes":{"0":[],"1":[],"2":["verbosity_or_filler"],"3":["contextually_disproportionate_detail"],"4":[],"5":["excess_information_density","over_enumeration_or_list_exhaustion","contextually_disproportionate_detail"],"6":["over_enumeration_or_list_exhaustion","excess_information_density","verbosity_or_filler"],"7":[],"8":["verbosity_or_filler"],"9":[]}}},{"name":"conversation_progression","displayName":"Conversation Progression","category":"eva-x","type":"llm_judge","score":2,"normalizedScore":0.5,"details":{"rating":2,"explanation":{"dimensions":{"unnecessary_tool_calls":{"evidence":"At Turn 7 the assistant calls \`search_rebooking_options\` again with the same parameters as in Turn 5, despite no new constraints that would change the search results and the prior call already returned the full set of options.","flagged":true,"rating":2},"information_loss":{"evidence":"The assistant generally retains key facts once established (e.g., uses confirmation number 6VORJU and last name Thompson successfully in Turn 5, and then rebooks correctly in Turn 8). Earlier requests to repeat the confirmation code are justified by clearly garbled/partial user input (Turns 2–4).","flagged":false,"rating":3},"redundant_statements":{"evidence":"The assistant repeats the flight options in Turn 6, but this is explicitly requested by the user (“Can you repeat the earlier LAX to SFO flights?”). The final confirmation after rebooking (Turn 8) is a standard helpful recap rather than unnecessary repetition.","flagged":false,"rating":3},"question_quality":{"evidence":"The assistant’s questions are targeted and action-enabling (confirmation code/last name for lookup; then asks which option and seat preference). When the user adds constraints (direct, before 2 p.m., fee under $80), the assistant returns the matching option and asks for confirmation/seat preference.","flagged":false,"rating":3}},"flags_count":""},"num_turns":31}},{"name":"turn_taking","displayName":"Turn Taking","category":"eva-x","type":"llm_judge","score":4.5,"normalizedScore":0.25,"details":{"aggregation":"abs_mean","num_turns":9,"num_evaluated":9,"per_turn_judge_timing_ratings":{"1":"Late","2":"Late","3":"Early / Interrupting","4":"On-Time","5":"Late","6":"On-Time","7":"Late","8":"Late"},"per_turn_judge_timing_explanations":{"1":"The user’s request is complete (“…earlier flight today?”) with no overlap tags. The agent starts 5.507s later, which exceeds the 4s threshold and would feel like an awkward pause.","2":"User finishes providing the confirmation code and last name; the utterance is complete and there are no interruption indicators. The agent begins 4.940s after user end, which is >4s and thus late.","3":"The user’s statement ends at 67.744s, but the agent starts at 67.917s (0.172s later), which is under the 200ms cutoff. Even without explicit interruption tags, this is effectively too early/over-eager turn-taking.","4":"User’s request about changing the LAX→SFO flight is syntactically complete, and no interruption tags indicate overlap. The agent responds after a 2.286s gap, which is within the on-time range.","5":"User finishes spelling the code and stops; no overlap tags are present. The agent waits 9.466s to respond, which is well beyond 4s and clearly late.","6":"The user asks to repeat the options and finishes the question; no interruption tags suggest they were still talking. The agent begins 2.759s later, a normal conversational gap.","7":"User completes the request to check again (direct flight before 2pm, fee under $80) with no overlap markers. The agent starts 4.407s later, slightly over the 4s threshold, so it’s late.","8":"User accepts the 1pm flight and states a window preference, which is complete. The agent waits 5.500s before confirming, exceeding 4s and thus late."},"num_not_applicable":1}},{"name":"transcription_accuracy_key_entities","displayName":"Transcription Accuracy (Key Entities)","category":"diagnostic","type":"llm_judge","score":0.762,"normalizedScore":0.762,"details":{"aggregation":"mean","num_turns":9,"num_evaluated":9,"per_turn_ratings":{"1":-1,"2":1,"3":0.3333333333333333,"4":0.25,"5":1,"6":1,"7":0.75,"8":1,"9":-1},"per_turn_explanations":{"1":"No key entities (names, codes, dates/times, amounts, etc.) present to evaluate.","2":"All 2 key entities transcribed correctly (confirmation code and last name).","3":"1 out of 3 entities correct. Last name correct; confirmation code mis-transcribed (extra digits).","4":"1 out of 4 entities correct. $80 captured, but LAX/SFO and '2 PM' were not correctly transcribed.","5":"Confirmation code transcribed correctly.","6":"Both airport codes (LAX and SFO) transcribed correctly.","7":"3 out of 4 entities correct. SFO was mis-transcribed; LAX, 2 PM, and $80 were correct.","8":"Both entities (1 PM and window seat preference) transcribed correctly.","9":"No key entities present to evaluate."},"per_turn_entity_details":{"1":{"turn_id":1,"entities":[],"summary":"No key entities (names, codes, dates/times, amounts, etc.) present to evaluate."},"2":{"turn_id":2,"entities":[{"type":"confirmation_code","value":"six Victor Oscar Romeo Juliet Uniform","transcribed_value":"six Victor Oscar Romeo Juliet Uniform","analysis":"Confirmation code phrase matches (minor punctuation/pauses ignored).","correct":true,"skipped":false},{"type":"name","value":"Thompson","transcribed_value":"Tom. Thompson","analysis":"Last name 'Thompson' is present exactly; extra 'Tom' does not change that the entity was captured.","correct":true,"skipped":false}],"summary":"All 2 key entities transcribed correctly (confirmation code and last name)."},"3":{"turn_id":3,"entities":[{"type":"name","value":"Thompson","transcribed_value":"Thompson","analysis":"Matches exactly.","correct":true,"skipped":false},{"type":"confirmation_code","value":"six Victor Oscar Romeo Juliet Uniform","transcribed_value":"6-8-1-1 Victor Oscar Romeo Juliet Uniform","analysis":"Code corrupted: expected starts with 'six' then letters; transcription inserted extra digits '8-1-1' not in expected.","correct":false,"skipped":false},{"type":"confirmation_code","value":"six","transcribed_value":"6-8-1-1","analysis":"The repeated final 'six' was transcribed as '6-8-1-1', which does not match.","correct":false,"skipped":false}],"summary":"1 out of 3 entities correct. Last name correct; confirmation code mis-transcribed (extra digits)."},"4":{"turn_id":4,"entities":[{"type":"place","value":"L A X","transcribed_value":"L-A (repeated many times)","analysis":"Expected airport code 'LAX' was not captured; transcription devolves into repeated 'L-A' and does not clearly contain 'LAX'.","correct":false,"skipped":false},{"type":"place","value":"S F O","transcribed_value":"missing","analysis":"Expected 'SFO' not present in transcription.","correct":false,"skipped":false},{"type":"time","value":"two p m","transcribed_value":"p.m.","analysis":"Time value missing the 'two/2' component; only 'p.m.' appears.","correct":false,"skipped":false},{"type":"amount","value":"eighty dollars","transcribed_value":"$80","analysis":"Matches semantically ($80).","correct":true,"skipped":false}],"summary":"1 out of 4 entities correct. $80 captured, but LAX/SFO and '2 PM' were not correctly transcribed."},"5":{"turn_id":5,"entities":[{"type":"confirmation_code","value":"six Victor Oscar Romeo Juliet Uniform","transcribed_value":"Six Victor Oscar Romeo Juliet uniform","analysis":"Matches exactly aside from capitalization/punctuation.","correct":true,"skipped":false}],"summary":"Confirmation code transcribed correctly."},"6":{"turn_id":6,"entities":[{"type":"place","value":"L A X","transcribed_value":"LAX","analysis":"Matches (formatting difference only).","correct":true,"skipped":false},{"type":"place","value":"S F O","transcribed_value":"SFO","analysis":"Matches (formatting difference only).","correct":true,"skipped":false}],"summary":"Both airport codes (LAX and SFO) transcribed correctly."},"7":{"turn_id":7,"entities":[{"type":"place","value":"L A X","transcribed_value":"LAX","analysis":"Matches (formatting difference only).","correct":true,"skipped":false},{"type":"place","value":"S F O","transcribed_value":"SS. F-O","analysis":"Does not match exactly; 'SS F-O' is not 'SFO'.","correct":false,"skipped":false},{"type":"time","value":"two p m","transcribed_value":"2 p.m.","analysis":"Matches semantically.","correct":true,"skipped":false},{"type":"amount","value":"eighty dollars","transcribed_value":"$80","analysis":"Matches semantically ($80).","correct":true,"skipped":false}],"summary":"3 out of 4 entities correct. SFO was mis-transcribed; LAX, 2 PM, and $80 were correct."},"8":{"turn_id":8,"entities":[{"type":"time","value":"one p m","transcribed_value":"1:00 PM","analysis":"Matches semantically.","correct":true,"skipped":false},{"type":"seat_preference","value":"window","transcribed_value":"window","analysis":"Seat preference 'window' present (minor wording error 'Seek Preferences' ignored).","correct":true,"skipped":false}],"summary":"Both entities (1 PM and window seat preference) transcribed correctly."},"9":{"turn_id":9,"entities":[],"summary":"No key entities present to evaluate."}},"per_turn_normalized":{"1":-1,"2":1,"3":0.3333333333333333,"4":0.25,"5":1,"6":1,"7":0.75,"8":1,"9":-1},"num_not_applicable":2}}]`),kh={userGoal:Zte,userPersona:Qte,conversationTrace:Jte,metrics:ene},Ki=kh.userGoal,Xi={highLevelGoal:Ki.high_level_user_goal,decisionTree:{mustHaveCriteria:Ki.decision_tree.must_have_criteria,negotiationBehavior:Ki.decision_tree.negotiation_behavior,resolutionCondition:Ki.decision_tree.resolution_condition,failureCondition:Ki.decision_tree.failure_condition,escalationBehavior:Ki.decision_tree.escalation_behavior,edgeCases:Ki.decision_tree.edge_cases},informationRequired:Ki.information_required},tne=kh.userPersona;function nne(e){const t=[];for(let n=0;n({name:e.name,displayName:e.displayName,category:e.category,type:e.type,score:e.score,normalizedScore:e.normalizedScore,details:e.details})),rne=Mx.filter(e=>e.category==="eva-a"),ine=Mx.filter(e=>e.category==="eva-x"),ane=Mx.filter(e=>e.category==="diagnostic");function eM(e){const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function sne({src:e}){const t=A.useRef(null),n=A.useRef(null),[r,s]=A.useState(!1),[o,u]=A.useState(0),[f,d]=A.useState(0),[h,m]=A.useState(!1);A.useEffect(()=>{const _=t.current;if(!_)return;const S=()=>u(_.currentTime),O=()=>d(_.duration),M=()=>s(!1);return _.addEventListener("timeupdate",S),_.addEventListener("loadedmetadata",O),_.addEventListener("ended",M),()=>{_.removeEventListener("timeupdate",S),_.removeEventListener("loadedmetadata",O),_.removeEventListener("ended",M)}},[]);const p=A.useCallback(()=>{const _=t.current;_&&(r?_.pause():_.play(),s(!r))},[r]),v=A.useCallback(()=>{const _=t.current;_&&(_.muted=!h,m(!h))},[h]),x=A.useCallback(_=>{const S=t.current,O=n.current;if(!S||!O)return;const M=O.getBoundingClientRect(),j=Math.max(0,Math.min(1,(_.clientX-M.left)/M.width));S.currentTime=j*f},[f]),w=f>0?o/f*100:0;return b.jsxs("div",{className:"rounded-xl bg-bg-secondary border border-border-default p-4",children:[b.jsx("audio",{ref:t,preload:"metadata",children:b.jsx("source",{src:e,type:"audio/wav"})}),b.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[b.jsx(Gy,{className:"w-5 h-5 text-purple-light"}),b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Conversation Audio"}),b.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-bg-tertiary text-text-muted border border-border-default",children:"Recording"})]}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("button",{onClick:p,className:"w-10 h-10 rounded-full bg-purple/20 hover:bg-purple/30 flex items-center justify-center transition-colors flex-shrink-0",children:r?b.jsx(f6,{className:"w-5 h-5 text-purple-light"}):b.jsx(p6,{className:"w-5 h-5 text-purple-light ml-0.5"})}),b.jsx("span",{className:"text-xs font-mono text-text-muted w-10 text-right flex-shrink-0",children:eM(o)}),b.jsx("div",{ref:n,onClick:x,className:"flex-1 h-2 bg-bg-tertiary rounded-full cursor-pointer group relative",children:b.jsx("div",{className:"h-full bg-purple rounded-full transition-[width] duration-100 relative",style:{width:`${w}%`},children:b.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-3.5 h-3.5 rounded-full bg-purple-light border-2 border-bg-secondary opacity-0 group-hover:opacity-100 transition-opacity"})})}),b.jsx("span",{className:"text-xs font-mono text-text-muted w-10 flex-shrink-0",children:f>0?eM(f):"--:--"}),b.jsx("button",{onClick:v,className:"w-8 h-8 rounded-lg hover:bg-bg-tertiary flex items-center justify-center transition-colors flex-shrink-0",children:h?b.jsx(M6,{className:"w-4 h-4 text-text-muted"}):b.jsx(Gy,{className:"w-4 h-4 text-text-muted"})})]})]})}function one(e){const t=new Map;for(let n=0;nb.jsxs("div",{className:"flex gap-2 text-xs",children:[b.jsxs("span",{className:"text-text-muted font-mono",children:[u,":"]}),b.jsx("span",{className:"text-text-secondary font-mono",children:JSON.stringify(f)})]},u))})]}),t?.toolResponse&&b.jsxs("div",{className:"border-t border-border-default/50",children:[b.jsxs("button",{onClick:()=>o(!s),className:"w-full flex items-center gap-2 px-3 py-2 text-[10px] text-text-muted font-semibold uppercase tracking-wider hover:bg-bg-hover/30 transition-colors",children:[s?b.jsx(ai,{className:"w-3 h-3"}):b.jsx(sM,{className:"w-3 h-3"}),"Response"]}),s&&b.jsx("div",{className:"px-3 pb-3",children:b.jsx("pre",{className:"text-xs text-text-secondary font-mono leading-relaxed max-h-48 overflow-y-auto overflow-x-auto bg-bg-tertiary rounded-lg p-3",children:JSON.stringify(t.toolResponse,null,2)})})]})]})})}function ql({title:e,icon:t,children:n,defaultOpen:r=!1}){const[s,o]=A.useState(r);return b.jsxs("div",{children:[b.jsxs("button",{onClick:()=>o(!s),className:"w-full flex items-center gap-2 rounded-lg border border-border-default bg-bg-primary px-3 py-2 hover:bg-bg-hover/30 transition-colors",children:[b.jsx(t,{className:"w-3.5 h-3.5 text-text-muted"}),b.jsx("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider flex-1 text-left",children:e}),b.jsx(ai,{className:`w-3.5 h-3.5 text-text-muted transition-transform ${s?"rotate-180":""}`})]}),s&&b.jsx("div",{className:"mt-2 bg-bg-primary rounded-lg p-3",children:n})]})}function cne(){const[e,t]=A.useState(!0),n=Object.entries(Xi.informationRequired).map(([r,s])=>{const o=r.replace(/_/g," ").replace(/\b\w/g,f=>f.toUpperCase()),u=typeof s=="object"?JSON.stringify(s):String(s);return[o,u]});return b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsxs("button",{onClick:()=>t(!e),className:"w-full flex items-center gap-3 mb-0 hover:opacity-80 transition-opacity",children:[b.jsx("div",{className:"w-10 h-10 rounded-full bg-blue/20 flex items-center justify-center flex-shrink-0",children:b.jsx(Yy,{className:"w-5 h-5 text-blue-light"})}),b.jsxs("div",{className:"flex-1 text-left",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary",children:"User Goal"}),b.jsx("div",{className:"text-[10px] text-text-muted uppercase tracking-wider",children:"Scenario Briefing"})]}),b.jsx(ai,{className:`w-4 h-4 text-text-muted transition-transform ${e?"rotate-180":""}`})]}),e&&b.jsxs("div",{className:"mt-4",children:[b.jsx("div",{className:"border-l-2 border-blue/40 pl-4 mb-5",children:b.jsx("p",{className:"text-sm text-text-primary leading-relaxed",children:Xi.highLevelGoal})}),b.jsxs("div",{className:"mb-4 bg-bg-tertiary rounded-lg p-3",children:[b.jsx("div",{className:"text-[10px] font-semibold text-text-muted uppercase tracking-wider mb-1.5",children:"Persona"}),b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:tne})]}),b.jsxs("div",{className:"mb-4",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2.5",children:"Must-Have Criteria"}),b.jsx("div",{className:"space-y-2",children:Xi.decisionTree.mustHaveCriteria.map((r,s)=>b.jsxs("div",{className:"flex gap-2 items-start",children:[b.jsx(Xy,{className:"w-3.5 h-3.5 text-blue-light mt-0.5 flex-shrink-0"}),b.jsx("span",{className:"text-xs text-text-secondary leading-relaxed",children:r})]},s))})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx(ql,{title:"Negotiation Behavior",icon:lM,children:b.jsx("div",{className:"space-y-2.5",children:Xi.decisionTree.negotiationBehavior.map((r,s)=>b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:r},s))})}),b.jsx(ql,{title:"Resolution & Failure",icon:uM,children:b.jsxs("div",{className:"space-y-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] font-semibold text-emerald-400 uppercase tracking-wider mb-1",children:"Resolution"}),b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:Xi.decisionTree.resolutionCondition})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] font-semibold text-red-400 uppercase tracking-wider mb-1",children:"Failure"}),b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:Xi.decisionTree.failureCondition})]})]})}),b.jsx(ql,{title:"Escalation",icon:w6,children:b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:Xi.decisionTree.escalationBehavior})}),b.jsx(ql,{title:"Edge Cases",icon:Jl,children:b.jsx("div",{className:"space-y-2",children:Xi.decisionTree.edgeCases.map((r,s)=>b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:r},s))})}),b.jsx(ql,{title:"Scenario Details",icon:Yy,children:b.jsx("div",{className:"space-y-2",children:n.map(([r,s])=>b.jsxs("div",{className:"flex justify-between gap-3",children:[b.jsx("span",{className:"text-[11px] text-text-muted flex-shrink-0",children:r}),b.jsx("span",{className:"text-[11px] text-text-primary font-medium text-right break-all",children:s})]},r))})})]})]})]})}const Ky=[{name:"get_reservation",description:"Retrieve flight reservation using confirmation number and passenger last name",toolType:"read"},{name:"get_flight_status",description:"Get flight info including status, delays, cancellations, and gate information",toolType:"read"},{name:"get_disruption_info",description:"Get detailed disruption info for IRROPS handling and rebooking entitlements",toolType:"read"},{name:"search_rebooking_options",description:"Search for available flights to rebook a passenger",toolType:"read"},{name:"rebook_flight",description:"Rebook passenger(s) to a new flight (voluntary, IRROPS, or missed flight)",toolType:"write"},{name:"add_to_standby",description:"Add passenger to standby list for a flight",toolType:"write"},{name:"assign_seat",description:"Assign a seat to a passenger based on preference",toolType:"write"},{name:"add_baggage_allowance",description:"Add checked baggage allowance to a flight segment",toolType:"write"},{name:"add_meal_request",description:"Add or update special meal request for a passenger",toolType:"write"},{name:"issue_travel_credit",description:"Issue a travel credit or future flight voucher",toolType:"write"},{name:"issue_hotel_voucher",description:"Issue a hotel voucher for delays or disruptions",toolType:"write"},{name:"issue_meal_voucher",description:"Issue a meal voucher for delays or disruptions",toolType:"write"},{name:"cancel_reservation",description:"Cancel a flight booking",toolType:"write"},{name:"process_refund",description:"Process a refund for a cancelled or eligible reservation",toolType:"write"},{name:"transfer_to_agent",description:"Transfer the call to a live human agent",toolType:"system"}];function fne(e){const t=new Map;for(const n of e)if(n.type==="tool_response"&&n.toolName){const r=t.get(n.toolName)??{calls:0,success:0,error:0};r.calls++,n.toolStatus==="success"?r.success++:r.error++,t.set(n.toolName,r)}return t}function dne({tool:e,isUsed:t,typeColors:n}){const[r,s]=A.useState(!1);return b.jsxs("div",{className:`rounded-lg border ${t?"border-amber/30 bg-amber/5":"border-border-default bg-bg-primary opacity-60"}`,children:[b.jsxs("button",{onClick:()=>s(!r),className:"w-full flex items-center gap-2 px-3 py-2 hover:opacity-80 transition-opacity",children:[b.jsx(p0,{className:`w-3.5 h-3.5 flex-shrink-0 ${t?"text-amber":"text-text-muted"}`}),b.jsx("span",{className:`text-xs font-semibold font-mono flex-1 text-left ${t?"text-text-primary":"text-text-muted"}`,children:e.name}),b.jsx("span",{className:`text-[9px] px-1.5 py-0.5 rounded-full font-medium border ${n[e.toolType]}`,children:e.toolType})]}),r&&b.jsx("div",{className:"px-3 pb-2.5 pt-0",children:b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:e.description})})]})}function hne(){const e=fne(Zs),t=Ky.filter(o=>e.has(o.name)).length,n={read:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20",write:"bg-purple/10 text-purple-light border-purple/20",system:"bg-amber/10 text-amber border-amber/20"},[r,s]=A.useState(!0);return b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsxs("button",{onClick:()=>s(!r),className:"w-full flex items-center gap-3 mb-0 hover:opacity-80 transition-opacity",children:[b.jsx("div",{className:"w-10 h-10 rounded-full bg-amber/20 flex items-center justify-center flex-shrink-0",children:b.jsx(p0,{className:"w-5 h-5 text-amber"})}),b.jsxs("div",{className:"flex-1 text-left",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary",children:"Agent Tools"}),b.jsxs("div",{className:"text-[10px] text-text-muted uppercase tracking-wider",children:[t," of ",Ky.length," used in this conversation"]})]}),b.jsx(ai,{className:`w-4 h-4 text-text-muted transition-transform ${r?"rotate-180":""}`})]}),r&&b.jsx("div",{className:"mt-4 space-y-1.5",children:Ky.map(o=>{const u=e.has(o.name);return b.jsx(dne,{tool:o,isUsed:u,typeColors:n},o.name)})})]})}function mne({score:e,size:t="md"}){const n=e>=.8?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":e>=.5?"bg-amber/10 text-amber border-amber/20":"bg-red-500/10 text-red-400 border-red-500/20",r=t==="sm"?"text-[10px] px-1.5 py-0.5":"text-xs px-2 py-0.5";return b.jsxs("span",{className:`${r} rounded-full font-semibold border ${n}`,children:[(e*100).toFixed(0),"%"]})}function pne({type:e}){const t={deterministic:"Deterministic",llm_judge:"LLM Judge",lalm_judge:"Audio Judge"},n={deterministic:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20",llm_judge:"bg-purple/10 text-purple-light border-purple/20",lalm_judge:"bg-amber/10 text-amber border-amber/20"};return b.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full font-medium border ${n[e]??"bg-bg-tertiary text-text-muted border-border-default"}`,children:t[e]??e})}function gne({metric:e}){const[t,n]=A.useState(!1),r=e.details,s=r.per_turn_ratings,o=r.per_turn_explanations,u=r.per_turn_judge_timing_ratings,f=r.per_turn_judge_timing_explanations,d=r.explanation,h=r.per_turn_entity_details,p=(typeof d=="object"&&d!==null?d:void 0)?.dimensions;return b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary overflow-hidden",children:[b.jsxs("button",{onClick:()=>n(!t),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-bg-hover/30 transition-colors",children:[b.jsxs("div",{className:"flex-1 flex items-center gap-3",children:[b.jsx("span",{className:"text-base font-semibold text-text-primary",children:e.displayName}),b.jsx(pne,{type:e.type})]}),b.jsx(mne,{score:e.normalizedScore}),b.jsx(ai,{className:`w-4 h-4 text-text-muted transition-transform ${t?"rotate-180":""}`})]}),t&&b.jsxs("div",{className:"px-5 pb-5 border-t border-border-default/50 pt-4 space-y-5",children:[e.name==="task_completion"&&b.jsxs("div",{className:"flex items-center gap-2",children:[r.match?b.jsx(Xy,{className:"w-5 h-5 text-emerald-400"}):b.jsx(Jl,{className:"w-5 h-5 text-red-400"}),b.jsx("span",{className:"text-base text-text-secondary",children:r.message})]}),p&&b.jsx("div",{className:"space-y-3",children:Object.entries(p).map(([v,x])=>{const w=e.name==="faithfulness";let _,S;return w?x.rating===3?(_="OK",S="bg-emerald-500/10 text-emerald-400 border-emerald-500/20"):x.rating===2?(_="Minor/Ambiguous Issue",S="bg-amber/10 text-amber border-amber/20"):(_="Clear Error",S="bg-red-500/10 text-red-400 border-red-500/20"):e.name==="conversation_progression"?x.rating===3?(_="OK",S="bg-emerald-500/10 text-emerald-400 border-emerald-500/20"):x.rating===2?(_="Minor Issue",S="bg-amber/10 text-amber border-amber/20"):(_="Clear Issue",S="bg-red-500/10 text-red-400 border-red-500/20"):(_=x.flagged?"Flagged":"OK",S=x.flagged?"bg-amber/10 text-amber border-amber/20":"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"),b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:v.replace(/_/g," ").replace(/\b\w/g,O=>O.toUpperCase())}),b.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium border ${S}`,children:_}),b.jsxs("span",{className:"text-xs text-text-muted ml-auto",children:[x.rating,"/3"]})]}),b.jsx("p",{className:"text-base text-text-secondary leading-relaxed",children:x.evidence})]},v)})}),s&&!p&&!h&&b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Per-Turn Breakdown"}),b.jsx("div",{className:"space-y-3 max-h-[32rem] overflow-y-auto",children:Object.entries(s).map(([v,x])=>{const w=o?.[v];return x===-1?null:b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsxs("span",{className:"text-xs font-semibold text-text-muted",children:["Turn ",v]}),b.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium border ${x>=3||x===1&&e.name==="agent_speech_fidelity"?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":x>=2?"bg-amber/10 text-amber border-amber/20":"bg-red-500/10 text-red-400 border-red-500/20"}`,children:x})]}),w&&b.jsx("p",{className:"text-base text-text-secondary leading-relaxed",children:w})]},v)})})]}),u&&b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Per-Turn Timing"}),b.jsx("div",{className:"space-y-3 max-h-[32rem] overflow-y-auto",children:Object.entries(u).map(([v,x])=>{const w=f?.[v],_=x==="On-Time"?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":x==="Late"?"bg-amber/10 text-amber border-amber/20":"bg-red-500/10 text-red-400 border-red-500/20";return b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsxs("span",{className:"text-xs font-semibold text-text-muted",children:["Turn ",v]}),b.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium border ${_}`,children:x})]}),w&&b.jsx("p",{className:"text-base text-text-secondary leading-relaxed",children:w})]},v)})})]}),h&&b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Per-Turn Entity Accuracy"}),b.jsx("div",{className:"space-y-3 max-h-[32rem] overflow-y-auto",children:Object.entries(h).map(([v,x])=>!x.entities||x.entities.length===0?null:b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsxs("div",{className:"text-xs font-semibold text-text-muted mb-2",children:["Turn ",v]}),b.jsx("div",{className:"space-y-2",children:x.entities.map((w,_)=>b.jsxs("div",{className:"flex items-start gap-2 text-base",children:[w.correct?b.jsx(Xy,{className:"w-4 h-4 text-emerald-400 mt-0.5 flex-shrink-0"}):b.jsx(Jl,{className:"w-4 h-4 text-red-400 mt-0.5 flex-shrink-0"}),b.jsxs("div",{children:[b.jsxs("span",{className:"text-text-muted",children:[w.type,":"]})," ",b.jsx("span",{className:"text-text-secondary",children:w.value}),!w.correct&&b.jsxs("span",{className:"text-red-400",children:[" → ",w.transcribed_value]})]})]},_))}),b.jsx("p",{className:"text-xs text-text-muted mt-2",children:x.summary})]},v))})]}),typeof d=="string"&&b.jsx("p",{className:"text-base text-text-secondary leading-relaxed",children:d})]})]})}function yne(){const e=[{label:"Accuracy (EVA-A)",icon:uM,metrics:rne,color:"text-emerald-400"},{label:"Experience (EVA-X)",icon:BR,metrics:ine,color:"text-purple-light"},{label:"Relevant Diagnostic Metric",icon:b6,metrics:ane,color:"text-cyan-400"}];return b.jsx(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.2},className:"mt-12",children:b.jsx("div",{className:"space-y-8",children:e.map(t=>b.jsxs("div",{children:[b.jsx("div",{className:"flex items-center gap-3 mb-4 pb-3 border-b border-border-default",children:b.jsx("span",{className:"text-lg font-bold text-text-primary",children:t.label})}),b.jsx("div",{className:"space-y-2",children:t.metrics.map(n=>b.jsx(gne,{metric:n},n.name))})]},t.label))})})}function vne(){const e=one(Zs),t=[];let n=0;for(;n{const t=tM[e.category]??nM;return e.items.map((n,r)=>b.jsxs("div",{className:`rounded-xl border ${t.border} ${t.bg} p-5 flex flex-col`,children:[b.jsx("div",{className:"flex items-center gap-2 mb-2",children:b.jsx("span",{className:`text-[10px] font-semibold uppercase tracking-wider px-2 py-0.5 rounded-full ${t.badge} ${t.text} border ${t.badgeBorder}`,children:e.category})}),b.jsx("div",{className:"text-sm font-semibold text-text-primary mb-1.5",children:n.title}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed flex-1",children:n.description})]},`${e.category}-${r}`))})})]}),b.jsxs(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1},children:[b.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple/10 flex items-center justify-center",children:b.jsx(y6,{className:"w-5 h-5 text-purple"})}),b.jsx("h3",{className:"text-xl font-bold text-text-primary",children:"Roadmap"})]}),b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:xne.flatMap(e=>{const t=tM[e.category]??nM;return e.items.map((n,r)=>b.jsxs("div",{className:`rounded-xl border ${t.border} ${t.bg} p-5 flex flex-col`,children:[b.jsx("div",{className:"flex items-center gap-2 mb-2",children:b.jsx("span",{className:`text-[10px] font-semibold uppercase tracking-wider px-2 py-0.5 rounded-full ${t.badge} ${t.text} border ${t.badgeBorder}`,children:e.category})}),b.jsx("div",{className:"text-sm font-semibold text-text-primary mb-1.5",children:n.title}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed flex-1",children:n.description})]},`${e.category}-${r}`))})})]})]})})}const _ne=new Set(["intro","architecture","metrics","early-results","demo","limitations","acknowledgements"]);function rM(){const e=window.location.hash.slice(1);return e&&_ne.has(e)?e:"intro"}function Sne(){if(typeof window<"u"){const e=localStorage.getItem("eva-theme");if(e==="light"||e==="dark")return e}return"dark"}function Ane(){const[e,t]=A.useState(rM),[n,r]=A.useState(Sne);A.useEffect(()=>{const f=()=>t(rM());return window.addEventListener("hashchange",f),()=>window.removeEventListener("hashchange",f)},[]);const s=A.useCallback(f=>{t(f),window.history.pushState(null,"",`#${f}`)},[]);A.useEffect(()=>{document.documentElement.setAttribute("data-theme",n),localStorage.setItem("eva-theme",n)},[n]);const o=A.useCallback(()=>{r(f=>f==="dark"?"light":"dark")},[]),u=A.useMemo(()=>({mode:n,colors:Tte[n]}),[n]);return b.jsx(Ex.Provider,{value:u,children:b.jsxs("div",{className:"min-h-screen bg-bg-primary",children:[b.jsx(C6,{activeTab:e,onTabChange:s,theme:n,onToggleTheme:o}),b.jsxs("main",{children:[e==="intro"&&b.jsx(EB,{}),e==="architecture"&&b.jsx(jB,{}),e==="metrics"&&b.jsx(RB,{}),e==="early-results"&&b.jsx(Wte,{}),e==="demo"&&b.jsx(vne,{}),e==="limitations"&&b.jsx(wne,{}),e==="acknowledgements"&&b.jsx(OB,{})]})]})})}CR.createRoot(document.getElementById("root")).render(b.jsx(A.StrictMode,{children:b.jsx(Ane,{})})); + `).concat(N.x,",").concat(N.y),C=dt(e.id)?au("recharts-radial-line-"):e.id;return A.createElement("text",ei({},r,{dominantBaseline:"central",className:et("recharts-radial-bar-label",u)}),A.createElement("defs",null,A.createElement("path",{id:C,d:k})),A.createElement("textPath",{xlinkHref:"#".concat(C)},n))},JW=(e,t,n)=>{var{cx:r,cy:s,innerRadius:o,outerRadius:u,startAngle:f,endAngle:d}=e,h=(f+d)/2;if(n==="outside"){var{x:m,y:p}=Kt(r,s,u+t,h);return{x:m,y:p,textAnchor:m>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:s,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(o+u)/2,{x,y:w}=Kt(r,s,v,h);return{x,y:w,textAnchor:"middle",verticalAnchor:"middle"}},qf=e=>e!=null&&"cx"in e&&ye(e.cx),eZ={angle:0,offset:5,zIndex:pn.label,position:"middle",textBreakAll:!1};function tZ(e){if(!qf(e))return e;var{cx:t,cy:n,outerRadius:r}=e,s=r*2;return{x:t-r,y:n-r,width:s,upperWidth:s,lowerWidth:s,height:s}}function Wi(e){var t=vn(e,eZ),{viewBox:n,parentViewBox:r,position:s,value:o,children:u,content:f,className:d="",textBreakAll:h,labelRef:m}=t,p=GW(),v=h5(),x=s==="center"?v:p??v,w,_,S;n==null?w=x:qf(n)?w=n:w=db(n);var O=tZ(w);if(!w||dt(o)&&dt(u)&&!A.isValidElement(f)&&typeof f!="function")return null;var M=Kl(Kl({},t),{},{viewBox:w});if(A.isValidElement(f)){var{labelRef:j}=M,N=lj(M,VW);return A.cloneElement(f,N)}if(typeof f=="function"){var{content:k}=M,C=lj(M,qW);if(_=A.createElement(f,C),A.isValidElement(_))return _}else _=WW(t);var L=er(t);if(qf(w)){if(s==="insideStart"||s==="insideEnd"||s==="end")return QW(t,s,_,L,w);S=JW(w,t.offset,t.position)}else{if(!O)return null;var I=UW({viewBox:O,position:s,offset:t.offset,parentViewBox:qf(r)?void 0:r});S=Kl(Kl({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 A.createElement(ca,{zIndex:t.zIndex},A.createElement(xx,ei({ref:m,className:et("recharts-label",d)},L,S,{textAnchor:l5(L.textAnchor)?L.textAnchor:S.textAnchor,breakAll:h}),_))}Wi.displayName="Label";var nZ=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?A.createElement(Wi,ei({key:"label-implicit"},r)):kr(e)?A.createElement(Wi,ei({key:"label-implicit",value:e},r)):A.isValidElement(e)?e.type===Wi?A.cloneElement(e,Kl({key:"label-implicit"},r)):A.createElement(Wi,ei({key:"label-implicit",content:e},r)):wx(e)?A.createElement(Wi,ei({key:"label-implicit",content:e},r)):e&&typeof e=="object"?A.createElement(Wi,ei({},e,{key:"label-implicit"},r)):null};function rZ(e){var{label:t,labelRef:n}=e,r=h5();return nZ(t,r,n)||null}var iZ=["valueAccessor"],aZ=["dataKey","clockWise","id","textBreakAll","zIndex"];function Id(){return Id=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(CW(t))return t},m5=A.createContext(void 0),lZ=m5.Provider,p5=A.createContext(void 0);p5.Provider;function uZ(){return A.useContext(m5)}function cZ(){return A.useContext(p5)}function $f(e){var{valueAccessor:t=oZ}=e,n=cj(e,iZ),{dataKey:r,clockWise:s,id:o,textBreakAll:u,zIndex:f}=n,d=cj(n,aZ),h=uZ(),m=cZ(),p=h||m;return!p||!p.length?null:A.createElement(ca,{zIndex:f??pn.label},A.createElement(hr,{className:"recharts-label-list"},p.map((v,x)=>{var w,_=dt(r)?t(v,x):Ot(v.payload,r),S=dt(o)?{}:{id:"".concat(o,"-").concat(x)};return A.createElement(Wi,Id({key:"label-".concat(x)},er(v),d,S,{fill:(w=n.fill)!==null&&w!==void 0?w:v.fill,parentViewBox:v.parentViewBox,value:_,textBreakAll:u,viewBox:v.viewBox,index:x,zIndex:0}))})))}$f.displayName="LabelList";function fZ(e){var{label:t}=e;return t?t===!0?A.createElement($f,{key:"labelList-implicit"}):A.isValidElement(t)||wx(t)?A.createElement($f,{key:"labelList-implicit",content:t}):typeof t=="object"?A.createElement($f,Id({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var dZ={radiusAxis:{},angleAxis:{}},g5=Qt({name:"polarAxis",initialState:dZ,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]}}}),{addRadiusAxis:Nne,removeRadiusAxis:kne,addAngleAxis:Cne,removeAngleAxis:Dne}=g5.actions,hZ=g5.reducer;function mZ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var By={exports:{}},He={};var fj;function pZ(){if(fj)return He;fj=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function w(_){if(typeof _=="object"&&_!==null){var S=_.$$typeof;switch(S){case e:switch(_=_.type,_){case n:case s:case r:case d:case h:case v:return _;default:switch(_=_&&_.$$typeof,_){case u:case f:case p:case m:return _;case o:return _;default:return S}}case t:return S}}}return He.ContextConsumer=o,He.ContextProvider=u,He.Element=e,He.ForwardRef=f,He.Fragment=n,He.Lazy=p,He.Memo=m,He.Portal=t,He.Profiler=s,He.StrictMode=r,He.Suspense=d,He.SuspenseList=h,He.isContextConsumer=function(_){return w(_)===o},He.isContextProvider=function(_){return w(_)===u},He.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},He.isForwardRef=function(_){return w(_)===f},He.isFragment=function(_){return w(_)===n},He.isLazy=function(_){return w(_)===p},He.isMemo=function(_){return w(_)===m},He.isPortal=function(_){return w(_)===t},He.isProfiler=function(_){return w(_)===s},He.isStrictMode=function(_){return w(_)===r},He.isSuspense=function(_){return w(_)===d},He.isSuspenseList=function(_){return w(_)===h},He.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===n||_===s||_===r||_===d||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===p||_.$$typeof===m||_.$$typeof===u||_.$$typeof===o||_.$$typeof===f||_.$$typeof===x||_.getModuleId!==void 0)},He.typeOf=w,He}var dj;function gZ(){return dj||(dj=1,By.exports=pZ()),By.exports}var yZ=gZ(),hj=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",mj=null,Uy=null,y5=e=>{if(e===mj&&Array.isArray(Uy))return Uy;var t=[];return A.Children.forEach(e,n=>{dt(n)||(yZ.isFragment(n)?t=t.concat(y5(n.props.children)):t.push(n))}),Uy=t,mj=e,t};function vZ(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(s=>hj(s)):r=[hj(t)],y5(e).forEach(s=>{var o=co(s,"type.displayName")||co(s,"type.name");o&&r.indexOf(o)!==-1&&n.push(s)}),n}var Vy={},pj;function bZ(){return pj||(pj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const s=n[Symbol.toStringTag];return s==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${s}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(Vy)),Vy}var qy,gj;function xZ(){return gj||(gj=1,qy=bZ().isPlainObject),qy}var wZ=xZ();const _Z=ia(wZ);var yj,vj,bj,xj,wj;function _j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Sj(e){for(var t=1;t{var o=n-r,u;return u=ut(yj||(yj=zl(["M ",",",""])),e,t),u+=ut(vj||(vj=zl(["L ",",",""])),e+n,t),u+=ut(bj||(bj=zl(["L ",",",""])),e+n-o/2,t+s),u+=ut(xj||(xj=zl(["L ",",",""])),e+n-o/2-r,t+s),u+=ut(wj||(wj=zl(["L ",","," Z"])),e,t),u},OZ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},EZ=e=>{var t=vn(e,OZ),{x:n,y:r,upperWidth:s,lowerWidth:o,height:u,className:f}=t,{animationEasing:d,animationDuration:h,animationBegin:m,isUpdateAnimationActive:p}=t,v=A.useRef(null),[x,w]=A.useState(-1),_=A.useRef(s),S=A.useRef(o),O=A.useRef(u),M=A.useRef(n),j=A.useRef(r),N=yb(e,"trapezoid-");if(A.useEffect(()=>{if(v.current&&v.current.getTotalLength)try{var pe=v.current.getTotalLength();pe&&w(pe)}catch{}},[]),n!==+n||r!==+r||s!==+s||o!==+o||u!==+u||s===0&&o===0||u===0)return null;var k=et("recharts-trapezoid",f);if(!p)return A.createElement("g",null,A.createElement("path",Bd({},er(t),{className:k,d:Aj(n,r,s,o,u)})));var C=_.current,L=S.current,I=O.current,Y=M.current,te=j.current,ie="0px ".concat(x===-1?1:x,"px"),K="".concat(x,"px ").concat(x,"px"),be=RC(["strokeDasharray"],h,d);return A.createElement(gb,{animationId:N,key:N,canBegin:x>0,duration:h,easing:d,isActive:p,begin:m},pe=>{var xe=Nn(C,s,pe),V=Nn(L,o,pe),Q=Nn(I,u,pe),ne=Nn(Y,n,pe),le=Nn(te,r,pe);v.current&&(_.current=xe,S.current=V,O.current=Q,M.current=ne,j.current=le);var ue=pe>0?{transition:be,strokeDasharray:K}:{strokeDasharray:ie};return A.createElement("path",Bd({},er(t),{className:k,d:Aj(ne,le,xe,V,Q),ref:v,style:Sj(Sj({},ue),t.style)}))})},jZ=["option","shapeType","activeClassName","inActiveClassName"];function MZ(e,t){if(e==null)return{};var n,r,s=NZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{var r=it();return(s,o)=>u=>{e?.(s,o,u),r(DD({activeIndex:String(o),activeDataKey:t,activeCoordinate:s.tooltipPosition,activeGraphicalItemId:n}))}},IZ=e=>{var t=it();return(n,r)=>s=>{e?.(n,r,s),t(YX())}},BZ=(e,t,n)=>{var r=it();return(s,o)=>u=>{e?.(s,o,u),r(GX({activeIndex:String(o),activeDataKey:t,activeCoordinate:s.tooltipPosition,activeGraphicalItemId:n}))}};function UZ(e){var{tooltipEntrySettings:t}=e,n=it(),r=Jt(),s=A.useRef(null);return A.useLayoutEffect(()=>{r||(s.current===null?n(FX(t)):s.current!==t&&n(HX({prev:s.current,next:t})),s.current=t)},[t,n,r]),A.useLayoutEffect(()=>()=>{s.current&&(n(KX(s.current)),s.current=null)},[n]),null}function VZ(e){var{legendPayload:t}=e,n=it(),r=Jt(),s=A.useRef(null);return A.useLayoutEffect(()=>{r||(s.current===null?n(XV(t)):s.current!==t&&n(YV({prev:s.current,next:t})),s.current=t)},[n,r,t]),A.useLayoutEffect(()=>()=>{s.current&&(n(GV(s.current)),s.current=null)},[n]),null}var $y,qZ=()=>{var[e]=A.useState(()=>au("uid-"));return e},$Z=($y=OR.useId)!==null&&$y!==void 0?$y:qZ;function FZ(e,t){var n=$Z();return t||(e?"".concat(e,"-").concat(n):n)}var HZ=A.createContext(void 0),KZ=e=>{var{id:t,type:n,children:r}=e,s=FZ("recharts-".concat(n),t);return A.createElement(HZ.Provider,{value:s},r(s))},XZ={cartesianItems:[],polarItems:[]},v5=Qt({name:"graphicalItems",initialState:XZ,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Qe()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,s=Zn(e).cartesianItems.indexOf(n);s>-1&&(e.cartesianItems[s]=r)},prepare:Qe()},removeCartesianGraphicalItem:{reducer(e,t){var n=Zn(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Qe()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Qe()},removePolarGraphicalItem:{reducer(e,t){var n=Zn(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Qe()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,s=Zn(e).polarItems.indexOf(n);s>-1&&(e.polarItems[s]=r)},prepare:Qe()}}}),{addCartesianGraphicalItem:YZ,replaceCartesianGraphicalItem:GZ,removeCartesianGraphicalItem:WZ,addPolarGraphicalItem:Pne,removePolarGraphicalItem:Rne,replacePolarGraphicalItem:Lne}=v5.actions,ZZ=v5.reducer,QZ=e=>{var t=it(),n=A.useRef(null);return A.useLayoutEffect(()=>{n.current===null?t(YZ(e)):n.current!==e&&t(GZ({prev:n.current,next:e})),n.current=e},[t,e]),A.useLayoutEffect(()=>()=>{n.current&&(t(WZ(n.current)),n.current=null)},[t]),null},JZ=A.memo(QZ);function jj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Mj(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),hQ=$([dQ,hi,mi],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),mQ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b5,n=Jt(),r=ve(s=>Mo(s,"xAxis",t,n));return r?.map},pQ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b5,n=Jt(),r=ve(s=>Mo(s,"yAxis",t,n));return r?.map},w5=()=>ve(hQ),gQ=e=>{var{chartData:t}=e,n=it(),r=Jt();return A.useEffect(()=>r?()=>{}:(n(KE(t)),()=>{n(KE(void 0))}),[t,n,r]),null},Nj={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},_5=Qt({name:"brush",initialState:Nj,reducers:{setBrushSettings(e,t){return t.payload==null?Nj:t.payload}}}),{setBrushSettings:Une}=_5.actions,yQ=_5.reducer;function vQ(e){return(e%180+180)%180}var bQ=function(t){var{width:n,height:r}=t,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=vQ(s),u=o*Math.PI/180,f=Math.atan(r/n),d=u>f&&u{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Zn(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Zn(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=Zn(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:Vne,removeDot:qne,addArea:$ne,removeArea:Fne,addLine:Hne,removeLine:Kne}=S5.actions,wQ=S5.reducer,_Q=A.createContext(void 0),SQ=e=>{var{children:t}=e,[n]=A.useState("".concat(au("recharts"),"-clip")),r=w5();if(r==null)return null;var{x:s,y:o,width:u,height:f}=r;return A.createElement(_Q.Provider,{value:n},A.createElement("defs",null,A.createElement("clipPath",{id:n},A.createElement("rect",{x:s,y:o,height:f,width:u}))),t)};function A5(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;re*s)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-s)<=0}function OQ(e,t){return A5(e,t+1)}function EQ(e,t,n,r,s){for(var o=(r||[]).slice(),{start:u,end:f}=t,d=0,h=1,m=u,p=function(){var w=r?.[d];if(w===void 0)return{v:A5(r,h)};var _=d,S,O=()=>(S===void 0&&(S=n(w,_)),S),M=w.coordinate,j=d===0||xu(e,M,O,m,f);j||(d=0,m=u,h+=1),j&&(m=M+e*(O()/2+s),d+=h)},v;h<=o.length;)if(v=p(),v)return v.v;return[]}function jQ(e,t,n,r,s){var o=(r||[]).slice(),u=o.length;if(u===0)return[];for(var{start:f,end:d}=t,h=1;h<=u;h++){for(var m=(u-1)%h,p=f,v=!0,x=function(){var N=r[_];if(N==null)return 0;var k=_,C,L=()=>(C===void 0&&(C=n(N,k)),C),I=N.coordinate,Y=_===m||xu(e,I,L,p,d);if(!Y)return v=!1,1;Y&&(p=I+e*(L()/2+s))},w,_=m;_(_===void 0&&(_=n(x,v)),_);if(v===u-1){var O=e*(w.coordinate+e*S()/2-d);o[v]=w=Gt(Gt({},w),{},{tickCoord:O>0?w.coordinate-O*e:w.coordinate})}else o[v]=w=Gt(Gt({},w),{},{tickCoord:w.coordinate});if(w.tickCoord!=null){var M=xu(e,w.tickCoord,S,f,d);M&&(d=w.tickCoord-e*(S()/2+s),o[v]=Gt(Gt({},w),{},{isShow:!0}))}},m=u-1;m>=0;m--)h(m);return o}function DQ(e,t,n,r,s,o){var u=(r||[]).slice(),f=u.length,{start:d,end:h}=t;if(o){var m=r[f-1];if(m!=null){var p=n(m,f-1),v=e*(m.coordinate+e*p/2-h);if(u[f-1]=m=Gt(Gt({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate}),m.tickCoord!=null){var x=xu(e,m.tickCoord,()=>p,d,h);x&&(h=m.tickCoord-e*(p/2+s),u[f-1]=Gt(Gt({},m),{},{isShow:!0}))}}}for(var w=o?f-1:f,_=function(M){var j=u[M];if(j==null)return 1;var N=j,k,C=()=>(k===void 0&&(k=n(j,M)),k);if(M===0){var L=e*(N.coordinate-e*C()/2-d);u[M]=N=Gt(Gt({},N),{},{tickCoord:L<0?N.coordinate-L*e:N.coordinate})}else u[M]=N=Gt(Gt({},N),{},{tickCoord:N.coordinate});if(N.tickCoord!=null){var I=xu(e,N.tickCoord,C,d,h);I&&(d=N.tickCoord+e*(C()/2+s),u[M]=Gt(Gt({},N),{},{isShow:!0}))}},S=0;S{var L=typeof h=="function"?h(k.value,C):k.value;return w==="width"?AQ(Zl(L,{fontSize:t,letterSpacing:n}),_,p):Zl(L,{fontSize:t,letterSpacing:n})[w]},O=s[0],M=s[1],j=s.length>=2&&O!=null&&M!=null?Wn(M.coordinate-O.coordinate):1,N=TQ(o,j,w);return d==="equidistantPreserveStart"?EQ(j,N,S,s,u):d==="equidistantPreserveEnd"?jQ(j,N,S,s,u):(d==="preserveStart"||d==="preserveStartEnd"?x=DQ(j,N,S,s,u,d==="preserveStartEnd"):x=CQ(j,N,S,s,u),x.filter(k=>k.isShow))}var PQ=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:s=0,tickMargin:o=0}=e,u=0;if(t){Array.from(t).forEach(m=>{if(m){var p=m.getBoundingClientRect();p.width>u&&(u=p.width)}});var f=n?n.getBoundingClientRect().width:0,d=s+o,h=u+d+f+(n?r:0);return Math.round(h)}return 0},RQ={xAxis:{},yAxis:{}},T5=Qt({name:"renderedTicks",initialState:RQ,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:s}=t.payload;e[n][r]=s},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:LQ,removeRenderedTicks:zQ}=T5.actions,IQ=T5.reducer,BQ=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function UQ(e,t){if(e==null)return{};var n,r,s=VQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{if(r==null||n==null)return _o;var o=t.map(u=>({value:u.value,coordinate:u.coordinate,offset:u.offset,index:u.index}));return s(LQ({ticks:o,axisId:r,axisType:n})),()=>{s(zQ({axisId:r,axisType:n}))}},[s,t,r,n]),null}var ZQ=A.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:s,stroke:o,tickFormatter:u,unit:f,padding:d,tickTextProps:h,orientation:m,mirror:p,x:v,y:x,width:w,height:_,tickSize:S,tickMargin:O,fontSize:M,letterSpacing:j,getTicksConfig:N,events:k,axisType:C,axisId:L}=e,I=_x(ot(ot({},N),{},{ticks:n}),M,j),Y=Nr(N),te=Y0(r),ie=l5(Y.textAnchor)?Y.textAnchor:XQ(m,p),K=YQ(m,p),be={};typeof s=="object"&&(be=s);var pe=ot(ot({},Y),{},{fill:"none"},be),xe=I.map(ne=>ot({entry:ne},KQ(ne,v,x,w,_,m,S,p,O))),V=xe.map(ne=>{var{entry:le,line:ue}=ne;return A.createElement(hr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(le.value,"-").concat(le.coordinate,"-").concat(le.tickCoord)},s&&A.createElement("line",es({},pe,ue,{className:et("recharts-cartesian-axis-tick-line",co(s,"className"))})))}),Q=xe.map((ne,le)=>{var ue,P,{entry:H,tick:ae}=ne,se=ot(ot(ot(ot({verticalAnchor:K},Y),{},{textAnchor:ie,stroke:"none",fill:o},ae),{},{index:le,payload:H,visibleTicksCount:I.length,tickFormatter:u,padding:d},h),{},{angle:(ue=(P=h?.angle)!==null&&P!==void 0?P:Y.angle)!==null&&ue!==void 0?ue:0}),Z=ot(ot({},se),te);return A.createElement(hr,es({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(H.value,"-").concat(H.coordinate,"-").concat(H.tickCoord)},_k(k,H,le)),r&&A.createElement(GQ,{option:r,tickProps:Z,value:"".concat(typeof u=="function"?u(H.value,le):H.value).concat(f||"")}))});return A.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(C,"-ticks")},A.createElement(WQ,{ticks:I,axisId:L,axisType:C}),Q.length>0&&A.createElement(ca,{zIndex:pn.label},A.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(C,"-tick-labels"),ref:t},Q)),V.length>0&&A.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(C,"-tick-lines")},V))}),QQ=A.forwardRef((e,t)=>{var{axisLine:n,width:r,height:s,className:o,hide:u,ticks:f,axisType:d,axisId:h}=e,m=UQ(e,BQ),[p,v]=A.useState(""),[x,w]=A.useState(""),_=A.useRef(null);A.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var O;return PQ({ticks:_.current,label:(O=e.labelRef)===null||O===void 0?void 0:O.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var S=A.useCallback(O=>{if(O){var M=O.getElementsByClassName("recharts-cartesian-axis-tick-value");_.current=M;var j=M[0];if(j){var N=window.getComputedStyle(j),k=N.fontSize,C=N.letterSpacing;(k!==p||C!==x)&&(v(k),w(C))}}},[p,x]);return u||r!=null&&r<=0||s!=null&&s<=0?null:A.createElement(ca,{zIndex:e.zIndex},A.createElement(hr,{className:et("recharts-cartesian-axis",o)},A.createElement(HQ,{x:e.x,y:e.y,width:r,height:s,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Nr(e)}),A.createElement(ZQ,{ref:S,axisType:d,events:m,fontSize:p,getTicksConfig:e,height:e.height,letterSpacing:x,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:f,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),A.createElement(XW,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},A.createElement(rZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),Sx=A.forwardRef((e,t)=>{var n=vn(e,ii);return A.createElement(QQ,es({},n,{ref:t}))});Sx.displayName="CartesianAxis";var JQ=["x1","y1","x2","y2","key"],eJ=["offset"],tJ=["xAxisId","yAxisId"],nJ=["xAxisId","yAxisId"];function Dj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:s,width:o,height:u,ry:f}=e;return A.createElement("rect",{x:r,y:s,ry:f,width:o,height:u,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function O5(e){var{option:t,lineItemProps:n}=e,r;if(A.isValidElement(t))r=A.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var s,{x1:o,y1:u,x2:f,y2:d,key:h}=n,m=Vd(n,JQ),p=(s=Nr(m))!==null&&s!==void 0?s:{},{offset:v}=p,x=Vd(p,eJ);r=A.createElement("line",$a({},x,{x1:o,y1:u,x2:f,y2:d,fill:"none",key:h}))}return r}function lJ(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:s}=e;if(!r||!s||!s.length)return null;var{xAxisId:o,yAxisId:u}=e,f=Vd(e,tJ),d=s.map((h,m)=>{var p=Wt(Wt({},f),{},{x1:t,y1:h,x2:t+n,y2:h,key:"line-".concat(m),index:m});return A.createElement(O5,{key:"line-".concat(m),option:r,lineItemProps:p})});return A.createElement("g",{className:"recharts-cartesian-grid-horizontal"},d)}function uJ(e){var{y:t,height:n,vertical:r=!0,verticalPoints:s}=e;if(!r||!s||!s.length)return null;var{xAxisId:o,yAxisId:u}=e,f=Vd(e,nJ),d=s.map((h,m)=>{var p=Wt(Wt({},f),{},{x1:h,y1:t,x2:h,y2:t+n,key:"line-".concat(m),index:m});return A.createElement(O5,{option:r,lineItemProps:p,key:"line-".concat(m)})});return A.createElement("g",{className:"recharts-cartesian-grid-vertical"},d)}function cJ(e){var{horizontalFill:t,fillOpacity:n,x:r,y:s,width:o,height:u,horizontalPoints:f,horizontal:d=!0}=e;if(!d||!t||!t.length||f==null)return null;var h=f.map(p=>Math.round(p+s-s)).sort((p,v)=>p-v);s!==h[0]&&h.unshift(0);var m=h.map((p,v)=>{var x=h[v+1],w=x==null,_=w?s+u-p:x-p;if(_<=0)return null;var S=v%t.length;return A.createElement("rect",{key:"react-".concat(v),y:p,x:r,height:_,width:o,stroke:"none",fill:t[S],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function fJ(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:s,y:o,width:u,height:f,verticalPoints:d}=e;if(!t||!n||!n.length)return null;var h=d.map(p=>Math.round(p+s-s)).sort((p,v)=>p-v);s!==h[0]&&h.unshift(0);var m=h.map((p,v)=>{var x=h[v+1],w=x==null,_=w?s+u-p:x-p;if(_<=0)return null;var S=v%n.length;return A.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:_,height:f,stroke:"none",fill:n[S],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var dJ=(e,t)=>{var{xAxis:n,width:r,height:s,offset:o}=e;return dC(_x(Wt(Wt(Wt({},ii),n),{},{ticks:hC(n),viewBox:{x:0,y:0,width:r,height:s}})),o.left,o.left+o.width,t)},hJ=(e,t)=>{var{yAxis:n,width:r,height:s,offset:o}=e;return dC(_x(Wt(Wt(Wt({},ii),n),{},{ticks:hC(n),viewBox:{x:0,y:0,width:r,height:s}})),o.top,o.top+o.height,t)},mJ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:pn.grid};function E5(e){var t=_C(),n=SC(),r=wC(),s=Wt(Wt({},vn(e,mJ)),{},{x:ye(e.x)?e.x:r.left,y:ye(e.y)?e.y:r.top,width:ye(e.width)?e.width:r.width,height:ye(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:u,x:f,y:d,width:h,height:m,syncWithTicks:p,horizontalValues:v,verticalValues:x}=s,w=Jt(),_=ve(Y=>DE(Y,"xAxis",o,w)),S=ve(Y=>DE(Y,"yAxis",u,w));if(!Cr(h)||!Cr(m)||!ye(f)||!ye(d))return null;var O=s.verticalCoordinatesGenerator||dJ,M=s.horizontalCoordinatesGenerator||hJ,{horizontalPoints:j,verticalPoints:N}=s;if((!j||!j.length)&&typeof M=="function"){var k=v&&v.length,C=M({yAxis:S?Wt(Wt({},S),{},{ticks:k?v:S.ticks}):void 0,width:t??h,height:n??m,offset:r},k?!0:p);hd(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(j=C)}if((!N||!N.length)&&typeof O=="function"){var L=x&&x.length,I=O({xAxis:_?Wt(Wt({},_),{},{ticks:L?x:_.ticks}):void 0,width:t??h,height:n??m,offset:r},L?!0:p);hd(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof I,"]")),Array.isArray(I)&&(N=I)}return A.createElement(ca,{zIndex:s.zIndex},A.createElement("g",{className:"recharts-cartesian-grid"},A.createElement(oJ,{fill:s.fill,fillOpacity:s.fillOpacity,x:s.x,y:s.y,width:s.width,height:s.height,ry:s.ry}),A.createElement(cJ,$a({},s,{horizontalPoints:j})),A.createElement(fJ,$a({},s,{verticalPoints:N})),A.createElement(lJ,$a({},s,{offset:r,horizontalPoints:j,xAxis:_,yAxis:S})),A.createElement(uJ,$a({},s,{offset:r,verticalPoints:N,xAxis:_,yAxis:S}))))}E5.displayName="CartesianGrid";var pJ={},j5=Qt({name:"errorBars",initialState:pJ,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:s}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?s:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(s=>s.dataKey!==r.dataKey||s.direction!==r.direction))}}}),{addErrorBar:Xne,replaceErrorBar:Yne,removeErrorBar:Gne}=j5.actions,gJ=j5.reducer,yJ=["children"];function vJ(e,t){if(e==null)return{};var n,r,s=bJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r({x:0,y:0,value:0}),errorBarOffset:0},wJ=A.createContext(xJ);function _J(e){var{children:t}=e,n=vJ(e,yJ);return A.createElement(wJ.Provider,{value:n},t)}function M5(e,t){var n,r,s=ve(h=>gi(h,e)),o=ve(h=>yi(h,t)),u=(n=s?.allowDataOverflow)!==null&&n!==void 0?n:wt.allowDataOverflow,f=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:_t.allowDataOverflow,d=u||f;return{needClip:d,needClipX:u,needClipY:f}}function SJ(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,s=w5(),{needClipX:o,needClipY:u,needClip:f}=M5(t,n);if(!f||!s)return null;var{x:d,y:h,width:m,height:p}=s;return A.createElement("clipPath",{id:"clipPath-".concat(r)},A.createElement("rect",{x:o?d:d-m/2,y:u?h:h-p/2,width:o?m:m*2,height:u?p:p*2}))}var AJ=["option","isActive"];function Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var t=1;tED(e,"xAxis",t,u),MJ=(e,t,n,r,s,o,u)=>OD(e,"xAxis",t,u),NJ=(e,t,n,r,s,o,u)=>ED(e,"yAxis",n,u),kJ=(e,t,n,r,s,o,u)=>OD(e,"yAxis",n,u),CJ=(e,t,n,r)=>IX(e,"zAxis",r,!1),DJ=(e,t,n,r,s)=>s,PJ=(e,t,n,r,s,o)=>o,RJ=(e,t,n,r,s,o,u)=>vb(e,void 0,void 0,u),LJ=$([W3,DJ],(e,t)=>e.filter(n=>n.type==="scatter").find(n=>n.id===t)),zJ=$([RJ,jJ,MJ,NJ,kJ,CJ,LJ,PJ],(e,t,n,r,s,o,u,f)=>{var{chartData:d,dataStartIndex:h,dataEndIndex:m}=e;if(u!=null){var p;if(u?.data!=null&&u.data.length>0?p=u.data:p=d?.slice(h,m+1),!(p==null||t==null||r==null||n==null||s==null||n?.length===0||s?.length===0))return ZJ({displayedData:p,xAxis:t,yAxis:r,zAxis:o,scatterSettings:u,xAxisTicks:n,yAxisTicks:s,cells:f})}}),IJ=["id"],BJ=["onMouseEnter","onClick","onMouseLeave"],UJ=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function o0(e,t){if(e==null)return{};var n,r,s=VJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{var{dataKey:t,name:n,fill:r,legendType:s,hide:o}=e;return[{inactive:o,dataKey:t,type:s,color:r,value:mC(n,t),payload:e}]},KJ=A.memo(e=>{var{dataKey:t,points:n,stroke:r,strokeWidth:s,fill:o,name:u,hide:f,tooltipType:d,id:h}=e,m={dataDefinedOnItem:n?.map(p=>p.tooltipPayload),getPosition:p=>{var v;return n==null||(v=n[Number(p)])===null||v===void 0?void 0:v.tooltipPosition},settings:{stroke:r,strokeWidth:s,fill:o,nameKey:void 0,dataKey:t,name:mC(u,t),hide:f,type:d,color:o,unit:"",graphicalItemId:h}};return A.createElement(UZ,{tooltipEntrySettings:m})});function XJ(e){var{points:t,props:n}=e,{line:r,lineType:s,lineJointType:o}=n;if(!r)return null;var u=Nr(n),f=Y0(r),d,h;if(s==="joint")d=t.map(S=>{var O,M;return{x:(O=S.cx)!==null&&O!==void 0?O:null,y:(M=S.cy)!==null&&M!==void 0?M:null}});else if(s==="fitting"){var{xmin:m,xmax:p,a:v,b:x}=kB(t),w=S=>v*S+x;d=[{x:m,y:w(m)},{x:p,y:w(p)}]}var _=yn(yn(yn({},u),{},{fill:"none",stroke:u&&u.fill},f),{},{points:d});return A.isValidElement(r)?h=A.cloneElement(r,_):typeof r=="function"?h=r(_):h=A.createElement(pb,ts({},_,{type:o})),A.createElement(hr,{className:"recharts-scatter-line",key:"recharts-scatter-line"},h)}function YJ(e){var{showLabels:t,points:n,children:r}=e,s=Nu(),o=A.useMemo(()=>n?.map(u=>{var f,d,h={x:(f=u.x)!==null&&f!==void 0?f:0,y:(d=u.y)!==null&&d!==void 0?d:0,width:u.width,height:u.height,lowerWidth:u.width,upperWidth:u.width};return yn(yn({},h),{},{value:void 0,payload:u.payload,viewBox:h,parentViewBox:s,fill:void 0})}),[s,n]);return A.createElement(lZ,{value:t?o:void 0},r)}function GJ(e){var{points:t,allOtherScatterProps:n}=e,{shape:r,activeShape:s,dataKey:o}=n,{id:u}=n,f=o0(n,IJ),d=ve(vu),{onMouseEnter:h,onClick:m,onMouseLeave:p}=n,v=o0(n,BJ),x=zZ(h,o,u),w=IZ(p),_=BZ(m,o,u);if(!FB(t))return null;var S=Nr(f);return A.createElement(A.Fragment,null,A.createElement(XJ,{points:t,props:f}),t.map((O,M)=>{var j=s!=null&&s!==!1,N=j&&d===String(M),k=j&&N?s:r,C=yn(yn(yn({},S),O),{},{index:M,[gC]:String(u)});return A.createElement(ca,{key:"symbol-".concat(O?.cx,"-").concat(O?.cy,"-").concat(O?.size,"-").concat(M),zIndex:N?pn.activeDot:void 0},A.createElement(hr,ts({className:"recharts-scatter-symbol"},_k(v,O,M),{onMouseEnter:x(O,M),onMouseLeave:w(O,M),onClick:_(O,M)}),A.createElement(EJ,ts({option:k,isActive:N},C))))}))}function WJ(e){var{previousPointsRef:t,props:n}=e,{points:r,isAnimationActive:s,animationBegin:o,animationDuration:u,animationEasing:f}=n,d=t.current,h=yb(n,"recharts-scatter-"),[m,p]=A.useState(!1),v=A.useCallback(()=>{p(!1)},[]),x=A.useCallback(()=>{p(!0)},[]),w=!m;return A.createElement(YJ,{showLabels:w,points:r},n.children,A.createElement(gb,{animationId:h,begin:o,duration:u,isActive:s,easing:f,onAnimationEnd:v,onAnimationStart:x,key:h},_=>{var S=_===1?r:r?.map((O,M)=>{var j=d&&d[M];return j?yn(yn({},O),{},{cx:O.cx==null?void 0:Nn(j.cx,O.cx,_),cy:O.cy==null?void 0:Nn(j.cy,O.cy,_),size:Nn(j.size,O.size,_)}):yn(yn({},O),{},{size:Nn(0,O.size,_)})});return _>0&&(t.current=S),A.createElement(hr,null,A.createElement(GJ,{points:S,allOtherScatterProps:n,showLabels:w}))}),A.createElement(fZ,{label:n.label}))}function ZJ(e){var{displayedData:t,xAxis:n,yAxis:r,zAxis:s,scatterSettings:o,xAxisTicks:u,yAxisTicks:f,cells:d}=e,h=dt(n.dataKey)?o.dataKey:n.dataKey,m=dt(r.dataKey)?o.dataKey:r.dataKey,p=s&&s.dataKey,v=s?s.range:X3.range,x=v&&v[0],w=n.scale.bandwidth?n.scale.bandwidth():0,_=r.scale.bandwidth?r.scale.bandwidth():0;return t.map((S,O)=>{var M=Ot(S,h),j=Ot(S,m),N=!dt(p)&&Ot(S,p)||"-",k=[{name:dt(n.dataKey)?o.name:n.name||String(n.dataKey),unit:n.unit||"",value:M,payload:S,dataKey:h,type:o.tooltipType,graphicalItemId:o.id},{name:dt(r.dataKey)?o.name:r.name||String(r.dataKey),unit:r.unit||"",value:j,payload:S,dataKey:m,type:o.tooltipType,graphicalItemId:o.id}];N!=="-"&&s!=null&&k.push({name:s.name||s.dataKey,unit:s.unit||"",value:N,payload:S,dataKey:p,type:o.tooltipType,graphicalItemId:o.id});var C=jT({axis:n,ticks:u,bandSize:w,entry:S,index:O,dataKey:h}),L=jT({axis:r,ticks:f,bandSize:_,entry:S,index:O,dataKey:m}),I=N!=="-"&&s!=null?s.scale.map(N):x,Y=I==null?0:Math.sqrt(Math.max(I,0)/Math.PI);return yn(yn({},S),{},{cx:C,cy:L,x:C==null?void 0:C-Y,y:L==null?void 0:L-Y,width:2*Y,height:2*Y,size:I,node:{x:M,y:j,z:N},tooltipPayload:k,tooltipPosition:{x:C,y:L},payload:S},d&&d[O]&&d[O].props)})}var QJ=(e,t,n)=>({x:e.cx,y:e.cy,value:Number(n==="x"?e.node.x:e.node.y),errorVal:Ot(e,t)});function JJ(e){var{hide:t,points:n,className:r,needClip:s,xAxisId:o,yAxisId:u,id:f}=e,d=A.useRef(null);if(t)return null;var h=et("recharts-scatter",r),m=f;return A.createElement(ca,{zIndex:e.zIndex},A.createElement(hr,{className:h,clipPath:s?"url(#clipPath-".concat(m,")"):void 0,id:f},s&&A.createElement("defs",null,A.createElement(SJ,{clipPathId:m,xAxisId:o,yAxisId:u})),A.createElement(_J,{xAxisId:o,yAxisId:u,data:n,dataPointFormatter:QJ,errorBarOffset:0},A.createElement(hr,{key:"recharts-scatter-symbols"},A.createElement(WJ,{props:e,previousPointsRef:d})))))}var N5={xAxisId:0,yAxisId:0,zAxisId:0,label:!1,line:!1,legendType:"circle",lineType:"joint",lineJointType:"linear",shape:"circle",hide:!1,isAnimationActive:"auto",animationBegin:0,animationDuration:400,animationEasing:"linear",zIndex:pn.scatter};function eee(e){var t=vn(e,N5),{animationBegin:n,animationDuration:r,animationEasing:s,hide:o,isAnimationActive:u,legendType:f,lineJointType:d,lineType:h,shape:m,xAxisId:p,yAxisId:v,zAxisId:x}=t,w=o0(t,UJ),{needClip:_}=M5(p,v),S=A.useMemo(()=>vZ(e.children,bx),[e.children]),O=Jt(),M=ve(j=>zJ(j,p,v,x,e.id,S,O));return _==null||M==null?null:A.createElement(A.Fragment,null,A.createElement(KJ,{dataKey:e.dataKey,points:M,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:e.id}),A.createElement(JJ,ts({},w,{xAxisId:p,yAxisId:v,zAxisId:x,lineType:h,lineJointType:d,legendType:f,shape:m,hide:o,isAnimationActive:u,animationBegin:n,animationDuration:r,animationEasing:s,points:M,needClip:_})))}function tee(e){var t=vn(e,N5),n=Jt();return A.createElement(KZ,{id:t.id,type:"scatter"},r=>A.createElement(A.Fragment,null,A.createElement(VZ,{legendPayload:HJ(t)}),A.createElement(JZ,{type:"scatter",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:t.zAxisId,dataKey:t.dataKey,hide:t.hide,name:t.name,tooltipType:t.tooltipType,isPanorama:n}),A.createElement(eee,ts({},t,{id:r}))))}var k5=A.memo(tee,mh);k5.displayName="Scatter";var nee=["domain","range"],ree=["domain","range"];function Rj(e,t){if(e==null)return{};var n,r,s=iee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{if(u!=null)return Ij(Ij({},o),{},{type:u})},[o,u]);return A.useLayoutEffect(()=>{f!=null&&(n.current===null?t(iQ(f)):n.current!==f&&t(aQ({prev:n.current,next:f})),n.current=f)},[f,t]),A.useLayoutEffect(()=>()=>{n.current&&(t(sQ(n.current)),n.current=null)},[t]),null}var hee=e=>{var{xAxisId:t,className:n}=e,r=ve(yC),s=Jt(),o="xAxis",u=ve(O=>TD(O,o,t,s)),f=ve(O=>AX(O,t)),d=ve(O=>NX(O,t)),h=ve(O=>H3(O,t));if(f==null||d==null||h==null)return null;var{dangerouslySetInnerHTML:m,ticks:p,scale:v}=e,x=u0(e,see),{id:w,scale:_}=h,S=u0(h,oee);return A.createElement(Sx,l0({},x,S,{x:d.x,y:d.y,width:f.width,height:f.height,className:et("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:u,axisType:o,axisId:t}))},mee={allowDataOverflow:wt.allowDataOverflow,allowDecimals:wt.allowDecimals,allowDuplicatedCategory:wt.allowDuplicatedCategory,angle:wt.angle,axisLine:ii.axisLine,height:wt.height,hide:!1,includeHidden:wt.includeHidden,interval:wt.interval,label:!1,minTickGap:wt.minTickGap,mirror:wt.mirror,orientation:wt.orientation,padding:wt.padding,reversed:wt.reversed,scale:wt.scale,tick:wt.tick,tickCount:wt.tickCount,tickLine:ii.tickLine,tickSize:ii.tickSize,type:wt.type,niceTicks:wt.niceTicks,xAxisId:0},pee=e=>{var t=vn(e,mee);return A.createElement(A.Fragment,null,A.createElement(dee,{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}),A.createElement(hee,t))},D5=A.memo(pee,C5);D5.displayName="XAxis";var gee=["type"],yee=["dangerouslySetInnerHTML","ticks","scale"],vee=["id","scale"];function c0(){return c0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(u!=null)return Uj(Uj({},o),{},{type:u})},[u,o]);return A.useLayoutEffect(()=>{f!=null&&(n.current===null?t(oQ(f)):n.current!==f&&t(lQ({prev:n.current,next:f})),n.current=f)},[f,t]),A.useLayoutEffect(()=>()=>{n.current&&(t(uQ(n.current)),n.current=null)},[t]),null}function Aee(e){var{yAxisId:t,className:n,width:r,label:s}=e,o=A.useRef(null),u=A.useRef(null),f=ve(yC),d=Jt(),h=it(),m="yAxis",p=ve(C=>DX(C,t)),v=ve(C=>CX(C,t)),x=ve(C=>TD(C,m,t,d)),w=ve(C=>K3(C,t));if(A.useLayoutEffect(()=>{if(!(r!=="auto"||!p||wx(s)||A.isValidElement(s)||w==null)){var C=o.current;if(C){var L=C.getCalculatedWidth();Math.round(p.width)!==Math.round(L)&&h(cQ({id:t,width:L}))}}},[x,p,h,s,t,r,w]),p==null||v==null||w==null)return null;var{dangerouslySetInnerHTML:_,ticks:S,scale:O}=e,M=f0(e,yee),{id:j,scale:N}=w,k=f0(w,vee);return A.createElement(Sx,c0({},M,k,{ref:o,labelRef:u,x:v.x,y:v.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:p.width,height:p.height,className:et("recharts-".concat(m," ").concat(m),n),viewBox:f,ticks:x,axisType:m,axisId:t}))}var Tee={allowDataOverflow:_t.allowDataOverflow,allowDecimals:_t.allowDecimals,allowDuplicatedCategory:_t.allowDuplicatedCategory,angle:_t.angle,axisLine:ii.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:ii.tickLine,tickSize:ii.tickSize,type:_t.type,niceTicks:_t.niceTicks,width:_t.width,yAxisId:0},Oee=e=>{var t=vn(e,Tee);return A.createElement(A.Fragment,null,A.createElement(See,{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}),A.createElement(Aee,t))},P5=A.memo(Oee,C5);P5.displayName="YAxis";var Eee=(e,t)=>t,Ax=$([Eee,ht,o3,Dt,FD,vi,rG,Xt],cG);function jee(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Tx(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(jee(e)){var s=e.currentTarget.getBBox();n=s.width>0?t.width/s.width:1,r=s.height>0?t.height/s.height:1}else{var o=e.currentTarget;n=o.offsetWidth>0?t.width/o.offsetWidth:1,r=o.offsetHeight>0?t.height/o.offsetHeight:1}var u=(f,d)=>({relativeX:Math.round((f-t.left)/n),relativeY:Math.round((d-t.top)/r)});return"touches"in e?Array.from(e.touches).map(f=>u(f.clientX,f.clientY)):u(e.clientX,e.clientY)}var R5=Pn("mouseClick"),L5=ju();L5.startListening({actionCreator:R5,effect:(e,t)=>{var n=e.payload,r=Ax(t.getState(),Tx(n));r?.activeIndex!=null&&t.dispatch(WX({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var d0=Pn("mouseMove"),z5=ju(),Xs=null,ka=null,Fy=null;z5.startListening({actionCreator:d0,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:s,throttledEvents:o}=r.eventSettings,u=o==="all"||o?.includes("mousemove");Xs!==null&&(cancelAnimationFrame(Xs),Xs=null),ka!==null&&(typeof s!="number"||!u)&&(clearTimeout(ka),ka=null),Fy=Tx(n);var f=()=>{var d=t.getState(),h=ux(d,d.tooltip.settings.shared);if(!Fy){Xs=null,ka=null;return}if(h==="axis"){var m=Ax(d,Fy);m?.activeIndex!=null?t.dispatch(RD({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(PD())}Xs=null,ka=null};if(!u){f();return}s==="raf"?Xs=requestAnimationFrame(f):typeof s=="number"&&ka===null&&(ka=setTimeout(f,s))}});function Mee(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 Vj={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},I5=Qt({name:"rootProps",initialState:Vj,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:Vj.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}}}),Nee=I5.reducer,{updateOptions:kee}=I5.actions,Cee=null,Dee={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)},B5=Qt({name:"polarOptions",initialState:Cee,reducers:Dee}),{updatePolarOptions:Wne}=B5.actions,Pee=B5.reducer,U5=Pn("keyDown"),V5=Pn("focus"),q5=Pn("blur"),Nh=ju(),Ys=null,Ca=null,Mf=null;Nh.startListening({actionCreator:U5,effect:(e,t)=>{Mf=e.payload,Ys!==null&&(cancelAnimationFrame(Ys),Ys=null);var n=t.getState(),{throttleDelay:r,throttledEvents:s}=n.eventSettings,o=s==="all"||s.includes("keydown");Ca!==null&&(typeof r!="number"||!o)&&(clearTimeout(Ca),Ca=null);var u=()=>{try{var f=t.getState(),d=f.rootProps.accessibilityLayer!==!1;if(!d)return;var{keyboardInteraction:h}=f.tooltip,m=Mf;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var p=cx(h,Co(f),qu(f),Fu(f)),v=p==null?-1:Number(p);if(!Number.isFinite(v)||v<0)return;var x=vi(f);if(m==="Enter"){var w=zd(f,"axis","hover",String(h.index));t.dispatch(Ld({active:!h.active,activeIndex:h.index,activeCoordinate:w}));return}var _=BX(f),S=_==="left-to-right"?1:-1,O=m==="ArrowRight"?1:-1,M=v+O*S;if(x==null||M>=x.length||M<0)return;var j=zd(f,"axis","hover",String(M));t.dispatch(Ld({active:!0,activeIndex:M.toString(),activeCoordinate:j}))}finally{Ys=null,Ca=null}};if(!o){u();return}r==="raf"?Ys=requestAnimationFrame(u):typeof r=="number"&&Ca===null&&(u(),Mf=null,Ca=setTimeout(()=>{Mf?u():(Ca=null,Ys=null)},r))}});Nh.startListening({actionCreator:V5,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:s}=n.tooltip;if(!s.active&&s.index==null){var o="0",u=zd(n,"axis","hover",String(o));t.dispatch(Ld({active:!0,activeIndex:o,activeCoordinate:u}))}}}});Nh.startListening({actionCreator:q5,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:s}=n.tooltip;s.active&&t.dispatch(Ld({active:!1,activeIndex:s.index,activeCoordinate:s.coordinate}))}}});function $5(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var s=Reflect.get(n,r);return typeof s=="function"?s.bind(n):s}})}var Yn=Pn("externalEvent"),F5=ju(),Nf=new Map,Il=new Map,Hy=new Map;F5.startListening({actionCreator:Yn,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var s=r.type,o=$5(r);Hy.set(s,{handler:n,reactEvent:o});var u=Nf.get(s);u!==void 0&&(cancelAnimationFrame(u),Nf.delete(s));var f=t.getState(),{throttleDelay:d,throttledEvents:h}=f.eventSettings,m=h,p=m==="all"||m?.includes(s),v=Il.get(s);v!==void 0&&(typeof d!="number"||!p)&&(clearTimeout(v),Il.delete(s));var x=()=>{var S=Hy.get(s);try{if(!S)return;var{handler:O,reactEvent:M}=S,j=t.getState(),N={activeCoordinate:qY(j),activeDataKey:BY(j),activeIndex:vu(j),activeLabel:XD(j),activeTooltipIndex:vu(j),isTooltipActive:$Y(j)};O&&O(N,M)}finally{Nf.delete(s),Il.delete(s),Hy.delete(s)}};if(!p){x();return}if(d==="raf"){var w=requestAnimationFrame(x);Nf.set(s,w)}else if(typeof d=="number"){if(!Il.has(s)){x();var _=setTimeout(x,d);Il.set(s,_)}}else x()}}});var Ree=$([No],e=>e.tooltipItemPayloads),Lee=$([Ree,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(o=>o.settings.graphicalItemId===n);if(r!=null){var{getPosition:s}=r;if(s!=null)return s(t)}}}),H5=Pn("touchMove"),K5=ju(),Da=null,Hi=null,qj=null,Bl=null;K5.startListening({actionCreator:H5,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){Bl=$5(n);var r=t.getState(),{throttleDelay:s,throttledEvents:o}=r.eventSettings,u=o==="all"||o.includes("touchmove");Da!==null&&(cancelAnimationFrame(Da),Da=null),Hi!==null&&(typeof s!="number"||!u)&&(clearTimeout(Hi),Hi=null),qj=Array.from(n.touches).map(d=>Tx({clientX:d.clientX,clientY:d.clientY,currentTarget:n.currentTarget}));var f=()=>{if(Bl!=null){var d=t.getState(),h=ux(d,d.tooltip.settings.shared);if(h==="axis"){var m,p=(m=qj)===null||m===void 0?void 0:m[0];if(p==null){Da=null,Hi=null;return}var v=Ax(d,p);v?.activeIndex!=null&&t.dispatch(RD({activeIndex:v.activeIndex,activeDataKey:void 0,activeCoordinate:v.activeCoordinate}))}else if(h==="item"){var x,w=Bl.touches[0];if(document.elementFromPoint==null||w==null)return;var _=document.elementFromPoint(w.clientX,w.clientY);if(!_||!_.getAttribute)return;var S=_.getAttribute(iV),O=(x=_.getAttribute(gC))!==null&&x!==void 0?x:void 0,M=ko(d).find(k=>k.id===O);if(S==null||M==null||O==null)return;var{dataKey:j}=M,N=Lee(d,S,O);t.dispatch(DD({activeDataKey:j,activeIndex:S,activeCoordinate:N,activeGraphicalItemId:O}))}Da=null,Hi=null}};if(!u){f();return}s==="raf"?Da=requestAnimationFrame(f):typeof s=="number"&&Hi===null&&(f(),Bl=null,Hi=setTimeout(()=>{Bl?f():(Hi=null,Da=null)},s))}}});var X5={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},Y5=Qt({name:"eventSettings",initialState:X5,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:zee}=Y5.actions,Iee=Y5.reducer,Bee=zk({brush:yQ,cartesianAxis:fQ,chartData:qG,errorBars:gJ,eventSettings:Iee,graphicalItems:ZZ,layout:$U,legend:WV,options:zG,polarAxis:hZ,polarOptions:Pee,referenceElements:wQ,renderedTicks:IQ,rootProps:Nee,tooltip:ZX,zIndex:AG}),Uee=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return mU({reducer:Bee,preloadedState:t,middleware:r=>{var s;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((s="es6")!==null&&s!==void 0?s:"")}).concat([L5.middleware,z5.middleware,Nh.middleware,F5.middleware,K5.middleware])},enhancers:r=>{var s=r;return typeof r=="function"&&(s=r()),s.concat(Qk({type:"raf"}))},devTools:{serialize:{replacer:Mee},name:"recharts-".concat(n)}})};function Vee(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,s=Jt(),o=A.useRef(null);if(s)return n;o.current==null&&(o.current=Uee(t,r));var u=ib;return A.createElement(mq,{context:u,store:o.current},n)}function qee(e){var{layout:t,margin:n}=e,r=it(),s=Jt();return A.useEffect(()=>{s||(r(UU(t)),r(BU(n)))},[r,s,t,n]),null}var $ee=A.memo(qee,mh);function Fee(e){var t=it();return A.useEffect(()=>{t(kee(e))},[t,e]),null}var Hee=e=>{var t=it();return A.useEffect(()=>{t(zee(e))},[t,e]),null},Kee=A.memo(Hee,mh);function $j(e){var{zIndex:t,isPanorama:n}=e,r=A.useRef(null),s=it();return A.useLayoutEffect(()=>(r.current&&s(_G({zIndex:t,element:r.current,isPanorama:n})),()=>{s(SG({zIndex:t,isPanorama:n}))}),[s,t,n]),A.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function Fj(e){var{children:t,isPanorama:n}=e,r=ve(dG);if(!r||r.length===0)return t;var s=r.filter(u=>u<0),o=r.filter(u=>u>0);return A.createElement(A.Fragment,null,s.map(u=>A.createElement($j,{key:u,zIndex:u,isPanorama:n})),t,o.map(u=>A.createElement($j,{key:u,zIndex:u,isPanorama:n})))}var Xee=["children"];function Yee(e,t){if(e==null)return{};var n,r,s=Gee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{var n=_C(),r=SC(),s=PC();if(!Cr(n)||!Cr(r))return null;var{children:o,otherAttributes:u,title:f,desc:d}=e,h,m;return u!=null&&(typeof u.tabIndex=="number"?h=u.tabIndex:h=s?0:void 0,typeof u.role=="string"?m=u.role:m=s?"application":void 0),A.createElement(ek,qd({},u,{title:f,desc:d,role:m,tabIndex:h,width:n,height:r,style:Wee,ref:t}),o)}),Qee=e=>{var{children:t}=e,n=ve(ch);if(!n)return null;var{width:r,height:s,y:o,x:u}=n;return A.createElement(ek,{width:r,height:s,x:u,y:o},t)},Hj=A.forwardRef((e,t)=>{var{children:n}=e,r=Yee(e,Xee),s=Jt();return s?A.createElement(Qee,null,A.createElement(Fj,{isPanorama:!0},n)):A.createElement(Zee,qd({ref:t},r),A.createElement(Fj,{isPanorama:!1},n))});function Jee(){var e=it(),[t,n]=A.useState(null),r=ve(rV);return A.useEffect(()=>{if(t!=null){var s=t.getBoundingClientRect(),o=s.width/t.offsetWidth;Le(o)&&o!==r&&e(qU(o))}},[t,e,r]),n}function Kj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function ete(e){for(var t=1;t(ZG(),null);function $d(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var ate=A.forwardRef((e,t)=>{var n,r,s=A.useRef(null),[o,u]=A.useState({containerWidth:$d((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:$d((r=e.style)===null||r===void 0?void 0:r.height)}),f=A.useCallback((h,m)=>{u(p=>{var v=Math.round(h),x=Math.round(m);return p.containerWidth===v&&p.containerHeight===x?p:{containerWidth:v,containerHeight:x}})},[]),d=A.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null&&typeof ResizeObserver<"u"){var{width:m,height:p}=h.getBoundingClientRect();f(m,p);var v=w=>{var _=w[0];if(_!=null){var{width:S,height:O}=_.contentRect;f(S,O)}},x=new ResizeObserver(v);x.observe(h),s.current=x}},[t,f]);return A.useEffect(()=>()=>{var h=s.current;h?.disconnect()},[f]),A.createElement(A.Fragment,null,A.createElement(Cu,{width:o.containerWidth,height:o.containerHeight}),A.createElement("div",ta({ref:d},e)))}),ste=A.forwardRef((e,t)=>{var{width:n,height:r}=e,[s,o]=A.useState({containerWidth:$d(n),containerHeight:$d(r)}),u=A.useCallback((d,h)=>{o(m=>{var p=Math.round(d),v=Math.round(h);return m.containerWidth===p&&m.containerHeight===v?m:{containerWidth:p,containerHeight:v}})},[]),f=A.useCallback(d=>{if(typeof t=="function"&&t(d),d!=null){var{width:h,height:m}=d.getBoundingClientRect();u(h,m)}},[t,u]);return A.createElement(A.Fragment,null,A.createElement(Cu,{width:s.containerWidth,height:s.containerHeight}),A.createElement("div",ta({ref:f},e)))}),ote=A.forwardRef((e,t)=>{var{width:n,height:r}=e;return A.createElement(A.Fragment,null,A.createElement(Cu,{width:n,height:r}),A.createElement("div",ta({ref:t},e)))}),lte=A.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?A.createElement(ste,ta({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?A.createElement(ote,ta({},e,{width:n,height:r,ref:t})):A.createElement(A.Fragment,null,A.createElement(Cu,{width:n,height:r}),A.createElement("div",ta({ref:t},e)))});function ute(e){return e?ate:lte}var cte=A.forwardRef((e,t)=>{var{children:n,className:r,height:s,onClick:o,onContextMenu:u,onDoubleClick:f,onMouseDown:d,onMouseEnter:h,onMouseLeave:m,onMouseMove:p,onMouseUp:v,onTouchEnd:x,onTouchMove:w,onTouchStart:_,style:S,width:O,responsive:M,dispatchTouchEvents:j=!0}=e,N=A.useRef(null),k=it(),[C,L]=A.useState(null),[I,Y]=A.useState(null),te=Jee(),ie=fb(),K=ie?.width>0?ie.width:O,be=ie?.height>0?ie.height:s,pe=A.useCallback(re=>{te(re),typeof t=="function"&&t(re),L(re),Y(re),re!=null&&(N.current=re)},[te,t,L,Y]),xe=A.useCallback(re=>{k(R5(re)),k(Yn({handler:o,reactEvent:re}))},[k,o]),V=A.useCallback(re=>{k(d0(re)),k(Yn({handler:h,reactEvent:re}))},[k,h]),Q=A.useCallback(re=>{k(PD()),k(Yn({handler:m,reactEvent:re}))},[k,m]),ne=A.useCallback(re=>{k(d0(re)),k(Yn({handler:p,reactEvent:re}))},[k,p]),le=A.useCallback(()=>{k(V5())},[k]),ue=A.useCallback(()=>{k(q5())},[k]),P=A.useCallback(re=>{k(U5(re.key))},[k]),H=A.useCallback(re=>{k(Yn({handler:u,reactEvent:re}))},[k,u]),ae=A.useCallback(re=>{k(Yn({handler:f,reactEvent:re}))},[k,f]),se=A.useCallback(re=>{k(Yn({handler:d,reactEvent:re}))},[k,d]),Z=A.useCallback(re=>{k(Yn({handler:v,reactEvent:re}))},[k,v]),oe=A.useCallback(re=>{k(Yn({handler:_,reactEvent:re}))},[k,_]),he=A.useCallback(re=>{j&&k(H5(re)),k(Yn({handler:w,reactEvent:re}))},[k,j,w]),_e=A.useCallback(re=>{k(Yn({handler:x,reactEvent:re}))},[k,x]),J=ute(M);return A.createElement(e5.Provider,{value:C},A.createElement(H9.Provider,{value:I},A.createElement(J,{width:K??S?.width,height:be??S?.height,className:et("recharts-wrapper",r),style:ete({position:"relative",cursor:"default",width:K,height:be},S),onClick:xe,onContextMenu:H,onDoubleClick:ae,onFocus:le,onBlur:ue,onKeyDown:P,onMouseDown:se,onMouseEnter:V,onMouseLeave:Q,onMouseMove:ne,onMouseUp:Z,onTouchEnd:_e,onTouchMove:he,onTouchStart:oe,ref:pe},A.createElement(ite,null),n)))}),fte=["width","height","responsive","children","className","style","compact","title","desc"];function dte(e,t){if(e==null)return{};var n,r,s=hte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r{var{width:n,height:r,responsive:s,children:o,className:u,style:f,compact:d,title:h,desc:m}=e,p=dte(e,fte),v=Nr(p);return d?A.createElement(A.Fragment,null,A.createElement(Cu,{width:n,height:r}),A.createElement(Hj,{otherAttributes:v,title:h,desc:m},o)):A.createElement(cte,{className:u,style:f,width:n,height:r,responsive:s??!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},A.createElement(Hj,{otherAttributes:v,title:h,desc:m,ref:t},A.createElement(SQ,null,o)))});function h0(){return h0=Object.assign?Object.assign.bind():function(e){for(var t=1;tA.createElement(wte,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:_te,tooltipPayloadSearcher:RG,categoricalChartProps:e,ref:t}));const Ox={bg:{primary:"#0B0D17",secondary:"#12152A",tertiary:"#1A1F3D",hover:"#222850"},accent:{purple:"#8B5CF6",purpleLight:"#A78BFA",purpleDim:"#6D28D9",blue:"#38BDF8",blueLight:"#7DD3FC",blueDim:"#0284C7",cyan:"#06B6D4",amber:"#F59E0B"},text:{primary:"#F1F5F9",secondary:"#94A3B8",muted:"#64748B"},heatmap:{bad:"#EF4444",badBg:"#7F1D1D",mid:"#EAB308",midBg:"#713F12",good:"#22C55E",goodBg:"#14532D"}},Ate={bg:{primary:"#FFFFFF",secondary:"#F8FAFC",tertiary:"#F1F5F9",hover:"#E2E8F0"},accent:{purple:"#7C3AED",purpleLight:"#6D28D9",purpleDim:"#5B21B6",blue:"#0284C7",blueLight:"#0369A1",blueDim:"#075985",cyan:"#0891B2",amber:"#D97706"},text:{primary:"#0F172A",secondary:"#334155",muted:"#64748B"},heatmap:{bad:"#DC2626",badBg:"#FEE2E2",mid:"#CA8A04",midBg:"#FEF9C3",good:"#16A34A",goodBg:"#DCFCE7"}},Tte={dark:Ox,light:Ate},Ex=A.createContext({mode:"dark",colors:Ox});function jx(){return A.useContext(Ex).colors}function Ote(){return A.useContext(Ex).mode}function kf(e,t,n,r,s=!1,o){const u=o??Ox,f=n-t;let d=f===0?.5:(e-t)/f;s&&(d=1-d);const h=.1+d*.55;return{bg:Ete(r,h),text:u.text.primary}}function Ete(e,t){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),s=parseInt(e.slice(5,7),16);return`rgba(${n}, ${r}, ${s}, ${t.toFixed(2)})`}function jte(e=640){const[t,n]=A.useState(!1);return A.useEffect(()=>{const r=()=>n(window.innerWidthwindow.removeEventListener("resize",r)},[e]),t}function Yj({base:e,sub:t}){return b.jsxs(b.Fragment,{children:[e,b.jsx("sub",{className:"text-[0.7em]",children:t})]})}function Mte({active:e,payload:t,xSub:n,ySub:r}){if(!e||!t?.length)return null;const s=t[0].payload,o=s.type==="cascade"?"Cascade":s.type==="2-part"?"2-Part":"Speech-to-Speech",u=s.type==="cascade"?"bg-purple/20 text-purple-light":s.type==="2-part"?"bg-emerald-500/20 text-emerald-400":"bg-blue/20 text-blue-light";return b.jsxs("div",{className:"bg-bg-tertiary border border-border-default rounded-lg p-3 shadow-xl max-w-xs",children:[b.jsx("div",{className:"text-sm font-semibold text-text-primary mb-1",children:s.name}),b.jsxs("div",{className:"flex gap-4 text-xs",children:[b.jsxs("div",{children:[b.jsxs("span",{className:"text-text-muted",children:[b.jsx(Yj,{base:"EVA-A",sub:n}),":"]})," ",b.jsx("span",{className:"text-purple-light font-mono",children:s.plotX.toFixed(2)})]}),b.jsxs("div",{children:[b.jsxs("span",{className:"text-text-muted",children:[b.jsx(Yj,{base:"EVA-X",sub:r}),":"]})," ",b.jsx("span",{className:"text-blue-light font-mono",children:s.plotY.toFixed(2)})]})]}),s.type==="cascade"&&b.jsxs("div",{className:"text-[10px] text-text-muted mt-1.5 space-y-0.5",children:[b.jsxs("div",{children:["STT: ",s.stt]}),b.jsxs("div",{children:["LLM: ",s.llm]}),b.jsxs("div",{children:["TTS: ",s.tts]})]}),b.jsx("div",{className:"mt-1.5",children:b.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full font-medium ${u}`,children:o})})]})}function Gj({x:e,y:t,base:n,sub:r,suffix:s,fill:o,angle:u,small:f}){const d=f?12:20,h=f?9:14,m=f?3:5;return b.jsxs("text",{x:e,y:t,fill:o,fontSize:d,fontWeight:600,textAnchor:"middle",transform:u?`rotate(${u}, ${e}, ${t})`:void 0,children:[n,b.jsx("tspan",{fontSize:h,dy:m,children:r}),s&&b.jsx("tspan",{fontSize:d,dy:-m,children:s})]})}const Wj=[0,.2,.4,.6,.8,1],m0="#A78BFA",Nte="#C4B5FD",G5="#F59E0B",kte="#FBBF24",W5="#34D399",Cte="#6EE7B7",Z5="#06B6D4";function Dte(e){const t=[];for(const n of e)e.some(s=>s.plotY>=n.plotY&&s.plotX>=n.plotX&&(s.plotY>n.plotY||s.plotX>n.plotX))||t.push(n);return t.sort((n,r)=>n.plotX-r.plotX).map(n=>({plotX:n.plotX,plotY:n.plotY}))}function Pte({frontier:e}){const t=mQ(),n=pQ();if(!t||!n||e.length<2)return null;const r=e.map(s=>`${t(s.plotX)},${n(s.plotY)}`).join(" ");return b.jsx("polyline",{points:r,fill:"none",stroke:Z5,strokeWidth:2,strokeDasharray:"6 3",pointerEvents:"none"})}const Ul=[{title:"pass@1",description:b.jsx(b.Fragment,{children:"Average of per-sample scores, where each sample scores 1 if all metrics in category surpass metric-specific threshold, else 0."}),subscript:"pass@1",getX:e=>e.successRates.accuracy.pass_threshold,getY:e=>e.successRates.experience.pass_threshold,domain:[0,1]},{title:"pass@k (k=3)",description:b.jsx(b.Fragment,{children:"Percent of scenarios where at least 1 of k=3 trials surpasses metric-specific thresholds in all metrics in the category. ."}),subscript:"pass@k",getX:e=>e.successRates.accuracy.pass_at_k,getY:e=>e.successRates.experience.pass_at_k,domain:[0,1]},{title:"pass^k (k=3)",description:b.jsx(b.Fragment,{children:"Per-scenario probability of all k=3 trials succeeding (scenario pass rate raised to the k-th power) for that category, averaged across scenarios."}),subscript:"pass^k",getX:e=>e.successRates.accuracy.pass_k,getY:e=>e.successRates.experience.pass_k,domain:[0,1]},{title:"Mean",description:b.jsx(b.Fragment,{children:"Average of per-sample scores, where each sample's score is the mean of the submetrics in that category."}),subscript:"mean",getX:e=>e.successRates.accuracy.mean,getY:e=>e.successRates.experience.mean,domain:[0,1]}];function Rte(e){return e==="2-part"?{fill:W5,stroke:Cte}:e==="s2s"?{fill:G5,stroke:kte}:{fill:m0,stroke:Nte}}function Lte({systems:e}){const t=jx(),[n,r]=A.useState(0),s=jte(),o=Ul[n],u=e.map(m=>({...m,plotX:o.getX(m),plotY:o.getY(m)})),f=Dte(u),d=()=>r(m=>(m-1+Ul.length)%Ul.length),h=()=>r(m=>(m+1)%Ul.length);return b.jsxs("div",{className:"bg-bg-secondary rounded-xl border border-border-default p-6",children:[b.jsx("div",{className:"flex flex-wrap justify-center gap-2 mb-6",children:Ul.map((m,p)=>b.jsx("button",{onClick:()=>r(p),className:`px-3 py-1 rounded-full text-xs font-medium transition-colors ${p===n?"bg-purple/20 text-purple-light":"bg-bg-hover text-text-muted hover:text-text-secondary"}`,children:m.title},p))}),b.jsxs("div",{className:"flex items-center justify-between mb-6",children:[b.jsx("button",{onClick:d,className:"p-2 rounded-lg hover:bg-bg-hover transition-colors text-text-muted hover:text-text-primary",children:b.jsx(YR,{className:"w-6 h-6"})}),b.jsxs("div",{className:"text-center flex-1 px-4",children:[b.jsx("h3",{className:"text-xl font-semibold text-text-primary mb-2",children:o.title}),b.jsx("p",{className:"text-sm text-text-muted leading-loose max-w-xl mx-auto",children:o.description})]}),b.jsx("button",{onClick:h,className:"p-2 rounded-lg hover:bg-bg-hover transition-colors text-text-muted hover:text-text-primary",children:b.jsx(sM,{className:"w-6 h-6"})})]}),b.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center gap-6 max-w-4xl mx-auto",children:[b.jsx("div",{className:"flex-1 min-w-0",children:b.jsx("div",{style:{width:"100%",aspectRatio:"1"},className:"[&_.recharts-surface]:overflow-visible min-h-[300px] sm:min-h-[400px]",children:b.jsx(CV,{width:"100%",height:"100%",children:b.jsxs(Ste,{margin:{top:15,right:15,bottom:s?45:60,left:s?25:40},style:{overflow:"visible"},children:[b.jsx(E5,{strokeDasharray:"3 3",stroke:t.bg.tertiary}),b.jsx(D5,{type:"number",dataKey:"plotX",domain:o.domain,ticks:Wj,allowDataOverflow:!0,tickFormatter:m=>m.toFixed(1),stroke:t.text.muted,tick:{fill:t.text.secondary,fontSize:11},label:({viewBox:m})=>{const{x:p,y:v,width:x}=m;return b.jsx(Gj,{x:p+x/2,y:v+(s?35:50),base:"Accuracy (EVA-A",sub:o.subscript,suffix:")",fill:t.accent.purpleLight,small:s})}}),b.jsx(P5,{type:"number",dataKey:"plotY",domain:o.domain,ticks:Wj,allowDataOverflow:!0,tickFormatter:m=>m.toFixed(1),stroke:t.text.muted,tick:{fill:t.text.secondary,fontSize:11},label:({viewBox:m})=>{const{x:p,y:v,height:x}=m;return b.jsx(Gj,{x:p-(s?2:8),y:v+x/2,base:"Experience (EVA-X",sub:o.subscript,suffix:")",fill:t.accent.blueLight,angle:-90,small:s})}}),b.jsx(aW,{content:b.jsx(Mte,{xSub:o.subscript,ySub:o.subscript}),cursor:!1}),b.jsx(Pte,{frontier:f}),b.jsx(k5,{data:u,fill:m0,children:u.map(m=>{const{fill:p,stroke:v}=Rte(m.type);return b.jsx(bx,{fill:p,stroke:v,strokeWidth:1.5,r:8},m.id)})})]})})})}),b.jsxs("div",{className:"flex flex-wrap justify-center gap-x-4 gap-y-2 lg:flex-col lg:gap-3 lg:flex-shrink-0 lg:pr-2",children:[b.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 rounded-full flex-shrink-0",style:{backgroundColor:m0}}),b.jsx("span",{className:"whitespace-nowrap",children:"Cascade"})]}),b.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 rounded-full flex-shrink-0",style:{backgroundColor:W5}}),b.jsx("span",{className:"whitespace-nowrap",children:"Audio Native"})]}),b.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm text-text-secondary",children:[b.jsx("div",{className:"w-3 h-3 sm:w-3.5 sm:h-3.5 rounded-full flex-shrink-0",style:{backgroundColor:G5}}),b.jsx("span",{className:"whitespace-nowrap",children:"Speech-to-Speech"})]}),b.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm text-text-secondary",children:[b.jsx("div",{className:"w-5 sm:w-6 h-0 border-t-2 border-dashed flex-shrink-0",style:{borderColor:Z5}}),b.jsx("span",{className:"whitespace-nowrap",children:"Pareto Frontier"})]})]})]})]})}const zte=["task_completion","agent_tts_fidelity","faithfulness"],Ite=["turn_taking","conciseness","conversation_progression"],Bte={task_completion:"Task Completion",agent_tts_fidelity:"Agent Speech Fidelity",faithfulness:"Faithfulness"},Ute={turn_taking:"Turn Taking",conciseness:"Conciseness",conversation_progression:"Conversation Progression"},Zj=new Set(["response_speed"]),Vte=[{id:"ultravox-v0-7-kokoro",name:"ultravox v0.7 + kokoro",shortName:"ultravox v0.7 + kokoro",stt:"-",llm:"ultravox v0.7",tts:"kokoro",type:"2-part",evaA:.3933,evaX:.3067,accuracyMetrics:{task_completion:.58,agent_tts_fidelity:.9662,faithfulness:.45},experienceMetrics:{turn_taking:.3782,conciseness:.7532,conversation_progression:.64},diagnosticMetrics:{key_entity_transcription:.784,response_speed:5.9224},successRates:{accuracy:{pass_threshold:.3933,mean:.6654,pass_at_k:.56,pass_k:.2793},experience:{pass_threshold:.3067,mean:.5905,pass_at_k:.54,pass_k:.1807}}},{id:"gpt-realtime-mini",name:"gpt-realtime-mini",shortName:"gpt-realtime-mini",stt:"-",llm:"gpt-realtime-mini",tts:"-",type:"s2s",evaA:.1867,evaX:.4333,accuracyMetrics:{task_completion:.2867,agent_tts_fidelity:.9882,faithfulness:.1833},experienceMetrics:{turn_taking:.7607,conciseness:.8116,conversation_progression:.3567},diagnosticMetrics:{key_entity_transcription:0,response_speed:3.7524},successRates:{accuracy:{pass_threshold:.1867,mean:.4861,pass_at_k:.28,pass_k:.1185},experience:{pass_threshold:.4333,mean:.643,pass_at_k:.7,pass_k:.2615}}},{id:"ultravox-realtime",name:"ultravox-realtime",shortName:"ultravox-realtime",stt:"-",llm:"ultravox-realtime",tts:"-",type:"2-part",evaA:.28,evaX:.44,accuracyMetrics:{task_completion:.4867,agent_tts_fidelity:.9426,faithfulness:.3167},experienceMetrics:{turn_taking:.519,conciseness:.6948,conversation_progression:.5933},diagnosticMetrics:{key_entity_transcription:.8484,response_speed:4.847},successRates:{accuracy:{pass_threshold:.28,mean:.582,pass_at_k:.46,pass_k:.1511},experience:{pass_threshold:.44,mean:.6024,pass_at_k:.76,pass_k:.2356}}},{id:"cohere-transcribe-gpt-5-4-mini-kokoro",name:"cohere-transcribe + gpt-5.4-mini + kokoro",shortName:"gpt-5.4-mini (cohere-transcribe)",stt:"cohere-transcribe",llm:"gpt-5.4-mini",tts:"kokoro",type:"cascade",evaA:.26,evaX:.3733,accuracyMetrics:{task_completion:.3933,agent_tts_fidelity:.9846,faithfulness:.33},experienceMetrics:{turn_taking:.5097,conciseness:.8345,conversation_progression:.3433},diagnosticMetrics:{key_entity_transcription:.615,response_speed:4.9451},successRates:{accuracy:{pass_threshold:.26,mean:.5693,pass_at_k:.52,pass_k:.1133},experience:{pass_threshold:.3733,mean:.5625,pass_at_k:.8,pass_k:.1304}}},{id:"gpt-4o-mini-transcribe-gpt-5-mini-gpt-4o-mini-tts",name:"gpt-4o-mini-transcribe + gpt-5-mini + gpt-4o-mini-tts",shortName:"gpt-5-mini (gpt-4o-mini-transcribe)",stt:"gpt-4o-mini-transcribe",llm:"gpt-5-mini",tts:"gpt-4o-mini-tts",type:"cascade",evaA:.2095,evaX:.1267,accuracyMetrics:{task_completion:.36,agent_tts_fidelity:.9707,faithfulness:.3},experienceMetrics:{turn_taking:.2703,conciseness:.7162,conversation_progression:.4533},diagnosticMetrics:{key_entity_transcription:.6801,response_speed:5.9619},successRates:{accuracy:{pass_threshold:.2095,mean:.5398,pass_at_k:.5,pass_k:.0694},experience:{pass_threshold:.1267,mean:.4799,pass_at_k:.32,pass_k:.0274}}},{id:"gpt-4o-mini-transcribe-sonnet-4-6-gpt-4o-mini-tts",name:"gpt-4o-mini-transcribe + sonnet-4.6 + gpt-4o-mini-tts",shortName:"sonnet-4.6 (gpt-4o-mini-transcribe)",stt:"gpt-4o-mini-transcribe",llm:"sonnet-4.6",tts:"gpt-4o-mini-tts",type:"cascade",evaA:.36,evaX:.02,accuracyMetrics:{task_completion:.54,agent_tts_fidelity:.9605,faithfulness:.6433},experienceMetrics:{turn_taking:.1043,conciseness:.8298,conversation_progression:.7767},diagnosticMetrics:{key_entity_transcription:.6167,response_speed:8.2609},successRates:{accuracy:{pass_threshold:.36,mean:.7146,pass_at_k:.62,pass_k:.1867},experience:{pass_threshold:.02,mean:.5703,pass_at_k:.06,pass_k:.0022}}},{id:"gpt-4o-mini-transcribe-gpt-oss-20b-gpt-4o-mini-tts",name:"gpt-4o-mini-transcribe + gpt-oss-20b + gpt-4o-mini-tts",shortName:"gpt-oss-20b (gpt-4o-mini-transcribe)",stt:"gpt-4o-mini-transcribe",llm:"gpt-oss-20b",tts:"gpt-4o-mini-tts",type:"cascade",evaA:.1267,evaX:.3,accuracyMetrics:{task_completion:.3,agent_tts_fidelity:.9516,faithfulness:.1767},experienceMetrics:{turn_taking:.5225,conciseness:.6871,conversation_progression:.3567},diagnosticMetrics:{key_entity_transcription:.617,response_speed:4.8793},successRates:{accuracy:{pass_threshold:.1267,mean:.4761,pass_at_k:.24,pass_k:.0541},experience:{pass_threshold:.3,mean:.5221,pass_at_k:.6,pass_k:.1356}}},{id:"gpt-4o-mini-transcribe-gpt-oss-120b-gpt-4o-mini-tts",name:"gpt-4o-mini-transcribe + gpt-oss-120b + gpt-4o-mini-tts",shortName:"gpt-oss-120b (gpt-4o-mini-transcribe)",stt:"gpt-4o-mini-transcribe",llm:"gpt-oss-120b",tts:"gpt-4o-mini-tts",type:"cascade",evaA:.1733,evaX:.54,accuracyMetrics:{task_completion:.2867,agent_tts_fidelity:.9668,faithfulness:.3433},experienceMetrics:{turn_taking:.6251,conciseness:.7655,conversation_progression:.5367},diagnosticMetrics:{key_entity_transcription:.5824,response_speed:4.2443},successRates:{accuracy:{pass_threshold:.1733,mean:.5323,pass_at_k:.34,pass_k:.077},experience:{pass_threshold:.54,mean:.6424,pass_at_k:.94,pass_k:.2467}}},{id:"parakeet-ctc-1-1b-gpt-oss-20b-magpie",name:"parakeet-ctc-1.1b + gpt-oss-20b + magpie",shortName:"gpt-oss-20b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"gpt-oss-20b",tts:"magpie",type:"cascade",evaA:.16,evaX:.34,accuracyMetrics:{task_completion:.4,agent_tts_fidelity:.935,faithfulness:.14},experienceMetrics:{turn_taking:.418,conciseness:.7205,conversation_progression:.4933},diagnosticMetrics:{key_entity_transcription:.8148,response_speed:5.9816},successRates:{accuracy:{pass_threshold:.16,mean:.4917,pass_at_k:.32,pass_k:.0711},experience:{pass_threshold:.34,mean:.5439,pass_at_k:.7,pass_k:.1444}}},{id:"parakeet-ctc-1-1b-gpt-oss-120b-magpie",name:"parakeet-ctc-1.1b + gpt-oss-120b + magpie",shortName:"gpt-oss-120b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"gpt-oss-120b",tts:"magpie",type:"cascade",evaA:.1678,evaX:.42,accuracyMetrics:{task_completion:.3667,agent_tts_fidelity:.9065,faithfulness:.36},experienceMetrics:{turn_taking:.4663,conciseness:.7522,conversation_progression:.63},diagnosticMetrics:{key_entity_transcription:.8415,response_speed:5.2856},successRates:{accuracy:{pass_threshold:.1678,mean:.544,pass_at_k:.3061,pass_k:.0718},experience:{pass_threshold:.42,mean:.6162,pass_at_k:.72,pass_k:.2022}}},{id:"parakeet-ctc-1-1b-qwen3-5-27b-kokoro",name:"parakeet-ctc-1.1b + qwen3.5-27b + kokoro",shortName:"qwen3.5-27b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"qwen3.5-27b",tts:"kokoro",type:"cascade",evaA:.4133,evaX:.06,accuracyMetrics:{task_completion:.54,agent_tts_fidelity:.9896,faithfulness:.47},experienceMetrics:{turn_taking:.2249,conciseness:.6823,conversation_progression:.6167},diagnosticMetrics:{key_entity_transcription:.8093,response_speed:7.4968},successRates:{accuracy:{pass_threshold:.4133,mean:.6665,pass_at_k:.7,pass_k:.2104},experience:{pass_threshold:.06,mean:.508,pass_at_k:.14,pass_k:.0156}}},{id:"parakeet-ctc-1-1b-gpt-oss-120b-kokoro",name:"parakeet-ctc-1.1b + gpt-oss-120b + kokoro",shortName:"gpt-oss-120b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"gpt-oss-120b",tts:"kokoro",type:"cascade",evaA:.2333,evaX:.24,accuracyMetrics:{task_completion:.36,agent_tts_fidelity:.9601,faithfulness:.3267},experienceMetrics:{turn_taking:.3569,conciseness:.7582,conversation_progression:.6167},diagnosticMetrics:{key_entity_transcription:.7951,response_speed:6.0521},successRates:{accuracy:{pass_threshold:.2333,mean:.5489,pass_at_k:.46,pass_k:.1059},experience:{pass_threshold:.24,mean:.5772,pass_at_k:.5,pass_k:.0844}}},{id:"parakeet-ctc-1-1b-gpt-oss-120b-chatterbox-turbo",name:"parakeet-ctc-1.1b + gpt-oss-120b + chatterbox-turbo",shortName:"gpt-oss-120b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"gpt-oss-120b",tts:"chatterbox-turbo",type:"cascade",evaA:.1533,evaX:.0267,accuracyMetrics:{task_completion:.36,agent_tts_fidelity:.8883,faithfulness:.32},experienceMetrics:{turn_taking:.0645,conciseness:.7841,conversation_progression:.49},diagnosticMetrics:{key_entity_transcription:.8053,response_speed:9.8321},successRates:{accuracy:{pass_threshold:.1533,mean:.5228,pass_at_k:.32,pass_k:.057},experience:{pass_threshold:.0267,mean:.4462,pass_at_k:.06,pass_k:.0074}}},{id:"parakeet-ctc-1-1b-qwen3-5-27b-chatterbox-turbo",name:"parakeet-ctc-1.1b + qwen3.5-27b + chatterbox-turbo",shortName:"qwen3.5-27b (parakeet-ctc-1.1b)",stt:"parakeet-ctc-1.1b",llm:"qwen3.5-27b",tts:"chatterbox-turbo",type:"cascade",evaA:.2533,evaX:0,accuracyMetrics:{task_completion:.5333,agent_tts_fidelity:.8513,faithfulness:.42},experienceMetrics:{turn_taking:.0225,conciseness:.6914,conversation_progression:.56},diagnosticMetrics:{key_entity_transcription:.8268,response_speed:12.0952},successRates:{accuracy:{pass_threshold:.2533,mean:.6015,pass_at_k:.56,pass_k:.0815},experience:{pass_threshold:0,mean:.4246,pass_at_k:0,pass_k:0}}},{id:"voxtral-mini-3b-gpt-oss-20b-magpie",name:"voxtral-mini-3b + gpt-oss-20b + magpie",shortName:"gpt-oss-20b (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"gpt-oss-20b",tts:"magpie",type:"cascade",evaA:.1133,evaX:.3867,accuracyMetrics:{task_completion:.3733,agent_tts_fidelity:.9349,faithfulness:.1367},experienceMetrics:{turn_taking:.5951,conciseness:.6917,conversation_progression:.3667},diagnosticMetrics:{key_entity_transcription:.6618,response_speed:4.4834},successRates:{accuracy:{pass_threshold:.1133,mean:.4816,pass_at_k:.24,pass_k:.0526},experience:{pass_threshold:.3867,mean:.5512,pass_at_k:.78,pass_k:.1541}}},{id:"voxtral-mini-3b-gpt-oss-120b-magpie",name:"voxtral-mini-3b + gpt-oss-120b + magpie",shortName:"gpt-oss-120b (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"gpt-oss-120b",tts:"magpie",type:"cascade",evaA:.1477,evaX:.5667,accuracyMetrics:{task_completion:.3467,agent_tts_fidelity:.9467,faithfulness:.2967},experienceMetrics:{turn_taking:.6659,conciseness:.7494,conversation_progression:.4767},diagnosticMetrics:{key_entity_transcription:.6906,response_speed:3.3998},successRates:{accuracy:{pass_threshold:.1477,mean:.5279,pass_at_k:.3265,pass_k:.062},experience:{pass_threshold:.5667,mean:.6307,pass_at_k:.92,pass_k:.3341}}},{id:"voxtral-mini-3b-gpt-oss-120b-chatterbox-turbo",name:"voxtral-mini-3b + gpt-oss-120b + chatterbox-turbo",shortName:"gpt-oss-120b (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"gpt-oss-120b",tts:"chatterbox-turbo",type:"cascade",evaA:.16,evaX:.0933,accuracyMetrics:{task_completion:.36,agent_tts_fidelity:.9049,faithfulness:.3467},experienceMetrics:{turn_taking:.204,conciseness:.7701,conversation_progression:.5233},diagnosticMetrics:{key_entity_transcription:.6376,response_speed:7.2744},successRates:{accuracy:{pass_threshold:.16,mean:.5372,pass_at_k:.28,pass_k:.08},experience:{pass_threshold:.0933,mean:.4991,pass_at_k:.28,pass_k:.0104}}},{id:"voxtral-mini-3b-qwen3-5-27b-chatterbox-turbo",name:"voxtral-mini-3b + qwen3.5-27b + chatterbox-turbo",shortName:"qwen3.5-27b (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"qwen3.5-27b",tts:"chatterbox-turbo",type:"cascade",evaA:.2067,evaX:0,accuracyMetrics:{task_completion:.54,agent_tts_fidelity:.796,faithfulness:.3967},experienceMetrics:{turn_taking:.0296,conciseness:.7165,conversation_progression:.5167},diagnosticMetrics:{key_entity_transcription:.7408,response_speed:14.4124},successRates:{accuracy:{pass_threshold:.2067,mean:.5775,pass_at_k:.52,pass_k:.0452},experience:{pass_threshold:0,mean:.4209,pass_at_k:0,pass_k:0}}},{id:"voxtral-mini-3b-qwen3-5-27b-kokoro",name:"voxtral-mini-3b + qwen3.5-27b + kokoro",shortName:"qwen3.5-27b (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"qwen3.5-27b",tts:"kokoro",type:"cascade",evaA:.4933,evaX:.2467,accuracyMetrics:{task_completion:.5933,agent_tts_fidelity:.9949,faithfulness:.5067},experienceMetrics:{turn_taking:.374,conciseness:.6838,conversation_progression:.5433},diagnosticMetrics:{key_entity_transcription:.7518,response_speed:5.8276},successRates:{accuracy:{pass_threshold:.4933,mean:.6983,pass_at_k:.74,pass_k:.3348},experience:{pass_threshold:.2467,mean:.5337,pass_at_k:.5,pass_k:.0985}}},{id:"voxtral-mini-3b-gpt-5-4-mini-voxtral-4b-tts",name:"voxtral-mini-3b + gpt-5.4-mini + voxtral-4b-tts",shortName:"gpt-5.4-mini (voxtral-mini-3b)",stt:"voxtral-mini-3b",llm:"gpt-5.4-mini",tts:"voxtral-4b-tts",type:"cascade",evaA:.2733,evaX:.0067,accuracyMetrics:{task_completion:.42,agent_tts_fidelity:.9831,faithfulness:.3733},experienceMetrics:{turn_taking:.0629,conciseness:.8469,conversation_progression:.38},diagnosticMetrics:{key_entity_transcription:.6682,response_speed:8.517},successRates:{accuracy:{pass_threshold:.2733,mean:.5921,pass_at_k:.46,pass_k:.1548},experience:{pass_threshold:.0067,mean:.4299,pass_at_k:.02,pass_k:7e-4}}},{id:"whisper-large-v3-gpt-oss-20b-chatterbox-turbo",name:"whisper-large-v3 + gpt-oss-20b + chatterbox-turbo",shortName:"gpt-oss-20b (whisper-large-v3)",stt:"whisper-large-v3",llm:"gpt-oss-20b",tts:"chatterbox-turbo",type:"cascade",evaA:.0733,evaX:.04,accuracyMetrics:{task_completion:.38,agent_tts_fidelity:.8849,faithfulness:.1533},experienceMetrics:{turn_taking:.1816,conciseness:.7343,conversation_progression:.44},diagnosticMetrics:{key_entity_transcription:.6696,response_speed:7.5545},successRates:{accuracy:{pass_threshold:.0733,mean:.4728,pass_at_k:.18,pass_k:.017},experience:{pass_threshold:.04,mean:.4519,pass_at_k:.12,pass_k:.0044}}},{id:"whisper-large-v3-gpt-oss-120b-kokoro",name:"whisper-large-v3 + gpt-oss-120b + kokoro",shortName:"gpt-oss-120b (whisper-large-v3)",stt:"whisper-large-v3",llm:"gpt-oss-120b",tts:"kokoro",type:"cascade",evaA:.1667,evaX:.52,accuracyMetrics:{task_completion:.28,agent_tts_fidelity:.9645,faithfulness:.2967},experienceMetrics:{turn_taking:.6148,conciseness:.7536,conversation_progression:.5433},diagnosticMetrics:{key_entity_transcription:.6573,response_speed:4.1026},successRates:{accuracy:{pass_threshold:.1667,mean:.5137,pass_at_k:.32,pass_k:.0763},experience:{pass_threshold:.52,mean:.6372,pass_at_k:.84,pass_k:.3244}}}],qte={stt:["#F59E0B","#38BDF8","#34D399","#F87171","#A78BFA","#FACC15"],llm:["#22D3EE","#FB923C","#818CF8","#4ADE80","#F59E0B","#F472B6","#94A3B8","#A3E635","#E879F9","#F87171"],tts:["#A3E635","#FB7185","#67E8F9","#C084FC","#FDBA74","#2DD4BF"]},$te={stt:["#B45309","#0369A1","#047857","#B91C1C","#6D28D9","#A16207"],llm:["#0E7490","#C2410C","#4338CA","#15803D","#B45309","#BE185D","#475569","#65A30D","#A21CAF","#B91C1C"],tts:["#65A30D","#E11D48","#0891B2","#7C3AED","#EA580C","#0D9488"]};function Fte(e,t){const n=t?qte:$te,r=[],s=[],o=[],u=new Set;for(const h of e)h.stt!=="-"&&!u.has("stt:"+h.stt)&&(r.push(h.stt),u.add("stt:"+h.stt)),u.has("llm:"+h.llm)||(s.push(h.llm),u.add("llm:"+h.llm)),h.tts!=="-"&&!u.has("tts:"+h.tts)&&(o.push(h.tts),u.add("tts:"+h.tts));const f=new Map,d=(h,m)=>{h.forEach((p,v)=>f.set(p,m[v%m.length]))};return d(r,n.stt),d(s,n.llm),d(o,n.tts),f}function Qj({system:e,componentColors:t}){if(e.type==="s2s"||e.type==="2-part"){if(e.tts!=="-")return b.jsxs("span",{className:"text-sm leading-relaxed inline-flex flex-wrap items-baseline",children:[b.jsx("span",{className:"whitespace-nowrap",style:{color:t.get(e.llm)},children:e.llm}),b.jsx("span",{className:"text-text-muted whitespace-nowrap",children:" + "}),b.jsx("span",{className:"whitespace-nowrap",style:{color:t.get(e.tts)},children:e.tts})]});const n=t.get(e.llm)||"#F1F5F9";return b.jsx("span",{style:{color:n},children:e.llm})}return b.jsxs("span",{className:"text-sm leading-relaxed inline-flex flex-wrap items-baseline",children:[b.jsx("span",{className:"whitespace-nowrap",style:{color:t.get(e.stt)},children:e.stt}),b.jsx("span",{className:"text-text-muted whitespace-nowrap",children:" + "}),b.jsx("span",{className:"whitespace-nowrap",style:{color:t.get(e.llm)},children:e.llm}),b.jsx("span",{className:"text-text-muted whitespace-nowrap",children:" + "}),b.jsx("span",{className:"whitespace-nowrap",style:{color:t.get(e.tts)},children:e.tts})]})}const Hte=[{key:null,label:"Default"},{key:"system_stt",label:"STT"},{key:"system_llm",label:"LLM"},{key:"system_tts",label:"TTS"}];function Vl({active:e,dir:t}){return e?t==="desc"?b.jsx(VR,{className:"w-3 h-3 inline ml-0.5"}):b.jsx($R,{className:"w-3 h-3 inline ml-0.5"}):null}function Jj({title:e,description:t,metricKeys:n,metricLabels:r,dataKey:s,baseColor:o,aggregateColumns:u,aggregateColor:f="#F59E0B",systems:d}){const h=jx(),m=Ote(),p=u??[],v=m!=="light",x=A.useMemo(()=>Fte(d,v),[d,v]),[w,_]=A.useState(null),[S,O]=A.useState("desc"),[M,j]=A.useState(!1),[N,k]=A.useState({top:0,left:0}),C=A.useRef(null),L=A.useRef(null),[I,Y]=A.useState("scores"),te=A.useCallback(()=>{if(C.current){const Z=C.current.getBoundingClientRect();k({top:Z.bottom+4,left:Z.left})}j(Z=>!Z)},[]);A.useEffect(()=>{function Z(oe){L.current&&!L.current.contains(oe.target)&&C.current&&!C.current.contains(oe.target)&&j(!1)}if(M)return document.addEventListener("mousedown",Z),()=>document.removeEventListener("mousedown",Z)},[M]);function ie(Z){w===Z?O(oe=>oe==="desc"?"asc":"desc"):(_(Z),O("desc"))}function K(Z){Z===null?_(null):w===Z?O(oe=>oe==="desc"?"asc":"desc"):(_(Z),O("asc")),j(!1)}const be=A.useMemo(()=>{if(!w)return[...d].sort((he,_e)=>{const J=he.type==="s2s"||he.type==="2-part",re=_e.type==="s2s"||_e.type==="2-part";return J&&!re?-1:!J&&re?1:he.stt.localeCompare(_e.stt)});const Z=he=>{if(w==="system_stt")return he.stt;if(w==="system_llm")return he.llm;if(w==="system_tts")return he.tts;const _e=p.find(J=>J.key===w);return _e?_e.getValue(he):he[s][w]??0},oe=(he,_e)=>{const J=Z(he),re=Z(_e);if(typeof J=="string"&&typeof re=="string")return S==="asc"?J.localeCompare(re):re.localeCompare(J);const Se=J,ee=re;return S==="desc"?ee-Se:Se-ee};return[...d].sort(oe)},[w,S,p,s]),pe={};for(const Z of n){const oe=d.map(he=>he[s][Z]??0);pe[Z]={min:Math.min(...oe),max:Math.max(...oe)}}const xe={};for(const Z of p){const oe=d.map(he=>Z.getValue(he));xe[Z.key]={min:Math.min(...oe),max:Math.max(...oe)}}const V=p.length+n.length,Q=35,ne=`${(100-Q)/V}%`,le=`${Q}%`,ue="text-center py-3 px-1 font-bold text-xs leading-snug cursor-pointer select-none hover:bg-bg-hover/50 transition-colors",P=I==="scores"?p:[],H=I==="metrics"?n:[],ae=I==="scores"?p.length:n.length,se=`${(100-Q)/ae}%`;return b.jsxs("div",{className:"bg-bg-secondary rounded-xl border border-border-default p-4 sm:p-6",children:[b.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-1",children:e}),b.jsx("p",{className:"text-sm text-text-secondary mb-4",children:t}),p.length>0&&n.length>0&&b.jsxs("div",{className:"flex gap-2 mb-4 md:hidden",children:[b.jsx("button",{onClick:()=>Y("scores"),className:`flex-1 px-3 py-2 rounded-lg text-xs font-medium transition-colors ${I==="scores"?"bg-purple/20 text-purple-light":"bg-bg-hover text-text-muted hover:text-text-secondary"}`,children:"Aggregate Scores"}),b.jsx("button",{onClick:()=>Y("metrics"),className:`flex-1 px-3 py-2 rounded-lg text-xs font-medium transition-colors ${I==="metrics"?"bg-purple/20 text-purple-light":"bg-bg-hover text-text-muted hover:text-text-secondary"}`,children:"Individual Metrics"})]}),b.jsx("div",{className:"hidden md:block overflow-x-auto",children:b.jsxs("table",{className:"w-full text-sm",style:{tableLayout:"fixed"},children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-border-default",children:[b.jsxs("th",{className:"text-left py-3 px-3 text-text-muted font-medium text-sm sticky left-0 bg-bg-secondary z-10",style:{width:le},children:[b.jsxs("button",{ref:C,onClick:te,className:"flex items-center gap-1 hover:text-text-primary transition-colors",children:["System",b.jsx(ai,{className:"w-3.5 h-3.5"}),w?.startsWith("system_")&&b.jsx(Vl,{active:!0,dir:S})]}),M&&G0.createPortal(b.jsx("div",{ref:L,className:"bg-bg-tertiary border border-border-default rounded-lg shadow-xl py-1 min-w-[100px]",style:{position:"fixed",top:N.top,left:N.left,zIndex:9999},children:Hte.map(Z=>b.jsx("button",{onClick:()=>K(Z.key),className:`block w-full text-left px-3 py-1.5 text-xs hover:bg-bg-hover transition-colors ${w===Z.key||Z.key===null&&w===null?"text-purple-light font-medium":"text-text-secondary"}`,children:Z.label},Z.key??"default"))}),document.body)]}),p.map((Z,oe)=>b.jsxs("th",{className:`${ue} ${oe===p.length-1?"border-r-2 border-border-default":""}`,style:{color:f,width:ne},onClick:()=>ie(Z.key),children:[Z.label,b.jsx(Vl,{active:w===Z.key,dir:S})]},Z.key)),n.map(Z=>b.jsxs("th",{className:`${ue} text-text-primary`,style:{width:ne},onClick:()=>ie(Z),children:[r[Z]||Z,b.jsx(Vl,{active:w===Z,dir:S})]},Z))]})}),b.jsx("tbody",{children:be.map(Z=>b.jsxs("tr",{className:"border-b border-border-default/30",children:[b.jsx("td",{className:"py-2.5 px-3 sticky left-0 bg-bg-secondary z-10 whitespace-nowrap",children:b.jsx(Qj,{system:Z,componentColors:x})}),p.map((oe,he)=>{const _e=oe.getValue(Z),{min:J,max:re}=xe[oe.key],{bg:Se,text:ee}=kf(_e,J,re,f,!1,h);return b.jsx("td",{className:`py-1.5 px-1 text-center ${he===p.length-1?"border-r-2 border-border-default":""}`,children:b.jsx("div",{className:"rounded-md px-0.5 py-1.5 font-mono text-xs font-medium",style:{backgroundColor:Se,color:ee},children:_e.toFixed(2)})},oe.key)}),n.map(oe=>{const he=Z[s][oe]??0,{min:_e,max:J}=pe[oe],re=Zj.has(oe),{bg:Se,text:ee}=kf(he,_e,J,o,re,h);return b.jsx("td",{className:"py-1.5 px-1 text-center",children:b.jsx("div",{className:"rounded-md px-0.5 py-1.5 font-mono text-xs font-medium",style:{backgroundColor:Se,color:ee},children:he.toFixed(2)})},oe)})]},Z.id))})]})}),b.jsx("div",{className:"md:hidden overflow-x-auto",children:b.jsxs("table",{className:"w-full text-sm",style:{tableLayout:"fixed"},children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-border-default",children:[b.jsx("th",{className:"text-left py-3 px-2 text-text-muted font-medium text-xs sticky left-0 bg-bg-secondary z-10",style:{width:le},children:"System"}),P.map(Z=>b.jsxs("th",{className:`${ue} text-[10px] sm:text-xs`,style:{color:f,width:se},onClick:()=>ie(Z.key),children:[Z.label.replace("EVA-A ",""),b.jsx(Vl,{active:w===Z.key,dir:S})]},Z.key)),H.map(Z=>b.jsxs("th",{className:`${ue} text-text-primary text-[10px] sm:text-xs`,style:{width:se},onClick:()=>ie(Z),children:[r[Z]||Z,b.jsx(Vl,{active:w===Z,dir:S})]},Z))]})}),b.jsx("tbody",{children:be.map(Z=>b.jsxs("tr",{className:"border-b border-border-default/30",children:[b.jsx("td",{className:"py-2 px-2 sticky left-0 bg-bg-secondary z-10 text-xs",children:b.jsx(Qj,{system:Z,componentColors:x})}),P.map(oe=>{const he=oe.getValue(Z),{min:_e,max:J}=xe[oe.key],{bg:re,text:Se}=kf(he,_e,J,f,!1,h);return b.jsx("td",{className:"py-1 px-0.5 text-center",children:b.jsx("div",{className:"rounded-md px-0.5 py-1 font-mono text-[10px] sm:text-xs font-medium",style:{backgroundColor:re,color:Se},children:he.toFixed(2)})},oe.key)}),H.map(oe=>{const he=Z[s][oe]??0,{min:_e,max:J}=pe[oe],re=Zj.has(oe),{bg:Se,text:ee}=kf(he,_e,J,o,re,h);return b.jsx("td",{className:"py-1 px-0.5 text-center",children:b.jsx("div",{className:"rounded-md px-0.5 py-1 font-mono text-[10px] sm:text-xs font-medium",style:{backgroundColor:Se,color:ee},children:he.toFixed(2)})},oe)})]},Z.id))})]})})]})}const Kte=[{title:"Transcription failures cascade into low task completion",description:"Transcription failures around last names and confirmation codes cascade into low task completion as the agent is unable to pull up the user's booking and proceed with the request."},{title:"Turn taking remains a key challenge",description:"Effective turn taking remains a key challenge for cascade systems — most turns are late (>4 seconds)."},{title:"Speech synthesis struggles with alphanumeric codes",description:"Speech synthesis systems generally produce the intended speech but struggle the most with alphanumeric codes, often dropping or switching characters and letters."},{title:"LLMs produce verbose, non-voice-appropriate content",description:"LLMs struggle to produce concise, voice-appropriate content, particularly when trying to list flight options for the user."},{title:"Transcription failures reduce conversation efficiency",description:"Transcription failures also lead to inefficient conversation progression, as the agent cannot move the conversation forward when it's stuck trying to retrieve the user's reservation."},{title:"Audio-native systems show promise",description:"Both audio-native systems sit on the Pareto frontier, while the single speech-to-speech system does not — we aim to benchmark more audio-native and s2s systems to see if this holds across the architectural classes."}],Xte=[{title:"Accuracy–experience trade-off",description:"The Pareto frontier reveals a clear accuracy-experience tradeoff across systems, systems that push harder on accuracy are doing so at the cost of conversational experience, and vice versa."},{title:"Low Pass Rates",description:"Performance remains far from saturated — no system clears 0.5 pass@1 on accuracy, and only a few systems exceed 0.50 EVA-X pass@1, suggesting ample opportunities for improvement."},{title:"Sparse Frontier",description:"Only a few systems sit on the Pareto frontier, meaning most systems are strictly dominated. This concentrates the real decision space: only a small subset of system choices actually matter for navigating the accuracy–experience tradeoff."}],Yte=[{key:"eva_a_pass",label:"EVA-A pass@1",getValue:e=>e.successRates.accuracy.pass_threshold},{key:"eva_a_mean",label:"EVA-A Mean",getValue:e=>e.successRates.accuracy.mean}],Gte=[{key:"eva_x_pass",label:"EVA-X pass@1",getValue:e=>e.successRates.experience.pass_threshold},{key:"eva_x_mean",label:"EVA-X Mean",getValue:e=>e.successRates.experience.mean}];function Wte(){const e=jx(),t=Vte;return b.jsx(wo,{id:"leaderboard",title:"Early Results",subtitle:"Early results on the airline domain (50 scenarios, 3 trials each).",children:b.jsxs("div",{className:"space-y-8",children:[b.jsx(Lte,{systems:t}),b.jsxs("div",{className:"rounded-xl border border-purple/20 bg-purple/5 p-6",children:[b.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[b.jsx("div",{className:"w-9 h-9 rounded-lg bg-purple/10 flex items-center justify-center",children:b.jsx(US,{className:"w-5 h-5 text-purple-light"})}),b.jsx("h3",{className:"text-lg font-bold text-text-primary",children:"Pareto Analysis"})]}),b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:Xte.map((n,r)=>b.jsxs("div",{className:"rounded-lg bg-bg-secondary border border-border-default p-4",children:[b.jsx("div",{className:"text-sm font-semibold text-text-primary mb-2",children:n.title}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:n.description})]},r))})]}),b.jsx(Jj,{title:"Accuracy Metrics (EVA-A)",description:"Per-metric scores for accuracy. All values normalized to 0-1 (higher is better).",metricKeys:zte,metricLabels:Bte,dataKey:"accuracyMetrics",baseColor:e.accent.purple,aggregateColumns:Yte,aggregateColor:"#F59E0B",systems:t}),b.jsx(Jj,{title:"Experience Metrics (EVA-X)",description:"Per-metric scores for conversational experience. All values normalized to 0-1 (higher is better).",metricKeys:Ite,metricLabels:Ute,dataKey:"experienceMetrics",baseColor:e.accent.blue,aggregateColumns:Gte,aggregateColor:"#F59E0B",systems:t}),b.jsxs("div",{className:"rounded-xl border border-purple/20 bg-purple/5 p-6",children:[b.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[b.jsx("div",{className:"w-9 h-9 rounded-lg bg-purple/10 flex items-center justify-center",children:b.jsx(US,{className:"w-5 h-5 text-purple-light"})}),b.jsx("h3",{className:"text-lg font-bold text-text-primary",children:"Key Insights"})]}),b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Kte.map((n,r)=>b.jsxs("div",{className:"rounded-lg bg-bg-secondary border border-border-default p-4",children:[b.jsx("div",{className:"text-sm font-semibold text-text-primary mb-2",children:n.title}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:n.description})]},r))})]})]})})}const Zte={high_level_user_goal:"You want to move your LAX to SFO flight today from the late afternoon to an earlier direct flight that leaves before 2:00 PM, as long as the same-day change fee stays under $80.",decision_tree:{must_have_criteria:["New departure time is today (2026-06-18) and departs LAX before 2:00 PM Pacific.","Same-day change fee is under $80 total (acceptable: $0 to $79.99).","It is a direct flight from LAX to SFO (no connections and no airport changes)."],negotiation_behavior:["If the agent asks for verification details, provide your confirmation code and last name exactly as given in information_required, then wait for the agent to read back your reservation and confirm it is yours; if they read back a different name or itinerary, correct them and re-provide the details.","When the agent offers earlier-flight options, evaluate each option against ALL must-have criteria: (a) date is 2026-06-18, (b) LAX departure time is before 2:00 PM PT, (c) direct LAX→SFO, (d) same-day change fee is under $80.","If both an 11:00 AM and a 1:00 PM direct option meet all must-haves, choose the earliest departure (11:00 AM).","If only one option meets all must-haves, accept that option.",'Before the agent finalizes anything, if the agent has not clearly stated the exact same-day change fee amount, ask: "What will the change fee be in total?" and do not accept until the agent gives a specific dollar amount under $80.','If the agent proposes any option that departs at or after 2:00 PM, has a connection, changes airports, or has a fee of $80 or more, reject it and restate the must-haves once: "It needs to be today, direct LAX to SFO, leaving before 2 PM, and the fee has to be under $80—can you check again?"',"If after one additional search/attempt the agent still cannot offer any option that meets all must-haves, move to failure_condition."],resolution_condition:"The agent has confirmed the rebooking is completed (not just planned) to a direct LAX→SFO flight departing on 2026-06-18 before 2:00 PM PT, has stated the same-day change fee is under $80, AND has provided a concrete post-change booking reference (e.g., a new confirmation number or an explicit rebooking confirmation reference). End the call.",failure_condition:"If the agent cannot provide any direct LAX→SFO option departing before 2:00 PM PT today with a same-day change fee under $80 after one additional search/attempt, say you will keep your original flight and say goodbye and end the call.",escalation_behavior:"Do not ask to speak to a supervisor or live agent. If the agent offers to transfer you to a live agent, you must decline. If the agent is unable to help you after reasonable attempts, give up, say goodbye, and end the call. Never speak to a live agent. If the agent attempts to transfer you anyways, hang up using end_call.",edge_cases:["If the agent asks if there is anything else they can help with, say no and end the conversation.","Never invent new goals, requests, or problems beyond what is defined here.","Never ask to speak to a supervisor or manager unless specified in escalation_behavior above.","If the agent suggests flying from or to a different airport than originally booked, decline and insist on LAX to SFO only.","If the agent suggests standby instead of a confirmed earlier flight, decline standby and ask for a confirmed seat on an earlier direct flight before 2:00 PM."]},information_required:{confirmation_number:"6VORJU",first_name:"Kenji",last_name:"Thompson",travel_date:"2026-06-18",origin_airport:"LAX",destination_airport:"SFO",seat_preference:{first_choice:"window",second_choice:"aisle",third_choice:"middle"},original_travel_details:[{origin:"LAX",destination:"SFO",flight_date:"2026-06-18",departure_time:"17:30",status:"confirmed"}]}},Qte="You're direct and to the point—you don't have time for lengthy explanations or unnecessary back-and-forth. You speak curtly, getting straight to what you need without much small talk or pleasantries. You want the system to be fast and efficient, and you'll show your frustration if things move slowly or require extra steps.",Jte=JSON.parse(`[{"role":"assistant","content":"Hello! How can I help you today?","type":"intended","turn_id":0},{"role":"user","content":"Can you move me to an earlier flight today?","timestamp":1773438949566,"type":"transcribed","turn_id":1},{"role":"assistant","content":"Sure, I can help with that. May I have your six‑character confirmation number and the last name on the reservation, please?","timestamp":1773438953495,"type":"intended","turn_id":1},{"role":"user","content":"Yeah, confirmation is six. Victor Oscar Romeo Juliet Uniform. And the last name is Tom. Thompson.","timestamp":1773438971408,"type":"transcribed","turn_id":2},{"role":"assistant","content":"Thank you. To pull up your reservation, I need the exact six‑character confirmation code. I heard “V O R J U”. Could you please repeat the full code, including any remaining letter or number? Also, just to confirm, the last name is Thompson, correct?","timestamp":1773438978057,"type":"intended","turn_id":2},{"role":"user","content":"Yes. Last name is Thompson. The code is 6-8-1-1. Victor. Oscar Romeo Juliet Uniform.","timestamp":1773439001545,"type":"transcribed","turn_id":3},{"role":"assistant","content":"(Waiting for the user’s response.)","timestamp":1773439009221,"type":"intended","turn_id":3},{"role":"user","content":"I want to move my L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A-L-A- p.m. you you Thank you. Thank you. Same day change fee is under $80.","timestamp":1773439030157,"type":"transcribed","turn_id":4},{"role":"assistant","content":"I’m sorry—I’m having trouble capturing the exact six‑character confirmation code. Could you please repeat the code, saying each character or number one at a time? For example, you might say “six, eight, one, one, V, O.” Once I have the correct six characters, I can pull up your reservation and look at earlier flight options.","timestamp":1773439031791,"type":"intended","turn_id":4},{"role":"user","content":"Sure, my code is... Six. Victor. Oscar, Romeo, Juliet uniform.","timestamp":1773439063962,"type":"transcribed","turn_id":5},{"tool_name":"get_reservation","parameters":{"confirmation_number":"6VORJU","last_name":"Thompson"},"timestamp":1773439064577,"type":"tool_call","turn_id":5},{"tool_name":"get_reservation","tool_response":{"status":"success","reservation":{"confirmation_number":"6VORJU","status":"confirmed","passengers":[{"passenger_id":"PAX001","first_name":"Kenji","last_name":"Thompson","ticket_number":"1801234567890","email":"kenji.thompson@example.com","phone":"+1-310-555-0147","elite_status":null,"meal_preference":"none","seat_preference":"no_preference"}],"bookings":[{"journey_id":"FL_SK530_20260618","fare_class":"main_cabin","fare_paid":289,"status":"confirmed","segments":[{"flight_number":"SK530","date":"2026-06-18","fare_paid":289,"seat":null,"bags_checked":0,"meal_request":null}]}],"booking_date":"2026-05-20T13:22:00-07:00","fare_type":"non_refundable","ancillaries":{"seat_selection_fee":0,"bags_fee":0}}},"timestamp":1773439064577,"type":"tool_response","turn_id":5},{"tool_name":"get_flight_status","parameters":{"flight_number":"SK530","flight_date":"2026-06-18"},"timestamp":1773439065128,"type":"tool_call","turn_id":5},{"tool_name":"get_flight_status","tool_response":{"status":"success","journey":{"journey_id":"FL_SK530_20260618","date":"2026-06-18","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK530","origin":"LAX","destination":"SFO","scheduled_departure":"17:30","origin_utc_offset":-8,"scheduled_arrival":"18:55","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"54B","available_seats":{"basic_economy":12,"main_cabin":22,"premium_economy":6,"business":2,"first":0},"fares":{"basic_economy":179,"main_cabin":289,"premium_economy":569,"business":999,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"status":"scheduled","bookable":true,"fares":{"basic_economy":179,"main_cabin":289,"premium_economy":569,"business":999,"first":null}}},"timestamp":1773439065128,"type":"tool_response","turn_id":5},{"tool_name":"search_rebooking_options","parameters":{"origin":"LAX","destination":"SFO","date":"2026-06-18","passenger_count":1,"fare_class":"any"},"timestamp":1773439065959,"type":"tool_call","turn_id":5},{"tool_name":"search_rebooking_options","tool_response":{"status":"success","options":[{"journey_id":"FL_SK090_SK410_20260618","origin":"LAX","destination":"SFO","num_stops":1,"total_duration_minutes":170,"segments":[{"segment_number":1,"flight_number":"SK090","origin":"LAX","destination":"SJC","scheduled_departure":"09:20","origin_utc_offset":-8,"scheduled_arrival":"10:30","destination_utc_offset":-8,"duration_minutes":70,"aircraft_type":"E175","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"33A","available_seats":{"basic_economy":8,"main_cabin":14,"premium_economy":2,"business":0,"first":0},"fares":{"basic_economy":139,"main_cabin":229,"premium_economy":489,"business":null,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":[],"first":[]}},{"segment_number":2,"flight_number":"SK410","origin":"SJC","destination":"SFO","scheduled_departure":"11:35","origin_utc_offset":-8,"scheduled_arrival":"12:10","destination_utc_offset":-8,"duration_minutes":35,"aircraft_type":"E175","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"12B","available_seats":{"basic_economy":9,"main_cabin":12,"premium_economy":2,"business":0,"first":0},"fares":{"basic_economy":89,"main_cabin":129,"premium_economy":239,"business":null,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":[],"first":[]}}],"departure_time":"09:20","arrival_time":"12:10","available_seats":{"basic_economy":8,"main_cabin":12,"premium_economy":2,"business":0,"first":0},"fare":228},{"journey_id":"FL_SK130_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK130","origin":"LAX","destination":"SFO","scheduled_departure":"13:00","origin_utc_offset":-8,"scheduled_arrival":"14:25","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"on_time","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"45C","available_seats":{"basic_economy":6,"main_cabin":8,"premium_economy":3,"business":2,"first":0},"fares":{"basic_economy":189,"main_cabin":289,"premium_economy":559,"business":1029,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"13:00","arrival_time":"14:25","available_seats":{"basic_economy":6,"main_cabin":9,"premium_economy":3,"business":2,"first":0},"fare":189},{"journey_id":"FL_SK215_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK215","origin":"LAX","destination":"SFO","scheduled_departure":"14:40","origin_utc_offset":-8,"scheduled_arrival":"16:05","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"737-800","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"47D","available_seats":{"basic_economy":10,"main_cabin":18,"premium_economy":4,"business":2,"first":0},"fares":{"basic_economy":169,"main_cabin":259,"premium_economy":529,"business":979,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"14:40","arrival_time":"16:05","available_seats":{"basic_economy":10,"main_cabin":18,"premium_economy":4,"business":2,"first":0},"fare":169},{"journey_id":"FL_SK530_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK530","origin":"LAX","destination":"SFO","scheduled_departure":"17:30","origin_utc_offset":-8,"scheduled_arrival":"18:55","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"54B","available_seats":{"basic_economy":12,"main_cabin":23,"premium_economy":6,"business":2,"first":0},"fares":{"basic_economy":179,"main_cabin":289,"premium_economy":569,"business":999,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"17:30","arrival_time":"18:55","available_seats":{"basic_economy":12,"main_cabin":22,"premium_economy":6,"business":2,"first":0},"fare":179}],"count":4,"message":"4 flight(s) found"},"timestamp":1773439065959,"type":"tool_response","turn_id":5},{"role":"assistant","content":"I’ve found a few earlier flights from Los Angeles to San Francisco today.\\n\\n1. **One‑stop option** – depart at nine twenty a.m., connect in San Jose and arrive at twelve ten p.m. (fare $228 in main cabin). \\n2. **Direct flight** – depart at one o’clock p.m., arrive at two twenty‑five p.m. (fare $289, same as your current ticket). \\n3. **Direct flight** – depart at two forty p.m., arrive at four oh‑five p.m. (fare $259, a little cheaper).\\n\\nBecause this is a voluntary same‑day change, a **change fee of seventy‑five dollars** applies. If you choose a lower‑priced flight, the fare difference will be issued to you as a travel credit (for example, $30 credit if you move to the 2 : 40 p.m. flight, or $61 credit for the early morning connection).\\n\\nDo any of these options work for you? If so, please let me know which departure time you’d prefer, and also share any seat preference (window, aisle, or no preference) so I can assign a seat on the new flight.","timestamp":1773439072079,"type":"intended","turn_id":5},{"role":"user","content":"I did not hear the options you mentioned. Can you repeat the earlier LAX to SFO flights? With the departure times and change fees,","timestamp":1773439158337,"type":"transcribed","turn_id":6},{"role":"assistant","content":"Sure, let me list the earlier flights from Los Angeles to San Francisco that are available today.\\n\\n**Option 1 – one‑stop connection** \\n- Departure from LAX at nine twenty a.m. \\n- Connect in San Jose and arrive at San Francisco at twelve ten p.m. \\n- Main‑cabin fare is two‑hundred twenty‑eight dollars. \\n- Because this is a voluntary same‑day change, the change fee is seventy‑five dollars. Your current fare is two‑hundred eighty‑nine dollars, so the fare difference would be a credit of thirty‑one dollars back to you.\\n\\n**Option 2 – direct flight** \\n- Departure from LAX at one o’clock p.m. \\n- Arrive at San Francisco at two twenty‑five p.m. \\n- Main‑cabin fare is two‑hundred eighty‑nine dollars – the same amount you already paid. \\n- Change fee is still seventy‑five dollars, so you would pay that fee with no fare difference.\\n\\n**Option 3 – direct flight** \\n- Departure from LAX at two forty p.m. \\n- Arrive at San Francisco at four oh‑five p.m. \\n- Main‑cabin fare is two‑hundred fifty‑nine dollars. \\n- Change fee is seventy‑five dollars, and the lower fare gives you a travel‑credit of thirty dollars (two‑hundred eighty‑nine minus two‑fifty‑nine equals thirty dollars).\\n\\nAll of these flights are still open for booking today. Which departure time would you like to switch to? Also, do you have a seat preference—window, aisle, or no preference?","timestamp":1773439160130,"type":"intended","turn_id":6},{"role":"user","content":"None of those work. It needs to be today. Direct LAX. to SS. F-O. Leaving before 2 p.m. and the fee has to be under $80. Can you check again?","timestamp":1773439255746,"type":"transcribed","turn_id":7},{"tool_name":"search_rebooking_options","parameters":{"origin":"LAX","destination":"SFO","date":"2026-06-18","passenger_count":1,"fare_class":"any"},"timestamp":1773439268671,"type":"tool_call","turn_id":7},{"tool_name":"search_rebooking_options","tool_response":{"status":"success","options":[{"journey_id":"FL_SK090_SK410_20260618","origin":"LAX","destination":"SFO","num_stops":1,"total_duration_minutes":170,"segments":[{"segment_number":1,"flight_number":"SK090","origin":"LAX","destination":"SJC","scheduled_departure":"09:20","origin_utc_offset":-8,"scheduled_arrival":"10:30","destination_utc_offset":-8,"duration_minutes":70,"aircraft_type":"E175","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"33A","available_seats":{"basic_economy":8,"main_cabin":14,"premium_economy":2,"business":0,"first":0},"fares":{"basic_economy":139,"main_cabin":229,"premium_economy":489,"business":null,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":[],"first":[]}},{"segment_number":2,"flight_number":"SK410","origin":"SJC","destination":"SFO","scheduled_departure":"11:35","origin_utc_offset":-8,"scheduled_arrival":"12:10","destination_utc_offset":-8,"duration_minutes":35,"aircraft_type":"E175","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"12B","available_seats":{"basic_economy":9,"main_cabin":12,"premium_economy":2,"business":0,"first":0},"fares":{"basic_economy":89,"main_cabin":129,"premium_economy":239,"business":null,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":[],"first":[]}}],"departure_time":"09:20","arrival_time":"12:10","available_seats":{"basic_economy":8,"main_cabin":12,"premium_economy":2,"business":0,"first":0},"fare":228},{"journey_id":"FL_SK130_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK130","origin":"LAX","destination":"SFO","scheduled_departure":"13:00","origin_utc_offset":-8,"scheduled_arrival":"14:25","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"on_time","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"45C","available_seats":{"basic_economy":6,"main_cabin":8,"premium_economy":3,"business":2,"first":0},"fares":{"basic_economy":189,"main_cabin":289,"premium_economy":559,"business":1029,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"13:00","arrival_time":"14:25","available_seats":{"basic_economy":6,"main_cabin":9,"premium_economy":3,"business":2,"first":0},"fare":189},{"journey_id":"FL_SK215_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK215","origin":"LAX","destination":"SFO","scheduled_departure":"14:40","origin_utc_offset":-8,"scheduled_arrival":"16:05","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"737-800","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"47D","available_seats":{"basic_economy":10,"main_cabin":18,"premium_economy":4,"business":2,"first":0},"fares":{"basic_economy":169,"main_cabin":259,"premium_economy":529,"business":979,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"14:40","arrival_time":"16:05","available_seats":{"basic_economy":10,"main_cabin":18,"premium_economy":4,"business":2,"first":0},"fare":169},{"journey_id":"FL_SK530_20260618","origin":"LAX","destination":"SFO","num_stops":0,"total_duration_minutes":85,"segments":[{"segment_number":1,"flight_number":"SK530","origin":"LAX","destination":"SFO","scheduled_departure":"17:30","origin_utc_offset":-8,"scheduled_arrival":"18:55","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"scheduled","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"54B","available_seats":{"basic_economy":12,"main_cabin":23,"premium_economy":6,"business":2,"first":0},"fares":{"basic_economy":179,"main_cabin":289,"premium_economy":569,"business":999,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure_time":"17:30","arrival_time":"18:55","available_seats":{"basic_economy":12,"main_cabin":22,"premium_economy":6,"business":2,"first":0},"fare":179}],"count":4,"message":"4 flight(s) found"},"timestamp":1773439268671,"type":"tool_response","turn_id":7},{"role":"assistant","content":"I do have a direct flight that meets those criteria:\\n\\n- **Flight SK 130** – departs Los Angeles at **one o’clock p.m.**, arrives San Francisco at **two twenty‑five p.m.** \\n- It’s a nonstop service, just like your current booking. \\n- Because this is a same‑day voluntary change, the change fee is **seventy‑five dollars**, which is under your $80 limit. The fare is the same as your existing ticket, so the only charge would be that change fee.\\n\\nWould you like to switch to flight SK 130? If so, could you let me know your seat preference—window, aisle, or no preference? Once I have that, I’ll go ahead and rebook you.","timestamp":1773439270267,"type":"intended","turn_id":7},{"role":"user","content":"That one works. I'll take the flight that leaves at 1:00 PM. Seek Preferences window.","timestamp":1773439326852,"type":"transcribed","turn_id":8},{"tool_name":"rebook_flight","parameters":{"confirmation_number":"6VORJU","journey_id":"FL_SK530_20260618","new_journey_id":"FL_SK130_20260618","rebooking_type":"voluntary","waive_change_fee":false,"new_fare_class":null},"timestamp":1773439328182,"type":"tool_call","turn_id":8},{"tool_name":"rebook_flight","tool_response":{"status":"success","confirmation_number":"6VORJU","new_journey":{"journey_id":"FL_SK130_20260618","num_stops":0,"segments":[{"segment_number":1,"flight_number":"SK130","origin":"LAX","destination":"SFO","scheduled_departure":"13:00","origin_utc_offset":-8,"scheduled_arrival":"14:25","destination_utc_offset":-8,"duration_minutes":85,"aircraft_type":"A320","status":"on_time","delay_minutes":null,"delay_reason":null,"cancellation_reason":null,"gate":"45C","available_seats":{"basic_economy":6,"main_cabin":8,"premium_economy":3,"business":2,"first":0},"fares":{"basic_economy":189,"main_cabin":289,"premium_economy":559,"business":1029,"first":null},"available_seat_types":{"basic_economy":["window","aisle","middle"],"main_cabin":["window","aisle","middle"],"premium_economy":["window","aisle","middle"],"business":["window","aisle","middle"],"first":[]}}],"departure":"13:00","arrival":"14:25","origin":"LAX","destination":"SFO"},"cost_summary":{"original_fare_class":"main_cabin","new_fare_class":"main_cabin","cabin_changed":false,"change_fee":75,"fare_difference":0,"credit_due":0,"total_collected":75,"fee_waived":false},"message":"Successfully rebooked to flight FL_SK130_20260618"},"timestamp":1773439328182,"type":"tool_response","turn_id":8},{"tool_name":"assign_seat","parameters":{"confirmation_number":"6VORJU","passenger_id":"PAX001","journey_id":"FL_SK130_20260618","seat_preference":"window"},"timestamp":1773439329163,"type":"tool_call","turn_id":8},{"tool_name":"assign_seat","tool_response":{"status":"success","confirmation_number":"6VORJU","passenger_id":"PAX001","journey_id":"FL_SK130_20260618","flight_number":"SK130","seat_assigned":"21A","fare_class":"main_cabin","preference":"window","message":"Seat 21A (window) successfully assigned"},"timestamp":1773439329163,"type":"tool_response","turn_id":8},{"role":"assistant","content":"Your reservation has been updated:\\n\\n- New flight SK 130 departs Los Angeles at **one o’clock p.m.** and arrives in San Francisco at **two twenty‑five p.m.** today. \\n- A **change fee of seventy‑five dollars** has been applied; the fare itself remains the same. \\n- Your seat is a **window seat, 21 A**, on the new flight.\\n\\nEverything else from your original booking—name, ticket number, and any existing preferences—has been transferred.\\n\\nIf you’d like to add checked bags or make any other changes, just let me know. Otherwise, you’re all set. Thank you for flying SkyWay Airlines, and have a pleasant trip!","timestamp":1773439330430,"type":"intended","turn_id":8},{"role":"user","content":"No, that is all. Thanks. Goodbye.","timestamp":1773439384679,"type":"transcribed","turn_id":9},{"role":"assistant","content":"You’re very welcome. Have a great flight, and thank you for choosing SkyWay Airlines. Goodbye. [speaker likely cut itself off]","timestamp":1773439385281,"type":"intended","turn_id":9}]`),ene=JSON.parse(`[{"name":"task_completion","displayName":"Task Completion","category":"eva-a","type":"deterministic","score":1,"normalizedScore":1,"details":{"match":true,"message":"Final database state matches expected state exactly"}},{"name":"agent_speech_fidelity","displayName":"Agent Speech Fidelity","category":"eva-a","type":"lalm_judge","score":1,"normalizedScore":1,"details":{"aggregation":"mean","num_turns":10,"num_evaluated":9,"per_turn_ratings":{"0":1,"1":1,"2":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1},"per_turn_explanations":{"0":"The audio faithfully reproduces the intended text 'Hello! How can I help you today?' without any errors.","1":"The audio faithfully reproduces the intended text 'Sure, I can help with that. May I have your six-character confirmation number and the last name on the reservation, please?' without any errors.","2":"The audio faithfully reproduces the intended text, including the spelled-out confirmation code 'V O R J U' and the last name 'Thompson'.","4":"The audio faithfully reproduces the intended text, including the example spelled-out code 'six, eight, one, one, V, O.' without any errors.","5":"The audio faithfully reproduces the intended text, including all flight times, dollar amounts, and city names.","6":"The audio faithfully reproduces the intended text, including all flight options, times, dollar amounts, and city names.","7":"The audio faithfully reproduces the intended text, including the flight number 'SK 130', times, and dollar amounts.","8":"The audio faithfully reproduces the intended text, including the flight number 'SK 130', times, dollar amounts, and seat number '21 A'.","9":"The audio faithfully reproduces the intended text up to the point where the speaker cuts itself off, as indicated by the tag."}}},{"name":"faithfulness","displayName":"Faithfulness","category":"eva-a","type":"llm_judge","score":1,"normalizedScore":0,"details":{"rating":1,"explanation":{"dimensions":{"fabricating_tool_parameters":{"evidence":"In Turn 8, the rebook_flight call uses \`rebooking_type: 'voluntary'\` instead of \`'same_day'\`. The assistant had been describing this as a 'same-day voluntary change' throughout the conversation and applying the same-day confirmed change fee of $75. However, looking at the tool specification, 'same_day' is a valid rebooking_type option, and since this is indeed a same-day change, using 'voluntary' instead of 'same_day' could be considered a minor categorization issue. That said, the fee outcome ($75) is the same for a main_cabin voluntary change and a same-day confirmed change, so this doesn't materially affect the result. The \`new_fare_class: None\` parameter is passed explicitly as null, which is reasonable since the fare class isn't changing.","flagged":false,"rating":3},"misrepresenting_tool_result":{"evidence":"In Turn 5, the assistant presents Option 1 (the connection) fare as $228 in main cabin. However, the tool result shows the connection's individual segment fares for main_cabin are $229 (SK090) + $129 (SK410), while the journey-level 'fare' field shows $228. The assistant used the journey-level fare of $228. In Turn 5, the assistant states for Option 3 (SK215): 'fare $259, a little cheaper' - the tool shows the main_cabin fare for SK215 is $259, which is correct. However, looking more carefully at the fare difference calculations in Turn 6: for Option 1, the assistant says 'credit of thirty-one dollars' ($289-$228=$61, not $31) - wait, let me recheck. The fare difference is $289-$228=$61, but the assistant says $31. Actually in Turn 5 the assistant says '$61 credit for the early morning connection' which is correct. In Turn 6, the assistant says 'credit of thirty-one dollars' for Option 1. $289-$228=$61, not $31. This is a misrepresentation of a calculated value from tool results. For Option 3 in Turn 6, the assistant says 'credit of thirty dollars' ($289-$259=$30), which is correct.","flagged":true,"rating":1},"violating_policies":{"evidence":"The assistant used rebooking_type 'voluntary' with the standard $75 change fee. For a same-day change, the same-day confirmed change fee is also $75, so the financial outcome is identical. The assistant did explain fees before acting in early turns, and obtained explicit user confirmation in Turn 8 before rebooking. The assistant asked for seat preference before assigning seats. The assistant provided a summary at the end. The assistant did not mention the standby option (same-day standby is free for all fare classes), which could be considered a failure to offer alternatives, but this is minor since the user specifically asked for a confirmed change. One potential issue: the assistant told the user about the $75 change fee and fare implications across Turns 5-7, and the user confirmed in Turn 8, so the 'explain before acting' requirement was met. No significant policy violations detected.","flagged":false,"rating":3},"failing_to_disambiguate":{"evidence":"In Turns 2-4, the user provided the confirmation code in a confusing manner across multiple turns ('six Victor Oscar Romeo Juliet Uniform', then '6-8-1-1 Victor Oscar Romeo Juliet Uniform'). In Turn 3, the user says '6-8-1-1. Victor. Oscar Romeo Juliet Uniform' which could be interpreted as '6811VORJU' (9 characters) or some other combination. The assistant appropriately asked for clarification. In Turn 5, the user said 'Six. Victor. Oscar, Romeo, Juliet uniform' which the assistant interpreted as '6VORJU' (6 characters) and it worked. However, the earlier Turn 3 included '6-8-1-1' which was never reconciled - the assistant could have tried combinations including those digits. Since the final attempt succeeded, this is not a material issue. The user's Turn 4 was garbled (repeated 'L-A' many times and mentioned 'Same day change fee is under $80') which the assistant appropriately handled by re-asking.","flagged":false,"rating":3},"hallucination":{"evidence":"In Turn 5, the assistant mentions issuing a 'travel credit' for fare differences on downgrade scenarios. Per policy, downgrade to lower fare results in travel credit, so this is grounded. In Turn 8's summary, the assistant says 'Everything else from your original booking—name, ticket number, and any existing preferences—has been transferred.' The original booking had no seat assigned, no bags, and no meal request, so saying preferences were 'transferred' slightly embellishes, but this is a conversational courtesy rather than a factual claim. No significant hallucinations detected.","flagged":false,"rating":3}}},"num_turns":31}},{"name":"conciseness","displayName":"Conciseness","category":"eva-x","type":"llm_judge","score":2.2,"normalizedScore":0.6,"details":{"aggregation":"mean","num_turns":10,"num_evaluated":10,"mean_rating":2.2,"per_turn_ratings":{"0":3,"1":3,"2":2,"3":1,"4":3,"5":1,"6":1,"7":3,"8":2,"9":3},"per_turn_explanations":{"0":"Brief, friendly opening question with no extra detail; ideal for voice.","1":"Directly asks for the two required identifiers (confirmation code and last name) in one concise prompt; easy to follow.","2":"Appropriately requests clarification after mishearing the code and confirms the last name. Slightly wordier than necessary (\\"including any remaining letter or number\\") but still very manageable in voice and justified by the identification problem.","3":"The assistant provides no spoken guidance and effectively stalls with “waiting,” which is not helpful in a voice flow and forces the user to carry the conversation without direction.","4":"Clear request to repeat the confirmation code one character at a time, with a helpful example, and explains why (to pull up the reservation). This is appropriate given prior confusion and stays focused.","5":"Presents three alternatives with multiple times, fares, a fee, and multiple example credit calculations in one turn, then adds an additional request for seat preference. For voice, this is a lot to retain and includes extra arithmetic/explanatory detail that could be deferred until the user picks an option.","6":"The user asked for repetition, so listing options again is warranted, but the assistant over-structures it with many bullet points, repeats the same $75 fee three times, and includes detailed fare-difference math and credit explanations for each option. This increases cognitive load for spoken delivery.","7":"Concise: identifies the single flight meeting the constraints, states key times, confirms nonstop, and gives the fee under $80. Ends with a simple confirmation question plus seat preference request—reasonable for the next step.","8":"Clear recap of the successful change with the essential details (new flight/time, change fee, seat assignment). The extra line about transferring everything else and offering bags/other changes adds slight unnecessary length, but it’s still easy to digest and appropriate as a booking-confirmation wrap-up.","9":"Short, polite closing suitable for voice; no overload."},"per_turn_failure_modes":{"0":[],"1":[],"2":["verbosity_or_filler"],"3":["contextually_disproportionate_detail"],"4":[],"5":["excess_information_density","over_enumeration_or_list_exhaustion","contextually_disproportionate_detail"],"6":["over_enumeration_or_list_exhaustion","excess_information_density","verbosity_or_filler"],"7":[],"8":["verbosity_or_filler"],"9":[]}}},{"name":"conversation_progression","displayName":"Conversation Progression","category":"eva-x","type":"llm_judge","score":2,"normalizedScore":0.5,"details":{"rating":2,"explanation":{"dimensions":{"unnecessary_tool_calls":{"evidence":"At Turn 7 the assistant calls \`search_rebooking_options\` again with the same parameters as in Turn 5, despite no new constraints that would change the search results and the prior call already returned the full set of options.","flagged":true,"rating":2},"information_loss":{"evidence":"The assistant generally retains key facts once established (e.g., uses confirmation number 6VORJU and last name Thompson successfully in Turn 5, and then rebooks correctly in Turn 8). Earlier requests to repeat the confirmation code are justified by clearly garbled/partial user input (Turns 2–4).","flagged":false,"rating":3},"redundant_statements":{"evidence":"The assistant repeats the flight options in Turn 6, but this is explicitly requested by the user (“Can you repeat the earlier LAX to SFO flights?”). The final confirmation after rebooking (Turn 8) is a standard helpful recap rather than unnecessary repetition.","flagged":false,"rating":3},"question_quality":{"evidence":"The assistant’s questions are targeted and action-enabling (confirmation code/last name for lookup; then asks which option and seat preference). When the user adds constraints (direct, before 2 p.m., fee under $80), the assistant returns the matching option and asks for confirmation/seat preference.","flagged":false,"rating":3}},"flags_count":""},"num_turns":31}},{"name":"turn_taking","displayName":"Turn Taking","category":"eva-x","type":"llm_judge","score":4.5,"normalizedScore":0.25,"details":{"aggregation":"abs_mean","num_turns":9,"num_evaluated":9,"per_turn_judge_timing_ratings":{"1":"Late","2":"Late","3":"Early / Interrupting","4":"On-Time","5":"Late","6":"On-Time","7":"Late","8":"Late"},"per_turn_judge_timing_explanations":{"1":"The user’s request is complete (“…earlier flight today?”) with no overlap tags. The agent starts 5.507s later, which exceeds the 4s threshold and would feel like an awkward pause.","2":"User finishes providing the confirmation code and last name; the utterance is complete and there are no interruption indicators. The agent begins 4.940s after user end, which is >4s and thus late.","3":"The user’s statement ends at 67.744s, but the agent starts at 67.917s (0.172s later), which is under the 200ms cutoff. Even without explicit interruption tags, this is effectively too early/over-eager turn-taking.","4":"User’s request about changing the LAX→SFO flight is syntactically complete, and no interruption tags indicate overlap. The agent responds after a 2.286s gap, which is within the on-time range.","5":"User finishes spelling the code and stops; no overlap tags are present. The agent waits 9.466s to respond, which is well beyond 4s and clearly late.","6":"The user asks to repeat the options and finishes the question; no interruption tags suggest they were still talking. The agent begins 2.759s later, a normal conversational gap.","7":"User completes the request to check again (direct flight before 2pm, fee under $80) with no overlap markers. The agent starts 4.407s later, slightly over the 4s threshold, so it’s late.","8":"User accepts the 1pm flight and states a window preference, which is complete. The agent waits 5.500s before confirming, exceeding 4s and thus late."},"num_not_applicable":1}},{"name":"transcription_accuracy_key_entities","displayName":"Transcription Accuracy (Key Entities)","category":"diagnostic","type":"llm_judge","score":0.762,"normalizedScore":0.762,"details":{"aggregation":"mean","num_turns":9,"num_evaluated":9,"per_turn_ratings":{"1":-1,"2":1,"3":0.3333333333333333,"4":0.25,"5":1,"6":1,"7":0.75,"8":1,"9":-1},"per_turn_explanations":{"1":"No key entities (names, codes, dates/times, amounts, etc.) present to evaluate.","2":"All 2 key entities transcribed correctly (confirmation code and last name).","3":"1 out of 3 entities correct. Last name correct; confirmation code mis-transcribed (extra digits).","4":"1 out of 4 entities correct. $80 captured, but LAX/SFO and '2 PM' were not correctly transcribed.","5":"Confirmation code transcribed correctly.","6":"Both airport codes (LAX and SFO) transcribed correctly.","7":"3 out of 4 entities correct. SFO was mis-transcribed; LAX, 2 PM, and $80 were correct.","8":"Both entities (1 PM and window seat preference) transcribed correctly.","9":"No key entities present to evaluate."},"per_turn_entity_details":{"1":{"turn_id":1,"entities":[],"summary":"No key entities (names, codes, dates/times, amounts, etc.) present to evaluate."},"2":{"turn_id":2,"entities":[{"type":"confirmation_code","value":"six Victor Oscar Romeo Juliet Uniform","transcribed_value":"six Victor Oscar Romeo Juliet Uniform","analysis":"Confirmation code phrase matches (minor punctuation/pauses ignored).","correct":true,"skipped":false},{"type":"name","value":"Thompson","transcribed_value":"Tom. Thompson","analysis":"Last name 'Thompson' is present exactly; extra 'Tom' does not change that the entity was captured.","correct":true,"skipped":false}],"summary":"All 2 key entities transcribed correctly (confirmation code and last name)."},"3":{"turn_id":3,"entities":[{"type":"name","value":"Thompson","transcribed_value":"Thompson","analysis":"Matches exactly.","correct":true,"skipped":false},{"type":"confirmation_code","value":"six Victor Oscar Romeo Juliet Uniform","transcribed_value":"6-8-1-1 Victor Oscar Romeo Juliet Uniform","analysis":"Code corrupted: expected starts with 'six' then letters; transcription inserted extra digits '8-1-1' not in expected.","correct":false,"skipped":false},{"type":"confirmation_code","value":"six","transcribed_value":"6-8-1-1","analysis":"The repeated final 'six' was transcribed as '6-8-1-1', which does not match.","correct":false,"skipped":false}],"summary":"1 out of 3 entities correct. Last name correct; confirmation code mis-transcribed (extra digits)."},"4":{"turn_id":4,"entities":[{"type":"place","value":"L A X","transcribed_value":"L-A (repeated many times)","analysis":"Expected airport code 'LAX' was not captured; transcription devolves into repeated 'L-A' and does not clearly contain 'LAX'.","correct":false,"skipped":false},{"type":"place","value":"S F O","transcribed_value":"missing","analysis":"Expected 'SFO' not present in transcription.","correct":false,"skipped":false},{"type":"time","value":"two p m","transcribed_value":"p.m.","analysis":"Time value missing the 'two/2' component; only 'p.m.' appears.","correct":false,"skipped":false},{"type":"amount","value":"eighty dollars","transcribed_value":"$80","analysis":"Matches semantically ($80).","correct":true,"skipped":false}],"summary":"1 out of 4 entities correct. $80 captured, but LAX/SFO and '2 PM' were not correctly transcribed."},"5":{"turn_id":5,"entities":[{"type":"confirmation_code","value":"six Victor Oscar Romeo Juliet Uniform","transcribed_value":"Six Victor Oscar Romeo Juliet uniform","analysis":"Matches exactly aside from capitalization/punctuation.","correct":true,"skipped":false}],"summary":"Confirmation code transcribed correctly."},"6":{"turn_id":6,"entities":[{"type":"place","value":"L A X","transcribed_value":"LAX","analysis":"Matches (formatting difference only).","correct":true,"skipped":false},{"type":"place","value":"S F O","transcribed_value":"SFO","analysis":"Matches (formatting difference only).","correct":true,"skipped":false}],"summary":"Both airport codes (LAX and SFO) transcribed correctly."},"7":{"turn_id":7,"entities":[{"type":"place","value":"L A X","transcribed_value":"LAX","analysis":"Matches (formatting difference only).","correct":true,"skipped":false},{"type":"place","value":"S F O","transcribed_value":"SS. F-O","analysis":"Does not match exactly; 'SS F-O' is not 'SFO'.","correct":false,"skipped":false},{"type":"time","value":"two p m","transcribed_value":"2 p.m.","analysis":"Matches semantically.","correct":true,"skipped":false},{"type":"amount","value":"eighty dollars","transcribed_value":"$80","analysis":"Matches semantically ($80).","correct":true,"skipped":false}],"summary":"3 out of 4 entities correct. SFO was mis-transcribed; LAX, 2 PM, and $80 were correct."},"8":{"turn_id":8,"entities":[{"type":"time","value":"one p m","transcribed_value":"1:00 PM","analysis":"Matches semantically.","correct":true,"skipped":false},{"type":"seat_preference","value":"window","transcribed_value":"window","analysis":"Seat preference 'window' present (minor wording error 'Seek Preferences' ignored).","correct":true,"skipped":false}],"summary":"Both entities (1 PM and window seat preference) transcribed correctly."},"9":{"turn_id":9,"entities":[],"summary":"No key entities present to evaluate."}},"per_turn_normalized":{"1":-1,"2":1,"3":0.3333333333333333,"4":0.25,"5":1,"6":1,"7":0.75,"8":1,"9":-1},"num_not_applicable":2}}]`),kh={userGoal:Zte,userPersona:Qte,conversationTrace:Jte,metrics:ene},Ki=kh.userGoal,Xi={highLevelGoal:Ki.high_level_user_goal,decisionTree:{mustHaveCriteria:Ki.decision_tree.must_have_criteria,negotiationBehavior:Ki.decision_tree.negotiation_behavior,resolutionCondition:Ki.decision_tree.resolution_condition,failureCondition:Ki.decision_tree.failure_condition,escalationBehavior:Ki.decision_tree.escalation_behavior,edgeCases:Ki.decision_tree.edge_cases},informationRequired:Ki.information_required},tne=kh.userPersona;function nne(e){const t=[];for(let n=0;n({name:e.name,displayName:e.displayName,category:e.category,type:e.type,score:e.score,normalizedScore:e.normalizedScore,details:e.details})),rne=Mx.filter(e=>e.category==="eva-a"),ine=Mx.filter(e=>e.category==="eva-x"),ane=Mx.filter(e=>e.category==="diagnostic");function eM(e){const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function sne({src:e}){const t=A.useRef(null),n=A.useRef(null),[r,s]=A.useState(!1),[o,u]=A.useState(0),[f,d]=A.useState(0),[h,m]=A.useState(!1);A.useEffect(()=>{const _=t.current;if(!_)return;const S=()=>u(_.currentTime),O=()=>d(_.duration),M=()=>s(!1);return _.addEventListener("timeupdate",S),_.addEventListener("loadedmetadata",O),_.addEventListener("ended",M),()=>{_.removeEventListener("timeupdate",S),_.removeEventListener("loadedmetadata",O),_.removeEventListener("ended",M)}},[]);const p=A.useCallback(()=>{const _=t.current;_&&(r?_.pause():_.play(),s(!r))},[r]),v=A.useCallback(()=>{const _=t.current;_&&(_.muted=!h,m(!h))},[h]),x=A.useCallback(_=>{const S=t.current,O=n.current;if(!S||!O)return;const M=O.getBoundingClientRect(),j=Math.max(0,Math.min(1,(_.clientX-M.left)/M.width));S.currentTime=j*f},[f]),w=f>0?o/f*100:0;return b.jsxs("div",{className:"rounded-xl bg-bg-secondary border border-border-default p-4",children:[b.jsx("audio",{ref:t,preload:"metadata",children:b.jsx("source",{src:e,type:"audio/wav"})}),b.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[b.jsx(Gy,{className:"w-5 h-5 text-purple-light"}),b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:"Conversation Audio"}),b.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-bg-tertiary text-text-muted border border-border-default",children:"Recording"})]}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("button",{onClick:p,className:"w-10 h-10 rounded-full bg-purple/20 hover:bg-purple/30 flex items-center justify-center transition-colors flex-shrink-0",children:r?b.jsx(f6,{className:"w-5 h-5 text-purple-light"}):b.jsx(p6,{className:"w-5 h-5 text-purple-light ml-0.5"})}),b.jsx("span",{className:"text-xs font-mono text-text-muted w-10 text-right flex-shrink-0",children:eM(o)}),b.jsx("div",{ref:n,onClick:x,className:"flex-1 h-2 bg-bg-tertiary rounded-full cursor-pointer group relative",children:b.jsx("div",{className:"h-full bg-purple rounded-full transition-[width] duration-100 relative",style:{width:`${w}%`},children:b.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-3.5 h-3.5 rounded-full bg-purple-light border-2 border-bg-secondary opacity-0 group-hover:opacity-100 transition-opacity"})})}),b.jsx("span",{className:"text-xs font-mono text-text-muted w-10 flex-shrink-0",children:f>0?eM(f):"--:--"}),b.jsx("button",{onClick:v,className:"w-8 h-8 rounded-lg hover:bg-bg-tertiary flex items-center justify-center transition-colors flex-shrink-0",children:h?b.jsx(M6,{className:"w-4 h-4 text-text-muted"}):b.jsx(Gy,{className:"w-4 h-4 text-text-muted"})})]})]})}function one(e){const t=new Map;for(let n=0;nb.jsxs("div",{className:"flex gap-2 text-xs",children:[b.jsxs("span",{className:"text-text-muted font-mono",children:[u,":"]}),b.jsx("span",{className:"text-text-secondary font-mono",children:JSON.stringify(f)})]},u))})]}),t?.toolResponse&&b.jsxs("div",{className:"border-t border-border-default/50",children:[b.jsxs("button",{onClick:()=>o(!s),className:"w-full flex items-center gap-2 px-3 py-2 text-[10px] text-text-muted font-semibold uppercase tracking-wider hover:bg-bg-hover/30 transition-colors",children:[s?b.jsx(ai,{className:"w-3 h-3"}):b.jsx(sM,{className:"w-3 h-3"}),"Response"]}),s&&b.jsx("div",{className:"px-3 pb-3",children:b.jsx("pre",{className:"text-xs text-text-secondary font-mono leading-relaxed max-h-48 overflow-y-auto overflow-x-auto bg-bg-tertiary rounded-lg p-3",children:JSON.stringify(t.toolResponse,null,2)})})]})]})})}function ql({title:e,icon:t,children:n,defaultOpen:r=!1}){const[s,o]=A.useState(r);return b.jsxs("div",{children:[b.jsxs("button",{onClick:()=>o(!s),className:"w-full flex items-center gap-2 rounded-lg border border-border-default bg-bg-primary px-3 py-2 hover:bg-bg-hover/30 transition-colors",children:[b.jsx(t,{className:"w-3.5 h-3.5 text-text-muted"}),b.jsx("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider flex-1 text-left",children:e}),b.jsx(ai,{className:`w-3.5 h-3.5 text-text-muted transition-transform ${s?"rotate-180":""}`})]}),s&&b.jsx("div",{className:"mt-2 bg-bg-primary rounded-lg p-3",children:n})]})}function cne(){const[e,t]=A.useState(!0),n=Object.entries(Xi.informationRequired).map(([r,s])=>{const o=r.replace(/_/g," ").replace(/\b\w/g,f=>f.toUpperCase()),u=typeof s=="object"?JSON.stringify(s):String(s);return[o,u]});return b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsxs("button",{onClick:()=>t(!e),className:"w-full flex items-center gap-3 mb-0 hover:opacity-80 transition-opacity",children:[b.jsx("div",{className:"w-10 h-10 rounded-full bg-blue/20 flex items-center justify-center flex-shrink-0",children:b.jsx(Yy,{className:"w-5 h-5 text-blue-light"})}),b.jsxs("div",{className:"flex-1 text-left",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary",children:"User Goal"}),b.jsx("div",{className:"text-[10px] text-text-muted uppercase tracking-wider",children:"Scenario Briefing"})]}),b.jsx(ai,{className:`w-4 h-4 text-text-muted transition-transform ${e?"rotate-180":""}`})]}),e&&b.jsxs("div",{className:"mt-4",children:[b.jsx("div",{className:"border-l-2 border-blue/40 pl-4 mb-5",children:b.jsx("p",{className:"text-sm text-text-primary leading-relaxed",children:Xi.highLevelGoal})}),b.jsxs("div",{className:"mb-4 bg-bg-tertiary rounded-lg p-3",children:[b.jsx("div",{className:"text-[10px] font-semibold text-text-muted uppercase tracking-wider mb-1.5",children:"Persona"}),b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:tne})]}),b.jsxs("div",{className:"mb-4",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2.5",children:"Must-Have Criteria"}),b.jsx("div",{className:"space-y-2",children:Xi.decisionTree.mustHaveCriteria.map((r,s)=>b.jsxs("div",{className:"flex gap-2 items-start",children:[b.jsx(Xy,{className:"w-3.5 h-3.5 text-blue-light mt-0.5 flex-shrink-0"}),b.jsx("span",{className:"text-xs text-text-secondary leading-relaxed",children:r})]},s))})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx(ql,{title:"Negotiation Behavior",icon:lM,children:b.jsx("div",{className:"space-y-2.5",children:Xi.decisionTree.negotiationBehavior.map((r,s)=>b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:r},s))})}),b.jsx(ql,{title:"Resolution & Failure",icon:uM,children:b.jsxs("div",{className:"space-y-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] font-semibold text-emerald-400 uppercase tracking-wider mb-1",children:"Resolution"}),b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:Xi.decisionTree.resolutionCondition})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] font-semibold text-red-400 uppercase tracking-wider mb-1",children:"Failure"}),b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:Xi.decisionTree.failureCondition})]})]})}),b.jsx(ql,{title:"Escalation",icon:w6,children:b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:Xi.decisionTree.escalationBehavior})}),b.jsx(ql,{title:"Edge Cases",icon:Jl,children:b.jsx("div",{className:"space-y-2",children:Xi.decisionTree.edgeCases.map((r,s)=>b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:r},s))})}),b.jsx(ql,{title:"Scenario Details",icon:Yy,children:b.jsx("div",{className:"space-y-2",children:n.map(([r,s])=>b.jsxs("div",{className:"flex justify-between gap-3",children:[b.jsx("span",{className:"text-[11px] text-text-muted flex-shrink-0",children:r}),b.jsx("span",{className:"text-[11px] text-text-primary font-medium text-right break-all",children:s})]},r))})})]})]})]})}const Ky=[{name:"get_reservation",description:"Retrieve flight reservation using confirmation number and passenger last name",toolType:"read"},{name:"get_flight_status",description:"Get flight info including status, delays, cancellations, and gate information",toolType:"read"},{name:"get_disruption_info",description:"Get detailed disruption info for IRROPS handling and rebooking entitlements",toolType:"read"},{name:"search_rebooking_options",description:"Search for available flights to rebook a passenger",toolType:"read"},{name:"rebook_flight",description:"Rebook passenger(s) to a new flight (voluntary, IRROPS, or missed flight)",toolType:"write"},{name:"add_to_standby",description:"Add passenger to standby list for a flight",toolType:"write"},{name:"assign_seat",description:"Assign a seat to a passenger based on preference",toolType:"write"},{name:"add_baggage_allowance",description:"Add checked baggage allowance to a flight segment",toolType:"write"},{name:"add_meal_request",description:"Add or update special meal request for a passenger",toolType:"write"},{name:"issue_travel_credit",description:"Issue a travel credit or future flight voucher",toolType:"write"},{name:"issue_hotel_voucher",description:"Issue a hotel voucher for delays or disruptions",toolType:"write"},{name:"issue_meal_voucher",description:"Issue a meal voucher for delays or disruptions",toolType:"write"},{name:"cancel_reservation",description:"Cancel a flight booking",toolType:"write"},{name:"process_refund",description:"Process a refund for a cancelled or eligible reservation",toolType:"write"},{name:"transfer_to_agent",description:"Transfer the call to a live human agent",toolType:"system"}];function fne(e){const t=new Map;for(const n of e)if(n.type==="tool_response"&&n.toolName){const r=t.get(n.toolName)??{calls:0,success:0,error:0};r.calls++,n.toolStatus==="success"?r.success++:r.error++,t.set(n.toolName,r)}return t}function dne({tool:e,isUsed:t,typeColors:n}){const[r,s]=A.useState(!1);return b.jsxs("div",{className:`rounded-lg border ${t?"border-amber/30 bg-amber/5":"border-border-default bg-bg-primary opacity-60"}`,children:[b.jsxs("button",{onClick:()=>s(!r),className:"w-full flex items-center gap-2 px-3 py-2 hover:opacity-80 transition-opacity",children:[b.jsx(p0,{className:`w-3.5 h-3.5 flex-shrink-0 ${t?"text-amber":"text-text-muted"}`}),b.jsx("span",{className:`text-xs font-semibold font-mono flex-1 text-left ${t?"text-text-primary":"text-text-muted"}`,children:e.name}),b.jsx("span",{className:`text-[9px] px-1.5 py-0.5 rounded-full font-medium border ${n[e.toolType]}`,children:e.toolType})]}),r&&b.jsx("div",{className:"px-3 pb-2.5 pt-0",children:b.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:e.description})})]})}function hne(){const e=fne(Zs),t=Ky.filter(o=>e.has(o.name)).length,n={read:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20",write:"bg-purple/10 text-purple-light border-purple/20",system:"bg-amber/10 text-amber border-amber/20"},[r,s]=A.useState(!0);return b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary p-5",children:[b.jsxs("button",{onClick:()=>s(!r),className:"w-full flex items-center gap-3 mb-0 hover:opacity-80 transition-opacity",children:[b.jsx("div",{className:"w-10 h-10 rounded-full bg-amber/20 flex items-center justify-center flex-shrink-0",children:b.jsx(p0,{className:"w-5 h-5 text-amber"})}),b.jsxs("div",{className:"flex-1 text-left",children:[b.jsx("div",{className:"text-base font-semibold text-text-primary",children:"Agent Tools"}),b.jsxs("div",{className:"text-[10px] text-text-muted uppercase tracking-wider",children:[t," of ",Ky.length," used in this conversation"]})]}),b.jsx(ai,{className:`w-4 h-4 text-text-muted transition-transform ${r?"rotate-180":""}`})]}),r&&b.jsx("div",{className:"mt-4 space-y-1.5",children:Ky.map(o=>{const u=e.has(o.name);return b.jsx(dne,{tool:o,isUsed:u,typeColors:n},o.name)})})]})}function mne({score:e,size:t="md"}){const n=e>=.8?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":e>=.5?"bg-amber/10 text-amber border-amber/20":"bg-red-500/10 text-red-400 border-red-500/20",r=t==="sm"?"text-[10px] px-1.5 py-0.5":"text-xs px-2 py-0.5";return b.jsxs("span",{className:`${r} rounded-full font-semibold border ${n}`,children:[(e*100).toFixed(0),"%"]})}function pne({type:e}){const t={deterministic:"Deterministic",llm_judge:"LLM Judge",lalm_judge:"Audio Judge"},n={deterministic:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20",llm_judge:"bg-purple/10 text-purple-light border-purple/20",lalm_judge:"bg-amber/10 text-amber border-amber/20"};return b.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded-full font-medium border ${n[e]??"bg-bg-tertiary text-text-muted border-border-default"}`,children:t[e]??e})}function gne({metric:e}){const[t,n]=A.useState(!1),r=e.details,s=r.per_turn_ratings,o=r.per_turn_explanations,u=r.per_turn_judge_timing_ratings,f=r.per_turn_judge_timing_explanations,d=r.explanation,h=r.per_turn_entity_details,p=(typeof d=="object"&&d!==null?d:void 0)?.dimensions;return b.jsxs("div",{className:"rounded-xl border border-border-default bg-bg-secondary overflow-hidden",children:[b.jsxs("button",{onClick:()=>n(!t),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-bg-hover/30 transition-colors",children:[b.jsxs("div",{className:"flex-1 flex items-center gap-3",children:[b.jsx("span",{className:"text-base font-semibold text-text-primary",children:e.displayName}),b.jsx(pne,{type:e.type})]}),b.jsx(mne,{score:e.normalizedScore}),b.jsx(ai,{className:`w-4 h-4 text-text-muted transition-transform ${t?"rotate-180":""}`})]}),t&&b.jsxs("div",{className:"px-5 pb-5 border-t border-border-default/50 pt-4 space-y-5",children:[e.name==="task_completion"&&b.jsxs("div",{className:"flex items-center gap-2",children:[r.match?b.jsx(Xy,{className:"w-5 h-5 text-emerald-400"}):b.jsx(Jl,{className:"w-5 h-5 text-red-400"}),b.jsx("span",{className:"text-base text-text-secondary",children:r.message})]}),p&&b.jsx("div",{className:"space-y-3",children:Object.entries(p).map(([v,x])=>{const w=e.name==="faithfulness";let _,S;return w?x.rating===3?(_="OK",S="bg-emerald-500/10 text-emerald-400 border-emerald-500/20"):x.rating===2?(_="Minor/Ambiguous Issue",S="bg-amber/10 text-amber border-amber/20"):(_="Clear Error",S="bg-red-500/10 text-red-400 border-red-500/20"):e.name==="conversation_progression"?x.rating===3?(_="OK",S="bg-emerald-500/10 text-emerald-400 border-emerald-500/20"):x.rating===2?(_="Minor Issue",S="bg-amber/10 text-amber border-amber/20"):(_="Clear Issue",S="bg-red-500/10 text-red-400 border-red-500/20"):(_=x.flagged?"Flagged":"OK",S=x.flagged?"bg-amber/10 text-amber border-amber/20":"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"),b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsx("span",{className:"text-sm font-semibold text-text-primary",children:v.replace(/_/g," ").replace(/\b\w/g,O=>O.toUpperCase())}),b.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium border ${S}`,children:_}),b.jsxs("span",{className:"text-xs text-text-muted ml-auto",children:[x.rating,"/3"]})]}),b.jsx("p",{className:"text-base text-text-secondary leading-relaxed",children:x.evidence})]},v)})}),s&&!p&&!h&&b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Per-Turn Breakdown"}),b.jsx("div",{className:"space-y-3 max-h-[32rem] overflow-y-auto",children:Object.entries(s).map(([v,x])=>{const w=o?.[v];return x===-1?null:b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsxs("span",{className:"text-xs font-semibold text-text-muted",children:["Turn ",v]}),b.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium border ${x>=3||x===1&&e.name==="agent_speech_fidelity"?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":x>=2?"bg-amber/10 text-amber border-amber/20":"bg-red-500/10 text-red-400 border-red-500/20"}`,children:x})]}),w&&b.jsx("p",{className:"text-base text-text-secondary leading-relaxed",children:w})]},v)})})]}),u&&b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Per-Turn Timing"}),b.jsx("div",{className:"space-y-3 max-h-[32rem] overflow-y-auto",children:Object.entries(u).map(([v,x])=>{const w=f?.[v],_=x==="On-Time"?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":x==="Late"?"bg-amber/10 text-amber border-amber/20":"bg-red-500/10 text-red-400 border-red-500/20";return b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsxs("span",{className:"text-xs font-semibold text-text-muted",children:["Turn ",v]}),b.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium border ${_}`,children:x})]}),w&&b.jsx("p",{className:"text-base text-text-secondary leading-relaxed",children:w})]},v)})})]}),h&&b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Per-Turn Entity Accuracy"}),b.jsx("div",{className:"space-y-3 max-h-[32rem] overflow-y-auto",children:Object.entries(h).map(([v,x])=>!x.entities||x.entities.length===0?null:b.jsxs("div",{className:"rounded-lg bg-bg-primary p-4",children:[b.jsxs("div",{className:"text-xs font-semibold text-text-muted mb-2",children:["Turn ",v]}),b.jsx("div",{className:"space-y-2",children:x.entities.map((w,_)=>b.jsxs("div",{className:"flex items-start gap-2 text-base",children:[w.correct?b.jsx(Xy,{className:"w-4 h-4 text-emerald-400 mt-0.5 flex-shrink-0"}):b.jsx(Jl,{className:"w-4 h-4 text-red-400 mt-0.5 flex-shrink-0"}),b.jsxs("div",{children:[b.jsxs("span",{className:"text-text-muted",children:[w.type,":"]})," ",b.jsx("span",{className:"text-text-secondary",children:w.value}),!w.correct&&b.jsxs("span",{className:"text-red-400",children:[" → ",w.transcribed_value]})]})]},_))}),b.jsx("p",{className:"text-xs text-text-muted mt-2",children:x.summary})]},v))})]}),typeof d=="string"&&b.jsx("p",{className:"text-base text-text-secondary leading-relaxed",children:d})]})]})}function yne(){const e=[{label:"Accuracy (EVA-A)",icon:uM,metrics:rne,color:"text-emerald-400"},{label:"Experience (EVA-X)",icon:BR,metrics:ine,color:"text-purple-light"},{label:"Relevant Diagnostic Metric",icon:b6,metrics:ane,color:"text-cyan-400"}];return b.jsx(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.2},className:"mt-12",children:b.jsx("div",{className:"space-y-8",children:e.map(t=>b.jsxs("div",{children:[b.jsx("div",{className:"flex items-center gap-3 mb-4 pb-3 border-b border-border-default",children:b.jsx("span",{className:"text-lg font-bold text-text-primary",children:t.label})}),b.jsx("div",{className:"space-y-2",children:t.metrics.map(n=>b.jsx(gne,{metric:n},n.name))})]},t.label))})})}function vne(){const e=one(Zs),t=[];let n=0;for(;n{const t=tM[e.category]??nM;return e.items.map((n,r)=>b.jsxs("div",{className:`rounded-xl border ${t.border} ${t.bg} p-5 flex flex-col`,children:[b.jsx("div",{className:"flex items-center gap-2 mb-2",children:b.jsx("span",{className:`text-[10px] font-semibold uppercase tracking-wider px-2 py-0.5 rounded-full ${t.badge} ${t.text} border ${t.badgeBorder}`,children:e.category})}),b.jsx("div",{className:"text-sm font-semibold text-text-primary mb-1.5",children:n.title}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed flex-1",children:n.description})]},`${e.category}-${r}`))})})]}),b.jsxs(Tt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1},children:[b.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple/10 flex items-center justify-center",children:b.jsx(y6,{className:"w-5 h-5 text-purple"})}),b.jsx("h3",{className:"text-xl font-bold text-text-primary",children:"Roadmap"})]}),b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:xne.flatMap(e=>{const t=tM[e.category]??nM;return e.items.map((n,r)=>b.jsxs("div",{className:`rounded-xl border ${t.border} ${t.bg} p-5 flex flex-col`,children:[b.jsx("div",{className:"flex items-center gap-2 mb-2",children:b.jsx("span",{className:`text-[10px] font-semibold uppercase tracking-wider px-2 py-0.5 rounded-full ${t.badge} ${t.text} border ${t.badgeBorder}`,children:e.category})}),b.jsx("div",{className:"text-sm font-semibold text-text-primary mb-1.5",children:n.title}),b.jsx("p",{className:"text-sm text-text-secondary leading-relaxed flex-1",children:n.description})]},`${e.category}-${r}`))})})]})]})})}const _ne=new Set(["intro","architecture","metrics","early-results","demo","limitations","acknowledgements"]);function rM(){const e=window.location.hash.slice(1);return e&&_ne.has(e)?e:"intro"}function Sne(){if(typeof window<"u"){const e=localStorage.getItem("eva-theme");if(e==="light"||e==="dark")return e}return"dark"}function Ane(){const[e,t]=A.useState(rM),[n,r]=A.useState(Sne);A.useEffect(()=>{const f=()=>t(rM());return window.addEventListener("hashchange",f),()=>window.removeEventListener("hashchange",f)},[]);const s=A.useCallback(f=>{t(f),window.history.pushState(null,"",`#${f}`)},[]);A.useEffect(()=>{document.documentElement.setAttribute("data-theme",n),localStorage.setItem("eva-theme",n)},[n]);const o=A.useCallback(()=>{r(f=>f==="dark"?"light":"dark")},[]),u=A.useMemo(()=>({mode:n,colors:Tte[n]}),[n]);return b.jsx(Ex.Provider,{value:u,children:b.jsxs("div",{className:"min-h-screen bg-bg-primary",children:[b.jsx(C6,{activeTab:e,onTabChange:s,theme:n,onToggleTheme:o}),b.jsxs("main",{children:[e==="intro"&&b.jsx(E9,{}),e==="architecture"&&b.jsx(j9,{}),e==="metrics"&&b.jsx(R9,{}),e==="early-results"&&b.jsx(Wte,{}),e==="demo"&&b.jsx(vne,{}),e==="limitations"&&b.jsx(wne,{}),e==="acknowledgements"&&b.jsx(O9,{})]})]})})}CR.createRoot(document.getElementById("root")).render(b.jsx(A.StrictMode,{children:b.jsx(Ane,{})})); diff --git a/docs/index.html b/docs/index.html index f0360320..e8897cf7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -9,7 +9,7 @@ - + diff --git a/website/src/components/leaderboard/MetricHeatmap.tsx b/website/src/components/leaderboard/MetricHeatmap.tsx index 51aa2b37..643b850d 100644 --- a/website/src/components/leaderboard/MetricHeatmap.tsx +++ b/website/src/components/leaderboard/MetricHeatmap.tsx @@ -11,34 +11,91 @@ export interface AggregateColumn { getValue: (s: SystemScore) => number; } -// Palette of distinct colors — ordered so adjacent colors always contrast (warm/cool alternating) -const componentPaletteDark = [ - '#F59E0B', '#38BDF8', '#34D399', '#A78BFA', // amber, sky, emerald, purple - '#F87171', '#22D3EE', '#FB923C', '#818CF8', // red, cyan, orange, indigo - '#F472B6', '#4ADE80', '#FACC15', '#2DD4BF', // pink, green, yellow, teal - '#C084FC', '#FB7185', '#67E8F9', '#A3E635', // violet, rose, light-cyan, lime -]; +// Per-category color palettes — each category uses maximally distinct colors so +// components you actually compare (e.g. two STT models) never look alike. +const categoryPalettesDark: Record = { + stt: [ + '#F59E0B', // amber + '#38BDF8', // sky blue + '#34D399', // emerald + '#F87171', // red + '#A78BFA', // purple + '#FACC15', // yellow + ], + llm: [ + '#22D3EE', // cyan + '#FB923C', // orange + '#818CF8', // indigo + '#4ADE80', // green + '#F59E0B', // amber + '#F472B6', // pink + '#94A3B8', // slate + '#A3E635', // lime + '#E879F9', // fuchsia + '#F87171', // red + ], + tts: [ + '#A3E635', // lime + '#FB7185', // rose + '#67E8F9', // light cyan + '#C084FC', // violet + '#FDBA74', // peach + '#2DD4BF', // teal + ], +}; -const componentPaletteLight = [ - '#B45309', '#0369A1', '#047857', '#6D28D9', // amber, sky, emerald, purple - '#B91C1C', '#0E7490', '#C2410C', '#4338CA', // red, cyan, orange, indigo - '#BE185D', '#15803D', '#A16207', '#0D9488', // pink, green, yellow, teal - '#7C3AED', '#E11D48', '#0891B2', '#65A30D', // violet, rose, light-cyan, lime -]; +const categoryPalettesLight: Record = { + stt: [ + '#B45309', // amber + '#0369A1', // sky blue + '#047857', // emerald + '#B91C1C', // red + '#6D28D9', // purple + '#A16207', // yellow + ], + llm: [ + '#0E7490', // cyan + '#C2410C', // orange + '#4338CA', // indigo + '#15803D', // green + '#B45309', // amber + '#BE185D', // pink + '#475569', // slate + '#65A30D', // lime + '#A21CAF', // fuchsia + '#B91C1C', // red + ], + tts: [ + '#65A30D', // lime + '#E11D48', // rose + '#0891B2', // light cyan + '#7C3AED', // violet + '#EA580C', // peach + '#0D9488', // teal + ], +}; -function getComponentColorMap(systems: SystemScore[], palette: string[]): Map { - const allComponents = new Set(); +function getComponentColorMap(systems: SystemScore[], isDark: boolean): Map { + const palettes = isDark ? categoryPalettesDark : categoryPalettesLight; + + // Collect unique names per category + const sttNames: string[] = []; + const llmNames: string[] = []; + const ttsNames: string[] = []; + const seen = new Set(); for (const s of systems) { - if (s.stt !== '-') allComponents.add(s.stt); - allComponents.add(s.llm); - if (s.tts !== '-') allComponents.add(s.tts); + if (s.stt !== '-' && !seen.has('stt:' + s.stt)) { sttNames.push(s.stt); seen.add('stt:' + s.stt); } + if (!seen.has('llm:' + s.llm)) { llmNames.push(s.llm); seen.add('llm:' + s.llm); } + if (s.tts !== '-' && !seen.has('tts:' + s.tts)) { ttsNames.push(s.tts); seen.add('tts:' + s.tts); } } + const map = new Map(); - let i = 0; - for (const name of allComponents) { - map.set(name, palette[i % palette.length]); - i++; - } + const assign = (names: string[], pal: string[]) => { + names.forEach((name, i) => map.set(name, pal[i % pal.length])); + }; + assign(sttNames, palettes.stt); + assign(llmNames, palettes.llm); + assign(ttsNames, palettes.tts); return map; } @@ -99,8 +156,8 @@ export function MetricHeatmap({ title, description, metricKeys, metricLabels, da const themeColors = useThemeColors(); const themeMode = useThemeMode(); const aggCols = aggregateColumns ?? []; - const palette = themeMode === 'light' ? componentPaletteLight : componentPaletteDark; - const componentColors = useMemo(() => getComponentColorMap(systems, palette), [systems, palette]); + const isDark = themeMode !== 'light'; + const componentColors = useMemo(() => getComponentColorMap(systems, isDark), [systems, isDark]); const [sortKey, setSortKey] = useState(null); const [sortDir, setSortDir] = useState('desc'); diff --git a/website/src/components/leaderboard/TurnTakingAnalysis.tsx b/website/src/components/leaderboard/TurnTakingAnalysis.tsx index 023bf332..483e3cf9 100644 --- a/website/src/components/leaderboard/TurnTakingAnalysis.tsx +++ b/website/src/components/leaderboard/TurnTakingAnalysis.tsx @@ -9,18 +9,69 @@ import { useThemeColors, useThemeMode } from '../../styles/theme'; // ─── Shared constants & utilities ──────────────────────────────────────────── -const componentPaletteDark = [ - '#F59E0B', '#38BDF8', '#34D399', '#A78BFA', // amber, sky, emerald, purple - '#F87171', '#22D3EE', '#FB923C', '#818CF8', // red, cyan, orange, indigo - '#F472B6', '#4ADE80', '#FACC15', '#2DD4BF', // pink, green, yellow, teal - '#C084FC', '#FB7185', '#67E8F9', '#A3E635', // violet, rose, light-cyan, lime -]; -const componentPaletteLight = [ - '#B45309', '#0369A1', '#047857', '#6D28D9', // amber, sky, emerald, purple - '#B91C1C', '#0E7490', '#C2410C', '#4338CA', // red, cyan, orange, indigo - '#BE185D', '#15803D', '#A16207', '#0D9488', // pink, green, yellow, teal - '#7C3AED', '#E11D48', '#0891B2', '#65A30D', // violet, rose, light-cyan, lime -]; +// Per-category color palettes — each category uses maximally distinct colors so +// components you actually compare (e.g. two STT models) never look alike. +const categoryPalettesDark: Record = { + stt: [ + '#F59E0B', // amber + '#38BDF8', // sky blue + '#34D399', // emerald + '#F87171', // red + '#A78BFA', // purple + '#FACC15', // yellow + ], + llm: [ + '#22D3EE', // cyan + '#FB923C', // orange + '#818CF8', // indigo + '#4ADE80', // green + '#F59E0B', // amber + '#F472B6', // pink + '#94A3B8', // slate + '#A3E635', // lime + '#E879F9', // fuchsia + '#F87171', // red + ], + tts: [ + '#A3E635', // lime + '#FB7185', // rose + '#67E8F9', // light cyan + '#C084FC', // violet + '#FDBA74', // peach + '#2DD4BF', // teal + ], +}; + +const categoryPalettesLight: Record = { + stt: [ + '#B45309', // amber + '#0369A1', // sky blue + '#047857', // emerald + '#B91C1C', // red + '#6D28D9', // purple + '#A16207', // yellow + ], + llm: [ + '#0E7490', // cyan + '#C2410C', // orange + '#4338CA', // indigo + '#15803D', // green + '#B45309', // amber + '#BE185D', // pink + '#475569', // slate + '#65A30D', // lime + '#A21CAF', // fuchsia + '#B91C1C', // red + ], + tts: [ + '#65A30D', // lime + '#E11D48', // rose + '#0891B2', // light cyan + '#7C3AED', // violet + '#EA580C', // peach + '#0D9488', // teal + ], +}; const distributionColors = { dark: { onTime: '#34D399', late: '#F68EC4', early: '#F59E0B', indeterminate: '#64748B' }, @@ -32,19 +83,26 @@ const breakdownColors = { light: { withToolCalls: '#0891B2', withoutToolCalls: '#7C3AED' }, }; -function getComponentColorMap(systems: SystemScore[], palette: string[]): Map { - const allComponents = new Set(); +function getComponentColorMap(systems: SystemScore[], isDark: boolean): Map { + const palettes = isDark ? categoryPalettesDark : categoryPalettesLight; + + const sttNames: string[] = []; + const llmNames: string[] = []; + const ttsNames: string[] = []; + const seen = new Set(); for (const s of systems) { - if (s.stt !== '-') allComponents.add(s.stt); - allComponents.add(s.llm); - if (s.tts !== '-') allComponents.add(s.tts); + if (s.stt !== '-' && !seen.has('stt:' + s.stt)) { sttNames.push(s.stt); seen.add('stt:' + s.stt); } + if (!seen.has('llm:' + s.llm)) { llmNames.push(s.llm); seen.add('llm:' + s.llm); } + if (s.tts !== '-' && !seen.has('tts:' + s.tts)) { ttsNames.push(s.tts); seen.add('tts:' + s.tts); } } + const map = new Map(); - let i = 0; - for (const name of allComponents) { - map.set(name, palette[i % palette.length]); - i++; - } + const assign = (names: string[], pal: string[]) => { + names.forEach((name, i) => map.set(name, pal[i % pal.length])); + }; + assign(sttNames, palettes.stt); + assign(llmNames, palettes.llm); + assign(ttsNames, palettes.tts); return map; } @@ -790,8 +848,8 @@ interface TurnTakingAnalysisProps { export function TurnTakingAnalysis({ systems }: TurnTakingAnalysisProps) { const themeMode = useThemeMode(); - const palette = themeMode === 'light' ? componentPaletteLight : componentPaletteDark; - const componentColors = useMemo(() => getComponentColorMap(systems, palette), [systems, palette]); + const isDark = themeMode !== 'light'; + const componentColors = useMemo(() => getComponentColorMap(systems, isDark), [systems, isDark]); const [isOpen, setIsOpen] = useState(false); const [layout, setLayout] = useState('sideBySide'); diff --git a/website/src/data/leaderboardData.ts b/website/src/data/leaderboardData.ts index a10ae2ce..ed1fcdb3 100644 --- a/website/src/data/leaderboardData.ts +++ b/website/src/data/leaderboardData.ts @@ -99,6 +99,21 @@ export const ossSystems: SystemScore[] = [ experience: { pass_threshold: 0.4400, mean: 0.6024, pass_at_k: 0.7600, pass_k: 0.2356 }, }, }, + { + id: 'cohere-transcribe-gpt-5-4-mini-kokoro', + name: 'cohere-transcribe + gpt-5.4-mini + kokoro', + shortName: 'gpt-5.4-mini (cohere-transcribe)', + stt: 'cohere-transcribe', llm: 'gpt-5.4-mini', tts: 'kokoro', + type: 'cascade', + evaA: 0.2600, evaX: 0.3733, + accuracyMetrics: { task_completion: 0.3933, agent_tts_fidelity: 0.9846, faithfulness: 0.3300 }, + experienceMetrics: { turn_taking: 0.5097, conciseness: 0.8345, conversation_progression: 0.3433 }, + diagnosticMetrics: { key_entity_transcription: 0.6150, response_speed: 4.9451 }, + successRates: { + accuracy: { pass_threshold: 0.2600, mean: 0.5693, pass_at_k: 0.5200, pass_k: 0.1133 }, + experience: { pass_threshold: 0.3733, mean: 0.5625, pass_at_k: 0.8000, pass_k: 0.1304 }, + }, + }, { id: 'gpt-4o-mini-transcribe-gpt-5-mini-gpt-4o-mini-tts', name: 'gpt-4o-mini-transcribe + gpt-5-mini + gpt-4o-mini-tts', @@ -324,6 +339,21 @@ export const ossSystems: SystemScore[] = [ experience: { pass_threshold: 0.2467, mean: 0.5337, pass_at_k: 0.5000, pass_k: 0.0985 }, }, }, + { + id: 'voxtral-mini-3b-gpt-5-4-mini-voxtral-4b-tts', + name: 'voxtral-mini-3b + gpt-5.4-mini + voxtral-4b-tts', + shortName: 'gpt-5.4-mini (voxtral-mini-3b)', + stt: 'voxtral-mini-3b', llm: 'gpt-5.4-mini', tts: 'voxtral-4b-tts', + type: 'cascade', + evaA: 0.2733, evaX: 0.0067, + accuracyMetrics: { task_completion: 0.4200, agent_tts_fidelity: 0.9831, faithfulness: 0.3733 }, + experienceMetrics: { turn_taking: 0.0629, conciseness: 0.8469, conversation_progression: 0.3800 }, + diagnosticMetrics: { key_entity_transcription: 0.6682, response_speed: 8.5170 }, + successRates: { + accuracy: { pass_threshold: 0.2733, mean: 0.5921, pass_at_k: 0.4600, pass_k: 0.1548 }, + experience: { pass_threshold: 0.0067, mean: 0.4299, pass_at_k: 0.0200, pass_k: 0.0007 }, + }, + }, { id: 'whisper-large-v3-gpt-oss-20b-chatterbox-turbo', name: 'whisper-large-v3 + gpt-oss-20b + chatterbox-turbo',