@ww-ai-lab/openclaw-office 2026.3.18 → 2026.3.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{u as H,h as v,d as b,j as r}from"./index-WMjJihFL.js";const N=10,d=24,x=10,u=14,w=[{max:0,color:"#f3f4f6"},{max:5,color:"#bbf7d0"},{max:10,color:"#4ade80"},{max:1/0,color:"#16a34a"}],D=[{max:0,color:"#1e293b"},{max:5,color:"#14532d"},{max:10,color:"#166534"},{max:1/0,color:"#22c55e"}];function E(c,i){const l=i?D:w;for(const s of l)if(c<=s.max)return s.color;return l[l.length-1].color}function M(c){const i=Date.now(),l=3600*1e3,s=new Map;for(const t of c){const a=t.timestamp,n=(i-a)/l;if(n<0||n>=d)continue;const m=23-Math.min(23,Math.floor(n));let o=s.get(t.agentId);o||(o={name:t.agentName,counts:Array.from({length:d},()=>0)},s.set(t.agentId,o)),m>=0&&m<d&&o.counts[m]++}return Array.from(s.entries()).map(([t,{name:a,counts:n}])=>({agentId:t,agentName:a,counts:n})).toSorted((t,a)=>{const n=t.counts.reduce((o,e)=>o+e,0);return a.counts.reduce((o,e)=>o+e,0)-n}).slice(0,N)}function O(){const{t:c}=H("panels"),i=v(e=>e.eventHistory),s=v(e=>e.theme)==="dark",[t,a]=b.useState(null),n=b.useMemo(()=>M(i),[i]);if(n.length===0)return r.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-gray-500 dark:text-gray-400",children:c("common:empty.noActivityData")});const m=Date.now(),o=3600*1e3;return r.jsxs("div",{className:"relative",children:[r.jsx("svg",{width:d*x+60,height:N*u+24,className:"overflow-visible",children:n.map((e,f)=>r.jsxs("g",{children:[r.jsx("text",{x:0,y:f*u+u/2+4,fontSize:9,fill:s?"#e2e8f0":"#374151",children:e.agentName.length>10?`${e.agentName.slice(0,8)}…`:e.agentName}),e.counts.map((h,g)=>{const L=55+g*x,j=f*u+4,y=m-(d-g)*o,S=y+o,A=`${new Date(y).getHours()}:00-${new Date(S).getHours()}:00`;return r.jsx("rect",{x:L,y:j,width:x-1,height:u-1,fill:E(h,s),onMouseEnter:C=>{const p=C.target.getBoundingClientRect();a({agentName:e.agentName,hour:A,count:h,x:p.left,y:p.top})},onMouseLeave:()=>a(null)},g)})]},e.agentId))}),t&&r.jsxs("div",{className:"fixed z-10 rounded border border-gray-200 bg-white px-2 py-1 text-xs shadow dark:border-gray-700 dark:bg-gray-900 dark:text-gray-200",style:{left:t.x,top:t.y-32},children:[t.agentName," | ",t.hour," | ",t.count," ",c("activityHeatmap.eventsUnit")]})]})}export{O as ActivityHeatmap};
1
+ import{u as H,h as v,d as b,j as r}from"./index-Ds3VfRxk.js";const N=10,d=24,x=10,u=14,w=[{max:0,color:"#f3f4f6"},{max:5,color:"#bbf7d0"},{max:10,color:"#4ade80"},{max:1/0,color:"#16a34a"}],D=[{max:0,color:"#1e293b"},{max:5,color:"#14532d"},{max:10,color:"#166534"},{max:1/0,color:"#22c55e"}];function E(c,i){const l=i?D:w;for(const s of l)if(c<=s.max)return s.color;return l[l.length-1].color}function M(c){const i=Date.now(),l=3600*1e3,s=new Map;for(const t of c){const a=t.timestamp,n=(i-a)/l;if(n<0||n>=d)continue;const m=23-Math.min(23,Math.floor(n));let o=s.get(t.agentId);o||(o={name:t.agentName,counts:Array.from({length:d},()=>0)},s.set(t.agentId,o)),m>=0&&m<d&&o.counts[m]++}return Array.from(s.entries()).map(([t,{name:a,counts:n}])=>({agentId:t,agentName:a,counts:n})).toSorted((t,a)=>{const n=t.counts.reduce((o,e)=>o+e,0);return a.counts.reduce((o,e)=>o+e,0)-n}).slice(0,N)}function O(){const{t:c}=H("panels"),i=v(e=>e.eventHistory),s=v(e=>e.theme)==="dark",[t,a]=b.useState(null),n=b.useMemo(()=>M(i),[i]);if(n.length===0)return r.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-gray-500 dark:text-gray-400",children:c("common:empty.noActivityData")});const m=Date.now(),o=3600*1e3;return r.jsxs("div",{className:"relative",children:[r.jsx("svg",{width:d*x+60,height:N*u+24,className:"overflow-visible",children:n.map((e,f)=>r.jsxs("g",{children:[r.jsx("text",{x:0,y:f*u+u/2+4,fontSize:9,fill:s?"#e2e8f0":"#374151",children:e.agentName.length>10?`${e.agentName.slice(0,8)}…`:e.agentName}),e.counts.map((h,g)=>{const L=55+g*x,j=f*u+4,y=m-(d-g)*o,S=y+o,A=`${new Date(y).getHours()}:00-${new Date(S).getHours()}:00`;return r.jsx("rect",{x:L,y:j,width:x-1,height:u-1,fill:E(h,s),onMouseEnter:C=>{const p=C.target.getBoundingClientRect();a({agentName:e.agentName,hour:A,count:h,x:p.left,y:p.top})},onMouseLeave:()=>a(null)},g)})]},e.agentId))}),t&&r.jsxs("div",{className:"fixed z-10 rounded border border-gray-200 bg-white px-2 py-1 text-xs shadow dark:border-gray-700 dark:bg-gray-900 dark:text-gray-200",style:{left:t.x,top:t.y-32},children:[t.agentName," | ",t.hour," | ",t.count," ",c("activityHeatmap.eventsUnit")]})]})}export{O as ActivityHeatmap};
@@ -1,4 +1,4 @@
1
- import{e as f,g as Ce,d as me,u as Qe,h as xe,j as S,i as Xe}from"./index-WMjJihFL.js";import{c as I,f as A,H as Be,I as Ye,J as Fe,K as et,b as D,T as he,M as T,L as _,N as Ke,e as ye,h as Me,D as tt,C as rt,n as z,q as K,S as nt,A as it,d as at,k as Oe,l as ot,i as M,p as st,u as ct,G as lt,m as ee,j as ut,O as Ve,P as ft,Q as Y,U as Pe,z as pt,V as dt,R as vt,F as mt}from"./generateCategoricalChart-DnxAF2gL.js";var ht=["points","className","baseLinePoints","connectNulls"];function V(){return V=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},V.apply(this,arguments)}function yt(r,e){if(r==null)return{};var n=gt(r,e),t,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)t=o[i],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function gt(r,e){if(r==null)return{};var n={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(e.indexOf(t)>=0)continue;n[t]=r[t]}return n}function ke(r){return Ot(r)||xt(r)||At(r)||bt()}function bt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function At(r,e){if(r){if(typeof r=="string")return fe(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor&&(n=r.constructor.name),n==="Map"||n==="Set")return Array.from(r);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fe(r,e)}}function xt(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Ot(r){if(Array.isArray(r))return fe(r)}function fe(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}var _e=function(e){return e&&e.x===+e.x&&e.y===+e.y},Pt=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return e.forEach(function(t){_e(t)?n[n.length-1].push(t):n[n.length-1].length>0&&n.push([])}),_e(e[0])&&n[n.length-1].push(e[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},U=function(e,n){var t=Pt(e);n&&(t=[t.reduce(function(o,a){return[].concat(ke(o),ke(a))},[])]);var i=t.map(function(o){return o.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return t.length===1?"".concat(i,"Z"):i},kt=function(e,n,t){var i=U(e,t);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(U(n.reverse(),t).slice(1))},_t=function(e){var n=e.points,t=e.className,i=e.baseLinePoints,o=e.connectNulls,a=yt(e,ht);if(!n||!n.length)return null;var s=I("recharts-polygon",t);if(i&&i.length){var l=a.stroke&&a.stroke!=="none",c=kt(n,i,o);return f.createElement("g",{className:s},f.createElement("path",V({},A(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?f.createElement("path",V({},A(a,!0),{fill:"none",d:U(n,o)})):null,l?f.createElement("path",V({},A(a,!0),{fill:"none",d:U(i,o)})):null)}var p=U(n,o);return f.createElement("path",V({},A(a,!0),{fill:p.slice(-1)==="Z"?a.fill:"none",className:s,d:p}))},le,je;function jt(){if(je)return le;je=1;var r=Be(),e=Ye(),n=Fe();function t(i,o){return i&&i.length?r(i,n(o,2),e):void 0}return le=t,le}var wt=jt();const St=Ce(wt);var ue,we;function Tt(){if(we)return ue;we=1;var r=Be(),e=Fe(),n=et();function t(i,o){return i&&i.length?r(i,e(o,2),n):void 0}return ue=t,ue}var Et=Tt();const Rt=Ce(Et);var It=["cx","cy","angle","ticks","axisLine"],Lt=["ticks","tick","angle","tickFormatter","stroke"];function W(r){"@babel/helpers - typeof";return W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(r)}function J(){return J=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},J.apply(this,arguments)}function Se(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.push.apply(n,t)}return n}function $(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Se(Object(n),!0).forEach(function(t){ae(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function Te(r,e){if(r==null)return{};var n=$t(r,e),t,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)t=o[i],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function $t(r,e){if(r==null)return{};var n={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(e.indexOf(t)>=0)continue;n[t]=r[t]}return n}function Nt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Ee(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,ze(t.key),t)}}function Dt(r,e,n){return e&&Ee(r.prototype,e),n&&Ee(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Ct(r,e,n){return e=re(e),Bt(r,qe()?Reflect.construct(e,n||[],re(r).constructor):e.apply(r,n))}function Bt(r,e){if(e&&(W(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ft(r)}function Ft(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function qe(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qe=function(){return!!r})()}function re(r){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},re(r)}function Kt(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&pe(r,e)}function pe(r,e){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},pe(r,e)}function ae(r,e,n){return e=ze(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function ze(r){var e=Mt(r,"string");return W(e)=="symbol"?e:e+""}function Mt(r,e){if(W(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(W(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var oe=(function(r){function e(){return Nt(this,e),Ct(this,e,arguments)}return Kt(e,r),Dt(e,[{key:"getTickValueCoord",value:function(t){var i=t.coordinate,o=this.props,a=o.angle,s=o.cx,l=o.cy;return T(s,l,i,a)}},{key:"getTickTextAnchor",value:function(){var t=this.props.orientation,i;switch(t){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var t=this.props,i=t.cx,o=t.cy,a=t.angle,s=t.ticks,l=St(s,function(p){return p.coordinate||0}),c=Rt(s,function(p){return p.coordinate||0});return{cx:i,cy:o,startAngle:a,endAngle:a,innerRadius:c.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var t=this.props,i=t.cx,o=t.cy,a=t.angle,s=t.ticks,l=t.axisLine,c=Te(t,It),p=s.reduce(function(d,u){return[Math.min(d[0],u.coordinate),Math.max(d[1],u.coordinate)]},[1/0,-1/0]),v=T(i,o,p[0],a),y=T(i,o,p[1],a),x=$($($({},A(c,!1)),{},{fill:"none"},A(l,!1)),{},{x1:v.x,y1:v.y,x2:y.x,y2:y.y});return f.createElement("line",J({className:"recharts-polar-radius-axis-line"},x))}},{key:"renderTicks",value:function(){var t=this,i=this.props,o=i.ticks,a=i.tick,s=i.angle,l=i.tickFormatter,c=i.stroke,p=Te(i,Lt),v=this.getTickTextAnchor(),y=A(p,!1),x=A(a,!1),d=o.map(function(u,h){var g=t.getTickValueCoord(u),b=$($($($({textAnchor:v,transform:"rotate(".concat(90-s,", ").concat(g.x,", ").concat(g.y,")")},y),{},{stroke:"none",fill:c},x),{},{index:h},g),{},{payload:u});return f.createElement(_,J({className:I("recharts-polar-radius-axis-tick",Ke(a)),key:"tick-".concat(u.coordinate)},ye(t.props,u,h)),e.renderTickItem(a,b,l?l(u.value,h):u.value))});return f.createElement(_,{className:"recharts-polar-radius-axis-ticks"},d)}},{key:"render",value:function(){var t=this.props,i=t.ticks,o=t.axisLine,a=t.tick;return!i||!i.length?null:f.createElement(_,{className:I("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),a&&this.renderTicks(),Me.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(t,i,o){var a;return f.isValidElement(t)?a=f.cloneElement(t,i):D(t)?a=t(i):a=f.createElement(he,J({},i,{className:"recharts-polar-radius-axis-tick-value"}),o),a}}])})(me.PureComponent);ae(oe,"displayName","PolarRadiusAxis");ae(oe,"axisType","radiusAxis");ae(oe,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function G(r){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(r)}function C(){return C=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},C.apply(this,arguments)}function Re(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.push.apply(n,t)}return n}function N(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Re(Object(n),!0).forEach(function(t){se(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function Vt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Ie(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,Ge(t.key),t)}}function qt(r,e,n){return e&&Ie(r.prototype,e),n&&Ie(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function zt(r,e,n){return e=ne(e),Wt(r,We()?Reflect.construct(e,n||[],ne(r).constructor):e.apply(r,n))}function Wt(r,e){if(e&&(G(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gt(r)}function Gt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function We(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(We=function(){return!!r})()}function ne(r){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ne(r)}function Ht(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&de(r,e)}function de(r,e){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},de(r,e)}function se(r,e,n){return e=Ge(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Ge(r){var e=Zt(r,"string");return G(e)=="symbol"?e:e+""}function Zt(r,e){if(G(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(G(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Ut=Math.PI/180,Le=1e-5,ce=(function(r){function e(){return Vt(this,e),zt(this,e,arguments)}return Ht(e,r),qt(e,[{key:"getTickLineCoord",value:function(t){var i=this.props,o=i.cx,a=i.cy,s=i.radius,l=i.orientation,c=i.tickSize,p=c||8,v=T(o,a,s,t.coordinate),y=T(o,a,s+(l==="inner"?-1:1)*p,t.coordinate);return{x1:v.x,y1:v.y,x2:y.x,y2:y.y}}},{key:"getTickTextAnchor",value:function(t){var i=this.props.orientation,o=Math.cos(-t.coordinate*Ut),a;return o>Le?a=i==="outer"?"start":"end":o<-Le?a=i==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var t=this.props,i=t.cx,o=t.cy,a=t.radius,s=t.axisLine,l=t.axisLineType,c=N(N({},A(this.props,!1)),{},{fill:"none"},A(s,!1));if(l==="circle")return f.createElement(tt,C({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:o,r:a}));var p=this.props.ticks,v=p.map(function(y){return T(i,o,a,y.coordinate)});return f.createElement(_t,C({className:"recharts-polar-angle-axis-line"},c,{points:v}))}},{key:"renderTicks",value:function(){var t=this,i=this.props,o=i.ticks,a=i.tick,s=i.tickLine,l=i.tickFormatter,c=i.stroke,p=A(this.props,!1),v=A(a,!1),y=N(N({},p),{},{fill:"none"},A(s,!1)),x=o.map(function(d,u){var h=t.getTickLineCoord(d),g=t.getTickTextAnchor(d),b=N(N(N({textAnchor:g},p),{},{stroke:"none",fill:c},v),{},{index:u,payload:d,x:h.x2,y:h.y2});return f.createElement(_,C({className:I("recharts-polar-angle-axis-tick",Ke(a)),key:"tick-".concat(d.coordinate)},ye(t.props,d,u)),s&&f.createElement("line",C({className:"recharts-polar-angle-axis-tick-line"},y,h)),a&&e.renderTickItem(a,b,l?l(d.value,u):d.value))});return f.createElement(_,{className:"recharts-polar-angle-axis-ticks"},x)}},{key:"render",value:function(){var t=this.props,i=t.ticks,o=t.radius,a=t.axisLine;return o<=0||!i||!i.length?null:f.createElement(_,{className:I("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(t,i,o){var a;return f.isValidElement(t)?a=f.cloneElement(t,i):D(t)?a=t(i):a=f.createElement(he,C({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),a}}])})(me.PureComponent);se(ce,"displayName","PolarAngleAxis");se(ce,"axisType","angleAxis");se(ce,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var te;function H(r){"@babel/helpers - typeof";return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(r)}function q(){return q=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},q.apply(this,arguments)}function $e(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.push.apply(n,t)}return n}function m(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$e(Object(n),!0).forEach(function(t){P(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function Jt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Ne(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,Ze(t.key),t)}}function Qt(r,e,n){return e&&Ne(r.prototype,e),n&&Ne(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Xt(r,e,n){return e=ie(e),Yt(r,He()?Reflect.construct(e,n||[],ie(r).constructor):e.apply(r,n))}function Yt(r,e){if(e&&(H(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return er(r)}function er(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function He(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(He=function(){return!!r})()}function ie(r){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ie(r)}function tr(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&ve(r,e)}function ve(r,e){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ve(r,e)}function P(r,e,n){return e=Ze(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Ze(r){var e=rr(r,"string");return H(e)=="symbol"?e:e+""}function rr(r,e){if(H(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(H(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var E=(function(r){function e(n){var t;return Jt(this,e),t=Xt(this,e,[n]),P(t,"pieRef",null),P(t,"sectorRefs",[]),P(t,"id",ct("recharts-pie-")),P(t,"handleAnimationEnd",function(){var i=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),D(i)&&i()}),P(t,"handleAnimationStart",function(){var i=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),D(i)&&i()}),t.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},t}return tr(e,r),Qt(e,[{key:"isActiveIndex",value:function(t){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(t)!==-1:t===i}},{key:"hasActiveIndex",value:function(){var t=this.props.activeIndex;return Array.isArray(t)?t.length!==0:t||t===0}},{key:"renderLabels",value:function(t){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.label,s=o.labelLine,l=o.dataKey,c=o.valueKey,p=A(this.props,!1),v=A(a,!1),y=A(s,!1),x=a&&a.offsetRadius||20,d=t.map(function(u,h){var g=(u.startAngle+u.endAngle)/2,b=T(u.cx,u.cy,u.outerRadius+x,g),k=m(m(m(m({},p),u),{},{stroke:"none"},v),{},{index:h,textAnchor:e.getTextAnchor(b.x,u.cx)},b),B=m(m(m(m({},p),u),{},{fill:"none",stroke:u.fill},y),{},{index:h,points:[T(u.cx,u.cy,u.outerRadius,g),b]}),j=l;return z(l)&&z(c)?j="value":z(l)&&(j=c),f.createElement(_,{key:"label-".concat(u.startAngle,"-").concat(u.endAngle,"-").concat(u.midAngle,"-").concat(h)},s&&e.renderLabelLineItem(s,B,"line"),e.renderLabelItem(a,k,K(u,j)))});return f.createElement(_,{className:"recharts-pie-labels"},d)}},{key:"renderSectorsStatically",value:function(t){var i=this,o=this.props,a=o.activeShape,s=o.blendStroke,l=o.inactiveShape;return t.map(function(c,p){if((c==null?void 0:c.startAngle)===0&&(c==null?void 0:c.endAngle)===0&&t.length!==1)return null;var v=i.isActiveIndex(p),y=l&&i.hasActiveIndex()?l:null,x=v?a:y,d=m(m({},c),{},{stroke:s?c.fill:c.stroke,tabIndex:-1});return f.createElement(_,q({ref:function(h){h&&!i.sectorRefs.includes(h)&&i.sectorRefs.push(h)},tabIndex:-1,className:"recharts-pie-sector"},ye(i.props,c,p),{key:"sector-".concat(c==null?void 0:c.startAngle,"-").concat(c==null?void 0:c.endAngle,"-").concat(c.midAngle,"-").concat(p)}),f.createElement(nt,q({option:x,isActive:v,shapeType:"sector"},d)))})}},{key:"renderSectorsWithAnimation",value:function(){var t=this,i=this.props,o=i.sectors,a=i.isAnimationActive,s=i.animationBegin,l=i.animationDuration,c=i.animationEasing,p=i.animationId,v=this.state,y=v.prevSectors,x=v.prevIsAnimationActive;return f.createElement(it,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(x),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(d){var u=d.t,h=[],g=o&&o[0],b=g.startAngle;return o.forEach(function(k,B){var j=y&&y[B],L=B>0?at(k,"paddingAngle",0):0;if(j){var Z=Oe(j.endAngle-j.startAngle,k.endAngle-k.startAngle),O=m(m({},k),{},{startAngle:b+L,endAngle:b+Z(u)+L});h.push(O),b=O.endAngle}else{var F=k.endAngle,w=k.startAngle,Q=Oe(0,F-w),X=Q(u),R=m(m({},k),{},{startAngle:b+L,endAngle:b+X+L});h.push(R),b=R.endAngle}}),f.createElement(_,null,t.renderSectorsStatically(h))})}},{key:"attachKeyboardHandlers",value:function(t){var i=this;t.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var a=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var t=this.props,i=t.sectors,o=t.isAnimationActive,a=this.state.prevSectors;return o&&i&&i.length&&(!a||!ot(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var t=this,i=this.props,o=i.hide,a=i.sectors,s=i.className,l=i.label,c=i.cx,p=i.cy,v=i.innerRadius,y=i.outerRadius,x=i.isAnimationActive,d=this.state.isAnimationFinished;if(o||!a||!a.length||!M(c)||!M(p)||!M(v)||!M(y))return null;var u=I("recharts-pie",s);return f.createElement(_,{tabIndex:this.props.rootTabIndex,className:u,ref:function(g){t.pieRef=g}},this.renderSectors(),l&&this.renderLabels(a),Me.renderCallByParent(this.props,null,!1),(!x||d)&&st.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(t,i){return i.prevIsAnimationActive!==t.isAnimationActive?{prevIsAnimationActive:t.isAnimationActive,prevAnimationId:t.animationId,curSectors:t.sectors,prevSectors:[],isAnimationFinished:!0}:t.isAnimationActive&&t.animationId!==i.prevAnimationId?{prevAnimationId:t.animationId,curSectors:t.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:t.sectors!==i.curSectors?{curSectors:t.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(t,i){return t>i?"start":t<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(t,i,o){if(f.isValidElement(t))return f.cloneElement(t,i);if(D(t))return t(i);var a=I("recharts-pie-label-line",typeof t!="boolean"?t.className:"");return f.createElement(rt,q({},i,{key:o,type:"linear",className:a}))}},{key:"renderLabelItem",value:function(t,i,o){if(f.isValidElement(t))return f.cloneElement(t,i);var a=o;if(D(t)&&(a=t(i),f.isValidElement(a)))return a;var s=I("recharts-pie-label-text",typeof t!="boolean"&&!D(t)?t.className:"");return f.createElement(he,q({},i,{alignmentBaseline:"middle",className:s}),a)}}])})(me.PureComponent);te=E;P(E,"displayName","Pie");P(E,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!lt.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});P(E,"parseDeltaAngle",function(r,e){var n=ee(e-r),t=Math.min(Math.abs(e-r),360);return n*t});P(E,"getRealPieData",function(r){var e=r.data,n=r.children,t=A(r,!1),i=ut(n,Ve);return e&&e.length?e.map(function(o,a){return m(m(m({payload:o},t),o),i&&i[a]&&i[a].props)}):i&&i.length?i.map(function(o){return m(m({},t),o.props)}):[]});P(E,"parseCoordinateOfPie",function(r,e){var n=e.top,t=e.left,i=e.width,o=e.height,a=ft(i,o),s=t+Y(r.cx,i,i/2),l=n+Y(r.cy,o,o/2),c=Y(r.innerRadius,a,0),p=Y(r.outerRadius,a,a*.8),v=r.maxRadius||Math.sqrt(i*i+o*o)/2;return{cx:s,cy:l,innerRadius:c,outerRadius:p,maxRadius:v}});P(E,"getComposedData",function(r){var e=r.item,n=r.offset,t=e.type.defaultProps!==void 0?m(m({},e.type.defaultProps),e.props):e.props,i=te.getRealPieData(t);if(!i||!i.length)return null;var o=t.cornerRadius,a=t.startAngle,s=t.endAngle,l=t.paddingAngle,c=t.dataKey,p=t.nameKey,v=t.valueKey,y=t.tooltipType,x=Math.abs(t.minAngle),d=te.parseCoordinateOfPie(t,n),u=te.parseDeltaAngle(a,s),h=Math.abs(u),g=c;z(c)&&z(v)?(Pe(!1,`Use "dataKey" to specify the value of pie,
1
+ import{e as f,g as Ce,d as me,u as Qe,h as Ae,j as O,i as Xe}from"./index-Ds3VfRxk.js";import{c as I,f as x,H as Fe,I as Ye,J as Be,K as et,b as D,T as he,M as T,L as _,N as Ke,e as ye,h as Me,D as tt,C as rt,n as z,q as K,S as nt,A as it,d as at,k as Oe,l as ot,i as M,p as st,u as ct,G as lt,m as ee,j as ut,O as Ve,P as ft,Q as Y,U as Pe,z as pt,V as dt,R as vt,F as mt}from"./generateCategoricalChart-CCtxdbf_.js";var ht=["points","className","baseLinePoints","connectNulls"];function V(){return V=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},V.apply(this,arguments)}function yt(r,e){if(r==null)return{};var n=gt(r,e),t,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)t=o[i],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function gt(r,e){if(r==null)return{};var n={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(e.indexOf(t)>=0)continue;n[t]=r[t]}return n}function ke(r){return Ot(r)||At(r)||xt(r)||bt()}function bt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xt(r,e){if(r){if(typeof r=="string")return fe(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);if(n==="Object"&&r.constructor&&(n=r.constructor.name),n==="Map"||n==="Set")return Array.from(r);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fe(r,e)}}function At(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Ot(r){if(Array.isArray(r))return fe(r)}function fe(r,e){(e==null||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}var je=function(e){return e&&e.x===+e.x&&e.y===+e.y},Pt=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return e.forEach(function(t){je(t)?n[n.length-1].push(t):n[n.length-1].length>0&&n.push([])}),je(e[0])&&n[n.length-1].push(e[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},U=function(e,n){var t=Pt(e);n&&(t=[t.reduce(function(o,a){return[].concat(ke(o),ke(a))},[])]);var i=t.map(function(o){return o.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return t.length===1?"".concat(i,"Z"):i},kt=function(e,n,t){var i=U(e,t);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(U(n.reverse(),t).slice(1))},jt=function(e){var n=e.points,t=e.className,i=e.baseLinePoints,o=e.connectNulls,a=yt(e,ht);if(!n||!n.length)return null;var s=I("recharts-polygon",t);if(i&&i.length){var l=a.stroke&&a.stroke!=="none",c=kt(n,i,o);return f.createElement("g",{className:s},f.createElement("path",V({},x(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?f.createElement("path",V({},x(a,!0),{fill:"none",d:U(n,o)})):null,l?f.createElement("path",V({},x(a,!0),{fill:"none",d:U(i,o)})):null)}var p=U(n,o);return f.createElement("path",V({},x(a,!0),{fill:p.slice(-1)==="Z"?a.fill:"none",className:s,d:p}))},le,_e;function _t(){if(_e)return le;_e=1;var r=Fe(),e=Ye(),n=Be();function t(i,o){return i&&i.length?r(i,n(o,2),e):void 0}return le=t,le}var wt=_t();const St=Ce(wt);var ue,we;function Tt(){if(we)return ue;we=1;var r=Fe(),e=Be(),n=et();function t(i,o){return i&&i.length?r(i,e(o,2),n):void 0}return ue=t,ue}var Et=Tt();const Rt=Ce(Et);var It=["cx","cy","angle","ticks","axisLine"],$t=["ticks","tick","angle","tickFormatter","stroke"];function W(r){"@babel/helpers - typeof";return W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(r)}function J(){return J=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},J.apply(this,arguments)}function Se(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.push.apply(n,t)}return n}function L(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Se(Object(n),!0).forEach(function(t){ae(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function Te(r,e){if(r==null)return{};var n=Lt(r,e),t,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)t=o[i],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}function Lt(r,e){if(r==null)return{};var n={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(e.indexOf(t)>=0)continue;n[t]=r[t]}return n}function Nt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Ee(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,ze(t.key),t)}}function Dt(r,e,n){return e&&Ee(r.prototype,e),n&&Ee(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Ct(r,e,n){return e=re(e),Ft(r,qe()?Reflect.construct(e,n||[],re(r).constructor):e.apply(r,n))}function Ft(r,e){if(e&&(W(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bt(r)}function Bt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function qe(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qe=function(){return!!r})()}function re(r){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},re(r)}function Kt(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&pe(r,e)}function pe(r,e){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},pe(r,e)}function ae(r,e,n){return e=ze(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function ze(r){var e=Mt(r,"string");return W(e)=="symbol"?e:e+""}function Mt(r,e){if(W(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(W(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var oe=(function(r){function e(){return Nt(this,e),Ct(this,e,arguments)}return Kt(e,r),Dt(e,[{key:"getTickValueCoord",value:function(t){var i=t.coordinate,o=this.props,a=o.angle,s=o.cx,l=o.cy;return T(s,l,i,a)}},{key:"getTickTextAnchor",value:function(){var t=this.props.orientation,i;switch(t){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var t=this.props,i=t.cx,o=t.cy,a=t.angle,s=t.ticks,l=St(s,function(p){return p.coordinate||0}),c=Rt(s,function(p){return p.coordinate||0});return{cx:i,cy:o,startAngle:a,endAngle:a,innerRadius:c.coordinate||0,outerRadius:l.coordinate||0}}},{key:"renderAxisLine",value:function(){var t=this.props,i=t.cx,o=t.cy,a=t.angle,s=t.ticks,l=t.axisLine,c=Te(t,It),p=s.reduce(function(d,u){return[Math.min(d[0],u.coordinate),Math.max(d[1],u.coordinate)]},[1/0,-1/0]),v=T(i,o,p[0],a),y=T(i,o,p[1],a),A=L(L(L({},x(c,!1)),{},{fill:"none"},x(l,!1)),{},{x1:v.x,y1:v.y,x2:y.x,y2:y.y});return f.createElement("line",J({className:"recharts-polar-radius-axis-line"},A))}},{key:"renderTicks",value:function(){var t=this,i=this.props,o=i.ticks,a=i.tick,s=i.angle,l=i.tickFormatter,c=i.stroke,p=Te(i,$t),v=this.getTickTextAnchor(),y=x(p,!1),A=x(a,!1),d=o.map(function(u,h){var g=t.getTickValueCoord(u),b=L(L(L(L({textAnchor:v,transform:"rotate(".concat(90-s,", ").concat(g.x,", ").concat(g.y,")")},y),{},{stroke:"none",fill:c},A),{},{index:h},g),{},{payload:u});return f.createElement(_,J({className:I("recharts-polar-radius-axis-tick",Ke(a)),key:"tick-".concat(u.coordinate)},ye(t.props,u,h)),e.renderTickItem(a,b,l?l(u.value,h):u.value))});return f.createElement(_,{className:"recharts-polar-radius-axis-ticks"},d)}},{key:"render",value:function(){var t=this.props,i=t.ticks,o=t.axisLine,a=t.tick;return!i||!i.length?null:f.createElement(_,{className:I("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),a&&this.renderTicks(),Me.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(t,i,o){var a;return f.isValidElement(t)?a=f.cloneElement(t,i):D(t)?a=t(i):a=f.createElement(he,J({},i,{className:"recharts-polar-radius-axis-tick-value"}),o),a}}])})(me.PureComponent);ae(oe,"displayName","PolarRadiusAxis");ae(oe,"axisType","radiusAxis");ae(oe,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function G(r){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(r)}function C(){return C=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},C.apply(this,arguments)}function Re(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.push.apply(n,t)}return n}function N(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Re(Object(n),!0).forEach(function(t){se(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function Vt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Ie(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,Ge(t.key),t)}}function qt(r,e,n){return e&&Ie(r.prototype,e),n&&Ie(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function zt(r,e,n){return e=ne(e),Wt(r,We()?Reflect.construct(e,n||[],ne(r).constructor):e.apply(r,n))}function Wt(r,e){if(e&&(G(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gt(r)}function Gt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function We(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(We=function(){return!!r})()}function ne(r){return ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ne(r)}function Ht(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&de(r,e)}function de(r,e){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},de(r,e)}function se(r,e,n){return e=Ge(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Ge(r){var e=Zt(r,"string");return G(e)=="symbol"?e:e+""}function Zt(r,e){if(G(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(G(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Ut=Math.PI/180,$e=1e-5,ce=(function(r){function e(){return Vt(this,e),zt(this,e,arguments)}return Ht(e,r),qt(e,[{key:"getTickLineCoord",value:function(t){var i=this.props,o=i.cx,a=i.cy,s=i.radius,l=i.orientation,c=i.tickSize,p=c||8,v=T(o,a,s,t.coordinate),y=T(o,a,s+(l==="inner"?-1:1)*p,t.coordinate);return{x1:v.x,y1:v.y,x2:y.x,y2:y.y}}},{key:"getTickTextAnchor",value:function(t){var i=this.props.orientation,o=Math.cos(-t.coordinate*Ut),a;return o>$e?a=i==="outer"?"start":"end":o<-$e?a=i==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var t=this.props,i=t.cx,o=t.cy,a=t.radius,s=t.axisLine,l=t.axisLineType,c=N(N({},x(this.props,!1)),{},{fill:"none"},x(s,!1));if(l==="circle")return f.createElement(tt,C({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:o,r:a}));var p=this.props.ticks,v=p.map(function(y){return T(i,o,a,y.coordinate)});return f.createElement(jt,C({className:"recharts-polar-angle-axis-line"},c,{points:v}))}},{key:"renderTicks",value:function(){var t=this,i=this.props,o=i.ticks,a=i.tick,s=i.tickLine,l=i.tickFormatter,c=i.stroke,p=x(this.props,!1),v=x(a,!1),y=N(N({},p),{},{fill:"none"},x(s,!1)),A=o.map(function(d,u){var h=t.getTickLineCoord(d),g=t.getTickTextAnchor(d),b=N(N(N({textAnchor:g},p),{},{stroke:"none",fill:c},v),{},{index:u,payload:d,x:h.x2,y:h.y2});return f.createElement(_,C({className:I("recharts-polar-angle-axis-tick",Ke(a)),key:"tick-".concat(d.coordinate)},ye(t.props,d,u)),s&&f.createElement("line",C({className:"recharts-polar-angle-axis-tick-line"},y,h)),a&&e.renderTickItem(a,b,l?l(d.value,u):d.value))});return f.createElement(_,{className:"recharts-polar-angle-axis-ticks"},A)}},{key:"render",value:function(){var t=this.props,i=t.ticks,o=t.radius,a=t.axisLine;return o<=0||!i||!i.length?null:f.createElement(_,{className:I("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(t,i,o){var a;return f.isValidElement(t)?a=f.cloneElement(t,i):D(t)?a=t(i):a=f.createElement(he,C({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),a}}])})(me.PureComponent);se(ce,"displayName","PolarAngleAxis");se(ce,"axisType","angleAxis");se(ce,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var te;function H(r){"@babel/helpers - typeof";return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(r)}function q(){return q=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},q.apply(this,arguments)}function Le(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.push.apply(n,t)}return n}function m(r){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Le(Object(n),!0).forEach(function(t){k(r,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}function Jt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Ne(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,Ze(t.key),t)}}function Qt(r,e,n){return e&&Ne(r.prototype,e),n&&Ne(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Xt(r,e,n){return e=ie(e),Yt(r,He()?Reflect.construct(e,n||[],ie(r).constructor):e.apply(r,n))}function Yt(r,e){if(e&&(H(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return er(r)}function er(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function He(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(He=function(){return!!r})()}function ie(r){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ie(r)}function tr(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&ve(r,e)}function ve(r,e){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ve(r,e)}function k(r,e,n){return e=Ze(e),e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Ze(r){var e=rr(r,"string");return H(e)=="symbol"?e:e+""}function rr(r,e){if(H(r)!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var t=n.call(r,e);if(H(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var E=(function(r){function e(n){var t;return Jt(this,e),t=Xt(this,e,[n]),k(t,"pieRef",null),k(t,"sectorRefs",[]),k(t,"id",ct("recharts-pie-")),k(t,"handleAnimationEnd",function(){var i=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),D(i)&&i()}),k(t,"handleAnimationStart",function(){var i=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),D(i)&&i()}),t.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},t}return tr(e,r),Qt(e,[{key:"isActiveIndex",value:function(t){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(t)!==-1:t===i}},{key:"hasActiveIndex",value:function(){var t=this.props.activeIndex;return Array.isArray(t)?t.length!==0:t||t===0}},{key:"renderLabels",value:function(t){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.label,s=o.labelLine,l=o.dataKey,c=o.valueKey,p=x(this.props,!1),v=x(a,!1),y=x(s,!1),A=a&&a.offsetRadius||20,d=t.map(function(u,h){var g=(u.startAngle+u.endAngle)/2,b=T(u.cx,u.cy,u.outerRadius+A,g),j=m(m(m(m({},p),u),{},{stroke:"none"},v),{},{index:h,textAnchor:e.getTextAnchor(b.x,u.cx)},b),F=m(m(m(m({},p),u),{},{fill:"none",stroke:u.fill},y),{},{index:h,points:[T(u.cx,u.cy,u.outerRadius,g),b]}),w=l;return z(l)&&z(c)?w="value":z(l)&&(w=c),f.createElement(_,{key:"label-".concat(u.startAngle,"-").concat(u.endAngle,"-").concat(u.midAngle,"-").concat(h)},s&&e.renderLabelLineItem(s,F,"line"),e.renderLabelItem(a,j,K(u,w)))});return f.createElement(_,{className:"recharts-pie-labels"},d)}},{key:"renderSectorsStatically",value:function(t){var i=this,o=this.props,a=o.activeShape,s=o.blendStroke,l=o.inactiveShape;return t.map(function(c,p){if((c==null?void 0:c.startAngle)===0&&(c==null?void 0:c.endAngle)===0&&t.length!==1)return null;var v=i.isActiveIndex(p),y=l&&i.hasActiveIndex()?l:null,A=v?a:y,d=m(m({},c),{},{stroke:s?c.fill:c.stroke,tabIndex:-1});return f.createElement(_,q({ref:function(h){h&&!i.sectorRefs.includes(h)&&i.sectorRefs.push(h)},tabIndex:-1,className:"recharts-pie-sector"},ye(i.props,c,p),{key:"sector-".concat(c==null?void 0:c.startAngle,"-").concat(c==null?void 0:c.endAngle,"-").concat(c.midAngle,"-").concat(p)}),f.createElement(nt,q({option:A,isActive:v,shapeType:"sector"},d)))})}},{key:"renderSectorsWithAnimation",value:function(){var t=this,i=this.props,o=i.sectors,a=i.isAnimationActive,s=i.animationBegin,l=i.animationDuration,c=i.animationEasing,p=i.animationId,v=this.state,y=v.prevSectors,A=v.prevIsAnimationActive;return f.createElement(it,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(A),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(d){var u=d.t,h=[],g=o&&o[0],b=g.startAngle;return o.forEach(function(j,F){var w=y&&y[F],$=F>0?at(j,"paddingAngle",0):0;if(w){var Z=Oe(w.endAngle-w.startAngle,j.endAngle-j.startAngle),P=m(m({},j),{},{startAngle:b+$,endAngle:b+Z(u)+$});h.push(P),b=P.endAngle}else{var B=j.endAngle,S=j.startAngle,Q=Oe(0,B-S),X=Q(u),R=m(m({},j),{},{startAngle:b+$,endAngle:b+X+$});h.push(R),b=R.endAngle}}),f.createElement(_,null,t.renderSectorsStatically(h))})}},{key:"attachKeyboardHandlers",value:function(t){var i=this;t.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var a=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var t=this.props,i=t.sectors,o=t.isAnimationActive,a=this.state.prevSectors;return o&&i&&i.length&&(!a||!ot(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var t=this,i=this.props,o=i.hide,a=i.sectors,s=i.className,l=i.label,c=i.cx,p=i.cy,v=i.innerRadius,y=i.outerRadius,A=i.isAnimationActive,d=this.state.isAnimationFinished;if(o||!a||!a.length||!M(c)||!M(p)||!M(v)||!M(y))return null;var u=I("recharts-pie",s);return f.createElement(_,{tabIndex:this.props.rootTabIndex,className:u,ref:function(g){t.pieRef=g}},this.renderSectors(),l&&this.renderLabels(a),Me.renderCallByParent(this.props,null,!1),(!A||d)&&st.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(t,i){return i.prevIsAnimationActive!==t.isAnimationActive?{prevIsAnimationActive:t.isAnimationActive,prevAnimationId:t.animationId,curSectors:t.sectors,prevSectors:[],isAnimationFinished:!0}:t.isAnimationActive&&t.animationId!==i.prevAnimationId?{prevAnimationId:t.animationId,curSectors:t.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:t.sectors!==i.curSectors?{curSectors:t.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(t,i){return t>i?"start":t<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(t,i,o){if(f.isValidElement(t))return f.cloneElement(t,i);if(D(t))return t(i);var a=I("recharts-pie-label-line",typeof t!="boolean"?t.className:"");return f.createElement(rt,q({},i,{key:o,type:"linear",className:a}))}},{key:"renderLabelItem",value:function(t,i,o){if(f.isValidElement(t))return f.cloneElement(t,i);var a=o;if(D(t)&&(a=t(i),f.isValidElement(a)))return a;var s=I("recharts-pie-label-text",typeof t!="boolean"&&!D(t)?t.className:"");return f.createElement(he,q({},i,{alignmentBaseline:"middle",className:s}),a)}}])})(me.PureComponent);te=E;k(E,"displayName","Pie");k(E,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!lt.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});k(E,"parseDeltaAngle",function(r,e){var n=ee(e-r),t=Math.min(Math.abs(e-r),360);return n*t});k(E,"getRealPieData",function(r){var e=r.data,n=r.children,t=x(r,!1),i=ut(n,Ve);return e&&e.length?e.map(function(o,a){return m(m(m({payload:o},t),o),i&&i[a]&&i[a].props)}):i&&i.length?i.map(function(o){return m(m({},t),o.props)}):[]});k(E,"parseCoordinateOfPie",function(r,e){var n=e.top,t=e.left,i=e.width,o=e.height,a=ft(i,o),s=t+Y(r.cx,i,i/2),l=n+Y(r.cy,o,o/2),c=Y(r.innerRadius,a,0),p=Y(r.outerRadius,a,a*.8),v=r.maxRadius||Math.sqrt(i*i+o*o)/2;return{cx:s,cy:l,innerRadius:c,outerRadius:p,maxRadius:v}});k(E,"getComposedData",function(r){var e=r.item,n=r.offset,t=e.type.defaultProps!==void 0?m(m({},e.type.defaultProps),e.props):e.props,i=te.getRealPieData(t);if(!i||!i.length)return null;var o=t.cornerRadius,a=t.startAngle,s=t.endAngle,l=t.paddingAngle,c=t.dataKey,p=t.nameKey,v=t.valueKey,y=t.tooltipType,A=Math.abs(t.minAngle),d=te.parseCoordinateOfPie(t,n),u=te.parseDeltaAngle(a,s),h=Math.abs(u),g=c;z(c)&&z(v)?(Pe(!1,`Use "dataKey" to specify the value of pie,
3
3
  the props "valueKey" will be deprecated in 1.1.0`),g="value"):z(c)&&(Pe(!1,`Use "dataKey" to specify the value of pie,
4
- the props "valueKey" will be deprecated in 1.1.0`),g=v);var b=i.filter(function(O){return K(O,g,0)!==0}).length,k=(h>=360?b:b-1)*l,B=h-b*x-k,j=i.reduce(function(O,F){var w=K(F,g,0);return O+(M(w)?w:0)},0),L;if(j>0){var Z;L=i.map(function(O,F){var w=K(O,g,0),Q=K(O,p,F),X=(M(w)?w:0)/j,R;F?R=Z.endAngle+ee(u)*l*(w!==0?1:0):R=a;var ge=R+ee(u)*((w!==0?x:0)+X*B),be=(R+ge)/2,Ae=(d.innerRadius+d.outerRadius)/2,Ue=[{name:Q,value:w,payload:O,dataKey:g,type:y}],Je=T(d.cx,d.cy,Ae,be);return Z=m(m(m({percent:X,cornerRadius:o,name:Q,tooltipPayload:Ue,midAngle:be,middleRadius:Ae,tooltipPosition:Je},O),d),{},{value:K(O,g),startAngle:R,endAngle:ge,payload:O,paddingAngle:ee(u)*l}),Z})}return m(m({},d),{},{sectors:L,data:i})});var nr=pt({chartName:"PieChart",GraphicalChild:E,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:ce},{axisType:"radiusAxis",AxisComp:oe}],formatAxisMap:dt,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});function De(r){return r>=1e6?`${(r/1e6).toFixed(1)}M`:r>=1e3?`${(r/1e3).toFixed(1)}k`:String(r)}function or(){const{t:r}=Qe(),e=xe(a=>a.agentCosts),n=xe(a=>a.agents),t=Object.entries(e).filter(([,a])=>a>0),i=t.reduce((a,[,s])=>a+s,0);if(t.length===0)return S.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-gray-500 dark:text-gray-400",children:r("empty.noCostData")});const o=t.map(([a,s])=>{var l;return{name:((l=n.get(a))==null?void 0:l.name)??a,agentId:a,value:s,color:Xe(a)}});return S.jsxs("div",{className:"relative h-[200px] w-full",children:[S.jsx(vt,{width:"100%",height:"100%",children:S.jsxs(nr,{children:[S.jsx(E,{data:o,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:50,outerRadius:80,paddingAngle:2,children:o.map((a,s)=>S.jsx(Ve,{fill:a.color},s))}),S.jsx(mt,{formatter:(a,s)=>{const l=typeof a=="number"?a:0,c=i>0?(l/i*100).toFixed(0):"0";return`${s}: ${De(l)} (${c}%)`}})]})}),S.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:S.jsx("span",{className:"text-sm font-bold text-gray-700 dark:text-gray-300",children:De(i)})})]})}export{or as CostPieChart};
4
+ the props "valueKey" will be deprecated in 1.1.0`),g=v);var b=i.filter(function(P){return K(P,g,0)!==0}).length,j=(h>=360?b:b-1)*l,F=h-b*A-j,w=i.reduce(function(P,B){var S=K(B,g,0);return P+(M(S)?S:0)},0),$;if(w>0){var Z;$=i.map(function(P,B){var S=K(P,g,0),Q=K(P,p,B),X=(M(S)?S:0)/w,R;B?R=Z.endAngle+ee(u)*l*(S!==0?1:0):R=a;var ge=R+ee(u)*((S!==0?A:0)+X*F),be=(R+ge)/2,xe=(d.innerRadius+d.outerRadius)/2,Ue=[{name:Q,value:S,payload:P,dataKey:g,type:y}],Je=T(d.cx,d.cy,xe,be);return Z=m(m(m({percent:X,cornerRadius:o,name:Q,tooltipPayload:Ue,midAngle:be,middleRadius:xe,tooltipPosition:Je},P),d),{},{value:K(P,g),startAngle:R,endAngle:ge,payload:P,paddingAngle:ee(u)*l}),Z})}return m(m({},d),{},{sectors:$,data:i})});var nr=pt({chartName:"PieChart",GraphicalChild:E,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:ce},{axisType:"radiusAxis",AxisComp:oe}],formatAxisMap:dt,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});function De(r){return r>=100?`$${r.toFixed(0)}`:r>=1?`$${r.toFixed(2)}`:r>=.01?`$${r.toFixed(3)}`:r>0?"<$0.01":"$0"}function or(){const{t:r}=Qe("panels"),e=Ae(a=>a.agentCosts),n=Ae(a=>a.agents),t=Object.entries(e).filter(([,a])=>a>0),i=t.reduce((a,[,s])=>a+s,0);if(t.length===0)return O.jsx("div",{className:"flex h-20 items-center justify-center text-xs text-gray-400 dark:text-gray-500",children:r("common:empty.noCostData")});const o=t.map(([a,s])=>{var l;return{name:((l=n.get(a))==null?void 0:l.name)??a,agentId:a,value:s,color:Xe(a)}});return O.jsxs("div",{className:"flex flex-col items-center gap-1",children:[O.jsxs("div",{className:"relative aspect-square w-full max-w-[160px]",children:[O.jsx(vt,{width:"100%",height:"100%",children:O.jsxs(nr,{children:[O.jsx(E,{data:o,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:"55%",outerRadius:"85%",paddingAngle:2,children:o.map((a,s)=>O.jsx(Ve,{fill:a.color},s))}),O.jsx(mt,{formatter:(a,s)=>{const l=typeof a=="number"?a:0,c=i>0?(l/i*100).toFixed(0):"0";return[`${De(l)} (${c}%)`,s]}})]})}),O.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center",children:[O.jsx("span",{className:"text-sm font-bold text-gray-700 dark:text-gray-300",children:De(i)}),O.jsx("span",{className:"text-[9px] text-gray-400 dark:text-gray-500",children:r("metrics.costLabel")})]})]}),o.length>1&&O.jsx("div",{className:"flex flex-wrap justify-center gap-x-3 gap-y-0.5 px-1",children:o.map(a=>O.jsxs("div",{className:"flex items-center gap-1",children:[O.jsx("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:a.color}}),O.jsx("span",{className:"max-w-[80px] truncate text-[10px] text-gray-600 dark:text-gray-400",children:a.name})]},a.agentId))})]})}export{or as CostPieChart};
@@ -1 +1 @@
1
- import{u as S,h as g,d as M,j as d,S as k}from"./index-WMjJihFL.js";const y=8,C=24,j=20,p=280;function T(l,n,s,f){const e=new Map,r=l.length;if(r===0)return e;for(let u=0;u<r;u++){const h=2*Math.PI*u/r-Math.PI/2;e.set(l[u].id,{x:n+f*Math.cos(h),y:s+f*Math.sin(h)})}return e}function w(l,n){if(n<=0)return y;const s=Math.min(l/n,1);return y+s*(C-y)}function E(){const{t:l}=S(),n=g(t=>t.agents),s=g(t=>t.links),f=g(t=>t.theme),[e,r]=M.useState(null),u=f==="dark",{topAgents:h,positions:x,maxToolCount:I}=M.useMemo(()=>{const t=Array.from(n.values()).toSorted((i,m)=>m.toolCallCount-i.toolCallCount).slice(0,j),o=Math.max(1,...t.map(i=>i.toolCallCount)),a=Math.min(80,Math.max(40,t.length*8)),c=T(t,p/2,p/2,a);return{topAgents:t,positions:c,maxToolCount:o}},[n]),v=M.useMemo(()=>{if(!e)return new Set;const t=new Set;for(const o of s)(o.sourceId===e||o.targetId===e)&&t.add(`${o.sourceId}-${o.targetId}`);return t},[s,e]);return h.length===0&&s.length===0?d.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-gray-500 dark:text-gray-400",children:l("empty.noRelationData")}):d.jsxs("svg",{width:"100%",height:200,viewBox:`0 0 ${p} ${p}`,className:"overflow-visible",onMouseLeave:()=>r(null),children:[s.filter(t=>x.has(t.sourceId)&&x.has(t.targetId)).map(t=>{const o=x.get(t.sourceId),a=x.get(t.targetId),c=`${t.sourceId}-${t.targetId}`,i=v.has(c),m=Math.max(1,t.strength*3);return d.jsx("line",{x1:o.x,y1:o.y,x2:a.x,y2:a.y,stroke:i?"#3b82f6":"rgba(107,114,128,0.4)",strokeWidth:m},c)}),h.map(t=>{const o=x.get(t.id);if(!o)return null;const a=w(t.toolCallCount,I),c=e===t.id,i=c?1.2:1,m=k[t.status];return d.jsxs("g",{onMouseEnter:()=>r(t.id),onMouseLeave:()=>r(null),children:[d.jsx("circle",{cx:o.x,cy:o.y,r:a*i,fill:m,stroke:c?"#1e40af":"transparent",strokeWidth:2}),d.jsx("text",{x:o.x,y:o.y+a+10,textAnchor:"middle",fontSize:9,fill:u?"#e2e8f0":"#374151",children:t.name.length>8?`${t.name.slice(0,6)}…`:t.name})]},t.id)})]})}export{E as NetworkGraph};
1
+ import{u as S,h as g,d as M,j as d,S as k}from"./index-Ds3VfRxk.js";const y=8,C=24,j=20,p=280;function T(l,n,s,f){const e=new Map,r=l.length;if(r===0)return e;for(let u=0;u<r;u++){const h=2*Math.PI*u/r-Math.PI/2;e.set(l[u].id,{x:n+f*Math.cos(h),y:s+f*Math.sin(h)})}return e}function w(l,n){if(n<=0)return y;const s=Math.min(l/n,1);return y+s*(C-y)}function E(){const{t:l}=S(),n=g(t=>t.agents),s=g(t=>t.links),f=g(t=>t.theme),[e,r]=M.useState(null),u=f==="dark",{topAgents:h,positions:x,maxToolCount:I}=M.useMemo(()=>{const t=Array.from(n.values()).toSorted((i,m)=>m.toolCallCount-i.toolCallCount).slice(0,j),o=Math.max(1,...t.map(i=>i.toolCallCount)),a=Math.min(80,Math.max(40,t.length*8)),c=T(t,p/2,p/2,a);return{topAgents:t,positions:c,maxToolCount:o}},[n]),v=M.useMemo(()=>{if(!e)return new Set;const t=new Set;for(const o of s)(o.sourceId===e||o.targetId===e)&&t.add(`${o.sourceId}-${o.targetId}`);return t},[s,e]);return h.length===0&&s.length===0?d.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-gray-500 dark:text-gray-400",children:l("empty.noRelationData")}):d.jsxs("svg",{width:"100%",height:200,viewBox:`0 0 ${p} ${p}`,className:"overflow-visible",onMouseLeave:()=>r(null),children:[s.filter(t=>x.has(t.sourceId)&&x.has(t.targetId)).map(t=>{const o=x.get(t.sourceId),a=x.get(t.targetId),c=`${t.sourceId}-${t.targetId}`,i=v.has(c),m=Math.max(1,t.strength*3);return d.jsx("line",{x1:o.x,y1:o.y,x2:a.x,y2:a.y,stroke:i?"#3b82f6":"rgba(107,114,128,0.4)",strokeWidth:m},c)}),h.map(t=>{const o=x.get(t.id);if(!o)return null;const a=w(t.toolCallCount,I),c=e===t.id,i=c?1.2:1,m=k[t.status];return d.jsxs("g",{onMouseEnter:()=>r(t.id),onMouseLeave:()=>r(null),children:[d.jsx("circle",{cx:o.x,cy:o.y,r:a*i,fill:m,stroke:c?"#1e40af":"transparent",strokeWidth:2}),d.jsx("text",{x:o.x,y:o.y+a+10,textAnchor:"middle",fontSize:9,fill:u?"#e2e8f0":"#374151",children:t.name.length>8?`${t.name.slice(0,6)}…`:t.name})]},t.id)})]})}export{E as NetworkGraph};
@@ -1,4 +1,4 @@
1
- import{r as qE,a as YE,g as ob,c as $E,e as Mg,b as ZE,d as me,j as O,f as KE,_ as Xh,u as lb,h as Us,i as JE,p as yc,S as QE,k as ew,Z as Ji}from"./index-WMjJihFL.js";/**
1
+ import{r as qE,a as YE,g as ob,c as $E,e as Mg,b as ZE,d as me,j as O,f as KE,_ as Xh,u as lb,h as Us,i as JE,p as yc,S as QE,k as ew,Z as Ji}from"./index-Ds3VfRxk.js";/**
2
2
  * @license
3
3
  * Copyright 2010-2026 Three.js Authors
4
4
  * SPDX-License-Identifier: MIT
@@ -4709,4 +4709,4 @@ return orthographicDepthToViewZ(depth,cameraNear,cameraFar);
4709
4709
  50% { transform: translateX(0%); }
4710
4710
  100% { transform: translateX(100%); }
4711
4711
  }
4712
- `})]})]})}function VU(){const i=me.useRef(null);return fr((e,t)=>{i.current&&(i.current.rotation.z+=t*3)}),O.jsxs("mesh",{ref:i,position:[0,.75,0],children:[O.jsx("torusGeometry",{args:[.15,.02,8,24]}),O.jsx("meshStandardMaterial",{color:"#3b82f6",emissive:"#3b82f6",emissiveIntensity:2,transparent:!0,opacity:.7})]})}function HU(i){return 1+2.70158*Math.pow(i-1,3)+1.70158*Math.pow(i-1,2)}function GU({agent:i}){const{t:e}=lb("common"),t=me.useRef(null),n=me.useRef(null),s=me.useRef(0),a=me.useRef(!i.isSubAgent),l=Us(I=>I.selectAgent),c=Us(I=>I.selectedAgentId),[h,f]=me.useState(!1),p=c===i.id,m=i.isSubAgent,g=i.status==="offline",v=i.isPlaceholder,_=!i.confirmed,E=i.movement!==null,b=Us(I=>I.tickMovement),x=m?"#60a5fa":JE(i.id),M=v?.25:_?.35:g?.4:m?.6:1,w=g||v||_?"#6b7280":x,[T,,P]=yc(i.position);return fr((I,U)=>{if(!t.current)return;const A=I.clock.elapsedTime;if(!a.current){s.current+=U;const C=Math.min(s.current/.8,1),z=HU(C);t.current.scale.setScalar(z),C>=1&&(a.current=!0);return}if(E){b(i.id,U);const C=Us.getState().agents.get(i.id);if(C){const[z,,F]=yc(C.position),X=Math.min(2.5*U,.1),H=t.current.position;H.x+=(z-H.x)*X,H.z+=(F-H.z)*X,n.current&&(n.current.rotation.z=Math.sin(A*8*Math.PI*2)*.08,n.current.position.y=Math.abs(Math.sin(A*8))*.03)}}else{const C=1-Math.pow(.05,U),z=t.current.position;z.x+=(T-z.x)*C,z.z+=(P-z.z)*C,n.current&&(n.current.position.y=Math.sin(A*2)*.02,n.current.rotation.z=0)}if(m&&!v){const C=1+Math.sin(A*3)*.05;t.current.scale.setScalar(C)}}),O.jsxs("group",{ref:t,position:[T,0,P],scale:m&&!a.current?0:1,onClick:I=>{I.stopPropagation(),v||l(i.id)},onPointerOver:I=>{I.stopPropagation(),v||(f(!0),document.body.style.cursor="pointer")},onPointerOut:()=>{f(!1),document.body.style.cursor="auto"},children:[O.jsxs("group",{ref:n,children:[O.jsxs("mesh",{position:[0,.35,0],castShadow:!0,children:[O.jsx("capsuleGeometry",{args:[.15,.4,8,16]}),O.jsx("meshStandardMaterial",{color:w,transparent:M<1,opacity:M})]}),O.jsxs("mesh",{position:[0,.7,0],castShadow:!0,children:[O.jsx("sphereGeometry",{args:[.12,16,16]}),O.jsx("meshStandardMaterial",{color:w,transparent:M<1,opacity:M})]})]}),i.status==="thinking"&&O.jsx(VU,{}),i.status==="tool_calling"&&i.currentTool&&O.jsx(kU,{tool:{name:i.currentTool.name},position:[.3,.5,-.3]}),i.status==="error"&&O.jsx(OU,{}),i.status==="speaking"&&i.speechBubble&&O.jsx(kc,{position:[0,1,0],center:!0,transform:!1,children:O.jsx("div",{className:"flex items-center justify-center",children:O.jsxs("div",{className:"relative flex h-6 w-6 items-center justify-center rounded-full bg-purple-500 text-white shadow-md",children:[O.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-3 w-3",children:O.jsx("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.102 41.102 0 01-3.55.414c-.28.02-.521.18-.643.413l-1.712 3.293a.75.75 0 01-1.33 0l-1.713-3.293a.783.783 0 00-.642-.413 41.108 41.108 0 01-3.55-.414C1.993 13.245 1 11.986 1 10.574V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"})}),O.jsxs("span",{className:"absolute -top-0.5 -right-0.5 flex h-2 w-2",children:[O.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-purple-300 opacity-75"}),O.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-purple-400"})]})]})})}),p&&O.jsxs("mesh",{position:[0,.01,0],rotation:[-Math.PI/2,0,0],children:[O.jsx("ringGeometry",{args:[.25,.3,32]}),O.jsx("meshStandardMaterial",{color:"#3b82f6",emissive:"#3b82f6",emissiveIntensity:.5,transparent:!0,opacity:.8})]}),h&&O.jsx(kc,{position:[0,1.1,0],center:!0,transform:!1,style:{pointerEvents:"none"},children:O.jsxs("div",{className:"pointer-events-none whitespace-nowrap rounded bg-gray-800 px-2 py-1 text-[11px] text-white shadow",children:[i.name," — ",e(`agent.statusLabels.${i.status}`)]})})]})}const In=2.8,Br=.12,WU="#d4dbe6",CM="#c8d0dc",RM="#9ca8b8",IM="#a8d4f5",PM="#7ec8f0";function Qo({position:i,size:e}){return O.jsxs("mesh",{position:i,castShadow:!0,receiveShadow:!0,children:[O.jsx("boxGeometry",{args:e}),O.jsx("meshStandardMaterial",{color:CM,roughness:.75,metalness:.02})]})}function eb({start:i,end:e,windowCount:t=2,side:n="front"}){const s=e[0]-i[0],a=e[2]-i[2],l=Math.sqrt(s*s+a*a),c=(i[0]+e[0])/2,h=(i[2]+e[2])/2,f=Math.abs(s)>Math.abs(a),p=f?0:Math.PI/2,m=Br,g=1.2,v=1.3,_=1.3,E=me.useMemo(()=>{const x=[];for(let M=1;M<=t;M++){const w=M/(t+1);x.push({pos:[i[0]+s*w,_,i[2]+a*w]})}return x},[i,s,a,t,_]),b=f?[0,0,m]:[m,0,0];return O.jsxs("group",{children:[O.jsxs("mesh",{position:[c,In/2,h],rotation:[0,p,0],castShadow:!0,receiveShadow:!0,children:[O.jsx("boxGeometry",{args:[l,In,m]}),O.jsx("meshStandardMaterial",{color:CM,roughness:.75,metalness:.02,side:Nn})]}),O.jsxs("mesh",{position:[c,In-.02,h],rotation:[0,p,0],children:[O.jsx("boxGeometry",{args:[l,.04,m+.02]}),O.jsx("meshStandardMaterial",{color:RM,roughness:.5})]}),E.map((x,M)=>O.jsxs("mesh",{position:[x.pos[0]+b[0]*.5,x.pos[1],x.pos[2]+b[2]*.5],rotation:[0,p,0],children:[O.jsx("planeGeometry",{args:[g,v]}),O.jsx("meshStandardMaterial",{color:IM,emissive:PM,emissiveIntensity:.15,transparent:!0,opacity:.5,side:Nn})]},`win-${n}-${M}`))]})}function XU({position:i,rotation:e=0,steps:t=6}){const n=me.useMemo(()=>{const s=[];for(let a=0;a<t;a++)s.push({y:a*In*.4/t,z:a*1.5/t});return s},[t]);return O.jsxs("group",{position:i,rotation:[0,e,0],children:[n.map((s,a)=>O.jsxs("mesh",{position:[0,s.y+.05,s.z],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.8,.1,1.5/t+.02]}),O.jsx("meshStandardMaterial",{color:"#b0b8c4",roughness:.6})]},`step-${a}`)),O.jsxs("mesh",{position:[.45,In*.25,.75],children:[O.jsx("boxGeometry",{args:[.03,In*.35,1.6]}),O.jsx("meshStandardMaterial",{color:"#8898a8",roughness:.4,metalness:.4})]})]})}function tb({position:i}){return O.jsxs("group",{position:i,children:[O.jsxs("mesh",{position:[0,.9,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.5,1.8,.4]}),O.jsx("meshStandardMaterial",{color:"#5a6878",roughness:.5,metalness:.35})]}),[.3,.6,.9,1.2,1.5].map(e=>O.jsxs("mesh",{position:[.26,e,0],children:[O.jsx("sphereGeometry",{args:[.02,8,8]}),O.jsx("meshStandardMaterial",{color:"#22c55e",emissive:"#22c55e",emissiveIntensity:2})]},`led-${e}`))]})}const jU={ambient:{intensity:.65,color:new Be("#f5f0e8")},main:{intensity:1.2,color:new Be("#fff8ee")},fill:{intensity:.4,color:new Be("#dde4f0")},hemi:{intensity:.4}},qU={ambient:{intensity:.2,color:new Be("#1a1a2e")},main:{intensity:.4,color:new Be("#8899bb")},fill:{intensity:.15,color:new Be("#2a2a4a")},hemi:{intensity:.15}},YU=4;function $U({theme:i}){const e=me.useRef(null),t=me.useRef(null),n=me.useRef(null),s=me.useRef(null),a=i==="light"?jU:qU;return fr((l,c)=>{const h=Math.min(c*YU,1);e.current&&(e.current.intensity=nl.lerp(e.current.intensity,a.ambient.intensity,h),e.current.color.lerp(a.ambient.color,h)),t.current&&(t.current.intensity=nl.lerp(t.current.intensity,a.main.intensity,h),t.current.color.lerp(a.main.color,h)),n.current&&(n.current.intensity=nl.lerp(n.current.intensity,a.fill.intensity,h),n.current.color.lerp(a.fill.color,h)),s.current&&(s.current.intensity=nl.lerp(s.current.intensity,a.hemi.intensity,h))}),O.jsxs(O.Fragment,{children:[O.jsx("ambientLight",{ref:e,intensity:.65,color:"#f5f0e8"}),O.jsx("directionalLight",{ref:t,position:[12,18,10],intensity:1.2,castShadow:!0,"shadow-mapSize":[2048,2048],"shadow-camera-far":50,"shadow-camera-left":-20,"shadow-camera-right":20,"shadow-camera-top":20,"shadow-camera-bottom":-20,"shadow-bias":-.001,color:"#fff8ee"}),O.jsx("directionalLight",{ref:n,position:[-8,10,-5],intensity:.4,color:"#dde4f0"}),O.jsx("hemisphereLight",{ref:s,args:["#e0e8f5","#b0a090",.4]}),i==="dark"&&O.jsxs(O.Fragment,{children:[O.jsx("pointLight",{position:[3,1.2,2],intensity:.6,color:"#ffd599",distance:5,decay:2}),O.jsx("pointLight",{position:[12,1.2,4],intensity:.6,color:"#ffd599",distance:5,decay:2}),O.jsx("pointLight",{position:[6,1.2,10],intensity:.4,color:"#ffd599",distance:4,decay:2})]})]})}function ZU({theme:i="dark"}){return O.jsxs("group",{children:[O.jsx($U,{theme:i}),O.jsxs("mesh",{rotation:[-Math.PI/2,0,0],position:[8,-.08,6],receiveShadow:!0,children:[O.jsx("planeGeometry",{args:[22,18]}),O.jsx("meshStandardMaterial",{color:"#bcc4d0",roughness:.95})]}),O.jsxs("mesh",{position:[8,-.04,6],children:[O.jsx("boxGeometry",{args:[17,.08,13]}),O.jsx("meshStandardMaterial",{color:"#a8b2c0",roughness:.8})]}),O.jsxs("mesh",{rotation:[-Math.PI/2,0,0],position:[8,.01,6],receiveShadow:!0,children:[O.jsx("planeGeometry",{args:[16,12]}),O.jsx("meshStandardMaterial",{color:WU,roughness:.7,metalness:.02})]}),O.jsx("gridHelper",{args:[16,16,"#c0c8d4","#cad2dc"],position:[8,.02,6]}),O.jsx(eb,{start:[0,0,0],end:[16,0,0],windowCount:4,side:"back"}),O.jsx(eb,{start:[0,0,0],end:[0,0,12],windowCount:3,side:"left"}),O.jsx(Qo,{position:[16,In/2,2],size:[Br,In,4]}),O.jsx(Qo,{position:[16,In/2,8.2],size:[Br,In,2.4]}),O.jsx(Qo,{position:[16,In/2,11.7],size:[Br,In,.6]}),O.jsxs("mesh",{position:[16,In-.05,10.4],children:[O.jsx("boxGeometry",{args:[Br+.04,.1,2.1]}),O.jsx("meshStandardMaterial",{color:RM,roughness:.4,metalness:.3})]}),O.jsxs("mesh",{position:[16.07,1.3,2],rotation:[0,Math.PI/2,0],children:[O.jsx("planeGeometry",{args:[1.2,1.3]}),O.jsx("meshStandardMaterial",{color:IM,emissive:PM,emissiveIntensity:.15,transparent:!0,opacity:.5,side:Nn})]}),O.jsxs("mesh",{position:[16,.02,10.4],rotation:[-Math.PI/2,0,0],children:[O.jsx("planeGeometry",{args:[.6,1.5]}),O.jsx("meshStandardMaterial",{color:"#b0a090",roughness:.95})]}),O.jsx(Qo,{position:[8,In*.35,3],size:[Br,In*.7,5.5]}),O.jsxs("mesh",{position:[8,In*.7,3],children:[O.jsx("boxGeometry",{args:[.04,.03,5.5]}),O.jsx("meshStandardMaterial",{color:"#5b9bd5",emissive:"#4a8ac4",emissiveIntensity:.2})]}),O.jsx(Qo,{position:[8,In*.28,9],size:[Br,In*.56,5.5]}),O.jsx(Qo,{position:[4,In*.3,6],size:[7.5,In*.6,Br]}),O.jsx(XU,{position:[15,0,5.5],rotation:Math.PI,steps:5}),O.jsx(tb,{position:[15.2,0,1]}),O.jsx(tb,{position:[15.2,0,1.7]})]})}const Vr=.42;function nb({position:i,rotation:e=0}){return O.jsxs("group",{position:i,rotation:[0,e,0],children:[O.jsxs("mesh",{position:[0,Vr,0],castShadow:!0,receiveShadow:!0,children:[O.jsx("boxGeometry",{args:[1.1,.04,.55]}),O.jsx("meshStandardMaterial",{color:"#c4a882",roughness:.65,metalness:.02})]}),[[-.5,.2,-.22],[.5,.2,-.22],[-.5,.2,.22],[.5,.2,.22]].map((t,n)=>O.jsxs("mesh",{position:t,castShadow:!0,children:[O.jsx("boxGeometry",{args:[.04,.4,.04]}),O.jsx("meshStandardMaterial",{color:"#8898a8",roughness:.5,metalness:.35})]},`leg-${n}`)),O.jsxs("group",{position:[0,Vr+.02,-.15],children:[O.jsxs("mesh",{position:[0,.05,0],children:[O.jsx("cylinderGeometry",{args:[.06,.08,.1,8]}),O.jsx("meshStandardMaterial",{color:"#6b7a8a",roughness:.4,metalness:.5})]}),O.jsxs("mesh",{position:[0,.2,0],children:[O.jsx("boxGeometry",{args:[.03,.2,.03]}),O.jsx("meshStandardMaterial",{color:"#7a8a9a",roughness:.4,metalness:.5})]}),O.jsxs("mesh",{position:[0,.35,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.55,.32,.02]}),O.jsx("meshStandardMaterial",{color:"#3a4550",roughness:.3,metalness:.15})]}),O.jsxs("mesh",{position:[0,.35,.015],children:[O.jsx("planeGeometry",{args:[.48,.26]}),O.jsx("meshStandardMaterial",{color:"#d0e8ff",emissive:"#90c0f0",emissiveIntensity:.3,transparent:!0,opacity:.9})]})]}),O.jsxs("mesh",{position:[0,Vr+.025,.1],children:[O.jsx("boxGeometry",{args:[.3,.01,.1]}),O.jsx("meshStandardMaterial",{color:"#aab0b8",roughness:.6,metalness:.15})]})]})}function qm({position:i,rotation:e=0,color:t="#4a5568"}){return O.jsxs("group",{position:i,rotation:[0,e,0],children:[O.jsxs("mesh",{position:[0,.05,0],children:[O.jsx("cylinderGeometry",{args:[.15,.18,.04,5]}),O.jsx("meshStandardMaterial",{color:"#7a8a9a",roughness:.4,metalness:.5})]}),O.jsxs("mesh",{position:[0,.18,0],children:[O.jsx("cylinderGeometry",{args:[.025,.025,.22,8]}),O.jsx("meshStandardMaterial",{color:"#8898a8",metalness:.6,roughness:.35})]}),O.jsxs("mesh",{position:[0,.3,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.28,.04,.28]}),O.jsx("meshStandardMaterial",{color:t,roughness:.8})]}),O.jsxs("mesh",{position:[0,.5,-.12],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.26,.36,.03]}),O.jsx("meshStandardMaterial",{color:t,roughness:.8})]}),O.jsxs("mesh",{position:[.15,.38,0],children:[O.jsx("boxGeometry",{args:[.03,.04,.2]}),O.jsx("meshStandardMaterial",{color:"#7a8a9a",roughness:.5,metalness:.35})]}),O.jsxs("mesh",{position:[-.15,.38,0],children:[O.jsx("boxGeometry",{args:[.03,.04,.2]}),O.jsx("meshStandardMaterial",{color:"#7a8a9a",roughness:.5,metalness:.35})]})]})}function KU({position:i,radius:e=1.2}){return O.jsxs("group",{position:i,children:[O.jsxs("mesh",{position:[0,Vr,0],castShadow:!0,receiveShadow:!0,children:[O.jsx("cylinderGeometry",{args:[e,e,.05,6]}),O.jsx("meshStandardMaterial",{color:"#8aa8c8",roughness:.45,metalness:.08})]}),O.jsxs("mesh",{position:[0,Vr+.03,0],rotation:[-Math.PI/2,0,0],children:[O.jsx("ringGeometry",{args:[e-.05,e,6]}),O.jsx("meshStandardMaterial",{color:"#5ba0d0",emissive:"#4090c0",emissiveIntensity:.2,transparent:!0,opacity:.5,side:Nn})]}),O.jsxs("mesh",{position:[0,Vr/2,0],children:[O.jsx("cylinderGeometry",{args:[.08,.12,Vr,8]}),O.jsx("meshStandardMaterial",{color:"#7a8a9a",roughness:.4,metalness:.45})]}),O.jsxs("mesh",{position:[0,Vr+.03,0],rotation:[-Math.PI/2,0,0],children:[O.jsx("circleGeometry",{args:[.3,32]}),O.jsx("meshStandardMaterial",{color:"#b0d0f0",emissive:"#80b0e0",emissiveIntensity:.15,transparent:!0,opacity:.6})]})]})}function ib({position:i}){return O.jsxs("group",{position:i,children:[O.jsxs("mesh",{position:[0,.8,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.8,1.6,.3]}),O.jsx("meshStandardMaterial",{color:"#7a6a5a",roughness:.75,metalness:.05})]}),[.3,.7,1.1].map(e=>O.jsxs("mesh",{position:[0,e,0],children:[O.jsx("boxGeometry",{args:[.76,.03,.28]}),O.jsx("meshStandardMaterial",{color:"#9a8a7a",roughness:.6})]},`shelf-${e}`)),[{x:-.2,y:.5,color:"#4a80c0"},{x:0,y:.5,color:"#40a060"},{x:.15,y:.5,color:"#e08040"},{x:-.15,y:.9,color:"#8060b0"},{x:.1,y:.9,color:"#d04040"}].map((e,t)=>O.jsxs("mesh",{position:[e.x,e.y,0],children:[O.jsx("boxGeometry",{args:[.08,.16,.2]}),O.jsx("meshStandardMaterial",{color:e.color,roughness:.9})]},`book-${t}`))]})}function Bh({position:i,rotation:e=0}){return O.jsxs("group",{position:i,rotation:[0,e,0],children:[O.jsxs("mesh",{position:[0,.15,0],children:[O.jsx("boxGeometry",{args:[1.2,.25,.5]}),O.jsx("meshStandardMaterial",{color:"#6a8aaa",roughness:.8})]}),O.jsxs("mesh",{position:[0,.38,-.2],children:[O.jsx("boxGeometry",{args:[1.2,.2,.12]}),O.jsx("meshStandardMaterial",{color:"#6a8aaa",roughness:.8})]}),O.jsxs("mesh",{position:[.58,.3,0],children:[O.jsx("boxGeometry",{args:[.08,.15,.5]}),O.jsx("meshStandardMaterial",{color:"#6a8aaa",roughness:.8})]}),O.jsxs("mesh",{position:[-.58,.3,0],children:[O.jsx("boxGeometry",{args:[.08,.15,.5]}),O.jsx("meshStandardMaterial",{color:"#6a8aaa",roughness:.8})]}),O.jsxs("mesh",{position:[-.25,.3,.02],children:[O.jsx("boxGeometry",{args:[.45,.06,.4]}),O.jsx("meshStandardMaterial",{color:"#90b8d8",roughness:.9})]}),O.jsxs("mesh",{position:[.25,.3,.02],children:[O.jsx("boxGeometry",{args:[.45,.06,.4]}),O.jsx("meshStandardMaterial",{color:"#90b8d8",roughness:.9})]})]})}function JU({position:i}){return O.jsxs("group",{position:i,children:[O.jsxs("mesh",{position:[0,.2,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.6,.04,.4]}),O.jsx("meshStandardMaterial",{color:"#b0a090",roughness:.55,metalness:.05})]}),[[-.25,.1,-.15],[.25,.1,-.15],[-.25,.1,.15],[.25,.1,.15]].map((e,t)=>O.jsxs("mesh",{position:e,children:[O.jsx("cylinderGeometry",{args:[.015,.015,.2,8]}),O.jsx("meshStandardMaterial",{color:"#8898a8",metalness:.5,roughness:.35})]},`ct-leg-${t}`))]})}function zh({position:i,label:e,color:t}){return O.jsx(kc,{position:i,center:!0,style:{pointerEvents:"none"},children:O.jsx("div",{style:{fontSize:"11px",fontWeight:600,color:t,opacity:.85,textTransform:"uppercase",letterSpacing:"2px",whiteSpace:"nowrap",userSelect:"none",textShadow:"0 1px 3px rgba(255,255,255,0.6)"},children:e})})}function kh({position:i,size:e,color:t}){return O.jsxs("mesh",{position:i,rotation:[-Math.PI/2,0,0],receiveShadow:!0,children:[O.jsx("planeGeometry",{args:e}),O.jsx("meshStandardMaterial",{color:t,transparent:!0,opacity:.15,roughness:.85})]})}function QU(){return O.jsxs("group",{position:[12,0,10],children:[O.jsxs("mesh",{position:[0,1,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[3,2,.08]}),O.jsx("meshStandardMaterial",{color:"#3b4f6b",roughness:.6,metalness:.1})]}),O.jsxs("mesh",{position:[0,2.02,0],children:[O.jsx("boxGeometry",{args:[3,.04,.1]}),O.jsx("meshStandardMaterial",{color:"#7a9bc0",roughness:.4,metalness:.2})]}),O.jsxs("mesh",{position:[0,1.2,.05],children:[O.jsx("planeGeometry",{args:[1.8,.3]}),O.jsx("meshStandardMaterial",{color:"#e0e8f0",emissive:"#90b0d0",emissiveIntensity:.4,transparent:!0,opacity:.85})]})]})}function eF(){return O.jsxs("group",{position:[12,0,10.8],children:[O.jsxs("mesh",{position:[0,.4,0],castShadow:!0,receiveShadow:!0,children:[O.jsx("boxGeometry",{args:[2.4,.8,.5]}),O.jsx("meshStandardMaterial",{color:"#8494a7",roughness:.7,metalness:.05})]}),O.jsxs("mesh",{position:[0,.82,0],children:[O.jsx("boxGeometry",{args:[2.5,.04,.55]}),O.jsx("meshStandardMaterial",{color:"#a5b4c8",roughness:.5,metalness:.08})]}),O.jsxs("mesh",{position:[0,.4,.26],children:[O.jsx("boxGeometry",{args:[2.3,.7,.02]}),O.jsx("meshStandardMaterial",{color:"#6a7a8a",roughness:.6})]})]})}function tF(){const{t:i}=lb("office");return O.jsxs("group",{children:[O.jsx(kh,{position:[3.5,.015,2.8],size:[6.5,5],color:"#4a90d9"}),O.jsx(kh,{position:[12,.015,2.8],size:[6.5,5],color:"#9060c0"}),O.jsx(kh,{position:[3.5,.015,9],size:[6.5,5],color:"#d08030"}),O.jsx(kh,{position:[12,.015,9],size:[6.5,5],color:"#40a060"}),O.jsx(zh,{position:[1.5,.05,.8],label:i("zones.desk"),color:"#2563eb"}),O.jsx(zh,{position:[9.5,.05,.8],label:i("zones.meeting"),color:"#7c3aed"}),O.jsx(zh,{position:[1.5,.05,6.8],label:i("zones.hotDesk"),color:"#c2410c"}),O.jsx(zh,{position:[9.5,.05,6.8],label:i("zones.lounge"),color:"#15803d"}),[{pos:[1.8,0,1.8],rot:0},{pos:[3.5,0,1.8],rot:0},{pos:[5.2,0,1.8],rot:0},{pos:[1.8,0,3.5],rot:Math.PI},{pos:[3.5,0,3.5],rot:Math.PI},{pos:[5.2,0,3.5],rot:Math.PI}].map((e,t)=>O.jsxs("group",{children:[O.jsx(nb,{position:e.pos,rotation:e.rot}),O.jsx(qm,{position:[e.pos[0],0,e.pos[2]+(e.rot===0?.45:-.45)],rotation:e.rot,color:t%2===0?"#4a5568":"#3a5068"})]},`desk-ws-${t}`)),O.jsx(KU,{position:[12,0,2.8]}),Array.from({length:6}).map((e,t)=>{const n=Math.PI*2*t/6-Math.PI/2,s=1.7;return O.jsx(qm,{position:[12+Math.cos(n)*s,0,2.8+Math.sin(n)*s],rotation:n+Math.PI,color:"#3a6080"},`meeting-chair-${t}`)}),[{pos:[1.8,0,7.8],rot:0},{pos:[3.5,0,7.8],rot:0},{pos:[5.2,0,7.8],rot:0},{pos:[1.8,0,9.8],rot:Math.PI},{pos:[3.5,0,9.8],rot:Math.PI},{pos:[5.2,0,9.8],rot:Math.PI}].map((e,t)=>O.jsxs("group",{children:[O.jsx(nb,{position:e.pos,rotation:e.rot}),O.jsx(qm,{position:[e.pos[0],0,e.pos[2]+(e.rot===0?.45:-.45)],rotation:e.rot,color:"#6a5a4a"})]},`hotdesk-ws-${t}`)),O.jsx(Bh,{position:[10.5,0,7.8],rotation:0}),O.jsx(Bh,{position:[13,0,7.8],rotation:0}),O.jsx(Bh,{position:[10.5,0,8.8],rotation:Math.PI}),O.jsx(JU,{position:[11.8,0,8.3]}),O.jsx(Bh,{position:[14.5,0,8.5],rotation:Math.PI/2}),O.jsx(QU,{}),O.jsx(ib,{position:[10,0,10]}),O.jsx(ib,{position:[14,0,10]}),O.jsx(eF,{}),[[.5,0,.5],[.5,0,11.5],[7.5,0,.5],[7.5,0,11.5],[10,0,10],[14,0,10],[10,0,11.5],[14,0,11.5]].map((e,t)=>O.jsxs("group",{position:e,children:[O.jsxs("mesh",{position:[0,.25,0],children:[O.jsx("cylinderGeometry",{args:[.12,.15,.3,8]}),O.jsx("meshStandardMaterial",{color:"#9a8a7a",roughness:.8})]}),O.jsxs("mesh",{position:[0,.55,0],children:[O.jsx("sphereGeometry",{args:[.2,8,6]}),O.jsx("meshStandardMaterial",{color:"#4a8a4a",roughness:.85})]})]},`plant-${t}`))]})}function nF({parent:i,child:e}){const[t,,n]=yc(i.position),[s,,a]=yc(e.position),l=QE[e.status]??"#60a5fa";return O.jsx(uN,{points:[[t,.5,n],[s,.5,a]],color:l,lineWidth:1.5,dashed:!0,dashScale:2,dashSize:.3,gapSize:.2,transparent:!0,opacity:.6})}const iF=[8,0,6],sb=new Be("#e8ecf2"),rb=new Be("#0f1729"),ab=[{x:Ji.meeting.x+Ji.meeting.width/2,y:Ji.meeting.y+Ji.meeting.height/2},{x:Ji.meeting.x+Ji.meeting.width*.25,y:Ji.meeting.y+Ji.meeting.height*.3},{x:Ji.meeting.x+Ji.meeting.width*.75,y:Ji.meeting.y+Ji.meeting.height*.7}];function sF(){const i=Us(n=>n.agents),e=Us(n=>n.links),t=me.useMemo(()=>ew(e,i),[e,i]);return t.length===0?null:O.jsx(O.Fragment,{children:t.map((n,s)=>{const a=ab[s%ab.length],[l,,c]=yc(a),h=n.agentIds.map(f=>{var p;return((p=i.get(f))==null?void 0:p.name)??f.slice(0,6)}).join(", ");return O.jsx(kc,{position:[l,2,c],center:!0,transform:!1,style:{pointerEvents:"none"},children:O.jsx("div",{className:"pointer-events-none rounded bg-blue-600/80 px-2 py-1 text-[10px] text-white shadow whitespace-nowrap",children:h})},n.sessionKey)})})}function rF(){const i=Us(n=>n.theme),{gl:e}=ki(),t=me.useRef(new Be(i==="light"?sb:rb));return me.useEffect(()=>{e.setClearColor(t.current)},[e]),fr(()=>{const n=i==="light"?sb:rb;t.current.lerp(n,.05),e.setClearColor(t.current)}),null}function aF(){const i=Us(s=>s.agents),e=Us(s=>s.theme),t=Us(s=>s.bloomEnabled),n=Array.from(i.values());return O.jsxs(O.Fragment,{children:[O.jsx(rF,{}),O.jsx(hN,{enableRotate:!0,enablePan:!0,enableZoom:!0,minPolarAngle:Math.PI/8,maxPolarAngle:Math.PI/2.8,minDistance:10,maxDistance:40,target:iF,enableDamping:!0,dampingFactor:.08}),O.jsx(ZU,{theme:e}),O.jsx(tF,{}),n.map(s=>O.jsx(GU,{agent:s},s.id)),n.filter(s=>s.isSubAgent&&s.parentAgentId).map(s=>{const a=i.get(s.parentAgentId);return a?O.jsx(nF,{parent:a,child:s},`line-${s.id}`):null}),O.jsx(sF,{}),t&&O.jsx(DU,{children:O.jsx(FU,{intensity:1.2,luminanceThreshold:.6,luminanceSmoothing:.4,mipmapBlur:!0})})]})}function dF(){return O.jsx("div",{className:"h-full w-full",children:O.jsx(GD,{gl:{antialias:!0,alpha:!1},shadows:!0,camera:{fov:42,position:[22,15,22],near:.1,far:200},children:O.jsx(aF,{})})})}export{dF as default};
4712
+ `})]})]})}function VU(){const i=me.useRef(null);return fr((e,t)=>{i.current&&(i.current.rotation.z+=t*3)}),O.jsxs("mesh",{ref:i,position:[0,.75,0],children:[O.jsx("torusGeometry",{args:[.15,.02,8,24]}),O.jsx("meshStandardMaterial",{color:"#3b82f6",emissive:"#3b82f6",emissiveIntensity:2,transparent:!0,opacity:.7})]})}function HU(i){return 1+2.70158*Math.pow(i-1,3)+1.70158*Math.pow(i-1,2)}function GU({agent:i}){const{t:e}=lb("common"),t=me.useRef(null),n=me.useRef(null),s=me.useRef(0),a=me.useRef(!i.isSubAgent),l=Us(I=>I.selectAgent),c=Us(I=>I.selectedAgentId),[h,f]=me.useState(!1),p=c===i.id,m=i.isSubAgent,g=i.status==="offline",v=i.isPlaceholder,_=!i.confirmed,E=i.movement!==null,b=Us(I=>I.tickMovement),x=m?"#60a5fa":JE(i.id),M=v?.25:_?.35:g?.4:m?.6:1,w=g||v||_?"#6b7280":x,[T,,P]=yc(i.position);return fr((I,U)=>{if(!t.current)return;const A=I.clock.elapsedTime;if(!a.current){s.current+=U;const C=Math.min(s.current/.8,1),z=HU(C);t.current.scale.setScalar(z),C>=1&&(a.current=!0);return}if(E){b(i.id,U);const C=Us.getState().agents.get(i.id);if(C){const[z,,F]=yc(C.position),X=Math.min(2.5*U,.1),H=t.current.position;H.x+=(z-H.x)*X,H.z+=(F-H.z)*X,n.current&&(n.current.rotation.z=Math.sin(A*8*Math.PI*2)*.08,n.current.position.y=Math.abs(Math.sin(A*8))*.03)}}else{const C=1-Math.pow(.05,U),z=t.current.position;z.x+=(T-z.x)*C,z.z+=(P-z.z)*C,n.current&&(n.current.position.y=Math.sin(A*2)*.02,n.current.rotation.z=0)}if(m&&!v){const C=1+Math.sin(A*3)*.05;t.current.scale.setScalar(C)}}),O.jsxs("group",{ref:t,position:[T,0,P],scale:m&&!a.current?0:1,onClick:I=>{I.stopPropagation(),v||l(i.id)},onPointerOver:I=>{I.stopPropagation(),v||(f(!0),document.body.style.cursor="pointer")},onPointerOut:()=>{f(!1),document.body.style.cursor="auto"},children:[O.jsxs("group",{ref:n,children:[O.jsxs("mesh",{position:[0,.35,0],castShadow:!0,children:[O.jsx("capsuleGeometry",{args:[.15,.4,8,16]}),O.jsx("meshStandardMaterial",{color:w,transparent:M<1,opacity:M})]}),O.jsxs("mesh",{position:[0,.7,0],castShadow:!0,children:[O.jsx("sphereGeometry",{args:[.12,16,16]}),O.jsx("meshStandardMaterial",{color:w,transparent:M<1,opacity:M})]})]}),i.status==="thinking"&&O.jsx(VU,{}),i.status==="tool_calling"&&i.currentTool&&O.jsx(kU,{tool:{name:i.currentTool.name},position:[.3,.5,-.3]}),i.status==="error"&&O.jsx(OU,{}),i.status==="speaking"&&i.speechBubble&&O.jsx(kc,{position:[0,1,0],center:!0,transform:!1,children:O.jsx("div",{className:"flex items-center justify-center",children:O.jsxs("div",{className:"relative flex h-6 w-6 items-center justify-center rounded-full bg-purple-500 text-white shadow-md",children:[O.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-3 w-3",children:O.jsx("path",{fillRule:"evenodd",d:"M3.43 2.524A41.29 41.29 0 0110 2c2.236 0 4.43.18 6.57.524 1.437.231 2.43 1.49 2.43 2.902v5.148c0 1.413-.993 2.67-2.43 2.902a41.102 41.102 0 01-3.55.414c-.28.02-.521.18-.643.413l-1.712 3.293a.75.75 0 01-1.33 0l-1.713-3.293a.783.783 0 00-.642-.413 41.108 41.108 0 01-3.55-.414C1.993 13.245 1 11.986 1 10.574V5.426c0-1.413.993-2.67 2.43-2.902z",clipRule:"evenodd"})}),O.jsxs("span",{className:"absolute -top-0.5 -right-0.5 flex h-2 w-2",children:[O.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-purple-300 opacity-75"}),O.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-purple-400"})]})]})})}),p&&O.jsxs("mesh",{position:[0,.01,0],rotation:[-Math.PI/2,0,0],children:[O.jsx("ringGeometry",{args:[.25,.3,32]}),O.jsx("meshStandardMaterial",{color:"#3b82f6",emissive:"#3b82f6",emissiveIntensity:.5,transparent:!0,opacity:.8})]}),h&&O.jsx(kc,{position:[0,1.1,0],center:!0,transform:!1,style:{pointerEvents:"none"},children:O.jsxs("div",{className:"pointer-events-none whitespace-nowrap rounded bg-gray-800 px-2 py-1 text-[11px] text-white shadow",children:[i.name," — ",e(`agent.statusLabels.${i.status}`)]})})]})}const In=2.8,Br=.12,WU="#d4dbe6",CM="#c8d0dc",RM="#9ca8b8",IM="#a8d4f5",PM="#7ec8f0";function Qo({position:i,size:e}){return O.jsxs("mesh",{position:i,castShadow:!0,receiveShadow:!0,children:[O.jsx("boxGeometry",{args:e}),O.jsx("meshStandardMaterial",{color:CM,roughness:.75,metalness:.02})]})}function eb({start:i,end:e,windowCount:t=2,side:n="front"}){const s=e[0]-i[0],a=e[2]-i[2],l=Math.sqrt(s*s+a*a),c=(i[0]+e[0])/2,h=(i[2]+e[2])/2,f=Math.abs(s)>Math.abs(a),p=f?0:Math.PI/2,m=Br,g=1.2,v=1.3,_=1.3,E=me.useMemo(()=>{const x=[];for(let M=1;M<=t;M++){const w=M/(t+1);x.push({pos:[i[0]+s*w,_,i[2]+a*w]})}return x},[i,s,a,t,_]),b=f?[0,0,m]:[m,0,0];return O.jsxs("group",{children:[O.jsxs("mesh",{position:[c,In/2,h],rotation:[0,p,0],castShadow:!0,receiveShadow:!0,children:[O.jsx("boxGeometry",{args:[l,In,m]}),O.jsx("meshStandardMaterial",{color:CM,roughness:.75,metalness:.02,side:Nn})]}),O.jsxs("mesh",{position:[c,In-.02,h],rotation:[0,p,0],children:[O.jsx("boxGeometry",{args:[l,.04,m+.02]}),O.jsx("meshStandardMaterial",{color:RM,roughness:.5})]}),E.map((x,M)=>O.jsxs("mesh",{position:[x.pos[0]+b[0]*.5,x.pos[1],x.pos[2]+b[2]*.5],rotation:[0,p,0],children:[O.jsx("planeGeometry",{args:[g,v]}),O.jsx("meshStandardMaterial",{color:IM,emissive:PM,emissiveIntensity:.15,transparent:!0,opacity:.5,side:Nn})]},`win-${n}-${M}`))]})}function XU({position:i,rotation:e=0,steps:t=6}){const n=me.useMemo(()=>{const s=[];for(let a=0;a<t;a++)s.push({y:a*In*.4/t,z:a*1.5/t});return s},[t]);return O.jsxs("group",{position:i,rotation:[0,e,0],children:[n.map((s,a)=>O.jsxs("mesh",{position:[0,s.y+.05,s.z],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.8,.1,1.5/t+.02]}),O.jsx("meshStandardMaterial",{color:"#b0b8c4",roughness:.6})]},`step-${a}`)),O.jsxs("mesh",{position:[.45,In*.25,.75],children:[O.jsx("boxGeometry",{args:[.03,In*.35,1.6]}),O.jsx("meshStandardMaterial",{color:"#8898a8",roughness:.4,metalness:.4})]})]})}function tb({position:i}){return O.jsxs("group",{position:i,children:[O.jsxs("mesh",{position:[0,.9,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.5,1.8,.4]}),O.jsx("meshStandardMaterial",{color:"#5a6878",roughness:.5,metalness:.35})]}),[.3,.6,.9,1.2,1.5].map(e=>O.jsxs("mesh",{position:[.26,e,0],children:[O.jsx("sphereGeometry",{args:[.02,8,8]}),O.jsx("meshStandardMaterial",{color:"#22c55e",emissive:"#22c55e",emissiveIntensity:2})]},`led-${e}`))]})}const jU={ambient:{intensity:.65,color:new Be("#f5f0e8")},main:{intensity:1.2,color:new Be("#fff8ee")},fill:{intensity:.4,color:new Be("#dde4f0")},hemi:{intensity:.4}},qU={ambient:{intensity:.2,color:new Be("#1a1a2e")},main:{intensity:.4,color:new Be("#8899bb")},fill:{intensity:.15,color:new Be("#2a2a4a")},hemi:{intensity:.15}},YU=4;function $U({theme:i}){const e=me.useRef(null),t=me.useRef(null),n=me.useRef(null),s=me.useRef(null),a=i==="light"?jU:qU;return fr((l,c)=>{const h=Math.min(c*YU,1);e.current&&(e.current.intensity=nl.lerp(e.current.intensity,a.ambient.intensity,h),e.current.color.lerp(a.ambient.color,h)),t.current&&(t.current.intensity=nl.lerp(t.current.intensity,a.main.intensity,h),t.current.color.lerp(a.main.color,h)),n.current&&(n.current.intensity=nl.lerp(n.current.intensity,a.fill.intensity,h),n.current.color.lerp(a.fill.color,h)),s.current&&(s.current.intensity=nl.lerp(s.current.intensity,a.hemi.intensity,h))}),O.jsxs(O.Fragment,{children:[O.jsx("ambientLight",{ref:e,intensity:.65,color:"#f5f0e8"}),O.jsx("directionalLight",{ref:t,position:[12,18,10],intensity:1.2,castShadow:!0,"shadow-mapSize":[2048,2048],"shadow-camera-far":50,"shadow-camera-left":-20,"shadow-camera-right":20,"shadow-camera-top":20,"shadow-camera-bottom":-20,"shadow-bias":-.001,color:"#fff8ee"}),O.jsx("directionalLight",{ref:n,position:[-8,10,-5],intensity:.4,color:"#dde4f0"}),O.jsx("hemisphereLight",{ref:s,args:["#e0e8f5","#b0a090",.4]}),i==="dark"&&O.jsxs(O.Fragment,{children:[O.jsx("pointLight",{position:[3,1.2,2],intensity:.6,color:"#ffd599",distance:5,decay:2}),O.jsx("pointLight",{position:[12,1.2,4],intensity:.6,color:"#ffd599",distance:5,decay:2}),O.jsx("pointLight",{position:[6,1.2,10],intensity:.4,color:"#ffd599",distance:4,decay:2})]})]})}function ZU({theme:i="dark"}){return O.jsxs("group",{children:[O.jsx($U,{theme:i}),O.jsxs("mesh",{rotation:[-Math.PI/2,0,0],position:[8,-.08,6],receiveShadow:!0,children:[O.jsx("planeGeometry",{args:[22,18]}),O.jsx("meshStandardMaterial",{color:"#bcc4d0",roughness:.95})]}),O.jsxs("mesh",{position:[8,-.04,6],children:[O.jsx("boxGeometry",{args:[17,.08,13]}),O.jsx("meshStandardMaterial",{color:"#a8b2c0",roughness:.8})]}),O.jsxs("mesh",{rotation:[-Math.PI/2,0,0],position:[8,.01,6],receiveShadow:!0,children:[O.jsx("planeGeometry",{args:[16,12]}),O.jsx("meshStandardMaterial",{color:WU,roughness:.7,metalness:.02})]}),O.jsx("gridHelper",{args:[16,16,"#c0c8d4","#cad2dc"],position:[8,.02,6]}),O.jsx(eb,{start:[0,0,0],end:[16,0,0],windowCount:4,side:"back"}),O.jsx(eb,{start:[0,0,0],end:[0,0,12],windowCount:3,side:"left"}),O.jsx(Qo,{position:[16,In/2,2],size:[Br,In,4]}),O.jsx(Qo,{position:[16,In/2,8.2],size:[Br,In,2.4]}),O.jsx(Qo,{position:[16,In/2,11.7],size:[Br,In,.6]}),O.jsxs("mesh",{position:[16,In-.05,10.4],children:[O.jsx("boxGeometry",{args:[Br+.04,.1,2.1]}),O.jsx("meshStandardMaterial",{color:RM,roughness:.4,metalness:.3})]}),O.jsxs("mesh",{position:[16.07,1.3,2],rotation:[0,Math.PI/2,0],children:[O.jsx("planeGeometry",{args:[1.2,1.3]}),O.jsx("meshStandardMaterial",{color:IM,emissive:PM,emissiveIntensity:.15,transparent:!0,opacity:.5,side:Nn})]}),O.jsxs("mesh",{position:[16,.02,10.4],rotation:[-Math.PI/2,0,0],children:[O.jsx("planeGeometry",{args:[.6,1.5]}),O.jsx("meshStandardMaterial",{color:"#b0a090",roughness:.95})]}),O.jsx(Qo,{position:[8,In*.35,3],size:[Br,In*.7,5.5]}),O.jsxs("mesh",{position:[8,In*.7,3],children:[O.jsx("boxGeometry",{args:[.04,.03,5.5]}),O.jsx("meshStandardMaterial",{color:"#5b9bd5",emissive:"#4a8ac4",emissiveIntensity:.2})]}),O.jsx(Qo,{position:[8,In*.28,9],size:[Br,In*.56,5.5]}),O.jsx(Qo,{position:[4,In*.3,6],size:[7.5,In*.6,Br]}),O.jsx(XU,{position:[15,0,5.5],rotation:Math.PI,steps:5}),O.jsx(tb,{position:[15.2,0,1]}),O.jsx(tb,{position:[15.2,0,1.7]})]})}const Vr=.42;function nb({position:i,rotation:e=0}){return O.jsxs("group",{position:i,rotation:[0,e,0],children:[O.jsxs("mesh",{position:[0,Vr,0],castShadow:!0,receiveShadow:!0,children:[O.jsx("boxGeometry",{args:[1.1,.04,.55]}),O.jsx("meshStandardMaterial",{color:"#c4a882",roughness:.65,metalness:.02})]}),[[-.5,.2,-.22],[.5,.2,-.22],[-.5,.2,.22],[.5,.2,.22]].map((t,n)=>O.jsxs("mesh",{position:t,castShadow:!0,children:[O.jsx("boxGeometry",{args:[.04,.4,.04]}),O.jsx("meshStandardMaterial",{color:"#8898a8",roughness:.5,metalness:.35})]},`leg-${n}`)),O.jsxs("group",{position:[0,Vr+.02,-.15],children:[O.jsxs("mesh",{position:[0,.05,0],children:[O.jsx("cylinderGeometry",{args:[.06,.08,.1,8]}),O.jsx("meshStandardMaterial",{color:"#6b7a8a",roughness:.4,metalness:.5})]}),O.jsxs("mesh",{position:[0,.2,0],children:[O.jsx("boxGeometry",{args:[.03,.2,.03]}),O.jsx("meshStandardMaterial",{color:"#7a8a9a",roughness:.4,metalness:.5})]}),O.jsxs("mesh",{position:[0,.35,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.55,.32,.02]}),O.jsx("meshStandardMaterial",{color:"#3a4550",roughness:.3,metalness:.15})]}),O.jsxs("mesh",{position:[0,.35,.015],children:[O.jsx("planeGeometry",{args:[.48,.26]}),O.jsx("meshStandardMaterial",{color:"#d0e8ff",emissive:"#90c0f0",emissiveIntensity:.3,transparent:!0,opacity:.9})]})]}),O.jsxs("mesh",{position:[0,Vr+.025,.1],children:[O.jsx("boxGeometry",{args:[.3,.01,.1]}),O.jsx("meshStandardMaterial",{color:"#aab0b8",roughness:.6,metalness:.15})]})]})}function qm({position:i,rotation:e=0,color:t="#4a5568"}){return O.jsxs("group",{position:i,rotation:[0,e,0],children:[O.jsxs("mesh",{position:[0,.05,0],children:[O.jsx("cylinderGeometry",{args:[.15,.18,.04,5]}),O.jsx("meshStandardMaterial",{color:"#7a8a9a",roughness:.4,metalness:.5})]}),O.jsxs("mesh",{position:[0,.18,0],children:[O.jsx("cylinderGeometry",{args:[.025,.025,.22,8]}),O.jsx("meshStandardMaterial",{color:"#8898a8",metalness:.6,roughness:.35})]}),O.jsxs("mesh",{position:[0,.3,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.28,.04,.28]}),O.jsx("meshStandardMaterial",{color:t,roughness:.8})]}),O.jsxs("mesh",{position:[0,.5,-.12],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.26,.36,.03]}),O.jsx("meshStandardMaterial",{color:t,roughness:.8})]}),O.jsxs("mesh",{position:[.15,.38,0],children:[O.jsx("boxGeometry",{args:[.03,.04,.2]}),O.jsx("meshStandardMaterial",{color:"#7a8a9a",roughness:.5,metalness:.35})]}),O.jsxs("mesh",{position:[-.15,.38,0],children:[O.jsx("boxGeometry",{args:[.03,.04,.2]}),O.jsx("meshStandardMaterial",{color:"#7a8a9a",roughness:.5,metalness:.35})]})]})}function KU({position:i,radius:e=1.2}){return O.jsxs("group",{position:i,children:[O.jsxs("mesh",{position:[0,Vr,0],castShadow:!0,receiveShadow:!0,children:[O.jsx("cylinderGeometry",{args:[e,e,.05,6]}),O.jsx("meshStandardMaterial",{color:"#8aa8c8",roughness:.45,metalness:.08})]}),O.jsxs("mesh",{position:[0,Vr+.03,0],rotation:[-Math.PI/2,0,0],children:[O.jsx("ringGeometry",{args:[e-.05,e,6]}),O.jsx("meshStandardMaterial",{color:"#5ba0d0",emissive:"#4090c0",emissiveIntensity:.2,transparent:!0,opacity:.5,side:Nn})]}),O.jsxs("mesh",{position:[0,Vr/2,0],children:[O.jsx("cylinderGeometry",{args:[.08,.12,Vr,8]}),O.jsx("meshStandardMaterial",{color:"#7a8a9a",roughness:.4,metalness:.45})]}),O.jsxs("mesh",{position:[0,Vr+.03,0],rotation:[-Math.PI/2,0,0],children:[O.jsx("circleGeometry",{args:[.3,32]}),O.jsx("meshStandardMaterial",{color:"#b0d0f0",emissive:"#80b0e0",emissiveIntensity:.15,transparent:!0,opacity:.6})]})]})}function ib({position:i}){return O.jsxs("group",{position:i,children:[O.jsxs("mesh",{position:[0,.8,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.8,1.6,.3]}),O.jsx("meshStandardMaterial",{color:"#7a6a5a",roughness:.75,metalness:.05})]}),[.3,.7,1.1].map(e=>O.jsxs("mesh",{position:[0,e,0],children:[O.jsx("boxGeometry",{args:[.76,.03,.28]}),O.jsx("meshStandardMaterial",{color:"#9a8a7a",roughness:.6})]},`shelf-${e}`)),[{x:-.2,y:.5,color:"#4a80c0"},{x:0,y:.5,color:"#40a060"},{x:.15,y:.5,color:"#e08040"},{x:-.15,y:.9,color:"#8060b0"},{x:.1,y:.9,color:"#d04040"}].map((e,t)=>O.jsxs("mesh",{position:[e.x,e.y,0],children:[O.jsx("boxGeometry",{args:[.08,.16,.2]}),O.jsx("meshStandardMaterial",{color:e.color,roughness:.9})]},`book-${t}`))]})}function Bh({position:i,rotation:e=0}){return O.jsxs("group",{position:i,rotation:[0,e,0],children:[O.jsxs("mesh",{position:[0,.15,0],children:[O.jsx("boxGeometry",{args:[1.2,.25,.5]}),O.jsx("meshStandardMaterial",{color:"#6a8aaa",roughness:.8})]}),O.jsxs("mesh",{position:[0,.38,-.2],children:[O.jsx("boxGeometry",{args:[1.2,.2,.12]}),O.jsx("meshStandardMaterial",{color:"#6a8aaa",roughness:.8})]}),O.jsxs("mesh",{position:[.58,.3,0],children:[O.jsx("boxGeometry",{args:[.08,.15,.5]}),O.jsx("meshStandardMaterial",{color:"#6a8aaa",roughness:.8})]}),O.jsxs("mesh",{position:[-.58,.3,0],children:[O.jsx("boxGeometry",{args:[.08,.15,.5]}),O.jsx("meshStandardMaterial",{color:"#6a8aaa",roughness:.8})]}),O.jsxs("mesh",{position:[-.25,.3,.02],children:[O.jsx("boxGeometry",{args:[.45,.06,.4]}),O.jsx("meshStandardMaterial",{color:"#90b8d8",roughness:.9})]}),O.jsxs("mesh",{position:[.25,.3,.02],children:[O.jsx("boxGeometry",{args:[.45,.06,.4]}),O.jsx("meshStandardMaterial",{color:"#90b8d8",roughness:.9})]})]})}function JU({position:i}){return O.jsxs("group",{position:i,children:[O.jsxs("mesh",{position:[0,.2,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[.6,.04,.4]}),O.jsx("meshStandardMaterial",{color:"#b0a090",roughness:.55,metalness:.05})]}),[[-.25,.1,-.15],[.25,.1,-.15],[-.25,.1,.15],[.25,.1,.15]].map((e,t)=>O.jsxs("mesh",{position:e,children:[O.jsx("cylinderGeometry",{args:[.015,.015,.2,8]}),O.jsx("meshStandardMaterial",{color:"#8898a8",metalness:.5,roughness:.35})]},`ct-leg-${t}`))]})}function zh({position:i,label:e,color:t}){return O.jsx(kc,{position:i,center:!0,style:{pointerEvents:"none"},children:O.jsx("div",{style:{fontSize:"11px",fontWeight:600,color:t,opacity:.85,textTransform:"uppercase",letterSpacing:"2px",whiteSpace:"nowrap",userSelect:"none",textShadow:"0 1px 3px rgba(255,255,255,0.6)"},children:e})})}function kh({position:i,size:e,color:t}){return O.jsxs("mesh",{position:i,rotation:[-Math.PI/2,0,0],receiveShadow:!0,children:[O.jsx("planeGeometry",{args:e}),O.jsx("meshStandardMaterial",{color:t,transparent:!0,opacity:.15,roughness:.85})]})}function QU(){return O.jsxs("group",{position:[12,0,10],children:[O.jsxs("mesh",{position:[0,1,0],castShadow:!0,children:[O.jsx("boxGeometry",{args:[3,2,.08]}),O.jsx("meshStandardMaterial",{color:"#3b4f6b",roughness:.6,metalness:.1})]}),O.jsxs("mesh",{position:[0,2.02,0],children:[O.jsx("boxGeometry",{args:[3,.04,.1]}),O.jsx("meshStandardMaterial",{color:"#7a9bc0",roughness:.4,metalness:.2})]}),O.jsxs("mesh",{position:[0,1.2,.05],children:[O.jsx("planeGeometry",{args:[1.8,.3]}),O.jsx("meshStandardMaterial",{color:"#e0e8f0",emissive:"#90b0d0",emissiveIntensity:.4,transparent:!0,opacity:.85})]})]})}function eF(){return O.jsxs("group",{position:[12,0,10.8],children:[O.jsxs("mesh",{position:[0,.4,0],castShadow:!0,receiveShadow:!0,children:[O.jsx("boxGeometry",{args:[2.4,.8,.5]}),O.jsx("meshStandardMaterial",{color:"#8494a7",roughness:.7,metalness:.05})]}),O.jsxs("mesh",{position:[0,.82,0],children:[O.jsx("boxGeometry",{args:[2.5,.04,.55]}),O.jsx("meshStandardMaterial",{color:"#a5b4c8",roughness:.5,metalness:.08})]}),O.jsxs("mesh",{position:[0,.4,.26],children:[O.jsx("boxGeometry",{args:[2.3,.7,.02]}),O.jsx("meshStandardMaterial",{color:"#6a7a8a",roughness:.6})]})]})}function tF(){const{t:i}=lb("office");return O.jsxs("group",{children:[O.jsx(kh,{position:[3.5,.015,2.8],size:[6.5,5],color:"#4a90d9"}),O.jsx(kh,{position:[12,.015,2.8],size:[6.5,5],color:"#9060c0"}),O.jsx(kh,{position:[3.5,.015,9],size:[6.5,5],color:"#d08030"}),O.jsx(kh,{position:[12,.015,9],size:[6.5,5],color:"#40a060"}),O.jsx(zh,{position:[1.5,.05,.8],label:i("zones.desk"),color:"#2563eb"}),O.jsx(zh,{position:[9.5,.05,.8],label:i("zones.meeting"),color:"#7c3aed"}),O.jsx(zh,{position:[1.5,.05,6.8],label:i("zones.hotDesk"),color:"#c2410c"}),O.jsx(zh,{position:[9.5,.05,6.8],label:i("zones.lounge"),color:"#15803d"}),[{pos:[1.8,0,1.8],rot:0},{pos:[3.5,0,1.8],rot:0},{pos:[5.2,0,1.8],rot:0},{pos:[1.8,0,3.5],rot:Math.PI},{pos:[3.5,0,3.5],rot:Math.PI},{pos:[5.2,0,3.5],rot:Math.PI}].map((e,t)=>O.jsxs("group",{children:[O.jsx(nb,{position:e.pos,rotation:e.rot}),O.jsx(qm,{position:[e.pos[0],0,e.pos[2]+(e.rot===0?.45:-.45)],rotation:e.rot,color:t%2===0?"#4a5568":"#3a5068"})]},`desk-ws-${t}`)),O.jsx(KU,{position:[12,0,2.8]}),Array.from({length:6}).map((e,t)=>{const n=Math.PI*2*t/6-Math.PI/2,s=1.7;return O.jsx(qm,{position:[12+Math.cos(n)*s,0,2.8+Math.sin(n)*s],rotation:n+Math.PI,color:"#3a6080"},`meeting-chair-${t}`)}),[{pos:[1.8,0,7.8],rot:0},{pos:[3.5,0,7.8],rot:0},{pos:[5.2,0,7.8],rot:0},{pos:[1.8,0,9.8],rot:Math.PI},{pos:[3.5,0,9.8],rot:Math.PI},{pos:[5.2,0,9.8],rot:Math.PI}].map((e,t)=>O.jsxs("group",{children:[O.jsx(nb,{position:e.pos,rotation:e.rot}),O.jsx(qm,{position:[e.pos[0],0,e.pos[2]+(e.rot===0?.45:-.45)],rotation:e.rot,color:"#6a5a4a"})]},`hotdesk-ws-${t}`)),O.jsx(Bh,{position:[10.5,0,7.8],rotation:0}),O.jsx(Bh,{position:[13,0,7.8],rotation:0}),O.jsx(Bh,{position:[10.5,0,8.8],rotation:Math.PI}),O.jsx(JU,{position:[11.8,0,8.3]}),O.jsx(Bh,{position:[14.5,0,8.5],rotation:Math.PI/2}),O.jsx(QU,{}),O.jsx(ib,{position:[10,0,10]}),O.jsx(ib,{position:[14,0,10]}),O.jsx(eF,{}),[[.5,0,.5],[.5,0,11.5],[7.5,0,.5],[7.5,0,11.5],[10,0,10],[14,0,10],[10,0,11.5],[14,0,11.5]].map((e,t)=>O.jsxs("group",{position:e,children:[O.jsxs("mesh",{position:[0,.25,0],children:[O.jsx("cylinderGeometry",{args:[.12,.15,.3,8]}),O.jsx("meshStandardMaterial",{color:"#9a8a7a",roughness:.8})]}),O.jsxs("mesh",{position:[0,.55,0],children:[O.jsx("sphereGeometry",{args:[.2,8,6]}),O.jsx("meshStandardMaterial",{color:"#4a8a4a",roughness:.85})]})]},`plant-${t}`))]})}function nF({parent:i,child:e}){const[t,,n]=yc(i.position),[s,,a]=yc(e.position),l=QE[e.status]??"#60a5fa";return O.jsx(uN,{points:[[t,.5,n],[s,.5,a]],color:l,lineWidth:1.5,dashed:!0,dashScale:2,dashSize:.3,gapSize:.2,transparent:!0,opacity:.6})}const iF=[8,0,6],sb=new Be("#e8ecf2"),rb=new Be("#0f1729"),ab=[{x:Ji.meeting.x+Ji.meeting.width/2,y:Ji.meeting.y+Ji.meeting.height/2},{x:Ji.meeting.x+Ji.meeting.width*.25,y:Ji.meeting.y+Ji.meeting.height*.3},{x:Ji.meeting.x+Ji.meeting.width*.75,y:Ji.meeting.y+Ji.meeting.height*.7}];function sF(){const i=Us(n=>n.agents),e=Us(n=>n.links),t=me.useMemo(()=>ew(e,i),[e,i]);return t.length===0?null:O.jsx(O.Fragment,{children:t.map((n,s)=>{const a=ab[s%ab.length],[l,,c]=yc(a),h=n.agentIds.map(f=>{var p;return((p=i.get(f))==null?void 0:p.name)??f.slice(0,6)}).join(", ");return O.jsx(kc,{position:[l,2,c],center:!0,transform:!1,style:{pointerEvents:"none"},children:O.jsx("div",{className:"pointer-events-none rounded bg-blue-600/80 px-2 py-1 text-[10px] text-white shadow whitespace-nowrap",children:h})},n.sessionKey)})})}function rF(){const i=Us(n=>n.theme),{gl:e}=ki(),t=me.useRef(new Be(i==="light"?sb:rb));return me.useEffect(()=>{e.setClearColor(t.current)},[e]),fr(()=>{const n=i==="light"?sb:rb;t.current.lerp(n,.05),e.setClearColor(t.current)}),null}function aF(){const i=Us(s=>s.agents),e=Us(s=>s.theme),t=Us(s=>s.bloomEnabled),n=Array.from(i.values());return O.jsxs(O.Fragment,{children:[O.jsx(rF,{}),O.jsx(hN,{enableRotate:!0,enablePan:!0,enableZoom:!0,minPolarAngle:Math.PI/8,maxPolarAngle:Math.PI/2.8,minDistance:10,maxDistance:40,target:iF,enableDamping:!0,dampingFactor:.08}),O.jsx(ZU,{theme:e}),O.jsx(tF,{}),n.filter(s=>!s.isPlaceholder).map(s=>O.jsx(GU,{agent:s},s.id)),n.filter(s=>s.isSubAgent&&s.parentAgentId&&!s.isPlaceholder).map(s=>{const a=i.get(s.parentAgentId);return a?O.jsx(nF,{parent:a,child:s},`line-${s.id}`):null}),O.jsx(sF,{}),t&&O.jsx(DU,{children:O.jsx(FU,{intensity:1.2,luminanceThreshold:.6,luminanceSmoothing:.4,mipmapBlur:!0})})]})}function dF(){return O.jsx("div",{className:"h-full w-full",children:O.jsx(GD,{gl:{antialias:!0,alpha:!1},shadows:!0,camera:{fov:42,position:[22,15,22],near:.1,far:200},children:O.jsx(aF,{})})})}export{dF as default};
@@ -1,2 +1,2 @@
1
- import{e as w,d as D,u as Jt,h as Qt,j as A,P as Z}from"./index-WMjJihFL.js";import{g as Zt,i as ht,G as Ct,a as lt,m as te,b as q,c as C,T as ee,s as ft,f as $,d as Pt,L as X,e as re,h as ne,D as ie,j as oe,E as ae,C as ce,A as se,k as Y,l as ue,n as yt,o as le,p as fe,q as Dt,u as pe,r as kt,t as Nt,v as Lt,w as he,x as It,y as ye,z as ve,B as de,R as me,F as be}from"./generateCategoricalChart-DnxAF2gL.js";function zt(t,e,n){if(e<1)return[];if(e===1&&n===void 0)return t;for(var r=[],i=0;i<t.length;i+=e)r.push(t[i]);return r}function ge(t,e,n){var r={width:t.width+e.width,height:t.height+e.height};return Zt(r,n)}function xe(t,e,n){var r=n==="width",i=t.x,a=t.y,o=t.width,c=t.height;return e===1?{start:r?i:a,end:r?i+o:a+c}:{start:r?i+o:a+c,end:r?i:a}}function et(t,e,n,r,i){if(t*e<t*r||t*e>t*i)return!1;var a=n();return t*(e-t*a/2-r)>=0&&t*(e+t*a/2-i)<=0}function Oe(t,e){return zt(t,e+1)}function we(t,e,n,r,i){for(var a=(r||[]).slice(),o=e.start,c=e.end,s=0,h=1,f=o,y=function(){var p=r==null?void 0:r[s];if(p===void 0)return{v:zt(r,h)};var v=s,d,g=function(){return d===void 0&&(d=n(p,v)),d},b=p.coordinate,m=s===0||et(t,b,g,f,c);m||(s=0,f=o,h+=1),m&&(f=b+t*(g()/2+i),s+=h)},l;h<=a.length;)if(l=y(),l)return l.v;return[]}function J(t){"@babel/helpers - typeof";return J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(t)}function _t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function k(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_t(Object(n),!0).forEach(function(r){Pe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Pe(t,e,n){return e=ke(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ke(t){var e=_e(t,"string");return J(e)=="symbol"?e:e+""}function _e(t,e){if(J(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(J(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Se(t,e,n,r,i){for(var a=(r||[]).slice(),o=a.length,c=e.start,s=e.end,h=function(l){var u=a[l],p,v=function(){return p===void 0&&(p=n(u,l)),p};if(l===o-1){var d=t*(u.coordinate+t*v()/2-s);a[l]=u=k(k({},u),{},{tickCoord:d>0?u.coordinate-d*t:u.coordinate})}else a[l]=u=k(k({},u),{},{tickCoord:u.coordinate});var g=et(t,u.tickCoord,v,c,s);g&&(s=u.tickCoord-t*(v()/2+i),a[l]=k(k({},u),{},{isShow:!0}))},f=o-1;f>=0;f--)h(f);return a}function Ae(t,e,n,r,i,a){var o=(r||[]).slice(),c=o.length,s=e.start,h=e.end;if(a){var f=r[c-1],y=n(f,c-1),l=t*(f.coordinate+t*y/2-h);o[c-1]=f=k(k({},f),{},{tickCoord:l>0?f.coordinate-l*t:f.coordinate});var u=et(t,f.tickCoord,function(){return y},s,h);u&&(h=f.tickCoord-t*(y/2+i),o[c-1]=k(k({},f),{},{isShow:!0}))}for(var p=a?c-1:c,v=function(b){var m=o[b],x,O=function(){return x===void 0&&(x=n(m,b)),x};if(b===0){var j=t*(m.coordinate-t*O()/2-s);o[b]=m=k(k({},m),{},{tickCoord:j<0?m.coordinate-j*t:m.coordinate})}else o[b]=m=k(k({},m),{},{tickCoord:m.coordinate});var T=et(t,m.tickCoord,O,s,h);T&&(s=m.tickCoord+t*(O()/2+i),o[b]=k(k({},m),{},{isShow:!0}))},d=0;d<p;d++)v(d);return o}function je(t,e,n){var r=t.tick,i=t.ticks,a=t.viewBox,o=t.minTickGap,c=t.orientation,s=t.interval,h=t.tickFormatter,f=t.unit,y=t.angle;if(!i||!i.length||!r)return[];if(ht(s)||Ct.isSsr)return Oe(i,typeof s=="number"&&ht(s)?s:0);var l=[],u=c==="top"||c==="bottom"?"width":"height",p=f&&u==="width"?lt(f,{fontSize:e,letterSpacing:n}):{width:0,height:0},v=function(m,x){var O=q(h)?h(m.value,x):m.value;return u==="width"?ge(lt(O,{fontSize:e,letterSpacing:n}),p,y):lt(O,{fontSize:e,letterSpacing:n})[u]},d=i.length>=2?te(i[1].coordinate-i[0].coordinate):1,g=xe(a,d,u);return s==="equidistantPreserveStart"?we(d,g,v,i,o):(s==="preserveStart"||s==="preserveStartEnd"?l=Ae(d,g,v,i,o,s==="preserveStartEnd"):l=Se(d,g,v,i,o),l.filter(function(b){return b.isShow}))}var Te=["viewBox"],Ee=["viewBox"],$e=["ticks"];function B(t){"@babel/helpers - typeof";return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(t)}function R(){return R=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},R.apply(this,arguments)}function St(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function P(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?St(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function pt(t,e){if(t==null)return{};var n=Ce(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ce(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function De(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function At(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Bt(r.key),r)}}function Ne(t,e,n){return e&&At(t.prototype,e),n&&At(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Le(t,e,n){return e=rt(e),Ie(t,Rt()?Reflect.construct(e,n||[],rt(t).constructor):e.apply(t,n))}function Ie(t,e){if(e&&(B(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ze(t)}function ze(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rt=function(){return!!t})()}function rt(t){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rt(t)}function Re(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vt(t,e)}function vt(t,e){return vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vt(t,e)}function wt(t,e,n){return e=Bt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bt(t){var e=Be(t,"string");return B(e)=="symbol"?e:e+""}function Be(t,e){if(B(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(B(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var at=(function(t){function e(n){var r;return De(this,e),r=Le(this,e,[n]),r.state={fontSize:"",letterSpacing:""},r}return Re(e,t),Ne(e,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=pt(r,Te),c=this.props,s=c.viewBox,h=pt(c,Ee);return!ft(a,s)||!ft(o,h)||!ft(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,c=i.width,s=i.height,h=i.orientation,f=i.tickSize,y=i.mirror,l=i.tickMargin,u,p,v,d,g,b,m=y?-1:1,x=r.tickSize||f,O=ht(r.tickCoord)?r.tickCoord:r.coordinate;switch(h){case"top":u=p=r.coordinate,d=o+ +!y*s,v=d-m*x,b=v-m*l,g=O;break;case"left":v=d=r.coordinate,p=a+ +!y*c,u=p-m*x,g=u-m*l,b=O;break;case"right":v=d=r.coordinate,p=a+ +y*c,u=p+m*x,g=u+m*l,b=O;break;default:u=p=r.coordinate,d=o+ +y*s,v=d+m*x,b=v+m*l,g=O;break}return{line:{x1:u,y1:v,x2:p,y2:d},tick:{x:g,y:b}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,c=r.height,s=r.orientation,h=r.mirror,f=r.axisLine,y=P(P(P({},$(this.props,!1)),$(f,!1)),{},{fill:"none"});if(s==="top"||s==="bottom"){var l=+(s==="top"&&!h||s==="bottom"&&h);y=P(P({},y),{},{x1:i,y1:a+l*c,x2:i+o,y2:a+l*c})}else{var u=+(s==="left"&&!h||s==="right"&&h);y=P(P({},y),{},{x1:i+u*o,y1:a,x2:i+u*o,y2:a+c})}return w.createElement("line",R({},y,{className:C("recharts-cartesian-axis-line",Pt(f,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,c=this.props,s=c.tickLine,h=c.stroke,f=c.tick,y=c.tickFormatter,l=c.unit,u=je(P(P({},this.props),{},{ticks:r}),i,a),p=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),d=$(this.props,!1),g=$(f,!1),b=P(P({},d),{},{fill:"none"},$(s,!1)),m=u.map(function(x,O){var j=o.getTickLineCoord(x),T=j.line,N=j.tick,L=P(P(P(P({textAnchor:p,verticalAnchor:v},d),{},{stroke:"none",fill:h},g),N),{},{index:O,payload:x,visibleTicksCount:u.length,tickFormatter:y});return w.createElement(X,R({className:"recharts-cartesian-axis-tick",key:"tick-".concat(x.value,"-").concat(x.coordinate,"-").concat(x.tickCoord)},re(o.props,x,O)),s&&w.createElement("line",R({},b,T,{className:C("recharts-cartesian-axis-tick-line",Pt(s,"className"))})),f&&e.renderTickItem(f,L,"".concat(q(y)?y(x.value,O):x.value).concat(l||"")))});return w.createElement("g",{className:"recharts-cartesian-axis-ticks"},m)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,c=i.height,s=i.ticksGenerator,h=i.className,f=i.hide;if(f)return null;var y=this.props,l=y.ticks,u=pt(y,$e),p=l;return q(s)&&(p=l&&l.length>0?s(this.props):s(u)),o<=0||c<=0||!p||!p.length?null:w.createElement(X,{className:C("recharts-cartesian-axis",h),ref:function(d){r.layerReference=d}},a&&this.renderAxisLine(),this.renderTicks(p,this.state.fontSize,this.state.letterSpacing),ne.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,c=C(i.className,"recharts-cartesian-axis-tick-value");return w.isValidElement(r)?o=w.cloneElement(r,P(P({},i),{},{className:c})):q(r)?o=r(P(P({},i),{},{className:c})):o=w.createElement(ee,R({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(D.Component);wt(at,"displayName","CartesianAxis");wt(at,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Fe=["type","layout","connectNulls","ref"],We=["key"];function F(t){"@babel/helpers - typeof";return F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(t)}function jt(t,e){if(t==null)return{};var n=Ke(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ke(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},H.apply(this,arguments)}function Tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function S(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Tt(Object(n),!0).forEach(function(r){E(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function z(t){return Ue(t)||Ge(t)||Ve(t)||Me()}function Me(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1
+ import{e as w,d as D,u as Jt,h as Qt,j as A,P as Z}from"./index-Ds3VfRxk.js";import{g as Zt,i as ht,G as Ct,a as lt,m as te,b as q,c as C,T as ee,s as ft,f as $,d as Pt,L as X,e as re,h as ne,D as ie,j as oe,E as ae,C as ce,A as se,k as Y,l as ue,n as yt,o as le,p as fe,q as Dt,u as pe,r as kt,t as Nt,v as Lt,w as he,x as It,y as ye,z as ve,B as de,R as me,F as be}from"./generateCategoricalChart-CCtxdbf_.js";function zt(t,e,n){if(e<1)return[];if(e===1&&n===void 0)return t;for(var r=[],i=0;i<t.length;i+=e)r.push(t[i]);return r}function ge(t,e,n){var r={width:t.width+e.width,height:t.height+e.height};return Zt(r,n)}function xe(t,e,n){var r=n==="width",i=t.x,a=t.y,o=t.width,c=t.height;return e===1?{start:r?i:a,end:r?i+o:a+c}:{start:r?i+o:a+c,end:r?i:a}}function et(t,e,n,r,i){if(t*e<t*r||t*e>t*i)return!1;var a=n();return t*(e-t*a/2-r)>=0&&t*(e+t*a/2-i)<=0}function Oe(t,e){return zt(t,e+1)}function we(t,e,n,r,i){for(var a=(r||[]).slice(),o=e.start,c=e.end,s=0,h=1,f=o,y=function(){var p=r==null?void 0:r[s];if(p===void 0)return{v:zt(r,h)};var v=s,d,g=function(){return d===void 0&&(d=n(p,v)),d},b=p.coordinate,m=s===0||et(t,b,g,f,c);m||(s=0,f=o,h+=1),m&&(f=b+t*(g()/2+i),s+=h)},l;h<=a.length;)if(l=y(),l)return l.v;return[]}function J(t){"@babel/helpers - typeof";return J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(t)}function _t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function k(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_t(Object(n),!0).forEach(function(r){Pe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Pe(t,e,n){return e=ke(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ke(t){var e=_e(t,"string");return J(e)=="symbol"?e:e+""}function _e(t,e){if(J(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(J(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Se(t,e,n,r,i){for(var a=(r||[]).slice(),o=a.length,c=e.start,s=e.end,h=function(l){var u=a[l],p,v=function(){return p===void 0&&(p=n(u,l)),p};if(l===o-1){var d=t*(u.coordinate+t*v()/2-s);a[l]=u=k(k({},u),{},{tickCoord:d>0?u.coordinate-d*t:u.coordinate})}else a[l]=u=k(k({},u),{},{tickCoord:u.coordinate});var g=et(t,u.tickCoord,v,c,s);g&&(s=u.tickCoord-t*(v()/2+i),a[l]=k(k({},u),{},{isShow:!0}))},f=o-1;f>=0;f--)h(f);return a}function Ae(t,e,n,r,i,a){var o=(r||[]).slice(),c=o.length,s=e.start,h=e.end;if(a){var f=r[c-1],y=n(f,c-1),l=t*(f.coordinate+t*y/2-h);o[c-1]=f=k(k({},f),{},{tickCoord:l>0?f.coordinate-l*t:f.coordinate});var u=et(t,f.tickCoord,function(){return y},s,h);u&&(h=f.tickCoord-t*(y/2+i),o[c-1]=k(k({},f),{},{isShow:!0}))}for(var p=a?c-1:c,v=function(b){var m=o[b],x,O=function(){return x===void 0&&(x=n(m,b)),x};if(b===0){var j=t*(m.coordinate-t*O()/2-s);o[b]=m=k(k({},m),{},{tickCoord:j<0?m.coordinate-j*t:m.coordinate})}else o[b]=m=k(k({},m),{},{tickCoord:m.coordinate});var T=et(t,m.tickCoord,O,s,h);T&&(s=m.tickCoord+t*(O()/2+i),o[b]=k(k({},m),{},{isShow:!0}))},d=0;d<p;d++)v(d);return o}function je(t,e,n){var r=t.tick,i=t.ticks,a=t.viewBox,o=t.minTickGap,c=t.orientation,s=t.interval,h=t.tickFormatter,f=t.unit,y=t.angle;if(!i||!i.length||!r)return[];if(ht(s)||Ct.isSsr)return Oe(i,typeof s=="number"&&ht(s)?s:0);var l=[],u=c==="top"||c==="bottom"?"width":"height",p=f&&u==="width"?lt(f,{fontSize:e,letterSpacing:n}):{width:0,height:0},v=function(m,x){var O=q(h)?h(m.value,x):m.value;return u==="width"?ge(lt(O,{fontSize:e,letterSpacing:n}),p,y):lt(O,{fontSize:e,letterSpacing:n})[u]},d=i.length>=2?te(i[1].coordinate-i[0].coordinate):1,g=xe(a,d,u);return s==="equidistantPreserveStart"?we(d,g,v,i,o):(s==="preserveStart"||s==="preserveStartEnd"?l=Ae(d,g,v,i,o,s==="preserveStartEnd"):l=Se(d,g,v,i,o),l.filter(function(b){return b.isShow}))}var Te=["viewBox"],Ee=["viewBox"],$e=["ticks"];function B(t){"@babel/helpers - typeof";return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(t)}function R(){return R=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},R.apply(this,arguments)}function St(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function P(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?St(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function pt(t,e){if(t==null)return{};var n=Ce(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ce(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function De(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function At(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Bt(r.key),r)}}function Ne(t,e,n){return e&&At(t.prototype,e),n&&At(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Le(t,e,n){return e=rt(e),Ie(t,Rt()?Reflect.construct(e,n||[],rt(t).constructor):e.apply(t,n))}function Ie(t,e){if(e&&(B(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ze(t)}function ze(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rt=function(){return!!t})()}function rt(t){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rt(t)}function Re(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vt(t,e)}function vt(t,e){return vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vt(t,e)}function wt(t,e,n){return e=Bt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bt(t){var e=Be(t,"string");return B(e)=="symbol"?e:e+""}function Be(t,e){if(B(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(B(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var at=(function(t){function e(n){var r;return De(this,e),r=Le(this,e,[n]),r.state={fontSize:"",letterSpacing:""},r}return Re(e,t),Ne(e,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=pt(r,Te),c=this.props,s=c.viewBox,h=pt(c,Ee);return!ft(a,s)||!ft(o,h)||!ft(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,c=i.width,s=i.height,h=i.orientation,f=i.tickSize,y=i.mirror,l=i.tickMargin,u,p,v,d,g,b,m=y?-1:1,x=r.tickSize||f,O=ht(r.tickCoord)?r.tickCoord:r.coordinate;switch(h){case"top":u=p=r.coordinate,d=o+ +!y*s,v=d-m*x,b=v-m*l,g=O;break;case"left":v=d=r.coordinate,p=a+ +!y*c,u=p-m*x,g=u-m*l,b=O;break;case"right":v=d=r.coordinate,p=a+ +y*c,u=p+m*x,g=u+m*l,b=O;break;default:u=p=r.coordinate,d=o+ +y*s,v=d+m*x,b=v+m*l,g=O;break}return{line:{x1:u,y1:v,x2:p,y2:d},tick:{x:g,y:b}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,c=r.height,s=r.orientation,h=r.mirror,f=r.axisLine,y=P(P(P({},$(this.props,!1)),$(f,!1)),{},{fill:"none"});if(s==="top"||s==="bottom"){var l=+(s==="top"&&!h||s==="bottom"&&h);y=P(P({},y),{},{x1:i,y1:a+l*c,x2:i+o,y2:a+l*c})}else{var u=+(s==="left"&&!h||s==="right"&&h);y=P(P({},y),{},{x1:i+u*o,y1:a,x2:i+u*o,y2:a+c})}return w.createElement("line",R({},y,{className:C("recharts-cartesian-axis-line",Pt(f,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,c=this.props,s=c.tickLine,h=c.stroke,f=c.tick,y=c.tickFormatter,l=c.unit,u=je(P(P({},this.props),{},{ticks:r}),i,a),p=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),d=$(this.props,!1),g=$(f,!1),b=P(P({},d),{},{fill:"none"},$(s,!1)),m=u.map(function(x,O){var j=o.getTickLineCoord(x),T=j.line,N=j.tick,L=P(P(P(P({textAnchor:p,verticalAnchor:v},d),{},{stroke:"none",fill:h},g),N),{},{index:O,payload:x,visibleTicksCount:u.length,tickFormatter:y});return w.createElement(X,R({className:"recharts-cartesian-axis-tick",key:"tick-".concat(x.value,"-").concat(x.coordinate,"-").concat(x.tickCoord)},re(o.props,x,O)),s&&w.createElement("line",R({},b,T,{className:C("recharts-cartesian-axis-tick-line",Pt(s,"className"))})),f&&e.renderTickItem(f,L,"".concat(q(y)?y(x.value,O):x.value).concat(l||"")))});return w.createElement("g",{className:"recharts-cartesian-axis-ticks"},m)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,c=i.height,s=i.ticksGenerator,h=i.className,f=i.hide;if(f)return null;var y=this.props,l=y.ticks,u=pt(y,$e),p=l;return q(s)&&(p=l&&l.length>0?s(this.props):s(u)),o<=0||c<=0||!p||!p.length?null:w.createElement(X,{className:C("recharts-cartesian-axis",h),ref:function(d){r.layerReference=d}},a&&this.renderAxisLine(),this.renderTicks(p,this.state.fontSize,this.state.letterSpacing),ne.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,c=C(i.className,"recharts-cartesian-axis-tick-value");return w.isValidElement(r)?o=w.cloneElement(r,P(P({},i),{},{className:c})):q(r)?o=r(P(P({},i),{},{className:c})):o=w.createElement(ee,R({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(D.Component);wt(at,"displayName","CartesianAxis");wt(at,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Fe=["type","layout","connectNulls","ref"],We=["key"];function F(t){"@babel/helpers - typeof";return F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(t)}function jt(t,e){if(t==null)return{};var n=Ke(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ke(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},H.apply(this,arguments)}function Tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function S(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Tt(Object(n),!0).forEach(function(r){E(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function z(t){return Ue(t)||Ge(t)||Ve(t)||Me()}function Me(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ve(t,e){if(t){if(typeof t=="string")return dt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dt(t,e)}}function Ge(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ue(t){if(Array.isArray(t))return dt(t)}function dt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ye(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Wt(r.key),r)}}function qe(t,e,n){return e&&Et(t.prototype,e),n&&Et(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Xe(t,e,n){return e=nt(e),He(t,Ft()?Reflect.construct(e,n||[],nt(t).constructor):e.apply(t,n))}function He(t,e){if(e&&(F(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Je(t)}function Je(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ft(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ft=function(){return!!t})()}function nt(t){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nt(t)}function Qe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mt(t,e)}function mt(t,e){return mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mt(t,e)}function E(t,e,n){return e=Wt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wt(t){var e=Ze(t,"string");return F(e)=="symbol"?e:e+""}function Ze(t,e){if(F(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(F(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var W=(function(t){function e(){var n;Ye(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Xe(this,e,[].concat(i)),E(n,"state",{isAnimationFinished:!0,totalLength:0}),E(n,"generateSimpleStrokeDasharray",function(o,c){return"".concat(c,"px ").concat(o-c,"px")}),E(n,"getStrokeDasharray",function(o,c,s){var h=s.reduce(function(g,b){return g+b});if(!h)return n.generateSimpleStrokeDasharray(c,o);for(var f=Math.floor(o/h),y=o%h,l=c-o,u=[],p=0,v=0;p<s.length;v+=s[p],++p)if(v+s[p]>y){u=[].concat(z(s.slice(0,p)),[y-v]);break}var d=u.length%2===0?[0,l]:[l];return[].concat(z(e.repeat(s,f)),z(u),d).map(function(g){return"".concat(g,"px")}).join(", ")}),E(n,"id",pe("recharts-line-")),E(n,"pathRef",function(o){n.mainCurve=o}),E(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),E(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Qe(e,t),qe(e,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,c=a.xAxis,s=a.yAxis,h=a.layout,f=a.children,y=oe(f,ae);if(!y)return null;var l=function(v,d){return{x:v.x,y:v.y,value:v.value,errorVal:Dt(v.payload,d)}},u={clipPath:r?"url(#clipPath-".concat(i,")"):null};return w.createElement(X,u,y.map(function(p){return w.cloneElement(p,{key:"bar-".concat(p.props.dataKey),data:o,xAxis:c,yAxis:s,layout:h,dataPointFormatter:l})}))}},{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var c=this.props,s=c.dot,h=c.points,f=c.dataKey,y=$(this.props,!1),l=$(s,!0),u=h.map(function(v,d){var g=S(S(S({key:"dot-".concat(d),r:3},y),l),{},{index:d,cx:v.x,cy:v.y,value:v.value,dataKey:f,payload:v.payload,points:h});return e.renderDotItem(s,g)}),p={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return w.createElement(X,H({className:"recharts-line-dots",key:"dots"},p),u)}},{key:"renderCurveStatically",value:function(r,i,a,o){var c=this.props,s=c.type,h=c.layout,f=c.connectNulls;c.ref;var y=jt(c,Fe),l=S(S(S({},$(y,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:r},o),{},{type:s,layout:h,connectNulls:f});return w.createElement(ce,H({},l,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var a=this,o=this.props,c=o.points,s=o.strokeDasharray,h=o.isAnimationActive,f=o.animationBegin,y=o.animationDuration,l=o.animationEasing,u=o.animationId,p=o.animateNewValues,v=o.width,d=o.height,g=this.state,b=g.prevPoints,m=g.totalLength;return w.createElement(se,{begin:f,duration:y,isActive:h,easing:l,from:{t:0},to:{t:1},key:"line-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var O=x.t;if(b){var j=b.length/c.length,T=c.map(function(_,ut){var G=Math.floor(ut*j);if(b[G]){var U=b[G],I=Y(U.x,_.x),qt=Y(U.y,_.y);return S(S({},_),{},{x:I(O),y:qt(O)})}if(p){var Xt=Y(v*2,_.x),Ht=Y(d/2,_.y);return S(S({},_),{},{x:Xt(O),y:Ht(O)})}return S(S({},_),{},{x:_.x,y:_.y})});return a.renderCurveStatically(T,r,i)}var N=Y(0,m),L=N(O),V;if(s){var Q="".concat(s).split(/[,\s]+/gim).map(function(_){return parseFloat(_)});V=a.getStrokeDasharray(L,m,Q)}else V=a.generateSimpleStrokeDasharray(m,L);return a.renderCurveStatically(c,r,i,{strokeDasharray:V})})}},{key:"renderCurve",value:function(r,i){var a=this.props,o=a.points,c=a.isAnimationActive,s=this.state,h=s.prevPoints,f=s.totalLength;return c&&o&&o.length&&(!h&&f>0||!ue(h,o))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(o,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,c=i.points,s=i.className,h=i.xAxis,f=i.yAxis,y=i.top,l=i.left,u=i.width,p=i.height,v=i.isAnimationActive,d=i.id;if(a||!c||!c.length)return null;var g=this.state.isAnimationFinished,b=c.length===1,m=C("recharts-line",s),x=h&&h.allowDataOverflow,O=f&&f.allowDataOverflow,j=x||O,T=yt(d)?this.id:d,N=(r=$(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},L=N.r,V=L===void 0?3:L,Q=N.strokeWidth,_=Q===void 0?2:Q,ut=le(o)?o:{},G=ut.clipDot,U=G===void 0?!0:G,I=V*2+_;return w.createElement(X,{className:m},x||O?w.createElement("defs",null,w.createElement("clipPath",{id:"clipPath-".concat(T)},w.createElement("rect",{x:x?l:l-u/2,y:O?y:y-p/2,width:x?u:u*2,height:O?p:p*2})),!U&&w.createElement("clipPath",{id:"clipPath-dots-".concat(T)},w.createElement("rect",{x:l-I/2,y:y-I/2,width:u+I,height:p+I}))):null,!b&&this.renderCurve(j,T),this.renderErrorBar(j,T),(b||o)&&this.renderDots(j,U,T),(!v||g)&&fe.renderCallByParent(this.props,c))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var a=r.length%2!==0?[].concat(z(r),[0]):r,o=[],c=0;c<i;++c)o=[].concat(z(o),z(a));return o}},{key:"renderDotItem",value:function(r,i){var a;if(w.isValidElement(r))a=w.cloneElement(r,i);else if(q(r))a=r(i);else{var o=i.key,c=jt(i,We),s=C("recharts-line-dot",typeof r!="boolean"?r.className:"");a=w.createElement(ie,H({key:o},c,{className:s}))}return a}}])})(D.PureComponent);E(W,"displayName","Line");E(W,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ct.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});E(W,"getComposedData",function(t){var e=t.props,n=t.xAxis,r=t.yAxis,i=t.xAxisTicks,a=t.yAxisTicks,o=t.dataKey,c=t.bandSize,s=t.displayedData,h=t.offset,f=e.layout,y=s.map(function(l,u){var p=Dt(l,o);return f==="horizontal"?{x:kt({axis:n,ticks:i,bandSize:c,entry:l,index:u}),y:yt(p)?null:r.scale(p),value:p,payload:l}:{x:yt(p)?null:n.scale(p),y:kt({axis:r,ticks:a,bandSize:c,entry:l,index:u}),value:p,payload:l}});return S({points:y,layout:f},h)});function K(t){"@babel/helpers - typeof";return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K(t)}function tr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function er(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Vt(r.key),r)}}function rr(t,e,n){return e&&er(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function nr(t,e,n){return e=it(e),ir(t,Kt()?Reflect.construct(e,n||[],it(t).constructor):e.apply(t,n))}function ir(t,e){if(e&&(K(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return or(t)}function or(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kt=function(){return!!t})()}function it(t){return it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},it(t)}function ar(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bt(t,e)}function bt(t,e){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},bt(t,e)}function Mt(t,e,n){return e=Vt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vt(t){var e=cr(t,"string");return K(e)=="symbol"?e:e+""}function cr(t,e){if(K(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(K(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function gt(){return gt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},gt.apply(this,arguments)}function sr(t){var e=t.xAxisId,n=Nt(),r=Lt(),i=he(e);return i==null?null:D.createElement(at,gt({},i,{className:C("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return It(o,!0)}}))}var ct=(function(t){function e(){return tr(this,e),nr(this,e,arguments)}return ar(e,t),rr(e,[{key:"render",value:function(){return D.createElement(sr,this.props)}}])})(D.Component);Mt(ct,"displayName","XAxis");Mt(ct,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function M(t){"@babel/helpers - typeof";return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(t)}function ur(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Yt(r.key),r)}}function fr(t,e,n){return e&&lr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function pr(t,e,n){return e=ot(e),hr(t,Gt()?Reflect.construct(e,n||[],ot(t).constructor):e.apply(t,n))}function hr(t,e){if(e&&(M(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yr(t)}function yr(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gt=function(){return!!t})()}function ot(t){return ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ot(t)}function vr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xt(t,e)}function xt(t,e){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},xt(t,e)}function Ut(t,e,n){return e=Yt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yt(t){var e=dr(t,"string");return M(e)=="symbol"?e:e+""}function dr(t,e){if(M(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(M(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Ot(){return Ot=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ot.apply(this,arguments)}var mr=function(e){var n=e.yAxisId,r=Nt(),i=Lt(),a=ye(n);return a==null?null:D.createElement(at,Ot({},a,{className:C("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(c){return It(c,!0)}}))},st=(function(t){function e(){return ur(this,e),pr(this,e,arguments)}return vr(e,t),fr(e,[{key:"render",value:function(){return D.createElement(mr,this.props)}}])})(D.Component);Ut(st,"displayName","YAxis");Ut(st,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var br=ve({chartName:"LineChart",GraphicalChild:W,axisComponents:[{axisType:"xAxis",AxisComp:ct},{axisType:"yAxis",AxisComp:st}],formatAxisMap:de});function $t(t){const e=new Date(t);return`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}function tt(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function wr(){const{t}=Jt("panels"),e=Qt(i=>i.tokenHistory);if(e.length<2)return A.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-gray-500 dark:text-gray-400",children:t("common:empty.waitingUsageData")});const n=gr(e,5),r=e.map(i=>{const a={timestamp:i.timestamp,time:$t(i.timestamp),total:i.total};for(const o of n)a[o]=i.byAgent[o]??0;return a});return A.jsx(me,{width:"100%",height:200,children:A.jsxs(br,{data:r,margin:{top:5,right:5,left:0,bottom:0},children:[A.jsx(ct,{dataKey:"time",tick:{fontSize:10}}),A.jsx(st,{tick:{fontSize:10},tickFormatter:tt}),A.jsx(be,{formatter:i=>tt(i),labelFormatter:(i,a)=>{var c;const o=(c=a[0])==null?void 0:c.payload;return o?$t(o.timestamp):""},content:({active:i,payload:a,label:o})=>{var f;if(!i||!(a!=null&&a.length))return null;const c=(f=a[0])==null?void 0:f.payload;if(!c)return null;const s=c.total,h=[A.jsxs("div",{children:[t("tokenChart.total")," ",tt(s)]},"total"),...n.map((y,l)=>{const u=c[y]??0;return A.jsxs("div",{style:{color:Z[l%Z.length]},children:[y,": ",tt(u)]},y)})];return A.jsxs("div",{className:"rounded border border-gray-200 bg-white px-2 py-1 text-xs shadow dark:border-gray-700 dark:bg-gray-900",children:[A.jsx("div",{className:"font-medium text-gray-700 dark:text-gray-300",children:o}),h]})}}),A.jsx(W,{type:"monotone",dataKey:"total",stroke:"#3b82f6",strokeWidth:2,dot:!1,name:t("tokenChart.totalLine")}),n.map((i,a)=>A.jsx(W,{type:"monotone",dataKey:i,stroke:Z[a%Z.length],strokeWidth:1,strokeDasharray:"4 2",dot:!1,name:i},i))]})})}function gr(t,e){const n={};for(const r of t)for(const[i,a]of Object.entries(r.byAgent))n[i]=(n[i]??0)+a;return Object.entries(n).toSorted(([,r],[,i])=>i-r).slice(0,e).map(([r])=>r)}export{wr as TokenLineChart};
@@ -1,4 +1,4 @@
1
- import{l as Cn,g as ce,d as k,e as E}from"./index-WMjJihFL.js";function om(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=om(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ue(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=om(e))&&(n&&(n+=" "),n+=t);return n}var ya,jf;function Ce(){if(jf)return ya;jf=1;var e=Array.isArray;return ya=e,ya}var ga,Cf;function um(){if(Cf)return ga;Cf=1;var e=typeof Cn=="object"&&Cn&&Cn.Object===Object&&Cn;return ga=e,ga}var ma,If;function tt(){if(If)return ma;If=1;var e=um(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ma=r,ma}var ba,$f;function _n(){if($f)return ba;$f=1;var e=tt(),t=e.Symbol;return ba=t,ba}var xa,Rf;function rx(){if(Rf)return xa;Rf=1;var e=_n(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var u=r.call(o,i),s=o[i];try{o[i]=void 0;var c=!0}catch{}var f=n.call(o);return c&&(u?o[i]=s:delete o[i]),f}return xa=a,xa}var wa,Df;function nx(){if(Df)return wa;Df=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return wa=r,wa}var _a,Nf;function ht(){if(Nf)return _a;Nf=1;var e=_n(),t=rx(),r=nx(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?i:n:a&&a in Object(u)?t(u):r(u)}return _a=o,_a}var Oa,qf;function pt(){if(qf)return Oa;qf=1;function e(t){return t!=null&&typeof t=="object"}return Oa=e,Oa}var Sa,kf;function br(){if(kf)return Sa;kf=1;var e=ht(),t=pt(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return Sa=n,Sa}var Aa,Bf;function Ml(){if(Bf)return Aa;Bf=1;var e=Ce(),t=br(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return Aa=i,Aa}var Pa,Lf;function xt(){if(Lf)return Pa;Lf=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Pa=e,Pa}var Ta,Ff;function jl(){if(Ff)return Ta;Ff=1;var e=ht(),t=xt(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(u){if(!t(u))return!1;var s=e(u);return s==n||s==i||s==r||s==a}return Ta=o,Ta}var Ea,Uf;function ix(){if(Uf)return Ea;Uf=1;var e=tt(),t=e["__core-js_shared__"];return Ea=t,Ea}var Ma,Wf;function ax(){if(Wf)return Ma;Wf=1;var e=ix(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return Ma=r,Ma}var ja,Hf;function sm(){if(Hf)return ja;Hf=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return ja=r,ja}var Ca,zf;function ox(){if(zf)return Ca;zf=1;var e=jl(),t=ax(),r=xt(),n=sm(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,s=o.toString,c=u.hasOwnProperty,f=RegExp("^"+s.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(h){if(!r(h)||t(h))return!1;var d=e(h)?f:a;return d.test(n(h))}return Ca=l,Ca}var Ia,Gf;function ux(){if(Gf)return Ia;Gf=1;function e(t,r){return t==null?void 0:t[r]}return Ia=e,Ia}var $a,Kf;function Ft(){if(Kf)return $a;Kf=1;var e=ox(),t=ux();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return $a=r,$a}var Ra,Xf;function Ni(){if(Xf)return Ra;Xf=1;var e=Ft(),t=e(Object,"create");return Ra=t,Ra}var Da,Vf;function sx(){if(Vf)return Da;Vf=1;var e=Ni();function t(){this.__data__=e?e(null):{},this.size=0}return Da=t,Da}var Na,Yf;function cx(){if(Yf)return Na;Yf=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Na=e,Na}var qa,Zf;function lx(){if(Zf)return qa;Zf=1;var e=Ni(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var u=o[a];return u===t?void 0:u}return n.call(o,a)?o[a]:void 0}return qa=i,qa}var ka,Jf;function fx(){if(Jf)return ka;Jf=1;var e=Ni(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return ka=n,ka}var Ba,Qf;function hx(){if(Qf)return Ba;Qf=1;var e=Ni(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return Ba=r,Ba}var La,eh;function px(){if(eh)return La;eh=1;var e=sx(),t=cx(),r=lx(),n=fx(),i=hx();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,La=a,La}var Fa,th;function dx(){if(th)return Fa;th=1;function e(){this.__data__=[],this.size=0}return Fa=e,Fa}var Ua,rh;function Cl(){if(rh)return Ua;rh=1;function e(t,r){return t===r||t!==t&&r!==r}return Ua=e,Ua}var Wa,nh;function qi(){if(nh)return Wa;nh=1;var e=Cl();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Wa=t,Wa}var Ha,ih;function vx(){if(ih)return Ha;ih=1;var e=qi(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var u=a.length-1;return o==u?a.pop():r.call(a,o,1),--this.size,!0}return Ha=n,Ha}var za,ah;function yx(){if(ah)return za;ah=1;var e=qi();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return za=t,za}var Ga,oh;function gx(){if(oh)return Ga;oh=1;var e=qi();function t(r){return e(this.__data__,r)>-1}return Ga=t,Ga}var Ka,uh;function mx(){if(uh)return Ka;uh=1;var e=qi();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Ka=t,Ka}var Xa,sh;function ki(){if(sh)return Xa;sh=1;var e=dx(),t=vx(),r=yx(),n=gx(),i=mx();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Xa=a,Xa}var Va,ch;function Il(){if(ch)return Va;ch=1;var e=Ft(),t=tt(),r=e(t,"Map");return Va=r,Va}var Ya,lh;function bx(){if(lh)return Ya;lh=1;var e=px(),t=ki(),r=Il();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Ya=n,Ya}var Za,fh;function xx(){if(fh)return Za;fh=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Za=e,Za}var Ja,hh;function Bi(){if(hh)return Ja;hh=1;var e=xx();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Ja=t,Ja}var Qa,ph;function wx(){if(ph)return Qa;ph=1;var e=Bi();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Qa=t,Qa}var eo,dh;function _x(){if(dh)return eo;dh=1;var e=Bi();function t(r){return e(this,r).get(r)}return eo=t,eo}var to,vh;function Ox(){if(vh)return to;vh=1;var e=Bi();function t(r){return e(this,r).has(r)}return to=t,to}var ro,yh;function Sx(){if(yh)return ro;yh=1;var e=Bi();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return ro=t,ro}var no,gh;function $l(){if(gh)return no;gh=1;var e=bx(),t=wx(),r=_x(),n=Ox(),i=Sx();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,no=a,no}var io,mh;function cm(){if(mh)return io;mh=1;var e=$l(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,u=i?i.apply(this,o):o[0],s=a.cache;if(s.has(u))return s.get(u);var c=n.apply(this,o);return a.cache=s.set(u,c)||s,c};return a.cache=new(r.Cache||e),a}return r.Cache=e,io=r,io}var ao,bh;function Ax(){if(bh)return ao;bh=1;var e=cm(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return ao=r,ao}var oo,xh;function Px(){if(xh)return oo;xh=1;var e=Ax(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,u,s,c){a.push(s?c.replace(r,"$1"):u||o)}),a});return oo=n,oo}var uo,wh;function Rl(){if(wh)return uo;wh=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=r(t[n],n,t);return a}return uo=e,uo}var so,_h;function Tx(){if(_h)return so;_h=1;var e=_n(),t=Rl(),r=Ce(),n=br(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(u){if(typeof u=="string")return u;if(r(u))return t(u,o)+"";if(n(u))return a?a.call(u):"";var s=u+"";return s=="0"&&1/u==-1/0?"-0":s}return so=o,so}var co,Oh;function lm(){if(Oh)return co;Oh=1;var e=Tx();function t(r){return r==null?"":e(r)}return co=t,co}var lo,Sh;function fm(){if(Sh)return lo;Sh=1;var e=Ce(),t=Ml(),r=Px(),n=lm();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return lo=i,lo}var fo,Ah;function Li(){if(Ah)return fo;Ah=1;var e=br();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return fo=t,fo}var ho,Ph;function Dl(){if(Ph)return ho;Ph=1;var e=fm(),t=Li();function r(n,i){i=e(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[t(i[a++])];return a&&a==o?n:void 0}return ho=r,ho}var po,Th;function hm(){if(Th)return po;Th=1;var e=Dl();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return po=t,po}var Ex=hm();const Ze=ce(Ex);var vo,Eh;function Mx(){if(Eh)return vo;Eh=1;function e(t){return t==null}return vo=e,vo}var jx=Mx();const Y=ce(jx);var yo,Mh;function Cx(){if(Mh)return yo;Mh=1;var e=ht(),t=Ce(),r=pt(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return yo=i,yo}var Ix=Cx();const kt=ce(Ix);var $x=jl();const J=ce($x);var Rx=xt();const xr=ce(Rx);var go={exports:{}},ee={};/**
1
+ import{l as Cn,g as ce,d as k,e as E}from"./index-Ds3VfRxk.js";function om(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=om(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ue(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=om(e))&&(n&&(n+=" "),n+=t);return n}var ya,jf;function Ce(){if(jf)return ya;jf=1;var e=Array.isArray;return ya=e,ya}var ga,Cf;function um(){if(Cf)return ga;Cf=1;var e=typeof Cn=="object"&&Cn&&Cn.Object===Object&&Cn;return ga=e,ga}var ma,If;function tt(){if(If)return ma;If=1;var e=um(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ma=r,ma}var ba,$f;function _n(){if($f)return ba;$f=1;var e=tt(),t=e.Symbol;return ba=t,ba}var xa,Rf;function rx(){if(Rf)return xa;Rf=1;var e=_n(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var u=r.call(o,i),s=o[i];try{o[i]=void 0;var c=!0}catch{}var f=n.call(o);return c&&(u?o[i]=s:delete o[i]),f}return xa=a,xa}var wa,Df;function nx(){if(Df)return wa;Df=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return wa=r,wa}var _a,Nf;function ht(){if(Nf)return _a;Nf=1;var e=_n(),t=rx(),r=nx(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?i:n:a&&a in Object(u)?t(u):r(u)}return _a=o,_a}var Oa,qf;function pt(){if(qf)return Oa;qf=1;function e(t){return t!=null&&typeof t=="object"}return Oa=e,Oa}var Sa,kf;function br(){if(kf)return Sa;kf=1;var e=ht(),t=pt(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return Sa=n,Sa}var Aa,Bf;function Ml(){if(Bf)return Aa;Bf=1;var e=Ce(),t=br(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return Aa=i,Aa}var Pa,Lf;function xt(){if(Lf)return Pa;Lf=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Pa=e,Pa}var Ta,Ff;function jl(){if(Ff)return Ta;Ff=1;var e=ht(),t=xt(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(u){if(!t(u))return!1;var s=e(u);return s==n||s==i||s==r||s==a}return Ta=o,Ta}var Ea,Uf;function ix(){if(Uf)return Ea;Uf=1;var e=tt(),t=e["__core-js_shared__"];return Ea=t,Ea}var Ma,Wf;function ax(){if(Wf)return Ma;Wf=1;var e=ix(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return Ma=r,Ma}var ja,Hf;function sm(){if(Hf)return ja;Hf=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return ja=r,ja}var Ca,zf;function ox(){if(zf)return Ca;zf=1;var e=jl(),t=ax(),r=xt(),n=sm(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,s=o.toString,c=u.hasOwnProperty,f=RegExp("^"+s.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(h){if(!r(h)||t(h))return!1;var d=e(h)?f:a;return d.test(n(h))}return Ca=l,Ca}var Ia,Gf;function ux(){if(Gf)return Ia;Gf=1;function e(t,r){return t==null?void 0:t[r]}return Ia=e,Ia}var $a,Kf;function Ft(){if(Kf)return $a;Kf=1;var e=ox(),t=ux();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return $a=r,$a}var Ra,Xf;function Ni(){if(Xf)return Ra;Xf=1;var e=Ft(),t=e(Object,"create");return Ra=t,Ra}var Da,Vf;function sx(){if(Vf)return Da;Vf=1;var e=Ni();function t(){this.__data__=e?e(null):{},this.size=0}return Da=t,Da}var Na,Yf;function cx(){if(Yf)return Na;Yf=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Na=e,Na}var qa,Zf;function lx(){if(Zf)return qa;Zf=1;var e=Ni(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var u=o[a];return u===t?void 0:u}return n.call(o,a)?o[a]:void 0}return qa=i,qa}var ka,Jf;function fx(){if(Jf)return ka;Jf=1;var e=Ni(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return ka=n,ka}var Ba,Qf;function hx(){if(Qf)return Ba;Qf=1;var e=Ni(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return Ba=r,Ba}var La,eh;function px(){if(eh)return La;eh=1;var e=sx(),t=cx(),r=lx(),n=fx(),i=hx();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,La=a,La}var Fa,th;function dx(){if(th)return Fa;th=1;function e(){this.__data__=[],this.size=0}return Fa=e,Fa}var Ua,rh;function Cl(){if(rh)return Ua;rh=1;function e(t,r){return t===r||t!==t&&r!==r}return Ua=e,Ua}var Wa,nh;function qi(){if(nh)return Wa;nh=1;var e=Cl();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Wa=t,Wa}var Ha,ih;function vx(){if(ih)return Ha;ih=1;var e=qi(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var u=a.length-1;return o==u?a.pop():r.call(a,o,1),--this.size,!0}return Ha=n,Ha}var za,ah;function yx(){if(ah)return za;ah=1;var e=qi();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return za=t,za}var Ga,oh;function gx(){if(oh)return Ga;oh=1;var e=qi();function t(r){return e(this.__data__,r)>-1}return Ga=t,Ga}var Ka,uh;function mx(){if(uh)return Ka;uh=1;var e=qi();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Ka=t,Ka}var Xa,sh;function ki(){if(sh)return Xa;sh=1;var e=dx(),t=vx(),r=yx(),n=gx(),i=mx();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Xa=a,Xa}var Va,ch;function Il(){if(ch)return Va;ch=1;var e=Ft(),t=tt(),r=e(t,"Map");return Va=r,Va}var Ya,lh;function bx(){if(lh)return Ya;lh=1;var e=px(),t=ki(),r=Il();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Ya=n,Ya}var Za,fh;function xx(){if(fh)return Za;fh=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Za=e,Za}var Ja,hh;function Bi(){if(hh)return Ja;hh=1;var e=xx();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Ja=t,Ja}var Qa,ph;function wx(){if(ph)return Qa;ph=1;var e=Bi();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Qa=t,Qa}var eo,dh;function _x(){if(dh)return eo;dh=1;var e=Bi();function t(r){return e(this,r).get(r)}return eo=t,eo}var to,vh;function Ox(){if(vh)return to;vh=1;var e=Bi();function t(r){return e(this,r).has(r)}return to=t,to}var ro,yh;function Sx(){if(yh)return ro;yh=1;var e=Bi();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return ro=t,ro}var no,gh;function $l(){if(gh)return no;gh=1;var e=bx(),t=wx(),r=_x(),n=Ox(),i=Sx();function a(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,no=a,no}var io,mh;function cm(){if(mh)return io;mh=1;var e=$l(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,u=i?i.apply(this,o):o[0],s=a.cache;if(s.has(u))return s.get(u);var c=n.apply(this,o);return a.cache=s.set(u,c)||s,c};return a.cache=new(r.Cache||e),a}return r.Cache=e,io=r,io}var ao,bh;function Ax(){if(bh)return ao;bh=1;var e=cm(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return ao=r,ao}var oo,xh;function Px(){if(xh)return oo;xh=1;var e=Ax(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,u,s,c){a.push(s?c.replace(r,"$1"):u||o)}),a});return oo=n,oo}var uo,wh;function Rl(){if(wh)return uo;wh=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=r(t[n],n,t);return a}return uo=e,uo}var so,_h;function Tx(){if(_h)return so;_h=1;var e=_n(),t=Rl(),r=Ce(),n=br(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(u){if(typeof u=="string")return u;if(r(u))return t(u,o)+"";if(n(u))return a?a.call(u):"";var s=u+"";return s=="0"&&1/u==-1/0?"-0":s}return so=o,so}var co,Oh;function lm(){if(Oh)return co;Oh=1;var e=Tx();function t(r){return r==null?"":e(r)}return co=t,co}var lo,Sh;function fm(){if(Sh)return lo;Sh=1;var e=Ce(),t=Ml(),r=Px(),n=lm();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return lo=i,lo}var fo,Ah;function Li(){if(Ah)return fo;Ah=1;var e=br();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return fo=t,fo}var ho,Ph;function Dl(){if(Ph)return ho;Ph=1;var e=fm(),t=Li();function r(n,i){i=e(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[t(i[a++])];return a&&a==o?n:void 0}return ho=r,ho}var po,Th;function hm(){if(Th)return po;Th=1;var e=Dl();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return po=t,po}var Ex=hm();const Ze=ce(Ex);var vo,Eh;function Mx(){if(Eh)return vo;Eh=1;function e(t){return t==null}return vo=e,vo}var jx=Mx();const Y=ce(jx);var yo,Mh;function Cx(){if(Mh)return yo;Mh=1;var e=ht(),t=Ce(),r=pt(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return yo=i,yo}var Ix=Cx();const kt=ce(Ix);var $x=jl();const J=ce($x);var Rx=xt();const xr=ce(Rx);var go={exports:{}},ee={};/**
2
2
  * @license React
3
3
  * react-is.production.min.js
4
4
  *