@dudousxd/nestjs-agent-dashboard 0.15.1 → 0.15.2
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.
- package/dist/server/index.cjs +96 -28
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +96 -28
- package/dist/server/index.js.map +1 -1
- package/dist/spa/assets/base-ui-CeQ9JhU_.js +41 -0
- package/dist/spa/assets/{index-Cchd2o0X.js → index-CTK2sMGd.js} +1 -1
- package/dist/spa/assets/index-Cto4iy07.js +1 -0
- package/dist/spa/assets/{preview-CYbdGs3V.js → preview-DD7Ge-bU.js} +1 -1
- package/dist/spa/assets/{recharts-DPC0gOrj.js → recharts-DSmxPXW6.js} +1 -1
- package/dist/spa/index.html +4 -4
- package/dist/spa/preview.html +4 -4
- package/package.json +9 -9
- package/dist/spa/assets/base-ui-Bj5tb_Ph.js +0 -55
- package/dist/spa/assets/index-DAU1txqd.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var zt=t=>{throw TypeError(t)};var gt=(t,e,s)=>e.has(t)||zt("Cannot "+s);var n=(t,e,s)=>(gt(t,e,"read from private field"),s?s.call(t):e.get(t)),d=(t,e,s)=>e.has(t)?zt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),c=(t,e,s,r)=>(gt(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),y=(t,e,s)=>(gt(t,e,"access private method"),s);var ut=(t,e,s,r)=>({set _(i){c(t,e,i,s)},get _(){return n(t,e,r)}});import{u as Cs,A as Ys,D as Zs,R as Xs,T as er,C as tr,E as sr,I as rr,a as nr,M as ir,S as ar,P as or,b as ur,c as cr,d as lr,e as hr,f as dr,p as fr,g as pr,h as yr,U as mr,W as Vt,i as vr,j as gr,k as br,l as Sr,m as wr,B as Ps,n as Cr,o as Pr,L as xr,q as Rr,r as Or,s as Tr,t as Er,v as jr}from"./index-CTK2sMGd.js";import{r as b,j as l,P as Dr,b as Fr,d as Qr,e as Ir,f as Mr}from"./base-ui-CeQ9JhU_.js";import"./recharts-DSmxPXW6.js";const xs=b.createContext(void 0),ot=t=>{const e=b.useContext(xs);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Ar=({client:t,children:e})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),l.jsx(xs.Provider,{value:t,children:e})),qr={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)};var ce,Nt,ls,kr=(ls=class{constructor(){d(this,ce,qr);d(this,Nt,!1)}setTimeoutProvider(t){c(this,ce,t)}setTimeout(t,e){return n(this,ce).setTimeout(t,e)}clearTimeout(t){n(this,ce).clearTimeout(t)}setInterval(t,e){return n(this,ce).setInterval(t,e)}clearInterval(t){n(this,ce).clearInterval(t)}},ce=new WeakMap,Nt=new WeakMap,ls);const be=new kr;function Nr(t){setTimeout(t,0)}const Ur=typeof window>"u"||"Deno"in globalThis;function U(){}function Lr(t,e){return typeof t=="function"?t(e):t}function Rs(t){return typeof t=="number"&&t>=0&&t!==1/0}function Os(t,e){return Math.max(t+(e||0)-Date.now(),0)}function F(t,e){return typeof t=="function"?t(e):t}function Jt(t,e){const{type:s="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:u}=t;if(o){if(r){if(e.queryHash!==Ut(o,e.options))return!1}else if(!ze(e.queryKey,o))return!1}if(s!=="all"){const h=e.isActive();if(s==="active"&&!h||s==="inactive"&&h)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||i&&i!==e.state.fetchStatus||a&&!a(e))}function Yt(t,e){const{exact:s,status:r,predicate:i,mutationKey:a}=t;if(a){if(!e.options.mutationKey)return!1;if(s){if(Fe(e.options.mutationKey)!==Fe(a))return!1}else if(!ze(e.options.mutationKey,a))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function Ut(t,e){return((e==null?void 0:e.queryKeyHashFn)||Fe)(t)}function Fe(t){return JSON.stringify(t,(e,s)=>bt(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function ze(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){for(let r=0;r<e.length;r++)if(!ze(t[r],e[r]))return!1;return!0}const s=Object.keys(e);for(const r of s)if(!ze(t[r],e[r]))return!1;return!0}return!1}const Kr=Object.prototype.hasOwnProperty;function Lt(t,e,s=0){if(t===e)return t;if(s>500)return e;const r=Zt(t)&&Zt(e);if(!r&&!(bt(t)&&bt(e)))return e;const i=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),o=a.length,u=r?new Array(o):{};let h=0;for(let v=0;v<o;v++){const p=r?v:a[v],m=t[p],f=e[p];if(m===f){u[p]=m,(r?v<i:Kr.call(t,p))&&h++;continue}if(m===null||f===null||typeof m!="object"||typeof f!="object"){u[p]=f;continue}const C=Lt(m,f,s+1);u[p]=C,C===m&&h++}return i===o&&h===i?t:u}function Ye(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function Zt(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function bt(t){if(!Xt(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!Xt(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Xt(t){return Object.prototype.toString.call(t)==="[object Object]"}function _r(t){return new Promise(e=>{be.setTimeout(e,t)})}function St(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?Lt(t,e):e}function pt(t){return t}function $r(t,e,s=0){const r=[...t,e];return s&&r.length>s?r.slice(1):r}function Hr(t,e,s=0){const r=[e,...t];return s&&r.length>s?r.slice(0,-1):r}const Kt=Symbol();function Ts(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Kt?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function _t(t,e){return typeof t=="function"?t(...e):!!t}function Br(t,e,s){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??(i=e()),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),t}let Gr=()=>Ur;const $t=()=>Gr();var Qe=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Se,le,Ie,hs,Wr=(hs=class extends Qe{constructor(){super();d(this,Se);d(this,le);d(this,Ie);c(this,Ie,e=>{if(typeof window<"u"&&window.addEventListener){const s=()=>e();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){n(this,le)||this.setEventListener(n(this,Ie))}onUnsubscribe(){var e;this.hasListeners()||((e=n(this,le))==null||e.call(this),c(this,le,void 0))}setEventListener(e){var s;c(this,Ie,e),(s=n(this,le))==null||s.call(this),c(this,le,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){n(this,Se)!==e&&(c(this,Se,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(s=>{s(e)})}isFocused(){var e;return typeof n(this,Se)=="boolean"?n(this,Se):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Se=new WeakMap,le=new WeakMap,Ie=new WeakMap,hs);const Ht=new Wr,zr=Nr;function Vr(){let t=[],e=0,s=u=>{u()},r=u=>{u()},i=zr;const a=u=>{e?t.push(u):i(()=>{s(u)})},o=()=>{const u=t;t=[],u.length&&i(()=>{r(()=>{u.forEach(h=>{s(h)})})})};return{batch:u=>{let h;e++;try{h=u()}finally{e--,e||o()}return h},batchCalls:u=>(...h)=>{a(()=>{u(...h)})},schedule:a,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}const Q=Vr();var Me,he,Ae,ds,Jr=(ds=class extends Qe{constructor(){super();d(this,Me,!0);d(this,he);d(this,Ae);c(this,Ae,e=>{if(typeof window<"u"&&window.addEventListener){const s=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){n(this,he)||this.setEventListener(n(this,Ae))}onUnsubscribe(){var e;this.hasListeners()||((e=n(this,he))==null||e.call(this),c(this,he,void 0))}setEventListener(e){var s;c(this,Ae,e),(s=n(this,he))==null||s.call(this),c(this,he,e(this.setOnline.bind(this)))}setOnline(e){n(this,Me)!==e&&(c(this,Me,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return n(this,Me)}},Me=new WeakMap,he=new WeakMap,Ae=new WeakMap,ds);const dt=new Jr;function Yr(t){return Math.min(1e3*2**t,3e4)}function Es(t){return(t??"online")==="online"?dt.isOnline():!0}var wt=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function js(t){let e=!1,s=0,r,i="pending",a,o;const u=new Promise((x,R)=>{a=x,o=R});u.catch(U);const h=()=>i!=="pending",v=x=>{var R;if(!h()){const T=new wt(x);S(T),(R=t.onCancel)==null||R.call(t,T)}},p=()=>{e=!0},m=()=>{e=!1},f=()=>Ht.isFocused()&&(t.networkMode==="always"||dt.isOnline())&&t.canRun(),C=()=>Es(t.networkMode)&&t.canRun(),I=x=>{h()||(r==null||r(),i="resolved",a(x))},S=x=>{h()||(r==null||r(),i="rejected",o(x))},w=()=>new Promise(x=>{var R;r=T=>{(h()||f())&&x(T)},(R=t.onPause)==null||R.call(t)}).then(()=>{var x;r=void 0,h()||(x=t.onContinue)==null||x.call(t)}),E=()=>{if(h())return;let x;const R=s===0?t.initialPromise:void 0;try{x=R??t.fn()}catch(T){x=Promise.reject(T)}Promise.resolve(x).then(I).catch(T=>{var j;if(h())return;const g=t.retry??($t()?0:3),K=t.retryDelay??Yr,M=typeof K=="function"?K(s,T):K,J=g===!0||typeof g=="number"&&s<g||typeof g=="function"&&g(s,T);if(e||!J){S(T);return}s++,(j=t.onFail)==null||j.call(t,s,T),_r(M).then(()=>f()?void 0:w()).then(()=>{e?S(T):E()})})};return{promise:u,status:()=>i,cancel:v,continue:()=>(r==null||r(),u),cancelRetry:p,continueRetry:m,canStart:C,start:()=>(C()?E():w().then(E),u)}}var we,fs,Ds=(fs=class{constructor(){d(this,we)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rs(this.gcTime)&&c(this,we,be.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??($t()?1/0:3e5))}clearGcTimeout(){n(this,we)!==void 0&&(be.clearTimeout(n(this,we)),c(this,we,void 0))}},we=new WeakMap,fs);function Zr(t){return{onFetch:(e,s)=>{var p,m,f,C,I;const r=e.options,i=(f=(m=(p=e.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:f.direction,a=((C=e.state.data)==null?void 0:C.pages)||[],o=((I=e.state.data)==null?void 0:I.pageParams)||[];let u={pages:[],pageParams:[]},h=0;const v=async()=>{let S=!1;const w=R=>{Br(R,()=>e.signal,()=>S=!0)},E=Ts(e.options,e.fetchOptions),x=async(R,T,g)=>{if(S)return Promise.reject(e.signal.reason);if(T==null&&R.pages.length)return Promise.resolve(R);const M=(()=>{const Wt={client:e.client,queryKey:e.queryKey,pageParam:T,direction:g?"backward":"forward",meta:e.options.meta};return w(Wt),Wt})(),J=await E(M),{maxPages:j}=e.options,_=g?Hr:$r;return{pages:_(R.pages,J,j),pageParams:_(R.pageParams,T,j)}};if(i&&a.length){const R=i==="backward",T=R?Xr:es,g={pages:a,pageParams:o};u=await x(g,T(r,g),R)}else{const R=t??a.length;do{const T=h===0?o[0]??r.initialPageParam:es(r,u);if(h>0&&T==null)break;u=await x(u,T),h++}while(h<R)}return u};e.options.persister?e.fetchFn=()=>{var S,w;return(w=(S=e.options).persister)==null?void 0:w.call(S,v,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s)}:e.fetchFn=v}}}function es(t,{pages:e,pageParams:s}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,s[r],s):void 0}function Xr(t,{pages:e,pageParams:s}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,s[0],s):void 0}var qe,Ce,ke,V,Pe,A,Ze,xe,Y,re,ps,en=(ps=class extends Ds{constructor(e){super();d(this,Y);d(this,qe);d(this,Ce);d(this,ke);d(this,V);d(this,Pe);d(this,A);d(this,Ze);d(this,xe);c(this,xe,!1),c(this,Ze,e.defaultOptions),this.setOptions(e.options),this.observers=[],c(this,Pe,e.client),c(this,V,n(this,Pe).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,c(this,Ce,ss(this.options)),this.state=e.state??n(this,Ce),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return n(this,qe)}get promise(){var e;return(e=n(this,A))==null?void 0:e.promise}setOptions(e){if(this.options={...n(this,Ze),...e},e!=null&&e._type&&c(this,qe,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=ss(this.options);s.data!==void 0&&(this.setState(ts(s.data,s.dataUpdatedAt)),c(this,Ce,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&n(this,V).remove(this)}setData(e,s){const r=St(this.state.data,e,this.options);return y(this,Y,re).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(e){y(this,Y,re).call(this,{type:"setState",state:e})}cancel(e){var r,i;const s=(r=n(this,A))==null?void 0:r.promise;return(i=n(this,A))==null||i.cancel(e),s?s.then(U).catch(U):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return n(this,Ce)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>F(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kt||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>F(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Os(this.state.dataUpdatedAt,e)}onFocus(){var e,s;(e=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||e.refetch({cancelRefetch:!1}),(s=n(this,A))==null||s.continue()}onOnline(){var e,s;(e=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||e.refetch({cancelRefetch:!1}),(s=n(this,A))==null||s.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),n(this,V).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const s=this.observers.indexOf(e);s!==-1&&(this.observers.splice(s,1),this.observers.length||(n(this,A)&&(n(this,xe)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?n(this,A).cancel({revert:!0}):n(this,A).cancelRetry()),this.scheduleGc()),n(this,V).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||y(this,Y,re).call(this,{type:"invalidate"})}async fetch(e,s){var v,p,m,f,C,I,S,w,E,x,R,T;if(this.state.fetchStatus!=="idle"&&((v=n(this,A))==null?void 0:v.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(n(this,A))return n(this,A).continueRetry(),n(this,A).promise}if(e&&this.setOptions(e),!this.options.queryFn){const g=this.observers.find(K=>K.options.queryFn);g&&this.setOptions(g.options)}const r=new AbortController,i=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(c(this,xe,!0),r.signal)})},a=()=>{const g=Ts(this.options,s),M=(()=>{const J={client:n(this,Pe),queryKey:this.queryKey,meta:this.meta};return i(J),J})();return c(this,xe,!1),this.options.persister?this.options.persister(g,M,this):g(M)},u=(()=>{const g={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:n(this,Pe),state:this.state,fetchFn:a};return i(g),g})();(p=n(this,qe)==="infinite"?Zr(this.options.pages):this.options.behavior)==null||p.onFetch(u,this),c(this,ke,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&y(this,Y,re).call(this,{type:"fetch",meta:(f=u.fetchOptions)==null?void 0:f.meta});const h=c(this,A,js({initialPromise:s==null?void 0:s.initialPromise,fn:u.fetchFn,onCancel:g=>{g instanceof wt&&g.revert&&this.setState({...n(this,ke),fetchStatus:"idle"}),r.abort()},onFail:(g,K)=>{y(this,Y,re).call(this,{type:"failed",failureCount:g,error:K})},onPause:()=>{y(this,Y,re).call(this,{type:"pause"})},onContinue:()=>{y(this,Y,re).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const g=await h.start();if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),(I=(C=n(this,V).config).onSuccess)==null||I.call(C,g,this),(w=(S=n(this,V).config).onSettled)==null||w.call(S,g,this.state.error,this),g}catch(g){if(g instanceof wt){if(g.silent)return n(this,A).promise;if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw y(this,Y,re).call(this,{type:"error",error:g}),(x=(E=n(this,V).config).onError)==null||x.call(E,g,this),(T=(R=n(this,V).config).onSettled)==null||T.call(R,this.state.data,g,this),g}finally{n(this,A)===h&&c(this,A,void 0),this.scheduleGc()}}},qe=new WeakMap,Ce=new WeakMap,ke=new WeakMap,V=new WeakMap,Pe=new WeakMap,A=new WeakMap,Ze=new WeakMap,xe=new WeakMap,Y=new WeakSet,re=function(e){const s=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Fs(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...ts(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return c(this,ke,e.manual?i:void 0),i;case"error":const a=e.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=s(this.state),Q.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),n(this,V).notify({query:this,type:"updated",action:e})})},ps);function Fs(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Es(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ts(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ss(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var H,P,Xe,B,Re,Ne,ne,et,Ue,Le,Oe,Te,de,Ke,O,Ve,Ct,Pt,xt,Rt,Ot,Tt,Et,jt,ys,yt=(ys=class extends Qe{constructor(e,s){super();d(this,O);d(this,H);d(this,P);d(this,Xe);d(this,B);d(this,Re);d(this,Ne);d(this,ne);d(this,et);d(this,Ue);d(this,Le);d(this,Oe);d(this,Te);d(this,de);d(this,Ke,new Set);this.options=s,c(this,H,e),c(this,ne,null),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(n(this,P).addObserver(this),rs(n(this,P),this.options)?y(this,O,Ve).call(this):this.updateResult(),y(this,O,Ot).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dt(n(this,P),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dt(n(this,P),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,y(this,O,Tt).call(this),y(this,O,Et).call(this),n(this,P).removeObserver(this)}setOptions(e){const s=this.options,r=n(this,P);if(this.options=n(this,H).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof F(this.options.enabled,n(this,P))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");y(this,O,jt).call(this),n(this,P).setOptions(this.options),s._defaulted&&!Ye(this.options,s)&&n(this,H).getQueryCache().notify({type:"observerOptionsUpdated",query:n(this,P),observer:this});const i=this.hasListeners();i&&ns(n(this,P),r,this.options,s)&&y(this,O,Ve).call(this),this.updateResult(),i&&(n(this,P)!==r||F(this.options.enabled,n(this,P))!==F(s.enabled,n(this,P))||F(this.options.staleTime,n(this,P))!==F(s.staleTime,n(this,P)))&&y(this,O,Pt).call(this);const a=y(this,O,xt).call(this);i&&(n(this,P)!==r||F(this.options.enabled,n(this,P))!==F(s.enabled,n(this,P))||a!==n(this,de))&&y(this,O,Rt).call(this,a)}getOptimisticResult(e){const s=n(this,H).getQueryCache().build(n(this,H),e),r=this.createResult(s,e);return Ye(this.getCurrentResult(),r)||(c(this,B,r),c(this,Ne,this.options),c(this,Re,n(this,P).state)),r}getCurrentResult(){return n(this,B)}trackResult(e,s){return new Proxy(e,{get:(r,i)=>(this.trackProp(i),s==null||s(i),Reflect.get(r,i))})}trackProp(e){n(this,Ke).add(e)}getCurrentQuery(){return n(this,P)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const s=n(this,H).defaultQueryOptions(e),r=n(this,H).getQueryCache().build(n(this,H),s);let i=()=>{},a;const o=new Promise(u=>{a=u,i=n(this,H).getQueryCache().subscribe(h=>{h.type==="updated"&&h.query.queryHash===r.queryHash&&r.state.data!==void 0&&(i(),u(this.createResult(r,s)))})});return Promise.race([r.fetch().then(()=>{const u=this.createResult(r,s);return a==null||a(u),u}).finally(()=>{i()}),o])}fetch(e){return y(this,O,Ve).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),n(this,B)))}createResult(e,s){var K;const r=n(this,P),i=this.options,a=n(this,B),o=n(this,Re),u=n(this,Ne),h=e!==r?e.state:n(this,Xe),{state:v}=e;let p={...v},m=!1,f;if(s._optimisticResults){const M=this.hasListeners(),J=!M&&rs(e,s),j=M&&ns(e,r,s,i);(J||j)&&(p={...p,...Fs(v.data,e.options)}),s._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:C,errorUpdatedAt:I,status:S}=p;f=p.data;let w=!1;if(s.placeholderData!==void 0&&f===void 0&&S==="pending"){let M;a!=null&&a.isPlaceholderData&&s.placeholderData===(u==null?void 0:u.placeholderData)?(M=a.data,w=!0):M=typeof s.placeholderData=="function"?s.placeholderData((K=n(this,Le))==null?void 0:K.state.data,n(this,Le)):s.placeholderData,M!==void 0&&(S="success",f=St(a==null?void 0:a.data,M,s),m=!0)}if(s.select&&f!==void 0&&!w)if(a&&f===(o==null?void 0:o.data)&&s.select===n(this,et))f=n(this,Ue);else try{c(this,et,s.select),f=s.select(f),f=St(a==null?void 0:a.data,f,s),c(this,Ue,f),c(this,ne,null)}catch(M){c(this,ne,M)}else f===void 0&&c(this,ne,null);n(this,ne)&&(C=n(this,ne),f=n(this,Ue),I=Date.now(),S="error",m=!1);const E=p.fetchStatus==="fetching",x=S==="pending",R=S==="error",T=x&&E,g=f!==void 0;return{status:S,fetchStatus:p.fetchStatus,isPending:x,isSuccess:S==="success",isError:R,isInitialLoading:T,isLoading:T,data:f,dataUpdatedAt:p.dataUpdatedAt,error:C,errorUpdatedAt:I,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!x,isLoadingError:R&&!g,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:R&&g,isStale:Bt(e,s),refetch:this.refetch,isEnabled:F(s.enabled,e)!==!1}}updateResult(){const e=n(this,B),s=this.createResult(n(this,P),this.options);if(c(this,Re,n(this,P).state),c(this,Ne,this.options),n(this,Re).data!==void 0&&c(this,Le,n(this,P)),Ye(s,e))return;c(this,B,s);const i=(()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!n(this,Ke).size)return!0;const u=new Set(o??n(this,Ke));return this.options.throwOnError&&u.add("error"),Object.keys(n(this,B)).some(h=>{const v=h;return n(this,B)[v]!==e[v]&&u.has(v)})})();Q.batch(()=>{i&&this.listeners.forEach(a=>{a(n(this,B))}),n(this,H).getQueryCache().notify({query:n(this,P),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&y(this,O,Ot).call(this)}},H=new WeakMap,P=new WeakMap,Xe=new WeakMap,B=new WeakMap,Re=new WeakMap,Ne=new WeakMap,ne=new WeakMap,et=new WeakMap,Ue=new WeakMap,Le=new WeakMap,Oe=new WeakMap,Te=new WeakMap,de=new WeakMap,Ke=new WeakMap,O=new WeakSet,Ve=function(e){y(this,O,jt).call(this);let s=n(this,P).fetch(this.options,e);return e!=null&&e.throwOnError||(s=s.catch(U)),s},Ct=function(e){return!$t()&&F(this.options.enabled,n(this,P))!==!1&&Rs(e)},Pt=function(){y(this,O,Tt).call(this);const e=F(this.options.staleTime,n(this,P));if(n(this,B).isStale||!y(this,O,Ct).call(this,e))return;const s=Os(n(this,B).dataUpdatedAt,e)+1;c(this,Oe,be.setTimeout(()=>{n(this,B).isStale||this.updateResult()},s))},xt=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(n(this,P)):this.options.refetchInterval)??!1},Rt=function(e){y(this,O,Et).call(this),c(this,de,e),!(n(this,de)===0||!y(this,O,Ct).call(this,n(this,de)))&&c(this,Te,be.setInterval(()=>{(this.options.refetchIntervalInBackground||Ht.isFocused())&&y(this,O,Ve).call(this)},n(this,de)))},Ot=function(){y(this,O,Pt).call(this),y(this,O,Rt).call(this,y(this,O,xt).call(this))},Tt=function(){n(this,Oe)!==void 0&&(be.clearTimeout(n(this,Oe)),c(this,Oe,void 0))},Et=function(){n(this,Te)!==void 0&&(be.clearInterval(n(this,Te)),c(this,Te,void 0))},jt=function(){const e=n(this,H).getQueryCache().build(n(this,H),this.options);if(e===n(this,P))return;const s=n(this,P);c(this,P,e),c(this,Xe,e.state),this.hasListeners()&&(s==null||s.removeObserver(this),e.addObserver(this))},ys);function tn(t,e){return F(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&F(e.retryOnMount,t)===!1)}function rs(t,e){return tn(t,e)||t.state.data!==void 0&&Dt(t,e,e.refetchOnMount)}function Dt(t,e,s){if(F(e.enabled,t)!==!1&&F(e.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&Bt(t,e)}return!1}function ns(t,e,s,r){return(t!==e||F(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Bt(t,s)}function Bt(t,e){return F(e.enabled,t)!==!1&&t.isStaleByTime(F(e.staleTime,t))}var tt,X,k,Ee,ee,ue,ms,sn=(ms=class extends Ds{constructor(e){super();d(this,ee);d(this,tt);d(this,X);d(this,k);d(this,Ee);c(this,tt,e.client),this.mutationId=e.mutationId,c(this,k,e.mutationCache),c(this,X,[]),this.state=e.state||Qs(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){n(this,X).includes(e)||(n(this,X).push(e),this.clearGcTimeout(),n(this,k).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){c(this,X,n(this,X).filter(s=>s!==e)),this.scheduleGc(),n(this,k).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){n(this,X).length||(this.state.status==="pending"?this.scheduleGc():n(this,k).remove(this))}continue(){var e;return((e=n(this,Ee))==null?void 0:e.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){var u,h,v,p,m,f,C,I,S,w,E,x,R,T,g,K,M,J;const s=()=>{y(this,ee,ue).call(this,{type:"continue"})},r={client:n(this,tt),meta:this.options.meta,mutationKey:this.options.mutationKey},i=c(this,Ee,js({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(j,_)=>{y(this,ee,ue).call(this,{type:"failed",failureCount:j,error:_})},onPause:()=>{y(this,ee,ue).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>n(this,k).canRun(this)})),a=this.state.status==="pending",o=!i.canStart();try{if(a)s();else{y(this,ee,ue).call(this,{type:"pending",variables:e,isPaused:o}),n(this,k).config.onMutate&&await n(this,k).config.onMutate(e,this,r);const _=await((h=(u=this.options).onMutate)==null?void 0:h.call(u,e,r));_!==this.state.context&&y(this,ee,ue).call(this,{type:"pending",context:_,variables:e,isPaused:o})}const j=await i.start();return await((p=(v=n(this,k).config).onSuccess)==null?void 0:p.call(v,j,e,this.state.context,this,r)),await((f=(m=this.options).onSuccess)==null?void 0:f.call(m,j,e,this.state.context,r)),await((I=(C=n(this,k).config).onSettled)==null?void 0:I.call(C,j,null,this.state.variables,this.state.context,this,r)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,j,null,e,this.state.context,r)),y(this,ee,ue).call(this,{type:"success",data:j}),j}catch(j){try{await((x=(E=n(this,k).config).onError)==null?void 0:x.call(E,j,e,this.state.context,this,r))}catch(_){Promise.reject(_)}try{await((T=(R=this.options).onError)==null?void 0:T.call(R,j,e,this.state.context,r))}catch(_){Promise.reject(_)}try{await((K=(g=n(this,k).config).onSettled)==null?void 0:K.call(g,void 0,j,this.state.variables,this.state.context,this,r))}catch(_){Promise.reject(_)}try{await((J=(M=this.options).onSettled)==null?void 0:J.call(M,void 0,j,e,this.state.context,r))}catch(_){Promise.reject(_)}throw y(this,ee,ue).call(this,{type:"error",error:j}),j}finally{n(this,Ee)===i&&c(this,Ee,void 0),n(this,k).runNext(this)}}},tt=new WeakMap,X=new WeakMap,k=new WeakMap,Ee=new WeakMap,ee=new WeakSet,ue=function(e){const s=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=s(this.state),Q.batch(()=>{n(this,X).forEach(r=>{r.onMutationUpdate(e)}),n(this,k).notify({mutation:this,type:"updated",action:e})})},ms);function Qs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ie,Z,st,vs,rn=(vs=class extends Qe{constructor(e={}){super();d(this,ie);d(this,Z);d(this,st);this.config=e,c(this,ie,new Set),c(this,Z,new Map),c(this,st,0)}build(e,s,r){const i=new sn({client:e,mutationCache:this,mutationId:++ut(this,st)._,options:e.defaultMutationOptions(s),state:r});return this.add(i),i}add(e){n(this,ie).add(e);const s=ct(e);if(typeof s=="string"){const r=n(this,Z).get(s);r?r.push(e):n(this,Z).set(s,[e])}this.notify({type:"added",mutation:e})}remove(e){if(n(this,ie).delete(e)){const s=ct(e);if(typeof s=="string"){const r=n(this,Z).get(s);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&n(this,Z).delete(s)}}this.notify({type:"removed",mutation:e})}canRun(e){var r;const s=ct(e);if(typeof s=="string"){const i=(r=n(this,Z).get(s))==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r,i;const s=ct(e);return typeof s=="string"?((i=(r=n(this,Z).get(s))==null?void 0:r.find(a=>a!==e&&a.state.isPaused))==null?void 0:i.continue())??Promise.resolve():Promise.resolve()}clear(){Q.batch(()=>{n(this,ie).forEach(e=>{this.notify({type:"removed",mutation:e})}),n(this,ie).clear(),n(this,Z).clear()})}getAll(){return Array.from(n(this,ie))}find(e){const s={exact:!0,...e};return this.getAll().find(r=>Yt(s,r))}findAll(e={}){return this.getAll().filter(s=>Yt(e,s))}notify(e){Q.batch(()=>{this.listeners.forEach(s=>{s(e)})})}resumePausedMutations(){const e=this.getAll().filter(s=>s.state.isPaused);return Q.batch(()=>Promise.all(e.map(s=>s.continue().catch(U))))}},ie=new WeakMap,Z=new WeakMap,st=new WeakMap,vs);function ct(t){var e;return(e=t.options.scope)==null?void 0:e.id}var ae,fe,N,oe,se,Je,Ft,gs,nn=(gs=class extends Qe{constructor(e,s){super();d(this,se);d(this,ae);d(this,fe);d(this,N);d(this,oe);c(this,ae,e),this.setOptions(s),this.bindMethods(),y(this,se,Je).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var r;const s=this.options;this.options=n(this,ae).defaultMutationOptions(e),Ye(this.options,s)||n(this,ae).getMutationCache().notify({type:"observerOptionsUpdated",mutation:n(this,N),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Fe(s.mutationKey)!==Fe(this.options.mutationKey)?this.reset():((r=n(this,N))==null?void 0:r.state.status)==="pending"&&n(this,N).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&n(this,N)&&(n(this,N).addObserver(this),y(this,se,Je).call(this))}onUnsubscribe(){var e;this.hasListeners()||(e=n(this,N))==null||e.removeObserver(this)}onMutationUpdate(e){y(this,se,Je).call(this),y(this,se,Ft).call(this,e)}getCurrentResult(){return n(this,fe)}reset(){var e;(e=n(this,N))==null||e.removeObserver(this),c(this,N,void 0),y(this,se,Je).call(this),y(this,se,Ft).call(this)}mutate(e,s){var r;return c(this,oe,s),(r=n(this,N))==null||r.removeObserver(this),c(this,N,n(this,ae).getMutationCache().build(n(this,ae),this.options)),n(this,N).addObserver(this),n(this,N).execute(e)}},ae=new WeakMap,fe=new WeakMap,N=new WeakMap,oe=new WeakMap,se=new WeakSet,Je=function(){var s;const e=((s=n(this,N))==null?void 0:s.state)??Qs();c(this,fe,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},Ft=function(e){Q.batch(()=>{var s,r,i,a,o,u,h,v;if(n(this,oe)&&this.hasListeners()){const p=n(this,fe).variables,m=n(this,fe).context,f={client:n(this,ae),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)==="success"){try{(r=(s=n(this,oe)).onSuccess)==null||r.call(s,e.data,p,m,f)}catch(C){Promise.reject(C)}try{(a=(i=n(this,oe)).onSettled)==null||a.call(i,e.data,null,p,m,f)}catch(C){Promise.reject(C)}}else if((e==null?void 0:e.type)==="error"){try{(u=(o=n(this,oe)).onError)==null||u.call(o,e.error,p,m,f)}catch(C){Promise.reject(C)}try{(v=(h=n(this,oe)).onSettled)==null||v.call(h,void 0,e.error,p,m,f)}catch(C){Promise.reject(C)}}}this.listeners.forEach(p=>{p(n(this,fe))})})},gs);function is(t,e){const s=new Set(e);return t.filter(r=>!s.has(r))}var _e,G,$e,je,W,De,rt,nt,it,at,q,Qt,It,Is,Mt,At,qt,bs,an=(bs=class extends Qe{constructor(e,s,r){super();d(this,q);d(this,_e);d(this,G);d(this,$e);d(this,je);d(this,W);d(this,De);d(this,rt);d(this,nt);d(this,it);d(this,at,[]);c(this,_e,e),c(this,je,r),c(this,$e,[]),c(this,W,[]),c(this,G,[]),this.setQueries(s)}onSubscribe(){this.listeners.size===1&&n(this,W).forEach(e=>{e.subscribe(s=>{y(this,q,At).call(this,e,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,n(this,W).forEach(e=>{e.destroy()})}setQueries(e,s){c(this,$e,e),c(this,je,s),Q.batch(()=>{const r=n(this,W),i=y(this,q,Mt).call(this,n(this,$e));i.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const a=i.map(m=>m.observer),o=a.map(m=>m.getCurrentResult()),u=r.length!==a.length,h=a.some((m,f)=>m!==r[f]),v=u||h,p=v?!0:o.some((m,f)=>{const C=n(this,G)[f];return!C||!Ye(m,C)});!v&&!p||(v&&(c(this,at,i),c(this,W,a)),c(this,G,o),this.hasListeners()&&(v&&(is(r,a).forEach(m=>{m.destroy()}),is(a,r).forEach(m=>{m.subscribe(f=>{y(this,q,At).call(this,m,f)})})),y(this,q,qt).call(this)))})}getCurrentResult(){return n(this,G)}getQueries(){return n(this,W).map(e=>e.getCurrentQuery())}getObservers(){return n(this,W)}getOptimisticResult(e,s){const r=y(this,q,Mt).call(this,e),i=r.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),a=r.map(o=>o.defaultedQueryOptions.queryHash);return[i,o=>y(this,q,It).call(this,o??i,s,a),()=>y(this,q,Qt).call(this,i,r)]}},_e=new WeakMap,G=new WeakMap,$e=new WeakMap,je=new WeakMap,W=new WeakMap,De=new WeakMap,rt=new WeakMap,nt=new WeakMap,it=new WeakMap,at=new WeakMap,q=new WeakSet,Qt=function(e,s){const r=new Set;return s.map((i,a)=>{const o=e[a];return i.defaultedQueryOptions.notifyOnChangeProps?o:i.observer.trackResult(o,u=>{r.has(u)||(r.add(u),s.forEach(h=>{h.observer.trackProp(u)}))})})},It=function(e,s,r){if(s){const i=n(this,it),a=r!==void 0&&i!==void 0&&(i.length!==r.length||r.some((o,u)=>o!==i[u]));return(n(this,G)!==n(this,nt)||a||s!==n(this,rt))&&(c(this,rt,s),c(this,nt,n(this,G)),r!==void 0&&c(this,it,r),c(this,De,Lt(n(this,De),s(e)))),n(this,De)}return e},Is=function(){var e;return!((e=n(this,je))!=null&&e.combine)||n(this,W).some((s,r)=>{var i;return s.options.suspense&&((i=n(this,G)[r])==null?void 0:i.data)===void 0})},Mt=function(e){const s=new Map;n(this,W).forEach(i=>{const a=i.options.queryHash;if(!a)return;const o=s.get(a);o?o.push(i):s.set(a,[i])});const r=[];return e.forEach(i=>{var u;const a=n(this,_e).defaultQueryOptions(i),o=((u=s.get(a.queryHash))==null?void 0:u.shift())??new yt(n(this,_e),a);r.push({defaultedQueryOptions:a,observer:o})}),r},At=function(e,s){const r=n(this,W).indexOf(e);r!==-1&&(c(this,G,n(this,G).slice()),n(this,G)[r]=s,y(this,q,qt).call(this))},qt=function(){var e;if(this.hasListeners()){const s=y(this,q,Is).call(this),r=n(this,De),i=s?r:y(this,q,It).call(this,y(this,q,Qt).call(this,n(this,G),n(this,at)),(e=n(this,je))==null?void 0:e.combine);(s||r!==i)&&Q.batch(()=>{this.listeners.forEach(a=>{a(n(this,G))})})}},bs),te,Ss,on=(Ss=class extends Qe{constructor(e={}){super();d(this,te);this.config=e,c(this,te,new Map)}build(e,s,r){const i=s.queryKey,a=s.queryHash??Ut(i,s);let o=this.get(a);return o||(o=new en({client:e,queryKey:i,queryHash:a,options:e.defaultQueryOptions(s),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){n(this,te).has(e.queryHash)||(n(this,te).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const s=n(this,te).get(e.queryHash);s&&(e.destroy(),s===e&&n(this,te).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Q.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return n(this,te).get(e)}getAll(){return[...n(this,te).values()]}find(e){const s={exact:!0,...e};return this.getAll().find(r=>Jt(s,r))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(r=>Jt(e,r)):s}notify(e){Q.batch(()=>{this.listeners.forEach(s=>{s(e)})})}onFocus(){Q.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Q.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},te=new WeakMap,Ss),D,pe,ye,He,Be,me,Ge,We,ws,un=(ws=class{constructor(t={}){d(this,D);d(this,pe);d(this,ye);d(this,He);d(this,Be);d(this,me);d(this,Ge);d(this,We);c(this,D,t.queryCache||new on),c(this,pe,t.mutationCache||new rn),c(this,ye,t.defaultOptions||{}),c(this,He,new Map),c(this,Be,new Map),c(this,me,0)}mount(){ut(this,me)._++,n(this,me)===1&&(c(this,Ge,Ht.subscribe(async t=>{t&&(await this.resumePausedMutations(),n(this,D).onFocus())})),c(this,We,dt.subscribe(async t=>{t&&(await this.resumePausedMutations(),n(this,D).onOnline())})))}unmount(){var t,e;ut(this,me)._--,n(this,me)===0&&((t=n(this,Ge))==null||t.call(this),c(this,Ge,void 0),(e=n(this,We))==null||e.call(this),c(this,We,void 0))}isFetching(t){return n(this,D).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return n(this,pe).findAll({...t,status:"pending"}).length}getQueryData(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=n(this,D).get(e.queryHash))==null?void 0:s.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=n(this,D).build(this,e),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(F(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return n(this,D).findAll(t).map(({queryKey:e,state:s})=>[e,s.data])}setQueryData(t,e,s){var o;const r=this.defaultQueryOptions({queryKey:t}),i=(o=n(this,D).get(r.queryHash))==null?void 0:o.state.data,a=Lr(e,i);if(a!==void 0)return n(this,D).build(this,r).setData(a,{...s,manual:!0})}setQueriesData(t,e,s){return Q.batch(()=>n(this,D).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,s)]))}getQueryState(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=n(this,D).get(e.queryHash))==null?void 0:s.state}removeQueries(t){const e=n(this,D);Q.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=n(this,D);return Q.batch(()=>{const r=s.findAll(t),i=new Set(r);return r.forEach(a=>{a.reset()}),this.refetchQueries({type:"active",predicate:a=>i.has(a)},e)})}cancelQueries(t,e={}){const s={revert:!0,...e},r=Q.batch(()=>n(this,D).findAll(t).map(i=>i.cancel(s)));return Promise.all(r).then(U).catch(U)}invalidateQueries(t,e={}){return Q.batch(()=>(n(this,D).findAll(t).forEach(s=>{s.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},r=Q.batch(()=>n(this,D).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,s);return s.throwOnError||(a=a.catch(U)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(U)}async query(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=n(this,D).build(this,e),r=s.isStaleByTime(F(e.staleTime,s))?await s.fetch(e):s.state.data,i=e.select;return i?i(r):r}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=n(this,D).build(this,e);return s.isStaleByTime(F(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(U).catch(U)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(U).catch(U)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return dt.isOnline()?n(this,pe).resumePausedMutations():Promise.resolve()}getQueryCache(){return n(this,D)}getMutationCache(){return n(this,pe)}getDefaultOptions(){return n(this,ye)}setDefaultOptions(t){c(this,ye,t)}setQueryDefaults(t,e){n(this,He).set(Fe(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...n(this,He).values()],s={};return e.forEach(r=>{ze(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,e){n(this,Be).set(Fe(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...n(this,Be).values()],s={};return e.forEach(r=>{ze(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...n(this,ye).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Ut(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Kt&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...n(this,ye).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){n(this,D).clear(),n(this,pe).clear()}},D=new WeakMap,pe=new WeakMap,ye=new WeakMap,He=new WeakMap,Be=new WeakMap,me=new WeakMap,Ge=new WeakMap,We=new WeakMap,ws);const Ms=b.createContext(!1),As=()=>b.useContext(Ms);Ms.Provider;const qs=(t,e,s)=>{const r=s!=null&&s.state.error&&typeof t.throwOnError=="function"?_t(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||r)&&(e.isReset()||(t.retryOnMount=!1))},ks=t=>{b.useEffect(()=>{t.clearReset()},[t])},Ns=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||_t(s,[t.error,r])),Us=(t,e)=>e.state.data===void 0,Ls=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},kt=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,Ks=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function cn({queries:t,...e},s){const r=ot(),i=As(),a=Cs(),o=e.subscribed!==!1,u=b.useMemo(()=>t.map(S=>{const w=r.defaultQueryOptions(S);return w._optimisticResults=i?"isRestoring":o?"optimistic":void 0,w}),[t,r,i,o]);u.forEach(S=>{Ls(S);const w=r.getQueryCache().get(S.queryHash);qs(S,a,w)}),ks(a);const[h]=b.useState(()=>new an(r,u,e)),[v,p,m]=h.getOptimisticResult(u,e.combine),f=!i&&o;b.useSyncExternalStore(b.useCallback(S=>f?h.subscribe(Q.batchCalls(S)):U,[h,f]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),b.useEffect(()=>{h.setQueries(u,e)},[u,e,h]);const C=v.some((S,w)=>kt(u[w],S))?v.flatMap((S,w)=>{const E=u[w];if(E&&kt(E,S)){const x=new yt(r,E);return Ks(E,x,a)}return[]}):[];if(C.length>0)throw Promise.all(C);const I=v.find((S,w)=>{const E=u[w];return E&&Ns({result:S,errorResetBoundary:a,throwOnError:E.throwOnError,query:r.getQueryCache().get(E.queryHash),suspense:E.suspense})});if(I)throw I.error;return p(m())}function _s(t,e,s){const r=As(),i=Cs(),a=ot(),o=a.defaultQueryOptions(t),u=a.getQueryCache().get(o.queryHash),h=t.subscribed!==!1;o._optimisticResults=r?"isRestoring":h?"optimistic":void 0,Ls(o),qs(o,i,u),ks(i);const[v]=b.useState(()=>new e(a,o)),p=v.getOptimisticResult(o),m=!r&&h;if(b.useSyncExternalStore(b.useCallback(f=>{const C=m?v.subscribe(Q.batchCalls(f)):U;return v.updateResult(),C},[v,m]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),b.useEffect(()=>{v.setOptions(o)},[o,v]),kt(o,p))throw Ks(o,v,i);if(Ns({result:p,errorResetBoundary:i,throwOnError:o.throwOnError,query:u,suspense:o.suspense}))throw p.error;return o.notifyOnChangeProps?p:v.trackResult(p)}function ge(t,e){return _s(t,yt)}function mt(t,e){return _s({...t,enabled:!0,suspense:!0,throwOnError:Us,placeholderData:void 0},yt)}function ln(t,e){return cn({...t,queries:t.queries.map(s=>({...s,suspense:!0,throwOnError:Us,enabled:!0,placeholderData:void 0}))})}function $s(t,e){const s=ot(),[r]=b.useState(()=>new nn(s,t));b.useEffect(()=>{r.setOptions(t)},[r,t]);const i=b.useSyncExternalStore(b.useCallback(o=>r.subscribe(Q.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((...o)=>{r.mutate(o[0],o[1]).catch(U)},[r]);if(i.error&&_t(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}const hn=864e5,dn=/^\d{4}-\d{2}-\d{2}$/;function as(t,e=Date.now()){return new Date(e-t*hn).toISOString().slice(0,10)}function fn(t=30,e=Date.now()){return{fromDay:as(t-1,e),toDay:as(0,e)}}function pn(t){return dn.test(t)}function ht(){return typeof window<"u"&&window.__AGENT_API__?window.__AGENT_API__:`${typeof window<"u"&&window.__AGENT_BASE__||"/ai-gateway"}/api`}async function $(t,e){const s=await fetch(ht()+t,e);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return await s.json()}function lt(t){const e=new URLSearchParams({page:`${t.page}`,limit:`${t.pageSize}`});if(t.where!==void 0)for(const[s,r]of Object.entries(t.where))typeof r=="string"&&r!==""&&e.set(`where[${s}]`,r);return e}const L={spend(t){const e=new URLSearchParams({from:t.fromDay,to:t.toDay});return $(`/spend?${e.toString()}`)},topThreads(t,e=10){const s=new URLSearchParams({from:t.fromDay,to:t.toDay,limit:`${e}`});return $(`/top-threads?${s.toString()}`)},reliability(t){const e=new URLSearchParams({from:t.fromDay,to:t.toDay});return $(`/reliability?${e.toString()}`)},runs(t=50){return $(`/runs?limit=${t}`)},toolCalls(t=50){return $(`/tool-calls?limit=${t}`)},toolCallsPage(t){return $(`/tool-calls-page?${lt(t)}`)},approvals(t=50){return $(`/approvals?limit=${t}`)},approvalsPage(t){return $(`/approvals-page?${lt(t)}`)},runDetail(t){return $(`/runs/${encodeURIComponent(t)}`)},threadDetail(t,e={}){const s=new URLSearchParams;e.messages!==void 0&&s.set("messages",`${e.messages}`),e.runs!==void 0&&s.set("runs",`${e.runs}`);const r=s.size>0?`?${s.toString()}`:"";return $(`/threads/${encodeURIComponent(t)}${r}`)},async decideApproval(t,e){const s=await fetch(`${ht()}/approvals/${encodeURIComponent(t)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok)throw new Error(`${s.status} ${s.statusText}`)},toolStats(t){const e=new URLSearchParams({from:t.fromDay,to:t.toDay});return $(`/tools?${e.toString()}`)},threads(t=50){return $(`/threads?limit=${t}`)},threadsPage(t){return $(`/threads-page?${lt(t)}`)},runsPage(t){return $(`/runs-page?${lt(t)}`)},pricing(){return $("/pricing")},async upsertPrice(t){const e=await fetch(`${ht()}/pricing`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok)throw new Error(`${e.status} ${e.statusText}`)},streamEvents(t){const e=new EventSource(`${ht()}/stream`);return e.onmessage=s=>{try{t(JSON.parse(s.data))}catch{}},()=>e.close()}},z={aggregate:6e4,activity:15e3,queue:0,config:5*6e4,detail:3e4};function Hs(t){return{queryKey:["spend",t.fromDay,t.toDay],queryFn:()=>L.spend(t),staleTime:z.aggregate}}function Bs(t){return mt(Hs(t))}function yn(t,e=10){const[s,r]=ln({queries:[Hs(t),{queryKey:["top-threads",t.fromDay,t.toDay,e],queryFn:()=>L.topThreads(t,e),staleTime:z.aggregate}]});return{overview:s.data,topThreads:r.data}}function mn(t){return mt({queryKey:["reliability",t.fromDay,t.toDay],queryFn:()=>L.reliability(t),staleTime:z.aggregate})}function vn(t){return mt({queryKey:["tool-stats",t.fromDay,t.toDay],queryFn:()=>L.toolStats(t),staleTime:z.aggregate})}function gn(t=50){return mt({queryKey:["tool-calls",t],queryFn:()=>L.toolCalls(t),staleTime:z.activity})}function bn(t,e,s){return ge({queryKey:["runs-page",t,e,s],queryFn:()=>L.runsPage({page:t,pageSize:e,where:s}),placeholderData:pt,staleTime:z.activity})}function Sn(t,e,s){return ge({queryKey:["tool-calls-page",t,e,s],queryFn:()=>L.toolCallsPage({page:t,pageSize:e,where:s}),placeholderData:pt,staleTime:z.activity})}function wn(t,e,s){return ge({queryKey:["threads-page",t,e,s],queryFn:()=>L.threadsPage({page:t,pageSize:e,where:s}),placeholderData:pt,staleTime:z.activity})}function Cn(t,e,s){return ge({queryKey:["approvals-page",t,e,s],queryFn:()=>L.approvalsPage({page:t,pageSize:e,where:s}),placeholderData:pt,staleTime:z.queue})}function Pn(){return ge({queryKey:["approvals-count"],queryFn:async()=>(await L.approvalsPage({page:1,pageSize:1})).total,staleTime:z.queue,refetchInterval:2e4,refetchIntervalInBackground:!0})}function xn(t){return ge({queryKey:["run-detail",t],queryFn:()=>L.runDetail(t),staleTime:z.detail})}function Rn(t){return ge({queryKey:["thread-detail",t],queryFn:()=>L.threadDetail(t),staleTime:z.detail})}function On(){return ge({queryKey:["pricing"],queryFn:()=>L.pricing(),staleTime:z.config})}const Tn=[["approvals"],["approvals-page"],["approvals-count"],["tool-calls"],["tool-calls-page"],["tool-stats"],["run-detail"]];function En(){const t=ot();return $s({mutationFn:({toolCallId:e,input:s})=>L.decideApproval(e,s),onSuccess:()=>{for(const e of Tn)t.invalidateQueries({queryKey:e})}})}const jn=[["pricing"],["spend"],["top-threads"],["thread-detail"]];function Dn(){const t=ot();return $s({mutationFn:e=>L.upsertPrice(e),onSuccess:()=>{for(const e of jn)t.invalidateQueries({queryKey:e})}})}function Fn({range:t}){return l.jsx(Ys,{rows:Bs(t).data.byActor})}const Qn=["spend","models","actors","runs","reliability","approvals","tools","pricing","live"],Gs="spend";function In(t){return Qn.some(e=>e===t)}function os(t){const e=t.replace(/^#\/?/,""),s=e.indexOf("?"),r=s===-1?e:e.slice(0,s);return In(r)?{section:r,params:new URLSearchParams(s===-1?"":e.slice(s+1))}:{section:Gs,params:new URLSearchParams}}function Gt(t,e){const s=e===void 0?"":new URLSearchParams(e).toString();return s===""?`#/${t}`:`#/${t}?${s}`}const Ws=b.createContext({open:()=>{}});function vt(){return b.useContext(Ws)}function Mn({children:t}){const[e,s]=b.useState([]),r=b.useCallback(u=>{s(h=>[...h,u])},[]),i=b.useCallback(()=>s([]),[]),a=b.useCallback(()=>s(u=>u.slice(0,-1)),[]);b.useEffect(()=>(window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)),[i]);const o=e[e.length-1];return l.jsxs(Ws.Provider,{value:{open:r},children:[t,o!==void 0&&l.jsx(Zs,{title:o.kind==="run"?"Run":"Thread",subtitle:o.kind==="run"?o.runId:o.threadId,onClose:i,...e.length>1?{onBack:a}:{},children:o.kind==="run"?l.jsx(Nn,{runId:o.runId,onOpenThread:qn(r)}):l.jsx(Un,{threadId:o.threadId,onOpenRun:kn(r)})},An(o))]})}function An(t){return t.kind==="run"?`run:${t.runId}`:`thread:${t.threadId}`}function qn(t){return e=>t({kind:"thread",threadId:e})}function kn(t){return e=>t({kind:"run",runId:e})}function Nn({runId:t,onOpenThread:e}){const s=xn(t);return s.isPending?l.jsx(Vs,{label:"run"}):s.isError?l.jsx(zs,{label:"This run",error:s.error,onRetry:()=>void s.refetch(),goneLabel:"This run no longer exists in the read-model."}):l.jsx(Xs,{detail:s.data,onOpenThread:e})}function Un({threadId:t,onOpenRun:e}){const s=Rn(t);return s.isPending?l.jsx(Vs,{label:"thread"}):s.isError?l.jsx(zs,{label:"This thread",error:s.error,onRetry:()=>void s.refetch(),goneLabel:"This thread no longer exists in the read-model."}):l.jsx(er,{detail:s.data,onOpenRun:e,runsHref:Gt("reliability",{threadId:t})})}function zs({label:t,error:e,onRetry:s,goneLabel:r}){return e instanceof Error&&e.message.startsWith("404")?l.jsx(sr,{label:r}):l.jsx(rr,{label:t,error:e,onRetry:s})}function Vs({label:t}){return l.jsxs(tr,{className:"animate-pulse p-6 text-sm text-muted-foreground","aria-busy":"true",children:["Loading ",t,"…"]})}const ve=25;function ft(t,e,s){return{page:t.data??{rows:[],total:0,page:e,pageSize:s},error:t.isError?t.error:null,retry:()=>void t.refetch()}}function Ln(){const{open:t}=vt(),[e,s]=b.useState(1),r=Cn(e,ve,{}),i=En();return l.jsx(nr,{table:ft(r,e,ve),onPageChange:s,onDecide:(a,o)=>i.mutateAsync({toolCallId:a,input:o}),onOpenRun:a=>t({kind:"run",runId:a})})}function Kn({range:t}){return l.jsx(ir,{rows:Bs(t).data.byModel})}const _n="501";function $n(){const t=On(),e=Dn(),s=t.isError&&t.error.message.startsWith(_n);return t.isError&&!s?l.jsx(ar,{label:"Pricing",error:t.error,onRetry:()=>void t.refetch()}):l.jsx(or,{prices:t.data??[],loading:t.isPending,unavailable:s,onUpsert:r=>e.mutateAsync(r),saving:e.isPending})}function Hn({range:t,threadId:e}){const{open:s}=vt(),r=mn(t),[i,a]=b.useState(1),[o,u]=b.useState(""),[h,v]=b.useState(""),p={...o!==""?{status:o}:{},...h!==""?{agentName:h}:{},...e!==void 0&&e!==""?{threadId:e}:{}},m=bn(i,ve,p);return l.jsx(ur,{overview:r.data,runsTable:ft(m,i,ve),runsWhere:p,onRunsStatusChange:f=>{u(f),a(1)},onRunsAgentNameChange:f=>{v(f),a(1)},onRunsThreadIdClear:()=>{a(1),window.location.hash=Gt("reliability")},onRunsPageChange:a,onOpenRun:f=>s({kind:"run",runId:f})})}function Bn(){const{open:t}=vt(),e=gn(),[s,r]=b.useState(1),[i,a]=b.useState(""),[o,u]=b.useState(""),h={...i!==""?{toolName:i}:{},...o!==""?{status:o}:{}},v=Sn(s,ve,h),[p,m]=b.useState(1),[f,C]=b.useState(""),I={...f!==""?{title:f}:{}},S=wn(p,ve,I);return l.jsx(cr,{toolCalls:e.data,toolCallsTable:ft(v,s,ve),toolCallsWhere:h,onToolCallsToolNameChange:w=>{a(w),r(1)},onToolCallsStatusChange:w=>{u(w),r(1)},onToolCallsPageChange:r,threadsTable:ft(S,p,ve),threadsWhere:I,onThreadsTitleChange:w=>{C(w),m(1)},onThreadsPageChange:m,onOpenRun:w=>t({kind:"run",runId:w}),onOpenThread:w=>t({kind:"thread",threadId:w})})}function Gn({range:t}){const{open:e}=vt(),{overview:s,topThreads:r}=yn(t);return l.jsx(lr,{overview:s,topThreads:r,onOpenThread:i=>e({kind:"thread",threadId:i})})}function Wn({range:t}){return l.jsx(hr,{rows:vn(t).data})}const zn=Dr,Vn=Fr;function Jn({className:t,align:e="end",sideOffset:s=6,...r}){return l.jsx(Qr,{children:l.jsx(Ir,{align:e,sideOffset:s,className:"z-50 outline-none",children:l.jsx(Mr,{className:dr("origin-[var(--transform-origin)] rounded-lg border border-line bg-popover p-3 text-popover-foreground shadow-lg shadow-black/50 outline-none","transition-[opacity,transform] duration-150 ease-out","data-[starting-style]:scale-95 data-[starting-style]:opacity-0","data-[ending-style]:scale-95 data-[ending-style]:opacity-0",t),...r})})})}function Yn(t=200){const[e,s]=b.useState([]),[r,i]=b.useState(!1),a=b.useRef(0);return b.useEffect(()=>{i(!0);const o=L.streamEvents(u=>{a.current+=1,s(h=>fr(h,u,a.current,t))});return()=>{i(!1),o()}},[t]),{events:e,connected:r}}const Js=[{key:"spend",label:"Spend & usage",icon:l.jsx(pr,{})},{key:"models",label:"Models",icon:l.jsx(yr,{})},{key:"actors",label:"Actors & budgets",icon:l.jsx(mr,{})},{key:"runs",label:"Runs & tools",icon:l.jsx(Vt,{})},{key:"reliability",label:"Reliability",icon:l.jsx(vr,{})},{key:"approvals",label:"Approvals",icon:l.jsx(gr,{})},{key:"tools",label:"Tools",icon:l.jsx(Vt,{})},{key:"pricing",label:"Pricing",icon:l.jsx(br,{})},{key:"live",label:"Live",icon:l.jsx(Sr,{})}],Zn=Object.fromEntries(Js.map(t=>[t.key,t.label]));function Xn(){const[t,e]=b.useState(()=>typeof window>"u"?{section:Gs,params:new URLSearchParams}:os(window.location.hash));return b.useEffect(()=>{function s(){e(os(window.location.hash))}return window.addEventListener("hashchange",s),()=>window.removeEventListener("hashchange",s)},[]),t}function ei(){const[t,e]=b.useState(fn()),{section:s,params:r}=Xn(),i=Yn(),a=Pn();return l.jsx(wr,{delay:400,closeDelay:0,timeout:300,children:l.jsx(Mn,{children:l.jsxs("div",{className:"relative min-h-full",children:[l.jsx("div",{className:"app-bg"}),l.jsxs("div",{className:"relative z-10 mx-auto max-w-[1180px] px-5 py-5",children:[l.jsx(si,{range:t,onRange:e,connected:i.connected,liveCount:i.events.length}),l.jsx("nav",{className:"mb-5 flex flex-wrap gap-1",children:Js.map(o=>{const u=o.key==="live"?i.events.length:o.key==="approvals"?a.data??0:0,h=s===o.key;return l.jsxs(Ps,{render:l.jsx("a",{href:Gt(o.key),...h?{"aria-current":"page"}:{}}),size:"md",variant:h?"default":"ghost",className:"gap-2 rounded-lg",children:[o.icon,o.label,u>0&&l.jsx(Cr,{variant:"accent",className:"tnum border-transparent bg-brand/20",children:u})]},o.key)})}),l.jsx(Pr,{label:Zn[s],children:l.jsx(ti,{section:s,range:t,params:r,liveEvents:i.events,connected:i.connected})},s)]})]})})})}function ti({section:t,range:e,params:s,liveEvents:r,connected:i}){switch(t){case"spend":return l.jsx(Gn,{range:e});case"models":return l.jsx(Kn,{range:e});case"actors":return l.jsx(Fn,{range:e});case"runs":return l.jsx(Bn,{});case"reliability":return l.jsx(Hn,{range:e,threadId:s.get("threadId")??void 0});case"approvals":return l.jsx(Ln,{});case"tools":return l.jsx(Wn,{range:e});case"pricing":return l.jsx($n,{});case"live":return l.jsx(Or,{events:r,connected:i});default:return null}}function si({range:t,onRange:e,connected:s,liveCount:r}){return l.jsxs("header",{className:"mb-5 flex flex-wrap items-center gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx("div",{className:"grid h-8 w-8 place-items-center rounded-lg border border-brand/40 bg-brand/10",children:l.jsx(xr,{className:"h-4 w-4 text-brand"})}),l.jsxs("div",{className:"leading-none",children:[l.jsx("div",{className:"text-sm font-semibold tracking-tight",children:"AI gateway"}),l.jsx("div",{className:"mono text-[10px] uppercase tracking-[0.2em] text-muted-foreground",children:"governance console"})]})]}),l.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[l.jsx(ri,{range:t,onRange:e}),l.jsxs("span",{className:"flex items-center gap-1.5 rounded-lg border border-line px-2.5 py-1.5 text-[11px] text-muted-foreground",children:[l.jsx(Rr,{tone:s?"live":"bad"}),"live ",r>0?`· ${r}`:""]})]})]})}function ri({range:t,onRange:e}){return l.jsxs(zn,{children:[l.jsxs(Vn,{render:l.jsx(Ps,{size:"md",variant:"outline",className:"mono gap-2 rounded-lg"}),children:[l.jsx(Tr,{width:12,height:12}),l.jsxs("span",{className:"tnum text-foreground",children:[t.fromDay," → ",t.toDay]})]}),l.jsxs(Jn,{className:"flex flex-col gap-2",children:[l.jsx(us,{label:"From",value:t.fromDay,onChange:s=>e({...t,fromDay:s})}),l.jsx(us,{label:"To",value:t.toDay,onChange:s=>e({...t,toDay:s})}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Whole UTC days, inclusive."})]})]})}function us({label:t,value:e,onChange:s}){return l.jsxs("label",{className:"flex items-center justify-between gap-3 rounded-lg border border-line bg-panel px-2.5 py-1 text-[11px] text-muted-foreground",children:[l.jsx("span",{className:"uppercase tracking-wider",children:t}),l.jsx(Er,{type:"date",value:e,onChange:r=>{const i=r.target.value;pn(i)&&s(i)}})]})}const ni=new un({defaultOptions:{queries:{retry:1}}}),cs=document.getElementById("root");cs&&jr.createRoot(cs).render(l.jsx(b.StrictMode,{children:l.jsx(Ar,{client:ni,children:l.jsx(ei,{})})}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as w,m as x,L as D,d as O,M as R,A as y,c,b as v,a as A,e as N,P as M,r as j,S as u,w as _,C as P,B as h,D as E,R as k,T as L}from"./index-Cchd2o0X.js";import{j as e,r as T}from"./base-ui-Bj5tb_Ph.js";import"./recharts-DPC0gOrj.js";const U=[{modelId:"gpt-4o",requests:4200,inputTokens:84e5,outputTokens:21e5,costUsd:84.2},{modelId:"claude-3-5-sonnet",requests:2600,inputTokens:52e5,outputTokens:13e5,costUsd:41.6},{modelId:"gpt-4o-mini",requests:9800,inputTokens:12e6,outputTokens:3e6,costUsd:9.4},{modelId:"llama-3-70b",requests:1200,inputTokens:21e5,outputTokens:64e4,costUsd:0}],K=[{actorRef:"tenant:acme",requests:8200,totalTokens:184e5,costUsd:78.1,actorLabel:"Acme Corp"},{actorRef:"user:davi@goflip.ai",requests:3100,totalTokens:69e5,costUsd:34.2,actorLabel:"Davi de Carvalho"},{actorRef:"tenant:globex",requests:4400,totalTokens:92e5,costUsd:21.8,actorLabel:null},{actorRef:"user:ops-bot",requests:2100,totalTokens:394e4,costUsd:1.1,actorLabel:null}],q={"tenant:acme":2e7,"user:davi@goflip.ai":5e6,"tenant:globex":12e6};function H(){const a=[];for(let t=29;t>=0;t-=1){const s=new Date(Date.now()-t*864e5).toISOString().slice(0,10),r=Math.sin(t/3)*.5+1;a.push({day:s,totalTokens:Math.round(7e5*r+t*4e3),costUsd:Number((4.2*r+t*.05).toFixed(2))})}return a}function B(){const a=[];for(let t=29;t>=0;t-=1){const s=new Date(Date.now()-t*864e5).toISOString().slice(0,10),r=Math.sin(t/3)*.5+1,i=Math.round(18*r+t*.3);a.push({day:s,runs:i,failed:Math.max(0,Math.round(i*.06))})}return a}const l={byModel:U,byActor:K,trend:H()},z={metrics:{runs:482,completed:461,failed:21,successRate:461/482,retries:34,durationP50Ms:640,durationP95Ms:2400},byAgent:[{agentName:"analyst",runs:210,failed:8,retries:14},{agentName:"billing-agent",runs:150,failed:9,retries:12},{agentName:"(default)",runs:122,failed:4,retries:8}],errors:[{errorCode:"TIMEOUT",count:9},{errorCode:"TOOL_ERROR",count:6},{errorCode:"RATE_LIMIT",count:4},{errorCode:"UNKNOWN",count:2}],trend:B()},b={runId:"r-7c31",threadId:"th2",actorRef:"user:ops-bot",agentName:"billing-agent",status:"failed",durationMs:4200,errorCode:"TIMEOUT",errorMessage:"upstream model request timed out after 3 attempts",retries:2,startedAt:new Date(Date.now()-21e4).toISOString(),promptHash:"ffeeddccbbaa99887766554433221100ffeeddccbbaa99887766554433221",parentRunId:null},S=[{runId:"r-9f2a",threadId:"th1",actorRef:"tenant:acme",agentName:"analyst",status:"completed",durationMs:820,errorCode:null,errorMessage:null,retries:0,startedAt:new Date(Date.now()-4e4).toISOString(),promptHash:"a1b2c3d4e5f60718293a4b5c6d7e8f9012345678901234567890abcdef01234",parentRunId:null},b,{runId:"r-a114",threadId:"th3",actorRef:"user:davi@goflip.ai",agentName:null,status:"completed",durationMs:1150,errorCode:null,errorMessage:null,retries:1,startedAt:new Date(Date.now()-54e4).toISOString(),promptHash:null,parentRunId:null},{runId:"r-b902",threadId:"th1",actorRef:"tenant:acme",agentName:"analyst",status:"failed",durationMs:980,errorCode:"TOOL_ERROR",errorMessage:"search_records returned a 500",retries:0,startedAt:new Date(Date.now()-132e4).toISOString(),promptHash:"a1b2c3d4e5f60718293a4b5c6d7e8f9012345678901234567890abcdef01234",parentRunId:null},{runId:"r-c447",threadId:"th2",actorRef:"user:ops-bot",agentName:"billing-agent",status:"running",durationMs:null,errorCode:null,errorMessage:null,retries:0,startedAt:new Date(Date.now()-8e3).toISOString(),promptHash:"ffeeddccbbaa99887766554433221100ffeeddccbbaa99887766554433221",parentRunId:"r-7c31"}],G=[{toolCallId:"tc-approve-1",runId:"r-c447",toolName:"delete_asset",input:{assetId:"asset-42",reason:"stale"},threadId:"th2",threadTitle:"Incident triage",actorRef:"user:ops-bot",agentName:"billing-agent",requestedAt:new Date(Date.now()-3e5).toISOString()},{toolCallId:"tc-approve-2",runId:"r-9f2a",toolName:"send_email",input:{to:"finance@acme.example",subject:"Q3 invoice adjustment"},threadId:"th1",threadTitle:"Q3 procurement review",actorRef:"tenant:acme",agentName:"analyst",requestedAt:new Date(Date.now()-9e5).toISOString()}],W=[{toolName:"search_records",toolType:"read",calls:420,failed:6,rejected:0,p50ExecutionMs:42,p95ExecutionMs:180},{toolName:"delete_asset",toolType:"action",calls:34,failed:1,rejected:4,p50ExecutionMs:310,p95ExecutionMs:620},{toolName:"send_email",toolType:"action",calls:58,failed:2,rejected:2,p50ExecutionMs:96,p95ExecutionMs:410},{toolName:"fetch_pricing",toolType:"read",calls:210,failed:0,rejected:0,p50ExecutionMs:88,p95ExecutionMs:95}],F=q,d=[{toolCallId:"tc1",runId:"r-9f2a",toolName:"search_records",toolType:"read",status:"ok",threadId:"th1",createdAt:new Date(Date.now()-12e3).toISOString()},{toolCallId:"tc2",runId:"r-7c31",toolName:"delete_asset",toolType:"action",status:"forbidden",threadId:"th2",createdAt:new Date(Date.now()-9e4).toISOString()},{toolCallId:"tc3",runId:"r-9f2a",toolName:"fetch_pricing",toolType:"read",status:"ok",threadId:"th1",createdAt:new Date(Date.now()-24e4).toISOString()},{toolCallId:"tc4",runId:"r-a114",toolName:"send_email",toolType:"action",status:"failed",threadId:"th3",createdAt:new Date(Date.now()-62e4).toISOString()},{toolCallId:"tc5",runId:null,toolName:"summarize_thread",toolType:"read",status:"ok",threadId:"th2",createdAt:new Date(Date.now()-12e5).toISOString()}],C={threadId:"th2",title:"Incident triage",actorRef:"user:ops-bot",messageCount:11,totalTokens:62e3,lastActivityAt:new Date(Date.now()-4e5).toISOString(),actorLabel:null},Q=[{threadId:"th1",title:"Q3 procurement review",actorRef:"tenant:acme",messageCount:24,totalTokens:184e3,lastActivityAt:new Date(Date.now()-3e4).toISOString(),actorLabel:"Acme Corp"},C,{threadId:"th3",title:"Contract summary",actorRef:"user:davi@goflip.ai",messageCount:6,totalTokens:28400,lastActivityAt:new Date(Date.now()-18e5).toISOString(),actorLabel:"Davi de Carvalho"}],V=[{threadId:"th1",title:"Q3 procurement review",actorRef:"tenant:acme",requests:24,totalTokens:184e3,costUsd:18.4,actorLabel:"Acme Corp"},{threadId:"th2",title:"Incident triage",actorRef:"user:ops-bot",requests:11,totalTokens:62e3,costUsd:6.2,actorLabel:null},{threadId:"th3",title:"Contract summary",actorRef:"user:davi@goflip.ai",requests:6,totalTokens:28400,costUsd:2.8,actorLabel:"Davi de Carvalho"}],p={rows:d,total:137,page:1,pageSize:25},g={rows:Q,total:46,page:1,pageSize:25},Y={rows:S,total:482,page:1,pageSize:25},J={rows:G,total:7,page:1,pageSize:25},m={run:b,thread:{threadId:"th2",title:"Incident triage",actorRef:"user:ops-bot",deleted:!1,actorLabel:null},toolCalls:[{toolCallId:"tc2",toolName:"delete_asset",toolType:"action",status:"forbidden",executionMs:null,executedByRef:"user:davi@goflip.ai",error:null,createdAt:new Date(Date.now()-215e3).toISOString()},{toolCallId:"tc9",toolName:"fetch_pricing",toolType:"read",status:"ok",executionMs:96,executedByRef:null,error:null,createdAt:new Date(Date.now()-213e3).toISOString()},{toolCallId:"tc10",toolName:"search_records",toolType:"read",status:"failed",executionMs:3980,executedByRef:null,error:"upstream returned 500 after 3 attempts",createdAt:new Date(Date.now()-212e3).toISOString()}]},I={thread:C,deleted:!1,usage:{requests:11,inputTokens:48e3,outputTokens:14e3,totalTokens:62e3,costUsd:6.2},runs:S.filter(a=>a.threadId==="th2"),runTotal:34,messages:[{messageId:"m1",role:"user",content:"The billing sync failed again overnight — can you find out which asset broke it?",truncated:!1,agentName:null,toolCallCount:0,createdAt:new Date(Date.now()-4e5).toISOString()},{messageId:"m2",role:"assistant",content:"I found 3 assets with a null billing code. Asset-42 is the only one touched by last night’s sync, so I want to delete it — that needs your approval.",truncated:!1,agentName:"billing-agent",toolCallCount:2,createdAt:new Date(Date.now()-38e4).toISOString()},{messageId:"m3",role:"assistant",content:"Here is the full audit trail for asset-42 across the last 90 days, starting with the ingest that first assigned it a billing code and continuing through every subsequent",truncated:!0,agentName:"billing-agent",toolCallCount:1,createdAt:new Date(Date.now()-36e4).toISOString()}]},X=[{modelId:"gpt-4o",inputPricePer1m:2.5,outputPricePer1m:10,cacheReadPricePer1m:1.25,effectiveFrom:new Date(Date.now()-5*864e5).toISOString()},{modelId:"claude-3-5-sonnet",inputPricePer1m:3,outputPricePer1m:15,cacheWritePricePer1m:3.75,cacheReadPricePer1m:.3,effectiveFrom:new Date(Date.now()-12*864e5).toISOString()},{modelId:"gpt-4o-mini",inputPricePer1m:.15,outputPricePer1m:.6,effectiveFrom:new Date(Date.now()-2*864e5).toISOString()}],Z=[{id:"e1",event:"run.started",ts:Date.now()-2e3,payload:{runId:"r-9f2",agentName:"analyst"}},{id:"e2",event:"tool-call",ts:Date.now()-5e3,payload:{toolName:"search_records",toolType:"read",status:"ok"}},{id:"e3",event:"quota.exceeded",ts:Date.now()-9e3,payload:{actorId:"tenant:globex",usedTokens:124e5,limitTokens:12e6}},{id:"e4",event:"tool-call",ts:Date.now()-14e3,payload:{toolName:"delete_asset",toolType:"action",status:"forbidden"}},{id:"e5",event:"delegated",ts:Date.now()-2e4,payload:{fromAgent:"router",toAgent:"billing-agent"}},{id:"e6",event:"run.finished",ts:Date.now()-26e3,payload:{runId:"r-8a1",steps:7,inputTokens:4200,outputTokens:1100}}];function n(a){return{page:a,error:null,retry:()=>{}}}function $(a,t){return{page:a,error:t,retry:()=>{}}}function ee(){const[a,t]=T.useState(null);return e.jsx(x,{delay:400,closeDelay:0,timeout:300,children:e.jsxs("div",{className:"relative min-h-full",children:[e.jsx("div",{className:"app-bg"}),e.jsxs("div",{className:"relative z-10 mx-auto max-w-[1180px] space-y-6 px-5 py-6",children:[e.jsxs("header",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"grid h-8 w-8 place-items-center rounded-lg border border-brand/40 bg-brand/10",children:e.jsx(D,{className:"h-4 w-4 text-brand"})}),e.jsxs("div",{className:"leading-none",children:[e.jsx("div",{className:"text-sm font-semibold tracking-tight",children:"AI gateway — preview"}),e.jsx("div",{className:"mono text-[10px] uppercase tracking-[0.2em] text-muted-foreground",children:"mock data · no backend"})]})]}),e.jsx(o,{label:"Spend & usage",children:e.jsx(O,{overview:l,topThreads:V,onOpenThread:()=>t("thread")})}),e.jsx(o,{label:"Models",children:e.jsx(R,{rows:l.byModel})}),e.jsx(o,{label:"Actors & budgets",children:e.jsx(y,{rows:l.byActor,budgets:F})}),e.jsx(o,{label:"Runs & tools",children:e.jsx(c,{toolCalls:d,toolCallsTable:n(p),toolCallsWhere:{},onToolCallsToolNameChange:()=>{},onToolCallsStatusChange:()=>{},onToolCallsPageChange:()=>{},threadsTable:n(g),threadsWhere:{},onThreadsTitleChange:()=>{},onThreadsPageChange:()=>{},onOpenRun:()=>t("run"),onOpenThread:()=>t("thread")})}),e.jsx(o,{label:"Reliability",children:e.jsx(v,{overview:z,runsTable:n(Y),runsWhere:{threadId:"th2"},onRunsStatusChange:()=>{},onRunsAgentNameChange:()=>{},onRunsThreadIdClear:()=>{},onRunsPageChange:()=>{},onOpenRun:()=>t("run")})}),e.jsx(o,{label:"Approvals",children:e.jsx(A,{table:n(J),onPageChange:()=>{},onDecide:async()=>{},onOpenRun:()=>t("run")})}),e.jsx(o,{label:"Tools",children:e.jsx(N,{rows:W})}),e.jsx(o,{label:"Pricing",children:e.jsx(M,{prices:X,loading:!1,unavailable:!1,onUpsert:async()=>{},saving:!1})}),e.jsx(o,{label:"Live",children:e.jsx(j,{events:Z,connected:!0})}),e.jsx(o,{label:"Failure & loading states",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(u,{label:"Spend & usage",error:new Error("503 Service Unavailable"),onRetry:()=>{}}),e.jsx(u,{label:"Pricing",error:new Error("401 Unauthorized"),onRetry:()=>{}}),e.jsx(_,{label:"Reliability"}),e.jsx(c,{toolCalls:d,toolCallsTable:$(p,new Error("500 Internal Server Error")),toolCallsWhere:{},onToolCallsToolNameChange:()=>{},onToolCallsStatusChange:()=>{},onToolCallsPageChange:()=>{},threadsTable:n(g),threadsWhere:{},onThreadsTitleChange:()=>{},onThreadsPageChange:()=>{}})]})}),e.jsx(o,{label:"Drill-downs",children:e.jsxs(P,{className:"flex flex-wrap gap-2 p-4 text-xs",children:[e.jsx(h,{size:"md",className:"rounded-lg",onClick:()=>t("run"),children:"Open a run"}),e.jsx(h,{size:"md",className:"rounded-lg",onClick:()=>t("thread"),children:"Open a thread"})]})})]}),a!==null&&e.jsx(E,{title:a==="run"?"Run":"Thread",subtitle:a==="run"?m.run.runId:I.thread.threadId,onClose:()=>t(null),...a==="run"?{onBack:()=>t("thread")}:{},children:a==="run"?e.jsx(k,{detail:m,onOpenThread:()=>t("thread")}):e.jsx(L,{detail:I,onOpenRun:()=>t("run"),runsHref:"#/reliability?threadId=th2"})})]})})}function o({label:a,children:t}){return e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground",children:a}),t]})}const f=document.getElementById("root");f&&w.createRoot(f).render(e.jsx(T.StrictMode,{children:e.jsx(ee,{})}));
|
|
1
|
+
import{v as w,m as x,L as D,d as O,M as R,A as y,c,b as v,a as A,e as N,P as M,r as j,S as u,w as _,C as P,B as h,D as E,R as k,T as L}from"./index-CTK2sMGd.js";import{j as e,r as T}from"./base-ui-CeQ9JhU_.js";import"./recharts-DSmxPXW6.js";const U=[{modelId:"gpt-4o",requests:4200,inputTokens:84e5,outputTokens:21e5,costUsd:84.2},{modelId:"claude-3-5-sonnet",requests:2600,inputTokens:52e5,outputTokens:13e5,costUsd:41.6},{modelId:"gpt-4o-mini",requests:9800,inputTokens:12e6,outputTokens:3e6,costUsd:9.4},{modelId:"llama-3-70b",requests:1200,inputTokens:21e5,outputTokens:64e4,costUsd:0}],K=[{actorRef:"tenant:acme",requests:8200,totalTokens:184e5,costUsd:78.1,actorLabel:"Acme Corp"},{actorRef:"user:davi@goflip.ai",requests:3100,totalTokens:69e5,costUsd:34.2,actorLabel:"Davi de Carvalho"},{actorRef:"tenant:globex",requests:4400,totalTokens:92e5,costUsd:21.8,actorLabel:null},{actorRef:"user:ops-bot",requests:2100,totalTokens:394e4,costUsd:1.1,actorLabel:null}],q={"tenant:acme":2e7,"user:davi@goflip.ai":5e6,"tenant:globex":12e6};function H(){const a=[];for(let t=29;t>=0;t-=1){const s=new Date(Date.now()-t*864e5).toISOString().slice(0,10),r=Math.sin(t/3)*.5+1;a.push({day:s,totalTokens:Math.round(7e5*r+t*4e3),costUsd:Number((4.2*r+t*.05).toFixed(2))})}return a}function B(){const a=[];for(let t=29;t>=0;t-=1){const s=new Date(Date.now()-t*864e5).toISOString().slice(0,10),r=Math.sin(t/3)*.5+1,i=Math.round(18*r+t*.3);a.push({day:s,runs:i,failed:Math.max(0,Math.round(i*.06))})}return a}const l={byModel:U,byActor:K,trend:H()},z={metrics:{runs:482,completed:461,failed:21,successRate:461/482,retries:34,durationP50Ms:640,durationP95Ms:2400},byAgent:[{agentName:"analyst",runs:210,failed:8,retries:14},{agentName:"billing-agent",runs:150,failed:9,retries:12},{agentName:"(default)",runs:122,failed:4,retries:8}],errors:[{errorCode:"TIMEOUT",count:9},{errorCode:"TOOL_ERROR",count:6},{errorCode:"RATE_LIMIT",count:4},{errorCode:"UNKNOWN",count:2}],trend:B()},b={runId:"r-7c31",threadId:"th2",actorRef:"user:ops-bot",agentName:"billing-agent",status:"failed",durationMs:4200,errorCode:"TIMEOUT",errorMessage:"upstream model request timed out after 3 attempts",retries:2,startedAt:new Date(Date.now()-21e4).toISOString(),promptHash:"ffeeddccbbaa99887766554433221100ffeeddccbbaa99887766554433221",parentRunId:null},S=[{runId:"r-9f2a",threadId:"th1",actorRef:"tenant:acme",agentName:"analyst",status:"completed",durationMs:820,errorCode:null,errorMessage:null,retries:0,startedAt:new Date(Date.now()-4e4).toISOString(),promptHash:"a1b2c3d4e5f60718293a4b5c6d7e8f9012345678901234567890abcdef01234",parentRunId:null},b,{runId:"r-a114",threadId:"th3",actorRef:"user:davi@goflip.ai",agentName:null,status:"completed",durationMs:1150,errorCode:null,errorMessage:null,retries:1,startedAt:new Date(Date.now()-54e4).toISOString(),promptHash:null,parentRunId:null},{runId:"r-b902",threadId:"th1",actorRef:"tenant:acme",agentName:"analyst",status:"failed",durationMs:980,errorCode:"TOOL_ERROR",errorMessage:"search_records returned a 500",retries:0,startedAt:new Date(Date.now()-132e4).toISOString(),promptHash:"a1b2c3d4e5f60718293a4b5c6d7e8f9012345678901234567890abcdef01234",parentRunId:null},{runId:"r-c447",threadId:"th2",actorRef:"user:ops-bot",agentName:"billing-agent",status:"running",durationMs:null,errorCode:null,errorMessage:null,retries:0,startedAt:new Date(Date.now()-8e3).toISOString(),promptHash:"ffeeddccbbaa99887766554433221100ffeeddccbbaa99887766554433221",parentRunId:"r-7c31"}],G=[{toolCallId:"tc-approve-1",runId:"r-c447",toolName:"delete_asset",input:{assetId:"asset-42",reason:"stale"},threadId:"th2",threadTitle:"Incident triage",actorRef:"user:ops-bot",agentName:"billing-agent",requestedAt:new Date(Date.now()-3e5).toISOString()},{toolCallId:"tc-approve-2",runId:"r-9f2a",toolName:"send_email",input:{to:"finance@acme.example",subject:"Q3 invoice adjustment"},threadId:"th1",threadTitle:"Q3 procurement review",actorRef:"tenant:acme",agentName:"analyst",requestedAt:new Date(Date.now()-9e5).toISOString()}],W=[{toolName:"search_records",toolType:"read",calls:420,failed:6,rejected:0,p50ExecutionMs:42,p95ExecutionMs:180},{toolName:"delete_asset",toolType:"action",calls:34,failed:1,rejected:4,p50ExecutionMs:310,p95ExecutionMs:620},{toolName:"send_email",toolType:"action",calls:58,failed:2,rejected:2,p50ExecutionMs:96,p95ExecutionMs:410},{toolName:"fetch_pricing",toolType:"read",calls:210,failed:0,rejected:0,p50ExecutionMs:88,p95ExecutionMs:95}],F=q,d=[{toolCallId:"tc1",runId:"r-9f2a",toolName:"search_records",toolType:"read",status:"ok",threadId:"th1",createdAt:new Date(Date.now()-12e3).toISOString()},{toolCallId:"tc2",runId:"r-7c31",toolName:"delete_asset",toolType:"action",status:"forbidden",threadId:"th2",createdAt:new Date(Date.now()-9e4).toISOString()},{toolCallId:"tc3",runId:"r-9f2a",toolName:"fetch_pricing",toolType:"read",status:"ok",threadId:"th1",createdAt:new Date(Date.now()-24e4).toISOString()},{toolCallId:"tc4",runId:"r-a114",toolName:"send_email",toolType:"action",status:"failed",threadId:"th3",createdAt:new Date(Date.now()-62e4).toISOString()},{toolCallId:"tc5",runId:null,toolName:"summarize_thread",toolType:"read",status:"ok",threadId:"th2",createdAt:new Date(Date.now()-12e5).toISOString()}],C={threadId:"th2",title:"Incident triage",actorRef:"user:ops-bot",messageCount:11,totalTokens:62e3,lastActivityAt:new Date(Date.now()-4e5).toISOString(),actorLabel:null},Q=[{threadId:"th1",title:"Q3 procurement review",actorRef:"tenant:acme",messageCount:24,totalTokens:184e3,lastActivityAt:new Date(Date.now()-3e4).toISOString(),actorLabel:"Acme Corp"},C,{threadId:"th3",title:"Contract summary",actorRef:"user:davi@goflip.ai",messageCount:6,totalTokens:28400,lastActivityAt:new Date(Date.now()-18e5).toISOString(),actorLabel:"Davi de Carvalho"}],V=[{threadId:"th1",title:"Q3 procurement review",actorRef:"tenant:acme",requests:24,totalTokens:184e3,costUsd:18.4,actorLabel:"Acme Corp"},{threadId:"th2",title:"Incident triage",actorRef:"user:ops-bot",requests:11,totalTokens:62e3,costUsd:6.2,actorLabel:null},{threadId:"th3",title:"Contract summary",actorRef:"user:davi@goflip.ai",requests:6,totalTokens:28400,costUsd:2.8,actorLabel:"Davi de Carvalho"}],p={rows:d,total:137,page:1,pageSize:25},g={rows:Q,total:46,page:1,pageSize:25},Y={rows:S,total:482,page:1,pageSize:25},J={rows:G,total:7,page:1,pageSize:25},m={run:b,thread:{threadId:"th2",title:"Incident triage",actorRef:"user:ops-bot",deleted:!1,actorLabel:null},toolCalls:[{toolCallId:"tc2",toolName:"delete_asset",toolType:"action",status:"forbidden",executionMs:null,executedByRef:"user:davi@goflip.ai",error:null,createdAt:new Date(Date.now()-215e3).toISOString()},{toolCallId:"tc9",toolName:"fetch_pricing",toolType:"read",status:"ok",executionMs:96,executedByRef:null,error:null,createdAt:new Date(Date.now()-213e3).toISOString()},{toolCallId:"tc10",toolName:"search_records",toolType:"read",status:"failed",executionMs:3980,executedByRef:null,error:"upstream returned 500 after 3 attempts",createdAt:new Date(Date.now()-212e3).toISOString()}]},I={thread:C,deleted:!1,usage:{requests:11,inputTokens:48e3,outputTokens:14e3,totalTokens:62e3,costUsd:6.2},runs:S.filter(a=>a.threadId==="th2"),runTotal:34,messages:[{messageId:"m1",role:"user",content:"The billing sync failed again overnight — can you find out which asset broke it?",truncated:!1,agentName:null,toolCallCount:0,createdAt:new Date(Date.now()-4e5).toISOString()},{messageId:"m2",role:"assistant",content:"I found 3 assets with a null billing code. Asset-42 is the only one touched by last night’s sync, so I want to delete it — that needs your approval.",truncated:!1,agentName:"billing-agent",toolCallCount:2,createdAt:new Date(Date.now()-38e4).toISOString()},{messageId:"m3",role:"assistant",content:"Here is the full audit trail for asset-42 across the last 90 days, starting with the ingest that first assigned it a billing code and continuing through every subsequent",truncated:!0,agentName:"billing-agent",toolCallCount:1,createdAt:new Date(Date.now()-36e4).toISOString()}]},X=[{modelId:"gpt-4o",inputPricePer1m:2.5,outputPricePer1m:10,cacheReadPricePer1m:1.25,effectiveFrom:new Date(Date.now()-5*864e5).toISOString()},{modelId:"claude-3-5-sonnet",inputPricePer1m:3,outputPricePer1m:15,cacheWritePricePer1m:3.75,cacheReadPricePer1m:.3,effectiveFrom:new Date(Date.now()-12*864e5).toISOString()},{modelId:"gpt-4o-mini",inputPricePer1m:.15,outputPricePer1m:.6,effectiveFrom:new Date(Date.now()-2*864e5).toISOString()}],Z=[{id:"e1",event:"run.started",ts:Date.now()-2e3,payload:{runId:"r-9f2",agentName:"analyst"}},{id:"e2",event:"tool-call",ts:Date.now()-5e3,payload:{toolName:"search_records",toolType:"read",status:"ok"}},{id:"e3",event:"quota.exceeded",ts:Date.now()-9e3,payload:{actorId:"tenant:globex",usedTokens:124e5,limitTokens:12e6}},{id:"e4",event:"tool-call",ts:Date.now()-14e3,payload:{toolName:"delete_asset",toolType:"action",status:"forbidden"}},{id:"e5",event:"delegated",ts:Date.now()-2e4,payload:{fromAgent:"router",toAgent:"billing-agent"}},{id:"e6",event:"run.finished",ts:Date.now()-26e3,payload:{runId:"r-8a1",steps:7,inputTokens:4200,outputTokens:1100}}];function n(a){return{page:a,error:null,retry:()=>{}}}function $(a,t){return{page:a,error:t,retry:()=>{}}}function ee(){const[a,t]=T.useState(null);return e.jsx(x,{delay:400,closeDelay:0,timeout:300,children:e.jsxs("div",{className:"relative min-h-full",children:[e.jsx("div",{className:"app-bg"}),e.jsxs("div",{className:"relative z-10 mx-auto max-w-[1180px] space-y-6 px-5 py-6",children:[e.jsxs("header",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"grid h-8 w-8 place-items-center rounded-lg border border-brand/40 bg-brand/10",children:e.jsx(D,{className:"h-4 w-4 text-brand"})}),e.jsxs("div",{className:"leading-none",children:[e.jsx("div",{className:"text-sm font-semibold tracking-tight",children:"AI gateway — preview"}),e.jsx("div",{className:"mono text-[10px] uppercase tracking-[0.2em] text-muted-foreground",children:"mock data · no backend"})]})]}),e.jsx(o,{label:"Spend & usage",children:e.jsx(O,{overview:l,topThreads:V,onOpenThread:()=>t("thread")})}),e.jsx(o,{label:"Models",children:e.jsx(R,{rows:l.byModel})}),e.jsx(o,{label:"Actors & budgets",children:e.jsx(y,{rows:l.byActor,budgets:F})}),e.jsx(o,{label:"Runs & tools",children:e.jsx(c,{toolCalls:d,toolCallsTable:n(p),toolCallsWhere:{},onToolCallsToolNameChange:()=>{},onToolCallsStatusChange:()=>{},onToolCallsPageChange:()=>{},threadsTable:n(g),threadsWhere:{},onThreadsTitleChange:()=>{},onThreadsPageChange:()=>{},onOpenRun:()=>t("run"),onOpenThread:()=>t("thread")})}),e.jsx(o,{label:"Reliability",children:e.jsx(v,{overview:z,runsTable:n(Y),runsWhere:{threadId:"th2"},onRunsStatusChange:()=>{},onRunsAgentNameChange:()=>{},onRunsThreadIdClear:()=>{},onRunsPageChange:()=>{},onOpenRun:()=>t("run")})}),e.jsx(o,{label:"Approvals",children:e.jsx(A,{table:n(J),onPageChange:()=>{},onDecide:async()=>{},onOpenRun:()=>t("run")})}),e.jsx(o,{label:"Tools",children:e.jsx(N,{rows:W})}),e.jsx(o,{label:"Pricing",children:e.jsx(M,{prices:X,loading:!1,unavailable:!1,onUpsert:async()=>{},saving:!1})}),e.jsx(o,{label:"Live",children:e.jsx(j,{events:Z,connected:!0})}),e.jsx(o,{label:"Failure & loading states",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(u,{label:"Spend & usage",error:new Error("503 Service Unavailable"),onRetry:()=>{}}),e.jsx(u,{label:"Pricing",error:new Error("401 Unauthorized"),onRetry:()=>{}}),e.jsx(_,{label:"Reliability"}),e.jsx(c,{toolCalls:d,toolCallsTable:$(p,new Error("500 Internal Server Error")),toolCallsWhere:{},onToolCallsToolNameChange:()=>{},onToolCallsStatusChange:()=>{},onToolCallsPageChange:()=>{},threadsTable:n(g),threadsWhere:{},onThreadsTitleChange:()=>{},onThreadsPageChange:()=>{}})]})}),e.jsx(o,{label:"Drill-downs",children:e.jsxs(P,{className:"flex flex-wrap gap-2 p-4 text-xs",children:[e.jsx(h,{size:"md",className:"rounded-lg",onClick:()=>t("run"),children:"Open a run"}),e.jsx(h,{size:"md",className:"rounded-lg",onClick:()=>t("thread"),children:"Open a thread"})]})})]}),a!==null&&e.jsx(E,{title:a==="run"?"Run":"Thread",subtitle:a==="run"?m.run.runId:I.thread.threadId,onClose:()=>t(null),...a==="run"?{onBack:()=>t("thread")}:{},children:a==="run"?e.jsx(k,{detail:m,onOpenThread:()=>t("thread")}):e.jsx(L,{detail:I,onOpenRun:()=>t("run"),runsHref:"#/reliability?threadId=th2"})})]})})}function o({label:a,children:t}){return e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground",children:a}),t]})}const f=document.getElementById("root");f&&w.createRoot(f).render(e.jsx(T.StrictMode,{children:e.jsx(ee,{})}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var C0=Object.defineProperty;var k0=(e,t,r)=>t in e?C0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var di=(e,t,r)=>k0(e,typeof t!="symbol"?t+"":t,r);import{r as v,w as _0,c as O,a as Uv,g as j0,R as T0}from"./base-ui-Bj5tb_Ph.js";function Hv(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=Hv(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Q(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Hv(e))&&(n&&(n+=" "),n+=t);return n}var D0=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Hl(e){if(typeof e!="string")return!1;var t=D0;return t.includes(e)}var M0=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],$0=new Set(M0);function Yv(e){return typeof e!="string"?!1:$0.has(e)}function Vv(e){return typeof e=="string"&&e.startsWith("data-")}function Ue(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Yv(r)||Vv(r))&&(t[r]=e[r]);return t}function Hr(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Ue(t)}return typeof e=="object"&&!Array.isArray(e)?Ue(e):null}function Qe(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Yv(r)||Vv(r)||Hl(r))&&(t[r]=e[r]);return t}function N0(e){return e==null?null:v.isValidElement(e)?Qe(e.props):typeof e=="object"&&!Array.isArray(e)?Qe(e):null}var L0=["children","width","height","viewBox","className","style","title","desc"];function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qo.apply(null,arguments)}function R0(e,t){if(e==null)return{};var r,n,i=z0(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function z0(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Gv=v.forwardRef((e,t)=>{var r=e.children,n=e.width,i=e.height,a=e.viewBox,o=e.className,l=e.style,u=e.title,c=e.desc,s=R0(e,L0),f=a||{width:n,height:i,x:0,y:0},d=Q("recharts-surface",o);return v.createElement("svg",Qo({},Qe(s),{className:d,width:n,height:i,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),v.createElement("title",null,u),v.createElement("desc",null,c),r)}),B0=["children","className"];function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jo.apply(null,arguments)}function W0(e,t){if(e==null)return{};var r,n,i=F0(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function F0(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ge=v.forwardRef((e,t)=>{var r=e.children,n=e.className,i=W0(e,B0),a=Q("recharts-layer",n);return v.createElement("g",Jo({className:a},Qe(i),{ref:t}),r)});function el(e){return e==="__proto__"}function qv(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function Yl(e){var t;return typeof e=="string"||typeof e=="symbol"?e:Object.is((t=e==null?void 0:e.valueOf)==null?void 0:t.call(e),-0)?"-0":String(e)}function Xv(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(Xv).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function Vl(e){if(Array.isArray(e))return e.map(Yl);if(typeof e=="symbol")return[e];e=Xv(e);const t=[],r=e.length;if(r===0)return t;let n=0,i="",a="",o=!1;for(e.charCodeAt(0)===46&&t.push("");n<r;){const l=e[n];if(a)l==="\\"&&n+1<r?(n++,i+=e[n]):l===a?a="":i+=l;else if(o)l==='"'||l==="'"?a=l:l==="]"?(o=!1,t.push(i),i=""):i+=l;else if(l==="[")o=!0,i&&(t.push(i),i="");else if(l==="."){i&&(t.push(i),i="");const u=e[n+1];(u===void 0||u===".")&&t.push("")}else i+=l;n++}return i&&t.push(i),t}function Et(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(el(t))return r;const n=e[t];return n===void 0?qv(t)&&!Object.hasOwn(e,t)?Et(e,Vl(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=Yl(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return K0(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),el(t))return r;const n=e[t];return n===void 0?r:n}}}function K0(e,t,r){if(t.length===0)return r;let n=e;for(let i=0;i<t.length;i++){if(n==null||el(t[i]))return r;n=n[t[i]]}return n===void 0?r:n}var U0=4;function Dt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:U0,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function ke(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,a,o)=>{var l=r[o-1];return typeof l=="string"?i+l+a:l!==void 0?i+Dt(l)+a:i+a},"")}var $e=e=>e===0?0:e>0?1:-1,It=e=>typeof e=="number"&&e!=+e,br=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,D=e=>(typeof e=="number"||e instanceof Number)&&!It(e),Ct=e=>D(e)||typeof e=="string",H0=0,Tn=e=>{var t=++H0;return"".concat(e||"").concat(t)},Xe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!D(t)&&typeof t!="string")return n;var a;if(br(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return It(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Zv=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function ze(e,t,r){return D(e)&&D(t)?Dt(e+r*(t-e)):t}function Qv(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Et(n,t))===r)}var pe=e=>e===null||typeof e>"u",Gl=e=>pe(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Be(e){return e!=null}function Er(){}function ql(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Zc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zc(Object(r),!0).forEach(function(n){Y0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y0(e,t,r){return(t=V0(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V0(e){var t=G0(e,"string");return typeof t=="symbol"?t:t+""}function G0(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var q0=e=>{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,a=e.parentViewBox,o=ql(t),l=o.x,u=o.y,c=o.height,s=o.upperWidth,f=o.lowerWidth,d=l,h=l+(s-f)/2,p=(d+h)/2,m=(s+f)/2,y=d+s/2,g=c>=0?1:-1,x=g*i,w=g>0?"end":"start",A=g>0?"start":"end",P=s>=0?1:-1,b=P*i,S=P>0?"end":"start",I=P>0?"start":"end",C=a;if(r==="top"){var k={x:d+s/2,y:u-x,horizontalAnchor:"middle",verticalAnchor:w};return C&&(k.height=Math.max(u-C.y,0),k.width=s),k}if(r==="bottom"){var _={x:h+f/2,y:u+c+x,horizontalAnchor:"middle",verticalAnchor:A};return C&&(_.height=Math.max(C.y+C.height-(u+c),0),_.width=f),_}if(r==="left"){var E={x:p-b,y:u+c/2,horizontalAnchor:S,verticalAnchor:"middle"};return C&&(E.width=Math.max(E.x-C.x,0),E.height=c),E}if(r==="right"){var L={x:p+m+b,y:u+c/2,horizontalAnchor:I,verticalAnchor:"middle"};return C&&(L.width=Math.max(C.x+C.width-L.x,0),L.height=c),L}var T=C?{width:m,height:c}:{};return r==="insideLeft"?gt({x:p+b,y:u+c/2,horizontalAnchor:I,verticalAnchor:"middle"},T):r==="insideRight"?gt({x:p+m-b,y:u+c/2,horizontalAnchor:S,verticalAnchor:"middle"},T):r==="insideTop"?gt({x:d+s/2,y:u+x,horizontalAnchor:"middle",verticalAnchor:A},T):r==="insideBottom"?gt({x:h+f/2,y:u+c-x,horizontalAnchor:"middle",verticalAnchor:w},T):r==="insideTopLeft"?gt({x:d+b,y:u+x,horizontalAnchor:I,verticalAnchor:A},T):r==="insideTopRight"?gt({x:d+s-b,y:u+x,horizontalAnchor:S,verticalAnchor:A},T):r==="insideBottomLeft"?gt({x:h+b,y:u+c-x,horizontalAnchor:I,verticalAnchor:w},T):r==="insideBottomRight"?gt({x:h+f-b,y:u+c-x,horizontalAnchor:S,verticalAnchor:w},T):r&&typeof r=="object"&&(D(r.x)||br(r.x))&&(D(r.y)||br(r.y))?gt({x:l+Xe(r.x,m),y:u+Xe(r.y,c),horizontalAnchor:"end",verticalAnchor:"end"},T):gt({x:y,y:u+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},T)},X0=["top","left","right","bottom"];function Z0(e){return e==null?!1:typeof e=="object"?!0:X0.includes(e)}var Q0=v.createContext(null);function se(e){return function(){return e}}const tl=Math.PI,rl=2*tl,ur=1e-6,J0=rl-ur;function Jv(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function eb(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Jv;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class tb{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Jv:eb(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,u=n-t,c=i-r,s=o-t,f=l-r,d=s*s+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>ur)if(!(Math.abs(f*u-c*s)>ur)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,p=i-l,m=u*u+c*c,y=h*h+p*p,g=Math.sqrt(m),x=Math.sqrt(d),w=a*Math.tan((tl-Math.acos((m+d-y)/(2*g*x)))/2),A=w/x,P=w/g;Math.abs(A-1)>ur&&this._append`L${t+A*s},${r+A*f}`,this._append`A${a},${a},0,0,${+(f*h>s*p)},${this._x1=t+P*u},${this._y1=r+P*c}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),c=t+l,s=r+u,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>ur||Math.abs(this._y1-s)>ur)&&this._append`L${c},${s}`,n&&(d<0&&(d=d%rl+rl),d>J0?this._append`A${n},${n},0,1,${f},${t-l},${r-u}A${n},${n},0,1,${f},${this._x1=c},${this._y1=s}`:d>ur&&this._append`A${n},${n},0,${+(d>=tl)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function eh(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new tb(t)}function Xl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function th(e){this._context=e}th.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sa(e){return new th(e)}function rh(e){return e[0]}function nh(e){return e[1]}function ih(e,t){var r=se(!0),n=null,i=Sa,a=null,o=eh(l);e=typeof e=="function"?e:e===void 0?rh:se(e),t=typeof t=="function"?t:t===void 0?nh:se(t);function l(u){var c,s=(u=Xl(u)).length,f,d=!1,h;for(n==null&&(a=i(h=o())),c=0;c<=s;++c)!(c<s&&r(f=u[c],c,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,c,u),+t(f,c,u));if(h)return a=null,h+""||null}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:se(+u),l):e},l.y=function(u){return arguments.length?(t=typeof u=="function"?u:se(+u),l):t},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:se(!!u),l):r},l.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),l):i},l.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),l):n},l}function vi(e,t,r){var n=null,i=se(!0),a=null,o=Sa,l=null,u=eh(c);e=typeof e=="function"?e:e===void 0?rh:se(+e),t=typeof t=="function"?t:se(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?nh:se(+r);function c(f){var d,h,p,m=(f=Xl(f)).length,y,g=!1,x,w=new Array(m),A=new Array(m);for(a==null&&(l=o(x=u())),d=0;d<=m;++d){if(!(d<m&&i(y=f[d],d,f))===g)if(g=!g)h=d,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),p=d-1;p>=h;--p)l.point(w[p],A[p]);l.lineEnd(),l.areaEnd()}g&&(w[d]=+e(y,d,f),A[d]=+t(y,d,f),l.point(n?+n(y,d,f):w[d],r?+r(y,d,f):A[d]))}if(x)return l=null,x+""||null}function s(){return ih().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:se(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:se(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:se(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:se(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:se(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:se(+f),c):r},c.lineX0=c.lineY0=function(){return s().x(e).y(t)},c.lineY1=function(){return s().x(e).y(r)},c.lineX1=function(){return s().x(n).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:se(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(l=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=l=null:l=o(a=f),c):a},c}class ah{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function rb(e){return new ah(e,!0)}function nb(e){return new ah(e,!1)}function Di(){}function Mi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function oh(e){this._context=e}oh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Mi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Mi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ib(e){return new oh(e)}function lh(e){this._context=e}lh.prototype={areaStart:Di,areaEnd:Di,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Mi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ab(e){return new lh(e)}function uh(e){this._context=e}uh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Mi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ob(e){return new uh(e)}function ch(e){this._context=e}ch.prototype={areaStart:Di,areaEnd:Di,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function lb(e){return new ch(e)}function Qc(e){return e<0?-1:1}function Jc(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(a*i+o*n)/(n+i);return(Qc(a)+Qc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function es(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Eo(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,o-l*r,a,o)}function $i(e){this._context=e}$i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Eo(this,this._t0,es(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Eo(this,es(this,r=Jc(this,e,t)),r);break;default:Eo(this,this._t0,r=Jc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function sh(e){this._context=new fh(e)}(sh.prototype=Object.create($i.prototype)).point=function(e,t){$i.prototype.point.call(this,t,e)};function fh(e){this._context=e}fh.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function ub(e){return new $i(e)}function cb(e){return new sh(e)}function dh(e){this._context=e}dh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=ts(e),i=ts(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function ts(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function sb(e){return new dh(e)}function Ea(e,t){this._context=e,this._t=t}Ea.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function fb(e){return new Ea(e,.5)}function db(e){return new Ea(e,0)}function vb(e){return new Ea(e,1)}function xr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,l=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function nl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function hb(e,t){return e[t]}function pb(e){const t=[];return t.key=e,t}function mb(){var e=se([]),t=nl,r=xr,n=hb;function i(a){var o=Array.from(e.apply(this,arguments),pb),l,u=o.length,c=-1,s;for(const f of a)for(l=0,++c;l<u;++l)(o[l][c]=[0,+n(f,o[l].key,c,a)]).data=f;for(l=0,s=Xl(t(o));l<u;++l)o[s[l]].index=l;return r(o,s),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:se(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:se(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?nl:typeof a=="function"?a:se(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??xr,i):r},i}function yb(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}xr(e,t)}}function gb(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,l=0;o<i;++o)l+=e[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}xr(e,t)}}function bb(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var l=0,u=0,c=0;l<o;++l){for(var s=e[t[l]],f=s[n][1]||0,d=s[n-1][1]||0,h=(f-d)/2,p=0;p<l;++p){var m=e[t[p]],y=m[n][1]||0,g=m[n-1][1]||0;h+=y-g}u+=f,c+=h*f}i[n-1][1]+=i[n-1][0]=r,u&&(r-=c/u)}i[n-1][1]+=i[n-1][0]=r,xr(e,t)}}var vh=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Zl=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Hl(i)&&typeof r[i]=="function"&&(n[i]=a=>r[i](r,a))}),n},xb=(e,t,r)=>n=>(e(t,r,n),null),hh=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];Hl(i)&&typeof a=="function"&&(n||(n={}),n[i]=xb(a,t,r))}),n};function rs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rs(Object(r),!0).forEach(function(n){Ab(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ab(e,t,r){return(t=Pb(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pb(e){var t=Ob(e,"string");return typeof t=="symbol"?t:t+""}function Ob(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function je(e,t){var r=wb({},e),n=t,i=Object.keys(t),a=i.reduce((o,l)=>(o[l]===void 0&&n[l]!==void 0&&(o[l]=n[l]),o),r);return a}function Sb(e,t){const r=new Map;for(let n=0;n<e.length;n++){const i=e[n],a=t(i,n,e);r.has(a)||r.set(a,i)}return Array.from(r.values())}function Eb(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function ph(e){return e}function Ib(e){return function(t){return Et(t,e)}}function il(e){return e==null||typeof e!="object"&&typeof e!="function"}function Cb(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function al(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Dn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const mh="[object RegExp]",Ql="[object String]",Jl="[object Number]",eu="[object Boolean]",yh="[object Arguments]",gh="[object Symbol]",bh="[object Date]",xh="[object Map]",wh="[object Set]",Ah="[object Array]",kb="[object Function]",Ph="[object ArrayBuffer]",Ci="[object Object]",_b="[object Error]",Oh="[object DataView]",Sh="[object Uint8Array]",Eh="[object Uint8ClampedArray]",Ih="[object Uint16Array]",Ch="[object Uint32Array]",jb="[object BigUint64Array]",kh="[object Int8Array]",_h="[object Int16Array]",jh="[object Int32Array]",Tb="[object BigInt64Array]",Th="[object Float32Array]",Dh="[object Float64Array]",ns=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}();function ol(e){return typeof ns.Buffer<"u"&&ns.Buffer.isBuffer(e)}function Db(e,t){return fr(e,void 0,e,new Map,t)}function fr(e,t,r,n=new Map,i=void 0){const a=i==null?void 0:i(e,t,r,n);if(a!==void 0)return a;if(il(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const o=new Array(e.length);n.set(e,o);for(let l=0;l<e.length;l++)o[l]=fr(e[l],l,r,n,i);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;n.set(e,o);for(const[l,u]of e)o.set(l,fr(u,l,r,n,i));return o}if(e instanceof Set){const o=new Set;n.set(e,o);for(const l of e)o.add(fr(l,void 0,r,n,i));return o}if(ol(e))return e.subarray();if(Cb(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,o);for(let l=0;l<e.length;l++)o[l]=fr(e[l],l,r,n,i);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,o),ft(o,e,r,n,i),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return n.set(e,o),ft(o,e,r,n,i),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return n.set(e,o),ft(o,e,r,n,i),o}if(e instanceof Error){const o=structuredClone(e);return n.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,ft(o,e,r,n,i),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return n.set(e,o),ft(o,e,r,n,i),o}if(e instanceof Number){const o=new Number(e.valueOf());return n.set(e,o),ft(o,e,r,n,i),o}if(e instanceof String){const o=new String(e.valueOf());return n.set(e,o),ft(o,e,r,n,i),o}if(typeof e=="object"&&Mb(e)){const o=Object.create(Object.getPrototypeOf(e));return n.set(e,o),ft(o,e,r,n,i),o}return e}function ft(e,t,r=e,n,i){const a=[...Object.keys(t),...al(t)];for(let o=0;o<a.length;o++){const l=a[o],u=Object.getOwnPropertyDescriptor(e,l);(u==null||u.writable)&&(e[l]=fr(t[l],l,r,n,i))}}function Mb(e){switch(Dn(e)){case yh:case Ah:case Ph:case Oh:case eu:case bh:case Th:case Dh:case kh:case _h:case jh:case xh:case Jl:case Ci:case mh:case wh:case Ql:case gh:case Sh:case Eh:case Ih:case Ch:return!0;default:return!1}}function $b(e){return fr(e,void 0,e,new Map,void 0)}function In(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Mh(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function $h(e,t,r){return typeof r!="function"?$h(e,t,()=>{}):ll(e,t,function n(i,a,o,l,u,c){const s=r(i,a,o,l,u,c);return s!==void 0?!!s:ll(i,a,n,c,!1)},new Map,!0)}function ll(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return Nb(e,t,r,n);case"function":return Object.keys(t).length>0?ll(e,{...t},r,n,i):In(e,t);default:return Mh(e)&&i?typeof t=="string"?t==="":!0:In(e,t)}}function Nb(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return Nh(e,t,r,n);if(t instanceof Map)return Lb(e,t,r,n);if(t instanceof Set)return Rb(e,t,r,n);const i=Object.keys(t);if(e==null||il(e))return i.length===0;if(i.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let a=0;a<i.length;a++){const o=i[a];if(!il(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!r(e[o],t[o],o,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function Lb(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[i,a]of t.entries())if(r(e.get(i),a,i,e,t,n)===!1)return!1;return!0}function Nh(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let a=0;a<t.length;a++){const o=t[a];let l=!1;for(let u=0;u<e.length;u++){if(i.has(u))continue;const c=e[u];let s=!1;if(r(c,o,a,e,t,n)&&(s=!0),s){i.add(u),l=!0;break}}if(!l)return!1}return!0}function Rb(e,t,r,n){return t.size===0?!0:e instanceof Set?Nh([...e],[...t],r,n):!1}function Lh(e,t){return $h(e,t,()=>{})}function zb(e){return e=$b(e),t=>Lh(t,e)}function Bb(e,t){return Db(e,(r,n,i,a)=>{if(typeof e=="object"){if(Dn(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),ft(o,e,i,a),o}switch(Object.prototype.toString.call(e)){case Jl:case Ql:case eu:{const o=new e.constructor(e==null?void 0:e.valueOf());return ft(o,e),o}case yh:{const o={};return ft(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Wb(e){return Bb(e)}const Fb=/^(?:0|[1-9]\d*)$/;function Rh(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return Fb.test(e)}}function Kb(e){return e!==null&&typeof e=="object"&&Dn(e)==="[object Arguments]"}function Ub(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&qv(t)&&(e==null?void 0:e[t])==null?r=Vl(t):r=[t],r.length===0)return!1;let n=e;for(let i=0;i<r.length;i++){const a=r[i];if((n==null||!Object.hasOwn(n,a))&&!((Array.isArray(n)||Kb(n))&&Rh(a)&&a<n.length))return!1;n=n[a]}return!0}function Hb(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=Yl(e);break}return t=Wb(t),function(r){const n=Et(r,e);return n===void 0?Ub(r,e):t===void 0?n===void 0:Lh(n,t)}}function Yb(e){if(e==null)return ph;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?Hb(e[0],e[1]):zb(e);case"string":case"symbol":case"number":return Ib(e)}}function Vb(e){return Number.isSafeInteger(e)&&e>=0}function zh(e){return e!=null&&typeof e!="function"&&Vb(e.length)}function Gb(e){return typeof e=="object"&&e!==null}function qb(e){return Gb(e)&&zh(e)}function is(e,t=ph){return qb(e)?Sb(Array.from(e),Eb(Yb(t),1)):[]}function Xb(e,t,r){return t===!0?is(e,r):typeof t=="function"?is(e,t):e}var tu=v.createContext(null),Zb=e=>e,re=()=>{var e=v.useContext(tu);return e?e.store.dispatch:Zb},ki=()=>{},Qb=()=>ki,Jb=(e,t)=>e===t;function N(e){var t=v.useContext(tu),r=v.useMemo(()=>t?n=>{if(n!=null)return e(n)}:ki,[t,e]);return _0.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Qb,t?t.store.getState:ki,t?t.store.getState:ki,r,Jb)}function ex(e,t=1){const r=[],n=Math.floor(t),i=(a,o)=>{for(let l=0;l<a.length;l++){const u=a[l];Array.isArray(u)&&o<n?i(u,o+1):r.push(u)}};return i(e,0),r}function ul(e,t,r){return Mh(r)&&(typeof t=="number"&&zh(r)&&Rh(t)&&t<r.length||typeof t=="string"&&t in r)?In(r[t],e):!1}function as(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const tx=(e,t,r)=>{if(e!==t){const n=as(e),i=as(t);if(n===i&&n===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function Bh(e){return typeof e=="symbol"||e instanceof Symbol}const rx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nx=/^\w*$/;function ix(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||Bh(e)?!0:typeof e=="string"&&(nx.test(e)||!rx.test(e))||t!=null}function ax(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(l=>String(l));const i=(l,u)=>{let c=l;for(let s=0;s<u.length&&c!=null;++s)c=c[u[s]];return c},a=(l,u)=>u==null||l==null?u:typeof l=="object"&&"key"in l?Object.hasOwn(u,l.key)?u[l.key]:i(u,l.path):typeof l=="function"?l(u):Array.isArray(l)?i(u,l):typeof u=="object"?u[l]:u,o=t.map(l=>(Array.isArray(l)&&l.length===1&&(l=l[0]),l==null||typeof l=="function"||Array.isArray(l)||ix(l)?l:{key:l,path:Vl(l)}));return e.map(l=>({original:l,criteria:o.map(u=>a(u,l))})).slice().sort((l,u)=>{for(let c=0;c<o.length;c++){const s=tx(l.criteria[c],u.criteria[c],r[c]);if(s!==0)return s}return 0}).map(l=>l.original)}function Ia(e,...t){const r=t.length;return r>1&&ul(e,t[0],t[1])?t=[]:r>2&&ul(t[0],t[1],t[2])&&(t=[t[0]]),ax(e,ex(t),["asc"])}var Wh=e=>e.legend.settings,ox=e=>e.legend.size,lx=e=>e.legend.payload;O([lx,Wh],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?Ia(n,r):n});function ux(e,t){return dx(e)||fx(e,t)||sx(e,t)||cx()}function cx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
var C0=Object.defineProperty;var k0=(e,t,r)=>t in e?C0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var di=(e,t,r)=>k0(e,typeof t!="symbol"?t+"":t,r);import{r as v,w as _0,c as O,a as Uv,g as j0,R as T0}from"./base-ui-CeQ9JhU_.js";function Hv(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=Hv(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Q(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Hv(e))&&(n&&(n+=" "),n+=t);return n}var D0=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Hl(e){if(typeof e!="string")return!1;var t=D0;return t.includes(e)}var M0=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],$0=new Set(M0);function Yv(e){return typeof e!="string"?!1:$0.has(e)}function Vv(e){return typeof e=="string"&&e.startsWith("data-")}function Ue(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Yv(r)||Vv(r))&&(t[r]=e[r]);return t}function Hr(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Ue(t)}return typeof e=="object"&&!Array.isArray(e)?Ue(e):null}function Qe(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Yv(r)||Vv(r)||Hl(r))&&(t[r]=e[r]);return t}function N0(e){return e==null?null:v.isValidElement(e)?Qe(e.props):typeof e=="object"&&!Array.isArray(e)?Qe(e):null}var L0=["children","width","height","viewBox","className","style","title","desc"];function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qo.apply(null,arguments)}function R0(e,t){if(e==null)return{};var r,n,i=z0(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function z0(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Gv=v.forwardRef((e,t)=>{var r=e.children,n=e.width,i=e.height,a=e.viewBox,o=e.className,l=e.style,u=e.title,c=e.desc,s=R0(e,L0),f=a||{width:n,height:i,x:0,y:0},d=Q("recharts-surface",o);return v.createElement("svg",Qo({},Qe(s),{className:d,width:n,height:i,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),v.createElement("title",null,u),v.createElement("desc",null,c),r)}),B0=["children","className"];function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jo.apply(null,arguments)}function W0(e,t){if(e==null)return{};var r,n,i=F0(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function F0(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ge=v.forwardRef((e,t)=>{var r=e.children,n=e.className,i=W0(e,B0),a=Q("recharts-layer",n);return v.createElement("g",Jo({className:a},Qe(i),{ref:t}),r)});function el(e){return e==="__proto__"}function qv(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function Yl(e){var t;return typeof e=="string"||typeof e=="symbol"?e:Object.is((t=e==null?void 0:e.valueOf)==null?void 0:t.call(e),-0)?"-0":String(e)}function Xv(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(Xv).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function Vl(e){if(Array.isArray(e))return e.map(Yl);if(typeof e=="symbol")return[e];e=Xv(e);const t=[],r=e.length;if(r===0)return t;let n=0,i="",a="",o=!1;for(e.charCodeAt(0)===46&&t.push("");n<r;){const l=e[n];if(a)l==="\\"&&n+1<r?(n++,i+=e[n]):l===a?a="":i+=l;else if(o)l==='"'||l==="'"?a=l:l==="]"?(o=!1,t.push(i),i=""):i+=l;else if(l==="[")o=!0,i&&(t.push(i),i="");else if(l==="."){i&&(t.push(i),i="");const u=e[n+1];(u===void 0||u===".")&&t.push("")}else i+=l;n++}return i&&t.push(i),t}function Et(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(el(t))return r;const n=e[t];return n===void 0?qv(t)&&!Object.hasOwn(e,t)?Et(e,Vl(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=Yl(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return K0(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),el(t))return r;const n=e[t];return n===void 0?r:n}}}function K0(e,t,r){if(t.length===0)return r;let n=e;for(let i=0;i<t.length;i++){if(n==null||el(t[i]))return r;n=n[t[i]]}return n===void 0?r:n}var U0=4;function Dt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:U0,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function ke(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,a,o)=>{var l=r[o-1];return typeof l=="string"?i+l+a:l!==void 0?i+Dt(l)+a:i+a},"")}var $e=e=>e===0?0:e>0?1:-1,It=e=>typeof e=="number"&&e!=+e,br=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,D=e=>(typeof e=="number"||e instanceof Number)&&!It(e),Ct=e=>D(e)||typeof e=="string",H0=0,Tn=e=>{var t=++H0;return"".concat(e||"").concat(t)},Xe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!D(t)&&typeof t!="string")return n;var a;if(br(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return It(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Zv=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function ze(e,t,r){return D(e)&&D(t)?Dt(e+r*(t-e)):t}function Qv(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Et(n,t))===r)}var pe=e=>e===null||typeof e>"u",Gl=e=>pe(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Be(e){return e!=null}function Er(){}function ql(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Zc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zc(Object(r),!0).forEach(function(n){Y0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y0(e,t,r){return(t=V0(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V0(e){var t=G0(e,"string");return typeof t=="symbol"?t:t+""}function G0(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var q0=e=>{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,a=e.parentViewBox,o=ql(t),l=o.x,u=o.y,c=o.height,s=o.upperWidth,f=o.lowerWidth,d=l,h=l+(s-f)/2,p=(d+h)/2,m=(s+f)/2,y=d+s/2,g=c>=0?1:-1,x=g*i,w=g>0?"end":"start",A=g>0?"start":"end",P=s>=0?1:-1,b=P*i,S=P>0?"end":"start",I=P>0?"start":"end",C=a;if(r==="top"){var k={x:d+s/2,y:u-x,horizontalAnchor:"middle",verticalAnchor:w};return C&&(k.height=Math.max(u-C.y,0),k.width=s),k}if(r==="bottom"){var _={x:h+f/2,y:u+c+x,horizontalAnchor:"middle",verticalAnchor:A};return C&&(_.height=Math.max(C.y+C.height-(u+c),0),_.width=f),_}if(r==="left"){var E={x:p-b,y:u+c/2,horizontalAnchor:S,verticalAnchor:"middle"};return C&&(E.width=Math.max(E.x-C.x,0),E.height=c),E}if(r==="right"){var L={x:p+m+b,y:u+c/2,horizontalAnchor:I,verticalAnchor:"middle"};return C&&(L.width=Math.max(C.x+C.width-L.x,0),L.height=c),L}var T=C?{width:m,height:c}:{};return r==="insideLeft"?gt({x:p+b,y:u+c/2,horizontalAnchor:I,verticalAnchor:"middle"},T):r==="insideRight"?gt({x:p+m-b,y:u+c/2,horizontalAnchor:S,verticalAnchor:"middle"},T):r==="insideTop"?gt({x:d+s/2,y:u+x,horizontalAnchor:"middle",verticalAnchor:A},T):r==="insideBottom"?gt({x:h+f/2,y:u+c-x,horizontalAnchor:"middle",verticalAnchor:w},T):r==="insideTopLeft"?gt({x:d+b,y:u+x,horizontalAnchor:I,verticalAnchor:A},T):r==="insideTopRight"?gt({x:d+s-b,y:u+x,horizontalAnchor:S,verticalAnchor:A},T):r==="insideBottomLeft"?gt({x:h+b,y:u+c-x,horizontalAnchor:I,verticalAnchor:w},T):r==="insideBottomRight"?gt({x:h+f-b,y:u+c-x,horizontalAnchor:S,verticalAnchor:w},T):r&&typeof r=="object"&&(D(r.x)||br(r.x))&&(D(r.y)||br(r.y))?gt({x:l+Xe(r.x,m),y:u+Xe(r.y,c),horizontalAnchor:"end",verticalAnchor:"end"},T):gt({x:y,y:u+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},T)},X0=["top","left","right","bottom"];function Z0(e){return e==null?!1:typeof e=="object"?!0:X0.includes(e)}var Q0=v.createContext(null);function se(e){return function(){return e}}const tl=Math.PI,rl=2*tl,ur=1e-6,J0=rl-ur;function Jv(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function eb(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Jv;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class tb{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Jv:eb(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,u=n-t,c=i-r,s=o-t,f=l-r,d=s*s+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>ur)if(!(Math.abs(f*u-c*s)>ur)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,p=i-l,m=u*u+c*c,y=h*h+p*p,g=Math.sqrt(m),x=Math.sqrt(d),w=a*Math.tan((tl-Math.acos((m+d-y)/(2*g*x)))/2),A=w/x,P=w/g;Math.abs(A-1)>ur&&this._append`L${t+A*s},${r+A*f}`,this._append`A${a},${a},0,0,${+(f*h>s*p)},${this._x1=t+P*u},${this._y1=r+P*c}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),c=t+l,s=r+u,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>ur||Math.abs(this._y1-s)>ur)&&this._append`L${c},${s}`,n&&(d<0&&(d=d%rl+rl),d>J0?this._append`A${n},${n},0,1,${f},${t-l},${r-u}A${n},${n},0,1,${f},${this._x1=c},${this._y1=s}`:d>ur&&this._append`A${n},${n},0,${+(d>=tl)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function eh(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new tb(t)}function Xl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function th(e){this._context=e}th.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sa(e){return new th(e)}function rh(e){return e[0]}function nh(e){return e[1]}function ih(e,t){var r=se(!0),n=null,i=Sa,a=null,o=eh(l);e=typeof e=="function"?e:e===void 0?rh:se(e),t=typeof t=="function"?t:t===void 0?nh:se(t);function l(u){var c,s=(u=Xl(u)).length,f,d=!1,h;for(n==null&&(a=i(h=o())),c=0;c<=s;++c)!(c<s&&r(f=u[c],c,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,c,u),+t(f,c,u));if(h)return a=null,h+""||null}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:se(+u),l):e},l.y=function(u){return arguments.length?(t=typeof u=="function"?u:se(+u),l):t},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:se(!!u),l):r},l.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),l):i},l.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),l):n},l}function vi(e,t,r){var n=null,i=se(!0),a=null,o=Sa,l=null,u=eh(c);e=typeof e=="function"?e:e===void 0?rh:se(+e),t=typeof t=="function"?t:se(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?nh:se(+r);function c(f){var d,h,p,m=(f=Xl(f)).length,y,g=!1,x,w=new Array(m),A=new Array(m);for(a==null&&(l=o(x=u())),d=0;d<=m;++d){if(!(d<m&&i(y=f[d],d,f))===g)if(g=!g)h=d,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),p=d-1;p>=h;--p)l.point(w[p],A[p]);l.lineEnd(),l.areaEnd()}g&&(w[d]=+e(y,d,f),A[d]=+t(y,d,f),l.point(n?+n(y,d,f):w[d],r?+r(y,d,f):A[d]))}if(x)return l=null,x+""||null}function s(){return ih().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:se(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:se(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:se(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:se(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:se(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:se(+f),c):r},c.lineX0=c.lineY0=function(){return s().x(e).y(t)},c.lineY1=function(){return s().x(e).y(r)},c.lineX1=function(){return s().x(n).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:se(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(l=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=l=null:l=o(a=f),c):a},c}class ah{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function rb(e){return new ah(e,!0)}function nb(e){return new ah(e,!1)}function Di(){}function Mi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function oh(e){this._context=e}oh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Mi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Mi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ib(e){return new oh(e)}function lh(e){this._context=e}lh.prototype={areaStart:Di,areaEnd:Di,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Mi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ab(e){return new lh(e)}function uh(e){this._context=e}uh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Mi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ob(e){return new uh(e)}function ch(e){this._context=e}ch.prototype={areaStart:Di,areaEnd:Di,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function lb(e){return new ch(e)}function Qc(e){return e<0?-1:1}function Jc(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(a*i+o*n)/(n+i);return(Qc(a)+Qc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function es(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Eo(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,o-l*r,a,o)}function $i(e){this._context=e}$i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Eo(this,this._t0,es(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Eo(this,es(this,r=Jc(this,e,t)),r);break;default:Eo(this,this._t0,r=Jc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function sh(e){this._context=new fh(e)}(sh.prototype=Object.create($i.prototype)).point=function(e,t){$i.prototype.point.call(this,t,e)};function fh(e){this._context=e}fh.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function ub(e){return new $i(e)}function cb(e){return new sh(e)}function dh(e){this._context=e}dh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=ts(e),i=ts(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function ts(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function sb(e){return new dh(e)}function Ea(e,t){this._context=e,this._t=t}Ea.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function fb(e){return new Ea(e,.5)}function db(e){return new Ea(e,0)}function vb(e){return new Ea(e,1)}function xr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,l=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function nl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function hb(e,t){return e[t]}function pb(e){const t=[];return t.key=e,t}function mb(){var e=se([]),t=nl,r=xr,n=hb;function i(a){var o=Array.from(e.apply(this,arguments),pb),l,u=o.length,c=-1,s;for(const f of a)for(l=0,++c;l<u;++l)(o[l][c]=[0,+n(f,o[l].key,c,a)]).data=f;for(l=0,s=Xl(t(o));l<u;++l)o[s[l]].index=l;return r(o,s),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:se(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:se(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?nl:typeof a=="function"?a:se(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??xr,i):r},i}function yb(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}xr(e,t)}}function gb(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,l=0;o<i;++o)l+=e[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}xr(e,t)}}function bb(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var l=0,u=0,c=0;l<o;++l){for(var s=e[t[l]],f=s[n][1]||0,d=s[n-1][1]||0,h=(f-d)/2,p=0;p<l;++p){var m=e[t[p]],y=m[n][1]||0,g=m[n-1][1]||0;h+=y-g}u+=f,c+=h*f}i[n-1][1]+=i[n-1][0]=r,u&&(r-=c/u)}i[n-1][1]+=i[n-1][0]=r,xr(e,t)}}var vh=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Zl=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Hl(i)&&typeof r[i]=="function"&&(n[i]=a=>r[i](r,a))}),n},xb=(e,t,r)=>n=>(e(t,r,n),null),hh=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];Hl(i)&&typeof a=="function"&&(n||(n={}),n[i]=xb(a,t,r))}),n};function rs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rs(Object(r),!0).forEach(function(n){Ab(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ab(e,t,r){return(t=Pb(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pb(e){var t=Ob(e,"string");return typeof t=="symbol"?t:t+""}function Ob(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function je(e,t){var r=wb({},e),n=t,i=Object.keys(t),a=i.reduce((o,l)=>(o[l]===void 0&&n[l]!==void 0&&(o[l]=n[l]),o),r);return a}function Sb(e,t){const r=new Map;for(let n=0;n<e.length;n++){const i=e[n],a=t(i,n,e);r.has(a)||r.set(a,i)}return Array.from(r.values())}function Eb(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function ph(e){return e}function Ib(e){return function(t){return Et(t,e)}}function il(e){return e==null||typeof e!="object"&&typeof e!="function"}function Cb(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function al(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Dn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const mh="[object RegExp]",Ql="[object String]",Jl="[object Number]",eu="[object Boolean]",yh="[object Arguments]",gh="[object Symbol]",bh="[object Date]",xh="[object Map]",wh="[object Set]",Ah="[object Array]",kb="[object Function]",Ph="[object ArrayBuffer]",Ci="[object Object]",_b="[object Error]",Oh="[object DataView]",Sh="[object Uint8Array]",Eh="[object Uint8ClampedArray]",Ih="[object Uint16Array]",Ch="[object Uint32Array]",jb="[object BigUint64Array]",kh="[object Int8Array]",_h="[object Int16Array]",jh="[object Int32Array]",Tb="[object BigInt64Array]",Th="[object Float32Array]",Dh="[object Float64Array]",ns=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}();function ol(e){return typeof ns.Buffer<"u"&&ns.Buffer.isBuffer(e)}function Db(e,t){return fr(e,void 0,e,new Map,t)}function fr(e,t,r,n=new Map,i=void 0){const a=i==null?void 0:i(e,t,r,n);if(a!==void 0)return a;if(il(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const o=new Array(e.length);n.set(e,o);for(let l=0;l<e.length;l++)o[l]=fr(e[l],l,r,n,i);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;n.set(e,o);for(const[l,u]of e)o.set(l,fr(u,l,r,n,i));return o}if(e instanceof Set){const o=new Set;n.set(e,o);for(const l of e)o.add(fr(l,void 0,r,n,i));return o}if(ol(e))return e.subarray();if(Cb(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,o);for(let l=0;l<e.length;l++)o[l]=fr(e[l],l,r,n,i);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,o),ft(o,e,r,n,i),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return n.set(e,o),ft(o,e,r,n,i),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return n.set(e,o),ft(o,e,r,n,i),o}if(e instanceof Error){const o=structuredClone(e);return n.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,ft(o,e,r,n,i),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return n.set(e,o),ft(o,e,r,n,i),o}if(e instanceof Number){const o=new Number(e.valueOf());return n.set(e,o),ft(o,e,r,n,i),o}if(e instanceof String){const o=new String(e.valueOf());return n.set(e,o),ft(o,e,r,n,i),o}if(typeof e=="object"&&Mb(e)){const o=Object.create(Object.getPrototypeOf(e));return n.set(e,o),ft(o,e,r,n,i),o}return e}function ft(e,t,r=e,n,i){const a=[...Object.keys(t),...al(t)];for(let o=0;o<a.length;o++){const l=a[o],u=Object.getOwnPropertyDescriptor(e,l);(u==null||u.writable)&&(e[l]=fr(t[l],l,r,n,i))}}function Mb(e){switch(Dn(e)){case yh:case Ah:case Ph:case Oh:case eu:case bh:case Th:case Dh:case kh:case _h:case jh:case xh:case Jl:case Ci:case mh:case wh:case Ql:case gh:case Sh:case Eh:case Ih:case Ch:return!0;default:return!1}}function $b(e){return fr(e,void 0,e,new Map,void 0)}function In(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Mh(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function $h(e,t,r){return typeof r!="function"?$h(e,t,()=>{}):ll(e,t,function n(i,a,o,l,u,c){const s=r(i,a,o,l,u,c);return s!==void 0?!!s:ll(i,a,n,c,!1)},new Map,!0)}function ll(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return Nb(e,t,r,n);case"function":return Object.keys(t).length>0?ll(e,{...t},r,n,i):In(e,t);default:return Mh(e)&&i?typeof t=="string"?t==="":!0:In(e,t)}}function Nb(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return Nh(e,t,r,n);if(t instanceof Map)return Lb(e,t,r,n);if(t instanceof Set)return Rb(e,t,r,n);const i=Object.keys(t);if(e==null||il(e))return i.length===0;if(i.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let a=0;a<i.length;a++){const o=i[a];if(!il(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!r(e[o],t[o],o,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function Lb(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[i,a]of t.entries())if(r(e.get(i),a,i,e,t,n)===!1)return!1;return!0}function Nh(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let a=0;a<t.length;a++){const o=t[a];let l=!1;for(let u=0;u<e.length;u++){if(i.has(u))continue;const c=e[u];let s=!1;if(r(c,o,a,e,t,n)&&(s=!0),s){i.add(u),l=!0;break}}if(!l)return!1}return!0}function Rb(e,t,r,n){return t.size===0?!0:e instanceof Set?Nh([...e],[...t],r,n):!1}function Lh(e,t){return $h(e,t,()=>{})}function zb(e){return e=$b(e),t=>Lh(t,e)}function Bb(e,t){return Db(e,(r,n,i,a)=>{if(typeof e=="object"){if(Dn(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),ft(o,e,i,a),o}switch(Object.prototype.toString.call(e)){case Jl:case Ql:case eu:{const o=new e.constructor(e==null?void 0:e.valueOf());return ft(o,e),o}case yh:{const o={};return ft(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Wb(e){return Bb(e)}const Fb=/^(?:0|[1-9]\d*)$/;function Rh(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return Fb.test(e)}}function Kb(e){return e!==null&&typeof e=="object"&&Dn(e)==="[object Arguments]"}function Ub(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&qv(t)&&(e==null?void 0:e[t])==null?r=Vl(t):r=[t],r.length===0)return!1;let n=e;for(let i=0;i<r.length;i++){const a=r[i];if((n==null||!Object.hasOwn(n,a))&&!((Array.isArray(n)||Kb(n))&&Rh(a)&&a<n.length))return!1;n=n[a]}return!0}function Hb(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=Yl(e);break}return t=Wb(t),function(r){const n=Et(r,e);return n===void 0?Ub(r,e):t===void 0?n===void 0:Lh(n,t)}}function Yb(e){if(e==null)return ph;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?Hb(e[0],e[1]):zb(e);case"string":case"symbol":case"number":return Ib(e)}}function Vb(e){return Number.isSafeInteger(e)&&e>=0}function zh(e){return e!=null&&typeof e!="function"&&Vb(e.length)}function Gb(e){return typeof e=="object"&&e!==null}function qb(e){return Gb(e)&&zh(e)}function is(e,t=ph){return qb(e)?Sb(Array.from(e),Eb(Yb(t),1)):[]}function Xb(e,t,r){return t===!0?is(e,r):typeof t=="function"?is(e,t):e}var tu=v.createContext(null),Zb=e=>e,re=()=>{var e=v.useContext(tu);return e?e.store.dispatch:Zb},ki=()=>{},Qb=()=>ki,Jb=(e,t)=>e===t;function N(e){var t=v.useContext(tu),r=v.useMemo(()=>t?n=>{if(n!=null)return e(n)}:ki,[t,e]);return _0.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Qb,t?t.store.getState:ki,t?t.store.getState:ki,r,Jb)}function ex(e,t=1){const r=[],n=Math.floor(t),i=(a,o)=>{for(let l=0;l<a.length;l++){const u=a[l];Array.isArray(u)&&o<n?i(u,o+1):r.push(u)}};return i(e,0),r}function ul(e,t,r){return Mh(r)&&(typeof t=="number"&&zh(r)&&Rh(t)&&t<r.length||typeof t=="string"&&t in r)?In(r[t],e):!1}function as(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const tx=(e,t,r)=>{if(e!==t){const n=as(e),i=as(t);if(n===i&&n===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?i-n:n-i}return 0};function Bh(e){return typeof e=="symbol"||e instanceof Symbol}const rx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nx=/^\w*$/;function ix(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||Bh(e)?!0:typeof e=="string"&&(nx.test(e)||!rx.test(e))||t!=null}function ax(e,t,r,n){if(e==null)return[];r=r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(l=>String(l));const i=(l,u)=>{let c=l;for(let s=0;s<u.length&&c!=null;++s)c=c[u[s]];return c},a=(l,u)=>u==null||l==null?u:typeof l=="object"&&"key"in l?Object.hasOwn(u,l.key)?u[l.key]:i(u,l.path):typeof l=="function"?l(u):Array.isArray(l)?i(u,l):typeof u=="object"?u[l]:u,o=t.map(l=>(Array.isArray(l)&&l.length===1&&(l=l[0]),l==null||typeof l=="function"||Array.isArray(l)||ix(l)?l:{key:l,path:Vl(l)}));return e.map(l=>({original:l,criteria:o.map(u=>a(u,l))})).slice().sort((l,u)=>{for(let c=0;c<o.length;c++){const s=tx(l.criteria[c],u.criteria[c],r[c]);if(s!==0)return s}return 0}).map(l=>l.original)}function Ia(e,...t){const r=t.length;return r>1&&ul(e,t[0],t[1])?t=[]:r>2&&ul(t[0],t[1],t[2])&&(t=[t[0]]),ax(e,ex(t),["asc"])}var Wh=e=>e.legend.settings,ox=e=>e.legend.size,lx=e=>e.legend.payload;O([lx,Wh],(e,t)=>{var r=t.itemSorter,n=e.flat(1);return r?Ia(n,r):n});function ux(e,t){return dx(e)||fx(e,t)||sx(e,t)||cx()}function cx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sx(e,t){if(e){if(typeof e=="string")return os(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?os(e,t):void 0}}function os(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function fx(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(s){c=!0,i=s}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return l}}function dx(e){if(Array.isArray(e))return e}var hi=1;function ls(e,t){return Math.abs(e.height-t.height)>hi||Math.abs(e.left-t.left)>hi||Math.abs(e.top-t.top)>hi||Math.abs(e.width-t.width)>hi}function us(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function vx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=v.useState({height:0,left:0,top:0,width:0}),r=ux(t,2),n=r[0],i=r[1],a=v.useRef(null),o=v.useRef(n);o.current=n;var l=v.useCallback(u=>{if(a.current!=null&&(a.current.disconnect(),a.current=null),u!=null){var c=us(u);if(ls(c,o.current)&&i(c),typeof ResizeObserver<"u"){var s=new ResizeObserver(()=>{var f=us(u);ls(f,o.current)&&i(f)});s.observe(u),a.current=s}}},[...e]);return v.useEffect(()=>()=>{var u;(u=a.current)===null||u===void 0||u.disconnect()},[]),[n,l]}function Ce(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var hx=typeof Symbol=="function"&&Symbol.observable||"@@observable",cs=hx,Io=()=>Math.random().toString(36).substring(7).split("").join("."),px={INIT:`@@redux/INIT${Io()}`,REPLACE:`@@redux/REPLACE${Io()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Io()}`},Ni=px;function ru(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Fh(e,t,r){if(typeof e!="function")throw new Error(Ce(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ce(1));return r(Fh)(e,t)}let n=e,i=t,a=new Map,o=a,l=0,u=!1;function c(){o===a&&(o=new Map,a.forEach((y,g)=>{o.set(g,y)}))}function s(){if(u)throw new Error(Ce(3));return i}function f(y){if(typeof y!="function")throw new Error(Ce(4));if(u)throw new Error(Ce(5));let g=!0;c();const x=l++;return o.set(x,y),function(){if(g){if(u)throw new Error(Ce(6));g=!1,c(),o.delete(x),a=null}}}function d(y){if(!ru(y))throw new Error(Ce(7));if(typeof y.type>"u")throw new Error(Ce(8));if(typeof y.type!="string")throw new Error(Ce(17));if(u)throw new Error(Ce(9));try{u=!0,i=n(i,y)}finally{u=!1}return(a=o).forEach(x=>{x()}),y}function h(y){if(typeof y!="function")throw new Error(Ce(10));n=y,d({type:Ni.REPLACE})}function p(){const y=f;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(Ce(11));function x(){const A=g;A.next&&A.next(s())}return x(),{unsubscribe:y(x)}},[cs](){return this}}}return d({type:Ni.INIT}),{dispatch:d,subscribe:f,getState:s,replaceReducer:h,[cs]:p}}function mx(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Ni.INIT})>"u")throw new Error(Ce(12));if(typeof r(void 0,{type:Ni.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function Kh(e){const t=Object.keys(e),r={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}const n=Object.keys(r);let i;try{mx(r)}catch(a){i=a}return function(o={},l){if(i)throw i;let u=!1;const c={};for(let s=0;s<n.length;s++){const f=n[s],d=r[f],h=o[f],p=d(h,l);if(typeof p>"u")throw l&&l.type,new Error(Ce(14));c[f]=p,u=u||p!==h}return u=u||n.length!==Object.keys(o).length,u?c:o}}function Li(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function yx(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(Ce(15))};const o={getState:i.getState,dispatch:(u,...c)=>a(u,...c)},l=e.map(u=>u(o));return a=Li(...l)(i.dispatch),{...i,dispatch:a}}}function Uh(e){return ru(e)&&"type"in e&&typeof e.type=="string"}var Hh=Symbol.for("immer-nothing"),ss=Symbol.for("immer-draftable"),Ne=Symbol.for("immer-state");function dt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var qe=Object,Yr=qe.getPrototypeOf,Ri="constructor",Ca="prototype",cl="configurable",zi="enumerable",_i="writable",Mn="value",Rt=e=>!!e&&!!e[Ne];function nt(e){var t;return e?Yh(e)||_a(e)||!!e[ss]||!!((t=e[Ri])!=null&&t[ss])||ja(e)||Ta(e):!1}var gx=qe[Ca][Ri].toString(),fs=new WeakMap;function Yh(e){if(!e||!nu(e))return!1;const t=Yr(e);if(t===null||t===qe[Ca])return!0;const r=qe.hasOwnProperty.call(t,Ri)&&t[Ri];if(r===Object)return!0;if(!Rr(r))return!1;let n=fs.get(r);return n===void 0&&(n=Function.toString.call(r),fs.set(r,n)),n===gx}function ka(e,t,r=!0){Hn(e)===0?(r?Reflect.ownKeys(e):qe.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Hn(e){const t=e[Ne];return t?t.type_:_a(e)?1:ja(e)?2:Ta(e)?3:0}var Co=(e,t,r=Hn(e))=>r===2?e.has(t):qe[Ca].hasOwnProperty.call(e,t),sl=(e,t,r=Hn(e))=>r===2?e.get(t):e[t],Bi=(e,t,r,n=Hn(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function bx(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var _a=Array.isArray,ja=e=>e instanceof Map,Ta=e=>e instanceof Set,nu=e=>typeof e=="object",Rr=e=>typeof e=="function",ko=e=>typeof e=="boolean";function xx(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var jt=e=>e.copy_||e.base_,iu=e=>e.modified_?e.copy_:e.base_;function fl(e,t){if(ja(e))return new Map(e);if(Ta(e))return new Set(e);if(_a(e))return Array[Ca].slice.call(e);const r=Yh(e);if(t===!0||t==="class_only"&&!r){const n=qe.getOwnPropertyDescriptors(e);delete n[Ne];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],l=n[o];l[_i]===!1&&(l[_i]=!0,l[cl]=!0),(l.get||l.set)&&(n[o]={[cl]:!0,[_i]:!0,[zi]:l[zi],[Mn]:e[o]})}return qe.create(Yr(e),n)}else{const n=Yr(e);if(n!==null&&r)return{...e};const i=qe.create(n);return qe.assign(i,e)}}function au(e,t=!1){return Da(e)||Rt(e)||!nt(e)||(Hn(e)>1&&qe.defineProperties(e,{set:pi,add:pi,clear:pi,delete:pi}),qe.freeze(e),t&&ka(e,(r,n)=>{au(n,!0)},!1)),e}function wx(){dt(2)}var pi={[Mn]:wx};function Da(e){return e===null||!nu(e)?!0:qe.isFrozen(e)}var Wi="MapSet",dl="Patches",ds="ArrayMethods",Vh={};function wr(e){const t=Vh[e];return t||dt(0,e),t}var vs=e=>!!Vh[e],$n,Gh=()=>$n,Ax=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:vs(Wi)?wr(Wi):void 0,arrayMethodsPlugin_:vs(ds)?wr(ds):void 0});function hs(e,t){t&&(e.patchPlugin_=wr(dl),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function vl(e){hl(e),e.drafts_.forEach(Px),e.drafts_=null}function hl(e){e===$n&&($n=e.parent_)}var ps=e=>$n=Ax($n,e);function Px(e){const t=e[Ne];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ms(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Ne].modified_&&(vl(t),dt(4)),nt(e)&&(e=ys(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Ne].base_,e,t)}else e=ys(t,r);return Ox(t,e,!0),vl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Hh?e:void 0}function ys(e,t){if(Da(t))return t;const r=t[Ne];if(!r)return Fi(t,e.handledSet_,e);if(!Ma(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Zh(r,e)}return r.copy_}function Ox(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&au(t,r)}function qh(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ma=(e,t)=>e.scope_===t,Sx=[];function Xh(e,t,r,n){const i=jt(e),a=e.type_;if(n!==void 0&&sl(i,n,a)===t){Bi(i,n,r,a);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;ka(i,(u,c)=>{if(Rt(c)){const s=l.get(c)||[];s.push(u),l.set(c,s)}})}const o=e.draftLocations_.get(t)??Sx;for(const l of o)Bi(i,l,r,a)}function Ex(e,t,r){e.callbacks_.push(function(i){var l;const a=t;if(!a||!Ma(a,i))return;(l=i.mapSetPlugin_)==null||l.fixSetContents(a);const o=iu(a);Xh(e,a.draft_??a,o,r),Zh(a,i)})}function Zh(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const a=i.getPath(e);a&&i.generatePatches_(e,a,t)}qh(e)}}function Ix(e,t,r){const{scope_:n}=e;if(Rt(r)){const i=r[Ne];Ma(i,n)&&i.callbacks_.push(function(){ji(e);const o=iu(i);Xh(e,r,o,t)})}else nt(r)&&e.callbacks_.push(function(){const a=jt(e);e.type_===3?a.has(r)&&Fi(r,n.handledSet_,n):sl(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Fi(sl(e.copy_,t,e.type_),n.handledSet_,n)})}function Fi(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Rt(e)||t.has(e)||!nt(e)||Da(e)||(t.add(e),ka(e,(n,i)=>{if(Rt(i)){const a=i[Ne];if(Ma(a,r)){const o=iu(a);Bi(e,n,o,e.type_),qh(a)}}else nt(i)&&Fi(i,t,r)})),e}function Cx(e,t){const r=_a(e),n={type_:r?1:0,scope_:t?t.scope_:Gh(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=Ki;r&&(i=[n],a=Nn);const{revoke:o,proxy:l}=Proxy.revocable(i,a);return n.draft_=l,n.revoke_=o,[l,n]}var Ki={get(e,t){if(t===Ne)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=jt(e);if(!Co(i,t,e.type_))return _x(e,i,t);const a=i[t];if(e.finalized_||!nt(a)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&xx(t))return a;if(a===_o(e.base_,t)||kx(e,t,a)){ji(e);const o=e.type_===1?+t:t,l=ml(e.scope_,a,e,o);return e.copy_[o]=l}return a},has(e,t){return t in jt(e)},ownKeys(e){return Reflect.ownKeys(jt(e))},set(e,t,r){const n=Qh(jt(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=_o(jt(e),t),a=i==null?void 0:i[Ne];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(bx(r,i)&&(r!==void 0||Co(e.base_,t,e.type_)))return!0;ji(e),pl(e)}return e.copy_[t]===r&&(r!==void 0||Co(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Ix(e,t,r)),!0},deleteProperty(e,t){return ji(e),_o(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),pl(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=jt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[_i]:!0,[cl]:e.type_!==1||t!=="length",[zi]:n[zi],[Mn]:r[t]}},defineProperty(){dt(11)},getPrototypeOf(e){return Yr(e.base_)},setPrototypeOf(){dt(12)}},Nn={};for(let e in Ki){let t=Ki[e];Nn[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Nn.deleteProperty=function(e,t){return Nn.set.call(this,e,t,void 0)};Nn.set=function(e,t,r){return Ki.set.call(this,e[0],t,r,e[0])};function _o(e,t){const r=e[Ne];return(r?jt(r):e)[t]}function kx(e,t,r){var n;return e.type_!==1||!e.allIndicesReassigned_||(n=e.assigned_)!=null&&n.get(t)||!nt(r)||r[Ne]?!1:e.baseRefs_.has(r)}function _x(e,t,r){var i;const n=Qh(t,r);return n?Mn in n?n[Mn]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function Qh(e,t){if(!(t in e))return;let r=Yr(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Yr(r)}}function pl(e){e.modified_||(e.modified_=!0,e.parent_&&pl(e.parent_))}function ji(e){e.copy_||(e.assigned_=new Map,e.copy_=fl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jx=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Rr(t)&&!Rr(r)){const a=r;r=t;const o=this;return function(u=a,...c){return o.produce(u,s=>r.call(this,s,...c))}}Rr(r)||dt(6),n!==void 0&&!Rr(n)&&dt(7);let i;if(nt(t)){const a=ps(this),o=ml(a,t,void 0);let l=!0;try{i=r(o),l=!1}finally{l?vl(a):hl(a)}return hs(a,n),ms(i,a)}else if(!t||!nu(t)){if(i=r(t),i===void 0&&(i=t),i===Hh&&(i=void 0),this.autoFreeze_&&au(i,!0),n){const a=[],o=[];wr(dl).generateReplacementPatches_(t,i,{patches_:a,inversePatches_:o}),n(a,o)}return i}else dt(1,t)},this.produceWithPatches=(t,r)=>{if(Rr(t))return(o,...l)=>this.produceWithPatches(o,u=>t(u,...l));let n,i;return[this.produce(t,r,(o,l)=>{n=o,i=l}),n,i]},ko(e==null?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ko(e==null?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ko(e==null?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){nt(e)||dt(8),Rt(e)&&(e=tt(e));const t=ps(this),r=ml(t,e,void 0);return r[Ne].isManual_=!0,hl(t),r}finishDraft(e,t){const r=e&&e[Ne];(!r||!r.isManual_)&&dt(9);const{scope_:n}=r;return hs(n,t),ms(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=wr(dl).applyPatches_;return Rt(e)?n(e,t):this.produce(e,i=>n(i,t))}};function ml(e,t,r,n){const[i,a]=ja(t)?wr(Wi).proxyMap_(t,r):Ta(t)?wr(Wi).proxySet_(t,r):Cx(t,r);return((r==null?void 0:r.scope_)??Gh()).drafts_.push(i),a.callbacks_=(r==null?void 0:r.callbacks_)??[],a.key_=n,r&&n!==void 0?Ex(r,a,n):a.callbacks_.push(function(u){var s;(s=u.mapSetPlugin_)==null||s.fixSetContents(a);const{patchPlugin_:c}=u;a.modified_&&c&&c.generatePatches_(a,[],u)}),i}function tt(e){return Rt(e)||dt(10,e),Jh(e)}function Jh(e){if(!nt(e)||Da(e))return e;const t=e[Ne];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=fl(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=fl(e,!0);return ka(r,(i,a)=>{Bi(r,i,Jh(a))},n),t&&(t.finalized_=!1),r}var Tx=new jx,ep=Tx.produce,q=e=>e;function tp(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var Dx=tp(),Mx=tp,$x=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Li:Li.apply(null,arguments)};function Je(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Ze(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Uh(n)&&n.type===e,r}var rp=class On extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,On.prototype)}static get[Symbol.species](){return On}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new On(...t[0].concat(this)):new On(...t.concat(this))}};function gs(e){return nt(e)?ep(e,()=>{}):e}function mi(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Nx(e){return typeof e=="boolean"}var Lx=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new rp;return r&&(Nx(r)?o.push(Dx):o.push(Mx(r.extraArgument))),o},np="RTK_autoBatch",ie=()=>e=>({payload:e,meta:{[np]:!0}}),bs=e=>t=>{setTimeout(t,e)},Rx=(e,t)=>r=>{let n=!1;const i=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(o),r())},a=e(i),o=setTimeout(i,t)},ip=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const l=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Rx(window.requestAnimationFrame,100):bs(10):e.type==="callback"?e.queueNotification:bs(e.timeout),c=()=>{o=!1,a&&(a=!1,l.forEach(s=>s()))};return Object.assign({},n,{subscribe(s){const f=()=>i&&s(),d=n.subscribe(f);return l.add(s),()=>{d(),l.delete(s)}},dispatch(s){var f;try{return i=!((f=s==null?void 0:s.meta)!=null&&f[np]),a=!i,a&&(o||(o=!0,u(c))),n.dispatch(s)}finally{i=!0}}})},zx=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new rp(e);return n&&i.push(ip(typeof n=="object"?n:void 0)),i};function Bx(e){const t=Lx(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(ru(r))l=Kh(r);else throw new Error(Ze(1));let u;typeof n=="function"?u=n(t):u=t();let c=Li;i&&(c=$x({trace:!1,...typeof i=="object"&&i}));const s=yx(...u),f=zx(s);let d=typeof o=="function"?o(f):f();const h=c(...d);return Fh(l,a,h)}function ap(e){const t={},r=[];let n;const i={addCase(a,o){const l=typeof a=="string"?a:a.type;if(!l)throw new Error(Ze(28));if(l in t)throw new Error(Ze(29));return t[l]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return r.push({matcher:a,reducer:o}),i},addDefaultCase(a){return n=a,i}};return e(i),[t,r,n]}function Wx(e){return typeof e=="function"}function Fx(e,t){let[r,n,i]=ap(t),a;if(Wx(e))a=()=>gs(e());else{const l=gs(e);a=()=>l}function o(l=a(),u){let c=[r[u.type],...n.filter(({matcher:s})=>s(u)).map(({reducer:s})=>s)];return c.filter(s=>!!s).length===0&&(c=[i]),c.reduce((s,f)=>{if(f)if(Rt(s)){const h=f(s,u);return h===void 0?s:h}else{if(nt(s))return ep(s,d=>f(d,u));{const d=f(s,u);if(d===void 0){if(s===null)return s;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return s},l)}return o.getInitialState=a,o}var Kx="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ux=(e=21)=>{let t="",r=e;for(;r--;)t+=Kx[Math.random()*64|0];return t},Hx=Symbol.for("rtk-slice-createasyncthunk");function Yx(e,t){return`${e}/${t}`}function Vx({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Hx];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(Ze(11));const l=(typeof i.reducers=="function"?i.reducers(qx()):i.reducers)||{},u=Object.keys(l),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(A,P){const b=typeof A=="string"?A:A.type;if(!b)throw new Error(Ze(12));if(b in c.sliceCaseReducersByType)throw new Error(Ze(13));return c.sliceCaseReducersByType[b]=P,s},addMatcher(A,P){return c.sliceMatchers.push({matcher:A,reducer:P}),s},exposeAction(A,P){return c.actionCreators[A]=P,s},exposeCaseReducer(A,P){return c.sliceCaseReducersByName[A]=P,s}};u.forEach(A=>{const P=l[A],b={reducerName:A,type:Yx(a,A),createNotation:typeof i.reducers=="function"};Zx(P)?Jx(b,P,s,t):Xx(b,P,s)});function f(){const[A={},P=[],b=void 0]=typeof i.extraReducers=="function"?ap(i.extraReducers):[i.extraReducers],S={...A,...c.sliceCaseReducersByType};return Fx(i.initialState,I=>{for(let C in S)I.addCase(C,S[C]);for(let C of c.sliceMatchers)I.addMatcher(C.matcher,C.reducer);for(let C of P)I.addMatcher(C.matcher,C.reducer);b&&I.addDefaultCase(b)})}const d=A=>A,h=new Map,p=new WeakMap;let m;function y(A,P){return m||(m=f()),m(A,P)}function g(){return m||(m=f()),m.getInitialState()}function x(A,P=!1){function b(I){let C=I[A];return typeof C>"u"&&P&&(C=mi(p,b,g)),C}function S(I=d){const C=mi(h,P,()=>new WeakMap);return mi(C,I,()=>{const k={};for(const[_,E]of Object.entries(i.selectors??{}))k[_]=Gx(E,I,()=>mi(p,I,g),P);return k})}return{reducerPath:A,getSelectors:S,get selectors(){return S(b)},selectSlice:b}}const w={name:a,reducer:y,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:g,...x(o),injectInto(A,{reducerPath:P,...b}={}){const S=P??o;return A.inject({reducerPath:S,reducer:y},b),{...w,...x(S,!0)}}};return w}}function Gx(e,t,r,n){function i(a,...o){let l=t(a);return typeof l>"u"&&n&&(l=r()),e(l,...o)}return i.unwrapped=e,i}var Le=Vx();function qx(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Xx({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!Qx(n))throw new Error(Ze(17));a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Je(e,o):Je(e))}function Zx(e){return e._reducerDefinitionType==="asyncThunk"}function Qx(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Jx({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Ze(18));const{payloadCreator:a,fulfilled:o,pending:l,rejected:u,settled:c,options:s}=r,f=i(e,a,s);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),l&&n.addCase(f.pending,l),u&&n.addCase(f.rejected,u),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:o||yi,pending:l||yi,rejected:u||yi,settled:c||yi})}function yi(){}var ew="task",op="listener",lp="completed",ou="cancelled",tw=`task-${ou}`,rw=`task-${lp}`,yl=`${op}-${ou}`,nw=`${op}-${lp}`,$a=class{constructor(e){di(this,"code");di(this,"name","TaskAbortError");di(this,"message");this.code=e,this.message=`${ew} ${ou} (reason: ${e})`}},lu=(e,t)=>{if(typeof e!="function")throw new TypeError(Ze(32))},Ui=()=>{},up=(e,t=Ui)=>(e.catch(t),e),cp=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),mr=e=>{if(e.aborted)throw new $a(e.reason)};function sp(e,t){let r=Ui;return new Promise((n,i)=>{const a=()=>i(new $a(e.reason));if(e.aborted){a();return}r=cp(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Ui})}var iw=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof $a?"cancelled":"rejected",error:r}}finally{t==null||t()}},Hi=e=>t=>up(sp(e,t).then(r=>(mr(e),r))),fp=e=>{const t=Hi(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Wr}=Object,xs={},Na="listenerMiddleware",aw=(e,t)=>{const r=n=>cp(e,()=>n.abort(e.reason));return(n,i)=>{lu(n);const a=new AbortController;r(a);const o=iw(async()=>{mr(e),mr(a.signal);const l=await n({pause:Hi(a.signal),delay:fp(a.signal),signal:a.signal});return mr(a.signal),l},()=>a.abort(rw));return i!=null&&i.autoJoin&&t.push(o.catch(Ui)),{result:Hi(e)(o),cancel(){a.abort(tw)}}}},ow=(e,t)=>{const r=async(n,i)=>{mr(t);let a=()=>{};const l=[new Promise((u,c)=>{let s=e({predicate:n,effect:(f,d)=>{d.unsubscribe(),u([f,d.getState(),d.getOriginalState()])}});a=()=>{s(),c()}})];i!=null&&l.push(new Promise(u=>setTimeout(u,i,null)));try{const u=await sp(t,Promise.race(l));return mr(t),u}finally{a()}};return(n,i)=>up(r(n,i))},dp=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=Je(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Ze(21));return lu(a),{predicate:i,type:t,effect:a}},vp=Wr(e=>{const{type:t,predicate:r,effect:n}=dp(e);return{id:Ux(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Ze(22))}}},{withTypes:()=>vp}),ws=(e,t)=>{const{type:r,effect:n,predicate:i}=dp(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},gl=e=>{e.pending.forEach(t=>{t.abort(yl)})},lw=(e,t)=>()=>{for(const r of t.keys())gl(r);e.clear()},As=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},hp=Wr(Je(`${Na}/add`),{withTypes:()=>hp}),uw=Je(`${Na}/removeAll`),pp=Wr(Je(`${Na}/remove`),{withTypes:()=>pp}),cw=(...e)=>{console.error(`${Na}/error`,...e)},Yn=(e={})=>{const t=new Map,r=new Map,n=h=>{const p=r.get(h)??0;r.set(h,p+1)},i=h=>{const p=r.get(h)??1;p===1?r.delete(h):r.set(h,p-1)},{extra:a,onError:o=cw}=e;lu(o);const l=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),p=>{h.unsubscribe(),p!=null&&p.cancelActive&&gl(h)}),u=h=>{const p=ws(t,h)??vp(h);return l(p)};Wr(u,{withTypes:()=>u});const c=h=>{const p=ws(t,h);return p&&(p.unsubscribe(),h.cancelActive&&gl(p)),!!p};Wr(c,{withTypes:()=>c});const s=async(h,p,m,y)=>{const g=new AbortController,x=ow(u,g.signal),w=[];try{h.pending.add(g),n(h),await Promise.resolve(h.effect(p,Wr({},m,{getOriginalState:y,condition:(A,P)=>x(A,P).then(Boolean),take:x,delay:fp(g.signal),pause:Hi(g.signal),extra:a,signal:g.signal,fork:aw(g.signal,w),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((A,P,b)=>{A!==g&&(A.abort(yl),b.delete(A))})},cancel:()=>{g.abort(yl),h.pending.delete(g)},throwIfCancelled:()=>{mr(g.signal)}})))}catch(A){A instanceof $a||As(o,A,{raisedBy:"effect"})}finally{await Promise.all(w),g.abort(nw),i(h),h.pending.delete(g)}},f=lw(t,r);return{middleware:h=>p=>m=>{if(!Uh(m))return p(m);if(hp.match(m))return u(m.payload);if(uw.match(m)){f();return}if(pp.match(m))return c(m.payload);let y=h.getState();const g=()=>{if(y===xs)throw new Error(Ze(23));return y};let x;try{if(x=p(m),t.size>0){const w=h.getState(),A=Array.from(t.values());for(const P of A){let b=!1;try{b=P.predicate(m,w,y)}catch(S){b=!1,As(o,S,{raisedBy:"predicate"})}b&&s(P,m,h,g)}}}finally{y=xs}return x},startListening:u,stopListening:c,clearListeners:f}};function Ze(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var sw={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},mp=Le({name:"chartLayout",initialState:sw,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),La=mp.actions,fw=La.setMargin,dw=La.setLayout,vw=La.setChartSize,hw=La.setScale,pw=mp.reducer;function yp(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Y(e){return Number.isFinite(e)}function kt(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Ps(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ps(Object(r),!0).forEach(function(n){mw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ps(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mw(e,t,r){return(t=yw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yw(e){var t=gw(e,"string");return typeof t=="symbol"?t:t+""}function gw(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Z(e,t,r){return pe(e)||pe(t)?r:Ct(t)?Et(e,t,r):typeof t=="function"?t(e):r}var bw=(e,t,r)=>{if(t&&r){var n=r.width,i=r.height,a=t.align,o=t.verticalAlign,l=t.layout,u=t.position,c=t.offset,s=c===void 0?0:c;if(u!=null){if(Z0(u)){if(u==="top"&&D(e.top))return Fe(Fe({},e),{},{top:e.top+(i||0)+s});if(u==="bottom"&&D(e.bottom))return Fe(Fe({},e),{},{bottom:e.bottom+(i||0)+s});if(u==="left"&&D(e.left))return Fe(Fe({},e),{},{left:e.left+(n||0)+s});if(u==="right"&&D(e.right))return Fe(Fe({},e),{},{right:e.right+(n||0)+s})}return e}if((l==="vertical"||l==="horizontal"&&o==="middle")&&a!=="center"&&D(e[a]))return Fe(Fe({},e),{},{[a]:e[a]+(n||0)});if((l==="horizontal"||l==="vertical"&&a==="center")&&o!=="middle"&&D(e[o]))return Fe(Fe({},e),{},{[o]:e[o]+(i||0)})}return e},pt=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",gp=(e,t,r,n)=>{if(n)return e.map(l=>l.coordinate);var i,a,o=e.map(l=>(l.coordinate===t&&(i=!0),l.coordinate===r&&(a=!0),l.coordinate));return i||o.push(t),a||o.push(r),o},bp=(e,t,r)=>{if(!e)return null;var n=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,l=e.realScaleType,u=e.isCategorical,c=e.categoricalDomain,s=e.tickCount,f=e.ticks,d=e.niceTicks,h=e.axisType;if(!o)return null;var p=l==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,m=i==="category"&&o.bandwidth?o.bandwidth()/p:0;if(m=h==="angleAxis"&&a&&a.length>=2?$e(a[0]-a[1])*2*m:m,f||d){var y=(f||d||[]).map((g,x)=>{var w=n?n.indexOf(g):g,A=o.map(w);return Y(A)?{coordinate:A+m,value:g,offset:m,index:x}:null}).filter(Be);return y}return u&&c?c.map((g,x)=>{var w=o.map(g);return Y(w)?{coordinate:w+m,value:g,index:x,offset:m}:null}).filter(Be):o.ticks&&s!=null?o.ticks(s).map((g,x)=>{var w=o.map(g);return Y(w)?{coordinate:w+m,value:g,index:x,offset:m}:null}).filter(Be):o.domain().map((g,x)=>{var w=o.map(g);return Y(w)?{coordinate:w+m,value:n?n[g]:g,index:x,offset:m}:null}).filter(Be)},xw=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0,l=0;l<r;++l){var u=e[l],c=u==null?void 0:u[i];if(c!=null){var s=c[1],f=c[0],d=It(s)?f:s;d>=0?(c[0]=a,a+=d,c[1]=a):(c[0]=o,o+=d,c[1]=o)}}}},ww=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0;o<r;++o){var l=e[o],u=l==null?void 0:l[i];if(u!=null){var c=It(u[1])?u[0]:u[1];c>=0?(u[0]=a,a+=c,u[1]=a):(u[0]=0,u[1]=0)}}}},Aw={sign:xw,expand:yb,none:xr,silhouette:gb,wiggle:bb,positive:ww},Pw=(e,t,r)=>{var n,i=(n=Aw[r])!==null&&n!==void 0?n:xr,a=mb().keys(t).value((l,u)=>Number(Z(l,u,0))).order(nl).offset(i),o=a(e);return o.forEach((l,u)=>{l.forEach((c,s)=>{var f=Z(e[s],t[u],0);Array.isArray(f)&&f.length===2&&D(f[0])&&D(f[1])&&(c[0]=f[0],c[1]=f[1])})}),o};function Ow(e){return e==null?void 0:String(e)}function Yi(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!pe(i[t.dataKey])){var l=Qv(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r!=null&&r[a]?r[a].coordinate+n/2:null}var u=Z(i,pe(o)?t.dataKey:o),c=t.scale.map(u);return D(c)?c:null}var Sw=e=>{var t=e.flat(2).filter(D);return[Math.min(...t),Math.max(...t)]},Ew=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Iw=(e,t,r)=>{if(!(e==null||Object.keys(e).length===0))return Ew(Object.keys(e).reduce((n,i)=>{var a=e[i];if(!a)return n;var o=a.stackedData,l=o.reduce((u,c)=>{var s=yp(c,t,r),f=Sw(s);return!Y(f[0])||!Y(f[1])?u:[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},Os=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ss=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Vr=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Ia(t,m=>m.coordinate),a=[],o=0,l=1,u=i.length;l<u;l++){var c,s,f=(((c=i[l])===null||c===void 0?void 0:c.coordinate)||0)-(((s=i[l-1])===null||s===void 0?void 0:s.coordinate)||0);a.push(f),o=Math.max(f,o)}var d=o*1e-4,h=1/0;for(var p of a)p>d&&(h=Math.min(p,h));return h===1/0?0:h}return r?void 0:0};function Es(e){var t=e.tooltipEntrySettings,r=e.dataKey,n=e.payload,i=e.value,a=e.name;return Fe(Fe({},t),{},{dataKey:r,payload:n,value:i,name:a})}function tn(e,t){if(e!=null)return String(e);if(typeof t=="string")return t}var Cw=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},kw=(e,t)=>t==="centric"?e.angle:e.radius,Ft=e=>e.layout.width,Kt=e=>e.layout.height,_w=e=>e.layout.scale,xp=e=>e.layout.margin,Ra=O(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),za=O(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),wp="data-recharts-item-index",Ap="data-recharts-item-id",Vn=60,uu=30;function Is(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Is(Object(r),!0).forEach(function(n){jw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Is(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jw(e,t,r){return(t=Tw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tw(e){var t=Dw(e,"string");return typeof t=="symbol"?t:t+""}function Dw(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mw=e=>e.brush.height;function $w(e){var t=za(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Vn;return r+i}return r},0)}function Nw(e){var t=za(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Vn;return r+i}return r},0)}function Lw(e){var t=Ra(e);return t.reduce((r,n)=>{if(n.orientation==="top"&&!n.mirror&&!n.hide){var i=typeof n.height=="number"?n.height:uu;return r+i}return r},0)}function Rw(e){var t=Ra(e);return t.reduce((r,n)=>{if(n.orientation==="bottom"&&!n.mirror&&!n.hide){var i=typeof n.height=="number"?n.height:uu;return r+i}return r},0)}var Oe=O([Ft,Kt,xp,Mw,$w,Nw,Lw,Rw,Wh,ox],(e,t,r,n,i,a,o,l,u,c)=>{var s={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+o,bottom:(r.bottom||0)+l},d=gi(gi({},f),s),h=d.bottom;d.bottom+=n,d=bw(d,u,c);var p=e-d.left-d.right,m=t-d.top-d.bottom;return gi(gi({brushBottom:h},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),zw=O(Oe,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Pp=O(Ft,Kt,(e,t)=>({x:0,y:0,width:e,height:t})),Bw=v.createContext(null),Re=()=>v.useContext(Bw)!=null,Ba=e=>e.brush,Wa=O([Ba,Oe,xp],(e,t,r)=>({height:e.height,x:D(e.x)?e.x:t.left,y:D(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:D(e.width)?e.width:t.width}));function Ww(e,t,{signal:r,edges:n}={}){let i,a=null;const o=n!=null&&n.includes("leading"),l=n==null||n.includes("trailing"),u=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},c=()=>{l&&u(),h()};let s=null;const f=()=>{s!=null&&clearTimeout(s),s=setTimeout(()=>{s=null,c()},t)},d=()=>{s!==null&&(clearTimeout(s),s=null)},h=()=>{d(),i=void 0,a=null},p=()=>{u()},m=function(...y){if(r!=null&&r.aborted)return;i=this,a=y;const g=s==null;f(),o&&g&&u()};return m.schedule=f,m.cancel=h,m.flush=p,r==null||r.addEventListener("abort",h,{once:!0}),m}function Fw(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:n=!1,trailing:i=!0,maxWait:a}=r,o=Array(2);n&&(o[0]="leading"),i&&(o[1]="trailing");let l,u=null;const c=Ww(function(...d){l=e.apply(this,d),u=null},t,{edges:o}),s=function(...d){return a!=null&&(u===null&&(u=Date.now()),Date.now()-u>=a)?(l=e.apply(this,d),u=Date.now(),c.cancel(),c.schedule(),l):(c.apply(this,d),l)},f=()=>(c.flush(),l);return s.cancel=c.cancel,s.flush=f,s}function Kw(e,t=0,r={}){const{leading:n=!0,trailing:i=!0}=r;return Fw(e,t,{leading:n,maxWait:t,trailing:i})}var Vi=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,()=>i[o++]))}},At={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Op=(e,t,r)=>{var n=r.width,i=n===void 0?At.width:n,a=r.height,o=a===void 0?At.height:a,l=r.aspect,u=r.maxHeight,c=br(i)?e:Number(i),s=br(o)?t:Number(o);return l&&l>0&&(c?s=c/l:s&&(c=s*l),u&&s!=null&&s>u&&(s=u)),{calculatedWidth:c,calculatedHeight:s}},Uw={width:0,height:0,overflow:"visible"},Hw={width:0,overflowX:"visible"},Yw={height:0,overflowY:"visible"},Vw={},Gw=e=>{var t=e.width,r=e.height,n=br(t),i=br(r);return n&&i?Uw:n?Hw:i?Yw:Vw};function qw(e){var t=e.width,r=e.height,n=e.aspect,i=t,a=r;return i===void 0&&a===void 0?(i=At.width,a=At.height):i===void 0?i=n&&n>0?void 0:At.width:a===void 0&&(a=n&&n>0?void 0:At.height),{width:i,height:a}}var Xw=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function Gi(){return Gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gi.apply(null,arguments)}function Cs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ks(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cs(Object(r),!0).forEach(function(n){Zw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zw(e,t,r){return(t=Qw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qw(e){var t=Jw(e,"string");return typeof t=="symbol"?t:t+""}function Jw(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eA(e,t){return iA(e)||nA(e,t)||rA(e,t)||tA()}function tA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rA(e,t){if(e){if(typeof e=="string")return _s(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_s(e,t):void 0}}function _s(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nA(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(s){c=!0,i=s}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return l}}function iA(e){if(Array.isArray(e))return e}function aA(e,t){if(e==null)return{};var r,n,i=oA(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function oA(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Sp=v.createContext(At.initialDimension);function lA(e){return kt(e.width)&&kt(e.height)}function Ep(e){var t=e.children,r=e.width,n=e.height,i=v.useMemo(()=>({width:r,height:n}),[r,n]);return lA(i)?v.createElement(Sp.Provider,{value:i},t):null}var cu=()=>v.useContext(Sp),uA=v.forwardRef((e,t)=>{var r=e.aspect,n=e.initialDimension,i=n===void 0?At.initialDimension:n,a=e.width,o=e.height,l=e.minWidth,u=l===void 0?At.minWidth:l,c=e.minHeight,s=e.maxHeight,f=e.children,d=e.debounce,h=d===void 0?At.debounce:d,p=e.id,m=e.className,y=e.onResize,g=e.style,x=g===void 0?{}:g,w=aA(e,Xw),A=v.useRef(null),P=v.useRef();P.current=y,v.useImperativeHandle(t,()=>A.current);var b=v.useState({containerWidth:i.width,containerHeight:i.height}),S=eA(b,2),I=S[0],C=S[1],k=v.useCallback((W,F)=>{C(R=>{var G=Math.round(W),U=Math.round(F);return R.containerWidth===G&&R.containerHeight===U?R:{containerWidth:G,containerHeight:U}})},[]);v.useEffect(()=>{if(A.current==null||typeof ResizeObserver>"u")return Er;var W=we=>{var Ie,de=we[0];if(de!=null){var He=de.contentRect,Ye=He.width,ct=He.height;k(Ye,ct),(Ie=P.current)===null||Ie===void 0||Ie.call(P,Ye,ct)}};h>0&&(W=Kw(W,h,{trailing:!0,leading:!1}));var F=new ResizeObserver(W),R=A.current.getBoundingClientRect(),G=R.width,U=R.height;return k(G,U),F.observe(A.current),()=>{F.disconnect()}},[k,h]);var _=I.containerWidth,E=I.containerHeight;Vi(!r||r>0,"The aspect(%s) must be greater than zero.",r);var L=Op(_,E,{width:a,height:o,aspect:r,maxHeight:s}),T=L.calculatedWidth,B=L.calculatedHeight;return Vi(_<0||E<0||T!=null&&T>0||B!=null&&B>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
4
4
|
please check the style of container, or the props width(%s) and height(%s),
|
package/dist/spa/index.html
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
rel="stylesheet"
|
|
11
11
|
/>
|
|
12
12
|
<title>ai gateway · governance console</title>
|
|
13
|
-
<script type="module" crossorigin src="/ai-gateway/assets/index-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/ai-gateway/assets/base-ui-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/ai-gateway/assets/recharts-
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/ai-gateway/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/ai-gateway/assets/index-Cto4iy07.js"></script>
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/ai-gateway/assets/base-ui-CeQ9JhU_.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/ai-gateway/assets/recharts-DSmxPXW6.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/ai-gateway/assets/index-CTK2sMGd.js">
|
|
17
17
|
<link rel="stylesheet" crossorigin href="/ai-gateway/assets/index-CO6XH1b7.css">
|
|
18
18
|
</head>
|
|
19
19
|
<body>
|