@obzerver/server 0.18.2 → 0.18.5

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.
@@ -0,0 +1,118 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ne(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ee(a,u),c+=ne(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ee(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(te(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function re(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ae=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function oe(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ae)}catch(e){ae(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function se(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else oe(se.bind(null,e))}var ce={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ce,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=se,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=oe,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),ee=Symbol.for(`react.strict_mode`),te=Symbol.for(`react.profiler`),ne=Symbol.for(`react.consumer`),re=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),ae=Symbol.for(`react.suspense`),oe=Symbol.for(`react.suspense_list`),se=Symbol.for(`react.memo`),ce=Symbol.for(`react.lazy`),le=Symbol.for(`react.activity`),ue=Symbol.for(`react.legacy_hidden`),de=Symbol.for(`react.memo_cache_sentinel`),fe=Symbol.for(`react.view_transition`),pe=Symbol.for(`react.recoverable`),me=Symbol.iterator;function he(e){return typeof e!=`object`||!e?null:(e=me&&e[me]||e[`@@iterator`],typeof e==`function`?e:null)}var ge=Symbol.for(`react.client.reference`);function _e(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case te:return`Profiler`;case ee:return`StrictMode`;case ae:return`Suspense`;case oe:return`SuspenseList`;case le:return`Activity`;case fe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case re:return e.displayName||`Context`;case ne:return(e._context.displayName||`Context`)+`.Consumer`;case ie:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case se:return t=e.displayName||null,t===null?_e(e.type)||`Memo`:t;case ce:t=e._payload,e=e._init;try{return _e(e(t))}catch{}}return null}var ve=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},xe=[],Se=-1;function Ce(e){return{current:e}}function we(e){0>Se||(e.current=xe[Se],xe[Se]=null,Se--)}function Te(e,t){Se++,xe[Se]=e.current,e.current=t}var Ee=Ce(null),De=Ce(null),Oe=Ce(null),ke=Ce(null);function Ae(e,t){switch(Te(Oe,t),Te(De,e),Te(Ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fp(t),e=pp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}we(Ee),Te(Ee,e)}function je(){we(Ee),we(De),we(Oe)}function Me(e){var t=e.memoizedState;t!==null&&(lh._currentValue=t.memoizedState,Te(ke,e)),t=Ee.current;var n=pp(t,e.type);t!==n&&(Te(De,e),Te(Ee,n))}function Ne(e){De.current===e&&(we(Ee),we(De)),ke.current===e&&(we(ke),lh._currentValue=be)}var Pe,Fe;function Ie(e){if(Pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Pe=t&&t[1]||``,Fe=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+Pe+e+Fe}var Le=!1;function Re(e,t){if(!e||Le)return``;Le=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Le=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ie(n):``}function ze(e,t){switch(e.tag){case 26:case 27:case 5:return Ie(e.type);case 16:return Ie(`Lazy`);case 13:return e.child!==t&&t!==null?Ie(`Suspense Fallback`):Ie(`Suspense`);case 19:return Ie(`SuspenseList`);case 0:case 15:return Re(e.type,!1);case 11:return Re(e.type.render,!1);case 1:return Re(e.type,!0);case 31:return Ie(`Activity`);case 30:return Ie(`ViewTransition`);default:return``}}function Be(e){try{var t=``,n=null;do t+=ze(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Ve=Object.prototype.hasOwnProperty,He=t.unstable_scheduleCallback,Ue=t.unstable_cancelCallback,We=t.unstable_shouldYield,Ge=t.unstable_requestPaint,Ke=t.unstable_now,qe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,Ye=t.unstable_UserBlockingPriority,Xe=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,$e=t.log,et=t.unstable_setDisableYieldValue,tt=null,nt=null;function rt(e){if(typeof $e==`function`&&et(e),nt&&typeof nt.setStrictMode==`function`)try{nt.setStrictMode(tt,e)}catch{}}var it=Math.clz32?Math.clz32:st,at=Math.log,ot=Math.LN2;function st(e){return e>>>=0,e===0?32:31-(at(e)/ot|0)|0}var ct=256,lt=262144,ut=4194304;function dt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ft(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=dt(n))):i=dt(o):i=dt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=dt(n))):i=dt(o)):i=dt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function pt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function mt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-it(n),i=1<<r;t|=e[r],n&=~i}return t}function ht(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gt(){var e=ut;return ut<<=1,!(ut&62914560)&&(ut=4194304),e}function _t(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-it(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&bt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function bt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-it(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function xt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function St(e,t){var n=t&-t;return n=n&42?1:Ct(n),(n&(e.suspendedLanes|t))===0?n:0}function Ct(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function wt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Tt(){var e=ye.p;return e===0?(e=window.event,e===void 0?32:Th(e.type)):e}function Et(e,t){var n=ye.p;try{return ye.p=e,t()}finally{ye.p=n}}var Dt=Math.random().toString(36).slice(2),Ot=`__reactFiber$`+Dt,kt=`__reactProps$`+Dt,At=`__reactContainer$`+Dt,jt=`__reactEvents$`+Dt,Mt=`__reactListeners$`+Dt,Nt=`__reactHandles$`+Dt,Pt=`__reactResources$`+Dt,Ft=`__reactMarker$`+Dt,It=`__reactLoad$`+Dt;function Lt(e){delete e[Ot],delete e[kt],delete e[Mt],delete e[Nt]}function Rt(e){var t;if(t=e[Ot])return t;for(var n=e.parentNode;n;){if(t=n[At]||n[Ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mm(e);e!==null;){if(n=e[Ot])return n;e=mm(e)}return t}e=n,n=e.parentNode}return null}function zt(e){if(e=e[Ot]||e[At]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Vt(e){var t=e[Pt];return t||=e[Pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ht(e){e[Ft]=!0}function Ut(e){e[It]=void 0}var Wt=new Set,Gt={};function Kt(e,t){qt(e,t),qt(e+`Capture`,t)}function qt(e,t){for(Gt[e]=t,e=0;e<t.length;e++)Wt.add(t[e])}var Jt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Yt={},Xt={};function Zt(e){return Ve.call(Xt,e)?!0:Ve.call(Yt,e)?!1:Jt.test(e)?Xt[e]=!0:(Yt[e]=!0,!1)}var Qt=!1;function $t(){var e=Qt;return Qt=!1,e}function en(e,t,n){if(Zt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function tn(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function nn(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function rn(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function an(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function on(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sn(e){if(!e._valueTracker){var t=an(e)?`checked`:`value`;e._valueTracker=on(e,t,``+e[t])}}function cn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=an(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var ln=/[\n"\\]/g;function un(e){return e.replace(ln,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function dn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+rn(t)):e.value!==``+rn(t)&&(e.value=``+rn(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):pn(e,rn(n)):o===`number`&&e.value==t?pn(e,rn(e.value)):pn(e,rn(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+rn(s):e.removeAttribute(`name`)}function fn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){sn(e);return}n=n==null?``:``+rn(n),t=t==null?n:``+rn(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),sn(e)}function pn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function mn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+rn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function hn(e,t,n){t!=null&&(t=``+rn(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+rn(n)}function gn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ve(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=rn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),sn(e)}function _n(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function yn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||vn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function bn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Qt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(yn(e,a,r),Qt=!0)}else for(var o in t)t.hasOwnProperty(o)&&yn(e,o,t[o])}function xn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Sn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Cn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wn(e){return Cn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Tn(){}var En=null;function Dn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var On=null,kn=null;function An(e){var t=zt(e);if(t&&(e=t.stateNode)){var n=e[kt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(dn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+un(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[kt]||null;if(!a)throw Error(i(90));dn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&cn(r)}break a;case`textarea`:hn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&mn(e,!!n.multiple,t,!1)}}}var jn=!1;function Mn(e,t,n){if(jn)return e(t,n);jn=!0;try{return e(t)}finally{if(jn=!1,(On!==null||kn!==null)&&(Rd(),On&&(t=On,e=kn,kn=On=null,An(t),e)))for(t=0;t<e.length;t++)An(e[t])}}function Nn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[kt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Pn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Fn=!1;if(Pn)try{var In={};Object.defineProperty(In,"passive",{get:function(){Fn=!0}}),window.addEventListener(`test`,In,In),window.removeEventListener(`test`,In,In)}catch{Fn=!1}var Ln=null,Rn=null,zn=null;function Bn(){if(zn)return zn;var e,t=Rn,n=t.length,r,i=`value`in Ln?Ln.value:Ln.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return zn=i.slice(e,1<r?1-r:void 0)}function Vn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Hn(){return!0}function Un(){return!1}function Wn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Hn:Un,this.isPropagationStopped=Un,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Hn)},persist:function(){},isPersistent:Hn}),t}var Gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kn=Wn(Gn),qn=D({},Gn,{view:0,detail:0}),N=Wn(qn),P,Jn,F,Yn=D({},qn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==F&&(F&&e.type===`mousemove`?(P=e.screenX-F.screenX,Jn=e.screenY-F.screenY):Jn=P=0,F=e),P)},movementY:function(e){return`movementY`in e?e.movementY:Jn}}),Xn=Wn(Yn),Zn=Wn(D({},Yn,{dataTransfer:0})),I=Wn(D({},qn,{relatedTarget:0})),L=Wn(D({},Gn,{animationName:0,elapsedTime:0,pseudoElement:0})),Qn=Wn(D({},Gn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),$n=Wn(D({},Gn,{data:0})),er={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},tr={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},nr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function rr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nr[e])?!!t[e]:!1}function ir(){return rr}var ar=Wn(D({},qn,{key:function(e){if(e.key){var t=er[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Vn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?tr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type===`keypress`?Vn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Vn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),or=Wn(D({},Yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),sr=Wn(D({},Gn,{submitter:0})),cr=Wn(D({},qn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir})),R=Wn(D({},Gn,{propertyName:0,elapsedTime:0,pseudoElement:0})),lr=Wn(D({},Yn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ur=Wn(D({},Gn,{newState:0,oldState:0,source:0})),dr=[9,13,27,32],fr=Pn&&`CompositionEvent`in window,pr=null;Pn&&`documentMode`in document&&(pr=document.documentMode);var mr=Pn&&`TextEvent`in window&&!pr,hr=Pn&&(!fr||pr&&8<pr&&11>=pr),gr=` `,_r=!1;function vr(e,t){switch(e){case`keyup`:return dr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function yr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var br=!1;function xr(e,t){switch(e){case`compositionend`:return yr(t);case`keypress`:return t.which===32?(_r=!0,gr):null;case`textInput`:return e=t.data,e===gr&&_r?null:e;default:return null}}function Sr(e,t){if(br)return e===`compositionend`||!fr&&vr(e,t)?(e=Bn(),zn=Rn=Ln=null,br=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return hr&&t.locale!==`ko`?null:t.data;default:return null}}var Cr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Cr[e.type]:t===`textarea`}function Tr(e,t,n,r){On?kn?kn.push(r):kn=[r]:On=r,t=Yf(t,`onChange`),0<t.length&&(n=new Kn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Er=null,Dr=null;function Or(e){Vf(e,0)}function kr(e){if(cn(Bt(e)))return e}function Ar(e,t){if(e===`change`)return t}var jr=!1;if(Pn){var Mr;if(Pn){var Nr=`oninput`in document;if(!Nr){var Pr=document.createElement(`div`);Pr.setAttribute(`oninput`,`return;`),Nr=typeof Pr.oninput==`function`}Mr=Nr}else Mr=!1;jr=Mr&&(!document.documentMode||9<document.documentMode)}function Fr(){Er&&(Er.detachEvent(`onpropertychange`,Ir),Dr=Er=null)}function Ir(e){if(e.propertyName===`value`&&kr(Dr)){var t=[];Tr(t,Dr,e,Dn(e)),Mn(Or,t)}}function Lr(e,t,n){e===`focusin`?(Fr(),Er=t,Dr=n,Er.attachEvent(`onpropertychange`,Ir)):e===`focusout`&&Fr()}function Rr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return kr(Dr)}function zr(e,t){if(e===`click`)return kr(t)}function Br(e,t){if(e===`input`||e===`change`)return kr(t)}function Vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Hr=typeof Object.is==`function`?Object.is:Vr;function Ur(e,t){if(Hr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ve.call(t,i)||!Hr(e[i],t[i]))return!1}return!0}function Wr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kr(e,t){var n=Gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Gr(n)}}function qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wr(e.document)}return t}function Yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Xr=Pn&&`documentMode`in document&&11>=document.documentMode,Zr=null,Qr=null,$r=null,ei=!1;function ti(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ei||Zr==null||Zr!==Wr(r)||(r=Zr,`selectionStart`in r&&Yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$r&&Ur($r,r)||($r=r,r=Yf(Qr,`onSelect`),0<r.length&&(t=new Kn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Zr)))}function ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ri={animationend:ni(`Animation`,`AnimationEnd`),animationiteration:ni(`Animation`,`AnimationIteration`),animationstart:ni(`Animation`,`AnimationStart`),transitionrun:ni(`Transition`,`TransitionRun`),transitionstart:ni(`Transition`,`TransitionStart`),transitioncancel:ni(`Transition`,`TransitionCancel`),transitionend:ni(`Transition`,`TransitionEnd`)},ii={},ai={};Pn&&(ai=document.createElement(`div`).style,`AnimationEvent`in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),`TransitionEvent`in window||delete ri.transitionend.transition);function oi(e){if(ii[e])return ii[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ai)return ii[e]=t[n];return e}var si=oi(`animationend`),ci=oi(`animationiteration`),li=oi(`animationstart`),ui=oi(`transitionrun`),di=oi(`transitionstart`),fi=oi(`transitioncancel`),pi=oi(`transitionend`),mi=new Map,hi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);hi.push(`scrollEnd`);function gi(e,t){mi.set(e,t),Kt(t,[e])}var _i=0;function vi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=yd.identifierPrefix;var n=_i++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function yi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Dd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function bi(e,t){return e=yi(e),t=yi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var xi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Si=[],Ci=0,wi=0;function Ti(){for(var e=Ci,t=wi=Ci=0;t<e;){var n=Si[t];Si[t++]=null;var r=Si[t];Si[t++]=null;var i=Si[t];Si[t++]=null;var a=Si[t];if(Si[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ki(n,i,a)}}function Ei(e,t,n,r){Si[Ci++]=e,Si[Ci++]=t,Si[Ci++]=n,Si[Ci++]=r,wi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Di(e,t,n,r){return Ei(e,t,n,r),Ai(e)}function Oi(e,t){return Ei(e,null,null,t),Ai(e)}function ki(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-it(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ai(e){if(50<Od)throw Od=0,kd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function Mi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ni(e,t,n,r){return new Mi(e,t,n,r)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fi(e,t){var n=e.alternate;return n===null?(n=Ni(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ii(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Li(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Pi(r)&&(s=1);else if(typeof r==`string`)s=Ym(e,n,Ee.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case le:return e=Ni(31,n,t,a),e.elementType=le,e.lanes=o,e;case j:return Ri(n.children,a,o,t);case ee:s=8,a|=24;break;case te:return e=Ni(12,n,t,a|2),e.elementType=te,e.lanes=o,e;case ae:return e=Ni(13,n,t,a),e.elementType=ae,e.lanes=o,e;case oe:return e=Ni(19,n,t,a),e.elementType=oe,e.lanes=o,e;case ue:case fe:return e=a|32,e=Ni(30,n,t,e),e.elementType=fe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case re:s=10;break a;case ne:s=9;break a;case ie:s=11;break a;case se:s=14;break a;case ce:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ni(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ri(e,t,n,r){return e=Ni(7,e,r,t),e.lanes=n,e}function zi(e,t,n){return e=Ni(6,e,null,t),e.lanes=n,e}function Bi(e){var t=Ni(18,null,null,0);return t.stateNode=e,t}function Vi(e,t,n){return t=Ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hi=new WeakMap;function Ui(e,t){if(typeof e==`object`&&e){var n=Hi.get(e);return n===void 0?(t={value:e,source:t,stack:Be(t)},Hi.set(e,t),t):n}return{value:e,source:t,stack:Be(t)}}var Wi=[],Gi=0,Ki=null,qi=0,Ji=[],Yi=0,Xi=null,Zi=1,Qi=``;function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ki,Ki=e,qi=t}function ea(e,t,n){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Xi=e;var r=Zi;e=Qi;var i=32-it(r)-1;r&=~(1<<i),n+=1;var a=32-it(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zi=1<<32-it(t)+i|n<<i|r,Qi=a+e}else Zi=1<<a|n<<i|r,Qi=e}function ta(e){e.return!==null&&($i(e,1),ea(e,1,0))}function na(e){for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null;for(;e===Xi;)Xi=Ji[--Yi],Ji[Yi]=null,Qi=Ji[--Yi],Ji[Yi]=null,Zi=Ji[--Yi],Ji[Yi]=null}function ra(e,t){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Zi=t.id,Qi=t.overflow,Xi=e}var ia=null,aa=null,oa=!1,sa=null,ca=!1,la=Error(i(519));function ua(e){throw ga(Ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),la}function da(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ot]=e,t[kt]=r,n){case`dialog`:Hf(`cancel`,t),Hf(`close`,t);break;case`iframe`:case`object`:case`embed`:Hf(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Hf(zf[n],t);break;case`source`:Hf(`error`,t);break;case`img`:case`image`:case`link`:Hf(`error`,t),Hf(`load`,t);break;case`details`:Hf(`toggle`,t);break;case`input`:Hf(`invalid`,t),fn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Hf(`invalid`,t);break;case`textarea`:Hf(`invalid`,t),gn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||tp(t.textContent,n)?(r.popover!=null&&(Hf(`beforetoggle`,t),Hf(`toggle`,t)),r.onScroll!=null&&Hf(`scroll`,t),r.onScrollEnd!=null&&Hf(`scrollend`,t),r.onClick!=null&&(t.onclick=Tn),t=!0):t=!1,t||ua(e,!0)}function fa(e){for(ia=e.return;ia;)switch(ia.tag){case 5:case 31:case 13:ca=!1;return;case 27:case 3:ca=!0;return;default:ia=ia.return}}function pa(e){if(e!==ia)return!1;if(!oa)return fa(e),oa=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||hp(e.type,e.memoizedProps)),n=!n),n&&aa&&ua(e),fa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=pm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=pm(e)}else t===27?(t=aa,wp(e.type)?(e=fm,fm=null,aa=e):aa=t):aa=ia?dm(e.stateNode.nextSibling):null;return!0}function ma(){aa=ia=null,oa=!1}function ha(){var e=sa;return e!==null&&(dd===null?dd=e:dd.push.apply(dd,e),sa=null),e}function ga(e){sa===null?sa=[e]:sa.push(e)}var _a=Ce(null),va=null,ya=null;function ba(e,t,n){Te(_a,t._currentValue),t._currentValue=n}function xa(e){e._currentValue=_a.current,we(_a)}function Sa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ca(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Sa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Sa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Sa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function z(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Hr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ke.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lh]:e.push(lh))}a=a.return}return e!==null&&Ca(t,e,n,r),t.flags|=262144,e!==null}function B(e){for(e=e.firstContext;e!==null;){if(!Hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wa(e){va=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ta(e){return Da(va,e)}function Ea(e,t){return va===null&&wa(e),Da(e,t)}function Da(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ya===null){if(e===null)throw Error(i(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return n}var Oa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ka=t.unstable_scheduleCallback,Aa=t.unstable_NormalPriority,ja={$$typeof:re,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ma(){return{controller:new Oa,data:new Map,refCount:0}}function Na(e){e.refCount--,e.refCount===0&&ka(Aa,function(){e.controller.abort()})}function Pa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Fa=null;function Ia(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var La=null,V=0,Ra=0,H=null;function U(e,t){if(La===null){var n=La=[];V=0,Ra=Pf(),H={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return V++,t.then(za,za),t}function za(){if(--V===0&&(Fa=null,La!==null)){H!==null&&(H.status=`fulfilled`);var e=La;La=null,Ra=0,H=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function W(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ba=M.S;M.S=function(e,t){if(md=Ke(),typeof t==`object`&&t&&typeof t.then==`function`&&U(e,t),Fa!==null)for(var n=bf;n!==null;)Pa(n,Fa),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)Pa(r,n),r=r.next;if(Ra!==0){r=Fa,r===null&&(r=Fa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ba!==null&&Ba(e,t)};var Va=Ce(null);function Ha(){var e=Va.current;return e===null?Yu.pooledCache:e}function Ua(e,t){t===null?Te(Va,Va.current):Te(Va,t.pool)}function Wa(){var e=Ha();return e===null?null:{parent:ja._currentValue,pool:e}}var G=Error(i(460)),Ga=Error(i(474)),Ka=Error(i(542)),qa={then:function(){}};function Ja(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Tn,Tn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,$a(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(Tn,Tn);else{if(e=Yu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,$a(e),e}throw Za=t,G}}function Xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Za=e,G):e}}var Za=null;function Qa(){if(Za===null)throw Error(i(459));var e=Za;return Za=null,e}function $a(e){if(e===G||e===Ka)throw Error(i(483))}var eo=null,K=0;function to(e){var t=K;return K+=1,eo===null&&(eo=[]),Ya(eo,e,t)}function no(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ro(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function io(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=zi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),no(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ce&&Xa(i)===t.type)?(t=a(t,n.props),no(t,n),t.return=e,t):(t=Li(n.type,n.key,n.props,null,e.mode,r),no(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ri(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=zi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Li(t.type,t.key,t.props,null,e.mode,n),no(n,t),n.return=e,n;case A:return t=Vi(t,e.mode,n),t.return=e,t;case ce:return t=Xa(t),f(e,t,n)}if(ve(t)||he(t))return t=Ri(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,to(t),n);if(t.$$typeof===re)return f(e,Ea(e,t),n);ro(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case ce:return n=Xa(n),p(e,t,n,r)}if(ve(n)||he(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,to(n),r);if(n.$$typeof===re)return p(e,t,Ea(e,n),r);ro(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ce:return r=Xa(r),m(e,t,n,r,i)}if(ve(r)||he(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,to(r),i);if(r.$$typeof===re)return m(e,t,n,Ea(t,r),i);ro(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),oa&&$i(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return oa&&$i(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),oa&&$i(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),oa&&$i(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return oa&&$i(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),oa&&$i(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),no(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ce&&Xa(l)===r.type){n(e,r.sibling),c=a(r,o.props),no(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Ri(o.props.children,e.mode,c,o.key),no(c,o),c.return=e,e=c):(c=Li(o.type,o.key,o.props,null,e.mode,c),no(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Vi(o,e.mode,c),c.return=e,e=c}return s(e);case ce:return o=Xa(o),_(e,r,o,c)}if(ve(o))return h(e,r,o,c);if(he(o)){if(l=he(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,to(o),c);if(o.$$typeof===re)return _(e,r,Ea(e,o),c);ro(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=zi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{K=0;var i=_(e,t,n,r);return eo=null,i}catch(t){if(t===G||t===Ka)throw t;var a=Ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ao=io(!0),oo=io(!1),so=!1;function co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function uo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ju&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ai(e),ki(e,null,n),t}return Ei(e,r,t,n),Ai(e)}function po(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}function mo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ho=!1;function go(){if(ho){var e=H;if(e!==null)throw e}}function _o(e,t,n,r){ho=!1;var i=e.updateQueue;so=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Zu&f)===f:(r&f)===f){f!==0&&f===Ra&&(ho=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:so=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ad|=o,e.lanes=o,e.memoizedState=d}}function vo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function yo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)vo(n[e],t)}var bo=Ce(null),xo=Ce(0);function So(e,t){e=rd,Te(xo,e),Te(bo,t),rd=e|t.baseLanes}function Co(){Te(xo,rd),Te(bo,bo.current)}function wo(){rd=xo.current,we(bo),we(xo)}var To=Ce(null),Eo=null;function Do(e){var t=e.alternate;Te(q,q.current&1),Te(To,e),Eo===null&&(t===null||bo.current!==null||t.memoizedState!==null)&&(Eo=e)}function Oo(e){Te(q,q.current),Te(To,e),Eo===null&&(Eo=e)}function ko(e){e.tag===22?(Te(q,q.current),Te(To,e),Eo===null&&(Eo=e)):Ao()}function Ao(){Te(q,q.current),Te(To,To.current)}function jo(e){we(To),Eo===e&&(Eo=null),we(q)}var q=Ce(0);function Mo(e,t){Te(To,To.current),Te(q,t)}function No(e){we(q),we(To),Eo===e&&(Eo=null)}function Po(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cm(n)||lm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fo=0,Io=null,Lo=null,Ro=null,zo=!1,Bo=!1,Vo=!1,Ho=0,Uo=0,Wo=null,Go=0;function Ko(){throw Error(i(321))}function qo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Hr(e[n],t[n]))return!1;return!0}function Jo(e,t,n,r,i,a){return Fo=a,Io=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?lc:X,Vo=!1,a=n(r,i),Vo=!1,Bo&&(a=Xo(t,n,r,i)),Yo(e),a}function Yo(e){M.H=cc;var t=Lo!==null&&Lo.next!==null;if(Fo=0,Ro=Lo=Io=null,zo=!1,Uo=0,Wo=null,t)throw Error(i(300));e===null||Ec||(e=e.dependencies,e!==null&&B(e)&&(Ec=!0))}function Xo(e,t,n,r){Io=e;var a=0;do{if(Bo&&(Wo=null),Uo=0,Bo=!1,25<=a)throw Error(i(301));if(a+=1,Ro=Lo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=uc,o=t(n,r)}while(Bo);return o}function Zo(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?is(t):t,e=e.useState()[0],(Lo===null?null:Lo.memoizedState)!==e&&(Io.flags|=1024),t}function Qo(){var e=Ho!==0;return Ho=0,e}function $o(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function es(e){if(zo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zo=!1}Fo=0,Ro=Lo=Io=null,Bo=!1,Uo=Ho=0,Wo=null}function ts(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ro===null?Io.memoizedState=Ro=e:Ro=Ro.next=e,Ro}function ns(){if(Lo===null){var e=Io.alternate;e=e===null?null:e.memoizedState}else e=Lo.next;var t=Ro===null?Io.memoizedState:Ro.next;if(t!==null)Ro=t,Lo=e;else{if(e===null)throw Io.alternate===null?Error(i(467)):Error(i(310));Lo=e,e={memoizedState:Lo.memoizedState,baseState:Lo.baseState,baseQueue:Lo.baseQueue,queue:Lo.queue,next:null},Ro===null?Io.memoizedState=Ro=e:Ro=Ro.next=e}return Ro}function rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function is(e){var t=Uo;return Uo+=1,Wo===null&&(Wo=[]),e=Ya(Wo,e,t),t=Io,(Ro===null?t.memoizedState:Ro.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?lc:X),e}function as(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return is(e);if(e.$$typeof===pe)return;if(e.$$typeof===re)return Ta(e)}throw Error(i(438,String(e)))}function os(e){var t=null,n=Io.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Io.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=rs(),Io.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=de;return t.index++,n}function ss(e,t){return typeof t==`function`?t(e):t}function cs(e){return ls(ns(),Lo,e)}function ls(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Fo&f)===f:(Zu&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ra&&(d=!0);else if((Fo&p)===p){u=u.next,p===Ra&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,Io.lanes|=p,ad|=p;f=u.action,Vo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,Io.lanes|=f,ad|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Hr(o,e.memoizedState)&&(Ec=!0,d&&(n=H,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function us(e){var t=ns(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Hr(o,t.memoizedState)||(Ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ds(e,t,n){var r=Io,a=ns(),o=oa;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Hr((Lo||a).memoizedState,n);if(s&&(a.memoizedState=n,Ec=!0),a=a.queue,Is(ms.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ro!==null&&!!(Ro.memoizedState.tag&1),js(e?9:8,{destroy:void 0},ps.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Yu===null)throw Error(i(349));o||Fo&127||fs(r,t,n)}return n}function fs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Io.updateQueue,t===null?(t=rs(),Io.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ps(e,t,n,r){t.value=n,t.getSnapshot=r,hs(t)&&gs(e)}function ms(e,t,n){return n(function(){hs(t)&&gs(e)})}function hs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hr(e,n)}catch{return!0}}function gs(e){var t=Oi(e,2);t!==null&&Nd(t,e,2)}function _s(e){var t=ts();if(typeof e==`function`){var n=e;if(e=n(),Vo){rt(!0);try{n()}finally{rt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:e},t}function vs(e,t,n,r){return e.baseState=n,ls(e,Lo,typeof r==`function`?r:ss)}function ys(e,t,n,r,a){if(ac(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,bs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function bs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};o.types=a===null?null:a.types,M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),xs(e,t,s)}catch(n){Cs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),xs(e,t,a)}catch(n){Cs(e,t,n)}}function xs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ss(e,t,n)},function(n){return Cs(e,t,n)}):Ss(e,t,n)}function Ss(e,t,n){t.status=`fulfilled`,t.value=n,ws(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,bs(e,n)))}function Cs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ws(t),t=t.next;while(t!==r)}e.action=null}function ws(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ts(e,t){return t}function Es(e,t){if(oa){var n=Yu.formState;if(n!==null){a:{var r=Io;if(oa){if(aa){b:{for(var i=aa,a=ca;i.nodeType!==8;)if(!a||(i=dm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){aa=dm(i.nextSibling),r=i.data===`F!`;break a}}ua(r)}r=!1}r&&(t=n[0])}}return n=ts(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ts,lastRenderedState:t},n.queue=r,n=nc.bind(null,Io,r),r.dispatch=n,r=_s(!1),a=ic.bind(null,Io,!1,r.queue),r=ts(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ys.bind(null,Io,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ds(e){return Os(ns(),Lo,e)}function Os(e,t,n){if(t=ls(e,t,Ts)[0],e=cs(ss)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=is(t)}catch(e){throw e===G?Ka:e}else r=t;t=ns();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Io.flags|=2048,js(9,{destroy:void 0},ks.bind(null,i,n),null)),[r,a,e]}function ks(e,t){e.action=t}function As(e){var t=ns(),n=Lo;if(n!==null)return Os(t,n,e);ns(),t=t.memoizedState,n=ns();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function js(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Io.updateQueue,t===null&&(t=rs(),Io.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ms(){return ns().memoizedState}function Ns(e,t,n,r){var i=ts();Io.flags|=e,i.memoizedState=js(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ps(e,t,n,r){var i=ns();r=r===void 0?null:r;var a=i.memoizedState.inst;Lo!==null&&r!==null&&qo(r,Lo.memoizedState.deps)?i.memoizedState=js(t,a,n,r):(Io.flags|=e,i.memoizedState=js(1|t,a,n,r))}function Fs(e,t){Ns(8390656,8,e,t)}function Is(e,t){Ps(2048,8,e,t)}function Ls(e){Io.flags|=4;var t=Io.updateQueue;if(t===null)t=rs(),Io.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Rs(e){var t=ns().memoizedState;return Ls({ref:t,nextImpl:e}),function(){if(Ju&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function zs(e,t){return Ps(4,2,e,t)}function J(e,t){return Ps(4,4,e,t)}function Bs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vs(e,t,n){n=n==null?null:n.concat([e]),Ps(4,4,Bs.bind(null,t,e),n)}function Y(){}function Hs(e,t){var n=ns();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&qo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Us(e,t){var n=ns();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&qo(t,r[1]))return r[0];if(r=e(),Vo){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r}function Ws(e,t,n){return n===void 0||Fo&1073741824&&!(Zu&261930)?e.memoizedState=t:(e.memoizedState=n,e=jd(),Io.lanes|=e,ad|=e,n)}function Gs(e,t,n,r){return Hr(n,t)?n:bo.current===null?!(Fo&106)||Fo&1073741824&&!(Zu&261930)?(Ec=!0,e.memoizedState=n):(e=jd(),Io.lanes|=e,ad|=e,t):(e=Ws(e,n,r),Hr(e,t)||(Ec=!0),e)}function Ks(e,t,n,r,i){var a=ye.p;ye.p=a!==0&&8>a?a:8;var o=M.T,s={};s.types=o===null?null:o.types,M.T=s,ic(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?rc(e,t,W(c,r),Ad(e)):rc(e,t,r,Ad(e))}catch(n){rc(e,t,{then:function(){},status:`rejected`,reason:n},Ad())}finally{ye.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function qs(){}function Js(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ys(e).queue;Ks(e,a,t,be,n===null?qs:function(){return Xs(e),n(r)})}function Ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:be},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xs(e){var t=Ys(e);t.next===null&&(t=e.alternate.memoizedState),rc(e,t.next.queue,{},Ad())}function Zs(){return Ta(lh)}function Qs(){return ns().memoizedState}function $s(){return ns().memoizedState}function ec(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ad();e=uo(n);var r=fo(t,e,n);r!==null&&(Nd(r,t,n),po(r,t,n)),t={cache:Ma()},e.payload=t;return}t=t.return}}function tc(e,t,n){var r=Ad();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ac(e)?oc(t,n):(n=Di(e,t,n,r),n!==null&&(Nd(n,e,r),sc(n,t,r)))}function nc(e,t,n){rc(e,t,n,Ad())}function rc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ac(e))oc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Hr(s,o))return Ei(e,t,i,0),Yu===null&&Ti(),!1}catch{}if(n=Di(e,t,i,r),n!==null)return Nd(n,e,r),sc(n,t,r),!0}return!1}function ic(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ac(e)){if(t)throw Error(i(479))}else t=Di(e,n,r,2),t!==null&&Nd(t,e,2)}function ac(e){var t=e.alternate;return e===Io||t!==null&&t===Io}function oc(e,t){Bo=zo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}var cc={readContext:Ta,use:as,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useInsertionEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko,useDeferredValue:Ko,useTransition:Ko,useSyncExternalStore:Ko,useId:Ko,useHostTransitionStatus:Ko,useFormState:Ko,useActionState:Ko,useOptimistic:Ko,useMemoCache:Ko,useCacheRefresh:Ko,useEffectEvent:Ko},lc={readContext:Ta,use:as,useCallback:function(e,t){return ts().memoizedState=[e,t===void 0?null:t],e},useContext:Ta,useEffect:Fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ns(4194308,4,Bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ns(4194308,4,e,t)},useInsertionEffect:function(e,t){Ns(4,2,e,t)},useMemo:function(e,t){var n=ts();t=t===void 0?null:t;var r=e();if(Vo){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ts();if(n!==void 0){var i=n(t);if(Vo){rt(!0);try{n(t)}finally{rt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=tc.bind(null,Io,e),[r.memoizedState,e]},useRef:function(e){var t=ts();return e={current:e},t.memoizedState=e},useState:function(e){e=_s(e);var t=e.queue,n=nc.bind(null,Io,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Y,useDeferredValue:function(e,t){return Ws(ts(),e,t)},useTransition:function(){var e=_s(!1);return e=Ks.bind(null,Io,e.queue,!0,!1),ts().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Io,a=ts();if(oa){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Yu===null)throw Error(i(349));Zu&127||fs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Fs(ms.bind(null,r,o,e),[e]),r.flags|=2048,js(9,{destroy:void 0},ps.bind(null,r,o,n,t),null),n},useId:function(){var e=ts(),t=Yu.identifierPrefix;if(oa){var n=Qi,r=Zi;n=(r&~(1<<32-it(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ho++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Go++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Zs,useFormState:Es,useActionState:Es,useOptimistic:function(e){var t=ts();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ic.bind(null,Io,!0,n),n.dispatch=t,[e,t]},useMemoCache:os,useCacheRefresh:function(){return ts().memoizedState=ec.bind(null,Io)},useEffectEvent:function(e){var t=ts(),n={impl:e};return t.memoizedState=n,function(){if(Ju&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},X={readContext:Ta,use:as,useCallback:Hs,useContext:Ta,useEffect:Is,useImperativeHandle:Vs,useInsertionEffect:zs,useLayoutEffect:J,useMemo:Us,useReducer:cs,useRef:Ms,useState:function(){return cs(ss)},useDebugValue:Y,useDeferredValue:function(e,t){return Gs(ns(),Lo.memoizedState,e,t)},useTransition:function(){var e=cs(ss)[0],t=ns().memoizedState;return[typeof e==`boolean`?e:is(e),t]},useSyncExternalStore:ds,useId:Qs,useHostTransitionStatus:Zs,useFormState:Ds,useActionState:Ds,useOptimistic:function(e,t){return vs(ns(),Lo,e,t)},useMemoCache:os,useCacheRefresh:$s,useEffectEvent:Rs},uc={readContext:Ta,use:as,useCallback:Hs,useContext:Ta,useEffect:Is,useImperativeHandle:Vs,useInsertionEffect:zs,useLayoutEffect:J,useMemo:Us,useReducer:us,useRef:Ms,useState:function(){return us(ss)},useDebugValue:Y,useDeferredValue:function(e,t){var n=ns();return Lo===null?Ws(n,e,t):Gs(n,Lo.memoizedState,e,t)},useTransition:function(){var e=us(ss)[0],t=ns().memoizedState;return[typeof e==`boolean`?e:is(e),t]},useSyncExternalStore:ds,useId:Qs,useHostTransitionStatus:Zs,useFormState:As,useActionState:As,useOptimistic:function(e,t){var n=ns();return Lo===null?(n.baseState=e,[e,n.queue.dispatch]):vs(n,Lo,e,t)},useMemoCache:os,useCacheRefresh:$s,useEffectEvent:Rs};function dc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=uo(r);i.payload=t,n!=null&&(i.callback=n),t=fo(e,i,r),t!==null&&(Nd(t,e,r),po(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=uo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=fo(e,i,r),t!==null&&(Nd(t,e,r),po(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ad(),r=uo(n);r.tag=2,t!=null&&(r.callback=t),t=fo(e,r,n),t!==null&&(Nd(t,e,n),po(t,e,n))}};function pc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ur(n,r)||!Ur(i,a):!0}function mc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fc.enqueueReplaceState(t,t.state,null)}function hc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function gc(e){xi(e)}function _c(e){console.error(e)}function vc(e){xi(e)}function yc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function bc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function xc(e,t,n){return n=uo(n),n.tag=3,n.payload={element:null},n.callback=function(){yc(e,t)},n}function Sc(e){return e=uo(e),e.tag=3,e}function Cc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){bc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){bc(t,n,r),typeof i!=`function`&&(_d===null?_d=new Set([this]):_d.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function wc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&z(t,n,a,!0),n=To.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Eo===null?Gd():n.alternate===null&&id===0&&(id=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===qa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,a)),!1;case 22:return n.flags|=65536,r===qa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),mf(e,r,a)),!1}throw Error(i(435,n.tag))}return mf(e,r,a),Gd(),!1}if(oa)return t=To.current,t===null?(r!==la&&(t=Error(i(423),{cause:r}),ga(Ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ui(r,n),a=xc(e.stateNode,r,a),mo(e,a),id!==4&&(id=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==la&&(e=Error(i(422),{cause:r}),ga(Ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ui(o,n),ud===null?ud=[o]:ud.push(o),id!==4&&(id=2),t===null)return!0;r=Ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=xc(n.stateNode,r,e),mo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(_d===null||!_d.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Sc(a),Cc(a,e,n,r),mo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Tc=Error(i(461)),Ec=!1;function Dc(e,t,n,r){t.child=e===null?oo(t,null,n,r):ao(t,e.child,n,r)}function Z(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return wa(t),r=Jo(e,t,n,o,a,i),s=Qo(),e!==null&&!Ec?($o(e,t,i),tl(e,t,i)):(oa&&s&&ta(t),t.flags|=1,Dc(e,t,r,i),t.child)}function Oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,kc(e,t,a,r,i)):(e=Li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!nl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ur:n,n(o,r)&&e.ref===t.ref)return tl(e,t,i)}return t.flags|=1,e=Fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function kc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ur(a,r)&&e.ref===t.ref){if(Ec=!1,t.pendingProps=r=a,nl(e,i))e.flags&131072&&(Ec=!0);else return t.lanes=e.lanes,tl(e,t,i)}}return Lc(e,t,n,r,i)}function Ac(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ua(t,a===null?null:a.cachePool),a===null?Co():So(t,a),ko(t);else return r=t.lanes=536870912,Mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ua(t,null),Co(),Ao()):(Ua(t,a.cachePool),So(t,a),Ao(),t.memoizedState=null);return Dc(e,t,i,n),t.child}function jc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mc(e,t,n,r,i){var a=Ha();return a=a===null?null:{parent:ja._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ua(t,null),Co(),ko(t),e!==null&&z(e,t,r,!0),t.childLanes=i,null}function Nc(e,t){return t=Kc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pc(e,t,n){return ao(t,e.child,null,n),e=Nc(t,t.pendingProps),e.flags|=2,jo(t),t.memoizedState=null,e}function Fc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(oa){if(r.mode===`hidden`)return e=Nc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},jc(null,e);if(Oo(t),(e=aa)?(e=sm(e,ca),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw ua(t);return t.lanes=536870912,null}return Nc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Oo(t),a){if(t.flags&256)t.flags&=-257,t=Pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ec||z(e,t,n,!1),a=(n&e.childLanes)!==0,Ec||a){if(bo.current===null){if(r=Yu,r!==null&&(s=St(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Oi(e,s),Nd(r,e,s),Tc;Gd()}t=Pc(e,t,n)}else e=o.treeContext,aa=dm(s.nextSibling),ia=t,oa=!0,sa=null,ca=!1,e!==null&&ra(t,e),t=Nc(t,r),t.flags|=134221824;return t}return e=Fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ic(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Lc(e,t,n,r,i){return wa(t),n=Jo(e,t,n,r,void 0,i),r=Qo(),e!==null&&!Ec?($o(e,t,i),tl(e,t,i)):(oa&&r&&ta(t),t.flags|=1,Dc(e,t,n,i),t.child)}function Rc(e,t,n,r,i,a){return wa(t),t.updateQueue=null,n=Xo(t,r,n,i),Yo(e),r=Qo(),e!==null&&!Ec?($o(e,t,a),tl(e,t,a)):(oa&&r&&ta(t),t.flags|=1,Dc(e,t,n,a),t.child)}function zc(e,t,n,r,i){if(wa(t),t.stateNode===null){var a=ji,o=n.contextType;typeof o==`object`&&o&&(a=Ta(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=fc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},co(t),o=n.contextType,a.context=typeof o==`object`&&o?Ta(o):ji,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(dc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&fc.enqueueReplaceState(a,a.state,null),_o(t,r,a,i),go(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=hc(n,s);a.props=c;var l=a.context,u=n.contextType;o=ji,typeof u==`object`&&u&&(o=Ta(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&mc(t,a,r,o),so=!1;var f=t.memoizedState;a.state=f,_o(t,r,a,i),go(),l=t.memoizedState,s||f!==l||so?(typeof d==`function`&&(dc(t,n,d,r),l=t.memoizedState),(c=so||pc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,lo(e,t),o=t.memoizedProps,u=hc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ji,typeof l==`object`&&l&&(c=Ta(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&mc(t,a,r,c),so=!1,f=t.memoizedState,a.state=f,_o(t,r,a,i),go();var p=t.memoizedState;o!==d||f!==p||so||e!==null&&e.dependencies!==null&&B(e.dependencies)?(typeof s==`function`&&(dc(t,n,s,r),p=t.memoizedState),(u=so||pc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&B(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Ic(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ao(t,e.child,null,i),t.child=ao(t,null,n,i)):Dc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=tl(e,t,i),e}function Bc(e,t,n,r){return ma(),t.flags|=256,Dc(e,t,n,r),t.child}var Vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hc(e){return{baseLanes:e,cachePool:Wa()}}function Uc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=cd),e}function Wc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(q.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(oa){if(i?Do(t):Ao(),(e=aa)?(e=sm(e,ca),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw ua(t);return t.lanes=lm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Ao(),i=t.mode,a=Kc({mode:`hidden`,children:a},i),r=Ri(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Hc(n),r.childLanes=Uc(e,o,n),t.memoizedState=Vc,jc(null,r)):(Do(t),Gc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Jc(e,t,a,o,r,c,s,n)}return i?(Ao(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Fi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ri(i,a,n,null),i.flags|=2):i=Fi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,jc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Hc(n):(a=i.cachePool,a===null?a=Wa():(s=ja._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Uc(e,o,n),t.memoizedState=Vc,jc(e.child,r)):(Do(t),n=e.child,e=n.sibling,n=Fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Gc(e,t){return t=Kc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Kc(e,t){return e=Ni(22,e,null,t),e.lanes=0,e}function qc(e,t,n){return ao(t,e.child,null,n),e=Gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Do(t),t.flags&=-257,qc(e,t,c)):t.memoizedState===null?(Ao(),o=a.fallback,s=t.mode,a=Kc({mode:`visible`,children:a.children},s),o=Ri(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,ao(t,e.child,null,c),a=t.child,a.memoizedState=Hc(c),a.childLanes=Uc(e,r,c),t.memoizedState=Vc,jc(null,a)):(Ao(),t.child=e.child,t.flags|=128,null);if(Do(t),lm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ga({value:a,source:null,stack:null})),qc(e,t,c)}if(Ec||z(e,t,c,!1),r=(c&e.childLanes)!==0,Ec||r){if(bo.current!==null)return qc(e,t,c);if(r=Yu,r!==null&&(a=St(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Oi(e,a),Nd(r,e,a),Tc;return cm(o)||Gd(),qc(e,t,c)}return cm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,aa=dm(o.nextSibling),ia=t,oa=!0,sa=null,ca=!1,e!==null&&ra(t,e),t=Gc(t,a.children),t.flags|=134221824,t)}function Yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sa(e.return,t,n)}function Xc(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Po(n)===null&&(t=e),e=e.sibling}return t}function Zc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Qc(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function $c(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=q.current;if(t.flags&128)return Mo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Mo(t,o),i===`backwards`&&e!==null?(Qc(e),Dc(e,t,r,n),Qc(e)):Dc(e,t,r,n),r=oa?qi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yc(e,n,t);else if(e.tag===19)Yc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=Xc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,Qc(t)),Zc(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Po(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Zc(t,!0,n,null,a,r);break;case`together`:Zc(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Xc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Zc(t,!1,i,n,a,r)}return t.child}function el(e,t,n){var r=t.pendingProps;return ba(t,t.type,r.value),Dc(e,t,r.children,n),t.child}function tl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ad|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(z(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&B(e)))}function rl(e,t,n){switch(t.tag){case 3:Ae(t,t.stateNode.containerInfo),ba(t,ja,e.memoizedState.cache),ma();break;case 27:case 5:Me(t);break;case 4:Ae(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Do(t),t.flags|=128,null;r=z(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Wc(e,t,n):(Do(t),e=tl(e,t,n),e===null?null:e.sibling)}Do(t);break;case 19:if(t.flags&128)return $c(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(z(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return $c(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Mo(t,q.current),r)break;return null;case 22:return t.lanes=0,Ac(e,t,n,t.pendingProps);case 24:ba(t,ja,e.memoizedState.cache)}return tl(e,t,n)}function il(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ec=!0;else{if(!nl(e,n)&&!(t.flags&128))return Ec=!1,rl(e,t,n);Ec=!!(e.flags&131072)}}else Ec=!1,oa&&t.flags&1048576&&ea(t,qi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Xa(t.elementType),t.type=e,typeof e==`function`)Pi(e)?(r=hc(e,r),t.tag=1,t=zc(null,t,e,r,n)):(t.tag=0,t=Lc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ie){t.tag=11,t=Z(null,t,e,r,n);break a}if(a===se){t.tag=14,t=Oc(null,t,e,r,n);break a}if(a===re){t.tag=10,t.type=e,t=el(null,t,n);break a}}throw t=_e(e)||e,Error(i(306,t,``))}}return t;case 0:return Lc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=hc(r,t.pendingProps),zc(e,t,r,a,n);case 3:a:{if(Ae(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,lo(e,t),_o(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ba(t,ja,r),r!==o.cache&&Ca(t,[ja],n,!0),go(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Bc(e,t,r,n);break a}if(r!==a){a=Ui(Error(i(424)),t),ga(a),t=Bc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(aa=dm(e.firstChild),ia=t,oa=!0,sa=null,ca=!0,n=oo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ma(),r===a){t=tl(e,t,n);break a}Dc(e,t,r,n)}t=t.child}return t;case 26:return Ic(e,t),e===null?(n=Fm(t.type,null,t.pendingProps,null))?t.memoizedState=n:oa||(t.stateNode=mp(t.type,t.pendingProps,Oe.current,t)):t.memoizedState=Fm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Me(t),e===null&&oa&&(r=t.stateNode=_m(t.type,t.pendingProps,Oe.current),ia=t,ca=!0,a=aa,wp(t.type)?(fm=a,aa=dm(r.firstChild)):aa=a),Dc(e,t,t.pendingProps.children,n),Ic(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&oa&&((a=r=aa)&&(r=am(r,t.type,t.pendingProps,ca),r===null?a=!1:(t.stateNode=r,ia=t,aa=dm(r.firstChild),ca=!1,a=!0)),a||ua(t)),Me(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,hp(a,o)?r=null:s!==null&&hp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Jo(e,t,Zo,null,null,n),lh._currentValue=a),Ic(e,t),Dc(e,t,r,n),t.child;case 6:return e===null&&oa&&((e=n=aa)&&(n=om(n,t.pendingProps,ca),n===null?e=!1:(t.stateNode=n,ia=t,aa=null,e=!0)),e||ua(t)),null;case 13:return Wc(e,t,n);case 4:return Ae(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ao(t,null,r,n):Dc(e,t,r,n),t.child;case 11:return Z(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Ic(e,t),Dc(e,t,r,n),t.child;case 8:return Dc(e,t,t.pendingProps.children,n),t.child;case 12:return Dc(e,t,t.pendingProps.children,n),t.child;case 10:return el(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,wa(t),a=Ta(a),r=r(a),t.flags|=1,Dc(e,t,r,n),t.child;case 14:return Oc(e,t,t.type,t.pendingProps,n);case 15:return kc(e,t,t.type,t.pendingProps,n);case 19:return $c(e,t,n);case 31:return Fc(e,t,n);case 22:return Ac(e,t,n,t.pendingProps);case 24:return wa(t),r=Ta(ja),e===null?(a=Ha(),a===null&&(a=Yu,o=Ma(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},co(t),ba(t,ja,a)):((e.lanes&n)!==0&&(lo(e,t),_o(t,null,null,n),go()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ba(t,ja,r),r!==a.cache&&Ca(t,[ja],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ba(t,ja,r))),Dc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:oa&&ta(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Ic(e,t),Dc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function al(e){e.flags|=4}function ol(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Xm(t,r):Xm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Hd())e.flags|=8192;else throw Za=qa,Ga}}else e.flags&=-16777217}function sl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zm(t)){if(Hd())e.flags|=8192;else throw Za=qa,Ga}}function cl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:gt(),e.lanes|=t,ld|=t)}function ll(e,t){if(!oa)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function ul(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function dl(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ul(t),null;case 1:return ul(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),xa(ja),je(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(pa(t)?al(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ha())),ul(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(al(t),o===null?(ul(t),ol(t,a,null,r,n)):(ul(t),sl(t,o))):o?o===e.memoizedState?(ul(t),t.flags&=-16777217):(al(t),ul(t),sl(t,o)):(e=e.memoizedProps,e!==r&&al(t),ul(t),ol(t,a,e,r,n)),null;case 27:if(Ne(t),n=Oe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&al(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ul(t),t.subtreeFlags&=-33554433,null}e=Ee.current,pa(t)?da(t,e):(e=_m(a,r,n),t.stateNode=e,al(t))}return ul(t),t.subtreeFlags&=-33554433,null;case 5:if(Ne(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&al(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ul(t),t.subtreeFlags&=-33554433,null}if(o=Ee.current,pa(t))da(t,o);else{var s=dp(Oe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ot]=t,o[kt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ip(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&al(t)}}return ul(t),t.subtreeFlags&=-33554433,ol(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&al(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Oe.current,pa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ia,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||tp(e.nodeValue,n)),e||ua(t,!0)}else e=dp(e).createTextNode(r),e[Ot]=t,t.stateNode=e}return ul(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=pa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ot]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ul(t),e=!1}else n=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(jo(t),t):(jo(t),null);if(t.flags&128)throw Error(i(558))}return ul(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=pa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ot]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ul(t),a=!1}else a=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(jo(t),t):(jo(t),null)}return jo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),cl(t,t.updateQueue),ul(t),null);case 4:return je(),e===null&&Gf(t.stateNode.containerInfo),t.flags|=67108864,ul(t),null;case 10:return xa(t.type),ul(t),null;case 19:if(No(t),r=t.memoizedState,r===null)return ul(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ll(r,!1);else{if(id!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Po(e),o!==null){for(t.flags|=128,ll(r,!1),e=o.updateQueue,t.updateQueue=e,cl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ii(n,e),n=n.sibling;return Mo(t,q.current&1|2),oa&&$i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ke()>hd&&(t.flags|=128,a=!0,ll(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Po(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,cl(t,e),ll(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!oa)return ul(t),null}else 2*Ke()-r.renderingStartTime>hd&&n!==536870912&&(t.flags|=128,a=!0,ll(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ke(),e.sibling=null,o=q.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||oa?Mo(t,o):(n=o,Te(To,t),Te(q,n),Eo===null&&(Eo=t)),oa&&$i(t,r.treeForkCount),e}return ul(t),null;case 22:case 23:return jo(t),wo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(ul(t),t.subtreeFlags&6&&(t.flags|=8192)):ul(t),n=t.updateQueue,n!==null&&cl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&we(Va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),xa(ja),ul(t),null;case 25:return null;case 30:return t.flags|=33554432,ul(t),null}throw Error(i(156,t.tag))}function fl(e,t){switch(na(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(ja),je(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ne(t),null;case 31:if(t.memoizedState!==null){if(jo(t),t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return No(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return je(),null;case 10:return xa(t.type),null;case 22:case 23:return jo(t),wo(),e!==null&&we(Va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(ja),null;case 25:return null;default:return null}}function pl(e,t){switch(na(t),t.tag){case 3:xa(ja),je();break;case 26:case 27:case 5:Ne(t);break;case 4:je();break;case 31:t.memoizedState!==null&&jo(t);break;case 13:jo(t);break;case 19:No(t);break;case 10:xa(t.type);break;case 22:case 23:jo(t),wo(),e!==null&&we(Va);break;case 24:xa(ja)}}function ml(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){pf(t,t.return,e)}}function hl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){pf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){pf(t,t.return,e)}}function gl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yo(t,n)}catch(t){pf(e,e.return,t)}}}function _l(e,t,n){n.props=hc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){pf(e,t,n)}}function vl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=vi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Ip(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Lp(e);m(e.child,!1,em,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){pf(e,t,n)}}function yl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){pf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){pf(e,t,n)}else n.current=null}}function bl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)nm(e.stateNode,t[n])}function xl(e){for(var t=e.return;t!==null&&(wl(t)&&nm(e.stateNode,t.stateNode),!Cl(t));)t=t.return}function Sl(e){for(var t=e.return;t!==null&&(wl(t)&&rm(e.stateNode,t.stateNode),!Cl(t));)t=t.return}function Cl(e){return e.tag===5||e.tag===3||e.tag===27}function wl(e){return e&&e.tag===7&&e.stateNode!==null}function Tl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){pf(e,e.return,t)}}function El(e,t,n){try{var r=e.stateNode;op(r,e.type,n,t),r[kt]=t}catch(t){pf(e,e.return,t)}}function Dl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wp(e.type)||e.tag===4}function Ol(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Dl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&wp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Tn)),bl(e,r),Qt=!0;else if(i!==4&&(i===27&&(bl(e,r),r=null,wp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(kl(e,t,n,r),e=e.sibling;e!==null;)kl(e,t,n,r),e=e.sibling}function Al(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),bl(e,r),Qt=!0;else if(i!==4&&(i===27&&(bl(e,r),r=null,wp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Al(e,t,n,r),e=e.sibling;e!==null;)Al(e,t,n,r),e=e.sibling}function jl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ip(t,r,n),t[Ot]=e,t[kt]=n}catch(t){pf(e,e.return,t)}}var Ml=!1,Nl=null;function Pl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ml=!0)}var Fl=null;function Il(){var e=Fl;return Fl=null,e}var Ll=0;function Rl(e,t,n,r,i){return Ll=0,zl(e.child,t,n,r,i)}function zl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Ap(o);r.push(s),s.view&&(a=!0)}else a||Ap(o).view&&(a=!0);Ml=!0,Dp(o,Ll===0?t:t+`_`+Ll,n),Ll++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||zl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Bl(e,t){for(;e!==null;)e.tag===5?Op(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Bl(e.child,t),e=e.sibling}function Vl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Vl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=bi(t.default,t.share),t!==`none`&&(Rl(e,n,t,null,!1)||Bl(e.child,!1))}e=e.sibling}}function Hl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=vi(r,n),a=bi(r.default,n.paired?r.share:r.enter);a===`none`?Vl(e):Rl(e,i,a,null,!1)?(Vl(e),n.paired||t||Md(e,r.onEnter)):Bl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Hl(e,t),e=e.sibling;else Vl(e)}function Ul(e){if(Nl!==null&&Nl.size!==0){var t=Nl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=bi(n.default,n.share);if(a!==`none`&&(Rl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Md(e,n.onShare)):Bl(e.child,!1)),t.delete(r),t.size===0)break}}}Ul(e)}e=e.sibling}}}function Wl(e){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode),r=Nl===null?void 0:Nl.get(n),i=bi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Rl(e,n,i,null,!1)?r===void 0?Md(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Nl.delete(n),Md(e,t.onShare)):Bl(e.child,!1)),Nl!==null&&Ul(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Wl(e),e=e.sibling;else Nl!==null&&Ul(e)}function Gl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode);t=bi(t.default,t.update),e.flags&=-5,t!==`none`&&Rl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Gl(e);e=e.sibling}}function Kl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Bl(e.child,!1))}Kl(e)}e=e.sibling}}function ql(e){if(e.tag===30)e.stateNode.paired=null,Bl(e.child,!1),Kl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ql(e),e=e.sibling;else Kl(e)}function Jl(e){for(e=e.child;e!==null;)e.tag===30?Bl(e.child,!1):e.subtreeFlags&33554432&&Jl(e),e=e.sibling}function Yl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Ll<a.length){var l=a[Ll],u=Ap(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Dp(c,Ll===0?n:n+`_`+Ll,i),s&&e.flags&4||(Fl===null&&(Fl=[]),Fl.push(c,Ll===0?r:r+`_`+Ll,t.memoizedProps)),Ll++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Yl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Xl(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=vi(n,r),a=bi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(jp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Ll=0,i=Yl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Md(e,n.onUpdate))}else e.subtreeFlags&33554432&&Xl(e,t);e=e.sibling}}var Zl=!1,Ql=!1,$l=!1,eu=!1,tu=typeof WeakSet==`function`?WeakSet:Set,nu=null,ru=!1,iu=!1,au=!1,ou=!1;function su(e,t,n){if(e=e.containerInfo,lp=vh,e=Jr(e),Yr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(up={focusedElem:e,selectionRange:r},vh=!1,n=(n&335544064)===n,nu=t,t=n?9270:1024;nu!==null;){if(e=nu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Wl(r[a]);if(e.alternate===null&&e.flags&2)n&&Pl(e),cu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Wl(r),cu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Pl(e),cu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,nu=r):(n&&Gl(e),cu(n))}}Nl=null}function cu(e){for(;nu!==null;){var t=nu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=hc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){pf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)im(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:im(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=vi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=bi(a.default,a.update),a!==`none`&&Rl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,nu=r;break}nu=t.return}}function lu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ku(e,n),r&4&&ml(5,n);break;case 1:if(ku(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){pf(n,n.return,e)}else{var i=hc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){pf(n,n.return,e)}}}r&64&&gl(n),r&512&&vl(n,n.return);break;case 3:if(ku(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{yo(e,t)}catch(e){pf(n,n.return,e)}}break;case 27:t===null&&r&4&&jl(n);case 26:case 5:ku(e,n),t===null&&r&4&&Tl(n),r&512&&vl(n,n.return);break;case 12:ku(e,n);break;case 31:ku(e,n),r&4&&vu(e,n);break;case 13:ku(e,n),r&4&&yu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),um(e,n))));break;case 22:if(r=n.memoizedState!==null||Zl,!r){var a=t!==null&&t.memoizedState!==null||Ql;t=Zl,i=Ql,Zl=r,(Ql=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),ju(e,n,r)):ku(e,n),Zl=t,Ql=i}break;case 30:ku(e,n),r&512&&vl(n,n.return);break;case 7:r&512&&vl(n,n.return);default:ku(e,n)}}function uu(e,t){for(e=e.child;e!==null;)du(e,t),e=e.sibling}function du(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){pf(e,e.return,t)}fu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Qt=!0}catch(t){pf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ep(s,!0):Ep(e.stateNode,!1)}catch(t){pf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&uu(e,t);break;default:uu(e,t)}}function fu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:du(n,r);break a;case 22:n.memoizedState===null&&fu(n,r);break a;default:fu(n,r)}}e=e.sibling}}function pu(e){var t=e.alternate;t!==null&&(e.alternate=null,pu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Lt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mu=null,hu=!1;function gu(e,t,n){for(n=n.child;n!==null;)_u(e,t,n),n=n.sibling}function _u(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount==`function`)try{nt.onCommitFiberUnmount(tt,n)}catch{}switch(n.tag){case 26:Ql||yl(n,t),gu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Ql&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ql||yl(n,t),Sl(n);var r=mu,i=hu;wp(n.type)&&(mu=n.stateNode,hu=!1),gu(e,t,n),vm(n.stateNode,n.type,n.memoizedProps),mu=r,hu=i;break;case 5:Ql||yl(n,t),Sl(n);case 6:if(n.tag===6&&Sl(n),r=mu,i=hu,mu=null,gu(e,t,n),mu=r,hu=i,mu!==null){if(hu)try{(mu.nodeType===9?mu.body:mu.nodeName===`HTML`?mu.ownerDocument.body:mu).removeChild(n.stateNode),Qt=!0}catch(e){pf(n,t,e)}else try{mu.removeChild(n.stateNode),Qt=!0}catch(e){pf(n,t,e)}}break;case 18:mu!==null&&(hu?(e=mu,Tp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wh(e)):Tp(mu,n.stateNode));break;case 4:r=mu,i=hu,mu=n.stateNode.containerInfo,hu=!0,gu(e,t,n),mu=r,hu=i;break;case 0:case 11:case 14:case 15:hl(2,n,t),Ql||hl(4,n,t),gu(e,t,n);break;case 1:Ql||(yl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&_l(n,t,r)),gu(e,t,n);break;case 21:gu(e,t,n);break;case 22:Ql=(r=Ql)||n.memoizedState!==null,gu(e,t,n),Ql=r;break;case 30:yl(n,t),gu(e,t,n);break;case 7:Ql||yl(n,t),gu(e,t,n);break;default:gu(e,t,n)}}function vu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wh(e)}catch(e){pf(t,t.return,e)}}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wh(e)}catch(e){pf(t,t.return,e)}}function bu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tu),t;default:throw Error(i(435,e.tag))}}function xu(e,t){var n=bu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Su(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(wp(l.type)){mu=l.stateNode,hu=!1;break a}break;case 5:mu=l.stateNode,hu=!1;break a;case 3:case 4:mu=l.stateNode.containerInfo,hu=!0;break a}l=l.return}if(mu===null)throw Error(i(160));_u(s,c,o),mu=null,hu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wu(t,e,n),t=t.sibling}var Cu=null;function wu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Su(t,e,n),Tu(e),a&4&&(hl(3,e,e.return),ml(3,e),hl(5,e,e.return));break;case 1:Su(t,e,n),Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),a&64&&Zl&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Cu,Su(t,e,n),Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(Zl)e.stateNode=mp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ft]||r[Ot]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ip(r,t,n),r[Ot]=e,Ht(r),t=r;break a;case`link`:if(o=qm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=qm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Ot]=e,Ht(r),t=r}e.stateNode=t}}else Zl||Jm(o,e.type,e.stateNode)}else e.stateNode=Hm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&El(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||Ql||t.parentNode.removeChild(t)):a.count--,n===null?Zl||Jm(o,e.type,e.stateNode):Hm(o,n,e.memoizedProps))}break;case 27:Su(t,e,n),Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),r!==null&&a&4&&El(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=$l,$l=!1,Su(t,e,n),$l=o,Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),e.flags&32){t=e.stateNode;try{_n(t,``),Qt=!0}catch(t){pf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,El(e,t,r===null?t:r.memoizedProps)),a&1024&&(eu=!0);break;case 6:if(Su(t,e,n),Tu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Qt=!0}catch(t){pf(e,e.return,t)}}break;case 3:if(Qt=!1,Km=null,o=Cu,Cu=Sm(t.containerInfo),Su(t,e,n),Cu=o,Tu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Wh(t.containerInfo)}catch(t){pf(e,e.return,t)}eu&&(eu=!1,Eu(e)),Qt=!1;break;case 4:a=$l,$l=Zl,r=$t(),o=Cu,Cu=Sm(e.stateNode.containerInfo),Su(t,e,n),Tu(e),Cu=o,Qt&&iu&&(au=!0),Qt=r,$l=a;break;case 12:Su(t,e,n),Tu(e);break;case 31:Su(t,e,n),Tu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 13:Su(t,e,n),Tu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(pd=Ke()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=Zl,l=Ql,u=$l;Zl=c||o,$l=u||o,Ql=l||s,Su(t,e,n),Ql=l,$l=u,Zl=c,Tu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||Zl||Ql||(t=s||Ql,n=Zl,r=Ql,Zl=o||Zl,Ql=t,Au(e,2),Zl=n,Ql=r),!o&&$l||uu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,xu(e,n))));break;case 19:Su(t,e,n),Tu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 30:a&512&&(Ql||r===null||yl(r,r.return)),a=$t(),o=iu,s=(n&335544064)===n,c=e.memoizedProps,iu=s&&bi(c.default,c.update)!==`none`,Su(t,e,n),Tu(e),s&&r!==null&&Qt&&(e.flags|=4),iu=o,Qt=a;break;case 21:break;case 7:a&512&&(Ql||r===null||yl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Su(t,e,n),Tu(e)}}function Tu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Dl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(wl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Cl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Al(e,Ol(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(_n(l,``),n.flags&=-33),Al(e,Ol(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;kl(e,Ol(e),u,s);break;default:throw Error(i(161))}}catch(t){pf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Eu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Eu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,vh=!0,t.reset(),vh=!1),e=e.sibling}}function Du(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ou(t,e),t=t.sibling;else Xl(t,!1)}function Ou(e,t){var n=e.alternate;if(n===null)Hl(e,!1);else switch(e.tag){case 3:if(ou=ru=!1,Il(),Du(t,e),!ru&&!au){if(e=Fl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Op(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),ou=!0}Fl=null;break;case 5:Du(t,e);break;case 4:r=ru,ru=!1,Du(t,e),ru&&(au=!0),ru=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Du(t,e):Hl(e,!1));break;case 30:r=ru,i=Il(),ru=!1,Du(t,e),ru&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=vi(a,o),o=vi(n.memoizedProps,o);var s=bi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Ll=0,t=Yl(e,n,t,o,s,a,!0),Ll!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Md(e,e.memoizedProps.onUpdate),Fl=i):i!==null&&(i.push.apply(i,Fl),Fl=i),ru=e.flags&32?!0:r;break;default:Du(t,e)}}function ku(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)lu(e,t.alternate,t),t=t.sibling}function Au(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:hl(4,n,n.return),Au(n,r);break;case 1:yl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&_l(n,n.return,i),Au(n,r);break;case 27:r&2&&vm(n.stateNode,n.type,n.memoizedProps);case 5:yl(n,n.return),n.tag!==5&&n.tag!==27||Sl(n),Au(n,r);break;case 6:Sl(n);break;case 26:yl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||Ql||i.parentNode.removeChild(i),Au(n,r);break;case 22:n.memoizedState===null&&Au(n,r);break;case 30:yl(n,n.return),Au(n,r);break;case 7:yl(n,n.return);default:Au(n,r)}e=e.sibling}}function ju(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:ju(i,a,n),ml(4,a);break;case 1:if(ju(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){pf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)vo(l[i],c)}catch(e){pf(r,r.return,e)}}s&&o&64&&gl(a),vl(a,a.return);break;case 27:n&2&&jl(a);case 5:a.tag!==5&&a.tag!==27||xl(a),ju(i,a,n),s&&r===null&&o&4&&Tl(a),vl(a,a.return);break;case 6:xl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||Zl||Jm(Sm(c.ownerDocument),a.type,c),ju(i,a,n),s&&r===null&&o&4&&Tl(a),vl(a,a.return);break;case 12:ju(i,a,n);break;case 31:ju(i,a,n),s&&o&4&&vu(i,a);break;case 13:ju(i,a,n),s&&o&4&&yu(i,a);break;case 22:a.memoizedState===null&&ju(i,a,n),vl(a,a.return);break;case 30:ju(i,a,n),vl(a,a.return);break;case 7:vl(a,a.return);default:ju(i,a,n)}t=t.sibling}}function Mu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Na(n))}function Nu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Na(e))}function Pu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Fu(e,t,n,r),t=t.sibling;else i&&Jl(t)}function Fu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&ql(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Pu(e,t,n,r),a&2048&&ml(9,t);break;case 1:Pu(e,t,n,r);break;case 3:Pu(e,t,n,r),i&&ou&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Na(a)));break;case 12:if(a&2048){Pu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){pf(t,t.return,e)}}else Pu(e,t,n,r);break;case 31:Pu(e,t,n,r);break;case 13:Pu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&ql(t),o._visibility&2?Pu(e,t,n,r):(o._visibility|=2,Iu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&ql(s),o._visibility&2?Pu(e,t,n,r):Lu(e,t)),a&2048&&Mu(s,t);break;case 24:Pu(e,t,n,r),a&2048&&Nu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Bl(a.child,!0),Bl(t.child,!0))),Pu(e,t,n,r);break;default:Pu(e,t,n,r)}}function Iu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Iu(a,o,s,c,i),ml(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Iu(a,o,s,c,i)):u._visibility&2?Iu(a,o,s,c,i):Lu(a,o),i&&l&2048&&Mu(o.alternate,o);break;case 24:Iu(a,o,s,c,i),i&&l&2048&&Nu(o.alternate,o);break;default:Iu(a,o,s,c,i)}t=t.sibling}}function Lu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Lu(n,r),i&2048&&Mu(r.alternate,r);break;case 24:Lu(n,r),i&2048&&Nu(r.alternate,r);break;default:Lu(n,r)}t=t.sibling}}var Ru=8192;function zu(e,t,n){if(e.subtreeFlags&Ru)for(e=e.child;e!==null;)Bu(e,t,n),e=e.sibling}function Bu(e,t,n){switch(e.tag){case 26:zu(e,t,n),e.flags&Ru&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&$m(n,e)):eh(n,Cu,e.memoizedState,e.memoizedProps));break;case 5:zu(e,t,n),e.flags&Ru&&(e=e.stateNode,(t&335544128)===t&&$m(n,e));break;case 3:case 4:var r=Cu;Cu=Sm(e.stateNode.containerInfo),zu(e,t,n),Cu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ru,Ru=16777216,zu(e,t,n),Ru=r):zu(e,t,n));break;case 30:if((e.flags&Ru)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Nl===null&&(Nl=new Map),Nl.set(r,i)}zu(e,t,n);break;default:zu(e,t,n)}}function Vu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nu=r,Gu(r,e)}Vu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Uu(e),e=e.sibling}function Uu(e){switch(e.tag){case 0:case 11:case 15:Hu(e),e.flags&2048&&hl(9,e,e.return);break;case 3:Hu(e);break;case 12:Hu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wu(e)):Hu(e);break;default:Hu(e)}}function Wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nu=r,Gu(r,e)}Vu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:hl(8,t,t.return),Wu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Wu(t));break;default:Wu(t)}e=e.sibling}}function Gu(e,t){for(;nu!==null;){var n=nu;switch(n.tag){case 0:case 11:case 15:hl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,nu=r;else a:for(n=e;nu!==null;){r=nu;var i=r.sibling,a=r.return;if(pu(r),r===n){nu=null;break a}if(i!==null){i.return=a,nu=i;break a}nu=a}}}var Ku={getCacheForType:function(e){var t=Ta(ja),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ta(ja).controller.signal}},qu=typeof WeakMap==`function`?WeakMap:Map,Ju=0,Yu=null,Xu=null,Zu=0,Qu=0,$u=null,ed=!1,td=!1,nd=!1,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=null,dd=null,fd=!1,pd=0,md=0,hd=1/0,gd=null,_d=null,vd=0,yd=null,bd=null,xd=0,Sd=0,Cd=null,wd=null,Td=null,Ed=null,Dd=null,Od=0,kd=null;function Ad(){return Ju&2&&Zu!==0?Zu&-Zu:M.T===null?Tt():Pf()}function jd(){if(cd===0){if(!(Zu&536870912)||oa){var e=lt;lt<<=1,!(lt&3932160)&&(lt=262144),cd=e}else cd=536870912}return e=To.current,e!==null&&(e.flags|=32),cd}function Md(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Ip(vi(e.memoizedProps,n))),Ed===null&&(Ed=[]),Ed.push(t.bind(null,r))}}function Nd(e,t,n){(e===Yu&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)&&(Bd(e,0),Ld(e,Zu,cd,!1)),vt(e,n),Ju&2&&e===Yu||(e===Yu&&(!(Ju&2)&&(od|=n),id===4&&Ld(e,Zu,cd,!1)),Ef(e))}function Pd(e,t,n){if(Ju&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||pt(e,t),a=r?Jd(e,t):Kd(e,t,!0),o=r;do{if(a===0){td&&!r&&Ld(e,t,0,!1);break}if(n=e.current.alternate,o&&!Id(n))a=Kd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ud;var l=c.current.memoizedState.isDehydrated;if(l&&(Bd(c,s).flags|=256),s=Kd(c,s,!1),s!==2&&s!==6){if(nd&&!l){c.errorRecoveryDisabledLanes|=o,od|=o,a=4;break a}o=dd,dd=a,o!==null&&(dd===null?dd=o:dd.push.apply(dd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Bd(e,0),Ld(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ld(r,t,cd,!ed);break a;case 2:dd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=pd+300-Ke(),10<a)){if(Ld(r,t,cd,!ed),ft(r,0,!0)!==0)break a;xd=t,r.timeoutHandle=vp(Fd.bind(null,r,n,dd,gd,fd,t,cd,od,ld,ed,o,`Throttled`,-0,0),a);break a}Fd(r,n,dd,gd,fd,t,cd,od,ld,ed,o,null,-0,0)}break}}while(1);Ef(e)}function Fd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Tn},Nl=null,Bu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ih.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?pd-Ke():(a&4194048)===a?md-Ke():0,m=nh(d,m),m!==null)?(xd=a,e.cancelPendingCommit=m(tf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ld(e,a,o,!l)):tf(e,t,a,n,r,i,o,s,c,l,u,d)}function Id(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Hr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ld(e,t,n,r){t=mt(e,t),t&=~sd,t&=~od,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-it(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&bt(e,n,t)}function Rd(){return Ju&6?!0:(Df(0,!1),!1)}function zd(){if(Xu!==null){if(Qu===0)var e=Xu.return;else e=Xu,ya=va=null,es(e),eo=null,K=0,e=Xu;for(;e!==null;)pl(e.alternate,e),e=e.return;Xu=null}}function Bd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,yp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xd=0,zd(),Yu=e,Xu=n=Fi(e.current,null),Zu=t,Qu=0,$u=null,ed=!1,td=pt(e,t),nd=!1,ld=cd=sd=od=ad=id=0,dd=ud=null,fd=!1,rd=mt(e,t),Ti(),n}function Vd(e,t){Io=null,M.H=cc,t===G||t===Ka?(t=Qa(),Qu=3):t===Ga?(t=Qa(),Qu=4):Qu=t===Tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$u=t,Xu===null&&(id=1,yc(e,Ui(t,e.current)))}function Hd(){var e=To.current;return e===null?!0:(Zu&4194048)===Zu?Eo===null:(Zu&62914560)===Zu||Zu&536870912?e===Eo:!1}function Ud(){var e=M.H;return M.H=cc,e===null?cc:e}function Wd(){var e=M.A;return M.A=Ku,e}function Gd(){id=4,ed||(Zu&4194048)!==Zu&&To.current!==null||(td=!0),!(ad&134217727)&&!(od&134217727)||Yu===null||Ld(Yu,Zu,cd,!1)}function Kd(e,t,n){var r=Ju;Ju|=2;var i=Ud(),a=Wd();(Yu!==e||Zu!==t)&&(gd=null,Bd(e,t)),t=!1;var o=id;a:do try{if(Qu!==0&&Xu!==null){var s=Xu,c=$u;switch(Qu){case 8:zd(),o=6;break a;case 3:case 2:case 9:case 6:To.current===null&&(t=!0);var l=Qu;if(Qu=0,$u=null,Qd(e,s,c,l),n&&td){o=0;break a}break;default:l=Qu,Qu=0,$u=null,Qd(e,s,c,l)}}qd(),o=id;break}catch(t){Vd(e,t)}while(1);return t&&e.shellSuspendCounter++,ya=va=null,Ju=r,M.H=i,M.A=a,Xu===null&&(Yu=null,Zu=0,Ti()),o}function qd(){for(;Xu!==null;)Xd(Xu)}function Jd(e,t){var n=Ju;Ju|=2;var r=Ud(),a=Wd();Yu!==e||Zu!==t?(gd=null,hd=Ke()+500,Bd(e,t)):td=pt(e,t);a:do try{if(Qu!==0&&Xu!==null){t=Xu;var o=$u;b:switch(Qu){case 1:Qu=0,$u=null,Qd(e,t,o,1);break;case 2:case 9:if(Ja(o)){Qu=0,$u=null,Zd(t);break}t=function(){Qu!==2&&Qu!==9||Yu!==e||(Qu=7),Ef(e)},o.then(t,t);break a;case 3:Qu=7;break a;case 4:Qu=5;break a;case 7:Ja(o)?(Qu=0,$u=null,Zd(t)):(Qu=0,$u=null,Qd(e,t,o,7));break;case 5:var s=null;switch(Xu.tag){case 26:s=Xu.memoizedState;case 5:case 27:var c=Xu;if(s?Zm(s):c.stateNode.complete){Qu=0,$u=null;var l=c.sibling;if(l!==null)Xu=l;else{var u=c.return;u===null?Xu=null:(Xu=u,$d(u))}break b}}Qu=0,$u=null,Qd(e,t,o,5);break;case 6:Qu=0,$u=null,Qd(e,t,o,6);break;case 8:zd(),id=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Vd(e,t)}while(1);return ya=va=null,M.H=r,M.A=a,Ju=n,Xu===null?(Yu=null,Zu=0,Ti(),id):0}function Yd(){for(;Xu!==null&&!We();)Xd(Xu)}function Xd(e){var t=il(e.alternate,e,rd);e.memoizedProps=e.pendingProps,t===null?$d(e):Xu=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Rc(n,t,t.pendingProps,t.type,void 0,Zu);break;case 11:t=Rc(n,t,t.pendingProps,t.type.render,t.ref,Zu);break;case 5:es(t);var r=t;r===ia&&(oa?(fa(r),r.tag===5&&r.stateNode!=null&&(aa=r.stateNode)):(fa(r),oa=!0));default:pl(n,t),t=Xu=Ii(t,rd),t=il(n,t,rd)}e.memoizedProps=e.pendingProps,t===null?$d(e):Xu=t}function Qd(e,t,n,r){ya=va=null,es(t),eo=null,K=0;var i=t.return;try{if(wc(e,i,t,n,Zu)){id=1,yc(e,Ui(n,e.current)),Xu=null;return}}catch(t){if(i!==null)throw Xu=i,t;id=1,yc(e,Ui(n,e.current)),Xu=null;return}t.flags&32768?(oa||r===1?e=!0:td||Zu&536870912?e=!1:(ed=e=!0,(r===2||r===9||r===3||r===6)&&(r=To.current,r!==null&&r.tag===13&&(r.flags|=16384))),ef(t,e)):$d(t)}function $d(e){var t=e;do{if(t.flags&32768){ef(t,ed);return}e=t.return;var n=dl(t.alternate,t,rd);if(n!==null){Xu=n;return}if(t=t.sibling,t!==null){Xu=t;return}Xu=t=e}while(t!==null);id===0&&(id=5)}function ef(e,t){do{var n=fl(e.alternate,e);if(n!==null){n.flags&=32767,Xu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Xu=e;return}Xu=e=n}while(e!==null);id=6,Xu=null}function tf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do uf();while(vd!==0);if(Ju&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Yu&&(Xu=Yu=null,Zu=0),bd=t,yd=e,xd=n,Cd=a,wd=r,nf(e,t,n,s,c,l,f)}}function nf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Sd=s,s|=wi,yt(e,n,s,r,i,a),Ed=null,(n&335544064)===n?(Dd=Ia(e),r=10262):(Dd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(Xe,function(){return df(),null})):(e.callbackNode=null,e.callbackPriority=0),Ml=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=M.T,M.T=null,i=ye.p,ye.p=2,a=Ju,Ju|=4;try{su(e,t,n)}finally{Ju=a,ye.p=i,M.T=r}}vd=1,Ml?Td=Pp(o,e.containerInfo,Dd,of,sf,af,cf,df,rf,null,null):(of(),sf(),cf())}function rf(e){if(vd!==0){var t=yd.onRecoverableError;t(e,{componentStack:null})}}function af(){vd===3&&(vd=0,Ou(bd,yd),vd=4)}function of(){if(vd===1){vd=0;var e=yd,t=bd,n=xd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=M.T,M.T=null;var i=ye.p;ye.p=2;var a=Ju;Ju|=4;try{iu=au=!1,wu(t,e,n),n=up;var o=Jr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&qr(s.ownerDocument.documentElement,s)){if(c!==null&&Yr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Kr(s,h),v=Kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}vh=!!lp,up=lp=null}finally{Ju=a,ye.p=i,M.T=r}}e.current=t,vd=2}}function sf(){if(vd===2){vd=0;var e=yd,t=bd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=ye.p;ye.p=2;var i=Ju;Ju|=4;try{lu(e,t.alternate,t)}finally{Ju=i,ye.p=r,M.T=n}}vd=3}}function cf(){if(vd===4||vd===3){vd=0;var e=Td;Td=null,Ge();var t=yd,n=bd,r=xd,i=wd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?vd=5:(vd=0,bd=yd=null,lf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(_d=null),wt(r),n=n.stateNode,nt&&typeof nt.onCommitFiberRoot==`function`)try{nt.onCommitFiberRoot(tt,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=M.T,a=ye.p,ye.p=2,M.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{M.T=n,ye.p=a}}if(i=Ed,o=Dd,Dd=null,i!==null&&(Ed=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);xd&3&&uf(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===kd?Od++:(Od=0,kd=t):(Od=0,kd=null),Df(0,!1)}}function lf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Na(t)))}function uf(){return Td!==null&&(Td.skipTransition(),Td=null),of(),sf(),cf(),df()}function df(){if(vd!==5)return!1;var e=yd,t=Sd;Sd=0;var n=wt(xd),r=M.T,a=ye.p;try{ye.p=32>n?32:n,M.T=null,n=Cd,Cd=null;var o=yd,s=xd;if(vd=0,bd=yd=null,xd=0,Ju&6)throw Error(i(331));var c=Ju;if(Ju|=4,Uu(o.current),Fu(o,o.current,s,n),Ju=c,Df(0,!1),nt&&typeof nt.onPostCommitFiberRoot==`function`)try{nt.onPostCommitFiberRoot(tt,o)}catch{}return!0}finally{ye.p=a,M.T=r,lf(e,t)}}function ff(e,t,n){t=Ui(n,t),t=xc(e.stateNode,t,2),e=fo(e,t,2),e!==null&&(vt(e,2),Ef(e))}function pf(e,t,n){if(e.tag===3)ff(e,e,n);else for(;t!==null;){if(t.tag===3){ff(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(_d===null||!_d.has(r))){e=Ui(n,e),n=Sc(2),r=fo(t,n,2),r!==null&&(Cc(n,r,t,e),vt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(nd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Yu===e&&(Zu&n)===n&&(id===4||id===3&&(Zu&62914560)===Zu&&300>Ke()-pd?Ju&2?sd|=n:Bd(e,0):sd|=n,ld===Zu&&(ld=0)),Ef(e)}function gf(e,t){t===0&&(t=gt()),e=Oi(e,t),e!==null&&(vt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return He(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-it(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Zu,a=ft(r,r===Yu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||pt(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&_p()&&(e=Tf);for(var t=Ke(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}vd!==0&&vd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-it(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ht(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Yu,n=Zu,n=ft(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ue(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||pt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ue(r),wt(n)){case 2:case 8:n=Ye;break;case 32:n=Xe;break;case 268435456:n=Qe;break;default:n=Xe}return r=jf.bind(null,e),n=He(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ue(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(vd!==0&&vd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uf()&&e.callbackNode!==n)return null;var r=Zu;return r=ft(e,e===Yu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Pd(e,r,t),Af(e,Ke()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(uf())return null;Pd(e,t,!0)}function Nf(){Sp(function(){Ju&6?He(Je,Of):kf()})}function Pf(){if(Tf===0){var e=Ra;e===0&&(e=ct,ct<<=1,!(ct&261888)&&(ct=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:wn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[kt]||null).action),o=r.submitter;o&&(t=(t=o[kt]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Kn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);Js(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Js(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<hi.length;Lf++){var Rf=hi[Lf];gi(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}gi(si,`onAnimationEnd`),gi(ci,`onAnimationIteration`),gi(li,`onAnimationStart`),gi(`dblclick`,`onDoubleClick`),gi(`focusin`,`onFocus`),gi(`focusout`,`onBlur`),gi(ui,`onTransitionRun`),gi(di,`onTransitionStart`),gi(fi,`onTransitionCancel`),gi(pi,`onTransitionEnd`),qt(`onMouseEnter`,[`mouseout`,`mouseover`]),qt(`onMouseLeave`,[`mouseout`,`mouseover`]),qt(`onPointerEnter`,[`pointerout`,`pointerover`]),qt(`onPointerLeave`,[`pointerout`,`pointerover`]),Kt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Kt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Kt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Kt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Kt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Kt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}}}}function Hf(e,t){var n=t[jt];n===void 0&&(n=t[jt]=new Set);var r=e+`__bubble`;n.has(r)||(Kf(t,e,2,!1),n.add(r))}function Uf(e,t,n){var r=0;t&&(r|=4),Kf(n,e,r,t)}var Wf=`_reactListening`+Math.random().toString(36).slice(2);function Gf(e){if(!e[Wf]){e[Wf]=!0,Wt.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Uf(t,!1,e),Uf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wf]||(t[Wf]=!0,Uf(`selectionchange`,!1,t))}}function Kf(e,t,n,r){switch(Th(t)){case 2:var i=yh;break;case 8:i=bh;break;default:i=xh}n=i.bind(null,t,n,e),i=void 0,!Fn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function qf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Rt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Mn(function(){var r=a,i=Dn(n),s=[];a:{var c=mi.get(e);if(c!==void 0){var l=Kn,u=e;switch(e){case`keypress`:if(Vn(n)===0)break a;case`keydown`:case`keyup`:l=ar;break;case`focusin`:u=`focus`,l=I;break;case`focusout`:u=`blur`,l=I;break;case`beforeblur`:case`afterblur`:l=I;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Xn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Zn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=cr;break;case si:case ci:case li:l=L;break;case pi:l=R;break;case`scroll`:case`scrollend`:l=N;break;case`wheel`:l=lr;break;case`copy`:case`cut`:case`paste`:l=Qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=or;break;case`submit`:l=sr;break;case`toggle`:case`beforetoggle`:l=ur}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Nn(m,p),g!=null&&d.push(Jf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==En&&(u=n.relatedTarget||n.fromElement)&&(Rt(u)||u[At]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Rt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Xn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=or,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Bt(c),h=l==null?u:Bt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Rt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Xf):null,c!==null&&Zf(s,u,c,d,!1),l!==null&&f!==null&&Zf(s,f,l,d,!0)))}a:{if(c=r?Bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Ar;else if(wr(c)){if(jr)_=Br;else{_=Rr;var v=Lr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&xn(r.elementType)&&(_=Ar):_=zr;if(_&&=_(e,r)){Tr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Bt(r):window,e){case`focusin`:(wr(v)||v.contentEditable===`true`)&&(Zr=v,Qr=r,$r=null);break;case`focusout`:$r=Qr=Zr=null;break;case`mousedown`:ei=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ei=!1,ti(s,n,i);break;case`selectionchange`:if(Xr)break;case`keydown`:case`keyup`:ti(s,n,i)}var y;if(fr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else br?vr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(hr&&n.locale!==`ko`&&(br||b!==`onCompositionStart`?b===`onCompositionEnd`&&br&&(y=Bn()):(Ln=i,Rn=`value`in Ln?Ln.value:Ln.textContent,br=!0)),v=Yf(r,b),0<v.length&&(b=new $n(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=yr(n),y!==null&&(b.data=y)))),(y=mr?xr(e,n):Sr(e,n))&&(b=Yf(r,`onBeforeInput`),0<b.length&&(v=new $n(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),If(s,e,r,n,i)}Vf(s,t)})}function Jf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Nn(e,n),i!=null&&r.unshift(Jf(e,i,a)),i=Nn(e,t),i!=null&&r.push(Jf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Xf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Nn(n,a),l!=null&&o.unshift(Jf(n,l,c))):i||(l=Nn(n,a),l!=null&&o.push(Jf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Qf=/\r\n?/g,$f=/\u0000|\uFFFD/g;function ep(e){return(typeof e==`string`?e:``+e).replace(Qf,`
9
+ `).replace($f,``)}function tp(e,t){return t=ep(t),ep(e)===t}function np(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||_n(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&_n(e,``+r);else return;break;case`className`:tn(e,`class`,r);break;case`tabIndex`:tn(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:tn(e,n,r);break;case`style`:bn(e,r,o);return;case`data`:if(t!==`object`){tn(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=wn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&np(e,t,`name`,a.name,a,null),np(e,t,`formEncType`,a.formEncType,a,null),np(e,t,`formMethod`,a.formMethod,a,null),np(e,t,`formTarget`,a.formTarget,a,null)):(np(e,t,`encType`,a.encType,a,null),np(e,t,`method`,a.method,a,null),np(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=wn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Tn);return;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=wn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Hf(`beforetoggle`,e),Hf(`toggle`,e),en(e,`popover`,r);break;case`xlinkActuate`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:nn(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:nn(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:nn(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:en(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=Sn.get(n)||n,en(e,n,r);else return}Qt=!0}function rp(e,t,n,r,a,o){switch(n){case`style`:bn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)_n(e,r);else if(typeof r==`number`||typeof r==`bigint`)_n(e,``+r);else return;break;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=Tn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Gt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[kt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Qt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):en(e,n,r)}return}Qt=!0}function ip(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Hf(`error`,e),Hf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,o,s,n,null)}}a&&np(e,t,`srcSet`,n.srcSet,n,null),r&&np(e,t,`src`,n.src,n,null);return;case`input`:Hf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:np(e,t,r,d,n,null)}}fn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Hf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:np(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&mn(e,!!r,n,!0):mn(e,!!r,t,!1);return;case`textarea`:for(s in Hf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:np(e,t,s,c,n,null)}gn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:np(e,t,l,r,n,null)}return;case`dialog`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Hf(`cancel`,e),Hf(`close`,e);break;case`iframe`:case`object`:Hf(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Hf(zf[r],e);break;case`image`:Hf(`error`,e),Hf(`load`,e);break;case`details`:Hf(`toggle`,e);break;case`embed`:case`source`:case`link`:Hf(`error`,e),Hf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,u,r,n,null)}return;default:if(xn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&rp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&np(e,t,c,r,n,null))}var ap={};function op(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||np(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Qt=!0),o=m;break;case`name`:m!==f&&(Qt=!0),a=m;break;case`checked`:m!==f&&(Qt=!0),u=m;break;case`defaultChecked`:m!==f&&(Qt=!0),d=m;break;case`value`:m!==f&&(Qt=!0),s=m;break;case`defaultValue`:m!==f&&(Qt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&np(e,t,p,m,r,f)}}dn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||np(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Qt=!0),p=o;break;case`defaultValue`:o!==l&&(Qt=!0),c=o;break;case`multiple`:o!==l&&(Qt=!0),s=o;default:o!==l&&np(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?mn(e,!!n,n?[]:``,!1):mn(e,!!n,t,!0)):mn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:np(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Qt=!0),p=a;break;case`defaultValue`:a!==o&&(Qt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&np(e,t,s,a,r,o)}hn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:np(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Qt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:np(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&np(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:np(e,t,u,p,r,m)}return;default:if(xn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&rp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||rp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&np(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||np(e,t,f,p,r,m)}function sp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function cp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&sp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&sp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function pp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function mp(e,t,n,r){return n=dp(n).createElement(e),n[Ot]=r,n[kt]=t,ip(n,e,t),Ht(n),n}function hp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gp=null;function _p(){var e=window.event;return e&&e.type===`popstate`?e!==gp&&(gp=e,!0):(gp=null,!1)}var vp=typeof setTimeout==`function`?setTimeout:void 0,yp=typeof clearTimeout==`function`?clearTimeout:void 0,bp=typeof Promise==`function`?Promise:void 0,xp=typeof requestAnimationFrame==`function`?requestAnimationFrame:vp,Sp=typeof queueMicrotask==`function`?queueMicrotask:bp===void 0?vp:function(e){return bp.resolve(null).then(e).catch(Cp)};function Cp(e){setTimeout(function(){throw e})}function wp(e){return e===`head`}function Tp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Wh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)ym(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,ym(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ft]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&ym(e.ownerDocument.body)}n=i}while(n);Wh(t)}function Ep(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Dp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Op(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function kp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ap(e){return kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return kp(t,n,e)}function Mp(e){return e.documentElement.clientHeight}function Np(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Pp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Mp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Qm(f),u>th){s.length=o;break}f=new Promise(Np.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Fp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Fp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Fp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Fp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ip(e){return{name:e,group:new Fp(`group`,e),imagePair:new Fp(`image-pair`,e),old:new Fp(`old`,e),new:new Fp(`new`,e)}}function Lp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Lp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Hp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Bp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Rp,e,s,r)}this._eventListeners=a}};function Rp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Lp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Hp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Bp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,zp,e,n,i),r.splice(t,1),a!==null&&a()}};function zp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Bp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Vp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Hp(e,t,n,r){if(e.length===0)return-1;r=Vp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Vp(a.optionsOrUseCapture)===r)return i}return-1}Lp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Lp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Up,e,void 0,void 0)};function Up(e,t){return e.tag!==6&&(e=b(e),hm(e,t))}Lp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Wp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Up(t[n],e);n--);};function Wp(e,t){return t.push(e),!1}Lp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=dp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Gp,e,void 0,void 0))};function Gp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Lp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Lp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,qp,e,void 0,void 0);for(var n=t=0;n<Jp.length;n++){var r=Jp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Jp[t++]=r}Jp.length=t}};function qp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Jp=[],Yp=!1;function Xp(e,t,n){Jp.push({fragmentInstance:e,observer:t,instance:n}),Yp||(Yp=!0,gm(function(){Yp=!1;var e=Jp;Jp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Lp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Zp,e,void 0,void 0),e};function Zp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Lp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Lp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Wp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Qp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Qp(e,t,n,r,i){var a=Rt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function $p(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Lp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Wp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),$p(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),$p(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function em(e,t){return e=b(e),tm(e,t),!1}function tm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Jp.length;i++){var a=Jp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Jp[r++]=a)}Jp.length=r,n.observe(e)}),tm(e,t))}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Xp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function im(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:im(n),Lt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function am(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ft])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=dm(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=dm(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=dm(e.nextSibling),e===null))return null;return e}function cm(e){return e.data===`$?`||e.data===`$~`}function lm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function um(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function dm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var fm=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function gm(e){xp(function(){xp(function(t){return e(t)})})}function _m(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&np(e,t,r,null,ap,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===Tn&&(e.onclick=null),Lt(e)}function ym(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Lt(e)}var bm=new Map,xm=new Set;function Sm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Cm=ye.d;ye.d={f:wm,r:Tm,D:Om,C:km,L:Am,m:jm,X:Nm,S:Mm,M:Pm};function wm(){var e=Cm.f(),t=Rd();return e||t}function Tm(e){var t=zt(e);t!==null&&t.tag===5&&t.type===`form`?Xs(t):Cm.r(e)}var Em=typeof document>`u`?null:document;function Dm(e,t,n){var r=Em;if(r&&typeof t==`string`&&t){var i=un(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xm.has(i)||(xm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ip(t,`link`,e),Ht(t),r.head.appendChild(t)))}}function Om(e){Cm.D(e),Dm(`dns-prefetch`,e,null)}function km(e,t){Cm.C(e,t),Dm(`preconnect`,e,t)}function Am(e,t,n){Cm.L(e,t,n);var r=Em;if(r&&e&&t){var i=`link[rel="preload"][as="`+un(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+un(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+un(n.imageSizes)+`"]`)):i+=`[href="`+un(e)+`"]`;var a=i;switch(t){case`style`:a=Im(e);break;case`script`:a=Bm(e)}if(!(bm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lm(a))||t===`script`&&r.querySelector(Vm(a))))){var o=r.createElement(`link`);ip(o,`link`,e),t===`style`&&(o[It]=!0,o.onload=o.onerror=function(){Ut(o)}),Ht(o),r.head.appendChild(o)}}}function jm(e,t){Cm.m(e,t);var n=Em;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+un(r)+`"][href="`+un(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bm(e)}if(!bm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),bm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vm(a)))return}r=n.createElement(`link`),ip(r,`link`,e),Ht(r),n.head.appendChild(r)}}}function Mm(e,t,n){Cm.S(e,t,n);var r=Em;if(r&&e){var i=Vt(r).hoistableStyles,a=Im(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bm.get(a))&&Wm(e,n);var c=o=r.createElement(`link`);Ht(c),ip(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Um(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nm(e,t){Cm.X(e,t);var n=Em;if(n&&e){var r=Vt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Ht(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t){Cm.M(e,t);var n=Em;if(n&&e){var r=Vt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Ht(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t,n,r){var a=(a=Oe.current)?Sm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Im(n.href),t=Vt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Im(n.href);var o=Vt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=bm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bm.set(e,o)),zm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Bm(n),t=Vt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Im(e){return`href="`+un(e)+`"`}function Lm(e){return`link[rel="stylesheet"][`+e+`]`}function Rm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[It]){r.loading=1;return}}else t=e.createElement(`link`),t[It]=!0,t.onload=t.onerror=Ut.bind(null,t),ip(t,`link`,n),Ht(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Bm(e){return`[src="`+un(e)+`"]`}function Vm(e){return`script[async]`+e}function Hm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+un(n.href)+`"]`);if(r)return t.instance=r,Ht(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ht(r),ip(r,`style`,a),Um(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Im(n.href);var o=e.querySelector(Lm(a));if(o)return t.state.loading|=4,t.instance=o,Ht(o),o;r=Rm(n),(a=bm.get(a))&&Wm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ip(o,`link`,r),t.state.loading|=4,Um(o,n.precedence,e),t.instance=o;case`script`:return o=Bm(n.src),(a=e.querySelector(Vm(o)))?(t.instance=a,Ht(a),a):(r=n,(a=bm.get(o))&&(r=D({},n),Gm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ht(a),ip(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Um(r,n.precedence,e));return t.instance}function Um(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Km=null;function qm(e,t,n){if(Km===null){var r=new Map,i=Km=new Map;i.set(n,r)}else i=Km,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ft]||a[Ot]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Ym(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Zm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function $m(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Qm(t),e.suspenseyImages.push(t)),e=ah.bind(e),t.decode().then(e,e))}function eh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Im(r.href),a=t.querySelector(Lm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ih.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ht(a);return}a=t.ownerDocument||t,r=Rm(r),(i=bm.get(i))&&Wm(r,i),a=a.createElement(`link`),Ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ip(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ih.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var th=0;function nh(e,t){return e.stylesheets&&e.count===0&&sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&th===0&&(th=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>th?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)sh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ih(){this.count--,rh(this)}function ah(){this.imgCount--,rh(this)}var oh=null;function sh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oh=new Map,t.forEach(ch,e),oh=null,ih.call(e))}function ch(e,t){if(!(t.state.loading&4)){var n=oh.get(e);if(n)var r=n.get(null);else{n=new Map,oh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ih.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lh={$$typeof:re,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function uh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=_t(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_t(0),this.hiddenUpdates=_t(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function dh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new uh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ni(3,null,null,t),e.current=a,a.stateNode=e,t=Ma(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},co(a),e}function fh(e){return e?(e=ji,e):ji}function ph(e,t,n,r,i,a){i=fh(i),r.context===null?r.context=i:r.pendingContext=i,r=uo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=fo(e,r,t),n!==null&&(Nd(n,e,t),po(n,e,t))}function mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=Oi(e,67108864);t!==null&&Nd(t,e,67108864),hh(e,67108864)}}function _h(e){if(e.tag===13||e.tag===31){var t=Ad();t=Ct(t);var n=Oi(e,t);n!==null&&Nd(n,e,t),hh(e,t)}}var vh=!0;function yh(e,t,n,r){var i=M.T;M.T=null;var a=ye.p;try{ye.p=2,xh(e,t,n,r)}finally{ye.p=a,M.T=i}}function bh(e,t,n,r){var i=M.T;M.T=null;var a=ye.p;try{ye.p=8,xh(e,t,n,r)}finally{ye.p=a,M.T=i}}function xh(e,t,n,r){if(vh){var i=Sh(r);if(i===null)qf(e,t,r,Ch,n),Ph(e,r);else if(Ih(i,e,t,n,r))r.stopPropagation();else if(Ph(e,r),t&4&&-1<Nh.indexOf(e)){for(;i!==null;){var a=zt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=dt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-it(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(Ju&6)&&(hd=Ke()+500,Df(0,!1))}}break;case 31:case 13:s=Oi(a,2),s!==null&&Nd(s,a,2),Rd(),hh(a,2)}if(a=Sh(r),a===null&&qf(e,t,r,Ch,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function Sh(e){return e=Dn(e),wh(e)}var Ch=null;function wh(e){if(Ch=null,e=Rt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ch=e,null}function Th(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(qe()){case Je:return 2;case Ye:return 8;case Xe:case Ze:return 32;case Qe:return 268435456;default:return 32}default:return 32}}var Eh=!1,Dh=null,Oh=null,kh=null,Ah=new Map,jh=new Map,Mh=[],Nh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ph(e,t){switch(e){case`focusin`:case`focusout`:Dh=null;break;case`dragenter`:case`dragleave`:Oh=null;break;case`mouseover`:case`mouseout`:kh=null;break;case`pointerover`:case`pointerout`:Ah.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jh.delete(t.pointerId)}}function Fh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=zt(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ih(e,t,n,r,i){switch(t){case`focusin`:return Dh=Fh(Dh,e,t,n,r,i),!0;case`dragenter`:return Oh=Fh(Oh,e,t,n,r,i),!0;case`mouseover`:return kh=Fh(kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ah.set(a,Fh(Ah.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jh.set(a,Fh(jh.get(a)||null,e,t,n,r,i)),!0}return!1}function Lh(e){var t=Rt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Et(e.priority,function(){_h(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Et(e.priority,function(){_h(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);En=r,n.target.dispatchEvent(r),En=null}else return t=zt(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function zh(e,t,n){Rh(e)&&n.delete(t)}function Bh(){Eh=!1,Dh!==null&&Rh(Dh)&&(Dh=null),Oh!==null&&Rh(Oh)&&(Oh=null),kh!==null&&Rh(kh)&&(kh=null),Ah.forEach(zh),jh.forEach(zh)}function Vh(e,n){e.blockedOn===n&&(e.blockedOn=null,Eh||(Eh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bh)))}var Hh=null;function Uh(e){Hh!==e&&(Hh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hh===e&&(Hh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wh(r||n)===null)continue;break}var a=zt(n);a!==null&&(e.splice(t,3),t-=3,Js(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wh(e){function t(t){return Vh(t,e)}Dh!==null&&Vh(Dh,e),Oh!==null&&Vh(Oh,e),kh!==null&&Vh(kh,e),Ah.forEach(t),jh.forEach(t);for(var n=0;n<Mh.length;n++){var r=Mh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mh.length&&(n=Mh[0],n.blockedOn===null);)Lh(n),n.blockedOn===null&&Mh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[kt]||null;if(typeof a==`function`)o||Uh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[kt]||null)s=o.formAction;else if(wh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Uh(n)}}}function Gh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Kh(e){this._internalRoot=e}qh.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ph(n,Ad(),e,t,null,null)},qh.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),Rd(),t[At]=null}};function qh(e){this._internalRoot=e}qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mh.length&&t!==0&&t<Mh[n].priority;n++);Mh.splice(n,0,e),n===0&&Lh(e)}};var Jh=n.version;if(Jh!==`19.3.1`)throw Error(i(527,Jh,`19.3.1`));ye.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Yh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{tt=Xh.inject(Yh),nt=Xh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=gc,s=_c,c=vc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dh(e,1,!1,null,null,n,r,null,o,s,c,Gh),e[At]=t.current,Gf(e),new Kh(t)}})),_=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,b=/^[\\/]{2}/;function x(e,t){return t+e.replace(/\\/g,`/`)}var S=`popstate`;function C(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function w(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return k(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:A(t)}return ee(t,n,null,e)}function T(e,t){if(e===!1||e==null)throw Error(t)}function E(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function D(){return Math.random().toString(36).substring(2,10)}function O(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function k(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?j(t):t,state:n,key:t&&t.key||r||D(),mask:i}}function A({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function j(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ee(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=C(e)?e:k(h.location,e,t);n&&n(r,e),l=u()+1;let d=O(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=C(e)?e:k(h.location,e,t);n&&n(r,e),l=u();let i=O(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return te(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(S,d),c=e,()=>{i.removeEventListener(S,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function te(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),T(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:A(t);return i=i.replace(/ $/,`%20`),!n&&b.test(i)&&(i=r+i),new URL(i,r)}function ne(e,t,n=`/`){return re(e,t,n,!1)}function re(e,t,n,r,i){let a=xe((typeof t==`string`?j(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ie(e),s=null,c=be(a);for(let e=0;s==null&&e<o.length;++e)s=_e(o[e],c,r);return s}function ie(e){let t=ae(e);return se(t),t}function ae(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;T(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=ke([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(T(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ae(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:he(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=ye(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of oe(e.path))a(e,t,!0,n)}),t}function oe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=oe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function se(e){e.sort((e,t)=>e.score===t.score?ge(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ce=/^:[\w-]+$/,le=3,ue=2,de=1,fe=10,pe=-2,me=e=>e===`*`;function he(e,t){let n=e.split(`/`),r=n.length;return n.some(me)&&(r+=pe),t&&(r+=ue),n.filter(e=>!me(e)).reduce((e,t)=>e+(ce.test(t)?le:t===``?de:fe),r)}function ge(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function _e(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?M(u,l,s.matcher,s.compiledParams):ve(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=ve({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:ke([a,d.pathname]),pathnameBase:je(ke([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=ke([a,d.pathnameBase]))}return o}function ve(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ye(e.path,e.caseSensitive,e.end);return M(e,t,n,r)}function M(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Ae(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Ae(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ye(e,t=!1,n=!0){E(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function be(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function xe(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Se(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?j(e):e,a;return n?(n=Oe(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Ce(n.substring(1),`/`):Ce(n,t)):a=t,{pathname:a,search:Me(r),hash:Ne(i)}}function Ce(e,t){let n=Ae(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function we(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Te(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ee(e){let t=Te(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function De(e,t,n,r=!1){let i;typeof e==`string`?i=j(e):(i={...e},T(!i.pathname||!i.pathname.includes(`?`),we(`?`,`pathname`,`search`,i)),T(!i.pathname||!i.pathname.includes(`#`),we(`#`,`pathname`,`hash`,i)),T(!i.search||!i.search.includes(`#`),we(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Se(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Oe=e=>e.replace(/[\\/]{2,}/g,`/`),ke=e=>Oe(e.join(`/`));function Ae(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var je=e=>Ae(e).replace(/^\/*/,`/`),Me=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ne=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Pe=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Fe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ie(e){return ke(e.map(e=>e.route.path).filter(Boolean))||`/`}var Le=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Re(e,t){let n=e;if(typeof n!=`string`||!y.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Le)try{let e=new URL(window.location.href),r=b.test(n)?new URL(x(n,e.protocol)):new URL(n),a=xe(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var ze=new URL(`http://localhost`);function Be(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),ze)}catch{return ze}}function Ve(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function He(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Ue(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Ve(i,n),s=!Ve(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!He(e,i)||!Ve(i,a)))throw Error(`External navigation is not allowed`)}var We=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(We);var Ge=[`GET`,...We];new Set(Ge);var Ke=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function qe(e){try{return Ke.includes(new URL(e).protocol)}catch{return!1}}var Je=v.createContext(null);Je.displayName=`DataRouter`;var Ye=v.createContext(null);Ye.displayName=`DataRouterState`;var Xe=v.createContext(!1);function Ze(){return v.useContext(Xe)}var Qe=v.createContext({isTransitioning:!1});Qe.displayName=`ViewTransition`;var $e=v.createContext(new Map);$e.displayName=`Fetchers`;var et=v.createContext(null);et.displayName=`Await`;var tt=v.createContext(null);tt.displayName=`Navigation`;var nt=v.createContext(null);nt.displayName=`Location`;var rt=v.createContext({outlet:null,matches:[],isDataRoute:!1});rt.displayName=`Route`;var it=v.createContext(null);it.displayName=`RouteError`;var at=`REACT_ROUTER_ERROR`,ot=`REDIRECT`,st=`ROUTE_ERROR_RESPONSE`;function ct(e){if(e.startsWith(`${at}:${ot}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function lt(e){if(e.startsWith(`${at}:${st}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Pe(t.status,t.statusText,t.data)}catch{}}function ut(e,{relative:t}={}){T(dt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=v.useContext(tt),{hash:i,pathname:a,search:o}=bt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:ke([n,a])),r.createHref({pathname:s,search:o,hash:i})}function dt(){return v.useContext(nt)!=null}function ft(){return T(dt(),`useLocation() may be used only in the context of a <Router> component.`),v.useContext(nt).location}var pt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function mt(e){v.useContext(tt).static||v.useLayoutEffect(e)}function ht(){let{isDataRoute:e}=v.useContext(rt);return e?Lt():gt()}function gt(){T(dt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=v.useContext(Je),{basename:t,navigator:n}=v.useContext(tt),{matches:r}=v.useContext(rt),{pathname:i}=ft(),a=JSON.stringify(Ee(r)),o=v.useRef(!1);return mt(()=>{o.current=!0}),v.useCallback((r,s={})=>{if(E(o.current,pt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=De(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:ke([t,c.pathname])),Ue(typeof r==`string`?r:A(r),n.createHref(c),Be(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var _t=v.createContext(null);function vt(e){let t=v.useContext(rt).outlet;return v.useMemo(()=>t&&v.createElement(_t.Provider,{value:e},t),[t,e])}function yt(){let{matches:e}=v.useContext(rt);return e[e.length-1]?.params??{}}function bt(e,{relative:t}={}){let{matches:n}=v.useContext(rt),{pathname:r}=ft(),i=JSON.stringify(Ee(n));return v.useMemo(()=>De(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function xt(e,t){return St(e,t)}function St(e,t,n){T(dt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=v.useContext(tt),{matches:i}=v.useContext(rt),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;zt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=ft(),d;if(t){let e=typeof t==`string`?j(t):t;T(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ne(e,{pathname:p});E(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),E(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=kt(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:ke([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:ke([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?v.createElement(nt.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function Ct(){let e=It(),t=Fe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=v.createElement(v.Fragment,null,v.createElement(`p`,null,`💿 Hey developer 👋`),v.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,v.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,v.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),v.createElement(v.Fragment,null,v.createElement(`h2`,null,`Unexpected Application Error!`),v.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?v.createElement(`pre`,{style:i},n):null,o)}var wt=v.createElement(Ct,null),Tt=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=lt(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:v.createElement(rt.Provider,{value:this.props.routeContext},v.createElement(it.Provider,{value:e,children:this.props.component}));return this.context?v.createElement(Dt,{error:e},t):t}};Tt.contextType=Xe;var Et=new WeakMap;function Dt({children:e,error:t}){let{basename:n,navigator:r}=v.useContext(tt);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ct(t.digest);if(e){let i=Et.get(t);if(i)throw i;let a=Re(e.location,n),o=a.absoluteURL||a.to;if(Ue(e.location,o,Be(r),`allow-explicit`),qe(o))throw Error(`Invalid redirect location`);if(Le&&!Et.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Et.set(t,n),n}}return v.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Ot({routeContext:e,match:t,children:n}){let r=v.useContext(Je);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(rt.Provider,{value:e},n)}function kt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);T(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ie(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||wt,o&&(s<0&&c===0?(zt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?v.createElement(n.route.Component,null):n.route.element?n.route.element:e,v.createElement(Ot,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?v.createElement(Tt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function At(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jt(e){let t=v.useContext(Je);return T(t,At(e)),t}function Mt(e){let t=v.useContext(Ye);return T(t,At(e)),t}function Nt(e){let t=v.useContext(rt);return T(t,At(e)),t}function Pt(e){let t=Nt(e),n=t.matches[t.matches.length-1];return T(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ft(){return Pt(`useRouteId`)}function It(){let e=v.useContext(it),t=Mt(`useRouteError`),n=Pt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Lt(){let{router:e}=jt(`useNavigate`),t=Pt(`useNavigate`),n=v.useRef(!1);return mt(()=>{n.current=!0}),v.useCallback(async(r,i={})=>{E(n.current,pt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Rt={};function zt(e,t,n){!t&&!Rt[e]&&(Rt[e]=!0,E(!1,n))}v.memo(Bt);function Bt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return St(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Vt({to:e,replace:t,state:n,relative:r}){T(dt(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=v.useContext(tt);E(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=v.useContext(rt),{pathname:s}=ft(),c=ht(),l=De(e,Ee(o),s,r===`path`);Ue(typeof e==`string`?e:A(e),a.createHref(l),Be(a),`reject`);let u=JSON.stringify(l);return v.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Ht(e){return vt(e.context)}function Ut(e){T(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Wt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){T(!dt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=v.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=j(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=v.useMemo(()=>{let e=xe(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return E(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:v.createElement(tt.Provider,{value:c},v.createElement(nt.Provider,{children:t,value:h}))}function Gt({children:e,location:t}){return xt(Kt(e),t)}v.Component;function Kt(e,t=[]){let n=[];return v.Children.forEach(e,(e,r)=>{if(!v.isValidElement(e))return;let i=[...t,r];if(e.type===v.Fragment){n.push.apply(n,Kt(e.props.children,i));return}T(e.type===Ut,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),T(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Kt(e.props.children,i)),n.push(a)}),n}var qt=`get`,Jt=`application/x-www-form-urlencoded`;function Yt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Xt(e){return Yt(e)&&e.tagName.toLowerCase()===`button`}function Zt(e){return Yt(e)&&e.tagName.toLowerCase()===`form`}function Qt(e){return Yt(e)&&e.tagName.toLowerCase()===`input`}function $t(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function en(e,t){return e.button===0&&(!t||t===`_self`)&&!$t(e)}function tn(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function nn(e,t){let n=tn(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var rn=null;function an(){if(rn===null)try{new FormData(document.createElement(`form`),0),rn=!1}catch{rn=!0}return rn}var on=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function sn(e){return e!=null&&!on.has(e)?(E(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jt}"`),null):e}function cn(e,t){let n,r,i,a,o;if(Zt(e)){let o=e.getAttribute(`action`);r=o?xe(o,t):null,n=e.getAttribute(`method`)||qt,i=sn(e.getAttribute(`enctype`))||Jt,a=new FormData(e)}else if(Xt(e)||Qt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?xe(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||qt,i=sn(e.getAttribute(`formenctype`))||sn(o.getAttribute(`enctype`))||Jt,a=new FormData(o,e),!an()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Yt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=qt,r=null,i=Jt,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function ln(e,t){if(e===!1||e==null)throw Error(t)}function un(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&xe(i.pathname,t)===`/`?`${Ae(t)}/_root.${r}`:`${Ae(i.pathname)}.${r}`,i}async function dn(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fn(e){return e!=null&&typeof e.page==`string`}function pn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function mn(e,t,n){return yn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await dn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(pn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function hn(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function gn(e,t,{includeHydrateFallback:n}={}){return _n(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function _n(e){return[...new Set(e)]}function vn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function yn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!fn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(vn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function bn(){let e=v.useContext(Je);return ln(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function xn(){let e=v.useContext(Ye);return ln(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Sn=v.createContext(void 0);Sn.displayName=`FrameworkContext`;function Cn(){let e=v.useContext(Sn);return ln(e,`You must render this element inside a <HydratedRouter> element`),e}function wn(e,t){let n=v.useContext(Sn),[r,i]=v.useState(!1),[a,o]=v.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=v.useRef(null);v.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),v.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Tn(s,p),onBlur:Tn(c,m),onMouseEnter:Tn(l,p),onMouseLeave:Tn(u,m),onTouchStart:Tn(d,p)}]:[a,f,{}]:[!1,f,{}]}function Tn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function En({page:e,...t}){let n=Ze(),{nonce:r}=Cn(),{router:i}=bn(),a=v.useMemo(()=>ne(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?v.createElement(On,{page:e,matches:a,...t}):v.createElement(kn,{page:e,matches:a,...t})):null}function Dn(e){let{manifest:t,routeModules:n}=Cn(),[r,i]=v.useState([]);return v.useEffect(()=>{let r=!1;return mn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function On({page:e,matches:t,...n}){let r=ft(),{future:i}=Cn(),{basename:a}=bn(),o=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=un(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return v.createElement(v.Fragment,null,o.map(e=>v.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function kn({page:e,matches:t,...n}){let r=ft(),{future:i,manifest:a,routeModules:o}=Cn(),{basename:s}=bn(),{loaderData:c,matches:l}=xn(),u=v.useMemo(()=>hn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=v.useMemo(()=>hn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=un(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=v.useMemo(()=>gn(d,a),[d,a]),m=Dn(d);return v.createElement(v.Fragment,null,f.map(e=>v.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>v.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>v.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function An(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}v.Component;var jn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{jn&&(window.__reactRouterVersion=`7.18.5`)}catch{}function Mn({basename:e,children:t,useTransitions:n,window:r}){let i=v.useRef();i.current??=w({window:r,v5Compat:!0});let a=i.current,[o,s]=v.useState({action:a.action,location:a.location}),c=v.useCallback(e=>{n===!1?s(e):v.startTransition(()=>s(e))},[n]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(Wt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var Nn=v.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=v.useContext(tt),b=typeof l==`string`&&y.test(l),x=Re(l,h);l=x.to;let S=ut(l,{relative:r}),C=ft(),w=null;if(o){let e=De(o,[],C.mask?C.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:ke([h,e.pathname])),w=g.createHref(e)}let[T,E,D]=wn(n,p),O=Rn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function k(t){e&&e(t),t.defaultPrevented||O(t)}let A=!(x.isExternal||i),j=v.createElement(`a`,{...p,...D,href:(A?w:void 0)||x.absoluteURL||S,onClick:A?k:e,ref:An(m,E),target:c,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?v.createElement(v.Fragment,null,j,v.createElement(En,{page:S})):j});Nn.displayName=`Link`;var Pn=v.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=bt(a,{relative:c.relative}),d=ft(),f=v.useContext(Ye),{navigator:p,basename:m}=v.useContext(tt),h=f!=null&&Wn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=xe(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return v.createElement(Nn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Pn.displayName=`NavLink`;var Fn=v.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=qt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=v.useContext(tt),g=Hn(),_=Un(s,{relative:l}),b=o.toLowerCase()===`get`?`get`:`post`,x=typeof s==`string`&&y.test(s);return v.createElement(`form`,{ref:m,method:b,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?v.startTransition(()=>p()):p()},...p,"data-discover":!x&&e===`render`?`true`:void 0})});Fn.displayName=`Form`;function In(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ln(e){let t=v.useContext(Je);return T(t,In(e)),t}function Rn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=ht(),d=ft(),f=bt(e,{relative:o});return v.useCallback(p=>{if(en(p,t)){p.preventDefault();let t=n===void 0?A(d)===A(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?v.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function zn(e){E(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(tn(e)),n=v.useRef(!1),r=ft(),i=v.useMemo(()=>nn(r.search,n.current?null:t.current),[r.search]),a=ht();return[i,v.useCallback((e,t)=>{let r=tn(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Bn=0,Vn=()=>`__${String(++Bn)}__`;function Hn(){let{router:e}=Ln(`useSubmit`),{basename:t}=v.useContext(tt),n=Ft(),r=e.fetch,i=e.navigate;return v.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=cn(e,t);if(a.navigate===!1){let e=a.fetcherKey||Vn();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Un(e,{relative:t}={}){let{basename:n}=v.useContext(tt),r=v.useContext(rt);T(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...bt(e||`.`,{relative:t})},o=ft();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:ke([n,a.pathname])),A(a)}function Wn(e,{relative:t}={}){let n=v.useContext(Qe);T(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ln(`useViewTransitionState`),i=bt(e,{relative:t});if(!n.isTransitioning)return!1;let a=xe(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=xe(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ve(i.pathname,o)!=null||ve(i.pathname,a)!=null}var Gn=_(),Kn=class extends Error{status;constructor(e,t){super(t),this.status=e}};function qn(){return new URLSearchParams(window.location.search).get(`project`)||`default`}async function N(e,t){let{json:n,...r}=t||{},i=await fetch(e,{...r,headers:{...n===void 0?{}:{"content-type":`application/json`},"x-obzerver-project":qn(),...r.headers||{}},body:n===void 0?r.body:JSON.stringify(n),credentials:`same-origin`});if(i.status===401&&!e.startsWith(`/api/auth`)&&window.dispatchEvent(new Event(`obz:unauthorized`)),!i.ok){let e=i.statusText||`The server answered ${i.status}`;try{let t=await i.json();e=t.error||t.message||e}catch{}throw new Kn(i.status,e)}if(i.status!==204&&i.status!==202)return i.json()}function P(e,t=[]){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!1),c=(0,v.useRef)(0),l=(0,v.useCallback)(async()=>{if(!e)return;let t=++c.current;s(!0);try{let n=await N(e);t===c.current&&(r(n),a(null))}catch(e){t===c.current&&a(e)}finally{t===c.current&&s(!1)}},[e]);return(0,v.useEffect)(()=>{l()},[l,...t]),(0,v.useEffect)(()=>{let e=()=>{l()};return window.addEventListener(`obz:refresh`,e),()=>window.removeEventListener(`obz:refresh`,e)},[l]),{data:n,error:i,loading:o,reload:l,setData:r}}var Jn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),F=o(((e,t)=>{t.exports=Jn()}))(),Yn=[{id:`15m`,label:`15m`,ms:9e5},{id:`1h`,label:`1h`,ms:36e5},{id:`6h`,label:`6h`,ms:216e5},{id:`24h`,label:`24h`,ms:864e5},{id:`7d`,label:`7d`,ms:6048e5},{id:`30d`,label:`30d`,ms:2592e6}],Xn=(0,v.createContext)(null);function Zn({children:e}){let[t,n]=zn(),r=t.get(`range`)||`1h`,i=t.get(`service`)||``,a=t.get(`env`)||``,o=Number(t.get(`from`))||0,s=Number(t.get(`to`))||0,[c,l]=(0,v.useState)(0);(0,v.useEffect)(()=>{let e=()=>l(e=>e+1);return window.addEventListener(`obz:refresh`,e),()=>window.removeEventListener(`obz:refresh`,e)},[]);let[u,d]=(0,v.useState)(!0),[f,p]=(0,v.useState)(null),m=Yn.find(e=>e.id===r)?.ms??36e5;(0,v.useEffect)(()=>{if(!u||o)return;let e=setInterval(()=>l(e=>e+1),3e4);return()=>clearInterval(e)},[u,o]),(0,v.useEffect)(()=>{N(`/api/meta`).then(p).catch(()=>{})},[c]);let{from:h,to:g}=(0,v.useMemo)(()=>{if(o&&s)return{from:o,to:s};let e=Date.now();return{from:e-m,to:e}},[m,c,o,s]),_=e=>{let r=new URLSearchParams(t);for(let[t,n]of Object.entries(e))n===null||n===``?r.delete(t):r.set(t,n);n(r,{replace:!0})},y={range:o?`custom`:r,rangeMs:g-h,from:h,to:g,service:i,env:a,tick:c,live:u,meta:f,setRange:e=>_({range:e,from:null,to:null}),setService:e=>_({service:e}),setEnv:e=>_({env:e,...i&&e&&!f?.environments?.find(t=>t.id===e)?.services.includes(i)?{service:null}:{}}),setLive:d,setCustom:(e,t)=>_({from:String(Math.round(e)),to:String(Math.round(t))}),refresh:()=>l(e=>e+1),reloadMeta:()=>{N(`/api/meta`).then(p).catch(()=>{})},q:(e={})=>{let t=new URLSearchParams({from:String(h),to:String(g)});i&&t.set(`service`,i),a&&t.set(`env`,a);for(let[n,r]of Object.entries(e))r!=null&&r!==``&&t.set(n,String(r));return`?${t}`}};return(0,F.jsx)(Xn.Provider,{value:y,children:e})}var I=()=>(0,v.useContext)(Xn);function L(){let[e]=zn();return t=>{let n=new URLSearchParams(t.split(`?`)[1]||``),r=new URLSearchParams;for(let t of[`project`,`range`,`service`,`env`,`from`,`to`]){let i=e.get(t);i&&!n.has(t)&&r.set(t,i)}let i=r.toString();return i?t.includes(`?`)?`${t}&${i}`:`${t}?${i}`:t}}var Qn=`obz.mode`,$n=()=>{let e=new URLSearchParams(window.location.search).get(`mode`);if(e===`simple`||e===`advanced`){try{localStorage.setItem(Qn,e)}catch{}return e}try{let e=localStorage.getItem(Qn);return e===`simple`||e===`advanced`?e:null}catch{return null}},er=(0,v.createContext)({mode:`advanced`,setMode:()=>{}});function tr({children:e}){let t=I(),[n,r]=(0,v.useState)($n),i=n??t.meta?.defaultMode??(t.meta?`simple`:null);return(0,v.useEffect)(()=>{i&&(document.documentElement.dataset.mode=i)},[i]),(0,F.jsx)(er.Provider,{value:{mode:i,setMode:e=>{r(e);try{localStorage.setItem(Qn,e)}catch{}}},children:e})}var nr=()=>(0,v.useContext)(er);function rr(){let{setMode:e}=nr(),t=ht(),n=L();return r=>{e(`advanced`),t(n(r))}}function ir(e){window.dispatchEvent(new CustomEvent(`obz:ask`,{detail:{question:e}}))}var ar=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),or=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),sr={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},cr=(0,v.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,v.createElement)(`svg`,{ref:c,...sr,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:or(`lucide`,i),...s},[...o.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(a)?a:[a]])),R=(e,t)=>{let n=(0,v.forwardRef)(({className:n,...r},i)=>(0,v.createElement)(cr,{ref:i,iconNode:t,className:or(`lucide-${ar(e)}`,n),...r}));return n.displayName=`${e}`,n},lr=R(`Activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),ur=R(`ArrowDown`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),dr=R(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),fr=R(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),pr=R(`ArrowUp`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),mr=R(`BellRing`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]),hr=R(`Bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),gr=R(`Bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),_r=R(`Box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),vr=R(`Boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),yr=R(`Braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),br=R(`Bug`,[[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M9 7.13v-1a3.003 3.003 0 1 1 6 0v1`,key:`d7y7pr`}],[`path`,{d:`M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6`,key:`xs1cw7`}],[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M6.53 9C4.6 8.8 3 7.1 3 5`,key:`32zzws`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`M3 21c0-2.1 1.7-3.9 3.8-4`,key:`4p0ekp`}],[`path`,{d:`M20.97 5c0 2.1-1.6 3.8-3.5 4`,key:`18gb23`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M17.2 17c2.1.1 3.8 1.9 3.8 4`,key:`k3fwyw`}]]),xr=R(`Building2`,[[`path`,{d:`M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z`,key:`1b4qmf`}],[`path`,{d:`M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2`,key:`i71pzd`}],[`path`,{d:`M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2`,key:`10jefs`}],[`path`,{d:`M10 6h4`,key:`1itunk`}],[`path`,{d:`M10 10h4`,key:`tcdvrf`}],[`path`,{d:`M10 14h4`,key:`kelpxr`}],[`path`,{d:`M10 18h4`,key:`1ulq68`}]]),Sr=R(`CalendarRange`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M17 14h-6`,key:`bkmgh3`}],[`path`,{d:`M13 18H7`,key:`bb0bb7`}],[`path`,{d:`M7 14h.01`,key:`1qa3f1`}],[`path`,{d:`M17 18h.01`,key:`1bdyru`}]]),Cr=R(`ChartColumn`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),wr=R(`ChartLine`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]]),Tr=R(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Er=R(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Dr=R(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Or=R(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),kr=R(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Ar=R(`ChevronsUpDown`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),jr=R(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Mr=R(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Nr=R(`CircleDot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),Pr=R(`ClipboardList`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),Fr=R(`ClipboardPlus`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M9 14h6`,key:`159ibu`}],[`path`,{d:`M12 17v-6`,key:`1y8rbf`}]]),Ir=R(`Clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),Lr=R(`CodeXml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Rr=R(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),zr=R(`Cpu`,[[`rect`,{width:`16`,height:`16`,x:`4`,y:`4`,rx:`2`,key:`14l7u7`}],[`rect`,{width:`6`,height:`6`,x:`9`,y:`9`,rx:`1`,key:`5aljv4`}],[`path`,{d:`M15 2v2`,key:`13l42r`}],[`path`,{d:`M15 20v2`,key:`15mkzm`}],[`path`,{d:`M2 15h2`,key:`1gxd5l`}],[`path`,{d:`M2 9h2`,key:`1bbxkp`}],[`path`,{d:`M20 15h2`,key:`19e6y8`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M9 2v2`,key:`165o2o`}],[`path`,{d:`M9 20v2`,key:`i2bqo8`}]]),Br=R(`Database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Vr=R(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Hr=R(`EyeOff`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ur=R(`FolderKanban`,[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]),Wr=R(`Gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Gr=R(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),Kr=R(`Globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),qr=R(`HeartPulse`,[[`path`,{d:`M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z`,key:`c3ymky`}],[`path`,{d:`M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27`,key:`1uw2ng`}]]),Jr=R(`History`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),Yr=R(`Inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),Xr=R(`Info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Zr=R(`KeyRound`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Qr=R(`Layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),$r=R(`LayoutDashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ei=R(`LayoutGrid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),ti=R(`LifeBuoy`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m4.93 4.93 4.24 4.24`,key:`1ymg45`}],[`path`,{d:`m14.83 9.17 4.24-4.24`,key:`1cb5xl`}],[`path`,{d:`m14.83 14.83 4.24 4.24`,key:`q42g0n`}],[`path`,{d:`m9.17 14.83-4.24 4.24`,key:`bqpfvv`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}]]),ni=R(`Link2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),ri=R(`ListTodo`,[[`rect`,{x:`3`,y:`5`,width:`6`,height:`6`,rx:`1`,key:`1defrl`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),ii=R(`List`,[[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 18h.01`,key:`1tta3j`}],[`path`,{d:`M3 6h.01`,key:`1rqtza`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 18h13`,key:`1lx6n3`}],[`path`,{d:`M8 6h13`,key:`ik3vkj`}]]),ai=R(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),oi=R(`Lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),si=R(`Mail`,[[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}],[`path`,{d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`,key:`1ocrg3`}]]),ci=R(`Megaphone`,[[`path`,{d:`m3 11 18-5v12L3 14v-3z`,key:`n962bs`}],[`path`,{d:`M11.6 16.8a3 3 0 1 1-5.8-1.6`,key:`1yl0tm`}]]),li=R(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),ui=R(`MonitorSmartphone`,[[`path`,{d:`M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8`,key:`10dyio`}],[`path`,{d:`M10 19v-3.96 3.15`,key:`1irgej`}],[`path`,{d:`M7 19h5`,key:`qswx4l`}],[`rect`,{width:`6`,height:`10`,x:`16`,y:`12`,rx:`2`,key:`1egngj`}]]),di=R(`Moon`,[[`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,key:`a7tn18`}]]),fi=R(`Network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),pi=R(`OctagonAlert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),mi=R(`Pause`,[[`rect`,{x:`14`,y:`4`,width:`4`,height:`16`,rx:`1`,key:`zuxfzm`}],[`rect`,{x:`6`,y:`4`,width:`4`,height:`16`,rx:`1`,key:`1okwgv`}]]),hi=R(`Pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),gi=R(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),_i=R(`PlugZap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),vi=R(`Plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M9 8V2`,key:`14iosj`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`,key:`osxo6l`}]]),yi=R(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),bi=R(`PowerOff`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),xi=R(`Radio`,[[`path`,{d:`M4.9 19.1C1 15.2 1 8.8 4.9 4.9`,key:`1vaf9d`}],[`path`,{d:`M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5`,key:`u1ii0m`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5`,key:`1j5fej`}],[`path`,{d:`M19.1 4.9C23 8.8 23 15.1 19.1 19`,key:`10b0cb`}]]),Si=R(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Ci=R(`Rocket`,[[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z`,key:`m3kijz`}],[`path`,{d:`m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z`,key:`1fmvmk`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0`,key:`1f8sc4`}],[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}]]),wi=R(`RotateCcw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Ti=R(`RotateCw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Ei=R(`Route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),Di=R(`ScrollText`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),Oi=R(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),ki=R(`Send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Ai=R(`Server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),ji=R(`Settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Mi=R(`ShieldAlert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Ni=R(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Pi=R(`Slack`,[[`rect`,{width:`3`,height:`8`,x:`13`,y:`2`,rx:`1.5`,key:`diqz80`}],[`path`,{d:`M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5`,key:`183iwg`}],[`rect`,{width:`3`,height:`8`,x:`8`,y:`14`,rx:`1.5`,key:`hqg7r1`}],[`path`,{d:`M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5`,key:`76g71w`}],[`rect`,{width:`8`,height:`3`,x:`14`,y:`13`,rx:`1.5`,key:`1kmz0a`}],[`path`,{d:`M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5`,key:`jc4sz0`}],[`rect`,{width:`8`,height:`3`,x:`2`,y:`8`,rx:`1.5`,key:`1omvl4`}],[`path`,{d:`M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5`,key:`16f3cl`}]]),Fi=R(`SlidersHorizontal`,[[`line`,{x1:`21`,x2:`14`,y1:`4`,y2:`4`,key:`obuewd`}],[`line`,{x1:`10`,x2:`3`,y1:`4`,y2:`4`,key:`1q6298`}],[`line`,{x1:`21`,x2:`12`,y1:`12`,y2:`12`,key:`1iu8h1`}],[`line`,{x1:`8`,x2:`3`,y1:`12`,y2:`12`,key:`ntss68`}],[`line`,{x1:`21`,x2:`16`,y1:`20`,y2:`20`,key:`14d8ph`}],[`line`,{x1:`12`,x2:`3`,y1:`20`,y2:`20`,key:`m0wm8r`}],[`line`,{x1:`14`,x2:`14`,y1:`2`,y2:`6`,key:`14e1ph`}],[`line`,{x1:`8`,x2:`8`,y1:`10`,y2:`14`,key:`1i6ji0`}],[`line`,{x1:`16`,x2:`16`,y1:`18`,y2:`22`,key:`1lctlv`}]]),Ii=R(`Smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),Li=R(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),Ri=R(`Square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),zi=R(`Target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Bi=R(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),Vi=R(`TrendingDown`,[[`polyline`,{points:`22 17 13.5 8.5 8.5 13.5 2 7`,key:`1r2t7k`}],[`polyline`,{points:`16 17 22 17 22 11`,key:`11uiuu`}]]),Hi=R(`TrendingUp`,[[`polyline`,{points:`22 7 13.5 15.5 8.5 10.5 2 17`,key:`126l90`}],[`polyline`,{points:`16 7 22 7 22 13`,key:`kwv8wd`}]]),Ui=R(`TriangleAlert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Wi=R(`Unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),Gi=R(`Users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`,key:`1da9ce`}]]),Ki=R(`WandSparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),qi=R(`Workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Ji=R(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Yi=R(`Zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),Xi={logs:{label:`Logs`,from:`Pro`,what:`Every log line your apps write, searchable and linked to the request that wrote it.`},alerts:{label:`Alerts`,from:`Pro`,what:`Rules that watch error rates, latency, silence and more, and tell you by email, Slack or webhook.`},slos:{label:`SLOs`,from:`Scale`,what:`Service level objectives with error budgets and burn-rate alerts.`}};function Zi(e){if(e==null)return`—`;let t=(e,t)=>`${+e.toFixed(e<10&&e%1||e<100&&e%1?1:0)}${t}`;return e>=1e9?t(e/1e9,`B`):e>=1e6?t(e/1e6,`M`):e>=1e3?t(e/1e3,`k`):String(Math.round(e))}var Qi=e=>e==null?`—`:e>0&&e<1?`<1%`:`${Math.floor(e)}%`;function $i({feature:e,children:t}){let{meta:n}=I(),r=L();if(!n?.usage||n.usage.features[e])return(0,F.jsx)(F.Fragment,{children:t});let i=Xi[e];return(0,F.jsxs)(`div`,{className:`max-w-[560px] mx-auto mt-16 card p-7 flex flex-col items-center text-center gap-3`,children:[(0,F.jsx)(`span`,{className:`w-11 h-11 rounded-xl grid place-items-center bg-[#1d1d27]`,children:(0,F.jsx)(oi,{size:20,className:`text-mute`})}),(0,F.jsxs)(`h1`,{className:`text-[19px] font-semibold tracking-tight`,children:[i.label,` aren't in the `,n.usage.name,` plan`]}),(0,F.jsxs)(`p`,{className:`text-ink2 text-[13.5px] leading-relaxed`,children:[i.what,` They come with `,(0,F.jsx)(`b`,{className:`text-ink`,children:i.from}),` and up.`]}),(0,F.jsxs)(Nn,{to:r(`/usage`),className:`btn btn-primary h-9 mt-1`,children:[`See plans `,(0,F.jsx)(fr,{size:14})]})]})}var ea={unlimited:{label:`No limit`,tone:`neutral`},ok:{label:`Within allowance`,tone:`good`},paced:{label:`Paced today`,tone:`warn`},reduced:{label:`Reduced detail`,tone:`serious`},refused:{label:`Refusing new data`,tone:`crit`},overage:{label:`In overage`,tone:`warn`},paused:{label:`Overage paused`,tone:`serious`}};function ta(){let{meta:e}=I(),t=L(),n=e?.usage;if(!n||![`paced`,`reduced`,`refused`,`paused`].includes(n.state))return null;let r=n.state===`refused`;return(0,F.jsxs)(Nn,{to:t(`/usage`),className:`flex items-center gap-2 px-5 h-9 text-[12.5px] border-b border-line ${r?`bg-[rgba(208,59,59,.14)]`:`bg-[rgba(250,178,25,.09)]`} hover:brightness-125`,children:[(0,F.jsx)(Ui,{size:14,style:{color:r?`#f07070`:`#fab219`}}),(0,F.jsx)(`b`,{className:`font-medium`,children:ea[n.state].label}),(0,F.jsx)(`span`,{className:`text-ink2 truncate`,children:n.reason}),(0,F.jsxs)(`span`,{className:`ml-auto flex items-center gap-1 text-ink2 shrink-0`,children:[(0,F.jsx)(Wr,{size:13}),`Usage`]})]})}function na({used:e,included:t,thresholds:n=[],height:r=10}){if(!t)return null;let i=e/t*100,a=Math.max(100,Math.ceil(i/50)*50),o=i>=100?`#ec835a`:i>=80?`#fab219`:`#3ccf7a`;return(0,F.jsxs)(`div`,{className:`relative w-full rounded-full bg-[#1d1d27]`,style:{height:r},role:`meter`,"aria-valuenow":Math.round(i),"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Events used this month`,children:[(0,F.jsx)(`div`,{className:`absolute inset-y-0 left-0 rounded-full`,style:{width:`${Math.min(100,i/a*100)}%`,background:o}}),a>100&&(0,F.jsx)(`div`,{className:`absolute -inset-y-1 w-[2px] bg-ink`,style:{left:`${100/a*100}%`},title:`Allowance`}),n.filter(e=>e<=a).map(e=>(0,F.jsx)(`div`,{className:`absolute -bottom-1 w-[2px] h-[4px] bg-mute`,style:{left:`calc(${e/a*100}% - 1px)`},title:`Notify at ${e}%`},e))]})}function ra(e,t){let n=[],r=/(`[^`]+`)|(\*\*[^*]+\*\*)|(\*[^*\s][^*]*\*)|(\[[^\]]+\]\([^)\s]+\))/g,i=0,a,o=0;for(;a=r.exec(e);){a.index>i&&n.push(e.slice(i,a.index));let r=a[0],s=`${t}-${o++}`;if(a[1])n.push((0,F.jsx)(`code`,{className:`mono text-[12px] px-1 py-px rounded bg-[#1d1d27] text-ink`,children:r.slice(1,-1)},s));else if(a[2])n.push((0,F.jsx)(`strong`,{className:`font-semibold text-ink`,children:ra(r.slice(2,-2),s)},s));else if(a[3])n.push((0,F.jsx)(`em`,{children:r.slice(1,-1)},s));else{let e=/^\[([^\]]+)\]\(([^)\s]+)\)$/.exec(r),t=e[2],i=/^(https?:\/\/|\/(?!\/))/.test(t);n.push(i?(0,F.jsx)(`a`,{className:`link`,href:t,target:t.startsWith(`/`)?void 0:`_blank`,rel:`noreferrer`,children:e[1]},s):e[1])}i=a.index+r.length}return i<e.length&&n.push(e.slice(i)),n}function ia({text:e}){let t=e.replace(/\r/g,``).split(`
12
+ `),n=[],r=0,i=0;for(;r<t.length;){let e=t[r],a=`b${i++}`;if(/^```/.test(e)){let e=[];for(r++;r<t.length&&!/^```/.test(t[r]);)e.push(t[r++]);r++,n.push((0,F.jsx)(`pre`,{className:`code !my-0 whitespace-pre-wrap`,dir:`ltr`,children:e.join(`
13
+ `)},a));continue}let o=/^(#{1,4})\s+(.*)$/.exec(e);if(o){n.push((0,F.jsx)(`div`,{className:`font-semibold text-ink text-[13.5px] mt-1`,children:ra(o[2],a)},a)),r++;continue}if(/^\s*([-*]|\d+[.)])\s+/.test(e)){let i=/^\s*\d/.test(e),o=[];for(;r<t.length&&/^\s*([-*]|\d+[.)])\s+/.test(t[r]);)o.push(t[r++].replace(/^\s*([-*]|\d+[.)])\s+/,``));let s=i?`ol`:`ul`;n.push((0,F.jsx)(s,{className:`${i?`list-decimal`:`list-disc`} ps-5 flex flex-col gap-1`,children:o.map((e,t)=>(0,F.jsx)(`li`,{children:ra(e,`${a}-${t}`)},t))},a));continue}if(!e.trim()){r++;continue}let s=[];for(;r<t.length&&t[r].trim()&&!/^(```|#{1,4}\s|\s*([-*]|\d+[.)])\s+)/.test(t[r]);)s.push(t[r++]);n.push((0,F.jsx)(`p`,{children:s.map((e,t)=>(0,F.jsxs)(v.Fragment,{children:[t>0&&(0,F.jsx)(`br`,{}),ra(e,`${a}-${t}`)]},t))},a))}return(0,F.jsx)(`div`,{className:`flex flex-col gap-2 leading-relaxed`,dir:`auto`,children:n})}var aa=[`What changed since yesterday?`,`Why is the API slower this week?`,`Which endpoint spends the most time in the database?`,`Are Redis timeouts related to checkout errors?`,`Which release was the most stable this month?`,`Find problems I haven't noticed yet`],oa=[`Is my app healthy right now?`,`What broke today?`,`What changed since yesterday?`,`What should I fix first?`,`Is my latest deploy OK?`,`Which page is the slowest for my users?`],sa={list_services:`Listed applications`,get_overview:`Read the overview`,list_operations:`Ranked operations`,get_operation:`Opened an operation`,list_slow_executions:`Found the slowest executions`,list_failed_executions:`Found failed executions`,get_execution:`Opened an execution`,get_trace:`Opened a trace`,get_agent_prompt:`Built an investigation brief`,list_error_groups:`Listed error groups`,get_error_details:`Opened an error group`,get_error_trend:`Checked an error trend`,search_logs:`Searched logs`,list_functions:`Read the Services view`,list_queries:`Ranked database queries`,get_runtime:`Read runtime metrics`,list_releases:`Listed releases`,get_release_verdict:`Compared a release`,list_alerts:`Read alerts`,list_issues:`Read issues`,verify_fix:`Checked a fix`,list_slos:`Read SLOs`,get_status_pages:`Read status pages`,get_service_map:`Read the service map`,get_health:`Checked overall health`,get_baseline:`Checked what is normal`,list_secret_leaks:`Checked for leaked secrets`,get_history:`Read long-term history`},ca=e=>e>=43200?`Last ${Math.round(e/1440)} days`:e>=1440?e===1440?`Last 24 hours`:`Last ${Math.round(e/1440)} days`:e>=60?`Last ${Math.round(e/60)} hour${e>=120?`s`:``}`:`Last ${e} min`,la=e=>Object.entries(e).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>`${e}: ${typeof t==`string`?t:JSON.stringify(t)}`).join(` · `),ua=()=>`obz.ask.${qn()}`,da=()=>{try{return JSON.parse(sessionStorage.getItem(ua())||`[]`).map(e=>({...e,running:!1}))}catch{return[]}},fa=e=>{try{sessionStorage.setItem(ua(),JSON.stringify(e.slice(-20)))}catch{}};function pa({open:e,onClose:t,pending:n,onPending:r,simple:i}){let a=P(e?`/api/settings/ai`:null,[e]),[o,s]=(0,v.useState)(da),c=I(),[l,u]=(0,v.useState)(``),d=(0,v.useRef)(null),f=(0,v.useRef)(null),p=(0,v.useRef)(null),m=o.some(e=>e.running);(0,v.useEffect)(()=>{fa(o)},[o]),(0,v.useEffect)(()=>{e&&setTimeout(()=>p.current?.focus(),50)},[e]),(0,v.useEffect)(()=>{f.current?.scrollTo({top:f.current.scrollHeight,behavior:`smooth`})},[o]),(0,v.useEffect)(()=>{e&&n&&a.data&&!m&&(a.data.configured&&g(n),r?.())},[e,n,a.data,m]);let h=e=>s(t=>t.map((n,r)=>r===t.length-1?e(n):n));async function g(e){let t=e.trim();if(!t||m)return;u(``);let n=o.filter(e=>e.answer).slice(-4).flatMap(e=>[{role:`user`,text:e.question},{role:`assistant`,text:e.answer.summary}]);s(e=>[...e,{question:t,steps:[],notes:[],running:!0,started:Date.now()}]);let r=new AbortController;d.current=r;try{let e=await fetch(`/api/ai/ask`,{method:`POST`,credentials:`same-origin`,signal:r.signal,headers:{"content-type":`application/json`,"x-obzerver-project":qn()},body:JSON.stringify({question:t,history:n,mode:i?`simple`:`advanced`})});if(!e.ok||!e.body){let t=e.statusText;try{t=(await e.json()).error||t}catch{}throw Error(t)}let a=e.body.getReader(),o=new TextDecoder,s=``;for(;;){let{value:e,done:t}=await a.read();if(t)break;s+=o.decode(e,{stream:!0});let n;for(;(n=s.indexOf(`
14
+
15
+ `))>=0;){let e=s.slice(0,n);if(s=s.slice(n+2),!e.startsWith(`data: `))continue;let t=JSON.parse(e.slice(6));t.type===`step`?h(e=>({...e,steps:[...e.steps,{id:t.id,tool:t.tool,input:t.input}]})):t.type===`step_done`?h(e=>({...e,steps:e.steps.map(e=>e.id===t.id?{...e,done:{ok:t.ok,summary:t.summary,ms:t.ms}}:e)})):t.type===`note`?h(e=>({...e,notes:[...e.notes,t.text]})):t.type===`answer`?h(e=>({...e,answer:t.answer})):t.type===`error`?h(e=>({...e,error:t.message})):t.type===`usage`&&h(e=>({...e,usage:{tokens:t.tokens,steps:t.steps,capped:t.capped,cost:t.cost??null}}))}}}catch(e){r.signal.aborted?h(e=>({...e,error:e.answer?void 0:`Stopped.`})):h(t=>({...t,error:e.message}))}finally{h(e=>({...e,running:!1,ended:Date.now()})),d.current=null,c.reloadMeta()}}if(!e)return null;let _=a.data?.configured,y=c.meta?.aiBlocked??null;return(0,F.jsxs)(`aside`,{className:`fixed top-0 right-0 bottom-0 w-[480px] max-w-[100vw] z-40 flex flex-col bg-[#0f0f15] border-l border-line2 shadow-2xl`,"aria-label":`Ask Obzeri`,children:[(0,F.jsxs)(`div`,{className:`h-[52px] shrink-0 flex items-center gap-2 px-4 border-b border-line`,children:[(0,F.jsx)(Li,{size:16,className:`text-brand`}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,F.jsx)(`div`,{className:`font-semibold text-[14px] leading-tight`,children:`Ask Obzeri`}),(0,F.jsx)(`div`,{className:`text-[11px] text-mute truncate`,children:_?`Answers from this project's telemetry · ${a.data?.model}`:`Not set up`})]}),o.length>0&&(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`New chat`,onClick:()=>{d.current?.abort(),s([])},children:(0,F.jsx)(yi,{size:14})}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Close (Esc)`,onClick:t,children:(0,F.jsx)(Ji,{size:15})})]}),(0,F.jsxs)(`div`,{ref:f,className:`flex-1 overflow-y-auto px-4 py-4 flex flex-col gap-5`,children:[a.data&&!_&&(0,F.jsx)(ma,{onClose:t}),_&&o.length===0&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 mt-2`,children:[(0,F.jsx)(`div`,{className:`text-ink2 text-[13px] leading-relaxed`,children:i?`Ask anything about your app, in your own words and any language. Obzeri reads your app's data to answer, and shows where every answer comes from.`:`Ask about your apps in plain language, in any language. Obzeri answers only by reading this project's data with the same tools as the MCP server, and shows where every answer comes from.`}),(0,F.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:(i?oa:aa).map(e=>(0,F.jsxs)(`button`,{className:`text-left rounded-lg border border-line hover:border-line2 hover:bg-panel2 px-3 py-2 text-[12.8px] text-ink2 hover:text-ink flex items-center gap-2`,onClick:()=>g(e),children:[(0,F.jsx)(Li,{size:12,className:`text-mute shrink-0`}),e]},e))})]}),o.map((e,t)=>(0,F.jsx)(ha,{turn:e,onAsk:g,last:t===o.length-1},t))]}),_&&(0,F.jsxs)(`div`,{className:`shrink-0 border-t border-line p-3`,children:[y&&(0,F.jsx)(`div`,{className:`mb-2 rounded-lg border border-[#5a4320] bg-[#1d1810] px-3 py-2 text-[12px] text-[#f5c04e]`,children:y}),(0,F.jsxs)(`form`,{className:`relative`,onSubmit:e=>{e.preventDefault(),g(l)},children:[(0,F.jsx)(`textarea`,{ref:p,dir:`auto`,rows:Math.min(6,Math.max(2,l.split(`
16
+ `).length)),className:`input w-full resize-none !h-auto py-2 pe-11 leading-snug`,placeholder:y?`Paused: budget used`:`Ask about errors, latency, releases, jobs…`,disabled:!!y,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),g(l))}}),m?(0,F.jsx)(`button`,{type:`button`,className:`absolute right-2 bottom-2 btn h-7 w-7 !p-0 justify-center`,title:`Stop`,onClick:()=>d.current?.abort(),children:(0,F.jsx)(Ri,{size:12,fill:`currentColor`})}):(0,F.jsx)(`button`,{className:`absolute right-2 bottom-2 btn btn-primary h-7 w-7 !p-0 justify-center`,title:`Send (Enter)`,disabled:!l.trim(),children:(0,F.jsx)(pr,{size:14})})]}),(0,F.jsxs)(`div`,{className:`text-[10.5px] text-mute mt-1.5 leading-snug`,children:[`Your question and the data the tools return are sent to `,a.data?.provider===`openai`?`your OpenAI-compatible endpoint`:`Anthropic`,`. Enter to send, Shift+Enter for a new line.`]})]})]})}function ma({onClose:e}){let t=ht(),n=L();return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 mt-2 text-[13px]`,children:[(0,F.jsx)(`div`,{className:`text-ink2 leading-relaxed`,children:`Ask Obzeri needs a language model. Connect Anthropic (Claude) or any OpenAI-compatible endpoint, including a local model through Ollama, and it will answer questions from this project's telemetry.`}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>{e(),t(n(`/integrations/ai`))},children:[`Set up Ask Obzeri`,(0,F.jsx)(Or,{size:13})]})})]})}function ha({turn:e,onAsk:t,last:n}){let[r,i]=(0,v.useState)(!1),a=((e.ended??Date.now())-e.started)/1e3,o=r||e.running&&!e.answer;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,F.jsx)(`div`,{className:`self-end max-w-[88%] rounded-xl rounded-br-sm bg-[#22222e] px-3 py-2 text-[13px] whitespace-pre-wrap`,dir:`auto`,children:e.question}),(e.steps.length>0||e.running)&&(0,F.jsxs)(`div`,{className:`rounded-lg border border-line bg-[#121219]`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-center gap-2 px-3 py-2 text-[12px] text-ink2 hover:text-ink`,onClick:()=>i(e=>!e),children:[e.running&&!e.answer?(0,F.jsx)(`span`,{className:`w-3 h-3 rounded-full border-2 border-brand border-t-transparent animate-spin`}):(0,F.jsx)(Tr,{size:13,className:`text-[#5fd38a]`}),(0,F.jsx)(`span`,{className:`flex-1 text-left`,children:e.running&&!e.answer?e.steps.length?(sa[e.steps.at(-1).tool]||e.steps.at(-1).tool)+`…`:`Thinking…`:`Read ${e.steps.length} source${e.steps.length===1?``:`s`} · ${a.toFixed(1)}s${e.usage?` · ${ga(e.usage)}`:``}`}),(0,F.jsx)(Or,{size:13,className:`transition-transform ${o?`rotate-90`:``}`})]}),o&&(0,F.jsxs)(`div`,{className:`px-3 pb-2.5 flex flex-col gap-1.5 border-t border-line pt-2`,children:[e.notes.map((e,t)=>(0,F.jsx)(`div`,{className:`text-[12px] text-mute italic`,dir:`auto`,children:e},`n${t}`)),e.steps.map(e=>(0,F.jsxs)(`div`,{className:`flex items-start gap-2 text-[12px]`,children:[(0,F.jsx)(`span`,{className:`mt-[3px] shrink-0`,children:e.done?e.done.ok?(0,F.jsx)(Tr,{size:11,className:`text-[#5fd38a]`}):(0,F.jsx)(Ui,{size:11,className:`text-[#ffb547]`}):(0,F.jsx)(`span`,{className:`block w-2.5 h-2.5 rounded-full border-2 border-mute border-t-transparent animate-spin`})}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`text-ink2`,children:[sa[e.tool]||e.tool,` `,(0,F.jsx)(`span`,{className:`mono text-mute text-[11px]`,children:e.tool})]}),la(e.input)&&(0,F.jsx)(`div`,{className:`mono text-[11px] text-mute break-all`,children:la(e.input)})]}),e.done&&(0,F.jsxs)(`span`,{className:`text-mute text-[11px] shrink-0`,children:[e.done.summary,` · `,e.done.ms,`ms`]})]},e.id))]})]}),e.answer&&(0,F.jsx)(xa,{a:e.answer,onAsk:t,showFollowUps:n&&!e.running}),e.error&&!e.answer&&(0,F.jsx)(`div`,{className:`rounded-lg border border-[#5a2a2a] bg-[#1d1214] px-3 py-2 text-[12.5px] text-[#ff9c9c]`,dir:`auto`,children:e.error})]})}function ga(e){return`${Zi(e.tokens.input+e.tokens.output)} tokens${e.cost==null?``:` · $${e.cost<.01?e.cost.toFixed(4):e.cost.toFixed(2)}`}${e.capped?` · stopped at the limit`:``}`}var _a={high:{label:`High confidence`,color:`#5fd38a`},medium:{label:`Medium confidence`,color:`#ffb547`},low:{label:`Low confidence`,color:`#ff8a8a`}},va={execution:lr,trace:Gr,error:br,operation:lr,release:Ci,issue:ri};function ya(e){let t=encodeURIComponent;switch(e.kind){case`execution`:return`/executions/${t(e.ref)}`;case`trace`:return`/traces/${t(e.ref)}`;case`error`:return`/errors/${t(e.ref)}`;case`operation`:return`/operations/${e.opKind||`http`}/${t(e.service||``)}/${t(e.ref)}`;case`release`:return`/releases?service=${t(e.service||``)}&version=${t(e.ref)}`;case`issue`:return`/issues/${t(e.ref)}`}}function ba({title:e,icon:t,children:n}){return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[10.5px] uppercase tracking-wider text-mute font-medium`,children:[t,e]}),n]})}function xa({a:e,onAsk:t,showFollowUps:n}){let r=ht(),i=L(),a=_a[e.confidence];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(`div`,{className:`text-[13.3px] text-ink`,children:(0,F.jsx)(ia,{text:e.summary})}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,F.jsxs)(`span`,{className:`pill !text-[11px] inline-flex items-center gap-1.5`,title:e.confidenceReason,style:{borderColor:`${a.color}55`,color:a.color},children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full`,style:{background:a.color}}),a.label]}),e.timeRange&&(0,F.jsxs)(`span`,{className:`pill !text-[11px] inline-flex items-center gap-1`,title:`${new Date(e.timeRange.from).toLocaleString()} → ${new Date(e.timeRange.to).toLocaleString()}`,children:[(0,F.jsx)(Ir,{size:11}),ca(e.timeRange.minutes)]})]}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute -mt-1.5`,dir:`auto`,children:e.confidenceReason}),e.evidence.length>0&&(0,F.jsx)(ba,{title:`Evidence`,icon:(0,F.jsx)(Ni,{size:11}),children:(0,F.jsx)(`div`,{className:`rounded-lg border border-line divide-y divide-[#22222c]`,children:e.evidence.map((e,t)=>(0,F.jsxs)(`div`,{className:`px-3 py-1.5 flex items-baseline gap-3 text-[12.3px]`,children:[(0,F.jsx)(`span`,{className:`flex-1 text-ink2`,dir:`auto`,children:e.claim}),(0,F.jsx)(`span`,{className:`mono text-ink text-[12px] text-right`,dir:`auto`,children:e.value})]},t))})}),e.links.length>0&&(0,F.jsx)(ba,{title:`Open in Obzerver`,icon:(0,F.jsx)(ni,{size:11}),children:(0,F.jsx)(`div`,{className:`flex flex-col gap-1`,children:e.links.map((e,t)=>{let n=va[e.kind];return(0,F.jsxs)(`button`,{onClick:()=>r(i(ya(e))),className:`flex items-center gap-2 rounded-md border border-line hover:border-line2 hover:bg-panel2 px-2.5 py-1.5 text-left text-[12.3px]`,children:[(0,F.jsx)(n,{size:13,className:`text-mute shrink-0`}),(0,F.jsx)(`span`,{className:`text-mute text-[11px] w-[62px] shrink-0`,children:e.kind}),(0,F.jsx)(`span`,{className:`flex-1 truncate`,dir:`auto`,children:e.label}),(0,F.jsx)(Or,{size:12,className:`text-mute`})]},t)})})}),(0,F.jsx)(ba,{title:`Data sources`,icon:(0,F.jsx)(lr,{size:11}),children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.sources.length?e.sources.map(e=>(0,F.jsxs)(`span`,{className:`pill mono !text-[10.5px]`,title:sa[e.tool],children:[e.tool,e.calls>1?` ×${e.calls}`:``]},e.tool)):(0,F.jsx)(`span`,{className:`text-mute text-[12px]`,children:`none: this answer did not read any data`})})}),e.checks.length>0&&(0,F.jsxs)(`div`,{className:`text-[11.5px] text-[#ffb547] flex items-start gap-1.5`,children:[(0,F.jsx)(Ui,{size:12,className:`mt-0.5 shrink-0`}),(0,F.jsxs)(`span`,{children:[`Checked by Obzerver: `,e.checks.join(` `)]})]}),n&&e.followUps.length>0&&(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5 pt-1`,children:e.followUps.map(e=>(0,F.jsx)(`button`,{className:`rounded-full border border-line hover:border-line2 hover:bg-panel2 px-2.5 py-1 text-[12px] text-ink2 hover:text-ink`,dir:`auto`,onClick:()=>t(e),children:e},e))})]})}function Sa(e,t=`/`,n){let r=new URLSearchParams;e!=="default"&&r.set(`project`,e);let i=n?.get(`range`);i&&r.set(`range`,i);let a=r.toString();return a?`${t}?${a}`:t}function Ca(){let[e]=zn(),t=ht(),n=e.get(`project`)||`default`,{data:r}=P(`/api/projects`,[n]),[i,a]=(0,v.useState)(!1),o=(0,v.useRef)(null);(0,v.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&a(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let s=r?.find(e=>e.slug===n),c=e=>{a(!1),t(e)};return(0,F.jsxs)(`div`,{ref:o,className:`relative px-2 pt-2`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-center gap-2 h-[34px] px-2 rounded-md border border-line hover:border-line2 bg-[#121219] text-left`,onClick:()=>a(e=>!e),"aria-haspopup":`listbox`,"aria-expanded":i,children:[(0,F.jsx)(Ur,{size:14,className:`text-mute shrink-0`}),(0,F.jsxs)(`span`,{className:`flex-1 min-w-0`,children:[(0,F.jsx)(`span`,{className:`block text-[10px] uppercase tracking-wider text-mute leading-none mb-0.5`,children:`Project`}),(0,F.jsx)(`span`,{className:`block truncate text-[12.8px] leading-tight`,children:s?.name??(r?n:`…`)})]}),(0,F.jsx)(Ar,{size:13,className:`text-mute shrink-0`})]}),i&&(0,F.jsxs)(`div`,{className:`absolute left-2 right-2 top-[calc(100%+4px)] z-30 rounded-lg border border-line2 bg-[#15151d] shadow-xl py-1`,role:`listbox`,children:[r?.map(t=>(0,F.jsxs)(`button`,{role:`option`,"aria-selected":t.slug===n,onClick:()=>c(Sa(t.slug,`/`,e)),className:`w-full flex items-center gap-2 px-2.5 py-1.5 text-left hover:bg-[#1d1d27]`,children:[(0,F.jsx)(`span`,{className:`w-3.5 shrink-0`,children:t.slug===n&&(0,F.jsx)(Tr,{size:13,className:`text-brand`})}),(0,F.jsxs)(`span`,{className:`flex-1 min-w-0`,children:[(0,F.jsx)(`span`,{className:`block truncate text-[12.8px]`,children:t.name}),(0,F.jsxs)(`span`,{className:`block text-mute text-[11px]`,children:[t.apps,` app`,t.apps===1?``:`s`]})]})]},t.slug)),(0,F.jsx)(`div`,{className:`border-t border-line my-1`}),(0,F.jsxs)(`button`,{onClick:()=>c(`${Sa(n,`/projects`,e)}${n==="default"&&!e.get(`range`)?`?`:`&`}new=1`),className:`w-full flex items-center gap-2 px-2.5 py-1.5 text-left hover:bg-[#1d1d27] text-[12.8px]`,children:[(0,F.jsx)(yi,{size:13,className:`ml-0.5`}),`New project`]}),(0,F.jsxs)(`button`,{onClick:()=>c(Sa(n,`/projects`,e)),className:`w-full flex items-center gap-2 px-2.5 py-1.5 text-left hover:bg-[#1d1d27] text-[12.8px] text-ink2`,children:[(0,F.jsx)(`span`,{className:`w-3.5`}),`Manage projects`]})]})]})}function z(e,t){return e==null||!Number.isFinite(e)?`—`:e>=6e4?`${(e/6e4).toFixed(1)}m`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?1:2)}s`:e>=100?`${e.toFixed(t??0)}ms`:e>=10?`${e.toFixed(t??1)}ms`:`${e.toFixed(t??2)}ms`}function B(e){return e==null||!Number.isFinite(e)?`—`:Math.abs(e)>=1e6?`${(e/1e6).toFixed(1)}M`:Math.abs(e)>=1e4?`${(e/1e3).toFixed(1)}k`:Number.isInteger(e)?e.toLocaleString():e.toLocaleString(void 0,{maximumFractionDigits:2})}function wa(e,t=2){return e==null||!Number.isFinite(e)?`—`:e===0?`0%`:e<.01?`<0.01%`:`${e.toFixed(e>=10?1:t)}%`}function Ta(e){return e==null?`—`:e>=1073741824?`${(e/1073741824).toFixed(2)} GB`:e>=1048576?`${(e/1048576).toFixed(0)} MB`:`${(e/1024).toFixed(0)} KB`}function Ea(e){if(!e)return`—`;let t=Date.now()-e;return t<0?`just now`:t<6e4?`${Math.max(1,Math.round(t/1e3))}s ago`:t<36e5?`${Math.round(t/6e4)}m ago`:t<864e5?`${Math.round(t/36e5)}h ago`:`${Math.round(t/864e5)}d ago`}function Da(e){return new Date(e).toLocaleString(void 0,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,timeZoneName:`short`})}function Oa(e,t=!1){let n=new Date(e),r=n.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1});return t?`${n.toLocaleDateString([],{month:`short`,day:`numeric`})} ${r}`:r}function ka(e,t){let n=new Date(e);return t>1728e5?n.toLocaleDateString([],{month:`short`,day:`numeric`}):n.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hour12:!1})}function Aa(e,t){if(e==null||t==null||!Number.isFinite(e)||!Number.isFinite(t)||t===0)return null;let n=(e-t)/t*100;return Math.abs(n)<1?{text:`±0%`,dir:`flat`}:{text:`${n>0?`+`:``}${n.toFixed(0)}%`,dir:n>0?`up`:`down`}}var ja=encodeURIComponent,Ma=(e,t)=>`/tenants/${ja(e)}${t?`?guessed=1`:``}`,Na=864e5,Pa=e=>new Date(e-new Date(e).getTimezoneOffset()*6e4).toISOString().slice(0,16),Fa=e=>e?new Date(e).getTime():NaN,Ia=e=>{let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()};function La(){let e=I(),[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(``),l=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!t)return;i(Pa(e.from)),o(Pa(e.to)),c(``);let r=e=>{l.current&&!l.current.contains(e.target)&&n(!1)},a=e=>{e.key===`Escape`&&n(!1)};return window.addEventListener(`mousedown`,r),window.addEventListener(`keydown`,a),()=>{window.removeEventListener(`mousedown`,r),window.removeEventListener(`keydown`,a)}},[t]);let u=(t,r)=>{if(!Number.isFinite(t)||!Number.isFinite(r))return c(`Pick both dates`);if(r<=t)return c(`"To" must be after "From"`);e.setCustom(t,Math.min(r,Date.now())),n(!1)},d=Date.now(),f=Ia(d),p=[[`Today`,f,d],[`Yesterday`,f-Na,f],[`Same day last week`,f-7*Na,f-6*Na],[`Last 14 days`,d-14*Na,d],[`Last 30 days`,d-30*Na,d],[`Last 90 days`,d-90*Na,d]],m=e.range===`custom`;return(0,F.jsxs)(`div`,{className:`relative`,ref:l,children:[m?(0,F.jsxs)(`div`,{className:`flex items-center gap-1 pill !h-[30px] !px-2.5 !text-[12px] cursor-pointer`,style:{borderColor:`#5a2340`,color:`#ff9cc0`},onClick:()=>n(e=>!e),title:`Change the custom window`,children:[(0,F.jsx)(Sr,{size:12}),Oa(e.from,!0),` → `,Oa(e.to,!0),(0,F.jsx)(`button`,{className:`ml-1 hover:text-white`,onClick:t=>{t.stopPropagation(),e.setRange(`1h`)},title:`Back to live window`,children:(0,F.jsx)(Ji,{size:12})})]}):(0,F.jsx)(`button`,{className:`btn px-2`,onClick:()=>n(e=>!e),title:`Custom time window`,"aria-label":`Custom time window`,children:(0,F.jsx)(Sr,{size:13})}),t&&(0,F.jsxs)(`div`,{className:`absolute right-0 top-[36px] z-50 w-[340px] rounded-lg border border-line2 p-3 shadow-2xl flex flex-col gap-3`,style:{background:`rgba(20,20,27,.99)`},children:[(0,F.jsx)(`div`,{className:`text-[12px] font-medium`,children:`Custom window`}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 gap-1.5`,children:p.map(([e,t,n])=>(0,F.jsx)(`button`,{className:`btn h-7 justify-start text-[12px]`,onClick:()=>u(t,n),children:e},e))}),(0,F.jsxs)(`div`,{className:`grid grid-cols-[40px_1fr] items-center gap-x-2 gap-y-1.5 text-[12px]`,children:[(0,F.jsx)(`label`,{className:`text-mute`,htmlFor:`rp-from`,children:`From`}),(0,F.jsx)(`input`,{id:`rp-from`,className:`input h-8 mono text-[12px]`,type:`datetime-local`,value:r,max:Pa(d),onChange:e=>i(e.target.value)}),(0,F.jsx)(`label`,{className:`text-mute`,htmlFor:`rp-to`,children:`To`}),(0,F.jsx)(`input`,{id:`rp-to`,className:`input h-8 mono text-[12px]`,type:`datetime-local`,value:a,max:Pa(d),onChange:e=>o(e.target.value)})]}),s&&(0,F.jsx)(`div`,{className:`text-[12px]`,style:{color:`#ff8a8a`},children:s}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute text-[11px] leading-snug`,children:`Older than raw data, Requests, Jobs and the Overview use hourly summaries.`}),(0,F.jsx)(`button`,{className:`btn btn-primary h-7 shrink-0`,onClick:()=>u(Fa(r),Fa(a)),children:`Apply`})]})]})]})}function V({title:e,sub:t,right:n,children:r,className:i=``,pad:a=!0}){return(0,F.jsxs)(`section`,{className:`card ${i}`,children:[(e||n)&&(0,F.jsxs)(`div`,{className:`card-h`,children:[(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 min-w-0`,children:[(0,F.jsx)(`span`,{className:`truncate`,children:e}),t&&(0,F.jsx)(`span`,{className:`card-sub truncate`,children:t})]}),n]}),(0,F.jsx)(`div`,{className:a?`p-3.5`:``,children:r})]})}function Ra({title:e,sub:t,right:n,icon:r}){return(0,F.jsxs)(`div`,{className:`flex items-end justify-between gap-4 mb-4`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`h1`,{className:`text-[19px] font-semibold tracking-tight flex items-center gap-2 min-w-0`,children:[r,(0,F.jsx)(`span`,{className:`truncate`,children:e})]}),t&&(0,F.jsx)(`div`,{className:`text-ink2 mt-1 text-[12.5px]`,children:t})]}),n&&(0,F.jsx)(`div`,{className:`flex items-center gap-2 shrink-0`,children:n})]})}function H({label:e}){return(0,F.jsxs)(`div`,{className:`flex items-center justify-center gap-2 text-mute py-10`,children:[(0,F.jsx)(ai,{size:16,className:`animate-spin`}),e||`Loading…`]})}function U({title:e,children:t,icon:n}){return(0,F.jsxs)(`div`,{className:`flex flex-col items-center justify-center text-center py-10 px-6 gap-2`,children:[(0,F.jsx)(`div`,{className:`text-mute`,children:n||(0,F.jsx)(Yr,{size:22})}),(0,F.jsx)(`div`,{className:`font-medium`,children:e}),t&&(0,F.jsx)(`div`,{className:`text-mute max-w-md text-[12.5px]`,children:t})]})}var za=()=>window.dispatchEvent(new Event(`obz:refresh`));function W({error:e,onRetry:t}){return e?(0,F.jsxs)(`div`,{className:`card px-4 py-10 text-[12.5px] flex flex-col items-center justify-center gap-3 text-center`,role:`alert`,style:{borderColor:`#5a2328`,color:`#ff9b9b`},children:[(0,F.jsx)(Ui,{size:20}),(0,F.jsx)(`div`,{className:`max-w-[560px]`,children:e.message||`Something went wrong loading this.`}),(0,F.jsxs)(`button`,{type:`button`,className:`btn mt-1`,onClick:t??za,children:[(0,F.jsx)(Si,{size:13}),`Refresh stats`]})]}):null}function Ba({label:e,value:t,sub:n,deltaText:r,deltaDir:i,deltaTitle:a,badWhen:o=`up`,spark:s,color:c,onClick:l}){return(0,F.jsxs)(`div`,{className:`card px-3.5 py-3 flex flex-col gap-1 min-w-0 transition-colors ${l?`card-click`:``}`,onClick:l,role:l?`button`:void 0,tabIndex:l?0:void 0,onKeyDown:l?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l())}:void 0,children:[(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] font-medium flex items-center justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`truncate`,children:e}),r&&(0,F.jsxs)(`span`,{className:`flex items-center gap-0.5 text-[11px]`,title:a,style:{color:i===`flat`||o===`none`?`var(--color-mute)`:i&&i!==`flat`&&o!==`none`&&i===o?`#ff8a8a`:`#5fd38a`},children:[i===`up`?(0,F.jsx)(pr,{size:11}):i===`down`?(0,F.jsx)(ur,{size:11}):null,r]})]}),(0,F.jsxs)(`div`,{className:`flex items-end justify-between gap-2`,children:[(0,F.jsx)(`div`,{className:`text-[22px] font-semibold tracking-tight tabular-nums leading-none`,style:c?{color:c}:void 0,children:t}),s&&s.length>1&&(0,F.jsx)(Va,{data:s,color:c})]}),n&&(0,F.jsx)(`div`,{className:`text-mute text-[11px] truncate`,children:n})]})}function Va({data:e,color:t=`var(--color-s1)`,w:n=72,h:r=22}){let i=Math.max(1,...e),a=n/e.length;return(0,F.jsx)(`svg`,{width:n,height:r,className:`shrink-0`,"aria-hidden":!0,children:e.map((e,n)=>{let o=e?Math.max(1.5,e/i*r):0;return(0,F.jsx)(`rect`,{x:n*a+.5,y:r-o,width:Math.max(1,a-1),height:o,rx:1,fill:t,opacity:.85},n)})})}function Ha({status:e}){if(e==null)return(0,F.jsx)(`span`,{className:`text-mute`,children:`—`});let t=e>=500?`var(--color-crit)`:e>=400?`var(--color-warn)`:`var(--color-good)`;return(0,F.jsx)(`span`,{className:`mono text-[11.5px] px-1.5 py-[1px] rounded`,style:{color:t,background:`color-mix(in srgb, ${t} 14%, transparent)`},children:e})}function Ua({m:e}){if(!e)return null;let t=to;return(0,F.jsx)(`span`,{className:`mono text-[10.5px] font-semibold inline-block shrink-0 ${no.includes(e)?`min-w-[44px] pr-2`:`w-[44px]`}`,style:{color:t[e]||`var(--color-ink2)`},children:e})}function Wa({name:e,render:t}){let n=/^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|ALL|QUERY|MUTATION|SUBSCRIPTION)\s+(.*)$/.exec(e),r=t??(e=>e);return n?(0,F.jsxs)(`span`,{className:`inline-flex items-center min-w-0`,children:[(0,F.jsx)(Ua,{m:n[1]}),(0,F.jsx)(`span`,{className:`mono truncate`,children:r(n[2])})]}):(0,F.jsx)(`span`,{className:`mono`,children:r(e)})}function G({kind:e,children:t}){let[n,r]={good:[`var(--color-good)`,Mr],warn:[`var(--color-warn)`,jr],serious:[`var(--color-serious)`,jr],crit:[`var(--color-crit)`,jr],neutral:[`var(--color-mute)`,Nr]}[e];return(0,F.jsxs)(`span`,{className:`pill`,style:{color:n,borderColor:`color-mix(in srgb, ${n} 40%, transparent)`,background:`color-mix(in srgb, ${n} 10%, transparent)`},children:[(0,F.jsx)(r,{size:11}),t]})}function Ga({text:e,label:t=`Copy`,className:n=`btn`}){let[r,i]=(0,v.useState)(!1);return(0,F.jsxs)(`button`,{className:n,onClick:async()=>{let t=typeof e==`function`?await e():e;try{await navigator.clipboard.writeText(t)}catch{let e=document.createElement(`textarea`);e.value=t,document.body.appendChild(e),e.select(),document.execCommand(`copy`),e.remove()}i(!0),setTimeout(()=>i(!1),1400)},children:[r?(0,F.jsx)(Tr,{size:13}):(0,F.jsx)(Rr,{size:13}),r?`Copied`:t]})}function Ka({value:e,options:t,onChange:n}){return(0,F.jsx)(`div`,{className:`seg`,children:t.map(t=>(0,F.jsx)(`button`,{className:e===t.id?`on`:``,onClick:()=>n(t.id),children:t.label},t.id))})}function qa({rows:e,cols:t,onRow:n,initialSort:r,initialDir:i=`desc`,empty:a,maxHeight:o,rowKey:s,paged:c,resetKey:l,noun:u=`rows`}){let[d,f]=(0,v.useState)(r),[p,m]=(0,v.useState)(i),[h,g]=Ya(),[_,y]=(0,v.useState)(0),[b,x]=(0,v.useState)(l);b!==l&&(x(l),y(0));let S=(0,v.useRef)(null),C=(0,v.useRef)(null);(0,v.useLayoutEffect)(()=>{let t=S.current;if(!c||!t||t.style.tableLayout===`fixed`)return;let n=[...t.querySelectorAll(`thead th`)];t.querySelectorAll(`tbody tr:not(.filler)`).length>=Math.min(h,e.length)&&e.length>0&&n.length&&(C.current=n.map(e=>e.getBoundingClientRect().width))});let[w,T]=(0,v.useState)(41),E=e=>{if(e){let t=e.getBoundingClientRect().height;t>0&&Math.abs(t-w)>.5&&T(t)}},D=e=>{g(e),y(0)},O=(0,v.useMemo)(()=>{let n=t.find(e=>e.key===d);if(!n||!n.sort)return e;let r=n.sort;return[...e].sort((e,t)=>{let n=r(e),i=r(t),a=typeof n==`number`&&typeof i==`number`?n-i:String(n).localeCompare(String(i));return p===`asc`?a:-a})},[e,t,d,p]);if(!e.length&&a&&!c)return(0,F.jsx)(F.Fragment,{children:a});let k=c?Math.max(1,Math.ceil(O.length/h)):1,A=Math.min(_,k-1),j=c?O.slice(A*h,A*h+h):O,ee=c?k>1?h:Math.min(h,Ja.find(e=>e>=j.length)??h):0,te=Math.max(0,ee-j.length),ne=c&&te>0&&C.current&&C.current.length===t.length?C.current:null;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`overflow-auto`,style:o?{maxHeight:o}:void 0,children:(0,F.jsxs)(`table`,{className:`tbl`,ref:S,style:ne?{tableLayout:`fixed`,width:ne.reduce((e,t)=>e+t,0)}:void 0,children:[ne&&(0,F.jsx)(`colgroup`,{children:ne.map((e,t)=>(0,F.jsx)(`col`,{style:{width:e}},t))}),(0,F.jsx)(`thead`,{children:(0,F.jsx)(`tr`,{children:t.map(e=>(0,F.jsx)(`th`,{style:{width:e.width},className:`${e.num?`num`:``} ${e.sort?`cursor-pointer select-none hover:text-ink`:``}`,onClick:()=>{e.sort&&(y(0),d===e.key?m(p===`asc`?`desc`:`asc`):(f(e.key),m(`desc`)))},children:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[e.label,d===e.key&&(p===`asc`?(0,F.jsx)(kr,{size:11}):(0,F.jsx)(Er,{size:11}))]})},e.key))})}),(0,F.jsxs)(`tbody`,{children:[j.map((e,r)=>(0,F.jsx)(`tr`,{ref:r===0?E:void 0,className:n?`clickable`:``,onClick:n?()=>n(e):void 0,children:t.map(t=>(0,F.jsx)(`td`,{className:`${t.num?`num`:``} ${t.className||``}`,children:t.render(e)},t.key))},s?s(e,r):r)),te>0&&(0,F.jsx)(`tr`,{"aria-hidden":j.length>0,className:`filler`,children:(0,F.jsx)(`td`,{colSpan:t.length,style:{height:te*w,padding:0,borderBottom:`none`},children:!j.length&&(0,F.jsx)(`div`,{className:`h-full flex items-center justify-center`,children:a??(0,F.jsx)(U,{title:`No ${u}`})})})})]})]})}),c&&(0,F.jsx)(Xa,{total:O.length,page:A,size:h,onPage:y,onSize:D,noun:u})]})}var Ja=[10,20,50];function Ya(){let[e,t]=(0,v.useState)(()=>{try{let e=Number(localStorage.getItem(`obz.pageSize`));return Ja.includes(e)?e:20}catch{return 20}});return[e,e=>{t(e);try{localStorage.setItem(`obz.pageSize`,String(e))}catch{}}]}function Xa({total:e,page:t,size:n,onPage:r,onSize:i,noun:a=`rows`}){let o=Math.max(1,Math.ceil(e/n));return(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 pt-3 pb-1 text-[12px] text-mute`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{children:`Rows per page`}),(0,F.jsx)(`div`,{className:`seg`,role:`group`,"aria-label":`Rows per page`,children:Ja.map(e=>(0,F.jsx)(`button`,{type:`button`,className:e===n?`on`:``,"aria-pressed":e===n,onClick:()=>i(e),children:e},e))})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`span`,{className:`tabular-nums`,children:e?`${Za(t*n+1)}–${Za(Math.min(e,(t+1)*n))} of ${Za(e)}`:`0 ${a}`}),(0,F.jsx)(`button`,{type:`button`,className:`btn h-7`,disabled:t===0,onClick:()=>r(t-1),children:`Prev`}),(0,F.jsx)(`button`,{type:`button`,className:`btn h-7`,disabled:t>=o-1,onClick:()=>r(t+1),children:`Next`})]})]})}var Za=e=>e.toLocaleString(`en-US`);function Qa({value:e,max:t,color:n=`var(--color-s1)`,w:r=80}){return(0,F.jsx)(`span`,{className:`inline-block align-middle rounded-full overflow-hidden`,style:{width:r,height:5,background:`#22222c`},children:(0,F.jsx)(`span`,{className:`block h-full rounded-full`,style:{width:`${Math.min(100,e/Math.max(t,1e-9)*100)}%`,background:n}})})}function $a({items:e}){return(0,F.jsx)(`dl`,{className:`grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1.5 text-[12.5px]`,children:e.map(([e,t],n)=>(0,F.jsxs)(v.Fragment,{children:[(0,F.jsx)(`dt`,{className:`text-mute`,children:e}),(0,F.jsx)(`dd`,{className:`min-w-0 truncate`,children:t})]},n))})}function eo({open:e,onClose:t,title:n,children:r,wide:i}){return e?(0,F.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[8vh] px-4`,style:{background:`rgba(5,5,8,.7)`},onMouseDown:t,children:(0,F.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":typeof n==`string`?n:void 0,className:`card w-full ${i?`max-w-3xl`:`max-w-lg`} shadow-2xl`,onMouseDown:e=>e.stopPropagation(),children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-line`,children:[(0,F.jsx)(`div`,{className:`font-semibold`,children:n}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,onClick:t,children:`✕`})]}),(0,F.jsx)(`div`,{className:`p-4 max-h-[75vh] overflow-auto`,children:r})]})}):null}function K({label:e,children:t,hint:n}){return(0,F.jsxs)(`label`,{className:`flex flex-col gap-1 text-[12px]`,children:[(0,F.jsx)(`span`,{className:`text-ink2 font-medium`,children:e}),t,n&&(0,F.jsx)(`span`,{className:`text-mute text-[11px]`,children:n})]})}var to={GET:`#5aa2f0`,POST:`#3fbf8f`,PUT:`#e0a33a`,PATCH:`#c99af0`,DELETE:`#f07070`,QUERY:`#e86fc4`,MUTATION:`#f0a35a`,SUBSCRIPTION:`#6fc8e8`},no=[`QUERY`,`MUTATION`,`SUBSCRIPTION`];function ro({tip:e,children:t,className:n=``,underline:r=`always`}){let[i,a]=(0,v.useState)(null),o=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{let e=o.current;if(!e||!i)return;let t=e.offsetWidth,n=Math.min(Math.max(i.x-t/2,8),window.innerWidth-t-8);e.style.left=`${n}px`,e.style.visibility=`visible`},[i]),(0,F.jsxs)(`span`,{className:`cursor-help decoration-dotted underline-offset-4 ${r===`always`?`underline decoration-[#55556a]`:`hover:underline decoration-[#8a8aa0]`} ${n}`,onMouseEnter:e=>{let t=e.currentTarget.getBoundingClientRect();a({x:t.left+t.width/2,y:t.top})},onMouseLeave:()=>a(null),children:[t,i&&(0,F.jsx)(`span`,{ref:o,role:`tooltip`,className:`mono fixed z-[100] -translate-y-full rounded-md border border-[#2c2c36] px-2.5 py-1.5 text-[11.5px] text-ink whitespace-nowrap shadow-2xl pointer-events-none`,style:{left:i.x,top:i.y-6,background:`rgba(17,17,22,.97)`,visibility:`hidden`},children:e})]})}function io({ts:e,className:t=``,empty:n=`—`}){return e?(0,F.jsx)(ro,{tip:Da(e),underline:`hover`,className:t,children:Ea(e)}):(0,F.jsx)(F.Fragment,{children:n})}function ao(e){let t=e.toLowerCase();return/^(prod|production|live|prd)$/.test(t)?`#3ccf7a`:/^(stag|staging|stage|preprod|pre-prod|uat|qa|test|testing)$/.test(t)?`#f5c04e`:/^(dev|development|local|sandbox|preview)$/.test(t)?`#7fb2f0`:`#a3a3b8`}function oo({className:e=``,tall:t,short:n}){let r=I(),i=r.meta?.environments??[];return i.length<2&&!r.env?null:(0,F.jsxs)(`div`,{className:`relative shrink-0 ${e}`,children:[(0,F.jsx)(`span`,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 w-2 h-2 rounded-full pointer-events-none`,style:{background:r.env?ao(r.env):`transparent`,border:r.env?`none`:`1.5px solid #5c5c70`}}),(0,F.jsxs)(`select`,{className:`select !pl-6 ${t?`h-8`:``}`,value:r.env,onChange:e=>r.setEnv(e.target.value),"aria-label":`Environment`,title:`Environment`,children:[(0,F.jsx)(`option`,{value:``,children:n?`All envs`:`All environments`}),i.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.id},e.id)),r.env&&!i.some(e=>e.id===r.env)&&(0,F.jsx)(`option`,{value:r.env,children:r.env})]})]})}function so(){let e=I(),t=e.meta?.services??[];if(!e.env)return t;let n=new Set(e.meta?.environments?.find(t=>t.id===e.env)?.services??[]);return t.filter(e=>n.has(e.id))}var co={pg:`PostgreSQL`,mysql2:`MySQL`,ioredis:`Redis`,bullmq:`BullMQ`,"node-cron":`cron`,cron:`cron`},lo={express:{label:`Express`,color:`#f4f4f8`,bg:`rgba(244, 244, 248, .1)`},fastify:{label:`Fastify`,color:`#8fd3ff`,bg:`rgba(143, 211, 255, .12)`}};function uo(e){let[t,n]=e.split(`@`);return lo[t]?{label:`${lo[t].label}${n&&n!==`?`?` ${n}`:``}`,web:!0}:{label:co[t]??t,web:!1}}function fo(e){return e.filter(e=>lo[e.split(`@`)[0]]).map(e=>uo(e).label).join(`, `)}function po({frameworks:e,web:t=!1,className:n=``}){let r=new Set,i=e.map(e=>({f:e,...uo(e)})).filter(e=>(!t||e.web)&&!r.has(e.label)&&(r.add(e.label),!0)).sort((e,t)=>Number(t.web)-Number(e.web));return i.length?(0,F.jsx)(`span`,{className:`inline-flex flex-wrap items-center gap-1 ${n}`,children:i.map(e=>{let t=lo[e.f.split(`@`)[0]];return(0,F.jsx)(`span`,{className:`text-[10.5px] font-semibold leading-none px-1.5 py-[3px] rounded whitespace-nowrap`,style:t?{color:t.color,background:t.bg}:{color:`#9a9ab0`,background:`rgba(154, 154, 176, .1)`,fontWeight:500},title:`Detected by the SDK: ${e.f}`,children:e.label},e.label)})}):null}function mo({app:e,web:t,className:n}){let r=I().meta?.services.find(t=>t.id===e);return r?(0,F.jsx)(po,{frameworks:r.frameworks,web:t,className:n}):null}var ho=[{items:[{to:`/`,label:`Overview`,Icon:$r,end:!0}]},{title:`Activity`,items:[{to:`/requests`,label:`Requests`,Icon:lr},{to:`/jobs`,label:`Jobs`,Icon:qi},{to:`/traces`,label:`Traces`,Icon:Gr},{to:`/map`,label:`Service map`,Icon:fi}]},{title:`Diagnose`,items:[{to:`/errors`,label:`Errors`,Icon:br},{to:`/secrets`,label:`Secrets in logs`,Icon:Mi,badge:`secrets`},{to:`/logs`,label:`Logs`,Icon:Di},{to:`/services`,label:`Services`,Icon:vr},{to:`/queries`,label:`Queries`,Icon:Br},{to:`/users`,label:`Users`,Icon:Gi}]},{title:`Runtime`,items:[{to:`/profiler`,label:`Profiler`,Icon:zr},{to:`/metrics`,label:`Custom metrics`,Icon:Wr},{to:`/releases`,label:`Releases`,Icon:Ci}]},{title:`Respond`,items:[{to:`/alerts`,label:`Alerts`,Icon:hr,badge:`alerts`},{to:`/slos`,label:`SLOs`,Icon:zi},{to:`/status-pages`,label:`Status pages`,Icon:xi},{to:`/issues`,label:`Issues`,Icon:Pr,badge:`issues`}]}],go={"/logs":`logs`,"/alerts":`alerts`,"/slos":`slos`};function _o(e){let{meta:t}=I(),n=go[e];return!!(n&&t?.usage&&!t.usage.features[n])}function vo({to:e}){return _o(e)?(0,F.jsx)(oi,{size:12,className:`text-mute`,"aria-label":`Not in your plan`}):null}function yo({to:e,n:t,red:n}){return _o(e)||!(t>0)?null:(0,F.jsx)(`span`,{className:`text-[10px] font-semibold px-1.5 rounded-full`,style:{background:n?`#d03b3b`:`#2a2a36`,color:`#fff`},children:t})}var bo=[{to:`/`,label:`Home`,hint:`Is my app healthy?`,Icon:qr,end:!0},{to:`/alerts`,label:`Alerts`,hint:`What broke, and who gets told`,Icon:hr,badge:`simpleAlerts`},{to:`/releases`,label:`Releases`,hint:`Did my last deploy make things better or worse?`,Icon:Ci},{to:`/metrics`,label:`Metrics`,hint:`Traffic, speed, errors, server`,Icon:wr},{to:`/logs`,label:`Logs`,hint:`What your app printed`,Icon:Di},{to:`/settings`,label:`Settings`,hint:`Connect your app`,Icon:ji}],xo=[{id:`1h`,label:`Last hour`},{id:`24h`,label:`Today`},{id:`7d`,label:`7 days`}];function So({compact:e}){let{mode:t,setMode:n}=nr(),r=(r,i,a,o)=>(0,F.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t===r,className:t===r?`on`:``,onClick:()=>n(r),title:o,children:[(0,F.jsx)(a,{size:13}),!e&&i]});return(0,F.jsxs)(`div`,{className:`mode-toggle`,role:`radiogroup`,"aria-label":`Dashboard mode`,children:[r(`simple`,`Simple`,Ii,`Simple mode: is my app healthy, what broke, what changed, what to do`),r(`advanced`,`Advanced`,Fi,`Advanced mode: every request, trace, query and runtime detail`)]})}function Co({size:e=22}){let t=`obz-tile-${(0,v.useId)().replace(/:/g,``)}`;return(0,F.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 64 64`,"aria-hidden":!0,className:`shrink-0`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:t,x1:`0`,y1:`0`,x2:`64`,y2:`64`,gradientUnits:`userSpaceOnUse`,children:[(0,F.jsx)(`stop`,{offset:`0`,stopColor:`#ff3d7f`}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`#a855f7`})]})}),(0,F.jsx)(`rect`,{width:`64`,height:`64`,rx:`16`,fill:`url(#${t})`}),(0,F.jsx)(`path`,{d:`M7 32 H14 L20 20 H44 L20 44 H44 L50 32 H57`,fill:`none`,stroke:`#fff`,strokeWidth:e<24?5.6:4.6,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var wo={ob:`M30.7 1.4L30.7 1.4Q23.3 1.4 17.4-1.7Q11.6-4.7 8.3-10.4Q4.9-16 4.9-23.9L4.9-23.9L4.9-25.5Q4.9-33.4 8.3-39.1Q11.6-44.8 17.4-47.8Q23.3-50.8 30.7-50.8L30.7-50.8Q38.1-50.8 43.9-47.8Q49.7-44.8 53.1-39.1Q56.4-33.4 56.4-25.5L56.4-25.5L56.4-23.9Q56.4-16 53.1-10.4Q49.7-4.7 43.9-1.7Q38.1 1.4 30.7 1.4ZM30.7-8.8L30.7-8.8Q37-8.8 41-12.9Q45-16.9 45-24.2L45-24.2L45-25.2Q45-32.5 41-36.6Q37-40.6 30.7-40.6L30.7-40.6Q24.4-40.6 20.4-36.6Q16.4-32.5 16.4-25.2L16.4-25.2L16.4-24.2Q16.4-16.9 20.4-12.9Q24.4-8.8 30.7-8.8ZM93.8 1.4L93.8 1.4Q86.8 1.4 83.0-1.1Q79.3-3.5 77.6-6.5L77.6-6.5L75.9-6.5L75.9 0L64.6 0L64.6-70L76.1-70L76.1-43.2L77.8-43.2Q78.9-45.2 80.8-46.9Q82.8-48.6 86.0-49.7Q89.1-50.8 93.8-50.8L93.8-50.8Q99.9-50.8 105-47.9Q110.1-44.9 113.2-39.2Q116.3-33.5 116.3-25.5L116.3-25.5L116.3-23.9Q116.3-15.9 113.2-10.2Q110.1-4.5 105.0-1.6Q99.8 1.4 93.8 1.4ZM90.4-8.6L90.4-8.6Q96.6-8.6 100.7-12.7Q104.8-16.7 104.8-24.2L104.8-24.2L104.8-25.2Q104.8-32.8 100.8-36.8Q96.7-40.8 90.4-40.8L90.4-40.8Q84.2-40.8 80.0-36.8Q75.9-32.8 75.9-25.2L75.9-25.2L75.9-24.2Q75.9-16.7 80.0-12.7Q84.2-8.6 90.4-8.6Z`,z:`M163 0L121.6 0L121.6-13.8L149.8-38.4L149.8-39.9L122.6-39.9L122.6-49.4L162.2-49.4L162.2-35.6L134-11L134-9.5L163-9.5L163 0Z`,erver:`M192.9 1.4L192.9 1.4Q185.5 1.4 179.8-1.8Q174.2-4.9 171.1-10.7Q167.9-16.4 167.9-24.1L167.9-24.1L167.9-25.3Q167.9-33.1 171-38.8Q174.1-44.5 179.7-47.7Q185.3-50.8 192.6-50.8L192.6-50.8Q199.8-50.8 205.2-47.7Q210.6-44.5 213.6-38.8Q216.6-33.1 216.6-25.5L216.6-25.5L216.6-21.4L179.5-21.4Q179.7-15.6 183.6-12.1Q187.5-8.6 193.2-8.6L193.2-8.6Q198.8-8.6 201.5-11.1Q204.2-13.5 205.6-16.6L205.6-16.6L215.1-11.7Q213.7-9 211.1-6.0Q208.4-2.9 204-0.8Q199.6 1.4 192.9 1.4ZM179.6-30.1L179.6-30.1L204.9-30.1Q204.5-35 201.2-37.9Q197.8-40.8 192.5-40.8L192.5-40.8Q187-40.8 183.7-37.9Q180.4-35 179.6-30.1ZM235.9 0L224.4 0L224.4-49.4L235.7-49.4L235.7-43.7L237.4-43.7Q238.5-46.8 241.1-48.2Q243.7-49.6 247.3-49.6L247.3-49.6L253.3-49.6L253.3-39.4L247.1-39.4Q242.1-39.4 239-36.8Q235.9-34.1 235.9-28.6L235.9-28.6L235.9 0ZM288.6 0L270.4 0L254.2-49.4L266.4-49.4L278.6-8.4L280.3-8.4L292.6-49.4L304.8-49.4L288.6 0ZM331.1 1.4L331.1 1.4Q323.7 1.4 318.1-1.8Q312.4-4.9 309.3-10.7Q306.1-16.4 306.1-24.1L306.1-24.1L306.1-25.3Q306.1-33.1 309.2-38.8Q312.3-44.5 317.9-47.7Q323.5-50.8 330.8-50.8L330.8-50.8Q338-50.8 343.4-47.7Q348.8-44.5 351.8-38.8Q354.8-33.1 354.8-25.5L354.8-25.5L354.8-21.4L317.7-21.4Q317.9-15.6 321.8-12.1Q325.7-8.6 331.4-8.6L331.4-8.6Q337-8.6 339.7-11.1Q342.4-13.5 343.8-16.6L343.8-16.6L353.3-11.7Q351.9-9 349.3-6.0Q346.6-2.9 342.2-0.8Q337.8 1.4 331.1 1.4ZM317.8-30.1L317.8-30.1L343.1-30.1Q342.7-35 339.3-37.9Q336-40.8 330.7-40.8L330.7-40.8Q325.2-40.8 321.9-37.9Q318.6-35 317.8-30.1ZM374.1 0L362.6 0L362.6-49.4L373.9-49.4L373.9-43.7L375.6-43.7Q376.7-46.8 379.3-48.2Q381.9-49.6 385.5-49.6L385.5-49.6L391.5-49.6L391.5-39.4L385.3-39.4Q380.3-39.4 377.2-36.8Q374.1-34.1 374.1-28.6L374.1-28.6L374.1 0Z`};function To({size:e=15}){let t=Math.max(1,Math.round(e*.73*49.4/73))/49.4,n=Math.ceil(71*t),r=n+Math.ceil(1.5*t),i=Math.ceil(397*t),a=e<32?`#ff5c93`:`#ff3d7f`;return(0,F.jsxs)(`svg`,{height:r,width:i,viewBox:`-1 ${-n/t} ${i/t} ${r/t}`,role:`img`,"aria-label":`Obzerver`,className:`shrink-0 block`,children:[(0,F.jsx)(`path`,{d:wo.ob,fill:`#f4f4f8`}),(0,F.jsx)(`path`,{d:wo.z,fill:a}),(0,F.jsx)(`path`,{d:wo.erver,fill:`#f4f4f8`})]})}function Eo(){let{mode:e}=nr();return e?e===`simple`?(0,F.jsx)(Oo,{}):(0,F.jsx)(ko,{}):(0,F.jsx)(`div`,{className:`h-full flex items-center justify-center`,children:(0,F.jsx)(H,{})})}function Do(){let[e,t]=(0,v.useState)(()=>{try{return sessionStorage.getItem(`obz.ask.open`)===`1`}catch{return!1}}),[n,r]=(0,v.useState)(null);return(0,v.useEffect)(()=>{try{sessionStorage.setItem(`obz.ask.open`,e?`1`:`0`)}catch{}},[e]),(0,v.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`i`?(e.preventDefault(),t(e=>!e)):e.key===`Escape`&&t(!1)},n=e=>{let n=e.detail?.question;t(!0),n&&r(n)};return window.addEventListener(`keydown`,e),window.addEventListener(`obz:ask`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`obz:ask`,n)}},[]),{askOpen:e,setAskOpen:t,pending:n,clearPending:()=>r(null)}}function Oo(){let e=I(),t=so(),n=L(),{setMode:r}=nr(),{askOpen:i,setAskOpen:a,pending:o,clearPending:s}=Do(),c=(e.meta?.unreadAlerts||0)+(e.meta?.openSecrets||0);return(0,F.jsxs)(`div`,{className:`flex h-full simple`,children:[(0,F.jsxs)(`aside`,{className:`w-[220px] shrink-0 border-r border-line flex flex-col bg-[#0e0e14]`,children:[(0,F.jsxs)(`div`,{className:`h-[56px] flex items-center gap-1.5 px-4 border-b border-line`,children:[(0,F.jsx)(Co,{size:28}),(0,F.jsx)(`span`,{className:`mt-px`,children:(0,F.jsx)(To,{size:20})})]}),(0,F.jsx)(Ca,{}),(0,F.jsxs)(`nav`,{className:`flex-1 overflow-y-auto px-2.5 py-3 flex flex-col gap-1`,children:[bo.map(e=>(0,F.jsx)(Pn,{to:n(e.to),end:e.end,title:e.hint,className:({isActive:e})=>`flex items-center gap-3 h-[40px] px-3 rounded-lg text-[14px] ${e?`bg-[#1f1f2a] text-ink font-medium`:`text-ink2 hover:bg-[#16161e] hover:text-ink`}`,children:({isActive:t})=>(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(e.Icon,{size:17,style:{color:t?`#ff3d7f`:void 0}}),(0,F.jsx)(`span`,{className:`flex-1`,children:e.label}),(0,F.jsx)(vo,{to:e.to}),e.badge&&(0,F.jsx)(yo,{to:e.to,n:c,red:!0})]})},e.to)),(0,F.jsxs)(`button`,{className:`mt-2 flex items-center gap-3 h-[40px] px-3 rounded-lg text-[14px] text-ink2 hover:text-ink ask-nav`,onClick:()=>a(!0),children:[(0,F.jsx)(Li,{size:17,className:`text-brand`}),(0,F.jsx)(`span`,{className:`flex-1 text-left`,children:`Ask Obzeri`}),(0,F.jsx)(`span`,{className:`kbd`,children:`⌘I`})]})]}),(0,F.jsx)(`div`,{className:`p-3 border-t border-line`,children:(0,F.jsxs)(`button`,{className:`w-full text-left rounded-lg border border-line hover:border-line2 bg-[#121219] px-3 py-2.5 group`,onClick:()=>r(`advanced`),children:[(0,F.jsxs)(`div`,{className:`text-[12.5px] font-medium flex items-center gap-1.5`,children:[`Need every detail? `,(0,F.jsx)(fr,{size:13,className:`text-mute group-hover:text-ink transition-transform group-hover:translate-x-0.5`})]}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute mt-0.5 leading-snug`,children:`Advanced mode has traces, queries, the profiler, releases and more.`})]})})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 flex flex-col transition-[margin] duration-150`,style:{marginRight:i?480:0},children:[(0,F.jsxs)(`header`,{className:`h-[56px] shrink-0 border-b border-line flex items-center gap-3 px-5 bg-[#0e0e14]`,children:[(0,F.jsx)(So,{}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsx)(oo,{tall:!0}),(t.length>1||e.service)&&(0,F.jsxs)(`select`,{className:`select h-8`,value:e.service,onChange:t=>e.setService(t.target.value),"aria-label":`App`,children:[(0,F.jsx)(`option`,{value:``,children:`All apps`}),t.map(e=>(0,F.jsxs)(`option`,{value:e.id,children:[e.id,fo(e.frameworks)?` · ${fo(e.frameworks)}`:``]},e.id))]}),e.service&&(0,F.jsx)(mo,{app:e.service,web:!0}),i?(0,F.jsxs)(`select`,{className:`select h-8`,value:xo.some(t=>t.id===e.range)?e.range:``,onChange:t=>t.target.value&&e.setRange(t.target.value),"aria-label":`Time range`,children:[!xo.some(t=>t.id===e.range)&&(0,F.jsx)(`option`,{value:``,children:e.range===`custom`?`Custom`:e.range}),xo.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.label},e.id))]}):(0,F.jsx)(`div`,{className:`seg seg-lg`,children:xo.map(t=>(0,F.jsx)(`button`,{className:e.range===t.id?`on`:``,onClick:()=>e.setRange(t.id),children:t.label},t.id))}),(0,F.jsxs)(`button`,{className:`btn ask-btn h-8 ${i?`on px-2`:``}`,onClick:()=>a(e=>!e),title:`Ask Obzeri (⌘I / Ctrl+I)`,"aria-label":`Ask Obzeri`,"aria-pressed":i,children:[(0,F.jsx)(Li,{size:14,className:`text-brand`}),!i&&`Ask Obzeri`]}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-8 px-2`,onClick:e.refresh,title:`Refresh`,children:(0,F.jsx)(Si,{size:14})})]}),(0,F.jsx)(ta,{}),(0,F.jsx)(`main`,{className:`flex-1 overflow-y-auto @container`,children:(0,F.jsx)(`div`,{className:`max-w-[1240px] mx-auto px-6 py-6`,children:(0,F.jsx)(Ht,{})})}),(0,F.jsx)(pa,{open:i,onClose:()=>a(!1),pending:o,onPending:s,simple:!0})]})]})}function ko(){let e=I(),t=so(),n=L(),r=ht(),[i,a]=(0,v.useState)(``),{askOpen:o,setAskOpen:s,pending:c,clearPending:l}=Do(),u={alerts:e.meta?.unreadAlerts||0,issues:e.meta?.openIssues||0,secrets:e.meta?.openSecrets||0};return(0,v.useEffect)(()=>{let e=e=>{e.key===`/`&&!(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),document.getElementById(`global-search`)?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,F.jsxs)(`div`,{className:`flex h-full`,children:[(0,F.jsxs)(`aside`,{className:`w-[214px] shrink-0 border-r border-line flex flex-col bg-[#0e0e14]`,children:[(0,F.jsxs)(`div`,{className:`h-[52px] flex items-center gap-2 px-4 border-b border-line`,children:[(0,F.jsx)(Co,{size:28}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-[5px]`,children:[(0,F.jsx)(To,{size:18}),(0,F.jsx)(`div`,{className:`text-[10.5px] leading-[14px] text-mute whitespace-nowrap`,children:e.meta?.version?.includes(`-`)?`v${e.meta.version}`:`Express · Fastify${e.meta?.version?` · v${e.meta.version}`:``}`})]})]}),(0,F.jsx)(Ca,{}),(0,F.jsx)(`nav`,{className:`flex-1 overflow-y-auto px-2 py-3 flex flex-col gap-4`,children:ho.map((e,t)=>(0,F.jsxs)(`div`,{children:[e.title&&(0,F.jsx)(`div`,{className:`px-2 pb-1 text-[10.5px] uppercase tracking-wider text-mute font-medium`,children:e.title}),e.items.map(e=>(0,F.jsx)(Pn,{to:n(e.to),end:e.end,className:({isActive:e})=>`flex items-center gap-2.5 h-[30px] px-2 rounded-md text-[12.8px] ${e?`bg-[#1d1d27] text-ink`:`text-ink2 hover:bg-[#16161e] hover:text-ink`}`,children:({isActive:t})=>(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(e.Icon,{size:15,style:{color:t?`#ff3d7f`:void 0}}),(0,F.jsx)(`span`,{className:`flex-1`,children:e.label}),(0,F.jsx)(vo,{to:e.to}),e.badge&&(0,F.jsx)(yo,{to:e.to,n:u[e.badge],red:e.badge===`alerts`||e.badge===`secrets`})]})},e.to))]},t))}),(0,F.jsxs)(`div`,{className:`px-2 py-2 border-t border-line flex flex-col gap-0.5`,children:[(0,F.jsxs)(Pn,{to:n(`/integrations`),className:({isActive:e})=>`flex items-center gap-2.5 h-[30px] px-2 rounded-md text-[12.8px] ${e?`bg-[#1d1d27] text-ink`:`text-ink2 hover:bg-[#16161e]`}`,children:[(0,F.jsx)(vi,{size:15}),` Integrations`]}),(0,F.jsxs)(Pn,{to:n(`/usage`),className:({isActive:e})=>`flex items-center gap-2.5 h-[30px] px-2 rounded-md text-[12.8px] ${e?`bg-[#1d1d27] text-ink`:`text-ink2 hover:bg-[#16161e]`}`,children:[(0,F.jsx)(Cr,{size:15}),` `,(0,F.jsx)(`span`,{className:`flex-1`,children:`Usage`}),(0,F.jsx)(Ao,{})]}),(0,F.jsxs)(Pn,{to:n(`/settings`),className:({isActive:e})=>`flex items-center gap-2.5 h-[30px] px-2 rounded-md text-[12.8px] ${e?`bg-[#1d1d27] text-ink`:`text-ink2 hover:bg-[#16161e]`}`,children:[(0,F.jsx)(ji,{size:15}),` Setup & settings`]})]})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 flex flex-col transition-[margin] duration-150`,style:{marginRight:o?480:0},children:[(0,F.jsxs)(`header`,{className:`shrink-0 border-b border-line bg-[#0e0e14]`,children:[(0,F.jsxs)(`div`,{className:`h-[52px] flex items-center gap-3 px-5`,children:[(0,F.jsx)(So,{}),(0,F.jsxs)(`form`,{className:`relative flex-1 min-w-[200px] max-w-[560px]`,onSubmit:e=>{e.preventDefault();let t=i.trim();t&&(r(n(/^[0-9a-f]{32}$/i.test(t)?`/traces/${t.toLowerCase()}`:`/traces?q=${encodeURIComponent(t)}`)),a(``))},children:[(0,F.jsx)(Oi,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{id:`global-search`,className:`input pl-8 pr-7 w-full`,placeholder:`Trace id, path, user, error…`,value:i,onChange:e=>a(e.target.value)}),(0,F.jsx)(`span`,{className:`kbd absolute right-2 top-1/2 -translate-y-1/2`,children:`/`})]}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsxs)(`button`,{className:`btn ask-btn ${o?`on px-2`:``}`,onClick:()=>s(e=>!e),title:`Ask Obzeri (⌘I / Ctrl+I)`,"aria-label":`Ask Obzeri`,"aria-pressed":o,children:[(0,F.jsx)(Li,{size:13,className:`text-brand`}),!o&&`Ask Obzeri`]}),(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>e.setLive(!e.live),title:`Auto-refresh every 30s`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full ${e.live&&e.range!==`custom`?`live-dot`:``}`,style:{background:e.live&&e.range!==`custom`?`#0ca30c`:`#55556a`}}),e.live&&e.range!==`custom`?`Live`:`Paused`]}),(0,F.jsx)(`button`,{className:`btn px-2`,onClick:e.refresh,title:`Refresh`,children:(0,F.jsx)(Si,{size:13})})]}),(0,F.jsxs)(`div`,{className:`h-[42px] flex items-center gap-2.5 px-5 border-t border-[#1b1b24] bg-[#0c0c11]`,children:[(0,F.jsx)(`span`,{className:`text-[11px] uppercase tracking-wider text-mute font-semibold mr-1`,children:`Showing`}),(0,F.jsx)(oo,{}),(0,F.jsxs)(`select`,{className:`select`,value:e.service,onChange:t=>e.setService(t.target.value),"aria-label":`Application`,children:[(0,F.jsx)(`option`,{value:``,children:`All applications`}),t.map(e=>(0,F.jsxs)(`option`,{value:e.id,children:[e.id,fo(e.frameworks)?` · ${fo(e.frameworks)}`:``]},e.id))]}),e.service&&(0,F.jsx)(mo,{app:e.service}),(0,F.jsx)(`div`,{className:`flex-1`}),o?(0,F.jsxs)(`select`,{className:`select w-[74px]`,value:e.range===`custom`?``:e.range,onChange:t=>t.target.value&&e.setRange(t.target.value),"aria-label":`Time range`,children:[e.range===`custom`&&(0,F.jsx)(`option`,{value:``,children:`custom`}),Yn.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.label},e.id))]}):(0,F.jsx)(`div`,{className:`seg`,children:Yn.map(t=>(0,F.jsx)(`button`,{className:e.range===t.id?`on`:``,onClick:()=>e.setRange(t.id),children:t.label},t.id))}),(0,F.jsx)(La,{})]})]}),(0,F.jsx)(ta,{}),(0,F.jsx)(`main`,{className:`flex-1 overflow-y-auto @container`,children:(0,F.jsx)(`div`,{className:`max-w-[1500px] mx-auto px-5 py-5`,children:(0,F.jsx)(Ht,{})})}),(0,F.jsx)(pa,{open:o,onClose:()=>s(!1),pending:c,onPending:l})]})]})}function Ao(){let{meta:e}=I(),t=e?.usage;if(!t||t.pct==null)return null;let n=t.pct>=100?`#ec835a`:t.pct>=80?`#fab219`:void 0;return(0,F.jsx)(`span`,{className:`text-[10.5px] tabular-nums text-mute`,style:n?{color:n}:void 0,children:Qi(t.pct)})}function jo(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=jo(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function q(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jo(e))&&(r&&(r+=` `),r+=t);return r}var Mo=o(((e,t)=>{t.exports=Array.isArray})),No=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),Po=o(((e,t)=>{var n=No(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),Fo=o(((e,t)=>{t.exports=Po().Symbol})),Io=o(((e,t)=>{var n=Fo(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),Lo=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),Ro=o(((e,t)=>{var n=Fo(),r=Io(),i=Lo(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),zo=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),Bo=o(((e,t)=>{var n=Ro(),r=zo(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),Vo=o(((e,t)=>{var n=Mo(),r=Bo(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),Ho=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),Uo=o(((e,t)=>{var n=Ro(),r=Ho(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Wo=o(((e,t)=>{t.exports=Po()[`__core-js_shared__`]})),Go=o(((e,t)=>{var n=Wo(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),Ko=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),qo=o(((e,t)=>{var n=Uo(),r=Go(),i=Ho(),a=Ko(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),Jo=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Yo=o(((e,t)=>{var n=qo(),r=Jo();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),Xo=o(((e,t)=>{t.exports=Yo()(Object,`create`)})),Zo=o(((e,t)=>{var n=Xo();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Qo=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),$o=o(((e,t)=>{var n=Xo(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),es=o(((e,t)=>{var n=Xo(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),ts=o(((e,t)=>{var n=Xo(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),ns=o(((e,t)=>{var n=Zo(),r=Qo(),i=$o(),a=es(),o=ts();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),rs=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),is=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),as=o(((e,t)=>{var n=is();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),os=o(((e,t)=>{var n=as(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),ss=o(((e,t)=>{var n=as();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),cs=o(((e,t)=>{var n=as();function r(e){return n(this.__data__,e)>-1}t.exports=r})),ls=o(((e,t)=>{var n=as();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),us=o(((e,t)=>{var n=rs(),r=os(),i=ss(),a=cs(),o=ls();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),ds=o(((e,t)=>{t.exports=Yo()(Po(),`Map`)})),fs=o(((e,t)=>{var n=ns(),r=us(),i=ds();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),ps=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),ms=o(((e,t)=>{var n=ps();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),hs=o(((e,t)=>{var n=ms();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),gs=o(((e,t)=>{var n=ms();function r(e){return n(this,e).get(e)}t.exports=r})),_s=o(((e,t)=>{var n=ms();function r(e){return n(this,e).has(e)}t.exports=r})),vs=o(((e,t)=>{var n=ms();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),ys=o(((e,t)=>{var n=fs(),r=hs(),i=gs(),a=_s(),o=vs();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),bs=o(((e,t)=>{var n=ys(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),xs=o(((e,t)=>{var n=bs(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),Ss=o(((e,t)=>{var n=xs(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),Cs=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),ws=o(((e,t)=>{var n=Fo(),r=Cs(),i=Mo(),a=Bo(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),Ts=o(((e,t)=>{var n=ws();function r(e){return e==null?``:n(e)}t.exports=r})),Es=o(((e,t)=>{var n=Mo(),r=Vo(),i=Ss(),a=Ts();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),Ds=o(((e,t)=>{var n=Bo(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),Os=o(((e,t)=>{var n=Es(),r=Ds();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),ks=o(((e,t)=>{var n=Os();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),As=o(((e,t)=>{function n(e){return e==null}t.exports=n})),js=o(((e,t)=>{var n=Ro(),r=Mo(),i=zo(),a=`[object String]`;function o(e){return typeof e==`string`||!r(e)&&i(e)&&n(e)==a}t.exports=o})),Ms=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isFragment=function(e){return m(e)===r}})),Ns=o(((e,t)=>{t.exports=Ms()})),Ps=o(((e,t)=>{var n=Ro(),r=zo(),i=`[object Number]`;function a(e){return typeof e==`number`||r(e)&&n(e)==i}t.exports=a})),Fs=o(((e,t)=>{var n=Ps();function r(e){return n(e)&&e!=+e}t.exports=r})),Is=l(js()),Ls=l(Fs()),Rs=l(ks()),zs=l(Ps()),J=l(As()),Bs=function(e){return e===0?0:e>0?1:-1},Vs=function(e){return(0,Is.default)(e)&&e.indexOf(`%`)===e.length-1},Y=function(e){return(0,zs.default)(e)&&!(0,Ls.default)(e)},Hs=function(e){return(0,J.default)(e)},Us=function(e){return Y(e)||(0,Is.default)(e)},Ws=0,Gs=function(e){var t=++Ws;return`${e||``}${t}`},Ks=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!Y(e)&&!(0,Is.default)(e))return n;var i;if(Vs(e)){var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return(0,Ls.default)(i)&&(i=n),r&&i>t&&(i=t),i},qs=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},Js=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1},Ys=function(e,t){return Y(e)&&Y(t)?function(n){return e+n*(t-e)}:function(){return t}};function Xs(e,t,n){return!e||!e.length?null:e.find(function(e){return e&&(typeof t==`function`?t(e):(0,Rs.default)(e,t))===n})}var Zs=function(e){if(!e||!e.length)return null;for(var t=e.length,n=0,r=0,i=0,a=0,o=1/0,s=-1/0,c=0,l=0,u=0;u<t;u++)c=e[u].cx||0,l=e[u].cy||0,n+=c,r+=l,i+=c*l,a+=c*c,o=Math.min(o,c),s=Math.max(s,c);var d=t*a===n*n?0:(t*i-n*r)/(t*a-n*n);return{xmin:o,xmax:s,a:d,b:(r-d*n)/t}},Qs=function(e,t){return Y(e)&&Y(t)?e-t:(0,Is.default)(e)&&(0,Is.default)(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))};function $s(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}var ec=l(Ho());function tc(e){"@babel/helpers - typeof";return tc=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},tc(e)}var nc=[`viewBox`,`children`],rc=`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`),ic=[`points`,`pathLength`],ac={svg:nc,polygon:ic,polyline:ic},oc=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`),sc=function(e,t){if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,v.isValidElement)(e)&&(n=e.props),!(0,ec.default)(n))return null;var r={};return Object.keys(n).forEach(function(e){oc.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})}),r},cc=function(e,t,n){return function(r){return e(t,n,r),null}},lc=function(e,t,n){if(!(0,ec.default)(e)||tc(e)!==`object`)return null;var r=null;return Object.keys(e).forEach(function(i){var a=e[i];oc.includes(i)&&typeof a==`function`&&(r||={},r[i]=cc(a,t,n))}),r},X=l(Uo()),uc=Ns(),dc=[`children`],fc=[`children`];function pc(e,t){if(e==null)return{};var n=mc(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mc(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hc(e){"@babel/helpers - typeof";return hc=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hc(e)}var gc={click:`onClick`,mousedown:`onMouseDown`,mouseup:`onMouseUp`,mouseover:`onMouseOver`,mousemove:`onMouseMove`,mouseout:`onMouseOut`,mouseenter:`onMouseEnter`,mouseleave:`onMouseLeave`,touchcancel:`onTouchCancel`,touchend:`onTouchEnd`,touchmove:`onTouchMove`,touchstart:`onTouchStart`,contextmenu:`onContextMenu`,dblclick:`onDoubleClick`},_c=function(e){return typeof e==`string`?e:e?e.displayName||e.name||`Component`:``},vc=null,yc=null,bc=function e(t){if(t===vc&&Array.isArray(yc))return yc;var n=[];return v.Children.forEach(t,function(t){(0,J.default)(t)||((0,uc.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),yc=n,vc=t,n};function xc(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return _c(e)}):[_c(t)],bc(e).forEach(function(e){var t=(0,Rs.default)(e,`type.displayName`)||(0,Rs.default)(e,`type.name`);r.indexOf(t)!==-1&&n.push(e)}),n}function Sc(e,t){var n=xc(e,t);return n&&n[0]}var Cc=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!Y(n)||n<=0||!Y(r)||r<=0)},wc=`a.altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColormatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-url.foreignObject.g.glyph.glyphRef.hkern.image.line.lineGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.svg.switch.symbol.text.textPath.title.tref.tspan.use.view.vkern`.split(`.`),Tc=function(e){return e&&e.type&&(0,Is.default)(e.type)&&wc.indexOf(e.type)>=0},Ec=function(e){return e&&hc(e)===`object`&&`clipDot`in e},Dc=function(e,t,n,r){var i=ac?.[r]??[];return t.startsWith(`data-`)||!(0,X.default)(e)&&(r&&i.includes(t)||rc.includes(t))||n&&oc.includes(t)},Z=function(e,t,n){if(!e||typeof e==`function`||typeof e==`boolean`)return null;var r=e;if((0,v.isValidElement)(e)&&(r=e.props),!(0,ec.default)(r))return null;var i={};return Object.keys(r).forEach(function(e){Dc(r?.[e],e,t,n)&&(i[e]=r[e])}),i},Oc=function e(t,n){if(t===n)return!0;var r=v.Children.count(t);if(r!==v.Children.count(n))return!1;if(r===0)return!0;if(r===1)return kc(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!kc(a,o))return!1}return!0},kc=function(e,t){if((0,J.default)(e)&&(0,J.default)(t))return!0;if(!(0,J.default)(e)&&!(0,J.default)(t)){var n=e.props||{},r=n.children,i=pc(n,dc),a=t.props||{},o=a.children,s=pc(a,fc);return r&&o?$s(i,s)&&Oc(r,o):!r&&!o&&$s(i,s)}return!1},Ac=function(e,t){var n=[],r={};return bc(e).forEach(function(e,i){if(Tc(e))n.push(e);else if(e){var a=_c(e.type),o=t[a]||{},s=o.handler,c=o.once;if(s&&(!c||!r[a])){var l=s(e,a,i);n.push(l),r[a]=!0}}}),n},jc=function(e){var t=e&&e.type;return t&&gc[t]?gc[t]:null},Mc=function(e,t){return bc(t).indexOf(e)},Nc=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pc.apply(this,arguments)}function Fc(e,t){if(e==null)return{};var n=Ic(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ic(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Lc(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,c=e.desc,l=Fc(e,Nc),u=i||{width:n,height:r,x:0,y:0},d=q(`recharts-surface`,a);return v.createElement(`svg`,Pc({},Z(l,!0,`svg`),{className:d,width:n,height:r,style:o,viewBox:`${u.x} ${u.y} ${u.width} ${u.height}`}),v.createElement(`title`,null,s),v.createElement(`desc`,null,c),t)}var Rc=[`children`,`className`];function zc(){return zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zc.apply(this,arguments)}function Bc(e,t){if(e==null)return{};var n=Vc(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vc(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Hc=v.forwardRef(function(e,t){var n=e.children,r=e.className,i=Bc(e,Rc),a=q(`recharts-layer`,r);return v.createElement(`g`,zc({className:a},Z(i,!0),{ref:t}),n)}),Uc=o(((e,t)=>{function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.exports=n})),Wc=o(((e,t)=>{var n=Uc();function r(e,t,r){var i=e.length;return r=r===void 0?i:r,!t&&r>=i?e:n(e,t,r)}t.exports=r})),Gc=o(((e,t)=>{var n=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function r(e){return n.test(e)}t.exports=r})),Kc=o(((e,t)=>{function n(e){return e.split(``)}t.exports=n})),qc=o(((e,t)=>{var n=`\\ud800-\\udfff`,r=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,i=`\\ufe0e\\ufe0f`,a=`[`+n+`]`,o=`[`+r+`]`,s=`\\ud83c[\\udffb-\\udfff]`,c=`(?:`+o+`|`+s+`)`,l=`[^`+n+`]`,u=`(?:\\ud83c[\\udde6-\\uddff]){2}`,d=`[\\ud800-\\udbff][\\udc00-\\udfff]`,f=`\\u200d`,p=c+`?`,m=`[`+i+`]?`,h=`(?:`+f+`(?:`+[l,u,d].join(`|`)+`)`+m+p+`)*`,g=m+p+h,_=`(?:`+[l+o+`?`,o,u,d,a].join(`|`)+`)`,v=RegExp(s+`(?=`+s+`)|`+_+g,`g`);function y(e){return e.match(v)||[]}t.exports=y})),Jc=o(((e,t)=>{var n=Kc(),r=Gc(),i=qc();function a(e){return r(e)?i(e):n(e)}t.exports=a})),Yc=o(((e,t)=>{var n=Wc(),r=Gc(),i=Jc(),a=Ts();function o(e){return function(t){t=a(t);var o=r(t)?i(t):void 0,s=o?o[0]:t.charAt(0),c=o?n(o,1).join(``):t.slice(1);return s[e]()+c}}t.exports=o})),Xc=o(((e,t)=>{t.exports=Yc()(`toUpperCase`)})),Zc=Math.PI,Qc=2*Zc,$c=1e-6,el=Qc-$c;function tl(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function nl(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return tl;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}function rl(e,t,n,r){return e===n&&t===r}function il(e){let t=Math.floor(e);if(!(t<=15))return rl;let n=10**t,r=function(e){return Math.round(e*n)};return function(e,t,n,i){return r(e)===r(n)&&r(t)===r(i)}}var al=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?tl:nl(e),this._equal=e==null?rl:il(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>$c){if(!(Math.abs(u*s-c*l)>$c)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Zc-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>$c&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>$c||Math.abs(this._y1-l)>$c)&&this._append`L${c},${l}`,n){if(d<0&&(d=d%Qc+Qc),d>el)this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`;else if(d>$c){let a=e+n*Math.cos(i),o=t+n*Math.sin(i);if(d>=Zc&&this._equal(c,l,a,o)){d/=2;let i=r+d;this._append`A${n},${n},0,${+(d>=Zc)},${u},${e+n*Math.cos(i)},${t+n*Math.sin(i)}`}this._append`A${n},${n},0,${+(d>=Zc)},${u},${this._x1=a},${this._y1=o}`}}}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};al.prototype;function ol(e){return function(){return e}}var sl=Math.cos,cl=Math.sin,ll=Math.sqrt,ul=1e-12,dl=Math.PI;dl/2;var fl=2*dl;function pl(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new al(t)}Array.prototype.slice;function ml(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function hl(e){this._context=e}hl.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)}}};function gl(e){return new hl(e)}function _l(e){return e[0]}function vl(e){return e[1]}function yl(e,t){var n=ol(!0),r=null,i=gl,a=null,o=pl(s);e=typeof e==`function`?e:e===void 0?_l:ol(e),t=typeof t==`function`?t:t===void 0?vl:ol(t);function s(s){var c,l=(s=ml(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:ol(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:ol(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:ol(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function bl(e,t,n){var r=null,i=ol(!0),a=null,o=gl,s=null,c=pl(l);e=typeof e==`function`?e:e===void 0?_l:ol(+e),t=typeof t==`function`?t:ol(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?vl:ol(+n);function l(l){var u,d,f,p=(l=ml(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return yl().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:ol(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:ol(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:ol(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:ol(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:ol(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:ol(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:ol(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}Sl(gl);function xl(e){this._curve=e}xl.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Sl(e){function t(t){return new xl(e(t))}return t._curve=e,t}var Cl=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function wl(e){return new Cl(e,!0)}function Tl(e){return new Cl(e,!1)}ll(3);var El={draw(e,t){let n=ll(t/dl);e.moveTo(n,0),e.arc(0,0,n,0,fl)}},Dl={draw(e,t){let n=ll(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Ol=ll(1/3),kl=Ol*2,Al={draw(e,t){let n=ll(t/kl),r=n*Ol;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},jl={draw(e,t){let n=ll(t),r=-n/2;e.rect(r,r,n,n)}},Ml=.8908130915292852,Nl=cl(dl/10)/cl(7*dl/10),Pl=cl(fl/10)*Nl,Fl=-sl(fl/10)*Nl,Il={draw(e,t){let n=ll(t*Ml),r=Pl*n,i=Fl*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=fl*t/5,o=sl(a),s=cl(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},Ll=ll(3),Rl={draw(e,t){let n=-ll(t/(Ll*3));e.moveTo(0,n*2),e.lineTo(-Ll*n,-n),e.lineTo(Ll*n,-n),e.closePath()}};ll(3);var zl=-.5,Bl=ll(3)/2,Vl=1/ll(12),Hl=(Vl/2+1)*3,Ul={draw(e,t){let n=ll(t/Hl),r=n/2,i=n*Vl,a=r,o=n*Vl+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(zl*r-Bl*i,Bl*r+zl*i),e.lineTo(zl*a-Bl*o,Bl*a+zl*o),e.lineTo(zl*s-Bl*c,Bl*s+zl*c),e.lineTo(zl*r+Bl*i,zl*i-Bl*r),e.lineTo(zl*a+Bl*o,zl*o-Bl*a),e.lineTo(zl*s+Bl*c,zl*c-Bl*s),e.closePath()}};function Wl(e,t){let n=null,r=pl(i);e=typeof e==`function`?e:ol(e||El),t=typeof t==`function`?t:ol(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:ol(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:ol(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function Gl(){}function Kl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ql(e){this._context=e}ql.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:Kl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(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:Kl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Jl(e){return new ql(e)}function Yl(e){this._context=e}Yl.prototype={areaStart:Gl,areaEnd:Gl,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)}},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:Kl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xl(e){return new Yl(e)}function Zl(e){this._context=e}Zl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Kl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ql(e){return new Zl(e)}function $l(e,t){this._basis=new ql(e),this._beta=t}$l.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}},(function e(t){function n(e){return t===1?new ql(e):new $l(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function eu(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function tu(e,t){this._context=e,this._k=(1-t)/6}tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:eu(this,this._x1,this._y1)}(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,this._x1=e,this._y1=t;break;case 2:this._point=3;default:eu(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return new tu(e,t)}return n.tension=function(t){return e(+t)},n})(0);function nu(e,t){this._context=e,this._k=(1-t)/6}nu.prototype={areaStart:Gl,areaEnd:Gl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:eu(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return new nu(e,t)}return n.tension=function(t){return e(+t)},n})(0);function ru(e,t){this._context=e,this._k=(1-t)/6}ru.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=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,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:eu(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return new ru(e,t)}return n.tension=function(t){return e(+t)},n})(0);function iu(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>ul){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>ul){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function au(e,t){this._context=e,this._alpha=t}au.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}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;default:iu(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return t?new au(e,t):new tu(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function ou(e,t){this._context=e,this._alpha=t}ou.prototype={areaStart:Gl,areaEnd:Gl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:iu(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return t?new ou(e,t):new nu(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function su(e,t){this._context=e,this._alpha=t}su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=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){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:iu(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return t?new su(e,t):new ru(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function cu(e){this._context=e}cu.prototype={areaStart:Gl,areaEnd:Gl,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 lu(e){return new cu(e)}function uu(e){return e<0?-1:1}function du(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(uu(a)+uu(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function fu(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function pu(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function mu(e){this._context=e}mu.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:pu(this,this._t0,fu(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,pu(this,fu(this,n=du(this,e,t)),n);break;default:pu(this,this._t0,n=du(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function hu(e){this._context=new gu(e)}(hu.prototype=Object.create(mu.prototype)).point=function(e,t){mu.prototype.point.call(this,t,e)};function gu(e){this._context=e}gu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function _u(e){return new mu(e)}function vu(e){return new hu(e)}function yu(e){this._context=e}yu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=bu(e),i=bu(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function bu(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function xu(e){return new yu(e)}function Su(e,t){this._context=e,this._t=t}Su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function Cu(e){return new Su(e,.5)}function wu(e){return new Su(e,0)}function Tu(e){return new Su(e,1)}function Eu(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Du(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Ou(e,t){return e[t]}function ku(e){let t=[];return t.key=e,t}function Au(){var e=ol([]),t=Du,n=Eu,r=Ou;function i(i){var a=Array.from(e.apply(this,arguments),ku),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=ml(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:ol(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:ol(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Du:typeof e==`function`?e:ol(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Eu,i):n},i}function ju(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Eu(e,t)}}function Mu(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Eu(e,t)}}function Nu(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Eu(e,t)}}var Pu=l(Xc());function Fu(e){"@babel/helpers - typeof";return Fu=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Fu(e)}var Iu=[`type`,`size`,`sizeType`];function Lu(){return Lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lu.apply(this,arguments)}function Ru(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ru(Object(n),!0).forEach(function(t){Bu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ru(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bu(e,t,n){return t=Vu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vu(e){var t=Hu(e,`string`);return Fu(t)==`symbol`?t:t+``}function Hu(e,t){if(Fu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Fu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Uu(e,t){if(e==null)return{};var n=Wu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wu(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Gu={symbolCircle:El,symbolCross:Dl,symbolDiamond:Al,symbolSquare:jl,symbolStar:Il,symbolTriangle:Rl,symbolWye:Ul},Ku=Math.PI/180,qu=function(e){return Gu[`symbol${(0,Pu.default)(e)}`]||El},Ju=function(e,t,n){if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*Ku;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Yu=function(e,t){Gu[`symbol${(0,Pu.default)(e)}`]=t},Xu=function(e){var t=e.type,n=t===void 0?`circle`:t,r=e.size,i=r===void 0?64:r,a=e.sizeType,o=a===void 0?`area`:a,s=zu(zu({},Uu(e,Iu)),{},{type:n,size:i,sizeType:o}),c=function(){var e=qu(n);return Wl().type(e).size(Ju(i,o,n))()},l=s.className,u=s.cx,d=s.cy,f=Z(s,!0);return u===+u&&d===+d&&i===+i?v.createElement(`path`,Lu({},f,{className:q(`recharts-symbols`,l),transform:`translate(${u}, ${d})`,d:c()})):null};Xu.registerSymbol=Yu;function Zu(e){"@babel/helpers - typeof";return Zu=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Zu(e)}function Qu(){return Qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qu.apply(this,arguments)}function $u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ed(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$u(Object(n),!0).forEach(function(t){dd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function td(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function nd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,fd(r.key),r)}}function rd(e,t,n){return t&&nd(e.prototype,t),n&&nd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function id(e,t,n){return t=cd(t),ad(e,sd()?Reflect.construct(t,n||[],cd(e).constructor):t.apply(e,n))}function ad(e,t){if(t&&(Zu(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return od(e)}function od(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function sd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sd=function(){return!!e})()}function cd(e){return cd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cd(e)}function ld(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ud(e,t)}function ud(e,t){return ud=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ud(e,t)}function dd(e,t,n){return t=fd(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fd(e){var t=pd(e,`string`);return Zu(t)==`symbol`?t:t+``}function pd(e,t){if(Zu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Zu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var md=32,hd=function(e){function t(){return td(this,t),id(this,t,arguments)}return ld(t,e),rd(t,[{key:`renderIcon`,value:function(e){var t=this.props.inactiveColor,n=md/2,r=md/6,i=md/3,a=e.inactive?t:e.color;if(e.type===`plainline`)return v.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:md,y2:n,className:`recharts-legend-icon`});if(e.type===`line`)return v.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:a,d:`M0,${n}h${i}
17
+ A${r},${r},0,1,1,${2*i},${n}
18
+ H${md}M${2*i},${n}
19
+ A${r},${r},0,1,1,${i},${n}`,className:`recharts-legend-icon`});if(e.type===`rect`)return v.createElement(`path`,{stroke:`none`,fill:a,d:`M0,${md/8}h${md}v${md*3/4}h${-md}z`,className:`recharts-legend-icon`});if(v.isValidElement(e.legendIcon)){var o=ed({},e);return delete o.legendIcon,v.cloneElement(e.legendIcon,o)}return v.createElement(Xu,{fill:a,cx:n,cy:n,size:md,sizeType:`diameter`,type:e.type})}},{key:`renderItems`,value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,i=t.layout,a=t.formatter,o=t.inactiveColor,s={x:0,y:0,width:md,height:md},c={display:i===`horizontal`?`inline-block`:`block`,marginRight:10},l={display:`inline-block`,verticalAlign:`middle`,marginRight:4};return n.map(function(t,n){var i=t.formatter||a,u=q(dd(dd({"recharts-legend-item":!0},`legend-item-${n}`,!0),`inactive`,t.inactive));if(t.type===`none`)return null;var d=(0,X.default)(t.value)?null:t.value;(0,X.default)(t.value);var f=t.inactive?o:t.color;return v.createElement(`li`,Qu({className:u,style:c,key:`legend-item-${n}`},lc(e.props,t,n)),v.createElement(Lc,{width:r,height:r,viewBox:s,style:l},e.renderIcon(t)),v.createElement(`span`,{className:`recharts-legend-item-text`,style:{color:f}},i?i(d,t,n):d))})}},{key:`render`,value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:n===`horizontal`?r:`left`};return v.createElement(`ul`,{className:`recharts-default-legend`,style:i},this.renderItems())}}])}(v.PureComponent);dd(hd,`displayName`,`Legend`),dd(hd,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`middle`,inactiveColor:`#ccc`});var gd=o(((e,t)=>{var n=us();function r(){this.__data__=new n,this.size=0}t.exports=r})),_d=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),vd=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),yd=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),bd=o(((e,t)=>{var n=us(),r=ds(),i=ys(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),xd=o(((e,t)=>{var n=us(),r=gd(),i=_d(),a=vd(),o=yd(),s=bd();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),Sd=o(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),Cd=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),wd=o(((e,t)=>{var n=ys(),r=Sd(),i=Cd();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),Td=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),Ed=o(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),Dd=o(((e,t)=>{var n=wd(),r=Td(),i=Ed(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),Od=o(((e,t)=>{t.exports=Po().Uint8Array})),kd=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),Ad=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),jd=o(((e,t)=>{var n=Fo(),r=Od(),i=is(),a=Dd(),o=kd(),s=Ad(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),Md=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),Nd=o(((e,t)=>{var n=Md(),r=Mo();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),Pd=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),Fd=o(((e,t)=>{function n(){return[]}t.exports=n})),Id=o(((e,t)=>{var n=Pd(),r=Fd(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),Ld=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),Rd=o(((e,t)=>{var n=Ro(),r=zo(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),zd=o(((e,t)=>{var n=Rd(),r=zo(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),Bd=o(((e,t)=>{function n(){return!1}t.exports=n})),Vd=o(((e,t)=>{var n=Po(),r=Bd(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),Hd=o(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),Ud=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Wd=o(((e,t)=>{var n=Ro(),r=Ud(),i=zo(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),Gd=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Kd=o(((e,t)=>{var n=No(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),qd=o(((e,t)=>{var n=Wd(),r=Gd(),i=Kd(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),Jd=o(((e,t)=>{var n=Ld(),r=zd(),i=Mo(),a=Vd(),o=Hd(),s=qd(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),Yd=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),Xd=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Zd=o(((e,t)=>{t.exports=Xd()(Object.keys,Object)})),Qd=o(((e,t)=>{var n=Yd(),r=Zd(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),$d=o(((e,t)=>{var n=Uo(),r=Ud();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),ef=o(((e,t)=>{var n=Jd(),r=Qd(),i=$d();function a(e){return i(e)?n(e):r(e)}t.exports=a})),tf=o(((e,t)=>{var n=Nd(),r=Id(),i=ef();function a(e){return n(e,i,r)}t.exports=a})),nf=o(((e,t)=>{var n=tf(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),rf=o(((e,t)=>{t.exports=Yo()(Po(),`DataView`)})),af=o(((e,t)=>{t.exports=Yo()(Po(),`Promise`)})),of=o(((e,t)=>{t.exports=Yo()(Po(),`Set`)})),sf=o(((e,t)=>{t.exports=Yo()(Po(),`WeakMap`)})),cf=o(((e,t)=>{var n=rf(),r=ds(),i=af(),a=of(),o=sf(),s=Ro(),c=Ko(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),lf=o(((e,t)=>{var n=xd(),r=Dd(),i=jd(),a=nf(),o=cf(),s=Mo(),c=Vd(),l=qd(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),uf=o(((e,t)=>{var n=lf(),r=zo();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),df=o(((e,t)=>{var n=xd(),r=uf(),i=1,a=2;function o(e,t,o,s){var c=o.length,l=c,u=!s;if(e==null)return!l;for(e=Object(e);c--;){var d=o[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++c<l;){d=o[c];var f=d[0],p=e[f],m=d[1];if(u&&d[2]){if(p===void 0&&!(f in e))return!1}else{var h=new n;if(s)var g=s(p,m,f,e,t,h);if(!(g===void 0?r(m,p,i|a,s,h):g))return!1}}return!0}t.exports=o})),ff=o(((e,t)=>{var n=Ho();function r(e){return e===e&&!n(e)}t.exports=r})),pf=o(((e,t)=>{var n=ff(),r=ef();function i(e){for(var t=r(e),i=t.length;i--;){var a=t[i],o=e[a];t[i]=[a,o,n(o)]}return t}t.exports=i})),mf=o(((e,t)=>{function n(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}t.exports=n})),hf=o(((e,t)=>{var n=df(),r=pf(),i=mf();function a(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}t.exports=a})),gf=o(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),_f=o(((e,t)=>{var n=Es(),r=zd(),i=Mo(),a=Hd(),o=Ud(),s=Ds();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),vf=o(((e,t)=>{var n=gf(),r=_f();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),yf=o(((e,t)=>{var n=uf(),r=ks(),i=vf(),a=Vo(),o=ff(),s=mf(),c=Ds(),l=1,u=2;function d(e,t){return a(e)&&o(t)?s(c(e),t):function(a){var o=r(a,e);return o===void 0&&o===t?i(a,e):n(t,o,l|u)}}t.exports=d})),bf=o(((e,t)=>{function n(e){return e}t.exports=n})),xf=o(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),Sf=o(((e,t)=>{var n=Os();function r(e){return function(t){return n(t,e)}}t.exports=r})),Cf=o(((e,t)=>{var n=xf(),r=Sf(),i=Vo(),a=Ds();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),wf=o(((e,t)=>{var n=hf(),r=yf(),i=bf(),a=Mo(),o=Cf();function s(e){return typeof e==`function`?e:e==null?i:typeof e==`object`?a(e)?r(e[0],e[1]):n(e):o(e)}t.exports=s})),Tf=o(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),Ef=o(((e,t)=>{function n(e){return e!==e}t.exports=n})),Df=o(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),Of=o(((e,t)=>{var n=Tf(),r=Ef(),i=Df();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),kf=o(((e,t)=>{var n=Of();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),Af=o(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),jf=o(((e,t)=>{function n(){}t.exports=n})),Mf=o(((e,t)=>{var n=of(),r=jf(),i=Ad();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),Nf=o(((e,t)=>{var n=wd(),r=kf(),i=Af(),a=Ed(),o=Mf(),s=Ad(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u<f;){var _=e[u],v=t?t(_):_;if(_=l||_!==0?_:0,p&&v===v){for(var y=h.length;y--;)if(h[y]===v)continue outer;t&&h.push(v),m.push(_)}else d(h,v,l)||(h!==m&&h.push(v),m.push(_))}return m}t.exports=l})),Pf=l(o(((e,t)=>{var n=wf(),r=Nf();function i(e,t){return e&&e.length?r(e,n(t,2)):[]}t.exports=i}))());function Ff(e,t,n){return t===!0?(0,Pf.default)(e,n):(0,X.default)(t)?(0,Pf.default)(e,t):e}function If(e){"@babel/helpers - typeof";return If=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},If(e)}var Lf=[`ref`];function Rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Rf(Object(n),!0).forEach(function(t){Xf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bf(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Vf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Zf(r.key),r)}}function Hf(e,t,n){return t&&Vf(e.prototype,t),n&&Vf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uf(e,t,n){return t=qf(t),Wf(e,Kf()?Reflect.construct(t,n||[],qf(e).constructor):t.apply(e,n))}function Wf(e,t){if(t&&(If(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Gf(e)}function Gf(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Kf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kf=function(){return!!e})()}function qf(e){return qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qf(e)}function Jf(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yf(e,t)}function Yf(e,t){return Yf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yf(e,t)}function Xf(e,t,n){return t=Zf(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zf(e){var t=Qf(e,`string`);return If(t)==`symbol`?t:t+``}function Qf(e,t){if(If(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(If(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $f(e,t){if(e==null)return{};var n=ep(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ep(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tp(e){return e.value}function np(e,t){if(v.isValidElement(e))return v.cloneElement(e,t);if(typeof e==`function`)return v.createElement(e,t);t.ref;var n=$f(t,Lf);return v.createElement(hd,n)}var rp=1,ip=function(e){function t(){var e;Bf(this,t);var n=[...arguments];return e=Uf(this,t,[].concat(n)),Xf(e,`lastBoundingBox`,{width:-1,height:-1}),e}return Jf(t,e),Hf(t,[{key:`componentDidMount`,value:function(){this.updateBBox()}},{key:`componentDidUpdate`,value:function(){this.updateBBox()}},{key:`getBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:`updateBBox`,value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>rp||Math.abs(t.height-this.lastBoundingBox.height)>rp)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:`getBBoxSnapshot`,value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?zf({},this.lastBoundingBox):{width:0,height:0}}},{key:`getDefaultPosition`,value:function(e){var t=this.props,n=t.layout,r=t.align,i=t.verticalAlign,a=t.margin,o=t.chartWidth,s=t.chartHeight,c,l;if(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null)){if(r===`center`&&n===`vertical`){var u=this.getBBoxSnapshot();c={left:((o||0)-u.width)/2}}else c=r===`right`?{right:a&&a.right||0}:{left:a&&a.left||0}}if(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null)){if(i===`middle`){var d=this.getBBoxSnapshot();l={top:((s||0)-d.height)/2}}else l=i===`bottom`?{bottom:a&&a.bottom||0}:{top:a&&a.top||0}}return zf(zf({},c),l)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.content,r=t.width,i=t.height,a=t.wrapperStyle,o=t.payloadUniqBy,s=t.payload,c=zf(zf({position:`absolute`,width:r||`auto`,height:i||`auto`},this.getDefaultPosition(a)),a);return v.createElement(`div`,{className:`recharts-legend-wrapper`,style:c,ref:function(t){e.wrapperNode=t}},np(n,zf(zf({},this.props),{},{payload:Ff(s,o,tp)})))}}],[{key:`getWithHeight`,value:function(e,t){var n=zf(zf({},this.defaultProps),e.props).layout;return n===`vertical`&&Y(e.props.height)?{height:e.props.height}:n===`horizontal`?{width:e.props.width||t}:null}}])}(v.PureComponent);Xf(ip,`displayName`,`Legend`),Xf(ip,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`bottom`});var ap=o(((e,t)=>{var n=Fo(),r=zd(),i=Mo(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),op=o(((e,t)=>{var n=Md(),r=ap();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),sp=o(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),cp=o(((e,t)=>{t.exports=sp()()})),lp=o(((e,t)=>{var n=cp(),r=ef();function i(e,t){return e&&n(e,t,r)}t.exports=i})),up=o(((e,t)=>{var n=$d();function r(e,t){return function(r,i){if(r==null)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}t.exports=r})),dp=o(((e,t)=>{var n=lp();t.exports=up()(n)})),fp=o(((e,t)=>{var n=dp(),r=$d();function i(e,t){var i=-1,a=r(e)?Array(e.length):[];return n(e,function(e,n,r){a[++i]=t(e,n,r)}),a}t.exports=i})),pp=o(((e,t)=>{function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n})),mp=o(((e,t)=>{var n=Bo();function r(e,t){if(e!==t){var r=e!==void 0,i=e===null,a=e===e,o=n(e),s=t!==void 0,c=t===null,l=t===t,u=n(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}t.exports=r})),hp=o(((e,t)=>{var n=mp();function r(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*(r[i]==`desc`?-1:1)}return e.index-t.index}t.exports=r})),gp=o(((e,t)=>{var n=Cs(),r=Os(),i=wf(),a=fp(),o=pp(),s=Gd(),c=hp(),l=bf(),u=Mo();function d(e,t,d){t=t.length?n(t,function(e){return u(e)?function(t){return r(t,e.length===1?e[0]:e)}:e}):[l];var f=-1;return t=n(t,s(i)),o(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,d)})}t.exports=d})),_p=o(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),vp=o(((e,t)=>{var n=_p(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),yp=o(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),bp=o(((e,t)=>{var n=Yo();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),xp=o(((e,t)=>{var n=yp(),r=bp(),i=bf();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),Sp=o(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),Cp=o(((e,t)=>{var n=xp();t.exports=Sp()(n)})),wp=o(((e,t)=>{var n=bf(),r=vp(),i=Cp();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),Tp=o(((e,t)=>{var n=is(),r=$d(),i=Hd(),a=Ho();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),Ep=l(o(((e,t)=>{var n=op(),r=gp(),i=wp(),a=Tp();t.exports=i(function(e,t){if(e==null)return[];var i=t.length;return i>1&&a(e,t[0],t[1])?t=[]:i>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])})}))());function Dp(e){"@babel/helpers - typeof";return Dp=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Dp(e)}function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Op.apply(this,arguments)}function kp(e,t){return Pp(e)||Np(e,t)||jp(e,t)||Ap()}function Ap(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jp(e,t){if(e){if(typeof e==`string`)return Mp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mp(e,t)}}function Mp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Np(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Pp(e){if(Array.isArray(e))return e}function Fp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fp(Object(n),!0).forEach(function(t){Lp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lp(e,t,n){return t=Rp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rp(e){var t=zp(e,`string`);return Dp(t)==`symbol`?t:t+``}function zp(e,t){if(Dp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Dp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Bp(e){return Array.isArray(e)&&Us(e[0])&&Us(e[1])?e.join(` ~ `):e}var Vp=function(e){var t=e.separator,n=t===void 0?` : `:t,r=e.contentStyle,i=r===void 0?{}:r,a=e.itemStyle,o=a===void 0?{}:a,s=e.labelStyle,c=s===void 0?{}:s,l=e.payload,u=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,m=e.label,h=e.labelFormatter,g=e.accessibilityLayer,_=g!==void 0&&g,y=function(){if(l&&l.length){var e={padding:0,margin:0},t=(d?(0,Ep.default)(l,d):l).map(function(e,t){if(e.type===`none`)return null;var r=Ip({display:`block`,paddingTop:4,paddingBottom:4,color:e.color||`#000`},o),i=e.formatter||u||Bp,a=e.value,s=e.name,c=a,d=s;if(i&&c!=null&&d!=null){var f=i(a,s,e,t,l);if(Array.isArray(f)){var p=kp(f,2);c=p[0],d=p[1]}else c=f}return v.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:r},Us(d)?v.createElement(`span`,{className:`recharts-tooltip-item-name`},d):null,Us(d)?v.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,v.createElement(`span`,{className:`recharts-tooltip-item-value`},c),v.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return v.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},b=Ip({margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},i),x=Ip({margin:0},c),S=!(0,J.default)(m),C=S?m:``,w=q(`recharts-default-tooltip`,f),T=q(`recharts-tooltip-label`,p);S&&h&&l!=null&&(C=h(m,l));var E=_?{role:`status`,"aria-live":`assertive`}:{};return v.createElement(`div`,Op({className:w,style:b},E),v.createElement(`p`,{className:T,style:x},v.isValidElement(C)?C:`${C}`),y())};function Hp(e){"@babel/helpers - typeof";return Hp=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Hp(e)}function Up(e,t,n){return t=Wp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wp(e){var t=Gp(e,`string`);return Hp(t)==`symbol`?t:t+``}function Gp(e,t){if(Hp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Hp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Kp=`recharts-tooltip-wrapper`,qp={visibility:`hidden`};function Jp(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return q(Kp,Up(Up(Up(Up({},`${Kp}-right`,Y(n)&&t&&Y(t.x)&&n>=t.x),`${Kp}-left`,Y(n)&&t&&Y(t.x)&&n<t.x),`${Kp}-bottom`,Y(r)&&t&&Y(t.y)&&r>=t.y),`${Kp}-top`,Y(r)&&t&&Y(t.y)&&r<t.y))}function Yp(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,l=e.viewBoxDimension;if(a&&Y(a[r]))return a[r];var u=n[r]-s-i,d=n[r]+i;return t[r]?o[r]?u:d:o[r]?u<c[r]?Math.max(d,c[r]):Math.max(u,c[r]):d+s>c[r]+l?Math.max(u,c[r]):Math.max(d,c[r])}function Xp(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function Zp(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,l,u,d;return o.height>0&&o.width>0&&n?(u=Yp({allowEscapeViewBox:t,coordinate:n,key:`x`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=Yp({allowEscapeViewBox:t,coordinate:n,key:`y`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),l=Xp({translateX:u,translateY:d,useTranslate3d:s})):l=qp,{cssProperties:l,cssClasses:Jp({translateX:u,translateY:d,coordinate:n})}}function Qp(e){"@babel/helpers - typeof";return Qp=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Qp(e)}function $p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function em(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$p(Object(n),!0).forEach(function(t){dm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tm(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function nm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,fm(r.key),r)}}function rm(e,t,n){return t&&nm(e.prototype,t),n&&nm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function im(e,t,n){return t=cm(t),am(e,sm()?Reflect.construct(t,n||[],cm(e).constructor):t.apply(e,n))}function am(e,t){if(t&&(Qp(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return om(e)}function om(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function sm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sm=function(){return!!e})()}function cm(e){return cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cm(e)}function lm(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&um(e,t)}function um(e,t){return um=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},um(e,t)}function dm(e,t,n){return t=fm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fm(e){var t=pm(e,`string`);return Qp(t)==`symbol`?t:t+``}function pm(e,t){if(Qp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Qp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var mm=1,hm=function(e){function t(){var e;tm(this,t);var n=[...arguments];return e=im(this,t,[].concat(n)),dm(e,`state`,{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),dm(e,`handleKeyDown`,function(t){t.key===`Escape`&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:e.props.coordinate?.x??0,y:e.props.coordinate?.y??0}})}),e}return lm(t,e),rm(t,[{key:`updateBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>mm||Math.abs(e.height-this.state.lastBoundingBox.height)>mm)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:`componentDidMount`,value:function(){document.addEventListener(`keydown`,this.handleKeyDown),this.updateBBox()}},{key:`componentWillUnmount`,value:function(){document.removeEventListener(`keydown`,this.handleKeyDown)}},{key:`componentDidUpdate`,value:function(){this.props.active&&this.updateBBox(),this.state.dismissed&&(this.props.coordinate?.x!==this.state.dismissedAtCoordinate.x||this.props.coordinate?.y!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.children,s=t.coordinate,c=t.hasPayload,l=t.isAnimationActive,u=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.viewBox,h=t.wrapperStyle,g=Zp({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:u,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),_=g.cssClasses,y=g.cssProperties,b=em(em({transition:l&&n?`transform ${i}ms ${a}`:void 0},y),{},{pointerEvents:`none`,visibility:!this.state.dismissed&&n&&c?`visible`:`hidden`,position:`absolute`,top:0,left:0},h);return v.createElement(`div`,{tabIndex:-1,className:_,style:b,ref:function(t){e.wrapperNode=t}},o)}}])}(v.PureComponent),gm={isSsr:function(){return!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)}(),get:function(e){return gm[e]},set:function(e,t){if(typeof e==`string`)gm[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){gm[t]=e[t]})}}};function _m(e){"@babel/helpers - typeof";return _m=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_m(e)}function vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ym(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vm(Object(n),!0).forEach(function(t){Am(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bm(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function xm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,jm(r.key),r)}}function Sm(e,t,n){return t&&xm(e.prototype,t),n&&xm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cm(e,t,n){return t=Dm(t),wm(e,Em()?Reflect.construct(t,n||[],Dm(e).constructor):t.apply(e,n))}function wm(e,t){if(t&&(_m(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Tm(e)}function Tm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Em(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Em=function(){return!!e})()}function Dm(e){return Dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Dm(e)}function Om(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&km(e,t)}function km(e,t){return km=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},km(e,t)}function Am(e,t,n){return t=jm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jm(e){var t=Mm(e,`string`);return _m(t)==`symbol`?t:t+``}function Mm(e,t){if(_m(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_m(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Nm(e){return e.dataKey}function Pm(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e==`function`?v.createElement(e,t):v.createElement(Vp,t)}var Fm=function(e){function t(){return bm(this,t),Cm(this,t,arguments)}return Om(t,e),Sm(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.content,s=t.coordinate,c=t.filterNull,l=t.isAnimationActive,u=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,m=t.reverseDirection,h=t.useTranslate3d,g=t.viewBox,_=t.wrapperStyle,y=d??[];c&&y.length&&(y=Ff(d.filter(function(t){return t.value!=null&&(t.hide!==!0||e.props.includeHidden)}),f,Nm));var b=y.length>0;return v.createElement(hm,{allowEscapeViewBox:r,animationDuration:i,animationEasing:a,isAnimationActive:l,active:n,coordinate:s,hasPayload:b,offset:u,position:p,reverseDirection:m,useTranslate3d:h,viewBox:g,wrapperStyle:_},Pm(o,ym(ym({},this.props),{},{payload:y})))}}])}(v.PureComponent);Am(Fm,`displayName`,`Tooltip`),Am(Fm,`defaultProps`,{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!gm.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:` : `,trigger:`hover`,useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Im=o(((e,t)=>{var n=Po();t.exports=function(){return n.Date.now()}})),Lm=o(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),Rm=o(((e,t)=>{var n=Lm(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),zm=o(((e,t)=>{var n=Rm(),r=Ho(),i=Bo(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),Bm=o(((e,t)=>{var n=Ho(),r=Im(),i=zm(),a=`Expected a function`,o=Math.max,s=Math.min;function c(e,t,c){var l,u,d,f,p,m,h=0,g=!1,_=!1,v=!0;if(typeof e!=`function`)throw TypeError(a);t=i(t)||0,n(c)&&(g=!!c.leading,_=`maxWait`in c,d=_?o(i(c.maxWait)||0,t):d,v=`trailing`in c?!!c.trailing:v);function y(t){var n=l,r=u;return l=u=void 0,h=t,f=e.apply(r,n),f}function b(e){return h=e,p=setTimeout(C,t),g?y(e):f}function x(e){var n=e-m,r=e-h,i=t-n;return _?s(i,d-r):i}function S(e){var n=e-m,r=e-h;return m===void 0||n>=t||n<0||_&&r>=d}function C(){var e=r();if(S(e))return w(e);p=setTimeout(C,x(e))}function w(e){return p=void 0,v&&l?y(e):(l=u=void 0,f)}function T(){p!==void 0&&clearTimeout(p),h=0,l=m=u=p=void 0}function E(){return p===void 0?f:w(r())}function D(){var e=r(),n=S(e);if(l=arguments,u=this,m=e,n){if(p===void 0)return b(m);if(_)return clearTimeout(p),p=setTimeout(C,t),y(m)}return p===void 0&&(p=setTimeout(C,t)),f}return D.cancel=T,D.flush=E,D}t.exports=c})),Vm=l(o(((e,t)=>{var n=Bm(),r=Ho(),i=`Expected a function`;function a(e,t,a){var o=!0,s=!0;if(typeof e!=`function`)throw TypeError(i);return r(a)&&(o=`leading`in a?!!a.leading:o,s=`trailing`in a?!!a.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}t.exports=a}))());function Hm(e){"@babel/helpers - typeof";return Hm=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Hm(e)}function Um(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Um(Object(n),!0).forEach(function(t){Gm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Um(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gm(e,t,n){return t=Km(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Km(e){var t=qm(e,`string`);return Hm(t)==`symbol`?t:t+``}function qm(e,t){if(Hm(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Hm(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Jm(e,t){return $m(e)||Qm(e,t)||Xm(e,t)||Ym()}function Ym(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xm(e,t){if(e){if(typeof e==`string`)return Zm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zm(e,t)}}function Zm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qm(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function $m(e){if(Array.isArray(e))return e}var eh=(0,v.forwardRef)(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?`100%`:a,s=e.height,c=s===void 0?`100%`:s,l=e.minWidth,u=l===void 0?0:l,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=m===void 0?0:m,g=e.id,_=e.className,y=e.onResize,b=e.style,x=b===void 0?{}:b,S=(0,v.useRef)(null),C=(0,v.useRef)();C.current=y,(0,v.useImperativeHandle)(t,function(){return Object.defineProperty(S.current,"current",{get:function(){return console.warn(`The usage of ref.current.current is deprecated and will no longer be supported.`),S.current},configurable:!0})});var w=Jm((0,v.useState)({containerWidth:i.width,containerHeight:i.height}),2),T=w[0],E=w[1],D=(0,v.useCallback)(function(e,t){E(function(n){var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,v.useEffect)(function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,i=n.height;D(r,i),(t=C.current)==null||t.call(C,r,i)};h>0&&(e=(0,Vm.default)(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=S.current.getBoundingClientRect(),r=n.width,i=n.height;return D(r,i),t.observe(S.current),function(){t.disconnect()}},[D,h]);var O=(0,v.useMemo)(function(){var e=T.containerWidth,t=T.containerHeight;if(e<0||t<0)return null;Vs(o)||Vs(c);var r=Vs(o)?e:o,i=Vs(c)?t:c;n&&n>0&&(r?i=r/n:i&&(r=i*n),f&&i>f&&(i=f));var a=!Array.isArray(p)&&_c(p.type).endsWith(`Chart`);return v.Children.map(p,function(e){return v.isValidElement(e)?(0,v.cloneElement)(e,Wm({width:r,height:i},a?{style:Wm({height:`100%`,width:`100%`,maxHeight:i,maxWidth:r},e.props.style)}:{})):e})},[n,p,c,f,d,u,T,o]);return v.createElement(`div`,{id:g?`${g}`:void 0,className:q(`recharts-responsive-container`,_),style:Wm(Wm({},x),{},{width:o,height:c,minWidth:u,minHeight:d,maxHeight:f}),ref:S},O)}),th=function(e){return null};th.displayName=`Cell`;function nh(e){"@babel/helpers - typeof";return nh=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},nh(e)}function rh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ih(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rh(Object(n),!0).forEach(function(t){ah(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ah(e,t,n){return t=oh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oh(e){var t=sh(e,`string`);return nh(t)==`symbol`?t:t+``}function sh(e,t){if(nh(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(nh(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ch={widthCache:{},cacheCount:0},lh=2e3,uh={position:`absolute`,top:`-20000px`,left:0,padding:0,margin:0,border:`none`,whiteSpace:`pre`},dh=`recharts_measurement_span`;function fh(e){var t=ih({},e);return Object.keys(t).forEach(function(e){t[e]||delete t[e]}),t}var ph=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||gm.isSsr)return{width:0,height:0};var n=fh(t),r=JSON.stringify({text:e,copyStyle:n});if(ch.widthCache[r])return ch.widthCache[r];try{var i=document.getElementById(dh);i||(i=document.createElement(`span`),i.setAttribute(`id`,dh),i.setAttribute(`aria-hidden`,`true`),document.body.appendChild(i));var a=ih(ih({},uh),n);Object.assign(i.style,a),i.textContent=`${e}`;var o=i.getBoundingClientRect(),s={width:o.width,height:o.height};return ch.widthCache[r]=s,++ch.cacheCount>lh&&(ch.cacheCount=0,ch.widthCache={}),s}catch{return{width:0,height:0}}},mh=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function hh(e){"@babel/helpers - typeof";return hh=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hh(e)}function gh(e,t){return xh(e)||bh(e,t)||vh(e,t)||_h()}function _h(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vh(e,t){if(e){if(typeof e==`string`)return yh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yh(e,t)}}function yh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bh(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function xh(e){if(Array.isArray(e))return e}function Sh(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Ch(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Th(r.key),r)}}function wh(e,t,n){return t&&Ch(e.prototype,t),n&&Ch(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Th(e){var t=Eh(e,`string`);return hh(t)==`symbol`?t:t+``}function Eh(e,t){if(hh(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(hh(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Dh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Oh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,kh=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Ah=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,jh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},Mh=Object.keys(jh),Nh=`NaN`;function Ph(e,t){return e*jh[t]}var Fh=function(){function e(t,n){Sh(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=``),n!==``&&!kh.test(n)&&(this.num=NaN,this.unit=``),Mh.includes(n)&&(this.num=Ph(t,n),this.unit=`px`)}return wh(e,[{key:`add`,value:function(t){return this.unit===t.unit?new e(this.num+t.num,this.unit):new e(NaN,``)}},{key:`subtract`,value:function(t){return this.unit===t.unit?new e(this.num-t.num,this.unit):new e(NaN,``)}},{key:`multiply`,value:function(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num*t.num,this.unit||t.unit)}},{key:`divide`,value:function(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num/t.num,this.unit||t.unit)}},{key:`toString`,value:function(){return`${this.num}${this.unit}`}},{key:`isNaN`,value:function(){return Number.isNaN(this.num)}}],[{key:`parse`,value:function(t){var n=gh(Ah.exec(t)??[],3),r=n[1],i=n[2];return new e(parseFloat(r),i??``)}}])}();function Ih(e){if(e.includes(Nh))return Nh;for(var t=e;t.includes(`*`)||t.includes(`/`);){var n=gh(Dh.exec(t)??[],4),r=n[1],i=n[2],a=n[3],o=Fh.parse(r??``),s=Fh.parse(a??``),c=i===`*`?o.multiply(s):o.divide(s);if(c.isNaN())return Nh;t=t.replace(Dh,c.toString())}for(;t.includes(`+`)||/.-\d+(?:\.\d+)?/.test(t);){var l=gh(Oh.exec(t)??[],4),u=l[1],d=l[2],f=l[3],p=Fh.parse(u??``),m=Fh.parse(f??``),h=d===`+`?p.add(m):p.subtract(m);if(h.isNaN())return Nh;t=t.replace(Oh,h.toString())}return t}var Lh=/\(([^()]*)\)/;function Rh(e){for(var t=e;t.includes(`(`);){var n=gh(Lh.exec(t),2)[1];t=t.replace(Lh,Ih(n))}return t}function zh(e){var t=e.replace(/\s+/g,``);return t=Rh(t),t=Ih(t),t}function Bh(e){try{return zh(e)}catch{return Nh}}function Vh(e){var t=Bh(e.slice(5,-1));return t===Nh?``:t}var Hh=[`x`,`y`,`lineHeight`,`capHeight`,`scaleToFit`,`textAnchor`,`verticalAnchor`,`fill`],Uh=[`dx`,`dy`,`angle`,`className`,`breakAll`];function Wh(){return Wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wh.apply(this,arguments)}function Gh(e,t){if(e==null)return{};var n=Kh(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kh(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qh(e,t){return Qh(e)||Zh(e,t)||Yh(e,t)||Jh()}function Jh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
23
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yh(e,t){if(e){if(typeof e==`string`)return Xh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xh(e,t)}}function Xh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Zh(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Qh(e){if(Array.isArray(e))return e}var $h=/[ \f\n\r\t\v\u2028\u2029]+/,eg=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return(0,J.default)(t)||(i=n?t.toString().split(``):t.toString().split($h)),{wordsWithComputedWidth:i.map(function(e){return{word:e,width:ph(e,r).width}}),spaceWidth:n?0:ph(`\xA0`,r).width}}catch{return null}},tg=function(e,t,n,r,i){var a=e.maxLines,o=e.children,s=e.style,c=e.breakAll,l=Y(a),u=o,d=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(e,t){var a=t.word,o=t.width,s=e[e.length-1];if(s&&(r==null||i||s.width+o+n<Number(r)))s.words.push(a),s.width+=o+n;else{var c={words:[a],width:o};e.push(c)}return e},[])},f=d(t),p=function(e){return e.reduce(function(e,t){return e.width>t.width?e:t})};if(!l)return f;for(var m=`…`,h=function(e){var t=eg({breakAll:c,style:s,children:u.slice(0,e)+m}).wordsWithComputedWidth,n=d(t);return[n.length>a||p(n).width>Number(r),n]},g=0,_=u.length-1,v=0,y;g<=_&&v<=u.length-1;){var b=Math.floor((g+_)/2),x=qh(h(b-1),2),S=x[0],C=x[1],w=qh(h(b),1)[0];if(!S&&!w&&(g=b+1),S&&w&&(_=b-1),!S&&w){y=C;break}v++}return y||f},ng=function(e){return[{words:(0,J.default)(e)?[]:e.toString().split($h)}]},rg=function(e){var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,a=e.breakAll,o=e.maxLines;if((t||n)&&!gm.isSsr){var s,c,l=eg({breakAll:a,children:r,style:i});if(l){var u=l.wordsWithComputedWidth,d=l.spaceWidth;s=u,c=d}else return ng(r);return tg({breakAll:a,children:r,maxLines:o,style:i},s,c,t,n)}return ng(r)},ig=`#808080`,ag=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.lineHeight,o=a===void 0?`1em`:a,s=e.capHeight,c=s===void 0?`0.71em`:s,l=e.scaleToFit,u=l!==void 0&&l,d=e.textAnchor,f=d===void 0?`start`:d,p=e.verticalAnchor,m=p===void 0?`end`:p,h=e.fill,g=h===void 0?ig:h,_=Gh(e,Hh),y=(0,v.useMemo)(function(){return rg({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:u,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,u,_.style,_.width]),b=_.dx,x=_.dy,S=_.angle,C=_.className,w=_.breakAll,T=Gh(_,Uh);if(!Us(n)||!Us(i))return null;var E=n+(Y(b)?b:0),D=i+(Y(x)?x:0),O;switch(m){case`start`:O=Vh(`calc(${c})`);break;case`middle`:O=Vh(`calc(${(y.length-1)/2} * -${o} + (${c} / 2))`);break;default:O=Vh(`calc(${y.length-1} * -${o})`)}var k=[];if(u){var A=y[0].width,j=_.width;k.push(`scale(${(Y(j)?j/A:1)/A})`)}return S&&k.push(`rotate(${S}, ${E}, ${D})`),k.length&&(T.transform=k.join(` `)),v.createElement(`text`,Wh({},Z(T,!0),{x:E,y:D,className:q(`recharts-text`,C),textAnchor:f,fill:g.includes(`url`)?ig:g}),y.map(function(e,t){var n=e.words.join(w?``:` `);return v.createElement(`tspan`,{x:E,dy:t===0?O:o,key:`${n}-${t}`},n)}))};function og(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sg(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function cg(e){let t,n,r;e.length===2?(t=e===og||e===sg?e:lg,n=e,r=e):(t=og,n=(t,n)=>og(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function lg(){return 0}function ug(e){return e===null?NaN:+e}function*dg(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var fg=cg(og),pg=fg.right;fg.left,cg(ug).center;var mg=class extends Map{constructor(e,t=vg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(hg(this,e))}has(e){return super.has(hg(this,e))}set(e,t){return super.set(gg(this,e),t)}delete(e){return super.delete(_g(this,e))}};function hg({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function gg({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function _g({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function vg(e){return typeof e==`object`&&e?e.valueOf():e}function yg(e=og){if(e===og)return bg;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function bg(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}Array.prototype.slice;var xg=Math.sqrt(50),Sg=Math.sqrt(10),Cg=Math.sqrt(2);function wg(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=xg?10:a>=Sg?5:a>=Cg?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?wg(e,t,n*2):[s,c,l]}function Tg(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?wg(t,e,n):wg(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function Eg(e,t,n){return t=+t,e=+e,n=+n,wg(e,t,n)[2]}function Dg(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?Eg(t,e,n):Eg(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Og(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function kg(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ag(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?bg:yg(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));Ag(e,t,u,d,i)}let a=e[t],o=n,s=r;for(jg(e,n,t),i(e[r],a)>0&&jg(e,n,r);o<s;){for(jg(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?jg(e,n,s):(++s,jg(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function jg(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function Mg(e,t,n){if(e=Float64Array.from(dg(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return kg(e);if(t>=1)return Og(e);var r,i=(r-1)*t,a=Math.floor(i),o=Og(Ag(e,a).subarray(0,a+1));return o+(kg(e.subarray(a+1))-o)*(i-a)}}function Ng(e,t,n=ug){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function Pg(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function Fg(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ig(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Lg(){}var Rg=.7,zg=1/Rg,Bg=`\\s*([+-]?\\d+)\\s*`,Vg=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Hg=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Ug=/^#([0-9a-f]{3,8})$/,Wg=RegExp(`^rgb\\(${Bg},${Bg},${Bg}\\)$`),Gg=RegExp(`^rgb\\(${Hg},${Hg},${Hg}\\)$`),Kg=RegExp(`^rgba\\(${Bg},${Bg},${Bg},${Vg}\\)$`),qg=RegExp(`^rgba\\(${Hg},${Hg},${Hg},${Vg}\\)$`),Jg=RegExp(`^hsl\\(${Vg},${Hg},${Hg}\\)$`),Yg=RegExp(`^hsla\\(${Vg},${Hg},${Hg},${Vg}\\)$`),Xg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Fg(Lg,t_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Zg,formatHex:Zg,formatHex8:Qg,formatHsl:$g,formatRgb:e_,toString:e_});function Zg(){return this.rgb().formatHex()}function Qg(){return this.rgb().formatHex8()}function $g(){return m_(this).formatHsl()}function e_(){return this.rgb().formatRgb()}function t_(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Ug.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?n_(t):n===3?new o_(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?r_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?r_(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Wg.exec(e))?new o_(t[1],t[2],t[3],1):(t=Gg.exec(e))?new o_(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Kg.exec(e))?r_(t[1],t[2],t[3],t[4]):(t=qg.exec(e))?r_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Jg.exec(e))?p_(t[1],t[2]/100,t[3]/100,1):(t=Yg.exec(e))?p_(t[1],t[2]/100,t[3]/100,t[4]):Xg.hasOwnProperty(e)?n_(Xg[e]):e===`transparent`?new o_(NaN,NaN,NaN,0):null}function n_(e){return new o_(e>>16&255,e>>8&255,e&255,1)}function r_(e,t,n,r){return r<=0&&(e=t=n=NaN),new o_(e,t,n,r)}function i_(e){return e instanceof Lg||(e=t_(e)),e?(e=e.rgb(),new o_(e.r,e.g,e.b,e.opacity)):new o_}function a_(e,t,n,r){return arguments.length===1?i_(e):new o_(e,t,n,r??1)}function o_(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Fg(o_,a_,Ig(Lg,{brighter(e){return e=e==null?zg:zg**+e,new o_(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rg:Rg**+e,new o_(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new o_(d_(this.r),d_(this.g),d_(this.b),u_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:s_,formatHex:s_,formatHex8:c_,formatRgb:l_,toString:l_}));function s_(){return`#${f_(this.r)}${f_(this.g)}${f_(this.b)}`}function c_(){return`#${f_(this.r)}${f_(this.g)}${f_(this.b)}${f_((isNaN(this.opacity)?1:this.opacity)*255)}`}function l_(){let e=u_(this.opacity);return`${e===1?`rgb(`:`rgba(`}${d_(this.r)}, ${d_(this.g)}, ${d_(this.b)}${e===1?`)`:`, ${e})`}`}function u_(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function d_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function f_(e){return e=d_(e),(e<16?`0`:``)+e.toString(16)}function p_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new g_(e,t,n,r)}function m_(e){if(e instanceof g_)return new g_(e.h,e.s,e.l,e.opacity);if(e instanceof Lg||(e=t_(e)),!e)return new g_;if(e instanceof g_)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new g_(o,s,c,e.opacity)}function h_(e,t,n,r){return arguments.length===1?m_(e):new g_(e,t,n,r??1)}function g_(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fg(g_,h_,Ig(Lg,{brighter(e){return e=e==null?zg:zg**+e,new g_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rg:Rg**+e,new g_(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new o_(y_(e>=240?e-240:e+120,i,r),y_(e,i,r),y_(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new g_(__(this.h),v_(this.s),v_(this.l),u_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=u_(this.opacity);return`${e===1?`hsl(`:`hsla(`}${__(this.h)}, ${v_(this.s)*100}%, ${v_(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function __(e){return e=(e||0)%360,e<0?e+360:e}function v_(e){return Math.max(0,Math.min(1,e||0))}function y_(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var b_=Math.PI/180,x_=180/Math.PI,S_=18,C_=.96422,w_=1,T_=.82521,E_=4/29,D_=6/29,O_=3*D_*D_,k_=D_*D_*D_;function A_(e){if(e instanceof M_)return new M_(e.l,e.a,e.b,e.opacity);if(e instanceof z_)return B_(e);e instanceof o_||(e=i_(e));var t=I_(e.r),n=I_(e.g),r=I_(e.b),i=N_((.2225045*t+.7168786*n+.0606169*r)/w_),a,o;return t===n&&n===r?a=o=i:(a=N_((.4360747*t+.3850649*n+.1430804*r)/C_),o=N_((.0139322*t+.0971045*n+.7141733*r)/T_)),new M_(116*i-16,500*(a-i),200*(i-o),e.opacity)}function j_(e,t,n,r){return arguments.length===1?A_(e):new M_(e,t,n,r??1)}function M_(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Fg(M_,j_,Ig(Lg,{brighter(e){return new M_(this.l+S_*(e??1),this.a,this.b,this.opacity)},darker(e){return new M_(this.l-S_*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=C_*P_(t),e=w_*P_(e),n=T_*P_(n),new o_(F_(3.1338561*t-1.6168667*e-.4906146*n),F_(-.9787684*t+1.9161415*e+.033454*n),F_(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function N_(e){return e>k_?e**(1/3):e/O_+E_}function P_(e){return e>D_?e*e*e:O_*(e-E_)}function F_(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function I_(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function L_(e){if(e instanceof z_)return new z_(e.h,e.c,e.l,e.opacity);if(e instanceof M_||(e=A_(e)),e.a===0&&e.b===0)return new z_(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*x_;return new z_(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function R_(e,t,n,r){return arguments.length===1?L_(e):new z_(e,t,n,r??1)}function z_(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function B_(e){if(isNaN(e.h))return new M_(e.l,0,0,e.opacity);var t=e.h*b_;return new M_(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Fg(z_,R_,Ig(Lg,{brighter(e){return new z_(this.h,this.c,this.l+S_*(e??1),this.opacity)},darker(e){return new z_(this.h,this.c,this.l-S_*(e??1),this.opacity)},rgb(){return B_(this).rgb()}}));var V_=-.14861,H_=1.78277,U_=-.29227,W_=-.90649,G_=1.97294,K_=G_*W_,q_=G_*H_,J_=H_*U_-W_*V_;function Y_(e){if(e instanceof Z_)return new Z_(e.h,e.s,e.l,e.opacity);e instanceof o_||(e=i_(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(J_*r+K_*t-q_*n)/(J_+K_-q_),a=r-i,o=(G_*(n-i)-U_*a)/W_,s=Math.sqrt(o*o+a*a)/(G_*i*(1-i)),c=s?Math.atan2(o,a)*x_-120:NaN;return new Z_(c<0?c+360:c,s,i,e.opacity)}function X_(e,t,n,r){return arguments.length===1?Y_(e):new Z_(e,t,n,r??1)}function Z_(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Fg(Z_,X_,Ig(Lg,{brighter(e){return e=e==null?zg:zg**+e,new Z_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rg:Rg**+e,new Z_(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*b_,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new o_(255*(t+n*(V_*r+H_*i)),255*(t+n*(U_*r+W_*i)),255*(t+G_*r*n),this.opacity)}}));var Q_=e=>()=>e;function $_(e,t){return function(n){return e+n*t}}function ev(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function tv(e,t){var n=t-e;return n?$_(e,n>180||n<-180?n-360*Math.round(n/360):n):Q_(isNaN(e)?t:e)}function nv(e){return(e=+e)==1?rv:function(t,n){return n-t?ev(t,n,e):Q_(isNaN(t)?n:t)}}function rv(e,t){var n=t-e;return n?$_(e,n):Q_(isNaN(e)?t:e)}var iv=(function e(t){var n=nv(t);function r(e,t){var r=n((e=a_(e)).r,(t=a_(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=rv(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function av(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function ov(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function sv(e,t){for(var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o=0;o<r;++o)i[o]=gv(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function cv(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function lv(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function uv(e,t){var n={},r={},i;for(i in typeof e==`object`&&e||(e={}),typeof t==`object`&&t||(t={}),t)i in e?n[i]=gv(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var dv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fv=new RegExp(dv.source,`g`);function pv(e){return function(){return e}}function mv(e){return function(t){return e(t)+``}}function hv(e,t){var n=dv.lastIndex=fv.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=dv.exec(e))&&(i=fv.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:lv(r,i)})),n=fv.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?mv(c[0].x):pv(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function gv(e,t){var n=typeof t,r;return t==null||n===`boolean`?Q_(t):(n===`number`?lv:n===`string`?(r=t_(t))?(t=r,iv):hv:t instanceof t_?iv:t instanceof Date?cv:ov(t)?av:Array.isArray(t)?sv:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?uv:lv)(e,t)}function _v(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var vv=1e-12;function yv(e){return((e=Math.exp(e))+1/e)/2}function bv(e){return((e=Math.exp(e))-1/e)/2}function xv(e){return((e=Math.exp(2*e))-1)/(e+1)}(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<vv)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=yv(y),c=s/(n*g)*(i*xv(t*r+y)-bv(y));return[a+c*d,o+c*f,s*i/yv(t*r+y)]}}return m.duration=Math.abs(h)*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4);function Sv(e){return(function t(n){n=+n;function r(t,r){var i=e((t=X_(t)).h,(r=X_(r)).h),a=rv(t.s,r.s),o=rv(t.l,r.l),s=rv(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=a(e),t.l=o(e**+n),t.opacity=s(e),t+``}}return r.gamma=t,r})(1)}Sv(tv),Sv(rv);function Cv(e,t){t===void 0&&(t=e,e=gv);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function wv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function Tv(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ev(e){return e=Tv(Math.abs(e)),e?e[1]:NaN}function Dv(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Ov(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var kv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Av(e){if(!(t=kv.exec(e)))throw Error(`invalid format: `+e);var t;return new jv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Av.prototype=jv.prototype;function jv(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}jv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function Mv(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var Nv;function Pv(e,t){var n=Tv(e,t);if(!n)return Nv=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Nv=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+Tv(e,Math.max(0,t+a-1))[0]}function Fv(e,t){var n=Tv(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var Iv={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:wv,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Fv(e*100,t),r:Fv,s:Pv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Lv(e){return e}var Rv=Array.prototype.map,zv=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Bv(e){var t=e.grouping===void 0||e.thousands===void 0?Lv:Dv(Rv.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?Lv:Ov(Rv.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=Av(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):Iv[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=Iv[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=Mv(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&Nv!==void 0?zv[8+Nv/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(Ev(t)/3)))*3,r=10**-n,i=l((e=Av(e),e.type=`f`,e),{suffix:zv[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var Vv,Hv,Uv;Wv({thousands:`,`,grouping:[3],currency:[`$`,``]});function Wv(e){return Vv=Bv(e),Hv=Vv.format,Uv=Vv.formatPrefix,Vv}function Gv(e){return Math.max(0,-Ev(Math.abs(e)))}function Kv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ev(t)/3)))*3-Ev(Math.abs(e)))}function qv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ev(t)-Ev(e))+1}var Jv=new Date,Yv=new Date;function Xv(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Xv(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(Jv.setTime(+t),Yv.setTime(+r),e(Jv),e(Yv),Math.floor(n(Jv,Yv))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Zv=Xv(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Zv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xv(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Zv),Zv.range;var Qv=1e3,$v=Qv*60,ey=$v*60,ty=ey*24,ny=ty*7,ry=ty*30,iy=ty*365,ay=Xv(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Qv)},(e,t)=>(t-e)/Qv,e=>e.getUTCSeconds());ay.range;var oy=Xv(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qv)},(e,t)=>{e.setTime(+e+t*$v)},(e,t)=>(t-e)/$v,e=>e.getMinutes());oy.range;var sy=Xv(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*$v)},(e,t)=>(t-e)/$v,e=>e.getUTCMinutes());sy.range;var cy=Xv(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qv-e.getMinutes()*$v)},(e,t)=>{e.setTime(+e+t*ey)},(e,t)=>(t-e)/ey,e=>e.getHours());cy.range;var ly=Xv(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ey)},(e,t)=>(t-e)/ey,e=>e.getUTCHours());ly.range;var uy=Xv(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$v)/ty,e=>e.getDate()-1);uy.range;var dy=Xv(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ty,e=>e.getUTCDate()-1);dy.range;var fy=Xv(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ty,e=>Math.floor(e/ty));fy.range;function py(e){return Xv(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$v)/ny)}var my=py(0),hy=py(1),gy=py(2),_y=py(3),vy=py(4),yy=py(5),by=py(6);my.range,hy.range,gy.range,_y.range,vy.range,yy.range,by.range;function xy(e){return Xv(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/ny)}var Sy=xy(0),Cy=xy(1),wy=xy(2),Ty=xy(3),Ey=xy(4),Dy=xy(5),Oy=xy(6);Sy.range,Cy.range,wy.range,Ty.range,Ey.range,Dy.range,Oy.range;var ky=Xv(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ky.range;var Ay=Xv(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Ay.range;var jy=Xv(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());jy.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xv(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),jy.range;var My=Xv(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());My.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xv(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),My.range;function Ny(e,t,n,r,i,a){let o=[[ay,1,Qv],[ay,5,5*Qv],[ay,15,15*Qv],[ay,30,30*Qv],[a,1,$v],[a,5,5*$v],[a,15,15*$v],[a,30,30*$v],[i,1,ey],[i,3,3*ey],[i,6,6*ey],[i,12,12*ey],[r,1,ty],[r,2,2*ty],[n,1,ny],[t,1,ry],[t,3,3*ry],[e,1,iy]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=cg(([,,e])=>e).right(o,i);if(a===o.length)return e.every(Dg(t/iy,n/iy,r));if(a===0)return Zv.every(Math.max(Dg(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[Py,Fy]=Ny(My,Ay,Sy,fy,ly,sy),[Iy,Ly]=Ny(jy,ky,my,uy,cy,oy);function Ry(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function zy(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function By(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Vy(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Jy(i),u=Yy(i),d=Jy(a),f=Yy(a),p=Jy(o),m=Yy(o),h=Jy(s),g=Yy(s),_=Jy(c),v=Yy(c),y={a:te,A:ne,b:re,B:ie,c:null,d:gb,e:gb,f:xb,g:Mb,G:Pb,H:_b,I:vb,j:yb,L:bb,m:Sb,M:Cb,p:ae,q:oe,Q:rx,s:ix,S:wb,u:Tb,U:Eb,V:Ob,w:kb,W:Ab,x:null,X:null,y:jb,Y:Nb,Z:Fb,"%":nx},b={a:se,A:ce,b:le,B:ue,c:null,d:Ib,e:Ib,f:Vb,g:Qb,G:ex,H:Lb,I:Rb,j:zb,L:Bb,m:Hb,M:Ub,p:de,q:fe,Q:rx,s:ix,S:Wb,u:Gb,U:Kb,V:Jb,w:Yb,W:Xb,x:null,X:null,y:Zb,Y:$b,Z:tx,"%":nx},x={a:E,A:D,b:O,B:k,c:A,d:ob,e:ob,f:fb,g:nb,G:tb,H:cb,I:cb,j:sb,L:db,m:ab,M:lb,p:T,q:ib,Q:mb,s:hb,S:ub,u:Zy,U:Qy,V:$y,w:Xy,W:eb,x:j,X:ee,y:nb,Y:tb,Z:rb,"%":pb};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=Hy[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=By(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=zy(By(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?Cy.ceil(a):Cy(a),a=dy.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=Ry(By(r.y,0,1)),o=a.getDay(),a=o>4||o===0?hy.ceil(a):hy(a),a=uy.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?zy(By(r.y,0,1)).getUTCDay():Ry(By(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,zy(r)):Ry(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in Hy?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function ee(e,t,n){return w(e,r,t,n)}function te(e){return o[e.getDay()]}function ne(e){return a[e.getDay()]}function re(e){return c[e.getMonth()]}function ie(e){return s[e.getMonth()]}function ae(e){return i[+(e.getHours()>=12)]}function oe(e){return 1+~~(e.getMonth()/3)}function se(e){return o[e.getUTCDay()]}function ce(e){return a[e.getUTCDay()]}function le(e){return c[e.getUTCMonth()]}function ue(e){return s[e.getUTCMonth()]}function de(e){return i[+(e.getUTCHours()>=12)]}function fe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var Hy={"-":``,_:` `,0:`0`},Uy=/^\s*\d+/,Wy=/^%/,Gy=/[\\^$*+?|[\]().{}]/g;function Ky(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function qy(e){return e.replace(Gy,`\\$&`)}function Jy(e){return RegExp(`^(?:`+e.map(qy).join(`|`)+`)`,`i`)}function Yy(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Xy(e,t,n){var r=Uy.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Zy(e,t,n){var r=Uy.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Qy(e,t,n){var r=Uy.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function $y(e,t,n){var r=Uy.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function eb(e,t,n){var r=Uy.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function tb(e,t,n){var r=Uy.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function nb(e,t,n){var r=Uy.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function rb(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function ib(e,t,n){var r=Uy.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function ab(e,t,n){var r=Uy.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ob(e,t,n){var r=Uy.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function sb(e,t,n){var r=Uy.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function cb(e,t,n){var r=Uy.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function lb(e,t,n){var r=Uy.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ub(e,t,n){var r=Uy.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function db(e,t,n){var r=Uy.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function fb(e,t,n){var r=Uy.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function pb(e,t,n){var r=Wy.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function mb(e,t,n){var r=Uy.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function hb(e,t,n){var r=Uy.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function gb(e,t){return Ky(e.getDate(),t,2)}function _b(e,t){return Ky(e.getHours(),t,2)}function vb(e,t){return Ky(e.getHours()%12||12,t,2)}function yb(e,t){return Ky(1+uy.count(jy(e),e),t,3)}function bb(e,t){return Ky(e.getMilliseconds(),t,3)}function xb(e,t){return bb(e,t)+`000`}function Sb(e,t){return Ky(e.getMonth()+1,t,2)}function Cb(e,t){return Ky(e.getMinutes(),t,2)}function wb(e,t){return Ky(e.getSeconds(),t,2)}function Tb(e){var t=e.getDay();return t===0?7:t}function Eb(e,t){return Ky(my.count(jy(e)-1,e),t,2)}function Db(e){var t=e.getDay();return t>=4||t===0?vy(e):vy.ceil(e)}function Ob(e,t){return e=Db(e),Ky(vy.count(jy(e),e)+(jy(e).getDay()===4),t,2)}function kb(e){return e.getDay()}function Ab(e,t){return Ky(hy.count(jy(e)-1,e),t,2)}function jb(e,t){return Ky(e.getFullYear()%100,t,2)}function Mb(e,t){return e=Db(e),Ky(e.getFullYear()%100,t,2)}function Nb(e,t){return Ky(e.getFullYear()%1e4,t,4)}function Pb(e,t){var n=e.getDay();return e=n>=4||n===0?vy(e):vy.ceil(e),Ky(e.getFullYear()%1e4,t,4)}function Fb(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+Ky(t/60|0,`0`,2)+Ky(t%60,`0`,2)}function Ib(e,t){return Ky(e.getUTCDate(),t,2)}function Lb(e,t){return Ky(e.getUTCHours(),t,2)}function Rb(e,t){return Ky(e.getUTCHours()%12||12,t,2)}function zb(e,t){return Ky(1+dy.count(My(e),e),t,3)}function Bb(e,t){return Ky(e.getUTCMilliseconds(),t,3)}function Vb(e,t){return Bb(e,t)+`000`}function Hb(e,t){return Ky(e.getUTCMonth()+1,t,2)}function Ub(e,t){return Ky(e.getUTCMinutes(),t,2)}function Wb(e,t){return Ky(e.getUTCSeconds(),t,2)}function Gb(e){var t=e.getUTCDay();return t===0?7:t}function Kb(e,t){return Ky(Sy.count(My(e)-1,e),t,2)}function qb(e){var t=e.getUTCDay();return t>=4||t===0?Ey(e):Ey.ceil(e)}function Jb(e,t){return e=qb(e),Ky(Ey.count(My(e),e)+(My(e).getUTCDay()===4),t,2)}function Yb(e){return e.getUTCDay()}function Xb(e,t){return Ky(Cy.count(My(e)-1,e),t,2)}function Zb(e,t){return Ky(e.getUTCFullYear()%100,t,2)}function Qb(e,t){return e=qb(e),Ky(e.getUTCFullYear()%100,t,2)}function $b(e,t){return Ky(e.getUTCFullYear()%1e4,t,4)}function ex(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ey(e):Ey.ceil(e),Ky(e.getUTCFullYear()%1e4,t,4)}function tx(){return`+0000`}function nx(){return`%`}function rx(e){return+e}function ix(e){return Math.floor(e/1e3)}var ax,ox,sx,cx;lx({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function lx(e){return ax=Vy(e),ox=ax.format,ax.parse,sx=ax.utcFormat,cx=ax.utcParse,ax}var ux=`%Y-%m-%dT%H:%M:%S.%LZ`;Date.prototype.toISOString||sx(ux),+new Date(`2000-01-01T00:00:00.000Z`)||cx(ux);function dx(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function fx(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t)}return this}var px=Symbol(`implicit`);function mx(){var e=new mg,t=[],n=[],r=px;function i(i){let a=e.get(i);if(a===void 0){if(r!==px)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new mg;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return mx(t,n).unknown(r)},dx.apply(i,arguments),i}function hx(){var e=mx().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=Pg(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return hx(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},dx.apply(d(),arguments)}function gx(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return gx(t())},e}function _x(){return gx(hx.apply(null,arguments).paddingInner(1))}function vx(e){return function(){return e}}function yx(e){return+e}var bx=[0,1];function xx(e){return e}function Sx(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:vx(isNaN(t)?NaN:.5)}function Cx(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function wx(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Sx(i,r),a=n(o,a)):(r=Sx(r,i),a=n(a,o)),function(e){return a(r(e))}}function Tx(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Sx(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=pg(e,t,1,r)-1;return a[n](i[n](t))}}function Ex(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Dx(){var e=bx,t=bx,n=gv,r,i,a,o=xx,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==xx&&(o=Cx(e[0],e[n-1])),s=n>2?Tx:wx,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),lv))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,yx),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=_v,u()},d.clamp=function(e){return arguments.length?(o=e?!0:xx,u()):o!==xx},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function Ox(){return Dx()(xx,xx)}function kx(e,t,n,r){var i=Dg(e,t,n),a;switch(r=Av(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Kv(i,o))&&(r.precision=a),Uv(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=qv(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Gv(i))&&(r.precision=a-(r.type===`%`)*2)}return Hv(r)}function Ax(e){var t=e.domain;return e.ticks=function(e){var n=t();return Tg(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return kx(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=Eg(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function jx(){var e=Ox();return e.copy=function(){return Ex(e,jx())},dx.apply(e,arguments),Ax(e)}function Mx(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,yx),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Mx(e).unknown(t)},e=arguments.length?Array.from(e,yx):[0,1],Ax(n)}function Nx(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function Px(e){return Math.log(e)}function Fx(e){return Math.exp(e)}function Ix(e){return-Math.log(-e)}function Lx(e){return-Math.exp(-e)}function Rx(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function zx(e){return e===10?Rx:e===Math.E?Math.exp:t=>e**+t}function Bx(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Vx(e){return(t,n)=>-e(-t,n)}function Hx(e){let t=e(Px,Fx),n=t.domain,r=10,i,a;function o(){return i=Bx(r),a=zx(r),n()[0]<0?(i=Vx(i),a=Vx(a),e(Ix,Lx)):e(Px,Fx),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=Tg(o,s,p))}else m=Tg(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=Av(n)).precision==null&&(n.trim=!0),n=Hv(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(Nx(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Ux(){let e=Hx(Dx()).domain([1,10]);return e.copy=()=>Ex(e,Ux()).base(e.base()),dx.apply(e,arguments),e}function Wx(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Gx(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Kx(e){var t=1,n=e(Wx(t),Gx(t));return n.constant=function(n){return arguments.length?e(Wx(t=+n),Gx(t)):t},Ax(n)}function qx(){var e=Kx(Dx());return e.copy=function(){return Ex(e,qx()).constant(e.constant())},dx.apply(e,arguments)}function Jx(e){return function(t){return t<0?-((-t)**+e):t**+e}}function Yx(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Xx(e){return e<0?-e*e:e*e}function Zx(e){var t=e(xx,xx),n=1;function r(){return n===1?e(xx,xx):n===.5?e(Yx,Xx):e(Jx(n),Jx(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},Ax(t)}function Qx(){var e=Zx(Dx());return e.copy=function(){return Ex(e,Qx()).exponent(e.exponent())},dx.apply(e,arguments),e}function $x(){return Qx.apply(null,arguments).exponent(.5)}function eS(e){return Math.sign(e)*e*e}function tS(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function nS(){var e=Ox(),t=[0,1],n=!1,r;function i(t){var i=tS(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(eS(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,yx)).map(eS)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return nS(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},dx.apply(i,arguments),Ax(i)}function rS(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=Ng(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[pg(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(og),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return rS().domain(e).range(t).unknown(r)},dx.apply(a,arguments)}function iS(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[pg(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return iS().domain([e,t]).range(i).unknown(a)},dx.apply(Ax(o),arguments)}function aS(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[pg(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return aS().domain(e).range(t).unknown(n)},dx.apply(i,arguments)}function oS(e){return new Date(e)}function sS(e){return e instanceof Date?+e:Math.round(e)}function cS(e,t,n,r,i,a,o,s,c,l){var u=Ox(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(Math.round(d(e)))},u.domain=function(e){return arguments.length?f(Array.from(e,sS)):f().map(oS)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return e&&typeof e.range==`function`||(e=t(n[0],n[n.length-1],e??10)),e?f(Nx(n,e)):u},u.copy=function(){return Ex(u,cS(e,t,n,r,i,a,o,s,c,l))},u}function lS(){return dx.apply(cS(Iy,Ly,jy,ky,my,uy,cy,oy,ay,ox).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function uS(){return dx.apply(cS(Py,Fy,My,Ay,Sy,dy,ly,sy,ay,sx).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function dS(){var e=0,t=1,n,r,i,a,o=xx,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(gv),l.rangeRound=u(_v),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function fS(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function pS(){var e=Ax(dS()(xx));return e.copy=function(){return fS(e,pS())},fx.apply(e,arguments)}function mS(){var e=Hx(dS()).domain([1,10]);return e.copy=function(){return fS(e,mS()).base(e.base())},fx.apply(e,arguments)}function hS(){var e=Kx(dS());return e.copy=function(){return fS(e,hS()).constant(e.constant())},fx.apply(e,arguments)}function gS(){var e=Zx(dS());return e.copy=function(){return fS(e,gS()).exponent(e.exponent())},fx.apply(e,arguments)}function _S(){return gS.apply(null,arguments).exponent(.5)}function vS(){var e=[],t=xx;function n(n){if(n!=null&&!isNaN(n=+n))return t((pg(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(og),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>Mg(e,r/t))},n.copy=function(){return vS(t).domain(e)},fx.apply(n,arguments)}function yS(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=xx,u,d=!1,f;function p(e){return e==null||isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=Cv(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(gv),p.rangeRound=m(_v),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function bS(){var e=Ax(yS()(xx));return e.copy=function(){return fS(e,bS())},fx.apply(e,arguments)}function xS(){var e=Hx(yS()).domain([.1,1,10]);return e.copy=function(){return fS(e,xS()).base(e.base())},fx.apply(e,arguments)}function SS(){var e=Kx(yS());return e.copy=function(){return fS(e,SS()).constant(e.constant())},fx.apply(e,arguments)}function CS(){var e=Zx(yS());return e.copy=function(){return fS(e,CS()).exponent(e.exponent())},fx.apply(e,arguments)}function wS(){return CS.apply(null,arguments).exponent(.5)}var TS=s({scaleBand:()=>hx,scaleDiverging:()=>bS,scaleDivergingLog:()=>xS,scaleDivergingPow:()=>CS,scaleDivergingSqrt:()=>wS,scaleDivergingSymlog:()=>SS,scaleIdentity:()=>Mx,scaleImplicit:()=>px,scaleLinear:()=>jx,scaleLog:()=>Ux,scaleOrdinal:()=>mx,scalePoint:()=>_x,scalePow:()=>Qx,scaleQuantile:()=>rS,scaleQuantize:()=>iS,scaleRadial:()=>nS,scaleSequential:()=>pS,scaleSequentialLog:()=>mS,scaleSequentialPow:()=>gS,scaleSequentialQuantile:()=>vS,scaleSequentialSqrt:()=>_S,scaleSequentialSymlog:()=>hS,scaleSqrt:()=>$x,scaleSymlog:()=>qx,scaleThreshold:()=>aS,scaleTime:()=>lS,scaleUtc:()=>uS,tickFormat:()=>kx}),ES=o(((e,t)=>{var n=Bo();function r(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===void 0?s===s&&!n(s):r(s,c)))var c=s,l=o}return l}t.exports=r})),DS=o(((e,t)=>{function n(e,t){return e>t}t.exports=n})),OS=o(((e,t)=>{var n=ES(),r=DS(),i=bf();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),kS=o(((e,t)=>{function n(e,t){return e<t}t.exports=n})),AS=o(((e,t)=>{var n=ES(),r=kS(),i=bf();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),jS=o(((e,t)=>{var n=Cs(),r=wf(),i=fp(),a=Mo();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),MS=o(((e,t)=>{var n=op(),r=jS();function i(e,t){return n(r(e,t),1)}t.exports=i})),NS=o(((e,t)=>{var n=uf();function r(e,t){return n(e,t)}t.exports=r})),PS=o(((e,t,n)=>{(function(e){var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=+(e[n]<t[n]),e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,ee=r.d,te=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=te.length,T=ee.length,g=new A(j),_=g.d=[],u=0;te[u]==(ee[u]||0);)++u;if(te[u]>(ee[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,te=te[0],x++;(u<T||d)&&x--;u++)C=d*f+(ee[u]||0),_[u]=C/te|0,d=C%te|0;else{for(d=f/(te[0]+1)|0,d>1&&(te=e(te,d),ee=e(ee,d),O=te.length,T=ee.length),w=O,v=ee.slice(0,O),y=v.length;y<O;)v[y++]=0;k=te.slice(),k.unshift(0),E=te[0],te[1]>=f/2&&++E;do d=0,c=t(te,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(te,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:te,h))):(d==0&&(c=d=1),m=te.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(te,v,O,y),c<1&&(d++,n(v,O<y?k:te,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=ee[w]||0:(v=[ee[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;else{if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=j,i.config=i.set=ee,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function ee(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0){if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i)}if((i=e[r=`LN10`])!==void 0){if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i)}return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(n)}));function FS(e){return zS(e)||RS(e)||LS(e)||IS()}function IS(){throw TypeError(`Invalid attempt to spread non-iterable instance.
24
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LS(e,t){if(e){if(typeof e==`string`)return BS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BS(e,t)}}function RS(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function zS(e){if(Array.isArray(e))return BS(e)}function BS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var VS=function(e){return e},HS={"@@functional/placeholder":!0},US=function(e){return e===HS},WS=function(e){return function t(){return arguments.length===0||arguments.length===1&&US(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},GS=function e(t,n){return t===1?n:WS(function(){var r=[...arguments],i=r.filter(function(e){return e!==HS}).length;return i>=t?n.apply(void 0,r):e(t-i,WS(function(){var e=[...arguments],t=r.map(function(t){return US(t)?e.shift():t});return n.apply(void 0,FS(t).concat(e))}))})},KS=function(e){return GS(e.length,e)},qS=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},JS=KS(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),YS=function(){var e=[...arguments];if(!e.length)return VS;var t=e.reverse(),n=t[0],r=t.slice(1);return function(){return r.reduce(function(e,t){return t(e)},n.apply(void 0,arguments))}},XS=function(e){return Array.isArray(e)?e.reverse():e.split(``).reverse.join(``)},ZS=function(e){var t=null,n=null;return function(){var r=[...arguments];return t&&r.every(function(e,n){return e===t[n]})||(t=r,n=e.apply(void 0,r)),n}},QS=l(PS());function $S(e){return e===0?1:Math.floor(new QS.default(e).abs().log(10).toNumber())+1}function eC(e,t,n){for(var r=new QS.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var tC={rangeStep:eC,getDigitCount:$S,interpolateNumber:KS(function(e,t,n){var r=+e;return r+n*(+t-r)}),uninterpolateNumber:KS(function(e,t,n){var r=t-+e;return r||=1/0,(n-e)/r}),uninterpolateTruncation:KS(function(e,t,n){var r=t-+e;return r||=1/0,Math.max(0,Math.min(1,(n-e)/r))})};function nC(e){return aC(e)||iC(e)||cC(e)||rC()}function rC(){throw TypeError(`Invalid attempt to spread non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iC(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function aC(e){if(Array.isArray(e))return lC(e)}function oC(e,t){return dC(e)||uC(e,t)||cC(e,t)||sC()}function sC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cC(e,t){if(e){if(typeof e==`string`)return lC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lC(e,t)}}function lC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uC(e,t){if(typeof Symbol<`u`&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function dC(e){if(Array.isArray(e))return e}function fC(e){var t=oC(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function pC(e,t,n){if(e.lte(0))return new QS.default(0);var r=tC.getDigitCount(e.toNumber()),i=new QS.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new QS.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?s:new QS.default(Math.ceil(s))}function mC(e,t,n){var r=1,i=new QS.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new QS.default(10).pow(tC.getDigitCount(e)-1),i=new QS.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new QS.default(Math.floor(e)))}else e===0?i=new QS.default(Math.floor((t-1)/2)):n||(i=new QS.default(Math.floor(e)));var o=Math.floor((t-1)/2);return YS(JS(function(e){return i.add(new QS.default(e-o).mul(r)).toNumber()}),qS)(0,t)}function hC(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new QS.default(0),tickMin:new QS.default(0),tickMax:new QS.default(0)};var a=pC(new QS.default(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new QS.default(0):(o=new QS.default(e).add(t).div(2),o=o.sub(new QS.default(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new QS.default(t).sub(o).div(a).toNumber()),l=s+c+1;return l>n?hC(e,t,n,r,i+1):(l<n&&(c=t>0?c+(n-l):c,s=t>0?s:s+(n-l)),{step:a,tickMin:o.sub(new QS.default(s).mul(a)),tickMax:o.add(new QS.default(c).mul(a))})}function gC(e){var t=oC(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=oC(fC([n,r]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0){var u=l===1/0?[c].concat(nC(qS(0,i-1).map(function(){return 1/0}))):[].concat(nC(qS(0,i-1).map(function(){return-1/0})),[l]);return n>r?XS(u):u}if(c===l)return mC(c,i,a);var d=hC(c,l,o,a),f=d.step,p=d.tickMin,m=d.tickMax,h=tC.rangeStep(p,m.add(new QS.default(.1).mul(f)),f);return n>r?XS(h):h}function _C(e,t){var n=oC(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=oC(fC([r,i]),2),s=o[0],c=o[1];if(s===-1/0||c===1/0)return[r,i];if(s===c)return[s];var l=Math.max(t,2),u=pC(new QS.default(c).sub(s).div(l-1),a,0),d=[].concat(nC(tC.rangeStep(new QS.default(s),new QS.default(c).sub(new QS.default(.99).mul(u)),u)),[c]);return r>i?XS(d):d}var vC=ZS(gC),yC=ZS(_C),bC=`Invariant failed`;function xC(e,t){if(!e)throw Error(bC)}var SC=[`offset`,`layout`,`width`,`dataKey`,`data`,`dataPointFormatter`,`xAxis`,`yAxis`];function CC(e){"@babel/helpers - typeof";return CC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},CC(e)}function wC(){return wC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wC.apply(this,arguments)}function TC(e,t){return AC(e)||kC(e,t)||DC(e,t)||EC()}function EC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
27
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DC(e,t){if(e){if(typeof e==`string`)return OC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return OC(e,t)}}function OC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kC(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function AC(e){if(Array.isArray(e))return e}function jC(e,t){if(e==null)return{};var n=MC(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MC(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function NC(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function PC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,WC(r.key),r)}}function FC(e,t,n){return t&&PC(e.prototype,t),n&&PC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IC(e,t,n){return t=BC(t),LC(e,zC()?Reflect.construct(t,n||[],BC(e).constructor):t.apply(e,n))}function LC(e,t){if(t&&(CC(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return RC(e)}function RC(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function zC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zC=function(){return!!e})()}function BC(e){return BC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BC(e)}function VC(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HC(e,t)}function HC(e,t){return HC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},HC(e,t)}function UC(e,t,n){return t=WC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WC(e){var t=GC(e,`string`);return CC(t)==`symbol`?t:t+``}function GC(e,t){if(CC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(CC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var KC=function(e){function t(){return NC(this,t),IC(this,t,arguments)}return VC(t,e),FC(t,[{key:`render`,value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,i=e.dataKey,a=e.data,o=e.dataPointFormatter,s=e.xAxis,c=e.yAxis,l=Z(jC(e,SC),!1);this.props.direction===`x`&&s.type!==`number`&&xC(!1);var u=a.map(function(e){var a=o(e,i),u=a.x,d=a.y,f=a.value,p=a.errorVal;if(!p)return null;var m=[],h,g;if(Array.isArray(p)){var _=TC(p,2);h=_[0],g=_[1]}else h=g=p;if(n===`vertical`){var y=s.scale,b=d+t,x=b+r,S=b-r,C=y(f-h),w=y(f+g);m.push({x1:w,y1:x,x2:w,y2:S}),m.push({x1:C,y1:b,x2:w,y2:b}),m.push({x1:C,y1:x,x2:C,y2:S})}else if(n===`horizontal`){var T=c.scale,E=u+t,D=E-r,O=E+r,k=T(f-h),A=T(f+g);m.push({x1:D,y1:A,x2:O,y2:A}),m.push({x1:E,y1:k,x2:E,y2:A}),m.push({x1:D,y1:k,x2:O,y2:k})}return v.createElement(Hc,wC({className:`recharts-errorBar`,key:`bar-${m.map(function(e){return`${e.x1}-${e.x2}-${e.y1}-${e.y2}`})}`},l),m.map(function(e){return v.createElement(`line`,wC({},e,{key:`line-${e.x1}-${e.x2}-${e.y1}-${e.y2}`}))}))});return v.createElement(Hc,{className:`recharts-errorBars`},u)}}])}(v.Component);UC(KC,`defaultProps`,{stroke:`black`,strokeWidth:1.5,width:5,offset:0,layout:`horizontal`}),UC(KC,`displayName`,`ErrorBar`);function qC(e){"@babel/helpers - typeof";return qC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},qC(e)}function JC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JC(Object(n),!0).forEach(function(t){XC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XC(e,t,n){return t=ZC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZC(e){var t=QC(e,`string`);return qC(t)==`symbol`?t:t+``}function QC(e,t){if(qC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(qC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $C=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,i=e.legendContent,a=Sc(t,ip);if(!a)return null;var o=ip.defaultProps,s=o===void 0?{}:YC(YC({},o),a.props),c=a.props&&a.props.payload?a.props&&a.props.payload:i===`children`?(n||[]).reduce(function(e,t){var n=t.item,r=t.props,i=r.sectors||r.data||[];return e.concat(i.map(function(e){return{type:a.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,n=t.type.defaultProps,r=n===void 0?{}:YC(YC({},n),t.props),i=r.dataKey,a=r.name,o=r.legendType;return{inactive:r.hide,dataKey:i,type:s.iconType||o||`square`,color:yw(t),value:a||i,payload:r}});return YC(YC(YC({},s),ip.getWithHeight(a,r)),{},{payload:c,item:a})},ew=l(OS()),tw=l(AS()),nw=l(MS()),rw=l(NS());function iw(e){"@babel/helpers - typeof";return iw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},iw(e)}function aw(e){return lw(e)||cw(e)||sw(e)||ow()}function ow(){throw TypeError(`Invalid attempt to spread non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sw(e,t){if(e){if(typeof e==`string`)return uw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uw(e,t)}}function cw(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function lw(e){if(Array.isArray(e))return uw(e)}function uw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?dw(Object(n),!0).forEach(function(t){pw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pw(e,t,n){return t=mw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mw(e){var t=hw(e,`string`);return iw(t)==`symbol`?t:t+``}function hw(e,t){if(iw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(iw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function gw(e,t,n){return(0,J.default)(e)||(0,J.default)(t)?n:Us(t)?(0,Rs.default)(e,t,n):(0,X.default)(t)?t(e):n}function _w(e,t,n,r){var i=(0,nw.default)(e,function(e){return gw(e,t)});if(n===`number`){var a=i.filter(function(e){return Y(e)||parseFloat(e)});return a.length?[(0,tw.default)(a),(0,ew.default)(a)]:[1/0,-1/0]}return(r?i.filter(function(e){return!(0,J.default)(e)}):i).map(function(e){return Us(e)||e instanceof Date?e:``})}var vw=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=-1,a=t?.length??0;if(a<=1)return 0;if(r&&r.axisType===`angleAxis`&&Math.abs(Math.abs(r.range[1]-r.range[0])-360)<=1e-6)for(var o=r.range,s=0;s<a;s++){var c=s>0?n[s-1].coordinate:n[a-1].coordinate,l=n[s].coordinate,u=s>=a-1?n[0].coordinate:n[s+1].coordinate,d=void 0;if(Bs(l-c)!==Bs(u-l)){var f=[];if(Bs(u-l)===Bs(o[1]-o[0])){d=u;var p=l+o[1]-o[0];f[0]=Math.min(p,(p+c)/2),f[1]=Math.max(p,(p+c)/2)}else{d=c;var m=u+o[1]-o[0];f[0]=Math.min(l,(m+l)/2),f[1]=Math.max(l,(m+l)/2)}var h=[Math.min(l,(d+l)/2),Math.max(l,(d+l)/2)];if(e>h[0]&&e<=h[1]||e>=f[0]&&e<=f[1]){i=n[s].index;break}}else{var g=Math.min(c,u),_=Math.max(c,u);if(e>(g+l)/2&&e<=(_+l)/2){i=n[s].index;break}}}else for(var v=0;v<a;v++)if(v===0&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v>0&&v<a-1&&e>(t[v].coordinate+t[v-1].coordinate)/2&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v===a-1&&e>(t[v].coordinate+t[v-1].coordinate)/2){i=t[v].index;break}return i},yw=function(e){var t,n=e.type.displayName,r=(t=e.type)!=null&&t.defaultProps?fw(fw({},e.type.defaultProps),e.props):e.props,i=r.stroke,a=r.fill,o;switch(n){case`Line`:o=i;break;case`Area`:case`Radar`:o=i&&i!==`none`?i:a;break;default:o=a}return o},bw=function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,i=r===void 0?{}:r;if(!i)return{};for(var a={},o=Object.keys(i),s=0,c=o.length;s<c;s++)for(var l=i[o[s]].stackGroups,u=Object.keys(l),d=0,f=u.length;d<f;d++){var p=l[u[d]],m=p.items,h=p.cateAxisId,g=m.filter(function(e){return _c(e.type).indexOf(`Bar`)>=0});if(g&&g.length){var _=g[0].type.defaultProps,v=_===void 0?g[0].props:fw(fw({},_),g[0].props),y=v.barSize,b=v[h];a[b]||(a[b]=[]);var x=(0,J.default)(y)?t:y;a[b].push({item:g[0],stackList:g.slice(1),barSize:(0,J.default)(x)?void 0:Ks(x,n,0)})}}return a},xw=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,i=e.sizeList,a=i===void 0?[]:i,o=e.maxBarSize,s=a.length;if(s<1)return null;var c=Ks(t,r,0,!0),l,u=[];if(a[0].barSize===+a[0].barSize){var d=!1,f=r/s,p=a.reduce(function(e,t){return e+t.barSize||0},0);p+=(s-1)*c,p>=r&&(p-=(s-1)*c,c=0),p>=r&&f>0&&(d=!0,f*=.9,p=s*f);var m={offset:((r-p)/2|0)-c,size:0};l=a.reduce(function(e,t){var n={item:t.item,position:{offset:m.offset+m.size+c,size:d?f:t.barSize}},r=[].concat(aw(e),[n]);return m=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:m})}),r},u)}else{var h=Ks(n,r,0,!0);r-2*h-(s-1)*c<=0&&(c=0);var g=(r-2*h-(s-1)*c)/s;g>1&&(g>>=0);var _=o===+o?Math.min(g,o):g;l=a.reduce(function(e,t,n){var r=[].concat(aw(e),[{item:t.item,position:{offset:h+(g+c)*n+(g-_)/2,size:_}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return l},Sw=function(e,t,n,r){var i=n.children,a=n.width,o=n.margin,s=$C({children:i,legendWidth:a-(o.left||0)-(o.right||0)});if(s){var c=r||{},l=c.width,u=c.height,d=s.align,f=s.verticalAlign,p=s.layout;if((p===`vertical`||p===`horizontal`&&f===`middle`)&&d!==`center`&&Y(e[d]))return fw(fw({},e),{},pw({},d,e[d]+(l||0)));if((p===`horizontal`||p===`vertical`&&d===`center`)&&f!==`middle`&&Y(e[f]))return fw(fw({},e),{},pw({},f,e[f]+(u||0)))}return e},Cw=function(e,t,n){return(0,J.default)(t)?!0:e===`horizontal`?t===`yAxis`:e===`vertical`||n===`x`?t===`xAxis`:n!==`y`||t===`yAxis`},ww=function(e,t,n,r,i){var a=t.props.children,o=xc(a,KC).filter(function(e){return Cw(r,i,e.props.direction)});if(o&&o.length){var s=o.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=gw(t,n);if((0,J.default)(r))return e;var i=Array.isArray(r)?[(0,tw.default)(r),(0,ew.default)(r)]:[r,r],a=s.reduce(function(e,n){var r=gw(t,n,0),a=i[0]-Math.abs(Array.isArray(r)?r[0]:r),o=i[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(a,e[0]),Math.max(o,e[1])]},[1/0,-1/0]);return[Math.min(a[0],e[0]),Math.max(a[1],e[1])]},[1/0,-1/0])}return null},Tw=function(e,t,n,r,i){var a=t.map(function(t){return ww(e,t,n,i,r)}).filter(function(e){return!(0,J.default)(e)});return a&&a.length?a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null},Ew=function(e,t,n,r,i){var a=t.map(function(t){var a=t.props.dataKey;return n===`number`&&a&&ww(e,t,a,r)||_w(e,a,n,i)});if(n===`number`)return a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var o={};return a.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)o[t[n]]||(o[t[n]]=!0,e.push(t[n]));return e},[])},Dw=function(e,t){return e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`},Ow=function(e,t,n,r){if(r)return e.map(function(e){return e.coordinate});var i,a,o=e.map(function(e){return e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate});return i||o.push(t),a||o.push(n),o},kw=function(e,t,n){if(!e)return null;var r=e.scale,i=e.duplicateDomain,a=e.type,o=e.range,s=e.realScaleType===`scaleBand`?r.bandwidth()/2:2,c=(t||n)&&a===`category`&&r.bandwidth?r.bandwidth()/s:0;return c=e.axisType===`angleAxis`&&o?.length>=2?Bs(o[0]-o[1])*2*c:c,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map(function(e){return{coordinate:r(i?i.indexOf(e):e)+c,value:e,offset:c}}).filter(function(e){return!(0,Ls.default)(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+c,value:e,index:t,offset:c}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+c,value:e,offset:c}}):r.domain().map(function(e,t){return{coordinate:r(e)+c,value:i?i[e]:e,index:t,offset:c}})},Aw=new WeakMap,jw=function(e,t){if(typeof t!=`function`)return e;Aw.has(e)||Aw.set(e,new WeakMap);var n=Aw.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},Mw=function(e,t,n){var r=e.scale,i=e.type,a=e.layout,o=e.axisType;if(r===`auto`)return a===`radial`&&o===`radiusAxis`?{scale:hx(),realScaleType:`band`}:a===`radial`&&o===`angleAxis`?{scale:jx(),realScaleType:`linear`}:i===`category`&&t&&(t.indexOf(`LineChart`)>=0||t.indexOf(`AreaChart`)>=0||t.indexOf(`ComposedChart`)>=0&&!n)?{scale:_x(),realScaleType:`point`}:i===`category`?{scale:hx(),realScaleType:`band`}:{scale:jx(),realScaleType:`linear`};if((0,Is.default)(r)){var s=`scale${(0,Pu.default)(r)}`;return{scale:(TS[s]||_x)(),realScaleType:TS[s]?s:`point`}}return(0,X.default)(r)?{scale:r}:{scale:_x(),realScaleType:`point`}},Nw=1e-4,Pw=function(e){var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-Nw,a=Math.max(r[0],r[1])+Nw,o=e(t[0]),s=e(t[n-1]);(o<i||o>a||s<i||s>a)&&e.domain([t[0],t[n-1]])}},Fw=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null},Iw=function(e,t){if(!t||t.length!==2||!Y(t[0])||!Y(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Y(e[0])||e[0]<n)&&(i[0]=n),(!Y(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},Lw={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0,o=0;o<t;++o){var s=(0,Ls.default)(e[o][n][1])?e[o][n][0]:e[o][n][1];s>=0?(e[o][n][0]=i,e[o][n][1]=i+s,i=e[o][n][1]):(e[o][n][0]=a,e[o][n][1]=a+s,a=e[o][n][1])}},expand:ju,none:Eu,silhouette:Mu,wiggle:Nu,positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0;a<t;++a){var o=(0,Ls.default)(e[a][n][1])?e[a][n][0]:e[a][n][1];o>=0?(e[a][n][0]=i,e[a][n][1]=i+o,i=e[a][n][1]):(e[a][n][0]=0,e[a][n][1]=0)}}},Rw=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),i=Lw[n];return Au().keys(r).value(function(e,t){return+gw(e,t,0)}).order(Du).offset(i)(e)},zw=function(e,t,n,r,i,a){if(!e)return null;var o=(a?t.reverse():t).reduce(function(e,t){var i,a=(i=t.type)!=null&&i.defaultProps?fw(fw({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(a.hide)return e;var s=a[n],c=e[s]||{hasStack:!1,stackGroups:{}};if(Us(o)){var l=c.stackGroups[o]||{numericAxisId:n,cateAxisId:r,items:[]};l.items.push(t),c.hasStack=!0,c.stackGroups[o]=l}else c.stackGroups[Gs(`_stackId_`)]={numericAxisId:n,cateAxisId:r,items:[t]};return fw(fw({},e),{},pw({},s,c))},{});return Object.keys(o).reduce(function(t,a){var s=o[a];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,a){var o=s.stackGroups[a];return fw(fw({},t),{},pw({},a,{numericAxisId:n,cateAxisId:r,items:o.items,stackedData:Rw(e,o.items,i)}))},{})),fw(fw({},t),{},pw({},a,s))},{})},Bw=function(e,t){var n=t.realScaleType,r=t.type,i=t.tickCount,a=t.originalDomain,o=t.allowDecimals,s=n||t.scale;if(s!==`auto`&&s!==`linear`)return null;if(i&&r===`number`&&a&&(a[0]===`auto`||a[1]===`auto`)){var c=e.domain();if(!c.length)return null;var l=vC(c,i,o);return e.domain([(0,tw.default)(l),(0,ew.default)(l)]),{niceTicks:l}}return i&&r===`number`?{niceTicks:yC(e.domain(),i,o)}:null};function Vw(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!(0,J.default)(i[t.dataKey])){var s=Xs(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var c=gw(i,(0,J.default)(o)?t.dataKey:o);return(0,J.default)(c)?null:t.scale(c)}var Hw=function(e){var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,a=e.entry,o=e.index;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=gw(a,t.dataKey,t.domain[o]);return(0,J.default)(s)?null:t.scale(s)-i/2+r},Uw=function(e){var t=e.numericAxis,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},Ww=function(e,t){var n,r=((n=e.type)!=null&&n.defaultProps?fw(fw({},e.type.defaultProps),e.props):e.props).stackId;if(Us(r)){var i=t[r];if(i){var a=i.items.indexOf(e);return a>=0?i.stackedData[a]:null}}return null},Gw=function(e){return e.reduce(function(e,t){return[(0,tw.default)(t.concat([e[0]]).filter(Y)),(0,ew.default)(t.concat([e[1]]).filter(Y))]},[1/0,-1/0])},Kw=function(e,t,n){return Object.keys(e).reduce(function(r,i){var a=e[i].stackedData.reduce(function(e,r){var i=Gw(r.slice(t,n+1));return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(a[0],r[0]),Math.max(a[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},qw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Jw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Yw=function(e,t,n){if((0,X.default)(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(Y(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(qw.test(e[0])){var i=+qw.exec(e[0])[1];r[0]=t[0]-i}else r[0]=(0,X.default)(e[0])?e[0](t[0]):t[0];if(Y(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(Jw.test(e[1])){var a=+Jw.exec(e[1])[1];r[1]=t[1]+a}else r[1]=(0,X.default)(e[1])?e[1](t[1]):t[1];return r},Xw=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=(0,Ep.default)(t,function(e){return e.coordinate}),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c.coordinate||0)-(l.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0},Zw=function(e,t,n){return!e||!e.length||(0,rw.default)(e,(0,Rs.default)(n,`type.defaultProps.domain`))?t:e},Qw=function(e,t){var n=e.type.defaultProps?fw(fw({},e.type.defaultProps),e.props):e.props,r=n.dataKey,i=n.name,a=n.unit,o=n.formatter,s=n.tooltipType,c=n.chartType,l=n.hide;return fw(fw({},Z(e,!1)),{},{dataKey:r,unit:a,formatter:o,name:i||r,color:yw(e),value:gw(t,r),type:s,payload:t,chartType:c,hide:l})};function $w(e){"@babel/helpers - typeof";return $w=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$w(e)}function eT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?eT(Object(n),!0).forEach(function(t){nT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nT(e,t,n){return t=rT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rT(e){var t=iT(e,`string`);return $w(t)==`symbol`?t:t+``}function iT(e,t){if($w(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if($w(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var aT=Math.PI/180,oT=function(e){return e*180/Math.PI},sT=function(e,t,n,r){return{x:e+Math.cos(-aT*r)*n,y:t+Math.sin(-aT*r)*n}},cT=function(e,t){var n=e.x,r=e.y,i=t.x,a=t.y;return Math.sqrt((n-i)**2+(r-a)**2)},lT=function(e,t){var n=e.x,r=e.y,i=t.cx,a=t.cy,o=cT({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o};var s=(n-i)/o,c=Math.acos(s);return r>a&&(c=2*Math.PI-c),{radius:o,angle:oT(c),angleInRadian:c}},uT=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},dT=function(e,t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360);return e+Math.min(i,a)*360},fT=function(e,t){var n=e.x,r=e.y,i=lT({x:n,y:r},t),a=i.radius,o=i.angle,s=t.innerRadius,c=t.outerRadius;if(a<s||a>c)return!1;if(a===0)return!0;var l=uT(t),u=l.startAngle,d=l.endAngle,f=o,p;if(u<=d){for(;f>d;)f-=360;for(;f<u;)f+=360;p=f>=u&&f<=d}else{for(;f>u;)f-=360;for(;f<d;)f+=360;p=f>=d&&f<=u}return p?tT(tT({},t),{},{radius:a,angle:dT(f,t)}):null};function pT(e){"@babel/helpers - typeof";return pT=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},pT(e)}var mT=[`offset`];function hT(e){return yT(e)||vT(e)||_T(e)||gT()}function gT(){throw TypeError(`Invalid attempt to spread non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _T(e,t){if(e){if(typeof e==`string`)return bT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bT(e,t)}}function vT(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function yT(e){if(Array.isArray(e))return bT(e)}function bT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xT(e,t){if(e==null)return{};var n=ST(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ST(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function CT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?CT(Object(n),!0).forEach(function(t){TT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TT(e,t,n){return t=ET(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ET(e){var t=DT(e,`string`);return pT(t)==`symbol`?t:t+``}function DT(e,t){if(pT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(pT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function OT(){return OT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OT.apply(this,arguments)}var kT=function(e){var t=e.value,n=e.formatter,r=(0,J.default)(e.children)?t:e.children;return(0,X.default)(n)?n(r):r},AT=function(e,t){return Bs(t-e)*Math.min(Math.abs(t-e),360)},jT=function(e,t,n){var r=e.position,i=e.viewBox,a=e.offset,o=e.className,s=i,c=s.cx,l=s.cy,u=s.innerRadius,d=s.outerRadius,f=s.startAngle,p=s.endAngle,m=s.clockWise,h=(u+d)/2,g=AT(f,p),_=g>=0?1:-1,y,b;r===`insideStart`?(y=f+_*a,b=m):r===`insideEnd`?(y=p-_*a,b=!m):r===`end`&&(y=p+_*a,b=m),b=g<=0?b:!b;var x=sT(c,l,h,y),S=sT(c,l,h,y+(b?1:-1)*359),C=`M${x.x},${x.y}
30
+ A${h},${h},0,1,${+!b},
31
+ ${S.x},${S.y}`,w=(0,J.default)(e.id)?Gs(`recharts-radial-line-`):e.id;return v.createElement(`text`,OT({},n,{dominantBaseline:`central`,className:q(`recharts-radial-bar-label`,o)}),v.createElement(`defs`,null,v.createElement(`path`,{id:w,d:C})),v.createElement(`textPath`,{xlinkHref:`#${w}`},t))},MT=function(e){var t=e.viewBox,n=e.offset,r=e.position,i=t,a=i.cx,o=i.cy,s=i.innerRadius,c=i.outerRadius,l=(i.startAngle+i.endAngle)/2;if(r===`outside`){var u=sT(a,o,c+n,l),d=u.x;return{x:d,y:u.y,textAnchor:d>=a?`start`:`end`,verticalAnchor:`middle`}}if(r===`center`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`middle`};if(r===`centerTop`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`start`};if(r===`centerBottom`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`end`};var f=sT(a,o,(s+c)/2,l);return{x:f.x,y:f.y,textAnchor:`middle`,verticalAnchor:`middle`}},NT=function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,i=e.position,a=t,o=a.x,s=a.y,c=a.width,l=a.height,u=l>=0?1:-1,d=u*r,f=u>0?`end`:`start`,p=u>0?`start`:`end`,m=c>=0?1:-1,h=m*r,g=m>0?`end`:`start`,_=m>0?`start`:`end`;if(i===`top`)return wT(wT({},{x:o+c/2,y:s-u*r,textAnchor:`middle`,verticalAnchor:f}),n?{height:Math.max(s-n.y,0),width:c}:{});if(i===`bottom`)return wT(wT({},{x:o+c/2,y:s+l+d,textAnchor:`middle`,verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(s+l),0),width:c}:{});if(i===`left`){var v={x:o-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`};return wT(wT({},v),n?{width:Math.max(v.x-n.x,0),height:l}:{})}if(i===`right`){var y={x:o+c+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`};return wT(wT({},y),n?{width:Math.max(n.x+n.width-y.x,0),height:l}:{})}var b=n?{width:c,height:l}:{};return i===`insideLeft`?wT({x:o+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`},b):i===`insideRight`?wT({x:o+c-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`},b):i===`insideTop`?wT({x:o+c/2,y:s+d,textAnchor:`middle`,verticalAnchor:p},b):i===`insideBottom`?wT({x:o+c/2,y:s+l-d,textAnchor:`middle`,verticalAnchor:f},b):i===`insideTopLeft`?wT({x:o+h,y:s+d,textAnchor:_,verticalAnchor:p},b):i===`insideTopRight`?wT({x:o+c-h,y:s+d,textAnchor:g,verticalAnchor:p},b):i===`insideBottomLeft`?wT({x:o+h,y:s+l-d,textAnchor:_,verticalAnchor:f},b):i===`insideBottomRight`?wT({x:o+c-h,y:s+l-d,textAnchor:g,verticalAnchor:f},b):(0,ec.default)(i)&&(Y(i.x)||Vs(i.x))&&(Y(i.y)||Vs(i.y))?wT({x:o+Ks(i.x,c),y:s+Ks(i.y,l),textAnchor:`end`,verticalAnchor:`end`},b):wT({x:o+c/2,y:s+l/2,textAnchor:`middle`,verticalAnchor:`middle`},b)},PT=function(e){return`cx`in e&&Y(e.cx)};function FT(e){var t=e.offset,n=t===void 0?5:t,r=xT(e,mT),i=wT({offset:n},r),a=i.viewBox,o=i.position,s=i.value,c=i.children,l=i.content,u=i.className,d=u===void 0?``:u,f=i.textBreakAll;if(!a||(0,J.default)(s)&&(0,J.default)(c)&&!(0,v.isValidElement)(l)&&!(0,X.default)(l))return null;if((0,v.isValidElement)(l))return(0,v.cloneElement)(l,i);var p;if((0,X.default)(l)){if(p=(0,v.createElement)(l,i),(0,v.isValidElement)(p))return p}else p=kT(i);var m=PT(a),h=Z(i,!0);if(m&&(o===`insideStart`||o===`insideEnd`||o===`end`))return jT(i,p,h);var g=m?MT(i):NT(i);return v.createElement(ag,OT({className:q(`recharts-label`,d)},h,g,{breakAll:f}),p)}FT.displayName=`Label`;var IT=function(e){var t=e.cx,n=e.cy,r=e.angle,i=e.startAngle,a=e.endAngle,o=e.r,s=e.radius,c=e.innerRadius,l=e.outerRadius,u=e.x,d=e.y,f=e.top,p=e.left,m=e.width,h=e.height,g=e.clockWise,_=e.labelViewBox;if(_)return _;if(Y(m)&&Y(h)){if(Y(u)&&Y(d))return{x:u,y:d,width:m,height:h};if(Y(f)&&Y(p))return{x:f,y:p,width:m,height:h}}return Y(u)&&Y(d)?{x:u,y:d,width:0,height:0}:Y(t)&&Y(n)?{cx:t,cy:n,startAngle:i||r||0,endAngle:a||r||0,innerRadius:c||0,outerRadius:l||s||o||0,clockWise:g}:e.viewBox?e.viewBox:{}},LT=function(e,t){return e?e===!0?v.createElement(FT,{key:`label-implicit`,viewBox:t}):Us(e)?v.createElement(FT,{key:`label-implicit`,viewBox:t,value:e}):(0,v.isValidElement)(e)?e.type===FT?(0,v.cloneElement)(e,{key:`label-implicit`,viewBox:t}):v.createElement(FT,{key:`label-implicit`,content:e,viewBox:t}):(0,X.default)(e)?v.createElement(FT,{key:`label-implicit`,content:e,viewBox:t}):(0,ec.default)(e)?v.createElement(FT,OT({viewBox:t},e,{key:`label-implicit`})):null:null};FT.parseViewBox=IT,FT.renderCallByParent=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=IT(e),a=xc(r,FT).map(function(e,n){return(0,v.cloneElement)(e,{viewBox:t||i,key:`label-${n}`})});return n?[LT(e.label,t||i)].concat(hT(a)):a};var RT=l(o(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n}))());function zT(e){"@babel/helpers - typeof";return zT=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zT(e)}var BT=[`valueAccessor`],VT=[`data`,`dataKey`,`clockWise`,`id`,`textBreakAll`];function HT(e){return KT(e)||GT(e)||WT(e)||UT()}function UT(){throw TypeError(`Invalid attempt to spread non-iterable instance.
32
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WT(e,t){if(e){if(typeof e==`string`)return qT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qT(e,t)}}function GT(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function KT(e){if(Array.isArray(e))return qT(e)}function qT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function JT(){return JT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JT.apply(this,arguments)}function YT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?YT(Object(n),!0).forEach(function(t){ZT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZT(e,t,n){return t=QT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QT(e){var t=$T(e,`string`);return zT(t)==`symbol`?t:t+``}function $T(e,t){if(zT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(zT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function eE(e,t){if(e==null)return{};var n=tE(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tE(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var nE=function(e){return Array.isArray(e.value)?(0,RT.default)(e.value):e.value};function rE(e){var t=e.valueAccessor,n=t===void 0?nE:t,r=eE(e,BT),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,c=r.textBreakAll,l=eE(r,VT);return!i||!i.length?null:v.createElement(Hc,{className:`recharts-label-list`},i.map(function(e,t){var r=(0,J.default)(a)?n(e,t):gw(e&&e.payload,a),i=(0,J.default)(s)?{}:{id:`${s}-${t}`};return v.createElement(FT,JT({},Z(e,!0),l,i,{parentViewBox:e.parentViewBox,value:r,textBreakAll:c,viewBox:FT.parseViewBox((0,J.default)(o)?e:XT(XT({},e),{},{clockWise:o})),key:`label-${t}`,index:t}))}))}rE.displayName=`LabelList`;function iE(e,t){return e?e===!0?v.createElement(rE,{key:`labelList-implicit`,data:t}):v.isValidElement(e)||(0,X.default)(e)?v.createElement(rE,{key:`labelList-implicit`,data:t,content:e}):(0,ec.default)(e)?v.createElement(rE,JT({data:t},e,{key:`labelList-implicit`})):null:null}function aE(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=xc(r,rE).map(function(e,n){return(0,v.cloneElement)(e,{data:t,key:`labelList-${n}`})});return n?[iE(e.label,t)].concat(HT(i)):i}rE.renderCallByParent=aE;function oE(e){"@babel/helpers - typeof";return oE=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},oE(e)}function sE(){return sE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sE.apply(this,arguments)}function cE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?cE(Object(n),!0).forEach(function(t){uE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uE(e,t,n){return t=dE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dE(e){var t=fE(e,`string`);return oE(t)==`symbol`?t:t+``}function fE(e,t){if(oE(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(oE(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var pE=function(e,t){return Bs(t-e)*Math.min(Math.abs(t-e),359.999)},mE=function(e){var t=e.cx,n=e.cy,r=e.radius,i=e.angle,a=e.sign,o=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(o?1:-1)+r,u=Math.asin(s/l)/aT,d=c?i:i+a*u,f=sT(t,n,l,d),p=sT(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:sT(t,n,l*Math.cos(u*aT),m),theta:u}},hE=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=pE(a,o),c=a+s,l=sT(t,n,i,a),u=sT(t,n,i,c),d=`M ${l.x},${l.y}
33
+ A ${i},${i},0,
34
+ ${+(Math.abs(s)>180)},${+(a>c)},
35
+ ${u.x},${u.y}
36
+ `;if(r>0){var f=sT(t,n,r,a),p=sT(t,n,r,c);d+=`L ${p.x},${p.y}
37
+ A ${r},${r},0,
38
+ ${+(Math.abs(s)>180)},${+(a<=c)},
39
+ ${f.x},${f.y} Z`}else d+=`L ${t},${n} Z`;return d},gE=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.forceCornerRadius,s=e.cornerIsExternal,c=e.startAngle,l=e.endAngle,u=Bs(l-c),d=mE({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,m=d.theta,h=mE({cx:t,cy:n,radius:i,angle:l,sign:-u,cornerRadius:a,cornerIsExternal:s}),g=h.circleTangency,_=h.lineTangency,v=h.theta,y=s?Math.abs(c-l):Math.abs(c-l)-m-v;if(y<0)return o?`M ${p.x},${p.y}
40
+ a${a},${a},0,0,1,${a*2},0
41
+ a${a},${a},0,0,1,${-a*2},0
42
+ `:hE({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var b=`M ${p.x},${p.y}
43
+ A${a},${a},0,0,${+(u<0)},${f.x},${f.y}
44
+ A${i},${i},0,${+(y>180)},${+(u<0)},${g.x},${g.y}
45
+ A${a},${a},0,0,${+(u<0)},${_.x},${_.y}
46
+ `;if(r>0){var x=mE({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),S=x.circleTangency,C=x.lineTangency,w=x.theta,T=mE({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),E=T.circleTangency,D=T.lineTangency,O=T.theta,k=s?Math.abs(c-l):Math.abs(c-l)-w-O;if(k<0&&a===0)return`${b}L${t},${n}Z`;b+=`L${D.x},${D.y}
47
+ A${a},${a},0,0,${+(u<0)},${E.x},${E.y}
48
+ A${r},${r},0,${+(k>180)},${+(u>0)},${S.x},${S.y}
49
+ A${a},${a},0,0,${+(u<0)},${C.x},${C.y}Z`}else b+=`L${t},${n}Z`;return b},_E={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},vE=function(e){var t=lE(lE({},_E),e),n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,l=t.startAngle,u=t.endAngle,d=t.className;if(a<i||l===u)return null;var f=q(`recharts-sector`,d),p=a-i,m=Ks(o,p,0,!0),h=m>0&&Math.abs(l-u)<360?gE({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:l,endAngle:u}):hE({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:l,endAngle:u});return v.createElement(`path`,sE({},Z(t,!0),{className:f,d:h,role:`img`}))};function yE(e){"@babel/helpers - typeof";return yE=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},yE(e)}function bE(){return bE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bE.apply(this,arguments)}function xE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xE(Object(n),!0).forEach(function(t){CE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function CE(e,t,n){return t=wE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wE(e){var t=TE(e,`string`);return yE(t)==`symbol`?t:t+``}function TE(e,t){if(yE(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(yE(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var EE={curveBasisClosed:Xl,curveBasisOpen:Ql,curveBasis:Jl,curveBumpX:wl,curveBumpY:Tl,curveLinearClosed:lu,curveLinear:gl,curveMonotoneX:_u,curveMonotoneY:vu,curveNatural:xu,curveStep:Cu,curveStepAfter:Tu,curveStepBefore:wu},DE=function(e){return e.x===+e.x&&e.y===+e.y},OE=function(e){return e.x},kE=function(e){return e.y},AE=function(e,t){if((0,X.default)(e))return e;var n=`curve${(0,Pu.default)(e)}`;return(n===`curveMonotone`||n===`curveBump`)&&t?EE[`${n}${t===`vertical`?`Y`:`X`}`]:EE[n]||gl},jE=function(e){var t=e.type,n=t===void 0?`linear`:t,r=e.points,i=r===void 0?[]:r,a=e.baseLine,o=e.layout,s=e.connectNulls,c=s!==void 0&&s,l=AE(n,o),u=c?i.filter(function(e){return DE(e)}):i,d;if(Array.isArray(a)){var f=c?a.filter(function(e){return DE(e)}):a,p=u.map(function(e,t){return SE(SE({},e),{},{base:f[t]})});return d=o===`vertical`?bl().y(kE).x1(OE).x0(function(e){return e.base.x}):bl().x(OE).y1(kE).y0(function(e){return e.base.y}),d.defined(DE).curve(l),d(p)}return d=o===`vertical`&&Y(a)?bl().y(kE).x1(OE).x0(a):Y(a)?bl().x(OE).y1(kE).y0(a):yl().x(OE).y(kE),d.defined(DE).curve(l),d(u)},ME=function(e){var t=e.className,n=e.points,r=e.path,i=e.pathRef;if((!n||!n.length)&&!r)return null;var a=n&&n.length?jE(e):r;return v.createElement(`path`,bE({},Z(e,!1),sc(e),{className:q(`recharts-curve`,t),d:a,ref:i}))},NE=o(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),PE=o(((e,t)=>{var n=NE();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),FE=o(((e,t)=>{t.exports=PE()()})),{getOwnPropertyNames:IE,getOwnPropertySymbols:LE}=Object,{hasOwnProperty:RE}=Object.prototype;function zE(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function BE(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function VE(e){return e?.[Symbol.toStringTag]}function HE(e){return IE(e).concat(LE(e))}var UE=Object.hasOwn||((e,t)=>RE.call(e,t));function WE(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var GE=`__v`,KE=`__o`,qE=`_owner`,JE=64,{getOwnPropertyDescriptor:YE,keys:XE}=Object,{propertyIsEnumerable:ZE}=Object.prototype,QE=YE(Object.getPrototypeOf(Int8Array.prototype),Symbol.toStringTag).get;function $E(e,t){return e.byteLength===t.byteLength&&pD(new Uint8Array(e),new Uint8Array(t))}function eD(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function tD(e,t){return e.byteLength===t.byteLength&&pD(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function nD(e,t){return WE(e.getTime(),t.getTime())}function rD(e,t,n){if(e.name!==t.name||e.message!==t.message||e.stack!==t.stack)return!1;let r=e.cause,i=t.cause;if(r!==i&&!n.equals(r,i,`cause`,`cause`,e,t,n))return!1;let a=e.errors,o=t.errors;if(a!==o&&!n.equals(a,o,`errors`,`errors`,e,t,n))return!1;let s=XE(e),c=XE(t),l=s.length;if(!l&&!c.length)return!0;let u=0,d;for(;l-->0;)if(d=s[l],d!==`cause`&&d!==`errors`){if(d!==c[l]&&!ZE.call(t,d)||!n.equals(e[d],t[d],d,d,e,t,n))return!1;++u}let f=c.length-u;return!f||f===+!!ZE.call(t,`cause`)+ +!!ZE.call(t,`errors`)}function iD(e,t){return e===t}function aD(e,t,n){return e.name===t.name&&e.message===t.message&&e.stack===t.stack&&lD(e,t,n)}function oD(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var sD=WE;function cD(e,t,n){let r=XE(e),i=XE(t),a=r.length;if(i.length!==a)return!1;let o=a<=JE,s;for(;a-->0;)if(s=r[a],!_D(e,t,s)&&(s!==i[a]&&!(o?i.includes(s):ZE.call(t,s))||!n.equals(e[s],t[s],s,s,e,t,n)))return!1;return!0}function lD(e,t,n){let r=HE(e),i=r.length;if(HE(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!_D(e,t,a)&&(!UE(t,a)||!n.equals(e[a],t[a],a,a,e,t,n))||(o=YE(e,a),s=YE(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function uD(e,t){return WE(e.valueOf(),t.valueOf())}function dD(e,t){return e.source===t.source&&e.flags===t.flags}function fD(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function pD(e,t){let n=e.length;if(t.length!==n||e.byteOffset!==t.byteOffset)return!1;let r=QE.call(e);if(r===`Float64Array`||r===`Float32Array`||r===`Float16Array`){for(;n-->0;)if(e[n]!==t[n]&&(e[n]===e[n]||t[n]===t[n]))return!1;return!0}for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function mD(e,t){return e.href===t.href||e.protocol===t.protocol&&e.username===t.username&&e.password===t.password&&e.host===t.host&&e.pathname===t.pathname&&e.hash===t.hash&&hD(e.searchParams,t.searchParams)}function hD(e,t){let n=e.toString(),r=t.toString();return n===r||gD(n)===gD(r)}function gD(e){return e.split(`&`).sort().join(`&`)}function _D(e,t,n){return(n===qE||n===KE||n===GE)&&!!(e.$$typeof||t.$$typeof)}var vD=`[object ArrayBuffer]`,yD=`[object Arguments]`,bD=`[object Boolean]`,xD=`[object DataView]`,SD=`[object Date]`,CD=`[object Error]`,wD=`[object Map]`,TD=`[object Number]`,ED=`[object Object]`,DD=`[object RegExp]`,OD=`[object Set]`,kD=`[object String]`,AD={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},jD=`[object URL]`,MD=Object.prototype.toString;function ND({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);if(y==null)return c(h,g,_);let b=MD.call(h);if(b===SD)return r(h,g,_);if(b===DD)return u(h,g,_);if(b===wD)return o(h,g,_);if(b===OD)return d(h,g,_);if(b===ED)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===jD)return p(h,g,_);if(b===CD)return i(h,g,_);if(b===yD)return c(h,g,_);if(AD[b])return f(h,g,_);if(b===vD)return e(h,g,_);if(b===xD)return n(h,g,_);if(b===bD||b===TD||b===kD)return l(h,g,_);if(m){let e=m[b];if(!e){let t=VE(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function PD({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:$E,areArraysEqual:n?lD:eD,areDataViewsEqual:tD,areDatesEqual:nD,areErrorsEqual:n?aD:rD,areFunctionsEqual:iD,areMapsEqual:n?zE(oD,lD):oD,areNumbersEqual:sD,areObjectsEqual:n?lD:cD,arePrimitiveWrappersEqual:uD,areRegExpsEqual:dD,areSetsEqual:n?zE(fD,lD):fD,areTypedArraysEqual:n?zE(pD,lD):pD,areUrlsEqual:mD,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=BE(r.areArraysEqual),t=BE(r.areErrorsEqual),n=BE(r.areMapsEqual),i=BE(r.areObjectsEqual),a=BE(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areErrorsEqual:t,areMapsEqual:n,areObjectsEqual:i,areSetsEqual:a})}return r}function FD(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function ID({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var LD=RD();RD({strict:!0}),RD({circular:!0}),RD({circular:!0,strict:!0}),RD({createInternalComparator:()=>WE}),RD({strict:!0,createInternalComparator:()=>WE}),RD({circular:!0,createInternalComparator:()=>WE}),RD({circular:!0,createInternalComparator:()=>WE,strict:!0});function RD(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=ND(PD(e));return ID({circular:t,comparator:a,createState:r,equals:n?n(a):FD(a),strict:i})}function zD(e){typeof requestAnimationFrame<`u`&&requestAnimationFrame(e)}function BD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1;requestAnimationFrame(function r(i){n<0&&(n=i),i-n>t?(e(i),n=-1):zD(r)})}function VD(e){"@babel/helpers - typeof";return VD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},VD(e)}function HD(e){return qD(e)||KD(e)||WD(e)||UD()}function UD(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
50
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WD(e,t){if(e){if(typeof e==`string`)return GD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GD(e,t)}}function GD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function KD(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function qD(e){if(Array.isArray(e))return e}function JD(){var e={},t=function(){return null},n=!1,r=function r(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var a=HD(i),o=a[0],s=a.slice(1);if(typeof o==`number`){BD(r.bind(null,s),o);return}r(o),BD(r.bind(null,s))}else VD(i)===`object`&&(e=i,t(e)),typeof i==`function`&&i()}};return{stop:function(){n=!0},start:function(e){n=!1,r(e)},subscribe:function(e){return t=e,function(){t=function(){return null}}}}}function YD(e){"@babel/helpers - typeof";return YD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},YD(e)}function XD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?XD(Object(n),!0).forEach(function(t){QD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function QD(e,t,n){return t=$D(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $D(e){var t=eO(e,`string`);return YD(t)===`symbol`?t:String(t)}function eO(e,t){if(YD(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(YD(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var tO=function(e,t){return[Object.keys(e),Object.keys(t)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})},nO=function(e){return e},rO=function(e){return e.replace(/([A-Z])/g,function(e){return`-${e.toLowerCase()}`})},iO=function(e,t){return Object.keys(t).reduce(function(n,r){return ZD(ZD({},n),{},QD({},r,e(r,t[r])))},{})},aO=function(e,t,n){return e.map(function(e){return`${rO(e)} ${t}ms ${n}`}).join(`,`)};function oO(e,t){return lO(e)||cO(e,t)||fO(e,t)||sO()}function sO(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
51
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cO(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function lO(e){if(Array.isArray(e))return e}function uO(e){return mO(e)||pO(e)||fO(e)||dO()}function dO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
52
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fO(e,t){if(e){if(typeof e==`string`)return hO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hO(e,t)}}function pO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function mO(e){if(Array.isArray(e))return hO(e)}function hO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var gO=1e-4,_O=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},vO=function(e,t){return e.map(function(e,n){return e*t**+n}).reduce(function(e,t){return e+t})},yO=function(e,t){return function(n){return vO(_O(e,t),n)}},bO=function(e,t){return function(n){var r=_O(e,t);return vO([].concat(uO(r.map(function(e,t){return e*t}).slice(1)),[0]),n)}},xO=function(){var e=[...arguments],t=e[0],n=e[1],r=e[2],i=e[3];if(e.length===1)switch(e[0]){case`linear`:t=0,n=0,r=1,i=1;break;case`ease`:t=.25,n=.1,r=.25,i=1;break;case`ease-in`:t=.42,n=0,r=1,i=1;break;case`ease-out`:t=.42,n=0,r=.58,i=1;break;case`ease-in-out`:t=0,n=0,r=.58,i=1;break;default:var a=e[0].split(`(`);if(a[0]===`cubic-bezier`&&a[1].split(`)`)[0].split(`,`).length===4){var o=oO(a[1].split(`)`)[0].split(`,`).map(function(e){return parseFloat(e)}),4);t=o[0],n=o[1],r=o[2],i=o[3]}}[t,r,n,i].every(function(e){return typeof e==`number`&&e>=0&&e<=1});var s=yO(t,r),c=yO(n,i),l=bO(t,r),u=function(e){return e>1?1:e<0?0:e},d=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=s(n)-t,a=l(n);if(Math.abs(i-t)<gO||a<gO)return c(n);n=u(n-i/a)}return c(n)};return d.isStepper=!1,d},SO=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.stiff,n=t===void 0?100:t,r=e.damping,i=r===void 0?8:r,a=e.dt,o=a===void 0?17:a,s=function(e,t,r){var a=r+(-(e-t)*n-r*i)*o/1e3,s=r*o/1e3+e;return Math.abs(s-t)<gO&&Math.abs(a)<gO?[t,0]:[s,a]};return s.isStepper=!0,s.dt=o,s},CO=function(){var e=[...arguments][0];if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return xO(e);case`spring`:return SO();default:if(e.split(`(`)[0]===`cubic-bezier`)return xO(e)}return typeof e==`function`?e:null};function wO(e){"@babel/helpers - typeof";return wO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},wO(e)}function TO(e){return OO(e)||DO(e)||IO(e)||EO()}function EO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
53
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function OO(e){if(Array.isArray(e))return LO(e)}function kO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kO(Object(n),!0).forEach(function(t){jO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jO(e,t,n){return t=MO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MO(e){var t=NO(e,`string`);return wO(t)===`symbol`?t:String(t)}function NO(e,t){if(wO(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(wO(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function PO(e,t){return zO(e)||RO(e,t)||IO(e,t)||FO()}function FO(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
54
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IO(e,t){if(e){if(typeof e==`string`)return LO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LO(e,t)}}function LO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function RO(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function zO(e){if(Array.isArray(e))return e}var BO=function(e,t,n){return e+(t-e)*n},VO=function(e){return e.from!==e.to},HO=function e(t,n,r){var i=iO(function(e,n){if(VO(n)){var r=PO(t(n.from,n.to,n.velocity),2),i=r[0],a=r[1];return AO(AO({},n),{},{from:i,velocity:a})}return n},n);return r<1?iO(function(e,t){return VO(t)?AO(AO({},t),{},{velocity:BO(t.velocity,i[e].velocity,r),from:BO(t.from,i[e].from,r)}):t},n):e(t,i,r-1)},UO=(function(e,t,n,r,i){var a=tO(e,t),o=a.reduce(function(n,r){return AO(AO({},n),{},jO({},r,[e[r],t[r]]))},{}),s=a.reduce(function(n,r){return AO(AO({},n),{},jO({},r,{from:e[r],velocity:0,to:t[r]}))},{}),c=-1,l,u,d=function(){return null},f=function(){return iO(function(e,t){return t.from},s)},p=function(){return!Object.values(s).filter(VO).length};return d=n.isStepper?function(r){l||=r;var a=(r-l)/n.dt;s=HO(n,s,a),i(AO(AO(AO({},e),t),f(s))),l=r,p()||(c=requestAnimationFrame(d))}:function(a){u||=a;var s=(a-u)/r,l=iO(function(e,t){return BO.apply(void 0,TO(t).concat([n(s)]))},o);if(i(AO(AO(AO({},e),t),l)),s<1)c=requestAnimationFrame(d);else{var f=iO(function(e,t){return BO.apply(void 0,TO(t).concat([n(1)]))},o);i(AO(AO(AO({},e),t),f))}},function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}}),WO=l(FE());function GO(e){"@babel/helpers - typeof";return GO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},GO(e)}var KO=[`children`,`begin`,`duration`,`attributeName`,`easing`,`isActive`,`steps`,`from`,`to`,`canBegin`,`onAnimationEnd`,`shouldReAnimate`,`onAnimationReStart`];function qO(e,t){if(e==null)return{};var n=JO(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JO(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}function YO(e){return $O(e)||QO(e)||ZO(e)||XO()}function XO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
55
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZO(e,t){if(e){if(typeof e==`string`)return ek(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ek(e,t)}}function QO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function $O(e){if(Array.isArray(e))return ek(e)}function ek(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tk(Object(n),!0).forEach(function(t){rk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rk(e,t,n){return t=sk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ik(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ak(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,sk(r.key),r)}}function ok(e,t,n){return t&&ak(e.prototype,t),n&&ak(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function sk(e){var t=ck(e,`string`);return GO(t)===`symbol`?t:String(t)}function ck(e,t){if(GO(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(GO(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function lk(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uk(e,t)}function uk(e,t){return uk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uk(e,t)}function dk(e){var t=mk();return function(){var n=hk(e),r;if(t){var i=hk(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fk(this,r)}}function fk(e,t){if(t&&(GO(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return pk(e)}function pk(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function mk(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hk(e){return hk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hk(e)}var gk=function(e){lk(n,e);var t=dk(n);function n(e,r){var i;ik(this,n),i=t.call(this,e,r);var a=i.props,o=a.isActive,s=a.attributeName,c=a.from,l=a.to,u=a.steps,d=a.children,f=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(pk(i)),i.changeStyle=i.changeStyle.bind(pk(i)),!o||f<=0)return i.state={style:{}},typeof d==`function`&&(i.state={style:l}),fk(i);if(u&&u.length)i.state={style:u[0].style};else if(c){if(typeof d==`function`)return i.state={style:c},fk(i);i.state={style:s?rk({},s,c):c}}else i.state={style:{}};return i}return ok(n,[{key:`componentDidMount`,value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:`componentDidUpdate`,value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,i=t.attributeName,a=t.shouldReAnimate,o=t.to,s=t.from,c=this.state.style;if(r){if(!n){var l={style:i?rk({},i,o):o};this.state&&c&&(i&&c[i]!==o||!i&&c!==o)&&this.setState(l)}else if(!(LD(e.to,o)&&e.canBegin&&e.isActive)){var u=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var d=u||a?s:e.to;if(this.state&&c){var f={style:i?rk({},i,d):d};(i&&c[i]!==d||!i&&c!==d)&&this.setState(f)}this.runAnimation(nk(nk({},this.props),{},{from:d,begin:0}))}}}},{key:`componentWillUnmount`,value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&=(this.manager.stop(),null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:`handleStyleChange`,value:function(e){this.changeStyle(e)}},{key:`changeStyle`,value:function(e){this.mounted&&this.setState({style:e})}},{key:`runJSAnimation`,value:function(e){var t=this,n=e.from,r=e.to,i=e.duration,a=e.easing,o=e.begin,s=e.onAnimationEnd,c=e.onAnimationStart,l=UO(n,r,CO(a),i,this.changeStyle);this.manager.start([c,o,function(){t.stopJSAnimation=l()},i,s])}},{key:`runStepAnimation`,value:function(e){var t=this,n=e.steps,r=e.begin,i=e.onAnimationStart,a=n[0],o=a.style,s=a.duration,c=s===void 0?0:s;return this.manager.start([i].concat(YO(n.reduce(function(e,r,i){if(i===0)return e;var a=r.duration,o=r.easing,s=o===void 0?`ease`:o,c=r.style,l=r.properties,u=r.onAnimationEnd,d=i>0?n[i-1]:r,f=l||Object.keys(c);if(typeof s==`function`||s===`spring`)return[].concat(YO(e),[t.runJSAnimation.bind(t,{from:d.style,to:c,duration:a,easing:s}),a]);var p=aO(f,a,s),m=nk(nk(nk({},d.style),c),{},{transition:p});return[].concat(YO(e),[m,a,u]).filter(nO)},[o,Math.max(c,r)])),[e.onAnimationEnd]))}},{key:`runAnimation`,value:function(e){this.manager||=JD();var t=e.begin,n=e.duration,r=e.attributeName,i=e.to,a=e.easing,o=e.onAnimationStart,s=e.onAnimationEnd,c=e.steps,l=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),typeof a==`function`||typeof l==`function`||a===`spring`)this.runJSAnimation(e);else if(c.length>1)this.runStepAnimation(e);else{var d=r?rk({},r,i):i,f=aO(Object.keys(d),n,a);u.start([o,t,nk(nk({},d),{},{transition:f}),n,s])}}},{key:`render`,value:function(){var e=this.props,t=e.children;e.begin;var n=e.duration;e.attributeName,e.easing;var r=e.isActive;e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart;var i=qO(e,KO),a=v.Children.count(t),o=this.state.style;if(typeof t==`function`)return t(o);if(!r||a===0||n<=0)return t;var s=function(e){var t=e.props,n=t.style,r=n===void 0?{}:n,a=t.className;return(0,v.cloneElement)(e,nk(nk({},i),{},{style:nk(nk({},r),o),className:a}))};return a===1?s(v.Children.only(t)):v.createElement(`div`,null,v.Children.map(t,function(e){return s(e)}))}}]),n}(v.PureComponent);gk.displayName=`Animate`,gk.defaultProps={begin:0,duration:1e3,from:``,to:``,attributeName:``,easing:`ease`,isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},gk.propTypes={from:WO.default.oneOfType([WO.default.object,WO.default.string]),to:WO.default.oneOfType([WO.default.object,WO.default.string]),attributeName:WO.default.string,duration:WO.default.number,begin:WO.default.number,easing:WO.default.oneOfType([WO.default.string,WO.default.func]),steps:WO.default.arrayOf(WO.default.shape({duration:WO.default.number.isRequired,style:WO.default.object.isRequired,easing:WO.default.oneOfType([WO.default.oneOf([`ease`,`ease-in`,`ease-out`,`ease-in-out`,`linear`]),WO.default.func]),properties:WO.default.arrayOf(`string`),onAnimationEnd:WO.default.func})),children:WO.default.oneOfType([WO.default.node,WO.default.func]),isActive:WO.default.bool,canBegin:WO.default.bool,onAnimationEnd:WO.default.func,shouldReAnimate:WO.default.bool,onAnimationStart:WO.default.func,onAnimationReStart:WO.default.func};var _k=gk;function vk(e){"@babel/helpers - typeof";return vk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vk(e)}function yk(){return yk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yk.apply(this,arguments)}function bk(e,t){return Tk(e)||wk(e,t)||Sk(e,t)||xk()}function xk(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
56
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sk(e,t){if(e){if(typeof e==`string`)return Ck(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ck(e,t)}}function Ck(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wk(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Tk(e){if(Array.isArray(e))return e}function Ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ek(Object(n),!0).forEach(function(t){Ok(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ek(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ok(e,t,n){return t=kk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kk(e){var t=Ak(e,`string`);return vk(t)==`symbol`?t:t+``}function Ak(e,t){if(vk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(vk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var jk=function(e,t,n,r,i){var a=Math.min(Math.abs(n)/2,Math.abs(r)/2),o=r>=0?1:-1,s=n>=0?1:-1,c=+(r>=0&&n>=0||r<0&&n<0),l;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=i[d]>a?a:i[d];l=`M${e},${t+o*u[0]}`,u[0]>0&&(l+=`A ${u[0]},${u[0]},0,0,${c},${e+s*u[0]},${t}`),l+=`L ${e+n-s*u[1]},${t}`,u[1]>0&&(l+=`A ${u[1]},${u[1]},0,0,${c},
57
+ ${e+n},${t+o*u[1]}`),l+=`L ${e+n},${t+r-o*u[2]}`,u[2]>0&&(l+=`A ${u[2]},${u[2]},0,0,${c},
58
+ ${e+n-s*u[2]},${t+r}`),l+=`L ${e+s*u[3]},${t+r}`,u[3]>0&&(l+=`A ${u[3]},${u[3]},0,0,${c},
59
+ ${e},${t+r-o*u[3]}`),l+=`Z`}else if(a>0&&i===+i&&i>0){var p=Math.min(a,i);l=`M ${e},${t+o*p}
60
+ A ${p},${p},0,0,${c},${e+s*p},${t}
61
+ L ${e+n-s*p},${t}
62
+ A ${p},${p},0,0,${c},${e+n},${t+o*p}
63
+ L ${e+n},${t+r-o*p}
64
+ A ${p},${p},0,0,${c},${e+n-s*p},${t+r}
65
+ L ${e+s*p},${t+r}
66
+ A ${p},${p},0,0,${c},${e},${t+r-o*p} Z`}else l=`M ${e},${t} h ${n} v ${r} h ${-n} Z`;return l},Mk=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,i=t.x,a=t.y,o=t.width,s=t.height;if(Math.abs(o)>0&&Math.abs(s)>0){var c=Math.min(i,i+o),l=Math.max(i,i+o),u=Math.min(a,a+s),d=Math.max(a,a+s);return n>=c&&n<=l&&r>=u&&r<=d}return!1},Nk={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},Pk=function(e){var t=Dk(Dk({},Nk),e),n=(0,v.useRef)(),r=bk((0,v.useState)(-1),2),i=r[0],a=r[1];(0,v.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.width,l=t.height,u=t.radius,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isAnimationActive,g=t.isUpdateAnimationActive;if(o!==+o||s!==+s||c!==+c||l!==+l||c===0||l===0)return null;var _=q(`recharts-rectangle`,d);return g?v.createElement(_k,{canBegin:i>0,from:{width:c,height:l,x:o,y:s},to:{width:c,height:l,x:o,y:s},duration:p,animationEasing:f,isActive:g},function(e){var r=e.width,a=e.height,o=e.x,s=e.y;return v.createElement(_k,{canBegin:i>0,from:`0px ${i===-1?1:i}px`,to:`${i}px 0px`,attributeName:`strokeDasharray`,begin:m,duration:p,isActive:h,easing:f},v.createElement(`path`,yk({},Z(t,!0),{className:_,d:jk(o,s,r,a,u),ref:n})))}):v.createElement(`path`,yk({},Z(t,!0),{className:_,d:jk(o,s,c,l,u)}))};function Fk(){return Fk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fk.apply(this,arguments)}var Ik=function(e){var t=e.cx,n=e.cy,r=e.r,i=e.className,a=q(`recharts-dot`,i);return t===+t&&n===+n&&r===+r?v.createElement(`circle`,Fk({},Z(e,!1),sc(e),{className:a,cx:t,cy:n,r})):null};function Lk(e){"@babel/helpers - typeof";return Lk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Lk(e)}var Rk=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function zk(){return zk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zk.apply(this,arguments)}function Bk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Vk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Bk(Object(n),!0).forEach(function(t){Hk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Hk(e,t,n){return t=Uk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uk(e){var t=Wk(e,`string`);return Lk(t)==`symbol`?t:t+``}function Wk(e,t){if(Lk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Lk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Gk(e,t){if(e==null)return{};var n=Kk(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kk(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var qk=function(e,t,n,r,i,a){return`M${e},${i}v${r}M${a},${t}h${n}`},Jk=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.top,o=a===void 0?0:a,s=e.left,c=s===void 0?0:s,l=e.width,u=l===void 0?0:l,d=e.height,f=d===void 0?0:d,p=e.className,m=Gk(e,Rk),h=Vk({x:n,y:i,top:o,left:c,width:u,height:f},m);return!Y(n)||!Y(i)||!Y(u)||!Y(f)||!Y(o)||!Y(c)?null:v.createElement(`path`,zk({},Z(h,!0),{className:q(`recharts-cross`,p),d:qk(n,i,u,f,o,c)}))},Yk=o(((e,t)=>{t.exports=Xd()(Object.getPrototypeOf,Object)})),Xk=o(((e,t)=>{var n=Ro(),r=Yk(),i=zo(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),Zk=o(((e,t)=>{var n=Ro(),r=zo(),i=`[object Boolean]`;function a(e){return e===!0||e===!1||r(e)&&n(e)==i}t.exports=a}));function Qk(e){"@babel/helpers - typeof";return Qk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Qk(e)}function $k(){return $k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$k.apply(this,arguments)}function eA(e,t){return aA(e)||iA(e,t)||nA(e,t)||tA()}function tA(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
67
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nA(e,t){if(e){if(typeof e==`string`)return rA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rA(e,t)}}function rA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function iA(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function aA(e){if(Array.isArray(e))return e}function oA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?oA(Object(n),!0).forEach(function(t){cA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cA(e,t,n){return t=lA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lA(e){var t=uA(e,`string`);return Qk(t)==`symbol`?t:t+``}function uA(e,t){if(Qk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Qk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var dA=function(e,t,n,r,i){var a=n-r,o=`M ${e},${t}`;return o+=`L ${e+n},${t}`,o+=`L ${e+n-a/2},${t+i}`,o+=`L ${e+n-a/2-r},${t+i}`,o+=`L ${e},${t} Z`,o},fA={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},pA=function(e){var t=sA(sA({},fA),e),n=(0,v.useRef)(),r=eA((0,v.useState)(-1),2),i=r[0],a=r[1];(0,v.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.upperWidth,l=t.lowerWidth,u=t.height,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isUpdateAnimationActive;if(o!==+o||s!==+s||c!==+c||l!==+l||u!==+u||c===0&&l===0||u===0)return null;var g=q(`recharts-trapezoid`,d);return h?v.createElement(_k,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:u,x:o,y:s},to:{upperWidth:c,lowerWidth:l,height:u,x:o,y:s},duration:p,animationEasing:f,isActive:h},function(e){var r=e.upperWidth,a=e.lowerWidth,o=e.height,s=e.x,c=e.y;return v.createElement(_k,{canBegin:i>0,from:`0px ${i===-1?1:i}px`,to:`${i}px 0px`,attributeName:`strokeDasharray`,begin:m,duration:p,easing:f},v.createElement(`path`,$k({},Z(t,!0),{className:g,d:dA(s,c,r,a,o),ref:n})))}):v.createElement(`g`,null,v.createElement(`path`,$k({},Z(t,!0),{className:g,d:dA(o,s,c,l,u)})))},mA=l(Xk()),hA=l(Zk()),gA=[`option`,`shapeType`,`propTransformer`,`activeClassName`,`isActive`];function _A(e){"@babel/helpers - typeof";return _A=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_A(e)}function vA(e,t){if(e==null)return{};var n=yA(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yA(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bA(Object(n),!0).forEach(function(t){SA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SA(e,t,n){return t=CA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CA(e){var t=wA(e,`string`);return _A(t)==`symbol`?t:t+``}function wA(e,t){if(_A(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_A(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function TA(e,t){return xA(xA({},t),e)}function EA(e,t){return e===`symbols`}function DA(e){var t=e.shapeType,n=e.elementProps;switch(t){case`rectangle`:return v.createElement(Pk,n);case`trapezoid`:return v.createElement(pA,n);case`sector`:return v.createElement(vE,n);case`symbols`:if(EA(t,n))return v.createElement(Xu,n);break;default:return null}}function OA(e){return(0,v.isValidElement)(e)?e.props:e}function kA(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?TA:r,a=e.activeClassName,o=a===void 0?`recharts-active-shape`:a,s=e.isActive,c=vA(e,gA),l;if((0,v.isValidElement)(t))l=(0,v.cloneElement)(t,xA(xA({},c),OA(t)));else if((0,X.default)(t))l=t(c);else if((0,mA.default)(t)&&!(0,hA.default)(t)){var u=i(t,c);l=v.createElement(DA,{shapeType:n,elementProps:u})}else{var d=c;l=v.createElement(DA,{shapeType:n,elementProps:d})}return s?v.createElement(Hc,{className:o},l):l}function AA(e,t){return t!=null&&`trapezoids`in e.props}function jA(e,t){return t!=null&&`sectors`in e.props}function MA(e,t){return t!=null&&`points`in e.props}function NA(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)==null?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)==null?void 0:r.y)||e.y===t.y;return i&&a}function PA(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function FA(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function IA(e,t){var n;return AA(e,t)?n=NA:jA(e,t)?n=PA:MA(e,t)&&(n=FA),n}function LA(e,t){var n;return AA(e,t)?n=`trapezoids`:jA(e,t)?n=`sectors`:MA(e,t)&&(n=`points`),n}function RA(e,t){if(AA(e,t)){var n;return(n=t.tooltipPayload)==null||(n=n[0])==null||(n=n.payload)==null?void 0:n.payload}if(jA(e,t)){var r;return(r=t.tooltipPayload)==null||(r=r[0])==null||(r=r.payload)==null?void 0:r.payload}return MA(e,t)?t.payload:{}}function zA(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=LA(n,t),a=RA(n,t),o=r.filter(function(e,r){var o=(0,rw.default)(a,e),s=n.props[i].filter(function(e){return IA(n,t)(e,t)}),c=r===n.props[i].indexOf(s[s.length-1]);return o&&c});return r.indexOf(o[o.length-1])}var BA=o(((e,t)=>{var n=Math.ceil,r=Math.max;function i(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=e,e+=i;return c}t.exports=i})),VA=o(((e,t)=>{var n=zm(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),HA=o(((e,t)=>{var n=BA(),r=Tp(),i=VA();function a(e){return function(t,a,o){return o&&typeof o!=`number`&&r(t,a,o)&&(a=o=void 0),t=i(t),a===void 0?(a=t,t=0):a=i(a),o=o===void 0?t<a?1:-1:i(o),n(t,a,o,e)}}t.exports=a})),UA=o(((e,t)=>{t.exports=HA()()}));function WA(e){"@babel/helpers - typeof";return WA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},WA(e)}function GA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GA(Object(n),!0).forEach(function(t){qA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qA(e,t,n){return t=JA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JA(e){var t=YA(e,`string`);return WA(t)==`symbol`?t:t+``}function YA(e,t){if(WA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(WA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var XA=[`Webkit`,`Moz`,`O`,`ms`],ZA=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=XA.reduce(function(e,r){return KA(KA({},e),{},qA({},r+n,t))},{});return r[e]=t,r},QA=l(UA());function $A(e){"@babel/helpers - typeof";return $A=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$A(e)}function ej(){return ej=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ej.apply(this,arguments)}function tj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tj(Object(n),!0).forEach(function(t){pj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rj(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ij(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,mj(r.key),r)}}function aj(e,t,n){return t&&ij(e.prototype,t),n&&ij(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oj(e,t,n){return t=uj(t),sj(e,lj()?Reflect.construct(t,n||[],uj(e).constructor):t.apply(e,n))}function sj(e,t){if(t&&($A(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return cj(e)}function cj(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function lj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lj=function(){return!!e})()}function uj(e){return uj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uj(e)}function dj(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fj(e,t)}function fj(e,t){return fj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fj(e,t)}function pj(e,t,n){return t=mj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mj(e){var t=hj(e,`string`);return $A(t)==`symbol`?t:t+``}function hj(e,t){if($A(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if($A(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var gj=function(e){var t=e.data,n=e.startIndex,r=e.endIndex,i=e.x,a=e.width,o=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,c=_x().domain((0,QA.default)(0,s)).range([i,i+a-o]),l=c.domain().map(function(e){return c(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(r),scale:c,scaleValues:l}},_j=function(e){return e.changedTouches&&!!e.changedTouches.length},vj=function(e){function t(e){var n;return rj(this,t),n=oj(this,t,[e]),pj(n,`handleDrag`,function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)}),pj(n,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])}),pj(n,`handleDragEnd`,function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,i=e.startIndex;r?.({endIndex:t,startIndex:i})}),n.detachDragEndListener()}),pj(n,`handleLeaveWrapper`,function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),pj(n,`handleEnterSlideOrTraveller`,function(){n.setState({isTextActive:!0})}),pj(n,`handleLeaveSlideOrTraveller`,function(){n.setState({isTextActive:!1})}),pj(n,`handleSlideDragStart`,function(e){var t=_j(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,`startX`),endX:n.handleTravellerDragStart.bind(n,`endX`)},n.state={},n}return dj(t,e),aj(t,[{key:`componentWillUnmount`,value:function(){this.leaveTimer&&=(clearTimeout(this.leaveTimer),null),this.detachDragEndListener()}},{key:`getIndex`,value:function(e){var n=e.startX,r=e.endX,i=this.state.scaleValues,a=this.props,o=a.gap,s=a.data.length-1,c=Math.min(n,r),l=Math.max(n,r),u=t.getIndexInRange(i,c),d=t.getIndexInRange(i,l);return{startIndex:u-u%o,endIndex:d===s?s:d-d%o}}},{key:`getTextOfTick`,value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,i=t.dataKey,a=gw(n[e],i,e);return(0,X.default)(r)?r(a,e):a}},{key:`attachDragEndListener`,value:function(){window.addEventListener(`mouseup`,this.handleDragEnd,!0),window.addEventListener(`touchend`,this.handleDragEnd,!0),window.addEventListener(`mousemove`,this.handleDrag,!0)}},{key:`detachDragEndListener`,value:function(){window.removeEventListener(`mouseup`,this.handleDragEnd,!0),window.removeEventListener(`touchend`,this.handleDragEnd,!0),window.removeEventListener(`mousemove`,this.handleDrag,!0)}},{key:`handleSlideDrag`,value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,i=t.endX,a=this.props,o=a.x,s=a.width,c=a.travellerWidth,l=a.startIndex,u=a.endIndex,d=a.onChange,f=e.pageX-n;f>0?f=Math.min(f,o+s-c-i,o+s-c-r):f<0&&(f=Math.max(f,o-r,o-i));var p=this.getIndex({startX:r+f,endX:i+f});(p.startIndex!==l||p.endIndex!==u)&&d&&d(p),this.setState({startX:r+f,endX:i+f,slideMoveStartX:e.pageX})}},{key:`handleTravellerDragStart`,value:function(e,t){var n=_j(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:`handleTravellerMove`,value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,i=t.endX,a=t.startX,o=this.state[r],s=this.props,c=s.x,l=s.width,u=s.travellerWidth,d=s.onChange,f=s.gap,p=s.data,m={startX:this.state.startX,endX:this.state.endX},h=e.pageX-n;h>0?h=Math.min(h,c+l-u-o):h<0&&(h=Math.max(h,c-o)),m[r]=o+h;var g=this.getIndex(m),_=g.startIndex,v=g.endIndex,y=function(){var e=p.length-1;return r===`startX`&&(i>a?_%f===0:v%f===0)||i<a&&v===e||r===`endX`&&(i>a?v%f===0:_%f===0)||i>a&&v===e};this.setState(pj(pj({},r,o+h),`brushMoveStartX`,e.pageX),function(){d&&y()&&d(g)})}},{key:`handleTravellerMoveKeyboard`,value:function(e,t){var n=this,r=this.state,i=r.scaleValues,a=r.startX,o=r.endX,s=this.state[t],c=i.indexOf(s);if(c!==-1){var l=c+e;if(!(l===-1||l>=i.length)){var u=i[l];t===`startX`&&u>=o||t===`endX`&&u<=a||this.setState(pj({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:`renderBackground`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.fill,o=e.stroke;return v.createElement(`rect`,{stroke:o,fill:a,x:t,y:n,width:r,height:i})}},{key:`renderPanorama`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.data,o=e.children,s=e.padding,c=v.Children.only(o);return c?v.cloneElement(c,{x:t,y:n,width:r,height:i,margin:s,compact:!0,data:a}):null}},{key:`renderTravellerLayer`,value:function(e,n){var r=this,i=this.props,a=i.y,o=i.travellerWidth,s=i.height,c=i.traveller,l=i.ariaLabel,u=i.data,d=i.startIndex,f=i.endIndex,p=Math.max(e,this.props.x),m=nj(nj({},Z(this.props,!1)),{},{x:p,y:a,width:o,height:s}),h=l||`Min value: ${u[d]?.name}, Max value: ${u[f]?.name}`;return v.createElement(Hc,{tabIndex:0,role:`slider`,"aria-label":h,"aria-valuenow":e,className:`recharts-brush-traveller`,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){[`ArrowLeft`,`ArrowRight`].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),r.handleTravellerMoveKeyboard(e.key===`ArrowRight`?1:-1,n))},onFocus:function(){r.setState({isTravellerFocused:!0})},onBlur:function(){r.setState({isTravellerFocused:!1})},style:{cursor:`col-resize`}},t.renderTraveller(c,m))}},{key:`renderSlide`,value:function(e,t){var n=this.props,r=n.y,i=n.height,a=n.stroke,o=n.travellerWidth,s=Math.min(e,t)+o,c=Math.max(Math.abs(t-e)-o,0);return v.createElement(`rect`,{className:`recharts-brush-slide`,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:`move`},stroke:`none`,fill:a,fillOpacity:.2,x:s,y:r,width:c,height:i})}},{key:`renderText`,value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,i=e.height,a=e.travellerWidth,o=e.stroke,s=this.state,c=s.startX,l=s.endX,u=5,d={pointerEvents:`none`,fill:o};return v.createElement(Hc,{className:`recharts-brush-texts`},v.createElement(ag,ej({textAnchor:`end`,verticalAnchor:`middle`,x:Math.min(c,l)-u,y:r+i/2},d),this.getTextOfTick(t)),v.createElement(ag,ej({textAnchor:`start`,verticalAnchor:`middle`,x:Math.max(c,l)+a+u,y:r+i/2},d),this.getTextOfTick(n)))}},{key:`render`,value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,i=e.x,a=e.y,o=e.width,s=e.height,c=e.alwaysShowText,l=this.state,u=l.startX,d=l.endX,f=l.isTextActive,p=l.isSlideMoving,m=l.isTravellerMoving,h=l.isTravellerFocused;if(!t||!t.length||!Y(i)||!Y(a)||!Y(o)||!Y(s)||o<=0||s<=0)return null;var g=q(`recharts-brush`,n),_=v.Children.count(r)===1,y=ZA(`userSelect`,`none`);return v.createElement(Hc,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(u,d),this.renderTravellerLayer(u,`startX`),this.renderTravellerLayer(d,`endX`),(f||p||m||h||c)&&this.renderText())}}],[{key:`renderDefaultTraveller`,value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.stroke,o=Math.floor(n+i/2)-1;return v.createElement(v.Fragment,null,v.createElement(`rect`,{x:t,y:n,width:r,height:i,fill:a,stroke:`none`}),v.createElement(`line`,{x1:t+1,y1:o,x2:t+r-1,y2:o,fill:`none`,stroke:`#fff`}),v.createElement(`line`,{x1:t+1,y1:o+2,x2:t+r-1,y2:o+2,fill:`none`,stroke:`#fff`}))}},{key:`renderTraveller`,value:function(e,n){return v.isValidElement(e)?v.cloneElement(e,n):(0,X.default)(e)?e(n):t.renderDefaultTraveller(n)}},{key:`getDerivedStateFromProps`,value:function(e,t){var n=e.data,r=e.width,i=e.x,a=e.travellerWidth,o=e.updateId,s=e.startIndex,c=e.endIndex;if(n!==t.prevData||o!==t.prevUpdateId)return nj({prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r},n&&n.length?gj({data:n,width:r,x:i,travellerWidth:a,startIndex:s,endIndex:c}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||i!==t.prevX||a!==t.prevTravellerWidth)){t.scale.range([i,i+r-a]);var l=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:l}}return null}},{key:`getIndexInRange`,value:function(e,t){for(var n=e.length,r=0,i=n-1;i-r>1;){var a=Math.floor((r+i)/2);e[a]>t?i=a:r=a}return t>=e[i]?i:r}}])}(v.PureComponent);pj(vj,`displayName`,`Brush`),pj(vj,`defaultProps`,{height:40,travellerWidth:5,gap:1,fill:`#fff`,stroke:`#666`,padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var yj=o(((e,t)=>{var n=dp();function r(e,t){var r;return n(e,function(e,n,i){return r=t(e,n,i),!r}),!!r}t.exports=r})),bj=o(((e,t)=>{var n=Td(),r=wf(),i=yj(),a=Mo(),o=Tp();function s(e,t,s){var c=a(e)?n:i;return s&&o(e,t,s)&&(t=void 0),c(e,r(t,3))}t.exports=s})),xj=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r=`extendDomain`),r===t},Sj=o(((e,t)=>{var n=bp();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),Cj=o(((e,t)=>{var n=Sj(),r=lp(),i=wf();function a(e,t){var a={};return t=i(t,3),r(e,function(e,r,i){n(a,r,t(e,r,i))}),a}t.exports=a})),wj=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}t.exports=n})),Tj=o(((e,t)=>{var n=dp();function r(e,t){var r=!0;return n(e,function(e,n,i){return r=!!t(e,n,i),r}),r}t.exports=r})),Ej=o(((e,t)=>{var n=wj(),r=Tj(),i=wf(),a=Mo(),o=Tp();function s(e,t,s){var c=a(e)?n:r;return s&&o(e,t,s)&&(t=void 0),c(e,i(t,3))}t.exports=s})),Dj=[`x`,`y`];function Oj(e){"@babel/helpers - typeof";return Oj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Oj(e)}function kj(){return kj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kj.apply(this,arguments)}function Aj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Aj(Object(n),!0).forEach(function(t){Mj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mj(e,t,n){return t=Nj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nj(e){var t=Pj(e,`string`);return Oj(t)==`symbol`?t:t+``}function Pj(e,t){if(Oj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Oj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Fj(e,t){if(e==null)return{};var n=Ij(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ij(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Lj(e,t){var n=e.x,r=e.y,i=Fj(e,Dj),a=`${n}`,o=parseInt(a,10),s=`${r}`,c=parseInt(s,10),l=`${t.height||i.height}`,u=parseInt(l,10),d=`${t.width||i.width}`,f=parseInt(d,10);return jj(jj(jj(jj(jj({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function Rj(e){return v.createElement(kA,kj({shapeType:`rectangle`,propTransformer:Lj,activeClassName:`recharts-active-bar`},e))}var zj=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,r){if(typeof e==`number`)return e;var i=Y(n)||Hs(n);return i?e(n,r):(!i&&xC(!1),t)}},Bj=[`value`,`background`],Vj;function Hj(e){"@babel/helpers - typeof";return Hj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Hj(e)}function Uj(e,t){if(e==null)return{};var n=Wj(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wj(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Gj(){return Gj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gj.apply(this,arguments)}function Kj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Kj(Object(n),!0).forEach(function(t){iM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jj(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Yj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,aM(r.key),r)}}function Xj(e,t,n){return t&&Yj(e.prototype,t),n&&Yj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zj(e,t,n){return t=tM(t),Qj(e,eM()?Reflect.construct(t,n||[],tM(e).constructor):t.apply(e,n))}function Qj(e,t){if(t&&(Hj(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return $j(e)}function $j(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function eM(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eM=function(){return!!e})()}function tM(e){return tM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tM(e)}function nM(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rM(e,t)}function rM(e,t){return rM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rM(e,t)}function iM(e,t,n){return t=aM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aM(e){var t=oM(e,`string`);return Hj(t)==`symbol`?t:t+``}function oM(e,t){if(Hj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Hj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var sM=function(e){function t(){var e;Jj(this,t);var n=[...arguments];return e=Zj(this,t,[].concat(n)),iM(e,`state`,{isAnimationFinished:!1}),iM(e,`id`,Gs(`recharts-bar-`)),iM(e,`handleAnimationEnd`,function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),iM(e,`handleAnimationStart`,function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return nM(t,e),Xj(t,[{key:`renderRectanglesStatically`,value:function(e){var t=this,n=this.props,r=n.shape,i=n.dataKey,a=n.activeIndex,o=n.activeBar,s=Z(this.props,!1);return e&&e.map(function(e,n){var c=n===a,l=c?o:r,u=qj(qj(qj({},s),e),{},{isActive:c,option:l,index:n,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return v.createElement(Hc,Gj({className:`recharts-bar-rectangle`},lc(t.props,e,n),{key:`rectangle-${e?.x}-${e?.y}-${e?.value}-${n}`}),v.createElement(Rj,u))})}},{key:`renderRectanglesWithAnimation`,value:function(){var e=this,t=this.props,n=t.data,r=t.layout,i=t.isAnimationActive,a=t.animationBegin,o=t.animationDuration,s=t.animationEasing,c=t.animationId,l=this.state.prevData;return v.createElement(_k,{begin:a,duration:o,isActive:i,easing:s,from:{t:0},to:{t:1},key:`bar-${c}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var i=t.t,a=n.map(function(e,t){var n=l&&l[t];if(n){var a=Ys(n.x,e.x),o=Ys(n.y,e.y),s=Ys(n.width,e.width),c=Ys(n.height,e.height);return qj(qj({},e),{},{x:a(i),y:o(i),width:s(i),height:c(i)})}if(r===`horizontal`){var u=Ys(0,e.height)(i);return qj(qj({},e),{},{y:e.y+e.height-u,height:u})}var d=Ys(0,e.width)(i);return qj(qj({},e),{},{width:d})});return v.createElement(Hc,null,e.renderRectanglesStatically(a))})}},{key:`renderRectangles`,value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return n&&t&&t.length&&(!r||!(0,rw.default)(r,t))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(t)}},{key:`renderBackground`,value:function(){var e=this,t=this.props,n=t.data,r=t.dataKey,i=t.activeIndex,a=Z(this.props.background,!1);return n.map(function(t,n){t.value;var o=t.background,s=Uj(t,Bj);if(!o)return null;var c=qj(qj(qj(qj(qj({},s),{},{fill:`#eee`},o),a),lc(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:`recharts-bar-background-rectangle`});return v.createElement(Rj,Gj({key:`background-bar-${n}`,option:e.props.background,isActive:n===i},c))})}},{key:`renderErrorBar`,value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,i=n.xAxis,a=n.yAxis,o=n.layout,s=n.children,c=xc(s,KC);if(!c)return null;var l=o===`vertical`?r[0].height/2:r[0].width/2,u=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:gw(e,t)}},d={clipPath:e?`url(#clipPath-${t})`:null};return v.createElement(Hc,d,c.map(function(e){return v.cloneElement(e,{key:`error-bar-${t}-${e.props.dataKey}`,data:r,xAxis:i,yAxis:a,layout:o,offset:l,dataPointFormatter:u})}))}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,i=e.xAxis,a=e.yAxis,o=e.left,s=e.top,c=e.width,l=e.height,u=e.isAnimationActive,d=e.background,f=e.id;if(t||!n||!n.length)return null;var p=this.state.isAnimationFinished,m=q(`recharts-bar`,r),h=i&&i.allowDataOverflow,g=a&&a.allowDataOverflow,_=h||g,y=(0,J.default)(f)?this.id:f;return v.createElement(Hc,{className:m},h||g?v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`clipPath-${y}`},v.createElement(`rect`,{x:h?o:o-c/2,y:g?s:s-l/2,width:h?c:c*2,height:g?l:l*2}))):null,v.createElement(Hc,{className:`recharts-bar-rectangles`,clipPath:_?`url(#clipPath-${y})`:null},d?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(_,y),(!u||p)&&rE.renderCallByParent(this.props,n))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.data===t.curData?null:{curData:e.data}:{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}}}])}(v.PureComponent);Vj=sM,iM(sM,`displayName`,`Bar`),iM(sM,`defaultProps`,{xAxisId:0,yAxisId:0,legendType:`rect`,minPointSize:0,hide:!1,data:[],layout:`vertical`,activeBar:!1,isAnimationActive:!gm.isSsr,animationBegin:0,animationDuration:400,animationEasing:`ease`}),iM(sM,`getComposedData`,function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,l=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=Fw(r,n);if(!p)return null;var m=t.layout,h=n.type.defaultProps,g=h===void 0?n.props:qj(qj({},h),n.props),_=g.dataKey,v=g.children,y=g.minPointSize,b=m===`horizontal`?o:a,x=l?b.scale.domain():null,S=Uw({numericAxis:b}),C=xc(v,th);return qj({data:d.map(function(e,t){var r,d,f,h,g,v;l?r=Iw(l[u+t],x):(r=gw(e,_),Array.isArray(r)||(r=[S,r]));var b=zj(y,Vj.defaultProps.minPointSize)(r[1],t);if(m===`horizontal`){var w=[o.scale(r[0]),o.scale(r[1])],T=w[0],E=w[1];d=Hw({axis:a,ticks:s,bandSize:i,offset:p.offset,entry:e,index:t}),f=E??T??void 0,h=p.size;var D=T-E;if(g=Number.isNaN(D)?0:D,v={x:d,y:o.y,width:h,height:o.height},Math.abs(b)>0&&Math.abs(g)<Math.abs(b)){var O=Bs(g||b)*(Math.abs(b)-Math.abs(g));f-=O,g+=O}}else{var k=[a.scale(r[0]),a.scale(r[1])],A=k[0],j=k[1];if(d=A,f=Hw({axis:o,ticks:c,bandSize:i,offset:p.offset,entry:e,index:t}),h=j-A,g=p.size,v={x:a.x,y:f,width:a.width,height:g},Math.abs(b)>0&&Math.abs(h)<Math.abs(b)){var ee=Bs(h||b)*(Math.abs(b)-Math.abs(h));h+=ee}}return qj(qj(qj({},e),{},{x:d,y:f,width:h,height:g,value:l?r:r[1],payload:e,background:v},C&&C[t]&&C[t].props),{},{tooltipPayload:[Qw(n,e)],tooltipPosition:{x:d+h/2,y:f+g/2}})}),layout:m},f)});var cM=l(Cj()),lM=l(Ej());function uM(e){"@babel/helpers - typeof";return uM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},uM(e)}function dM(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function fM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,_M(r.key),r)}}function pM(e,t,n){return t&&fM(e.prototype,t),n&&fM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mM(Object(n),!0).forEach(function(t){gM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gM(e,t,n){return t=_M(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _M(e){var t=vM(e,`string`);return uM(t)==`symbol`?t:t+``}function vM(e,t){if(uM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(uM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var yM=function(e,t,n,r,i){var a=e.width,o=e.height,s=e.layout,c=e.children,l=Object.keys(t),u={left:n.left,leftMirror:n.left,right:a-n.right,rightMirror:a-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},d=!!Sc(c,sM);return l.reduce(function(a,o){var c=t[o],l=c.orientation,f=c.domain,p=c.padding,m=p===void 0?{}:p,h=c.mirror,g=c.reversed,_=`${l}${h?`Mirror`:``}`,v,y,b,x,S;if(c.type===`number`&&(c.padding===`gap`||c.padding===`no-gap`)){var C=f[1]-f[0],w=1/0,T=c.categoricalDomain.sort(Qs);if(T.forEach(function(e,t){t>0&&(w=Math.min((e||0)-(T[t-1]||0),w))}),Number.isFinite(w)){var E=w/C,D=c.layout===`vertical`?n.height:n.width;if(c.padding===`gap`&&(v=E*D/2),c.padding===`no-gap`){var O=Ks(e.barCategoryGap,E*D),k=E*D/2;v=k-O-(k-O)/D*O}}}y=r===`xAxis`?[n.left+(m.left||0)+(v||0),n.left+n.width-(m.right||0)-(v||0)]:r===`yAxis`?s===`horizontal`?[n.top+n.height-(m.bottom||0),n.top+(m.top||0)]:[n.top+(m.top||0)+(v||0),n.top+n.height-(m.bottom||0)-(v||0)]:c.range,g&&(y=[y[1],y[0]]);var A=Mw(c,i,d),j=A.scale,ee=A.realScaleType;j.domain(f).range(y),Pw(j);var te=Bw(j,hM(hM({},c),{},{realScaleType:ee}));r===`xAxis`?(S=l===`top`&&!h||l===`bottom`&&h,b=n.left,x=u[_]-S*c.height):r===`yAxis`&&(S=l===`left`&&!h||l===`right`&&h,b=u[_]-S*c.width,x=n.top);var ne=hM(hM(hM({},c),te),{},{realScaleType:ee,x:b,y:x,scale:j,width:r===`xAxis`?n.width:c.width,height:r===`yAxis`?n.height:c.height});return ne.bandSize=Xw(ne,te),!c.hide&&r===`xAxis`?u[_]+=(S?-1:1)*ne.height:c.hide||(u[_]+=(S?-1:1)*ne.width),hM(hM({},a),{},gM({},o,ne))},{})},bM=function(e,t){var n=e.x,r=e.y,i=t.x,a=t.y;return{x:Math.min(n,i),y:Math.min(r,a),width:Math.abs(i-n),height:Math.abs(a-r)}},xM=function(e){var t=e.x1,n=e.y1,r=e.x2,i=e.y2;return bM({x:t,y:n},{x:r,y:i})},SM=function(){function e(t){dM(this,e),this.scale=t}return pM(e,[{key:`domain`,get:function(){return this.scale.domain}},{key:`range`,get:function(){return this.scale.range}},{key:`rangeMin`,get:function(){return this.range()[0]}},{key:`rangeMax`,get:function(){return this.range()[1]}},{key:`bandwidth`,get:function(){return this.scale.bandwidth}},{key:`apply`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.bandAware,r=t.position;if(e!==void 0){if(r)switch(r){case`start`:return this.scale(e);case`middle`:var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case`end`:var a=this.bandwidth?this.bandwidth():0;return this.scale(e)+a;default:return this.scale(e)}if(n){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o}return this.scale(e)}}},{key:`isInRange`,value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],[{key:`create`,value:function(t){return new e(t)}}])}();gM(SM,`EPS`,1e-4);var CM=function(e){var t=Object.keys(e).reduce(function(t,n){return hM(hM({},t),{},gM({},n,SM.create(e[n])))},{});return hM(hM({},t),{},{apply:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.bandAware,i=n.position;return(0,cM.default)(e,function(e,n){return t[n].apply(e,{bandAware:r,position:i})})},isInRange:function(e){return(0,lM.default)(e,function(e,n){return t[n].isInRange(e)})}})};function wM(e){return(e%180+180)%180}var TM=function(e){var t=e.width,n=e.height,r=wM(arguments.length>1&&arguments[1]!==void 0?arguments[1]:0)*Math.PI/180,i=Math.atan(n/t),a=r>i&&r<Math.PI-i?n/Math.sin(r):t/Math.cos(r);return Math.abs(a)},EM=o(((e,t)=>{var n=wf(),r=$d(),i=ef();function a(e){return function(t,a,o){var s=Object(t);if(!r(t)){var c=n(a,3);t=i(t),a=function(e){return c(s[e],e,s)}}var l=e(t,a,o);return l>-1?s[c?t[l]:l]:void 0}}t.exports=a})),DM=o(((e,t)=>{var n=VA();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),OM=o(((e,t)=>{var n=Tf(),r=wf(),i=DM(),a=Math.max;function o(e,t,o){var s=e==null?0:e.length;if(!s)return-1;var c=o==null?0:i(o);return c<0&&(c=a(s+c,0)),n(e,r(t,3),c)}t.exports=o})),kM=o(((e,t)=>{t.exports=EM()(OM())})),AM=(0,l(bs()).default)(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return[`l`,e.left,`t`,e.top,`w`,e.width,`h`,e.height].join(``)}),jM=l(kM()),MM=(0,v.createContext)(void 0),NM=(0,v.createContext)(void 0),PM=(0,v.createContext)(void 0),FM=(0,v.createContext)({}),IM=(0,v.createContext)(void 0),LM=(0,v.createContext)(0),RM=(0,v.createContext)(0),zM=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,i=t.offset,a=e.clipPathId,o=e.children,s=e.width,c=e.height,l=AM(i);return v.createElement(MM.Provider,{value:n},v.createElement(NM.Provider,{value:r},v.createElement(FM.Provider,{value:i},v.createElement(PM.Provider,{value:l},v.createElement(IM.Provider,{value:a},v.createElement(LM.Provider,{value:c},v.createElement(RM.Provider,{value:s},o)))))))},BM=function(){return(0,v.useContext)(IM)},VM=function(e){var t=(0,v.useContext)(MM);t??xC(!1);var n=t[e];return n??xC(!1),n},HM=function(){return qs((0,v.useContext)(MM))},UM=function(){var e=(0,v.useContext)(NM);return(0,jM.default)(e,function(e){return(0,lM.default)(e.domain,Number.isFinite)})||qs(e)},WM=function(e){var t=(0,v.useContext)(NM);t??xC(!1);var n=t[e];return n??xC(!1),n},GM=function(){return(0,v.useContext)(PM)},KM=function(){return(0,v.useContext)(FM)},qM=function(){return(0,v.useContext)(RM)},JM=function(){return(0,v.useContext)(LM)},YM=l(bj());function XM(e){"@babel/helpers - typeof";return XM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},XM(e)}function ZM(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function QM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,uN(r.key),r)}}function $M(e,t,n){return t&&QM(e.prototype,t),n&&QM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function eN(e,t,n){return t=iN(t),tN(e,rN()?Reflect.construct(t,n||[],iN(e).constructor):t.apply(e,n))}function tN(e,t){if(t&&(XM(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return nN(e)}function nN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function rN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rN=function(){return!!e})()}function iN(e){return iN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},iN(e)}function aN(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oN(e,t)}function oN(e,t){return oN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oN(e,t)}function sN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sN(Object(n),!0).forEach(function(t){lN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lN(e,t,n){return t=uN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uN(e){var t=dN(e,`string`);return XM(t)==`symbol`?t:t+``}function dN(e,t){if(XM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(XM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function fN(e,t){return _N(e)||gN(e,t)||mN(e,t)||pN()}function pN(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
68
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mN(e,t){if(e){if(typeof e==`string`)return hN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hN(e,t)}}function hN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gN(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function _N(e){if(Array.isArray(e))return e}function vN(){return vN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vN.apply(this,arguments)}var yN=function(e,t){return v.isValidElement(e)?v.cloneElement(e,t):(0,X.default)(e)?e(t):v.createElement(`line`,vN({},t,{className:`recharts-reference-line-line`}))},bN=function(e,t,n,r,i,a,o,s,c){var l=i.x,u=i.y,d=i.width,f=i.height;if(n){var p=c.y,m=e.y.apply(p,{position:a});if(xj(c,`discard`)&&!e.y.isInRange(m))return null;var h=[{x:l+d,y:m},{x:l,y:m}];return s===`left`?h.reverse():h}if(t){var g=c.x,_=e.x.apply(g,{position:a});if(xj(c,`discard`)&&!e.x.isInRange(_))return null;var v=[{x:_,y:u+f},{x:_,y:u}];return o===`top`?v.reverse():v}if(r){var y=c.segment.map(function(t){return e.apply(t,{position:a})});return xj(c,`discard`)&&(0,YM.default)(y,function(t){return!e.isInRange(t)})?null:y}return null};function xN(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className;e.alwaysShow;var c=BM(),l=VM(i),u=WM(a),d=GM();if(!c||!d)return null;var f=bN(CM({x:l.scale,y:u.scale}),Us(t),Us(n),r&&r.length===2,d,e.position,l.orientation,u.orientation,e);if(!f)return null;var p=fN(f,2),m=p[0],h=m.x,g=m.y,_=p[1],y=_.x,b=_.y,x=cN(cN({clipPath:xj(e,`hidden`)?`url(#${c})`:void 0},Z(e,!0)),{},{x1:h,y1:g,x2:y,y2:b});return v.createElement(Hc,{className:q(`recharts-reference-line`,s)},yN(o,x),FT.renderCallByParent(e,xM({x1:h,y1:g,x2:y,y2:b})))}var SN=function(e){function t(){return ZM(this,t),eN(this,t,arguments)}return aN(t,e),$M(t,[{key:`render`,value:function(){return v.createElement(xN,this.props)}}])}(v.Component);lN(SN,`displayName`,`ReferenceLine`),lN(SN,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,fill:`none`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1,position:`middle`});function CN(){return CN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CN.apply(this,arguments)}function wN(e){"@babel/helpers - typeof";return wN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},wN(e)}function TN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?TN(Object(n),!0).forEach(function(t){LN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DN(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ON(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,RN(r.key),r)}}function kN(e,t,n){return t&&ON(e.prototype,t),n&&ON(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function AN(e,t,n){return t=PN(t),jN(e,NN()?Reflect.construct(t,n||[],PN(e).constructor):t.apply(e,n))}function jN(e,t){if(t&&(wN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return MN(e)}function MN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function NN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NN=function(){return!!e})()}function PN(e){return PN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},PN(e)}function FN(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IN(e,t)}function IN(e,t){return IN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},IN(e,t)}function LN(e,t,n){return t=RN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RN(e){var t=zN(e,`string`);return wN(t)==`symbol`?t:t+``}function zN(e,t){if(wN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(wN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var BN=function(e){var t=e.x,n=e.y,r=e.xAxis,i=e.yAxis,a=CM({x:r.scale,y:i.scale}),o=a.apply({x:t,y:n},{bandAware:!0});return xj(e,`discard`)&&!a.isInRange(o)?null:o},VN=function(e){function t(){return DN(this,t),AN(this,t,arguments)}return FN(t,e),kN(t,[{key:`render`,value:function(){var e=this.props,n=e.x,r=e.y,i=e.r;e.alwaysShow;var a=e.clipPathId,o=Us(n),s=Us(r);if(!o||!s)return null;var c=BN(this.props);if(!c)return null;var l=c.x,u=c.y,d=this.props,f=d.shape,p=d.className,m=EN(EN({clipPath:xj(this.props,`hidden`)?`url(#${a})`:void 0},Z(this.props,!0)),{},{cx:l,cy:u});return v.createElement(Hc,{className:q(`recharts-reference-dot`,p)},t.renderDot(f,m),FT.renderCallByParent(this.props,{x:l-i,y:u-i,width:2*i,height:2*i}))}}])}(v.Component);LN(VN,`displayName`,`ReferenceDot`),LN(VN,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#fff`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1}),LN(VN,`renderDot`,function(e,t){return v.isValidElement(e)?v.cloneElement(e,t):(0,X.default)(e)?e(t):v.createElement(Ik,CN({},t,{cx:t.cx,cy:t.cy,className:`recharts-reference-dot-dot`}))});function HN(){return HN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HN.apply(this,arguments)}function UN(e){"@babel/helpers - typeof";return UN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},UN(e)}function WN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WN(Object(n),!0).forEach(function(t){nP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KN(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function qN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,rP(r.key),r)}}function JN(e,t,n){return t&&qN(e.prototype,t),n&&qN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YN(e,t,n){return t=$N(t),XN(e,QN()?Reflect.construct(t,n||[],$N(e).constructor):t.apply(e,n))}function XN(e,t){if(t&&(UN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return ZN(e)}function ZN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function QN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QN=function(){return!!e})()}function $N(e){return $N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$N(e)}function eP(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tP(e,t)}function tP(e,t){return tP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tP(e,t)}function nP(e,t,n){return t=rP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rP(e){var t=iP(e,`string`);return UN(t)==`symbol`?t:t+``}function iP(e,t){if(UN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(UN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var aP=function(e,t,n,r,i){var a=i.x1,o=i.x2,s=i.y1,c=i.y2,l=i.xAxis,u=i.yAxis;if(!l||!u)return null;var d=CM({x:l.scale,y:u.scale}),f={x:e?d.x.apply(a,{position:`start`}):d.x.rangeMin,y:n?d.y.apply(s,{position:`start`}):d.y.rangeMin},p={x:t?d.x.apply(o,{position:`end`}):d.x.rangeMax,y:r?d.y.apply(c,{position:`end`}):d.y.rangeMax};return xj(i,`discard`)&&(!d.isInRange(f)||!d.isInRange(p))?null:bM(f,p)},oP=function(e){function t(){return KN(this,t),YN(this,t,arguments)}return eP(t,e),JN(t,[{key:`render`,value:function(){var e=this.props,n=e.x1,r=e.x2,i=e.y1,a=e.y2,o=e.className;e.alwaysShow;var s=e.clipPathId,c=Us(n),l=Us(r),u=Us(i),d=Us(a),f=this.props.shape;if(!c&&!l&&!u&&!d&&!f)return null;var p=aP(c,l,u,d,this.props);if(!p&&!f)return null;var m=xj(this.props,`hidden`)?`url(#${s})`:void 0;return v.createElement(Hc,{className:q(`recharts-reference-area`,o)},t.renderRect(f,GN(GN({clipPath:m},Z(this.props,!0)),p)),FT.renderCallByParent(this.props,p))}}])}(v.Component);nP(oP,`displayName`,`ReferenceArea`),nP(oP,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#ccc`,fillOpacity:.5,stroke:`none`,strokeWidth:1}),nP(oP,`renderRect`,function(e,t){return v.isValidElement(e)?v.cloneElement(e,t):(0,X.default)(e)?e(t):v.createElement(Pk,HN({},t,{className:`recharts-reference-area-rect`}))});function sP(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)if(n===void 0||n(e[i])===!0)r.push(e[i]);else return;return r}function cP(e,t,n){return TM({width:e.width+t.width,height:e.height+t.height},n)}function lP(e,t,n){var r=n===`width`,i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function uP(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function dP(e,t){return sP(e,t+1)}function fP(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,c=0,l=1,u=o,d=function(){var t=r?.[c];if(t===void 0)return{v:sP(r,l)};var a=c,d,f=function(){return d===void 0&&(d=n(t,a)),d},p=t.coordinate,m=c===0||uP(e,p,f,u,s);m||(c=0,u=o,l+=1),m&&(u=p+e*(f()/2+i),c+=l)},f;l<=a.length;)if(f=d(),f)return f.v;return[]}function pP(e){"@babel/helpers - typeof";return pP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},pP(e)}function mP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mP(Object(n),!0).forEach(function(t){gP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gP(e,t,n){return t=_P(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _P(e){var t=vP(e,`string`);return pP(t)==`symbol`?t:t+``}function vP(e,t){if(pP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(pP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yP(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,c=t.end,l=function(t){var r=a[t],l,u=function(){return l===void 0&&(l=n(r,t)),l};if(t===o-1){var d=e*(r.coordinate+e*u()/2-c);a[t]=r=hP(hP({},r),{},{tickCoord:d>0?r.coordinate-d*e:r.coordinate})}else a[t]=r=hP(hP({},r),{},{tickCoord:r.coordinate});uP(e,r.tickCoord,u,s,c)&&(c=r.tickCoord-e*(u()/2+i),a[t]=hP(hP({},r),{},{isShow:!0}))},u=o-1;u>=0;u--)l(u);return a}function bP(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,c=t.start,l=t.end;if(a){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-l);o[s-1]=u=hP(hP({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),uP(e,u.tickCoord,function(){return d},c,l)&&(l=u.tickCoord-e*(d/2+i),o[s-1]=hP(hP({},u),{},{isShow:!0}))}for(var p=a?s-1:s,m=function(t){var r=o[t],a,s=function(){return a===void 0&&(a=n(r,t)),a};if(t===0){var u=e*(r.coordinate-e*s()/2-c);o[t]=r=hP(hP({},r),{},{tickCoord:u<0?r.coordinate-u*e:r.coordinate})}else o[t]=r=hP(hP({},r),{},{tickCoord:r.coordinate});uP(e,r.tickCoord,s,c,l)&&(c=r.tickCoord+e*(s()/2+i),o[t]=hP(hP({},r),{},{isShow:!0}))},h=0;h<p;h++)m(h);return o}function xP(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,l=e.tickFormatter,u=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(Y(c)||gm.isSsr)return dP(i,typeof c==`number`&&Y(c)?c:0);var f=[],p=s===`top`||s===`bottom`?`width`:`height`,m=u&&p===`width`?ph(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},h=function(e,r){var i=(0,X.default)(l)?l(e.value,r):e.value;return p===`width`?cP(ph(i,{fontSize:t,letterSpacing:n}),m,d):ph(i,{fontSize:t,letterSpacing:n})[p]},g=i.length>=2?Bs(i[1].coordinate-i[0].coordinate):1,_=lP(a,g,p);return c===`equidistantPreserveStart`?fP(g,_,h,i,o):(f=c===`preserveStart`||c===`preserveStartEnd`?bP(g,_,h,i,o,c===`preserveStartEnd`):yP(g,_,h,i,o),f.filter(function(e){return e.isShow}))}var SP=[`viewBox`],CP=[`viewBox`],wP=[`ticks`];function TP(e){"@babel/helpers - typeof";return TP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},TP(e)}function EP(){return EP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EP.apply(this,arguments)}function DP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?DP(Object(n),!0).forEach(function(t){VP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kP(e,t){if(e==null)return{};var n=AP(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AP(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function MP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,HP(r.key),r)}}function NP(e,t,n){return t&&MP(e.prototype,t),n&&MP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function PP(e,t,n){return t=RP(t),FP(e,LP()?Reflect.construct(t,n||[],RP(e).constructor):t.apply(e,n))}function FP(e,t){if(t&&(TP(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return IP(e)}function IP(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function LP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LP=function(){return!!e})()}function RP(e){return RP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},RP(e)}function zP(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BP(e,t)}function BP(e,t){return BP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},BP(e,t)}function VP(e,t,n){return t=HP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HP(e){var t=UP(e,`string`);return TP(t)==`symbol`?t:t+``}function UP(e,t){if(TP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(TP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var WP=function(e){function t(e){var n;return jP(this,t),n=PP(this,t,[e]),n.state={fontSize:``,letterSpacing:``},n}return zP(t,e),NP(t,[{key:`shouldComponentUpdate`,value:function(e,t){var n=e.viewBox,r=kP(e,SP),i=this.props,a=i.viewBox,o=kP(i,CP);return!$s(n,a)||!$s(r,o)||!$s(t,this.state)}},{key:`componentDidMount`,value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName(`recharts-cartesian-axis-tick-value`)[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:`getTickLineCoord`,value:function(e){var t=this.props,n=t.x,r=t.y,i=t.width,a=t.height,o=t.orientation,s=t.tickSize,c=t.mirror,l=t.tickMargin,u,d,f,p,m,h,g=c?-1:1,_=e.tickSize||s,v=Y(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case`top`:u=d=e.coordinate,p=r+ +!c*a,f=p-g*_,h=f-g*l,m=v;break;case`left`:f=p=e.coordinate,d=n+ +!c*i,u=d-g*_,m=u-g*l,h=v;break;case`right`:f=p=e.coordinate,d=n+ +c*i,u=d+g*_,m=u+g*l,h=v;break;default:u=d=e.coordinate,p=r+ +c*a,f=p+g*_,h=f+g*l,m=v}return{line:{x1:u,y1:f,x2:d,y2:p},tick:{x:m,y:h}}}},{key:`getTickTextAnchor`,value:function(){var e=this.props,t=e.orientation,n=e.mirror,r;switch(t){case`left`:r=n?`start`:`end`;break;case`right`:r=n?`end`:`start`;break;default:r=`middle`}return r}},{key:`getTickVerticalAnchor`,value:function(){var e=this.props,t=e.orientation,n=e.mirror,r=`end`;switch(t){case`left`:case`right`:r=`middle`;break;case`top`:r=n?`start`:`end`;break;default:r=n?`end`:`start`}return r}},{key:`renderAxisLine`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.orientation,o=e.mirror,s=e.axisLine,c=OP(OP(OP({},Z(this.props,!1)),Z(s,!1)),{},{fill:`none`});if(a===`top`||a===`bottom`){var l=+(a===`top`&&!o||a===`bottom`&&o);c=OP(OP({},c),{},{x1:t,y1:n+l*i,x2:t+r,y2:n+l*i})}else{var u=+(a===`left`&&!o||a===`right`&&o);c=OP(OP({},c),{},{x1:t+u*r,y1:n,x2:t+u*r,y2:n+i})}return v.createElement(`line`,EP({},c,{className:q(`recharts-cartesian-axis-line`,(0,Rs.default)(s,`className`))}))}},{key:`renderTicks`,value:function(e,n,r){var i=this,a=this.props,o=a.tickLine,s=a.stroke,c=a.tick,l=a.tickFormatter,u=a.unit,d=xP(OP(OP({},this.props),{},{ticks:e}),n,r),f=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),m=Z(this.props,!1),h=Z(c,!1),g=OP(OP({},m),{},{fill:`none`},Z(o,!1)),_=d.map(function(e,n){var r=i.getTickLineCoord(e),a=r.line,_=r.tick,y=OP(OP(OP(OP({textAnchor:f,verticalAnchor:p},m),{},{stroke:`none`,fill:s},h),_),{},{index:n,payload:e,visibleTicksCount:d.length,tickFormatter:l});return v.createElement(Hc,EP({className:`recharts-cartesian-axis-tick`,key:`tick-${e.value}-${e.coordinate}-${e.tickCoord}`},lc(i.props,e,n)),o&&v.createElement(`line`,EP({},g,a,{className:q(`recharts-cartesian-axis-tick-line`,(0,Rs.default)(o,`className`))})),c&&t.renderTickItem(c,y,`${(0,X.default)(l)?l(e.value,n):e.value}${u||``}`))});return v.createElement(`g`,{className:`recharts-cartesian-axis-ticks`},_)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.axisLine,r=t.width,i=t.height,a=t.ticksGenerator,o=t.className;if(t.hide)return null;var s=this.props,c=s.ticks,l=kP(s,wP),u=c;return(0,X.default)(a)&&(u=c&&c.length>0?a(this.props):a(l)),r<=0||i<=0||!u||!u.length?null:v.createElement(Hc,{className:q(`recharts-cartesian-axis`,o),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),FT.renderCallByParent(this.props))}}],[{key:`renderTickItem`,value:function(e,t,n){var r,i=q(t.className,`recharts-cartesian-axis-tick-value`);return r=v.isValidElement(e)?v.cloneElement(e,OP(OP({},t),{},{className:i})):(0,X.default)(e)?e(OP(OP({},t),{},{className:i})):v.createElement(ag,EP({},t,{className:`recharts-cartesian-axis-tick-value`}),n),r}}])}(v.Component);VP(WP,`displayName`,`CartesianAxis`),VP(WP,`defaultProps`,{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:`bottom`,ticks:[],stroke:`#666`,tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:`preserveEnd`});var GP=[`x1`,`y1`,`x2`,`y2`,`key`],KP=[`offset`];function qP(e){"@babel/helpers - typeof";return qP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},qP(e)}function JP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JP(Object(n),!0).forEach(function(t){XP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XP(e,t,n){return t=ZP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZP(e){var t=QP(e,`string`);return qP(t)==`symbol`?t:t+``}function QP(e,t){if(qP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(qP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $P(){return $P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$P.apply(this,arguments)}function eF(e,t){if(e==null)return{};var n=tF(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var nF=function(e){var t=e.fill;if(!t||t===`none`)return null;var n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.ry;return v.createElement(`rect`,{x:r,y:i,ry:s,width:a,height:o,stroke:`none`,fill:t,fillOpacity:n,className:`recharts-cartesian-grid-bg`})};function rF(e,t){var n;if(v.isValidElement(e))n=v.cloneElement(e,t);else if((0,X.default)(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,c=Z(eF(t,GP),!1);c.offset;var l=eF(c,KP);n=v.createElement(`line`,$P({},l,{x1:r,y1:i,x2:a,y2:o,fill:`none`,key:s}))}return n}function iF(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0||r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(r,a){return rF(i,YP(YP({},e),{},{x1:t,y1:r,x2:t+n,y2:r,key:`line-${a}`,index:a}))});return v.createElement(`g`,{className:`recharts-cartesian-grid-horizontal`},o)}function aF(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0||r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(r,a){return rF(i,YP(YP({},e),{},{x1:r,y1:t,x2:r,y2:t+n,key:`line-${a}`,index:a}))});return v.createElement(`g`,{className:`recharts-cartesian-grid-vertical`},o)}function oF(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,c=e.horizontal;if(!(c===void 0||c)||!t||!t.length)return null;var l=s.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==l[0]&&l.unshift(0);var u=l.map(function(e,s){var c=l[s+1]?l[s+1]-e:i+o-e;if(c<=0)return null;var u=s%t.length;return v.createElement(`rect`,{key:`react-${s}`,y:e,x:r,height:c,width:a,stroke:`none`,fill:t[u],fillOpacity:n,className:`recharts-cartesian-grid-bg`})});return v.createElement(`g`,{className:`recharts-cartesian-gridstripes-horizontal`},u)}function sF(e){var t=e.vertical,n=t===void 0||t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,c=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var u=l.map(function(e){return Math.round(e+a-a)}).sort(function(e,t){return e-t});a!==u[0]&&u.unshift(0);var d=u.map(function(e,t){var n=u[t+1]?u[t+1]-e:a+s-e;if(n<=0)return null;var l=t%r.length;return v.createElement(`rect`,{key:`react-${t}`,x:e,y:o,width:n,height:c,stroke:`none`,fill:r[l],fillOpacity:i,className:`recharts-cartesian-grid-bg`})});return v.createElement(`g`,{className:`recharts-cartesian-gridstripes-vertical`},d)}var cF=function(e,t){var n=e.xAxis,r=e.width,i=e.height,a=e.offset;return Ow(xP(YP(YP(YP({},WP.defaultProps),n),{},{ticks:kw(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},lF=function(e,t){var n=e.yAxis,r=e.width,i=e.height,a=e.offset;return Ow(xP(YP(YP(YP({},WP.defaultProps),n),{},{ticks:kw(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},uF={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:`#ccc`,fill:`none`,verticalFill:[],horizontalFill:[]};function dF(e){var t=qM(),n=JM(),r=KM(),i=YP(YP({},e),{},{stroke:e.stroke??uF.stroke,fill:e.fill??uF.fill,horizontal:e.horizontal??uF.horizontal,horizontalFill:e.horizontalFill??uF.horizontalFill,vertical:e.vertical??uF.vertical,verticalFill:e.verticalFill??uF.verticalFill,x:Y(e.x)?e.x:r.left,y:Y(e.y)?e.y:r.top,width:Y(e.width)?e.width:r.width,height:Y(e.height)?e.height:r.height}),a=i.x,o=i.y,s=i.width,c=i.height,l=i.syncWithTicks,u=i.horizontalValues,d=i.verticalValues,f=HM(),p=UM();if(!Y(s)||s<=0||!Y(c)||c<=0||!Y(a)||a!==+a||!Y(o)||o!==+o)return null;var m=i.verticalCoordinatesGenerator||cF,h=i.horizontalCoordinatesGenerator||lF,g=i.horizontalPoints,_=i.verticalPoints;if((!g||!g.length)&&(0,X.default)(h)){var y=u&&u.length,b=h({yAxis:p?YP(YP({},p),{},{ticks:y?u:p.ticks}):void 0,width:t,height:n,offset:r},y?!0:l);`${qP(b)}`,Array.isArray(b)&&(g=b)}if((!_||!_.length)&&(0,X.default)(m)){var x=d&&d.length,S=m({xAxis:f?YP(YP({},f),{},{ticks:x?d:f.ticks}):void 0,width:t,height:n,offset:r},x?!0:l);`${qP(S)}`,Array.isArray(S)&&(_=S)}return v.createElement(`g`,{className:`recharts-cartesian-grid`},v.createElement(nF,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),v.createElement(iF,$P({},i,{offset:r,horizontalPoints:g,xAxis:f,yAxis:p})),v.createElement(aF,$P({},i,{offset:r,verticalPoints:_,xAxis:f,yAxis:p})),v.createElement(oF,$P({},i,{horizontalPoints:g})),v.createElement(sF,$P({},i,{verticalPoints:_})))}dF.displayName=`CartesianGrid`;var fF=[`type`,`layout`,`connectNulls`,`ref`],pF=[`key`];function mF(e){"@babel/helpers - typeof";return mF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},mF(e)}function hF(e,t){if(e==null)return{};var n=gF(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _F(){return _F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_F.apply(this,arguments)}function vF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vF(Object(n),!0).forEach(function(t){IF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bF(e){return wF(e)||CF(e)||SF(e)||xF()}function xF(){throw TypeError(`Invalid attempt to spread non-iterable instance.
69
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SF(e,t){if(e){if(typeof e==`string`)return TF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TF(e,t)}}function CF(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function wF(e){if(Array.isArray(e))return TF(e)}function TF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function EF(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function DF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,LF(r.key),r)}}function OF(e,t,n){return t&&DF(e.prototype,t),n&&DF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function kF(e,t,n){return t=NF(t),AF(e,MF()?Reflect.construct(t,n||[],NF(e).constructor):t.apply(e,n))}function AF(e,t){if(t&&(mF(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return jF(e)}function jF(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function MF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MF=function(){return!!e})()}function NF(e){return NF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},NF(e)}function PF(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FF(e,t)}function FF(e,t){return FF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},FF(e,t)}function IF(e,t,n){return t=LF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LF(e){var t=RF(e,`string`);return mF(t)==`symbol`?t:t+``}function RF(e,t){if(mF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(mF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var zF=function(e){function t(){var e;EF(this,t);var n=[...arguments];return e=kF(this,t,[].concat(n)),IF(e,`state`,{isAnimationFinished:!0,totalLength:0}),IF(e,`generateSimpleStrokeDasharray`,function(e,t){return`${t}px ${e-t}px`}),IF(e,`getStrokeDasharray`,function(n,r,i){var a=i.reduce(function(e,t){return e+t});if(!a)return e.generateSimpleStrokeDasharray(r,n);for(var o=Math.floor(n/a),s=n%a,c=r-n,l=[],u=0,d=0;u<i.length;d+=i[u],++u)if(d+i[u]>s){l=[].concat(bF(i.slice(0,u)),[s-d]);break}var f=l.length%2==0?[0,c]:[c];return[].concat(bF(t.repeat(i,o)),bF(l),f).map(function(e){return`${e}px`}).join(`, `)}),IF(e,`id`,Gs(`recharts-line-`)),IF(e,`pathRef`,function(t){e.mainCurve=t}),IF(e,`handleAnimationEnd`,function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),IF(e,`handleAnimationStart`,function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return PF(t,e),OF(t,[{key:`componentDidMount`,value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:`componentDidUpdate`,value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:`getTotalLength`,value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}},{key:`renderErrorBar`,value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.points,i=n.xAxis,a=n.yAxis,o=n.layout,s=n.children,c=xc(s,KC);if(!c)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:gw(e.payload,t)}},u={clipPath:e?`url(#clipPath-${t})`:null};return v.createElement(Hc,u,c.map(function(e){return v.cloneElement(e,{key:`bar-${e.props.dataKey}`,data:r,xAxis:i,yAxis:a,layout:o,dataPointFormatter:l})}))}},{key:`renderDots`,value:function(e,n,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.dot,o=i.points,s=i.dataKey,c=Z(this.props,!1),l=Z(a,!0),u=o.map(function(e,n){var r=yF(yF(yF({key:`dot-${n}`,r:3},c),l),{},{index:n,cx:e.x,cy:e.y,value:e.value,dataKey:s,payload:e.payload,points:o});return t.renderDotItem(a,r)}),d={clipPath:e?`url(#clipPath-${n?``:`dots-`}${r})`:null};return v.createElement(Hc,_F({className:`recharts-line-dots`,key:`dots`},d),u)}},{key:`renderCurveStatically`,value:function(e,t,n,r){var i=this.props,a=i.type,o=i.layout,s=i.connectNulls;i.ref;var c=yF(yF(yF({},Z(hF(i,fF),!0)),{},{fill:`none`,className:`recharts-line-curve`,clipPath:t?`url(#clipPath-${n})`:null,points:e},r),{},{type:a,layout:o,connectNulls:s});return v.createElement(ME,_F({},c,{pathRef:this.pathRef}))}},{key:`renderCurveWithAnimation`,value:function(e,t){var n=this,r=this.props,i=r.points,a=r.strokeDasharray,o=r.isAnimationActive,s=r.animationBegin,c=r.animationDuration,l=r.animationEasing,u=r.animationId,d=r.animateNewValues,f=r.width,p=r.height,m=this.state,h=m.prevPoints,g=m.totalLength;return v.createElement(_k,{begin:s,duration:c,isActive:o,easing:l,from:{t:0},to:{t:1},key:`line-${u}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var o=r.t;if(h){var s=h.length/i.length,c=i.map(function(e,t){var n=Math.floor(t*s);if(h[n]){var r=h[n],i=Ys(r.x,e.x),a=Ys(r.y,e.y);return yF(yF({},e),{},{x:i(o),y:a(o)})}if(d){var c=Ys(f*2,e.x),l=Ys(p/2,e.y);return yF(yF({},e),{},{x:c(o),y:l(o)})}return yF(yF({},e),{},{x:e.x,y:e.y})});return n.renderCurveStatically(c,e,t)}var l=Ys(0,g)(o),u;if(a){var m=`${a}`.split(/[,\s]+/gim).map(function(e){return parseFloat(e)});u=n.getStrokeDasharray(l,g,m)}else u=n.generateSimpleStrokeDasharray(g,l);return n.renderCurveStatically(i,e,t,{strokeDasharray:u})})}},{key:`renderCurve`,value:function(e,t){var n=this.props,r=n.points,i=n.isAnimationActive,a=this.state,o=a.prevPoints,s=a.totalLength;return i&&r&&r.length&&(!o&&s>0||!(0,rw.default)(o,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.xAxis,o=e.yAxis,s=e.top,c=e.left,l=e.width,u=e.height,d=e.isAnimationActive,f=e.id;if(t||!r||!r.length)return null;var p=this.state.isAnimationFinished,m=r.length===1,h=q(`recharts-line`,i),g=a&&a.allowDataOverflow,_=o&&o.allowDataOverflow,y=g||_,b=(0,J.default)(f)?this.id:f,x=Z(n,!1)??{r:3,strokeWidth:2},S=x.r,C=S===void 0?3:S,w=x.strokeWidth,T=w===void 0?2:w,E=(Ec(n)?n:{}).clipDot,D=E===void 0||E,O=C*2+T;return v.createElement(Hc,{className:h},g||_?v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`clipPath-${b}`},v.createElement(`rect`,{x:g?c:c-l/2,y:_?s:s-u/2,width:g?l:l*2,height:_?u:u*2})),!D&&v.createElement(`clipPath`,{id:`clipPath-dots-${b}`},v.createElement(`rect`,{x:c-O/2,y:s-O/2,width:l+O,height:u+O}))):null,!m&&this.renderCurve(y,b),this.renderErrorBar(y,b),(m||n)&&this.renderDots(y,D,b),(!d||p)&&rE.renderCallByParent(this.props,r))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.points===t.curPoints?null:{curPoints:e.points}:{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}}},{key:`repeat`,value:function(e,t){for(var n=e.length%2==0?e:[].concat(bF(e),[0]),r=[],i=0;i<t;++i)r=[].concat(bF(r),bF(n));return r}},{key:`renderDotItem`,value:function(e,t){var n;if(v.isValidElement(e))n=v.cloneElement(e,t);else if((0,X.default)(e))n=e(t);else{var r=t.key,i=hF(t,pF),a=q(`recharts-line-dot`,typeof e==`boolean`?``:e.className);n=v.createElement(Ik,_F({key:r},i,{className:a}))}return n}}])}(v.PureComponent);IF(zF,`displayName`,`Line`),IF(zF,`defaultProps`,{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,fill:`#fff`,points:[],isAnimationActive:!gm.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,hide:!1,label:!1}),IF(zF,`getComposedData`,function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize,c=e.displayedData,l=e.offset,u=t.layout;return yF({points:c.map(function(e,t){var c=gw(e,o);return u===`horizontal`?{x:Vw({axis:n,ticks:i,bandSize:s,entry:e,index:t}),y:(0,J.default)(c)?null:r.scale(c),value:c,payload:e}:{x:(0,J.default)(c)?null:n.scale(c),y:Vw({axis:r,ticks:a,bandSize:s,entry:e,index:t}),value:c,payload:e}}),layout:u},l)});var BF=[`layout`,`type`,`stroke`,`connectNulls`,`isRange`,`ref`],VF=[`key`],HF;function UF(e){"@babel/helpers - typeof";return UF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},UF(e)}function WF(e,t){if(e==null)return{};var n=GF(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function KF(){return KF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KF.apply(this,arguments)}function qF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qF(Object(n),!0).forEach(function(t){aI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YF(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function XF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,oI(r.key),r)}}function ZF(e,t,n){return t&&XF(e.prototype,t),n&&XF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function QF(e,t,n){return t=nI(t),$F(e,tI()?Reflect.construct(t,n||[],nI(e).constructor):t.apply(e,n))}function $F(e,t){if(t&&(UF(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return eI(e)}function eI(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function tI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tI=function(){return!!e})()}function nI(e){return nI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nI(e)}function rI(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iI(e,t)}function iI(e,t){return iI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iI(e,t)}function aI(e,t,n){return t=oI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oI(e){var t=sI(e,`string`);return UF(t)==`symbol`?t:t+``}function sI(e,t){if(UF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(UF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var cI=function(e){function t(){var e;YF(this,t);var n=[...arguments];return e=QF(this,t,[].concat(n)),aI(e,`state`,{isAnimationFinished:!0}),aI(e,`id`,Gs(`recharts-area-`)),aI(e,`handleAnimationEnd`,function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),(0,X.default)(t)&&t()}),aI(e,`handleAnimationStart`,function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),(0,X.default)(t)&&t()}),e}return rI(t,e),ZF(t,[{key:`renderDots`,value:function(e,n,r){var i=this.props.isAnimationActive,a=this.state.isAnimationFinished;if(i&&!a)return null;var o=this.props,s=o.dot,c=o.points,l=o.dataKey,u=Z(this.props,!1),d=Z(s,!0),f=c.map(function(e,n){var r=JF(JF(JF({key:`dot-${n}`,r:3},u),d),{},{index:n,cx:e.x,cy:e.y,dataKey:l,value:e.value,payload:e.payload,points:c});return t.renderDotItem(s,r)}),p={clipPath:e?`url(#clipPath-${n?``:`dots-`}${r})`:null};return v.createElement(Hc,KF({className:`recharts-area-dots`},p),f)}},{key:`renderHorizontalRect`,value:function(e){var t=this.props,n=t.baseLine,r=t.points,i=t.strokeWidth,a=r[0].x,o=r[r.length-1].x,s=e*Math.abs(a-o),c=(0,ew.default)(r.map(function(e){return e.y||0}));return Y(n)&&typeof n==`number`?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max((0,ew.default)(n.map(function(e){return e.y||0})),c)),Y(c)?v.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}},{key:`renderVerticalRect`,value:function(e){var t=this.props,n=t.baseLine,r=t.points,i=t.strokeWidth,a=r[0].y,o=r[r.length-1].y,s=e*Math.abs(a-o),c=(0,ew.default)(r.map(function(e){return e.x||0}));return Y(n)&&typeof n==`number`?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max((0,ew.default)(n.map(function(e){return e.x||0})),c)),Y(c)?v.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}},{key:`renderClipRect`,value:function(e){return this.props.layout===`vertical`?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:`renderAreaStatically`,value:function(e,t,n,r){var i=this.props,a=i.layout,o=i.type,s=i.stroke,c=i.connectNulls,l=i.isRange;i.ref;var u=WF(i,BF);return v.createElement(Hc,{clipPath:n?`url(#clipPath-${r})`:null},v.createElement(ME,KF({},Z(u,!0),{points:e,connectNulls:c,type:o,baseLine:t,layout:a,stroke:`none`,className:`recharts-area-area`})),s!==`none`&&v.createElement(ME,KF({},Z(this.props,!1),{className:`recharts-area-curve`,layout:a,type:o,connectNulls:c,fill:`none`,points:e})),s!==`none`&&l&&v.createElement(ME,KF({},Z(this.props,!1),{className:`recharts-area-curve`,layout:a,type:o,connectNulls:c,fill:`none`,points:t})))}},{key:`renderAreaWithAnimation`,value:function(e,t){var n=this,r=this.props,i=r.points,a=r.baseLine,o=r.isAnimationActive,s=r.animationBegin,c=r.animationDuration,l=r.animationEasing,u=r.animationId,d=this.state,f=d.prevPoints,p=d.prevBaseLine;return v.createElement(_k,{begin:s,duration:c,isActive:o,easing:l,from:{t:0},to:{t:1},key:`area-${u}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var o=r.t;if(f){var s=f.length/i.length,c=i.map(function(e,t){var n=Math.floor(t*s);if(f[n]){var r=f[n],i=Ys(r.x,e.x),a=Ys(r.y,e.y);return JF(JF({},e),{},{x:i(o),y:a(o)})}return e}),l=Y(a)&&typeof a==`number`?Ys(p,a)(o):(0,J.default)(a)||(0,Ls.default)(a)?Ys(p,0)(o):a.map(function(e,t){var n=Math.floor(t*s);if(p[n]){var r=p[n],i=Ys(r.x,e.x),a=Ys(r.y,e.y);return JF(JF({},e),{},{x:i(o),y:a(o)})}return e});return n.renderAreaStatically(c,l,e,t)}return v.createElement(Hc,null,v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`animationClipPath-${t}`},n.renderClipRect(o))),v.createElement(Hc,{clipPath:`url(#animationClipPath-${t})`},n.renderAreaStatically(i,a,e,t)))})}},{key:`renderArea`,value:function(e,t){var n=this.props,r=n.points,i=n.baseLine,a=n.isAnimationActive,o=this.state,s=o.prevPoints,c=o.prevBaseLine,l=o.totalLength;return a&&r&&r.length&&(!s&&l>0||!(0,rw.default)(s,r)||!(0,rw.default)(c,i))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,i,e,t)}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,o=e.left,s=e.xAxis,c=e.yAxis,l=e.width,u=e.height,d=e.isAnimationActive,f=e.id;if(t||!r||!r.length)return null;var p=this.state.isAnimationFinished,m=r.length===1,h=q(`recharts-area`,i),g=s&&s.allowDataOverflow,_=c&&c.allowDataOverflow,y=g||_,b=(0,J.default)(f)?this.id:f,x=Z(n,!1)??{r:3,strokeWidth:2},S=x.r,C=S===void 0?3:S,w=x.strokeWidth,T=w===void 0?2:w,E=(Ec(n)?n:{}).clipDot,D=E===void 0||E,O=C*2+T;return v.createElement(Hc,{className:h},g||_?v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`clipPath-${b}`},v.createElement(`rect`,{x:g?o:o-l/2,y:_?a:a-u/2,width:g?l:l*2,height:_?u:u*2})),!D&&v.createElement(`clipPath`,{id:`clipPath-dots-${b}`},v.createElement(`rect`,{x:o-O/2,y:a-O/2,width:l+O,height:u+O}))):null,m?null:this.renderArea(y,b),(n||m)&&this.renderDots(y,D,b),(!d||p)&&rE.renderCallByParent(this.props,r))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null:{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}}}])}(v.PureComponent);HF=cI,aI(cI,`displayName`,`Area`),aI(cI,`defaultProps`,{stroke:`#3182bd`,fill:`#3182bd`,fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:`line`,connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!gm.isSsr,animationBegin:0,animationDuration:1500,animationEasing:`ease`}),aI(cI,`getBaseValue`,function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue??a;if(Y(o)&&typeof o==`number`)return o;var s=i===`horizontal`?r:n,c=s.scale.domain();if(s.type===`number`){var l=Math.max(c[0],c[1]),u=Math.min(c[0],c[1]);return o===`dataMin`?u:o===`dataMax`||l<0?l:Math.max(Math.min(c[0],c[1]),0)}return o===`dataMin`?c[0]:o===`dataMax`?c[1]:c[0]}),aI(cI,`getComposedData`,function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,c=e.dataKey,l=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=t.layout,m=l&&l.length,h=HF.getBaseValue(t,n,r,i),g=p===`horizontal`,_=!1,v=d.map(function(e,t){var n;m?n=l[u+t]:(n=gw(e,c),Array.isArray(n)?_=!0:n=[h,n]);var d=n[1]==null||m&&gw(e,c)==null;return g?{x:Vw({axis:r,ticks:a,bandSize:s,entry:e,index:t}),y:d?null:i.scale(n[1]),value:n,payload:e}:{x:d?null:r.scale(n[1]),y:Vw({axis:i,ticks:o,bandSize:s,entry:e,index:t}),value:n,payload:e}});return JF({points:v,baseLine:m||_?v.map(function(e){var t=Array.isArray(e.value)?e.value[0]:null;return g?{x:e.x,y:t!=null&&e.y!=null?i.scale(t):null}:{x:t==null?null:r.scale(t),y:e.y}}):g?i.scale(h):r.scale(h),layout:p,isRange:_},f)}),aI(cI,`renderDotItem`,function(e,t){var n;if(v.isValidElement(e))n=v.cloneElement(e,t);else if((0,X.default)(e))n=e(t);else{var r=q(`recharts-area-dot`,typeof e==`boolean`?``:e.className),i=t.key,a=WF(t,VF);n=v.createElement(Ik,KF({},a,{key:i,className:r}))}return n});function lI(e){"@babel/helpers - typeof";return lI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},lI(e)}function uI(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function dI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,xI(r.key),r)}}function fI(e,t,n){return t&&dI(e.prototype,t),n&&dI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pI(e,t,n){return t=_I(t),mI(e,gI()?Reflect.construct(t,n||[],_I(e).constructor):t.apply(e,n))}function mI(e,t){if(t&&(lI(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return hI(e)}function hI(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function gI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gI=function(){return!!e})()}function _I(e){return _I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_I(e)}function vI(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yI(e,t)}function yI(e,t){return yI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yI(e,t)}function bI(e,t,n){return t=xI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xI(e){var t=SI(e,`string`);return lI(t)==`symbol`?t:t+``}function SI(e,t){if(lI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(lI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var CI=function(e){function t(){return uI(this,t),pI(this,t,arguments)}return vI(t,e),fI(t,[{key:`render`,value:function(){return null}}])}(v.Component);bI(CI,`displayName`,`ZAxis`),bI(CI,`defaultProps`,{zAxisId:0,range:[64,64],scale:`auto`,type:`number`});var wI=[`option`,`isActive`];function TI(){return TI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TI.apply(this,arguments)}function EI(e,t){if(e==null)return{};var n=DI(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DI(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function OI(e){var t=e.option,n=e.isActive,r=EI(e,wI);return typeof t==`string`?v.createElement(kA,TI({option:v.createElement(Xu,TI({type:t},r)),isActive:n,shapeType:`symbols`},r)):v.createElement(kA,TI({option:t,isActive:n,shapeType:`symbols`},r))}function kI(e){"@babel/helpers - typeof";return kI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},kI(e)}function AI(){return AI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AI.apply(this,arguments)}function jI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jI(Object(n),!0).forEach(function(t){UI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NI(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function PI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,WI(r.key),r)}}function FI(e,t,n){return t&&PI(e.prototype,t),n&&PI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function II(e,t,n){return t=BI(t),LI(e,zI()?Reflect.construct(t,n||[],BI(e).constructor):t.apply(e,n))}function LI(e,t){if(t&&(kI(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return RI(e)}function RI(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function zI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zI=function(){return!!e})()}function BI(e){return BI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BI(e)}function VI(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HI(e,t)}function HI(e,t){return HI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},HI(e,t)}function UI(e,t,n){return t=WI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WI(e){var t=GI(e,`string`);return kI(t)==`symbol`?t:t+``}function GI(e,t){if(kI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(kI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var KI=function(e){function t(){var e;NI(this,t);var n=[...arguments];return e=II(this,t,[].concat(n)),UI(e,`state`,{isAnimationFinished:!1}),UI(e,`handleAnimationEnd`,function(){e.setState({isAnimationFinished:!0})}),UI(e,`handleAnimationStart`,function(){e.setState({isAnimationFinished:!1})}),UI(e,`id`,Gs(`recharts-scatter-`)),e}return VI(t,e),FI(t,[{key:`renderSymbolsStatically`,value:function(e){var t=this,n=this.props,r=n.shape,i=n.activeShape,a=n.activeIndex,o=Z(this.props,!1);return e.map(function(e,n){var s=a===n,c=s?i:r,l=MI(MI({},o),e);return v.createElement(Hc,AI({className:`recharts-scatter-symbol`,key:`symbol-${e?.cx}-${e?.cy}-${e?.size}-${n}`},lc(t.props,e,n),{role:`img`}),v.createElement(OI,AI({option:c,isActive:s,key:`symbol-${n}`},l)))})}},{key:`renderSymbolsWithAnimation`,value:function(){var e=this,t=this.props,n=t.points,r=t.isAnimationActive,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.animationId,c=this.state.prevPoints;return v.createElement(_k,{begin:i,duration:a,isActive:r,easing:o,from:{t:0},to:{t:1},key:`pie-${s}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var r=t.t,i=n.map(function(e,t){var n=c&&c[t];if(n){var i=Ys(n.cx,e.cx),a=Ys(n.cy,e.cy),o=Ys(n.size,e.size);return MI(MI({},e),{},{cx:i(r),cy:a(r),size:o(r)})}var s=Ys(0,e.size);return MI(MI({},e),{},{size:s(r)})});return v.createElement(Hc,null,e.renderSymbolsStatically(i))})}},{key:`renderSymbols`,value:function(){var e=this.props,t=e.points,n=e.isAnimationActive,r=this.state.prevPoints;return n&&t&&t.length&&(!r||!(0,rw.default)(r,t))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(t)}},{key:`renderErrorBar`,value:function(){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var e=this.props,t=e.points,n=e.xAxis,r=e.yAxis,i=e.children,a=xc(i,KC);return a?a.map(function(e,i){var a=e.props,o=a.direction,s=a.dataKey;return v.cloneElement(e,{key:`${o}-${s}-${t[i]}`,data:t,xAxis:n,yAxis:r,layout:o===`x`?`vertical`:`horizontal`,dataPointFormatter:function(e,t){return{x:e.cx,y:e.cy,value:o===`x`?+e.node.x:+e.node.y,errorVal:gw(e,t)}}})}):null}},{key:`renderLine`,value:function(){var e=this.props,t=e.points,n=e.line,r=e.lineType,i=e.lineJointType,a=Z(this.props,!1),o=Z(n,!1),s,c;if(r===`joint`)s=t.map(function(e){return{x:e.cx,y:e.cy}});else if(r===`fitting`){var l=Zs(t),u=l.xmin,d=l.xmax,f=l.a,p=l.b,m=function(e){return f*e+p};s=[{x:u,y:m(u)},{x:d,y:m(d)}]}var h=MI(MI(MI({},a),{},{fill:`none`,stroke:a&&a.fill},o),{},{points:s});return c=v.isValidElement(n)?v.cloneElement(n,h):(0,X.default)(n)?n(h):v.createElement(ME,AI({},h,{type:i})),v.createElement(Hc,{className:`recharts-scatter-line`,key:`recharts-scatter-line`},c)}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.points,r=e.line,i=e.className,a=e.xAxis,o=e.yAxis,s=e.left,c=e.top,l=e.width,u=e.height,d=e.id,f=e.isAnimationActive;if(t||!n||!n.length)return null;var p=this.state.isAnimationFinished,m=q(`recharts-scatter`,i),h=a&&a.allowDataOverflow,g=o&&o.allowDataOverflow,_=h||g,y=(0,J.default)(d)?this.id:d;return v.createElement(Hc,{className:m,clipPath:_?`url(#clipPath-${y})`:null},h||g?v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`clipPath-${y}`},v.createElement(`rect`,{x:h?s:s-l/2,y:g?c:c-u/2,width:h?l:l*2,height:g?u:u*2}))):null,r&&this.renderLine(),this.renderErrorBar(),v.createElement(Hc,{key:`recharts-scatter-symbols`},this.renderSymbols()),(!f||p)&&rE.renderCallByParent(this.props,n))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.points===t.curPoints?null:{curPoints:e.points}:{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}}}])}(v.PureComponent);UI(KI,`displayName`,`Scatter`),UI(KI,`defaultProps`,{xAxisId:0,yAxisId:0,zAxisId:0,legendType:`circle`,lineType:`joint`,lineJointType:`linear`,data:[],shape:`circle`,hide:!1,isAnimationActive:!gm.isSsr,animationBegin:0,animationDuration:400,animationEasing:`linear`}),UI(KI,`getComposedData`,function(e){var t=e.xAxis,n=e.yAxis,r=e.zAxis,i=e.item,a=e.displayedData,o=e.xAxisTicks,s=e.yAxisTicks,c=e.offset,l=i.props.tooltipType,u=xc(i.props.children,th),d=(0,J.default)(t.dataKey)?i.props.dataKey:t.dataKey,f=(0,J.default)(n.dataKey)?i.props.dataKey:n.dataKey,p=r&&r.dataKey,m=r?r.range:CI.defaultProps.range,h=m&&m[0],g=t.scale.bandwidth?t.scale.bandwidth():0,_=n.scale.bandwidth?n.scale.bandwidth():0;return MI({points:a.map(function(e,a){var c=gw(e,d),m=gw(e,f),v=!(0,J.default)(p)&&gw(e,p)||`-`,y=[{name:(0,J.default)(t.dataKey)?i.props.name:t.name||t.dataKey,unit:t.unit||``,value:c,payload:e,dataKey:d,type:l},{name:(0,J.default)(n.dataKey)?i.props.name:n.name||n.dataKey,unit:n.unit||``,value:m,payload:e,dataKey:f,type:l}];v!==`-`&&y.push({name:r.name||r.dataKey,unit:r.unit||``,value:v,payload:e,dataKey:p,type:l});var b=Vw({axis:t,ticks:o,bandSize:g,entry:e,index:a,dataKey:d}),x=Vw({axis:n,ticks:s,bandSize:_,entry:e,index:a,dataKey:f}),S=v===`-`?h:r.scale(v),C=Math.sqrt(Math.max(S,0)/Math.PI);return MI(MI({},e),{},{cx:b,cy:x,x:b-C,y:x-C,xAxis:t,yAxis:n,zAxis:r,width:2*C,height:2*C,size:S,node:{x:c,y:m,z:v},tooltipPayload:y,tooltipPosition:{x:b,y:x},payload:e},u&&u[a]&&u[a].props)})},c)});function qI(e){"@babel/helpers - typeof";return qI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},qI(e)}function JI(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function YI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,aL(r.key),r)}}function XI(e,t,n){return t&&YI(e.prototype,t),n&&YI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZI(e,t,n){return t=tL(t),QI(e,eL()?Reflect.construct(t,n||[],tL(e).constructor):t.apply(e,n))}function QI(e,t){if(t&&(qI(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return $I(e)}function $I(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function eL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eL=function(){return!!e})()}function tL(e){return tL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tL(e)}function nL(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rL(e,t)}function rL(e,t){return rL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rL(e,t)}function iL(e,t,n){return t=aL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aL(e){var t=oL(e,`string`);return qI(t)==`symbol`?t:t+``}function oL(e,t){if(qI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(qI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function sL(){return sL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sL.apply(this,arguments)}function cL(e){var t=e.xAxisId,n=qM(),r=JM(),i=VM(t);return i==null?null:v.createElement(WP,sL({},i,{className:q(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return kw(e,!0)}}))}var lL=function(e){function t(){return JI(this,t),ZI(this,t,arguments)}return nL(t,e),XI(t,[{key:`render`,value:function(){return v.createElement(cL,this.props)}}])}(v.Component);iL(lL,`displayName`,`XAxis`),iL(lL,`defaultProps`,{allowDecimals:!0,hide:!1,orientation:`bottom`,width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:`category`,padding:{left:0,right:0},allowDataOverflow:!1,scale:`auto`,reversed:!1,allowDuplicatedCategory:!0});function uL(e){"@babel/helpers - typeof";return uL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},uL(e)}function dL(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function fL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,SL(r.key),r)}}function pL(e,t,n){return t&&fL(e.prototype,t),n&&fL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mL(e,t,n){return t=vL(t),hL(e,_L()?Reflect.construct(t,n||[],vL(e).constructor):t.apply(e,n))}function hL(e,t){if(t&&(uL(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return gL(e)}function gL(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function _L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_L=function(){return!!e})()}function vL(e){return vL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vL(e)}function yL(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bL(e,t)}function bL(e,t){return bL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bL(e,t)}function xL(e,t,n){return t=SL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SL(e){var t=CL(e,`string`);return uL(t)==`symbol`?t:t+``}function CL(e,t){if(uL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(uL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function wL(){return wL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wL.apply(this,arguments)}var TL=function(e){var t=e.yAxisId,n=qM(),r=JM(),i=WM(t);return i==null?null:v.createElement(WP,wL({},i,{className:q(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return kw(e,!0)}}))},EL=function(e){function t(){return dL(this,t),mL(this,t,arguments)}return yL(t,e),pL(t,[{key:`render`,value:function(){return v.createElement(TL,this.props)}}])}(v.Component);xL(EL,`displayName`,`YAxis`),xL(EL,`defaultProps`,{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:`left`,width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:`number`,padding:{top:0,bottom:0},allowDataOverflow:!1,scale:`auto`,reversed:!1});function DL(e){return jL(e)||AL(e)||kL(e)||OL()}function OL(){throw TypeError(`Invalid attempt to spread non-iterable instance.
70
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kL(e,t){if(e){if(typeof e==`string`)return ML(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ML(e,t)}}function AL(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function jL(e){if(Array.isArray(e))return ML(e)}function ML(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var NL=function(e,t,n,r,i){var a=xc(e,SN),o=xc(e,VN),s=[].concat(DL(a),DL(o)),c=xc(e,oP),l=`${r}Id`,u=r[0],d=t;if(s.length&&(d=s.reduce(function(e,t){if(t.props[l]===n&&xj(t.props,`extendDomain`)&&Y(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},d)),c.length){var f=`${u}1`,p=`${u}2`;d=c.reduce(function(e,t){if(t.props[l]===n&&xj(t.props,`extendDomain`)&&Y(t.props[f])&&Y(t.props[p])){var r=t.props[f],i=t.props[p];return[Math.min(e[0],r,i),Math.max(e[1],r,i)]}return e},d)}return i&&i.length&&(d=i.reduce(function(e,t){return Y(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},d)),d},PL=new(l(o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||i&&!o.once||n&&o.context!==n||s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))())).default,FL=`recharts.syncMouseEvents`;function IL(e){"@babel/helpers - typeof";return IL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},IL(e)}function LL(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function RL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,VL(r.key),r)}}function zL(e,t,n){return t&&RL(e.prototype,t),n&&RL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function BL(e,t,n){return t=VL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VL(e){var t=HL(e,`string`);return IL(t)==`symbol`?t:t+``}function HL(e,t){if(IL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(IL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var UL=function(){function e(){LL(this,e),BL(this,`activeIndex`,0),BL(this,`coordinateList`,[]),BL(this,`layout`,`horizontal`)}return zL(e,[{key:`setDetails`,value:function(e){var t=e.coordinateList,n=t===void 0?null:t,r=e.container,i=r===void 0?null:r,a=e.layout,o=a===void 0?null:a,s=e.offset,c=s===void 0?null:s,l=e.mouseHandlerCallback,u=l===void 0?null:l;this.coordinateList=n??this.coordinateList??[],this.container=i??this.container,this.layout=o??this.layout,this.offset=c??this.offset,this.mouseHandlerCallback=u??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:`focus`,value:function(){this.spoofMouse()}},{key:`keyboardEvent`,value:function(e){if(this.coordinateList.length!==0)switch(e.key){case`ArrowRight`:if(this.layout!==`horizontal`)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case`ArrowLeft`:if(this.layout!==`horizontal`)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:`setIndex`,value:function(e){this.activeIndex=e}},{key:`spoofMouse`,value:function(){if(this.layout===`horizontal`&&this.coordinateList.length!==0){var e=this.container.getBoundingClientRect(),t=e.x,n=e.y,r=e.height,i=this.coordinateList[this.activeIndex].coordinate,a=window?.scrollX||0,o=window?.scrollY||0,s=t+i+a,c=n+this.offset.top+r/2+o;this.mouseHandlerCallback({pageX:s,pageY:c})}}}])}();function WL(e,t,n){if(n===`number`&&t===!0&&Array.isArray(e)){var r=e?.[0],i=e?.[1];if(r&&i&&Y(r)&&Y(i))return!0}return!1}function GL(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}function KL(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[sT(t,n,r,i),sT(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function qL(e,t,n){var r,i,a,o;if(e===`horizontal`)r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e===`vertical`)i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null){if(e===`centric`){var s=t.cx,c=t.cy,l=t.innerRadius,u=t.outerRadius,d=t.angle,f=sT(s,c,l,d),p=sT(s,c,u,d);r=f.x,i=f.y,a=p.x,o=p.y}else return KL(t)}return[{x:r,y:i},{x:a,y:o}]}function JL(e){"@babel/helpers - typeof";return JL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JL(e)}function YL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?YL(Object(n),!0).forEach(function(t){ZL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZL(e,t,n){return t=QL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QL(e){var t=$L(e,`string`);return JL(t)==`symbol`?t:t+``}function $L(e,t){if(JL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(JL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function eR(e){var t=e.element,n=e.tooltipEventType,r=e.isActive,i=e.activeCoordinate,a=e.activePayload,o=e.offset,s=e.activeTooltipIndex,c=e.tooltipAxisBandSize,l=e.layout,u=e.chartName,d=t.props.cursor??t.type.defaultProps?.cursor;if(!t||!d||!r||!i||u!==`ScatterChart`&&n!==`axis`)return null;var f,p=ME;if(u===`ScatterChart`)f=i,p=Jk;else if(u===`BarChart`)f=GL(l,i,o,c),p=Pk;else if(l===`radial`){var m=KL(i),h=m.cx,g=m.cy,_=m.radius;f={cx:h,cy:g,startAngle:m.startAngle,endAngle:m.endAngle,innerRadius:_,outerRadius:_},p=vE}else f={points:qL(l,i,o)},p=ME;var y=XL(XL(XL(XL({stroke:`#ccc`,pointerEvents:`none`},o),f),Z(d,!1)),{},{payload:a,payloadIndex:s,className:q(`recharts-tooltip-cursor`,d.className)});return(0,v.isValidElement)(d)?(0,v.cloneElement)(d,y):(0,v.createElement)(p,y)}var tR=[`item`],nR=[`children`,`className`,`width`,`height`,`style`,`compact`,`title`,`desc`];function rR(e){"@babel/helpers - typeof";return rR=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},rR(e)}function iR(){return iR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iR.apply(this,arguments)}function aR(e,t){return cR(e)||sR(e,t)||CR(e,t)||oR()}function oR(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
71
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sR(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function cR(e){if(Array.isArray(e))return e}function lR(e,t){if(e==null)return{};var n=uR(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uR(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function dR(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function fR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,OR(r.key),r)}}function pR(e,t,n){return t&&fR(e.prototype,t),n&&fR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mR(e,t,n){return t=vR(t),hR(e,_R()?Reflect.construct(t,n||[],vR(e).constructor):t.apply(e,n))}function hR(e,t){if(t&&(rR(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return gR(e)}function gR(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function _R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_R=function(){return!!e})()}function vR(e){return vR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vR(e)}function yR(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bR(e,t)}function bR(e,t){return bR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bR(e,t)}function xR(e){return TR(e)||wR(e)||CR(e)||SR()}function SR(){throw TypeError(`Invalid attempt to spread non-iterable instance.
72
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CR(e,t){if(e){if(typeof e==`string`)return ER(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ER(e,t)}}function wR(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function TR(e){if(Array.isArray(e))return ER(e)}function ER(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?DR(Object(n),!0).forEach(function(t){$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $(e,t,n){return t=OR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OR(e){var t=kR(e,`string`);return rR(t)==`symbol`?t:t+``}function kR(e,t){if(rR(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(rR(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var AR={xAxis:[`bottom`,`top`],yAxis:[`left`,`right`]},jR={width:`100%`,height:`100%`},MR={x:0,y:0};function NR(e){return e}var PR=function(e,t){return t===`horizontal`?e.x:t===`vertical`?e.y:t===`centric`?e.angle:e.radius},FR=function(e,t,n,r){var i=t.find(function(e){return e&&e.index===n});if(i){if(e===`horizontal`)return{x:i.coordinate,y:r.y};if(e===`vertical`)return{x:r.x,y:i.coordinate};if(e===`centric`){var a=i.coordinate,o=r.radius;return Q(Q(Q({},r),sT(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,c=r.angle;return Q(Q(Q({},r),sT(r.cx,r.cy,s,c)),{},{angle:c,radius:s})}return MR},IR=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,i=t.dataEndIndex,a=(n??[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(xR(e),xR(n)):e},[]);return a.length>0?a:e&&e.length&&Y(r)&&Y(i)?e.slice(r,i+1):[]};function LR(e){return e===`number`?[0,`auto`]:void 0}var RR=function(e,t,n,r){var i=e.graphicalItems,a=e.tooltipAxis,o=IR(t,e);return n<0||!i||!i.length||n>=o.length?null:i.reduce(function(i,s){var c=s.props.data??t;c&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(c=c.slice(e.dataStartIndex,e.dataEndIndex+1));var l=a.dataKey&&!a.allowDuplicatedCategory?Xs(c===void 0?o:c,a.dataKey,r):c&&c[n]||o[n];return l?[].concat(xR(i),[Qw(s,l)]):i},[])},zR=function(e,t,n,r){var i=r||{x:e.chartX,y:e.chartY},a=PR(i,n),o=e.orderedTooltipTicks,s=e.tooltipAxis,c=e.tooltipTicks,l=vw(a,o,c,s);if(l>=0&&c){var u=c[l]&&c[l].value;return{activeTooltipIndex:l,activeLabel:u,activePayload:RR(e,t,l,u),activeCoordinate:FR(n,o,l,i)}}return null},BR=function(e,t){var n=t.axes,r=t.graphicalItems,i=t.axisType,a=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.layout,u=e.children,d=e.stackOffset,f=Dw(l,i);return n.reduce(function(t,n){var p=n.type.defaultProps===void 0?n.props:Q(Q({},n.type.defaultProps),n.props),m=p.type,h=p.dataKey,g=p.allowDataOverflow,_=p.allowDuplicatedCategory,v=p.scale,y=p.ticks,b=p.includeHidden,x=p[a];if(t[x])return t;var S=IR(e.data,{graphicalItems:r.filter(function(e){return(a in e.props?e.props[a]:e.type.defaultProps?.[a])===x}),dataStartIndex:s,dataEndIndex:c}),C=S.length,w,T,E;WL(p.domain,g,m)&&(w=Yw(p.domain,null,g),f&&(m===`number`||v!==`auto`)&&(E=_w(S,h,`category`)));var D=LR(m);if(!w||w.length===0){var O=p.domain??D;if(h){if(w=_w(S,h,m),m===`category`&&f){var k=Js(w);_&&k?(T=w,w=(0,QA.default)(0,C)):_||(w=Zw(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(xR(e),[t])},[]))}else if(m===`category`)w=_?w.filter(function(e){return e!==``&&!(0,J.default)(e)}):Zw(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0||t===``||(0,J.default)(t)?e:[].concat(xR(e),[t])},[]);else if(m===`number`){var A=Tw(S,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps?.[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps?.hide;return t===x&&(b||!n)}),h,i,l);A&&(w=A)}f&&(m===`number`||v!==`auto`)&&(E=_w(S,h,`category`))}else w=f?(0,QA.default)(0,C):o&&o[x]&&o[x].hasStack&&m===`number`?d===`expand`?[0,1]:Kw(o[x].stackGroups,s,c):Ew(S,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps.hide;return t===x&&(b||!n)}),m,l,!0);if(m===`number`)w=NL(u,w,x,i,y),O&&(w=Yw(O,w,g));else if(m===`category`&&O){var j=O;w.every(function(e){return j.indexOf(e)>=0})&&(w=j)}}return Q(Q({},t),{},$({},x,Q(Q({},p),{},{axisType:i,domain:w,categoricalDomain:E,duplicateDomain:T,originalDomain:p.domain??D,isCategorical:f,layout:l})))},{})},VR=function(e,t){var n=t.graphicalItems,r=t.Axis,i=t.axisType,a=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.layout,u=e.children,d=IR(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:c}),f=d.length,p=Dw(l,i),m=-1;return n.reduce(function(e,t){var h=(t.type.defaultProps===void 0?t.props:Q(Q({},t.type.defaultProps),t.props))[a],g=LR(`number`);if(!e[h]){m++;var _;return p?_=(0,QA.default)(0,f):o&&o[h]&&o[h].hasStack?(_=Kw(o[h].stackGroups,s,c),_=NL(u,_,h,i)):(_=Yw(g,Ew(d,n.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps?.[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps?.hide;return t===h&&!n}),`number`,l),r.defaultProps.allowDataOverflow),_=NL(u,_,h,i)),Q(Q({},e),{},$({},h,Q(Q({axisType:i},r.defaultProps),{},{hide:!0,orientation:(0,Rs.default)(AR,`${i}.${m%2}`,null),domain:_,originalDomain:g,isCategorical:p,layout:l})))}return e},{})},HR=function(e,t){var n=t.axisType,r=n===void 0?`xAxis`:n,i=t.AxisComp,a=t.graphicalItems,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.children,u=`${r}Id`,d=xc(l,i),f={};return d&&d.length?f=BR(e,{axes:d,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c}):a&&a.length&&(f=VR(e,{Axis:i,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c})),f},UR=function(e){var t=qs(e),n=kw(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:(0,Ep.default)(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:Xw(t,n)}},WR=function(e){var t=e.children,n=e.defaultShowTooltip,r=Sc(t,vj),i=0,a=0;return e.data&&e.data.length!==0&&(a=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(i=r.props.startIndex),r.props.endIndex>=0&&(a=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!n}},GR=function(e){return!e||!e.length?!1:e.some(function(e){var t=_c(e&&e.type);return t&&t.indexOf(`Bar`)>=0})},KR=function(e){return e===`horizontal`?{numericAxisName:`yAxis`,cateAxisName:`xAxis`}:e===`vertical`?{numericAxisName:`xAxis`,cateAxisName:`yAxis`}:e===`centric`?{numericAxisName:`radiusAxis`,cateAxisName:`angleAxis`}:{numericAxisName:`angleAxis`,cateAxisName:`radiusAxis`}},qR=function(e,t){var n=e.props,r=e.graphicalItems,i=e.xAxisMap,a=i===void 0?{}:i,o=e.yAxisMap,s=o===void 0?{}:o,c=n.width,l=n.height,u=n.children,d=n.margin||{},f=Sc(u,vj),p=Sc(u,ip),m=Object.keys(s).reduce(function(e,t){var n=s[t],r=n.orientation;return!n.mirror&&!n.hide?Q(Q({},e),{},$({},r,e[r]+n.width)):e},{left:d.left||0,right:d.right||0}),h=Q(Q({},Object.keys(a).reduce(function(e,t){var n=a[t],r=n.orientation;return!n.mirror&&!n.hide?Q(Q({},e),{},$({},r,(0,Rs.default)(e,`${r}`)+n.height)):e},{top:d.top||0,bottom:d.bottom||0})),m),g=h.bottom;f&&(h.bottom+=f.props.height||vj.defaultProps.height),p&&t&&(h=Sw(h,r,n,t));var _=c-h.left-h.right,v=l-h.top-h.bottom;return Q(Q({brushBottom:g},h),{},{width:Math.max(_,0),height:Math.max(v,0)})},JR=function(e,t){if(t===`xAxis`)return e[t].width;if(t===`yAxis`)return e[t].height},YR=function(e){var t=e.chartName,n=e.GraphicalChild,r=e.defaultTooltipEventType,i=r===void 0?`axis`:r,a=e.validateTooltipEventTypes,o=a===void 0?[`axis`]:a,s=e.axisComponents,c=e.legendContent,l=e.formatAxisMap,u=e.defaultProps,d=function(e,t){var n=t.graphicalItems,r=t.stackGroups,i=t.offset,a=t.updateId,o=t.dataStartIndex,c=t.dataEndIndex,l=e.barSize,u=e.layout,d=e.barGap,f=e.barCategoryGap,p=e.maxBarSize,m=KR(u),h=m.numericAxisName,g=m.cateAxisName,_=GR(n),v=[];return n.forEach(function(n,m){var y=IR(e.data,{graphicalItems:[n],dataStartIndex:o,dataEndIndex:c}),b=n.type.defaultProps===void 0?n.props:Q(Q({},n.type.defaultProps),n.props),x=b.dataKey,S=b.maxBarSize,C=b[`${h}Id`],w=b[`${g}Id`],T=s.reduce(function(e,n){var r=t[`${n.axisType}Map`],i=b[`${n.axisType}Id`];!(r&&r[i]||n.axisType===`zAxis`)&&xC(!1);var a=r[i];return Q(Q({},e),{},$($({},n.axisType,a),`${n.axisType}Ticks`,kw(a)))},{}),E=T[g],D=T[`${g}Ticks`],O=r&&r[C]&&r[C].hasStack&&Ww(n,r[C].stackGroups),k=_c(n.type).indexOf(`Bar`)>=0,A=Xw(E,D),j=[],ee=_&&bw({barSize:l,stackGroups:r,totalSize:JR(T,g)});if(k){var te=(0,J.default)(S)?p:S,ne=Xw(E,D,!0)??te??0;j=xw({barGap:d,barCategoryGap:f,bandSize:ne===A?A:ne,sizeList:ee[w],maxBarSize:te}),ne!==A&&(j=j.map(function(e){return Q(Q({},e),{},{position:Q(Q({},e.position),{},{offset:e.position.offset-ne/2})})}))}var re=n&&n.type&&n.type.getComposedData;re&&v.push({props:Q(Q({},re(Q(Q({},T),{},{displayedData:y,props:e,dataKey:x,item:n,bandSize:A,barPosition:j,offset:i,stackedData:O,layout:u,dataStartIndex:o,dataEndIndex:c}))),{},$($($({key:n.key||`item-${m}`},h,T[h]),g,T[g]),`animationId`,a)),childIndex:Mc(n,e.children),item:n})}),v},f=function(e,r){var i=e.props,a=e.dataStartIndex,o=e.dataEndIndex,c=e.updateId;if(!Cc({props:i}))return null;var u=i.children,f=i.layout,p=i.stackOffset,m=i.data,h=i.reverseStackOrder,g=KR(f),_=g.numericAxisName,v=g.cateAxisName,y=xc(u,n),b=zw(m,y,`${_}Id`,`${v}Id`,p,h),x=s.reduce(function(e,t){var n=`${t.axisType}Map`;return Q(Q({},e),{},$({},n,HR(i,Q(Q({},t),{},{graphicalItems:y,stackGroups:t.axisType===_&&b,dataStartIndex:a,dataEndIndex:o}))))},{}),S=qR(Q(Q({},x),{},{props:i,graphicalItems:y}),r?.legendBBox);Object.keys(x).forEach(function(e){x[e]=l(i,x[e],S,e.replace(`Map`,``),t)});var C=x[`${v}Map`],w=UR(C);return Q(Q({formattedGraphicalItems:d(i,Q(Q({},x),{},{dataStartIndex:a,dataEndIndex:o,updateId:c,graphicalItems:y,stackGroups:b,offset:S})),graphicalItems:y,offset:S,stackGroups:b},w),x)},p=function(e){function n(e){var r;return dR(this,n),r=mR(this,n,[e]),$(r,`eventEmitterSymbol`,Symbol(`rechartsEventEmitter`)),$(r,`accessibilityManager`,new UL),$(r,`handleLegendBBoxUpdate`,function(e){if(e){var t=r.state,n=t.dataStartIndex,i=t.dataEndIndex,a=t.updateId;r.setState(Q({legendBBox:e},f({props:r.props,dataStartIndex:n,dataEndIndex:i,updateId:a},Q(Q({},r.state),{},{legendBBox:e}))))}}),$(r,`handleReceiveSyncEvent`,function(e,t,n){if(r.props.syncId===e){if(n===r.eventEmitterSymbol&&typeof r.props.syncMethod!=`function`)return;r.applySyncEvent(t)}}),$(r,`handleBrushChange`,function(e){var t=e.startIndex,n=e.endIndex;if(t!==r.state.dataStartIndex||n!==r.state.dataEndIndex){var i=r.state.updateId;r.setState(function(){return Q({dataStartIndex:t,dataEndIndex:n},f({props:r.props,dataStartIndex:t,dataEndIndex:n,updateId:i},r.state))}),r.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),$(r,`handleMouseEnter`,function(e){var t=r.getMouseInfo(e);if(t){var n=Q(Q({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var i=r.props.onMouseEnter;(0,X.default)(i)&&i(n,e)}}),$(r,`triggeredAfterMouseMove`,function(e){var t=r.getMouseInfo(e),n=t?Q(Q({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};r.setState(n),r.triggerSyncEvent(n);var i=r.props.onMouseMove;(0,X.default)(i)&&i(n,e)}),$(r,`handleItemMouseEnter`,function(e){r.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),$(r,`handleItemMouseLeave`,function(){r.setState(function(){return{isTooltipActive:!1}})}),$(r,`handleMouseMove`,function(e){e.persist(),r.throttleTriggeredAfterMouseMove(e)}),$(r,`handleMouseLeave`,function(e){r.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};r.setState(t),r.triggerSyncEvent(t);var n=r.props.onMouseLeave;(0,X.default)(n)&&n(t,e)}),$(r,`handleOuterEvent`,function(e){var t=jc(e),n=(0,Rs.default)(r.props,`${t}`);t&&(0,X.default)(n)&&n((/.*touch.*/i.test(t)?r.getMouseInfo(e.changedTouches[0]):r.getMouseInfo(e))??{},e)}),$(r,`handleClick`,function(e){var t=r.getMouseInfo(e);if(t){var n=Q(Q({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var i=r.props.onClick;(0,X.default)(i)&&i(n,e)}}),$(r,`handleMouseDown`,function(e){var t=r.props.onMouseDown;(0,X.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`handleMouseUp`,function(e){var t=r.props.onMouseUp;(0,X.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),$(r,`handleTouchStart`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.handleMouseDown(e.changedTouches[0])}),$(r,`handleTouchEnd`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.handleMouseUp(e.changedTouches[0])}),$(r,`handleDoubleClick`,function(e){var t=r.props.onDoubleClick;(0,X.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`handleContextMenu`,function(e){var t=r.props.onContextMenu;(0,X.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`triggerSyncEvent`,function(e){r.props.syncId!==void 0&&PL.emit(FL,r.props.syncId,e,r.eventEmitterSymbol)}),$(r,`applySyncEvent`,function(e){var t=r.props,n=t.layout,i=t.syncMethod,a=r.state.updateId,o=e.dataStartIndex,s=e.dataEndIndex;if(e.dataStartIndex!==void 0||e.dataEndIndex!==void 0)r.setState(Q({dataStartIndex:o,dataEndIndex:s},f({props:r.props,dataStartIndex:o,dataEndIndex:s,updateId:a},r.state)));else if(e.activeTooltipIndex!==void 0){var c=e.chartX,l=e.chartY,u=e.activeTooltipIndex,d=r.state,p=d.offset,m=d.tooltipTicks;if(!p)return;if(typeof i==`function`)u=i(m,e);else if(i===`value`){u=-1;for(var h=0;h<m.length;h++)if(m[h].value===e.activeLabel){u=h;break}}var g=Q(Q({},p),{},{x:p.left,y:p.top}),_=Math.min(c,g.x+g.width),v=Math.min(l,g.y+g.height),y=m[u]&&m[u].value,b=RR(r.state,r.props.data,u),x=m[u]?{x:n===`horizontal`?m[u].coordinate:_,y:n===`horizontal`?v:m[u].coordinate}:MR;r.setState(Q(Q({},e),{},{activeLabel:y,activeCoordinate:x,activePayload:b,activeTooltipIndex:u}))}else r.setState(e)}),$(r,`renderCursor`,function(e){var n=r.state,i=n.isTooltipActive,a=n.activeCoordinate,o=n.activePayload,s=n.offset,c=n.activeTooltipIndex,l=n.tooltipAxisBandSize,u=r.getTooltipEventType(),d=e.props.active??i,f=r.props.layout,p=e.key||`_recharts-cursor`;return v.createElement(eR,{key:p,activeCoordinate:a,activePayload:o,activeTooltipIndex:c,chartName:t,element:e,isActive:d,layout:f,offset:s,tooltipAxisBandSize:l,tooltipEventType:u})}),$(r,`renderPolarAxis`,function(e,t,n){var i=(0,Rs.default)(e,`type.axisType`),a=(0,Rs.default)(r.state,`${i}Map`),o=e.type.defaultProps,s=o===void 0?e.props:Q(Q({},o),e.props),c=a&&a[s[`${i}Id`]];return(0,v.cloneElement)(e,Q(Q({},c),{},{className:q(i,c.className),key:e.key||`${t}-${n}`,ticks:kw(c,!0)}))}),$(r,`renderPolarGrid`,function(e){var t=e.props,n=t.radialLines,i=t.polarAngles,a=t.polarRadius,o=r.state,s=o.radiusAxisMap,c=o.angleAxisMap,l=qs(s),u=qs(c),d=u.cx,f=u.cy,p=u.innerRadius,m=u.outerRadius;return(0,v.cloneElement)(e,{polarAngles:Array.isArray(i)?i:kw(u,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(a)?a:kw(l,!0).map(function(e){return e.coordinate}),cx:d,cy:f,innerRadius:p,outerRadius:m,key:e.key||`polar-grid`,radialLines:n})}),$(r,`renderLegend`,function(){var e=r.state.formattedGraphicalItems,t=r.props,n=t.children,i=t.width,a=t.height,o=r.props.margin||{},s=$C({children:n,formattedGraphicalItems:e,legendWidth:i-(o.left||0)-(o.right||0),legendContent:c});if(!s)return null;var l=s.item,u=lR(s,tR);return(0,v.cloneElement)(l,Q(Q({},u),{},{chartWidth:i,chartHeight:a,margin:o,onBBoxUpdate:r.handleLegendBBoxUpdate}))}),$(r,`renderTooltip`,function(){var e=r.props,t=e.children,n=e.accessibilityLayer,i=Sc(t,Fm);if(!i)return null;var a=r.state,o=a.isTooltipActive,s=a.activeCoordinate,c=a.activePayload,l=a.activeLabel,u=a.offset,d=i.props.active??o;return(0,v.cloneElement)(i,{viewBox:Q(Q({},u),{},{x:u.left,y:u.top}),active:d,label:l,payload:d?c:[],coordinate:s,accessibilityLayer:n})}),$(r,`renderBrush`,function(e){var t=r.props,n=t.margin,i=t.data,a=r.state,o=a.offset,s=a.dataStartIndex,c=a.dataEndIndex,l=a.updateId;return(0,v.cloneElement)(e,{key:e.key||`_recharts-brush`,onChange:jw(r.handleBrushChange,e.props.onChange),data:i,x:Y(e.props.x)?e.props.x:o.left,y:Y(e.props.y)?e.props.y:o.top+o.height+o.brushBottom-(n.bottom||0),width:Y(e.props.width)?e.props.width:o.width,startIndex:s,endIndex:c,updateId:`brush-${l}`})}),$(r,`renderReferenceElement`,function(e,t,n){if(!e)return null;var i=r.clipPathId,a=r.state,o=a.xAxisMap,s=a.yAxisMap,c=a.offset,l=e.type.defaultProps||{},u=e.props,d=u.xAxisId,f=d===void 0?l.xAxisId:d,p=u.yAxisId,m=p===void 0?l.yAxisId:p;return(0,v.cloneElement)(e,{key:e.key||`${t}-${n}`,xAxis:o[f],yAxis:s[m],viewBox:{x:c.left,y:c.top,width:c.width,height:c.height},clipPathId:i})}),$(r,`renderActivePoints`,function(e){var t=e.item,r=e.activePoint,i=e.basePoint,a=e.childIndex,o=e.isRange,s=[],c=t.props.key,l=t.item.type.defaultProps===void 0?t.item.props:Q(Q({},t.item.type.defaultProps),t.item.props),u=l.activeDot,d=l.dataKey,f=Q(Q({index:a,dataKey:d,cx:r.x,cy:r.y,r:4,fill:yw(t.item),strokeWidth:2,stroke:`#fff`,payload:r.payload,value:r.value},Z(u,!1)),sc(u));return s.push(n.renderActiveDot(u,f,`${c}-activePoint-${a}`)),i?s.push(n.renderActiveDot(u,Q(Q({},f),{},{cx:i.x,cy:i.y}),`${c}-basePoint-${a}`)):o&&s.push(null),s}),$(r,`renderGraphicChild`,function(e,t,n){var i=r.filterFormatItem(e,t,n);if(!i)return null;var a=r.getTooltipEventType(),o=r.state,s=o.isTooltipActive,c=o.tooltipAxis,l=o.activeTooltipIndex,u=o.activeLabel,d=r.props.children,f=Sc(d,Fm),p=i.props,m=p.points,h=p.isRange,g=p.baseLine,_=i.item.type.defaultProps===void 0?i.item.props:Q(Q({},i.item.type.defaultProps),i.item.props),y=_.activeDot,b=_.hide,x=_.activeBar,S=_.activeShape,C=!!(!b&&s&&f&&(y||x||S)),w={};a!==`axis`&&f&&f.props.trigger===`click`?w={onClick:jw(r.handleItemMouseEnter,e.props.onClick)}:a!==`axis`&&(w={onMouseLeave:jw(r.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:jw(r.handleItemMouseEnter,e.props.onMouseEnter)});var T=(0,v.cloneElement)(e,Q(Q({},i.props),w));function E(e){return typeof c.dataKey==`function`?c.dataKey(e.payload):null}if(C){if(l>=0){var D,O;if(c.dataKey&&!c.allowDuplicatedCategory){var k=typeof c.dataKey==`function`?E:`payload.${c.dataKey.toString()}`;D=Xs(m,k,u),O=h&&g&&Xs(g,k,u)}else D=m?.[l],O=h&&g&&g[l];if(S||x){var A=e.props.activeIndex===void 0?l:e.props.activeIndex;return[(0,v.cloneElement)(e,Q(Q(Q({},i.props),w),{},{activeIndex:A})),null,null]}if(!(0,J.default)(D))return[T].concat(xR(r.renderActivePoints({item:i,activePoint:D,basePoint:O,childIndex:l,isRange:h})))}else{var j=(r.getItemByXY(r.state.activeCoordinate)??{graphicalItem:T}).graphicalItem,ee=j.item,te=ee===void 0?e:ee,ne=j.childIndex,re=Q(Q(Q({},i.props),w),{},{activeIndex:ne});return[(0,v.cloneElement)(te,re),null,null]}}return h?[T,null,null]:[T,null]}),$(r,`renderCustomized`,function(e,t,n){return(0,v.cloneElement)(e,Q(Q({key:`recharts-customized-${n}`},r.props),r.state))}),$(r,`renderMap`,{CartesianGrid:{handler:NR,once:!0},ReferenceArea:{handler:r.renderReferenceElement},ReferenceLine:{handler:NR},ReferenceDot:{handler:r.renderReferenceElement},XAxis:{handler:NR},YAxis:{handler:NR},Brush:{handler:r.renderBrush,once:!0},Bar:{handler:r.renderGraphicChild},Line:{handler:r.renderGraphicChild},Area:{handler:r.renderGraphicChild},Radar:{handler:r.renderGraphicChild},RadialBar:{handler:r.renderGraphicChild},Scatter:{handler:r.renderGraphicChild},Pie:{handler:r.renderGraphicChild},Funnel:{handler:r.renderGraphicChild},Tooltip:{handler:r.renderCursor,once:!0},PolarGrid:{handler:r.renderPolarGrid,once:!0},PolarAngleAxis:{handler:r.renderPolarAxis},PolarRadiusAxis:{handler:r.renderPolarAxis},Customized:{handler:r.renderCustomized}}),r.clipPathId=`${e.id??Gs(`recharts`)}-clip`,r.throttleTriggeredAfterMouseMove=(0,Vm.default)(r.triggeredAfterMouseMove,e.throttleDelay??1e3/60),r.state={},r}return yR(n,e),pR(n,[{key:`componentDidMount`,value:function(){this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:this.props.margin.left??0,top:this.props.margin.top??0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:`displayDefaultTooltip`,value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,i=e.layout,a=Sc(t,Fm);if(a){var o=a.props.defaultIndex;if(!(typeof o!=`number`||o<0||o>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[o]&&this.state.tooltipTicks[o].value,c=RR(this.state,n,o,s),l=this.state.tooltipTicks[o].coordinate,u=(this.state.offset.top+r)/2,d=i===`horizontal`?{x:l,y:u}:{y:l,x:u},f=this.state.formattedGraphicalItems.find(function(e){return e.item.type.name===`Scatter`});f&&(d=Q(Q({},d),f.props.points[o].tooltipPosition),c=f.props.points[o].tooltipPayload);var p={activeTooltipIndex:o,isTooltipActive:!0,activeLabel:s,activePayload:c,activeCoordinate:d};this.setState(p),this.renderCursor(a),this.accessibilityManager.setIndex(o)}}}},{key:`getSnapshotBeforeUpdate`,value:function(e,t){return this.props.accessibilityLayer&&(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:this.props.margin.left??0,top:this.props.margin.top??0}})),null}},{key:`componentDidUpdate`,value:function(e){Oc([Sc(e.children,Fm)],[Sc(this.props.children,Fm)])||this.displayDefaultTooltip()}},{key:`componentWillUnmount`,value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:`getTooltipEventType`,value:function(){var e=Sc(this.props.children,Fm);if(e&&typeof e.props.shared==`boolean`){var t=e.props.shared?`axis`:`item`;return o.indexOf(t)>=0?t:i}return i}},{key:`getMouseInfo`,value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=mh(n),i={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},a=n.width/t.offsetWidth||1,o=this.inRange(i.chartX,i.chartY,a);if(!o)return null;var s=this.state,c=s.xAxisMap,l=s.yAxisMap,u=this.getTooltipEventType(),d=zR(this.state,this.props.data,this.props.layout,o);if(u!==`axis`&&c&&l){var f=qs(c).scale,p=qs(l).scale,m=f&&f.invert?f.invert(i.chartX):null,h=p&&p.invert?p.invert(i.chartY):null;return Q(Q({},i),{},{xValue:m,yValue:h},d)}return d?Q(Q({},i),d):null}},{key:`inRange`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=this.props.layout,i=e/n,a=t/n;if(r===`horizontal`||r===`vertical`){var o=this.state.offset;return i>=o.left&&i<=o.left+o.width&&a>=o.top&&a<=o.top+o.height?{x:i,y:a}:null}var s=this.state,c=s.angleAxisMap,l=s.radiusAxisMap;if(c&&l){var u=qs(c);return fT({x:i,y:a},u)}return null}},{key:`parseEventsOfWrapper`,value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=Sc(e,Fm),r={};return n&&t===`axis`&&(r=n.props.trigger===`click`?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),Q(Q({},sc(this.props,this.handleOuterEvent)),r)}},{key:`addListener`,value:function(){PL.on(FL,this.handleReceiveSyncEvent)}},{key:`removeListener`,value:function(){PL.removeListener(FL,this.handleReceiveSyncEvent)}},{key:`filterFormatItem`,value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,i=0,a=r.length;i<a;i++){var o=r[i];if(o.item===e||o.props.key===e.key||t===_c(o.item.type)&&n===o.childIndex)return o}return null}},{key:`renderClipPath`,value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,r=t.top,i=t.height,a=t.width;return v.createElement(`defs`,null,v.createElement(`clipPath`,{id:e},v.createElement(`rect`,{x:n,y:r,height:i,width:a})))}},{key:`getXScales`,value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=aR(t,2),r=n[0],i=n[1];return Q(Q({},e),{},$({},r,i.scale))},{}):null}},{key:`getYScales`,value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=aR(t,2),r=n[0],i=n[1];return Q(Q({},e),{},$({},r,i.scale))},{}):null}},{key:`getXScaleByAxisId`,value:function(e){var t;return(t=this.state.xAxisMap)==null||(t=t[e])==null?void 0:t.scale}},{key:`getYScaleByAxisId`,value:function(e){var t;return(t=this.state.yAxisMap)==null||(t=t[e])==null?void 0:t.scale}},{key:`getItemByXY`,value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var i=0,a=n.length;i<a;i++){var o=n[i],s=o.props,c=o.item,l=c.type.defaultProps===void 0?c.props:Q(Q({},c.type.defaultProps),c.props),u=_c(c.type);if(u===`Bar`){var d=(s.data||[]).find(function(t){return Mk(e,t)});if(d)return{graphicalItem:o,payload:d}}else if(u===`RadialBar`){var f=(s.data||[]).find(function(t){return fT(e,t)});if(f)return{graphicalItem:o,payload:f}}else if(AA(o,r)||jA(o,r)||MA(o,r)){var p=zA({graphicalItem:o,activeTooltipItem:r,itemData:l.data}),m=l.activeIndex===void 0?p:l.activeIndex;return{graphicalItem:Q(Q({},o),{},{childIndex:m}),payload:MA(o,r)?l.data[p]:o.props.data[p]}}}return null}},{key:`render`,value:function(){var e=this;if(!Cc(this))return null;var t=this.props,n=t.children,r=t.className,i=t.width,a=t.height,o=t.style,s=t.compact,c=t.title,l=t.desc,u=Z(lR(t,nR),!1);if(s)return v.createElement(zM,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},v.createElement(Lc,iR({},u,{width:i,height:a,title:c,desc:l}),this.renderClipPath(),Ac(n,this.renderMap)));this.props.accessibilityLayer&&(u.tabIndex=this.props.tabIndex??0,u.role=this.props.role??`application`,u.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},u.onFocus=function(){e.accessibilityManager.focus()});var d=this.parseEventsOfWrapper();return v.createElement(zM,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},v.createElement(`div`,iR({className:q(`recharts-wrapper`,r),style:Q({position:`relative`,cursor:`default`,width:i,height:a},o)},d,{ref:function(t){e.container=t}}),v.createElement(Lc,iR({},u,{width:i,height:a,title:c,desc:l,style:jR}),this.renderClipPath(),Ac(n,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(v.Component);$(p,`displayName`,t),$(p,`defaultProps`,Q({layout:`horizontal`,stackOffset:`none`,barCategoryGap:`10%`,barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:`index`},u)),$(p,`getDerivedStateFromProps`,function(e,t){var n=e.dataKey,r=e.data,i=e.children,a=e.width,o=e.height,s=e.layout,c=e.stackOffset,l=e.margin,u=t.dataStartIndex,d=t.dataEndIndex;if(t.updateId===void 0){var p=WR(e);return Q(Q(Q({},p),{},{updateId:0},f(Q(Q({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:o,prevLayout:s,prevStackOffset:c,prevMargin:l,prevChildren:i})}if(n!==t.prevDataKey||r!==t.prevData||a!==t.prevWidth||o!==t.prevHeight||s!==t.prevLayout||c!==t.prevStackOffset||!$s(l,t.prevMargin)){var m=WR(e),h={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=Q(Q({},zR(t,r,s)),{},{updateId:t.updateId+1}),_=Q(Q(Q({},m),h),g);return Q(Q(Q({},_),f(Q({props:e},_),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:o,prevLayout:s,prevStackOffset:c,prevMargin:l,prevChildren:i})}if(!Oc(i,t.prevChildren)){var v=Sc(i,vj),y=v?v.props?.startIndex??u:u,b=v?v.props?.endIndex??d:d,x=y!==u||b!==d,S=!(0,J.default)(r)&&!x?t.updateId:t.updateId+1;return Q(Q({updateId:S},f(Q(Q({props:e},t),{},{updateId:S,dataStartIndex:y,dataEndIndex:b}),t)),{},{prevChildren:i,dataStartIndex:y,dataEndIndex:b})}return null}),$(p,`renderActiveDot`,function(e,t,n){var r=(0,v.isValidElement)(e)?(0,v.cloneElement)(e,t):(0,X.default)(e)?e(t):v.createElement(Ik,t);return v.createElement(Hc,{className:`recharts-active-dot`,key:n},r)});var m=(0,v.forwardRef)(function(e,t){return v.createElement(p,iR({},e,{ref:t}))});return m.displayName=p.displayName,m},XR=YR({chartName:`BarChart`,GraphicalChild:sM,defaultTooltipEventType:`axis`,validateTooltipEventTypes:[`axis`,`item`],axisComponents:[{axisType:`xAxis`,AxisComp:lL},{axisType:`yAxis`,AxisComp:EL}],formatAxisMap:yM}),ZR=YR({chartName:`ComposedChart`,GraphicalChild:[zF,cI,sM,KI],axisComponents:[{axisType:`xAxis`,AxisComp:lL},{axisType:`yAxis`,AxisComp:EL},{axisType:`zAxis`,AxisComp:CI}],formatAxisMap:yM}),QR=[`#3987e5`,`#d95926`,`#199e70`,`#c98500`,`#d55181`,`#008300`,`#9085e9`,`#e66767`],$R={good:`#0ca30c`,warn:`#fab219`,serious:`#ec835a`,crit:`#d03b3b`};function ez({active:e,payload:t,label:n,fmt:r,series:i}){if(!e||!t||!t.length)return null;let a=i.map(e=>({s:e,p:t.find(t=>t.dataKey===e.key)})).filter(e=>e.p&&e.p.value!=null);return(0,F.jsxs)(`div`,{className:`rounded-lg border border-line2 px-3 py-2 text-[12px] shadow-xl`,style:{background:`rgba(20,20,27,.97)`,minWidth:150},children:[(0,F.jsx)(`div`,{className:`text-mute mb-1.5`,children:Oa(n,!0)}),a.map(({s:e,p:t})=>(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-4 py-[1px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-ink2`,children:[(0,F.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-sm`,style:{background:e.color}}),e.label]}),(0,F.jsx)(`span`,{className:`tabular-nums font-medium`,children:Array.isArray(t.value)?`${r(t.value[0],e.key)} – ${r(t.value[1],e.key)}`:r(t.value,e.key)})]},e.key))]})}function tz({series:e}){return e.length<2?null:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1 text-[11.5px] text-ink2`,children:e.map(e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-sm`,style:{background:e.color,opacity:e.type===`band`?.3:e.dashed?.6:1}}),e.label]},e.key))})}function nz({data:e,series:t,height:n=180,fmt:r=e=>String(e),yFmt:i,zoom:a=!0,markers:o,onPointClick:s,refLines:c,yDomain:l}){let u=I(),[d,f]=(0,v.useState)({}),p=e.length>1?e[e.length-1].t-e[0].t:36e5,m=t.some(e=>e.type===`bar`),h=e.length>1?e[1].t-e[0].t:p,g=(o||[]).filter(t=>!e.length||t.t>=e[0].t&&t.t<=e[e.length-1].t+h).map(t=>({...t,x:m&&e.length?e.reduce((e,n)=>n.t<=t.t&&n.t>e?n.t:e,e[0].t):t.t}));return(0,F.jsx)(`div`,{style:{height:n},className:`select-none`,children:(0,F.jsx)(eh,{width:`100%`,height:`100%`,children:(0,F.jsxs)(ZR,{data:e,margin:{top:6,right:6,bottom:0,left:-8},barCategoryGap:1,onMouseDown:e=>a&&e&&e.activeLabel&&f({a:e.activeLabel}),onMouseMove:e=>d.a&&e&&e.activeLabel&&f(t=>({...t,b:e.activeLabel})),onMouseUp:()=>{d.a&&d.b&&d.a!==d.b?u.setCustom(Math.min(d.a,d.b),Math.max(d.a,d.b)):d.a&&s&&s(d.a),f({})},children:[(0,F.jsx)(dF,{vertical:!1}),(0,F.jsx)(lL,{dataKey:`t`,type:m?`category`:`number`,domain:[`dataMin`,`dataMax`],scale:m?`auto`:`time`,tickFormatter:e=>ka(e,p),tickLine:!1,axisLine:{stroke:`#2a2a35`},minTickGap:40}),(0,F.jsx)(EL,{tickFormatter:i||(e=>r(e)),tickLine:!1,axisLine:!1,width:60,allowDecimals:!0,domain:l}),(0,F.jsx)(Fm,{content:(0,F.jsx)(ez,{fmt:r,series:t}),cursor:{stroke:`#55556a`,strokeWidth:1,fill:`rgba(255,255,255,.03)`},isAnimationActive:!1}),t.map(e=>e.type===`band`?(0,F.jsx)(cI,{dataKey:e.key,stroke:`none`,fill:e.color,fillOpacity:.16,dot:!1,activeDot:!1,isAnimationActive:!1,connectNulls:!0},e.key):e.type===`bar`?(0,F.jsx)(sM,{dataKey:e.key,stackId:e.stack,fill:e.color,isAnimationActive:!1,maxBarSize:14,radius:e.stack?0:[3,3,0,0],stroke:`var(--color-panel)`,strokeWidth:+!!e.stack},e.key):e.type===`line`||!e.type?(0,F.jsx)(zF,{dataKey:e.key,stroke:e.color,strokeWidth:2,strokeDasharray:e.dashed?`4 3`:void 0,dot:!1,activeDot:{r:4,stroke:`var(--color-panel)`,strokeWidth:2},isAnimationActive:!1,connectNulls:!0},e.key):(0,F.jsx)(cI,{dataKey:e.key,stackId:e.stack,stroke:e.color,strokeWidth:2,fill:e.color,fillOpacity:.14,dot:!1,activeDot:{r:4,stroke:`var(--color-panel)`,strokeWidth:2},isAnimationActive:!1,connectNulls:!0},e.key)),c?.map(e=>(0,F.jsx)(SN,{y:e.y,stroke:e.color||`#82829a`,strokeDasharray:`4 4`,label:{value:e.label,position:`insideBottomRight`,fill:e.color||`#82829a`,fontSize:10}},`y${e.y}${e.label}`)),g.map(e=>(0,F.jsx)(SN,{x:e.x,stroke:e.color||`#ff6b9d`,strokeDasharray:`3 3`,label:{value:e.label,position:`insideTopLeft`,fill:e.color||`#ff6b9d`,fontSize:10}},`${e.t}${e.label}`)),d.a&&d.b&&(0,F.jsx)(oP,{x1:d.a,x2:d.b,fill:`#ff3d7f`,fillOpacity:.12,stroke:`#ff3d7f`,strokeOpacity:.4})]})})})}function rz({title:e,sub:t,series:n,children:r,right:i}){return(0,F.jsxs)(`section`,{className:`card`,children:[(0,F.jsxs)(`div`,{className:`card-h`,children:[(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,F.jsx)(`span`,{children:e}),t&&(0,F.jsx)(`span`,{className:`card-sub`,children:t})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[n&&(0,F.jsx)(tz,{series:n}),i]})]}),(0,F.jsx)(`div`,{className:`px-2 pb-2 pt-2`,children:r})]})}function iz({data:e,height:t=150,color:n=QR[0],highlight:r}){return(0,F.jsx)(`div`,{style:{height:t},children:(0,F.jsx)(eh,{width:`100%`,height:`100%`,children:(0,F.jsxs)(XR,{data:e,margin:{top:6,right:4,bottom:0,left:-18},barCategoryGap:2,children:[(0,F.jsx)(dF,{vertical:!1}),(0,F.jsx)(lL,{dataKey:`label`,tickLine:!1,axisLine:{stroke:`#2a2a35`},interval:0,tick:{fontSize:9.5}}),(0,F.jsx)(EL,{tickLine:!1,axisLine:!1,allowDecimals:!1}),(0,F.jsx)(Fm,{cursor:{fill:`rgba(255,255,255,.04)`},isAnimationActive:!1,content:({active:e,payload:t})=>e&&t?.length?(0,F.jsxs)(`div`,{className:`rounded-lg border border-line2 px-3 py-1.5 text-[12px]`,style:{background:`rgba(20,20,27,.97)`},children:[t[0].payload.label,`: `,(0,F.jsx)(`b`,{children:t[0].value}),` calls`]}):null}),(0,F.jsx)(sM,{dataKey:`count`,radius:[3,3,0,0],isAnimationActive:!1,children:e.map((e,t)=>(0,F.jsx)(th,{fill:r&&r(e)?$R.serious:n},t))})]})})})}function az(e,t){return e.map((e,n)=>{let r=t?.[n];return{...e,usualCalls:r?.calls?r.calls.expected:null,p95Normal:r?.p95?[r.p95.low,r.p95.high]:null}})}var oz=e=>e?{calls:{key:`usualCalls`,label:`Usual for this hour`,color:`#82829a`,type:`line`,dashed:!0},p95:{key:`p95Normal`,label:`Normal p95`,color:QR[1],type:`band`}}:null;function sz({k:e,endpoint:t,onClose:n}){let r=e.info.kind===`read`?`curl -H "Authorization: Bearer ${e.key}" ${t}/api/overview`:`OBZERVER_KEY=${e.key}\nOBZERVER_ENDPOINT=${t}${e.info.environment?`\nOBZERVER_ENV=${e.info.environment}`:``}`;return(0,F.jsxs)(`div`,{className:`rounded-lg border border-[#3b3315] bg-[#1d1a0e] p-3.5 flex flex-col gap-2.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-2 text-[12.5px]`,children:[(0,F.jsx)(Ui,{size:14,className:`text-[#f5c04e] mt-0.5 shrink-0`}),(0,F.jsxs)(`div`,{className:`flex-1`,children:[(0,F.jsxs)(`b`,{children:[`Copy “`,e.info.name,`” now.`]}),` `,(0,F.jsx)(`span`,{className:`text-ink2`,children:`Only its hash is stored, so it can't be shown again. Lost it? Rotate it.`})]}),n&&(0,F.jsx)(`button`,{className:`text-mute hover:text-ink`,onClick:n,title:`Done`,children:(0,F.jsx)(Ji,{size:14})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`code flex-1 !py-2 break-all`,children:e.key}),(0,F.jsx)(Ga,{text:e.key,className:`btn h-8`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-mute text-[11.5px]`,children:e.info.kind===`read`?`Read the API with it`:`Start an app with it`}),(0,F.jsx)(Ga,{text:r,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code !text-[11.5px]`,children:r})]})]})}var cz=[{id:``,label:`Never expires`},{id:`30`,label:`30 days`},{id:`90`,label:`90 days`},{id:`365`,label:`1 year`}];function lz({keys:e,endpoint:t,ingestRate:n,reload:r}){let[i,a]=(0,v.useState)(`ingest`),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(null),g=async()=>{p(``);try{let e=await N(`/api/keys`,{method:`POST`,json:{name:o,kind:i,environment:i===`ingest`&&c||null,expiresInDays:u?Number(u):null}});h(e),s(``),l(``),r()}catch(e){p(e.message)}};return(0,F.jsxs)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(Zr,{size:14}),`API keys`]}),sub:`Ingest keys send telemetry (optionally only for one environment); read keys let scripts and CI read the API. Each key is shown once and stored as a hash.${n?` Up to ${n} requests/s per ingest key.`:``}`,pad:!1,children:[(0,F.jsxs)(`div`,{className:`px-4 pt-3 flex flex-col gap-3`,children:[(0,F.jsxs)(`form`,{className:`flex flex-wrap items-center gap-2`,onSubmit:e=>{e.preventDefault(),g()},children:[(0,F.jsx)(Ka,{value:i,onChange:a,options:[{id:`ingest`,label:`Ingest`},{id:`read`,label:`Read`}]}),(0,F.jsx)(`input`,{className:`input h-7 w-36`,placeholder:i===`read`?`Name, e.g. ci`:`Name, e.g. prod api`,value:o,onChange:e=>s(e.target.value)}),i===`ingest`&&(0,F.jsx)(`input`,{className:`input h-7 w-40`,placeholder:`Any environment`,title:`Only accept telemetry from apps reporting this environment (OBZERVER_ENV or NODE_ENV)`,value:c,onChange:e=>l(e.target.value)}),(0,F.jsx)(`select`,{className:`select h-7`,value:u,onChange:e=>d(e.target.value),"aria-label":`Expiry`,children:cz.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.label},e.id))}),(0,F.jsxs)(`button`,{className:`btn btn-primary h-7`,children:[(0,F.jsx)(yi,{size:13}),`Create key`]}),f&&(0,F.jsx)(`span`,{className:`text-[12px] text-[#ff8a8a]`,children:f})]}),m&&(0,F.jsx)(sz,{k:m,endpoint:t,onClose:()=>h(null)})]}),(0,F.jsx)(`div`,{className:`pt-2`,children:(0,F.jsx)(qa,{rows:e,cols:[{key:`n`,label:`Name`,render:e=>(0,F.jsx)(`span`,{className:e.revoked||e.expired?`line-through text-mute`:``,children:e.name})},{key:`t`,label:`Kind`,render:e=>(0,F.jsx)(`span`,{className:`pill !text-[11px] ${e.kind===`read`?`text-[#7fb2f0]`:``}`,children:e.kind===`read`?`read`:`ingest`})},{key:`k`,label:`Key`,render:e=>(0,F.jsxs)(`span`,{className:`mono text-[11.5px] text-ink2`,children:[e.prefix,`…`]})},{key:`e`,label:`Environment`,render:e=>e.kind===`read`?(0,F.jsx)(`span`,{className:`text-mute`,children:`—`}):e.environment?(0,F.jsx)(`span`,{className:`mono text-[11.5px]`,children:e.environment}):(0,F.jsx)(`span`,{className:`text-mute`,children:`any`})},{key:`x`,label:`Expires`,render:e=>e.expires?(0,F.jsx)(`span`,{className:e.expired?`text-[#ff8a8a]`:`text-ink2`,title:Oa(e.expires,!0),children:e.expired?`expired`:Oa(e.expires,!0).split(` `)[0]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`never`})},{key:`u`,label:`Last used`,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:e.lastUsed?(0,F.jsx)(io,{ts:e.lastUsed}):`never`})},{key:`a`,label:``,render:e=>e.revoked?(0,F.jsx)(`span`,{className:`text-mute`,children:`revoked`}):(0,F.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Rotate: a new key with the same settings; this one stops working`,onClick:async()=>{window.confirm(`Rotate "${e.name}"? You get a new key, and apps using the old one stop reporting until they get it.`)&&(h(await N(`/api/keys/${e.id}/rotate`,{method:`POST`})),r())},children:(0,F.jsx)(Ti,{size:13})}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Revoke`,onClick:async()=>{window.confirm(`Revoke "${e.name}"? ${e.kind===`read`?`Scripts`:`Apps`} using it stop working.`)&&(await N(`/api/keys/${e.id}`,{method:`DELETE`}),r())},children:(0,F.jsx)(Bi,{size:13})})]})}]})})]})}var uz=[`github`,`linear`,`clickup`,`trello`],dz={github:`GitHub`,linear:`Linear`,clickup:`ClickUp`,trello:`Trello`};function fz(e=[]){let{data:t,reload:n}=P(`/api/settings/trackers`,e);return{settings:t,connected:uz.filter(e=>t?.[e]),reload:n}}var pz={open:{label:`open`,color:`#5fd38a`},closed:{label:`closed`,color:`#a78bfa`},canceled:{label:`canceled`,color:`#82829a`}};function mz({ticket:e,compact:t=!1}){let n=e.state?pz[e.state]:null;return(0,F.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,onClick:e=>e.stopPropagation(),className:`inline-flex items-center gap-1.5 rounded-md border border-line px-2 py-0.5 text-[12px] hover:border-ink2 hover:text-ink whitespace-nowrap`,children:[!t&&(0,F.jsx)(`span`,{className:`text-mute`,children:dz[e.provider]}),(0,F.jsx)(`span`,{className:`mono`,children:e.key}),n&&(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-mute`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full`,style:{background:n.color}}),n.label]}),(0,F.jsx)(Vr,{size:11,className:`text-mute`})]})}var hz={github:`issue`,linear:`ticket`,clickup:`task`,trello:`card`};function gz({provider:e,settings:t,onSaved:n}){let{msg:r,busy:i,run:a}=yz(),o=t.autoCreate===e,s=t.autoCreate&&t.autoCreate!==e?dz[t.autoCreate]:null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`label`,{className:`inline-flex items-center gap-2 text-[13px] cursor-pointer`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:o,disabled:i||!t[e],onChange:t=>a(async()=>(await N(`/api/settings/trackers`,{method:`PUT`,json:{autoCreate:t.target.checked?e:null}}),n(),t.target.checked?`Alert-opened issues now get a ${dz[e]} ${hz[e]}.`:`Turned off.`))}),`Open a `,dz[e],` `,hz[e],` automatically for issues created by alerts`]}),s&&!o&&(0,F.jsxs)(`div`,{className:`text-mute text-[12px] ml-6`,children:[`Currently on for `,s,`; turning it on here switches it.`]}),(0,F.jsx)(bz,{msg:r})]})}var _z={github:{done:`Closed (completed) issues`,cancel:`Issues closed as not planned`},linear:{done:`Tickets moved to a completed state`,cancel:`Canceled tickets`},clickup:{done:`Tasks moved to a closed or done status`,cancel:``},trello:{done:`Cards moved to the done list`,cancel:`Cards archived outside the done list`}};function vz({provider:e,webhook:t}){let n=_z[e];return(0,F.jsxs)(`div`,{className:`text-[12.5px] text-ink2 flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{children:[`Linked tickets are checked every 2 minutes, so this works even when Obzerver is not reachable from the internet.`,t?` A webhook makes it instant.`:``]}),(0,F.jsxs)(`div`,{children:[n.done,` start fix verification here. Reopened ones reopen the issue.`,n.cancel?` ${n.cancel} close it without verification.`:``,` Verification results are posted back as a comment.`]})]})}function yz(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!1);return{msg:e,busy:n,run:async e=>{r(!0),t(null);try{t({ok:!0,text:await e()})}catch(e){t({ok:!1,text:e.message})}finally{r(!1)}}}}var bz=({msg:e})=>e?(0,F.jsx)(`div`,{className:`text-[12.5px]`,style:{color:e.ok?`#5fd38a`:`#ff8a8a`},children:e.text}):null;function xz({settings:e,onSaved:t}){let n=e.github,[r,i]=(0,v.useState)(n?.token||``),[a,o]=(0,v.useState)(n?.repo||``),[s,c]=(0,v.useState)((n?.labels||[]).join(`, `)),{msg:l,busy:u,run:d}=yz(),f={github:{token:r,repo:a,labels:s}};return n?.source===`env`?(0,F.jsx)(Cz,{p:`github`,status:(0,F.jsx)(G,{kind:`good`,children:`connected via env`}),children:(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_GITHUB_TOKEN`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_GITHUB_REPO`}),` = `,(0,F.jsx)(`span`,{className:`mono`,children:n.repo}),`. Change the environment variables to update it.`]})}):(0,F.jsxs)(Cz,{p:`github`,status:n?(0,F.jsxs)(`span`,{className:`text-ink2 text-[12.5px]`,children:[`Creating tickets in `,(0,F.jsx)(`span`,{className:`mono text-ink`,children:n.repo})]}):null,action:n&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>d(async()=>window.confirm(`Disconnect GitHub? Linked tickets stay linked but stop syncing.`)?(await N(`/api/settings/trackers`,{method:`PUT`,json:{github:null}}),t(),`Disconnected.`):`Kept.`),children:[(0,F.jsx)(Bi,{size:13}),`Disconnect`]}),children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_220px_180px] gap-3`,children:[(0,F.jsx)(K,{label:`Token`,hint:(0,F.jsxs)(F.Fragment,{children:[`Fine-grained token with `,(0,F.jsx)(`b`,{children:`Issues: read and write`}),` on the repository, or a classic token with `,(0,F.jsx)(`span`,{className:`mono`,children:`repo`}),`.`]}),children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,placeholder:`github_pat_…`,value:r,onChange:e=>i(e.target.value)})}),(0,F.jsx)(K,{label:`Repository`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:`owner/name`,value:a,onChange:e=>o(e.target.value)})}),(0,F.jsx)(K,{label:`Labels`,hint:`optional, comma-separated`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`bug, obzerver`,value:s,onChange:e=>c(e.target.value)})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`button`,{className:`btn`,disabled:u||!r||!a,onClick:()=>d(async()=>(await N(`/api/settings/trackers/github/test`,{method:`POST`,json:f})).detail),children:[(0,F.jsx)(_i,{size:13}),`Test`]}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:u||!r||!a,onClick:()=>d(async()=>(await N(`/api/settings/trackers`,{method:`PUT`,json:f}),t(),`Saved.`)),children:`Save`}),(0,F.jsx)(bz,{msg:l})]})]})}function Sz({settings:e,onSaved:t}){let n=e.linear,[r,i]=(0,v.useState)(n?.apiKey||``),[a,o]=(0,v.useState)(n?[{id:n.teamId,key:``,name:n.teamName||n.teamId}]:[]),[s,c]=(0,v.useState)(n?.teamId||``),{msg:l,busy:u,run:d}=yz();if(n?.source===`env`)return(0,F.jsx)(Cz,{p:`linear`,status:(0,F.jsx)(G,{kind:`good`,children:`connected via env`}),children:(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_LINEAR_API_KEY`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_LINEAR_TEAM`}),` = `,(0,F.jsx)(`span`,{className:`mono`,children:n.teamId}),`. Change the environment variables to update it.`]})});let f=a.find(e=>e.id===s);return(0,F.jsxs)(Cz,{p:`linear`,status:n?(0,F.jsxs)(`span`,{className:`text-ink2 text-[12.5px]`,children:[`Creating tickets in team `,(0,F.jsx)(`span`,{className:`text-ink`,children:n.teamName||n.teamId})]}):null,action:n&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>d(async()=>window.confirm(`Disconnect Linear? Linked tickets stay linked but stop syncing.`)?(await N(`/api/settings/trackers`,{method:`PUT`,json:{linear:null}}),t(),`Disconnected.`):`Kept.`),children:[(0,F.jsx)(Bi,{size:13}),`Disconnect`]}),children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_auto_260px] gap-3 items-end`,children:[(0,F.jsx)(K,{label:`API key`,hint:`Linear → Settings → Security & access → Personal API keys`,children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,placeholder:`lin_api_…`,value:r,onChange:e=>i(e.target.value)})}),(0,F.jsxs)(`button`,{className:`btn mb-[18px]`,disabled:u||!r,onClick:()=>d(async()=>{let e=await N(`/api/settings/trackers/linear/test`,{method:`POST`,json:{linear:{apiKey:r}}});return o(e.teams),!s&&e.teams[0]&&c(e.teams[0].id),`${e.detail}. Pick the team for new tickets.`}),children:[(0,F.jsx)(_i,{size:13}),`Connect`]}),(0,F.jsx)(K,{label:`Team`,hint:`new tickets are created here`,children:(0,F.jsxs)(`select`,{className:`select`,value:s,disabled:!a.length,onChange:e=>c(e.target.value),children:[!a.length&&(0,F.jsx)(`option`,{value:``,children:`Connect first`}),a.map(e=>(0,F.jsxs)(`option`,{value:e.id,children:[e.name,e.key?` (${e.key})`:``]},e.id))]})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:u||!r||!s,onClick:()=>d(async()=>(await N(`/api/settings/trackers`,{method:`PUT`,json:{linear:{apiKey:r,teamId:s,teamName:f?.name}}}),t(),`Saved.`)),children:`Save`}),(0,F.jsx)(bz,{msg:l})]})]})}function Cz({status:e,action:t,children:n}){return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(e||t)&&(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e,(0,F.jsx)(`span`,{className:`flex-1`}),t]}),n]})}function wz({settings:e,onSaved:t}){let n=e.clickup,[r,i]=(0,v.useState)(n?.token||``),[a,o]=(0,v.useState)(n?.listId||``),[s,c]=(0,v.useState)(n?.listName||``),{msg:l,busy:u,run:d}=yz();if(n?.source===`env`)return(0,F.jsx)(Cz,{p:`clickup`,status:(0,F.jsx)(G,{kind:`good`,children:`connected via env`}),children:(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_CLICKUP_TOKEN`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_CLICKUP_LIST`}),` = `,(0,F.jsx)(`span`,{className:`mono`,children:n.listId}),`. Change the environment variables to update it.`]})});let f={clickup:{token:r,listId:a,listName:s}};return(0,F.jsxs)(Cz,{p:`clickup`,status:n?(0,F.jsxs)(`span`,{className:`text-ink2 text-[12.5px]`,children:[`Creating tasks in list `,(0,F.jsx)(`span`,{className:`text-ink`,children:n.listName||n.listId})]}):null,action:n&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>d(async()=>window.confirm(`Disconnect ClickUp? Linked tasks stay linked but stop syncing.`)?(await N(`/api/settings/trackers`,{method:`PUT`,json:{clickup:null}}),t(),`Disconnected.`):`Kept.`),children:[(0,F.jsx)(Bi,{size:13}),`Disconnect`]}),children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_1fr] gap-3`,children:[(0,F.jsx)(K,{label:`API token`,hint:`ClickUp → avatar → Settings → Apps → API Token (starts with pk_)`,children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,placeholder:`pk_…`,value:r,onChange:e=>i(e.target.value)})}),(0,F.jsx)(K,{label:`List`,hint:`paste the list's URL (…/v/li/901234567) or its id; new tasks go here`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:`https://app.clickup.com/…/v/li/…`,value:a,onChange:e=>{o(e.target.value),c(``)}})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`button`,{className:`btn`,disabled:u||!r,onClick:()=>d(async()=>{let e=await N(`/api/settings/trackers/clickup/test`,{method:`POST`,json:f});return e.listName&&c(e.listName),e.detail}),children:[(0,F.jsx)(_i,{size:13}),`Test`]}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:u||!r||!a,onClick:()=>d(async()=>{let e=await N(`/api/settings/trackers/clickup/test`,{method:`POST`,json:f});return await N(`/api/settings/trackers`,{method:`PUT`,json:{clickup:{token:r,listId:a,listName:e.listName||s}}}),t(),`Saved.`}),children:`Save`}),(0,F.jsx)(bz,{msg:l})]})]})}function Tz({settings:e,onSaved:t}){let n=e.trello,[r,i]=(0,v.useState)(n?.apiKey||``),[a,o]=(0,v.useState)(n?.token||``),[s,c]=(0,v.useState)(n?[{id:n.boardId,name:n.boardName||n.boardId}]:[]),[l,u]=(0,v.useState)(n?.boardId||``),[d,f]=(0,v.useState)(n?[{id:n.listId,name:n.listName||n.listId},{id:n.doneListId,name:n.doneListName||n.doneListId}]:[]),[p,m]=(0,v.useState)(n?.listId||``),[h,g]=(0,v.useState)(n?.doneListId||``),{msg:_,busy:y,run:b}=yz();if(n?.source===`env`)return(0,F.jsx)(Cz,{p:`trello`,status:(0,F.jsx)(G,{kind:`good`,children:`connected via env`}),children:(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_TRELLO_KEY`}),`, `,(0,F.jsx)(`span`,{className:`mono`,children:`_TOKEN`}),`, `,(0,F.jsx)(`span`,{className:`mono`,children:`_LIST`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`_DONE_LIST`}),`. Change the environment variables to update it.`]})});let x=e=>b(async()=>{let t=await N(`/api/settings/trackers/trello/test`,{method:`POST`,json:{trello:{apiKey:r,token:a,boardId:e}}});f(t.lists);let n=t.lists.find(e=>/done|complete|closed/i.test(e.name));return m(t.lists[0]?.id||``),g(n?.id||t.lists.at(-1)?.id||``),`${t.detail}. Pick the lists.`}),S=(e,t)=>e.find(e=>e.id===t)?.name;return(0,F.jsxs)(Cz,{p:`trello`,status:n?(0,F.jsxs)(`span`,{className:`text-ink2 text-[12.5px]`,children:[`Creating cards in `,(0,F.jsxs)(`span`,{className:`text-ink`,children:[n.boardName||`board`,` → `,n.listName||`list`]}),`, done list `,(0,F.jsx)(`span`,{className:`text-ink`,children:n.doneListName||`—`})]}):null,action:n&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>b(async()=>window.confirm(`Disconnect Trello? Linked cards stay linked but stop syncing.`)?(await N(`/api/settings/trackers`,{method:`PUT`,json:{trello:null}}),t(),`Disconnected.`):`Kept.`),children:[(0,F.jsx)(Bi,{size:13}),`Disconnect`]}),children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_1fr_auto] gap-3 items-end`,children:[(0,F.jsx)(K,{label:`API key`,hint:(0,F.jsxs)(F.Fragment,{children:[`From a Power-Up at `,(0,F.jsx)(`span`,{className:`mono`,children:`trello.com/power-ups/admin`}),` → API key`]}),children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,value:r,onChange:e=>i(e.target.value)})}),(0,F.jsx)(K,{label:`Token`,hint:`generated from the same page (Token link next to the key)`,children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,value:a,onChange:e=>o(e.target.value)})}),(0,F.jsxs)(`button`,{className:`btn mb-[18px]`,disabled:y||!r||!a,onClick:()=>b(async()=>{let e=await N(`/api/settings/trackers/trello/test`,{method:`POST`,json:{trello:{apiKey:r,token:a}}});return c(e.boards),e.detail}),children:[(0,F.jsx)(_i,{size:13}),`Connect`]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-3 gap-3`,children:[(0,F.jsx)(K,{label:`Board`,children:(0,F.jsxs)(`select`,{className:`select`,value:l,disabled:!s.length,onChange:e=>{u(e.target.value),e.target.value&&x(e.target.value)},children:[(0,F.jsx)(`option`,{value:``,children:s.length?`Pick a board`:`Connect first`}),s.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.name},e.id))]})}),(0,F.jsx)(K,{label:`New cards go to`,children:(0,F.jsxs)(`select`,{className:`select`,value:p,disabled:!d.length,onChange:e=>m(e.target.value),children:[!d.length&&(0,F.jsx)(`option`,{value:``,children:`Pick a board first`}),d.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.name},e.id))]})}),(0,F.jsx)(K,{label:`Done list`,hint:`moving a card here starts verification`,children:(0,F.jsxs)(`select`,{className:`select`,value:h,disabled:!d.length,onChange:e=>g(e.target.value),children:[!d.length&&(0,F.jsx)(`option`,{value:``,children:`Pick a board first`}),d.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.name},e.id))]})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:y||!r||!a||!l||!p||!h,onClick:()=>b(async()=>(await N(`/api/settings/trackers`,{method:`PUT`,json:{trello:{apiKey:r,token:a,boardId:l,boardName:S(s,l),listId:p,listName:S(d,p),doneListId:h,doneListName:S(d,h)}}}),t(),`Saved.`)),children:`Save`}),(0,F.jsx)(bz,{msg:_})]})]})}function Ez({settings:e}){let t=`${window.location.origin}${e.webhooks.github.path}`;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 text-[12.5px]`,children:[(0,F.jsxs)(`div`,{className:`text-ink2`,children:[`Repository → Settings → Webhooks → Add webhook. Content type `,(0,F.jsx)(`span`,{className:`mono`,children:`application/json`}),`, event `,(0,F.jsx)(`b`,{children:`Issues`}),`.`]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute w-24 shrink-0`,children:`Payload URL`}),(0,F.jsx)(`span`,{className:`mono break-all`,children:t}),(0,F.jsx)(Ga,{text:t,className:`btn btn-ghost h-7`,label:``})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute w-24 shrink-0`,children:`Secret`}),(0,F.jsx)(`span`,{className:`mono break-all`,children:e.webhooks.github.secret}),(0,F.jsx)(Ga,{text:e.webhooks.github.secret,className:`btn btn-ghost h-7`,label:``})]}),(0,F.jsx)(`div`,{className:`text-mute`,children:`Checked against its signature; it never needs the dashboard password.`})]})}function Dz({settings:e,onSaved:t}){let n=`${window.location.origin}${e.webhooks.linear.path}`,[r,i]=(0,v.useState)(``),{msg:a,busy:o,run:s}=yz();return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 text-[12.5px]`,children:[(0,F.jsxs)(`div`,{className:`text-ink2`,children:[`Linear → Settings → API → Webhooks → New webhook, data change events for `,(0,F.jsx)(`b`,{children:`Issues`}),`. Then paste the signing secret Linear shows.`]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute w-24 shrink-0`,children:`URL`}),(0,F.jsx)(`span`,{className:`mono break-all`,children:n}),(0,F.jsx)(Ga,{text:n,className:`btn btn-ghost h-7`,label:``})]}),(0,F.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,F.jsx)(K,{label:`Signing secret`,children:(0,F.jsx)(`input`,{className:`input mono w-80`,type:`password`,placeholder:e.webhooks.linear.secretSet?`saved (enter a new one to replace)`:`lin_wh_…`,value:r,onChange:e=>i(e.target.value)})}),(0,F.jsx)(`button`,{className:`btn mb-[18px]`,disabled:o||!r,onClick:()=>s(async()=>(await N(`/api/settings/trackers`,{method:`PUT`,json:{linearWebhookSecret:r}}),i(``),t(),`Signing secret saved.`)),children:`Save`})]}),(0,F.jsx)(bz,{msg:a}),(0,F.jsx)(`div`,{className:`text-mute`,children:`Checked against its signature and timestamp; it never needs the dashboard password.`})]})}var Oz=[{title:`Issue trackers`,sub:`turn issues into tickets; closing a ticket starts fix verification here`,items:[{id:`github`,name:`GitHub Issues`,mono:`GH`,color:`#8b949e`,blurb:`Create GitHub issues with the error, stack and affected users. Status syncs both ways.`},{id:`linear`,name:`Linear`,mono:`L`,color:`#7c83f7`,blurb:`Create Linear tickets in a team. Done starts verification; a failed fix moves the ticket back.`},{id:`clickup`,name:`ClickUp`,mono:`CU`,color:`#7b68ee`,blurb:`Create ClickUp tasks in a list. A closed status starts verification; a failed fix moves the task back to open.`},{id:`trello`,name:`Trello`,mono:`T`,color:`#0c66e4`,blurb:`Create Trello cards on a board. Moving a card to your done list starts verification.`},{id:`jira`,name:`Jira`,mono:`J`,color:`#3b82f6`,blurb:`Jira Cloud tickets with the same two-way sync.`,soon:!0}]},{title:`Notifications`,sub:`where alert rules and SLO burn alerts send messages`,items:[{id:`email`,name:`Email`,mono:`@`,color:`#f59e0b`,blurb:`Send alerts through any SMTP server: Gmail, SES, Resend, Postmark, Mailgun.`},{id:`slack`,name:`Slack`,mono:`S`,color:`#e01e5a`,blurb:`Post alerts to a channel with an incoming webhook URL, set per alert rule.`},{id:`webhook`,name:`Webhooks`,mono:`{}`,color:`#22c55e`,blurb:`POST alert events as JSON to any URL: PagerDuty, Opsgenie, n8n, your own service.`}]},{title:`AI`,sub:`ask questions in the dashboard, or let coding agents read the same telemetry`,items:[{id:`ai`,name:`Ask Obzeri`,mono:`✦`,color:`#a78bfa`,blurb:`Ask questions about this project in the dashboard. Answers come only from your telemetry, with evidence and links.`},{id:`mcp`,name:`MCP server`,mono:`AI`,color:`#ff3d7f`,blurb:`Claude Code, Cursor or any MCP client can investigate errors, traces, releases and SLOs.`}]}],kz=Oz.flatMap(e=>e.items);function Az(){let e=P(`/api/settings`),t=fz(),n=P(`/api/alerts`),r=P(`/api/settings/ai`);return{settings:e.data,trackers:t.settings??void 0,rules:n.data?.rules,ai:r.data,error:e.error,reload:()=>{e.reload(),t.reload(),n.reload(),r.reload()}}}var jz=(e,t)=>(e||[]).filter(e=>(e.channels||[]).some(e=>e.type===t));function Mz(e,t){switch(e){case`github`:return t.trackers?.github?{kind:`good`,text:`Connected · ${t.trackers.github.repo}`}:{kind:`neutral`,text:`Not connected`};case`linear`:return t.trackers?.linear?{kind:`good`,text:`Connected · ${t.trackers.linear.teamName||`team`}`}:{kind:`neutral`,text:`Not connected`};case`clickup`:return t.trackers?.clickup?{kind:`good`,text:`Connected · ${t.trackers.clickup.listName||`list`}`}:{kind:`neutral`,text:`Not connected`};case`trello`:return t.trackers?.trello?{kind:`good`,text:`Connected · ${t.trackers.trello.boardName||`board`}`}:{kind:`neutral`,text:`Not connected`};case`jira`:return{kind:`neutral`,text:`Coming soon`};case`email`:return t.settings?.email?.configured?{kind:`good`,text:`Configured${t.settings.email.source===`env`?` via env`:``}`}:{kind:`neutral`,text:`Not configured`};case`slack`:case`webhook`:{let n=jz(t.rules,e).length;return n?{kind:`good`,text:`Used by ${n} alert rule${n===1?``:`s`}`}:{kind:`neutral`,text:`Set up per alert rule`}}case`ai`:return t.ai?.configured?{kind:`good`,text:`${t.ai.provider===`anthropic`?`Anthropic`:`OpenAI-compatible`} · ${t.ai.model}`}:{kind:`neutral`,text:`Not set up`};case`mcp`:return t.settings?.mcp?.tokenPrefix?{kind:`good`,text:`Ready`}:{kind:`neutral`,text:`No token`}}}var Nz=new Map,Pz=e=>{let t=Nz.get(e);return t||(t=new Promise(t=>{let n=new Image;n.onload=()=>t(n.naturalWidth>0),n.onerror=()=>t(!1),n.src=e}),Nz.set(e,t)),t};function Fz({item:e,size:t=36}){let n=`/logos/${e.id}.svg`,[r,i]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{let e=!0;return Pz(n).then(t=>{e&&i(t)}),()=>{e=!1}},[n]),r?(0,F.jsx)(`span`,{className:`inline-flex items-center justify-center rounded-lg shrink-0 bg-white`,style:{width:t,height:t},children:(0,F.jsx)(`img`,{src:n,alt:``,width:t*.6,height:t*.6,className:`object-contain`,style:{width:t*.6,height:t*.6}})}):(0,F.jsx)(`span`,{className:`inline-flex items-center justify-center rounded-lg font-semibold shrink-0`,style:{width:t,height:t,fontSize:t*.36,color:e.color,background:`${e.color}26`},children:e.mono})}function Iz(){let{id:e}=yt(),t=Az();if(t.error)return(0,F.jsx)(W,{error:t.error});if(!t.settings||!t.trackers)return(0,F.jsx)(H,{});let n=kz.find(t=>t.id===e);return e&&n&&!n.soon?(0,F.jsx)(Rz,{item:n,ctx:t}):(0,F.jsx)(Lz,{ctx:t})}function Lz({ctx:e}){let t=L();return(0,F.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(vi,{size:18,className:`text-brand`}),title:`Integrations`,sub:`Connect Obzerver to the tools your team already uses.`}),Oz.map(n=>(0,F.jsxs)(`section`,{className:`flex flex-col gap-2.5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-[13px] font-semibold`,children:n.title}),(0,F.jsx)(`div`,{className:`text-mute text-[12px]`,children:n.sub})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-2 @5xl:grid-cols-3 gap-3`,children:n.items.map(n=>{let r=Mz(n.id,e),i=(0,F.jsxs)(`div`,{className:`h-full rounded-xl border border-line bg-panel p-4 flex flex-col gap-3 ${n.soon?`opacity-60`:`hover:border-line2 hover:bg-panel2 transition-colors`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(Fz,{item:n}),(0,F.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,F.jsx)(`div`,{className:`font-medium`,children:n.name})}),!n.soon&&(0,F.jsx)(Or,{size:15,className:`text-mute`})]}),(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px] flex-1`,children:n.blurb}),(0,F.jsx)(`div`,{children:(0,F.jsx)(G,{kind:r.kind,children:r.text})})]});return n.soon?(0,F.jsx)(`div`,{children:i},n.id):(0,F.jsx)(Nn,{to:t(`/integrations/${n.id}`),children:i},n.id)})})]},n.title))]})}function Rz({item:e,ctx:t}){let n=L(),r=Mz(e.id,t);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 max-w-[1100px]`,children:[(0,F.jsxs)(Nn,{to:n(`/integrations`),className:`text-mute hover:text-ink text-[12px] -mb-1 inline-flex items-center gap-1`,children:[(0,F.jsx)(dr,{size:12}),`Integrations`]}),(0,F.jsxs)(`div`,{className:`flex items-start gap-3.5`,children:[(0,F.jsx)(Fz,{item:e,size:44}),(0,F.jsxs)(`div`,{className:`flex-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,F.jsx)(`h1`,{className:`text-[19px] font-semibold tracking-tight`,children:e.name}),(0,F.jsx)(G,{kind:r.kind,children:r.text})]}),(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px] mt-1`,children:e.blurb})]})]}),e.id===`github`&&(0,F.jsx)(zz,{provider:`github`,ctx:t}),e.id===`linear`&&(0,F.jsx)(zz,{provider:`linear`,ctx:t}),e.id===`clickup`&&(0,F.jsx)(zz,{provider:`clickup`,ctx:t}),e.id===`trello`&&(0,F.jsx)(zz,{provider:`trello`,ctx:t}),e.id===`email`&&(0,F.jsx)(Bz,{ctx:t}),(e.id===`slack`||e.id===`webhook`)&&(0,F.jsx)(Vz,{type:e.id,ctx:t}),e.id===`mcp`&&(0,F.jsx)(Wz,{ctx:t}),e.id===`ai`&&(t.ai?(0,F.jsx)(Gz,{ctx:t},`${t.ai.source}:${t.ai.provider}:${t.ai.apiKey}`):(0,F.jsx)(`div`,{className:`text-mute text-[12.5px]`,children:`Loading…`}))]})}function zz({provider:e,ctx:t}){let n=t.trackers,r=!!n[e],i=`${e}:${JSON.stringify(n[e])}`,a=e===`github`||e===`linear`;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(V,{title:`Connection`,children:[e===`github`&&(0,F.jsx)(xz,{settings:n,onSaved:t.reload},i),e===`linear`&&(0,F.jsx)(Sz,{settings:n,onSaved:t.reload},i),e===`clickup`&&(0,F.jsx)(wz,{settings:n,onSaved:t.reload},i),e===`trello`&&(0,F.jsx)(Tz,{settings:n,onSaved:t.reload},i)]}),r&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(V,{title:`Automation`,children:(0,F.jsx)(gz,{provider:e,settings:n,onSaved:t.reload})}),(0,F.jsx)(V,{title:`Status sync`,sub:a?`optional webhook for instant updates`:`by polling`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(vz,{provider:e,webhook:a}),e===`github`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`border-t border-line`}),(0,F.jsx)(Ez,{settings:n})]}),e===`linear`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`border-t border-line`}),(0,F.jsx)(Dz,{settings:n,onSaved:t.reload})]})]})})]})]})}function Bz({ctx:e}){let t=L(),n=jz(e.rules,`email`);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Uz,{email:e.settings.email,onSaved:e.reload}),(0,F.jsx)(V,{title:`Where it's used`,sub:`add an Email channel to an alert rule or an SLO`,children:(0,F.jsx)(Hz,{rules:n,empty:(0,F.jsxs)(U,{title:`No alert rules send email yet`,children:[`Open a rule in `,(0,F.jsx)(Nn,{className:`link`,to:t(`/alerts`),children:`Alerts`}),` and add an Email channel with one or more addresses.`]})})})]})}function Vz({type:e,ctx:t}){let n=L(),r=jz(t.rules,e);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(V,{title:`How to set it up`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 text-[12.5px] text-ink2`,children:[e===`slack`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{children:`Each alert rule can post to its own channel, so there is nothing to connect globally.`}),(0,F.jsxs)(`ol`,{className:`list-decimal ml-5 flex flex-col gap-1`,children:[(0,F.jsxs)(`li`,{children:[`In Slack, create an app with `,(0,F.jsx)(`b`,{children:`Incoming Webhooks`}),` turned on and add a webhook for the channel.`]}),(0,F.jsxs)(`li`,{children:[`Copy the URL (it starts with `,(0,F.jsx)(`span`,{className:`mono`,children:`https://hooks.slack.com/services/`}),`).`]}),(0,F.jsxs)(`li`,{children:[`In `,(0,F.jsx)(Nn,{className:`link`,to:n(`/alerts`),children:`Alerts`}),`, open a rule (or an SLO), add a `,(0,F.jsx)(`b`,{children:`Slack`}),` channel and paste the URL.`]})]})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{children:`Each alert rule can POST to its own URL. The body is JSON:`}),(0,F.jsx)(`div`,{className:`code`,children:`{ "rule": "Checkout error rate", "state": "firing", "value": 7.2,
73
+ "message": "error rate 7.2% > 5% over 10 min", "link": "https://…/alerts?rule=3", "ts": 1763400000000 }`}),(0,F.jsxs)(`div`,{children:[`In `,(0,F.jsx)(Nn,{className:`link`,to:n(`/alerts`),children:`Alerts`}),`, open a rule (or an SLO) and add a `,(0,F.jsx)(`b`,{children:`Webhook`}),` channel with the URL.`]})]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(Nn,{className:`btn mt-1 inline-flex`,to:n(`/alerts`),children:[(0,F.jsx)(yi,{size:13}),`Go to alert rules`]})})]})}),(0,F.jsx)(V,{title:`Where it's used`,pad:!1,children:(0,F.jsx)(`div`,{className:`pt-2`,children:(0,F.jsx)(Hz,{rules:r,empty:(0,F.jsx)(U,{title:`No alert rules use ${e===`slack`?`Slack`:`a webhook`} yet`})})})})]})}function Hz({rules:e,empty:t}){let n=L();return e.length?(0,F.jsx)(qa,{rows:e,cols:[{key:`n`,label:`Rule`,render:e=>(0,F.jsx)(Nn,{className:`link`,to:n(`/alerts?rule=${e.id}`),children:e.name})},{key:`s`,label:`State`,render:e=>(0,F.jsx)(G,{kind:e.state===`firing`?`crit`:`good`,children:e.state===`firing`?`firing`:`ok`})},{key:`c`,label:`Channels`,render:e=>(0,F.jsx)(`div`,{className:`flex gap-1`,children:e.channels.map((e,t)=>(0,F.jsx)(`span`,{className:`pill`,children:e.type},t))})}]}):(0,F.jsx)(F.Fragment,{children:t})}function Uz({email:e,onSaved:t}){let[n,r]=(0,v.useState)(e.source===`settings`&&e.smtp||``),[i,a]=(0,v.useState)(e.source===`settings`&&e.from||``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(!1),f=e.source===`env`;return(0,F.jsx)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(si,{size:14}),`SMTP server`]}),sub:`used by alert rules and SLO burn alerts with an email channel`,right:e.configured?(0,F.jsxs)(G,{kind:`good`,children:[`configured`,f?` via env`:``]}):(0,F.jsx)(G,{kind:`neutral`,children:`not configured`}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[f?(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_SMTP_URL`}),` = `,(0,F.jsx)(`span`,{className:`mono`,children:e.smtp}),`, sending as `,(0,F.jsx)(`span`,{className:`mono`,children:e.from}),`. Change the environment variables to update it.`]}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_280px_auto] gap-3 items-end`,children:[(0,F.jsx)(K,{label:`SMTP URL`,hint:`smtp://user:pass@host:587 (STARTTLS) or smtps://user:pass@host:465. Works with Gmail, SES, Resend, Postmark, Mailgun.`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:`smtps://apikey:secret@smtp.example.com:465`,value:n,onChange:e=>r(e.target.value)})}),(0,F.jsx)(K,{label:`From`,hint:`optional`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`Obzerver <alerts@company.com>`,value:i,onChange:e=>a(e.target.value)})}),(0,F.jsx)(`button`,{className:`btn btn-primary mb-[18px]`,disabled:u,onClick:async()=>{d(!0),l(null);try{await N(`/api/settings/email`,{method:`PUT`,json:{smtpUrl:n,from:i}}),l({ok:!0,text:`Saved.`}),t()}catch(e){l({ok:!1,text:e.message})}finally{d(!1)}},children:`Save`})]}),e.configured&&(0,F.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,F.jsx)(K,{label:`Send a test email to`,children:(0,F.jsx)(`input`,{className:`input w-72`,placeholder:`you@company.com`,value:o,onChange:e=>s(e.target.value)})}),(0,F.jsxs)(`button`,{className:`btn`,disabled:u||!o,onClick:async()=>{d(!0),l(null);try{await N(`/api/settings/email/test`,{method:`POST`,json:{to:o}}),l({ok:!0,text:`Test email sent to ${o}.`})}catch(e){l({ok:!1,text:e.message})}finally{d(!1)}},children:[(0,F.jsx)(ki,{size:13}),`Send test`]})]}),c&&(0,F.jsx)(`div`,{className:`text-[12.5px]`,style:{color:c.ok?`#5fd38a`:`#ff8a8a`},children:c.text})]})})}function Wz({ctx:e}){let t=e.settings.mcp,[n,r]=(0,v.useState)(null),i=n??`<your MCP token>`,a=JSON.stringify({mcpServers:{obzerver:{type:`http`,url:t.url,headers:{Authorization:`Bearer ${i}`}}}},null,2),o=`claude mcp add --transport http obzerver ${t.url} --header "Authorization: Bearer ${i}"`;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(V,{title:`Connect an agent`,sub:`read-only: nothing can be changed over MCP`,right:(0,F.jsx)(`button`,{className:`btn h-7`,onClick:async()=>{(!t.tokenPrefix||window.confirm(`Make a new MCP token? The current one stops working, so agents using it need the new one.`))&&(r((await N(`/api/settings/mcp-token`,{method:`POST`})).token),e.reload())},children:t.tokenPrefix?`New token`:`Create token`}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px]`,children:`Let Claude Code, Cursor or any MCP client investigate regressions, follow a trace into its logs, or check whether an error is still happening, using the same data you see here.`}),n?(0,F.jsxs)(`div`,{className:`rounded-lg border border-[#3b3315] bg-[#1d1a0e] p-3 flex flex-col gap-2`,children:[(0,F.jsxs)(`div`,{className:`text-[12.5px]`,children:[(0,F.jsx)(`b`,{children:`Copy the token now.`}),` `,(0,F.jsx)(`span`,{className:`text-ink2`,children:`Only its hash is stored, so it can't be shown again.`})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`code flex-1 !py-2 break-all`,children:n}),(0,F.jsx)(Ga,{text:n,className:`btn h-8`})]})]}):(0,F.jsx)(`div`,{className:`text-[12.5px] text-ink2`,children:t.tokenPrefix?(0,F.jsxs)(F.Fragment,{children:[`Current token starts with `,(0,F.jsxs)(`span`,{className:`mono`,children:[t.tokenPrefix,`…`]}),`. It is stored as a hash: if you don't have it, make a new one and the commands below fill it in.`]}):`Create a token to connect an agent.`}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-ink2 text-[12px]`,children:`Claude Code`}),(0,F.jsx)(Ga,{text:o,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:o})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-ink2 text-[12px]`,children:`Cursor / generic mcp.json`}),(0,F.jsx)(Ga,{text:a,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:a})]})]})}),(0,F.jsx)(V,{title:`Tools (${t.tools.length})`,children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.tools.map(e=>(0,F.jsx)(`span`,{className:`pill mono !text-[11px]`,children:e},e))})})]})}function Gz({ctx:e}){let t=e.ai||{configured:!1},[n,r]=(0,v.useState)(t.provider||`anthropic`),[i,a]=(0,v.useState)(t.apiKey||``),[o,s]=(0,v.useState)(t.model||``),[c,l]=(0,v.useState)(t.baseUrl||``),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(!1),m=async e=>{p(!0),d(null);try{d({ok:!0,text:await e()})}catch(e){d({ok:!1,text:e.message})}finally{p(!1)}},h={provider:n,apiKey:i,model:o,baseUrl:c||null};return t.source===`env`?(0,F.jsx)(V,{title:`Model`,children:(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_AI_PROVIDER`}),`, `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_AI_API_KEY`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_AI_MODEL`}),`: `,t.provider,` · `,(0,F.jsx)(`span`,{className:`mono`,children:t.model}),t.baseUrl?(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsx)(`span`,{className:`mono`,children:t.baseUrl})]}):null,`. Change the environment variables to update it.`]})}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(V,{title:`Model`,sub:`one model for every project on this server`,right:t.configured?(0,F.jsx)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>m(async()=>window.confirm(`Turn off Ask Obzeri?`)?(await N(`/api/settings/ai`,{method:`PUT`,json:null}),e.reload(),`Turned off.`):`Kept.`),children:`Turn off`}):void 0,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsxs)(`div`,{className:`seg w-fit`,children:[(0,F.jsx)(`button`,{className:n===`anthropic`?`on`:``,onClick:()=>{r(`anthropic`),s(``),l(``)},children:`Anthropic (Claude)`}),(0,F.jsx)(`button`,{className:n===`openai`?`on`:``,onClick:()=>{r(`openai`),s(``),l(``)},children:`OpenAI-compatible`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-2 gap-3`,children:[(0,F.jsx)(K,{label:`API key`,hint:n===`anthropic`?`from console.anthropic.com → API keys`:`leave empty for a local server such as Ollama`,children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,placeholder:n===`anthropic`?`sk-ant-…`:`sk-…`,value:i,onChange:e=>a(e.target.value)})}),(0,F.jsx)(K,{label:`Model`,hint:n===`anthropic`?`default: claude-sonnet-5-5`:`the model id your endpoint serves`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:n===`anthropic`?`claude-sonnet-5-5`:`e.g. llama3.1, gpt-…`,value:o,onChange:e=>s(e.target.value)})})]}),(0,F.jsx)(K,{label:n===`anthropic`?`Base URL (optional)`:`Base URL`,hint:n===`anthropic`?`only for a proxy or gateway`:`https://api.openai.com/v1 · https://openrouter.ai/api/v1 · http://localhost:11434/v1 (Ollama)`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:n===`anthropic`?`https://api.anthropic.com`:`https://api.openai.com/v1`,value:c,onChange:e=>l(e.target.value)})}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`button`,{className:`btn`,disabled:f,onClick:()=>m(async()=>(await N(`/api/settings/ai/test`,{method:`POST`,json:h})).detail),children:[(0,F.jsx)(Li,{size:13}),`Test`]}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:f,onClick:()=>m(async()=>(await N(`/api/settings/ai`,{method:`PUT`,json:h}),e.reload(),`Saved. Open Ask Obzeri from the top bar (⌘I).`)),children:`Save`}),u&&(0,F.jsx)(`span`,{className:`text-[12.5px]`,style:{color:u.ok?`#5fd38a`:`#ff8a8a`},children:u.text})]})]})}),(0,F.jsx)(V,{title:`How answers are built`,children:(0,F.jsxs)(`div`,{className:`text-[12.5px] text-ink2 flex flex-col gap-1.5`,children:[(0,F.jsx)(`div`,{children:`The model never touches the database. It can only call the same read-only tools as the MCP server, against the project you are in, and must finish with a structured answer.`}),(0,F.jsx)(`div`,{children:`Before an answer is shown, Obzerver checks it: sources and the time range come from the tool calls that really ran; links to executions, traces and errors are kept only if those ids appeared in tool results; evidence must cite a tool that ran; and confidence is lowered when something did not hold up.`}),(0,F.jsx)(`div`,{className:`text-mute`,children:`Privacy: your question and what the tools return (route names, error messages, SQL without values) are sent to the model provider. Use a local model through an OpenAI-compatible server if nothing may leave your network.`})]})})]})}function Kz(){let e=L(),t=Az();if(!t.settings||!t.trackers)return null;let n=kz.filter(e=>!e.soon);return(0,F.jsx)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(vi,{size:14}),`Integrations`]}),sub:`GitHub, Linear, email, Slack, webhooks and MCP`,right:(0,F.jsxs)(Nn,{className:`btn h-7`,to:e(`/integrations`),children:[`Manage`,(0,F.jsx)(Or,{size:13})]}),children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.map(n=>{let r=Mz(n.id,t);return(0,F.jsxs)(Nn,{to:e(`/integrations/${n.id}`),className:`inline-flex items-center gap-2 rounded-lg border border-line px-2.5 py-1.5 hover:border-line2`,children:[(0,F.jsx)(Fz,{item:n,size:22}),(0,F.jsx)(`span`,{className:`text-[12.5px]`,children:n.name}),(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full`,style:{background:r.kind===`good`?`#5fd38a`:`#82829a`}})]},n.id)})})})}function qz({initial:e=`express`,title:t=`Connect an application`}={}){let{data:n,reload:r}=P(`/api/settings`),[i,a]=(0,v.useState)(e),[o,s]=(0,v.useState)(null),c=(n?.keys)?.find(e=>e.kind===`ingest`&&!e.revoked&&!e.expired),l=o?.key||`<your-ingest-key>`,u=n?.endpoint||`http://localhost:4319`,d=`OBZERVER_KEY=${l}\nOBZERVER_ENDPOINT=${u}\nOBZERVER_SERVICE=my-api`,f={zero:`# no code changes: preload the SDK
74
+ npm i @obzerver/node
75
+
76
+ ${d.split(`
77
+ `).join(` \\
78
+ `)} \\
79
+ node --import @obzerver/node/register server.ts
80
+
81
+ # compiled or CommonJS apps
82
+ node -r @obzerver/node/register dist/server.js`,express:`// instrument.ts: loaded first with node --import ./instrument.ts server.ts
83
+ import { init } from '@obzerver/node';
84
+ import type { Request } from 'express';
85
+
86
+ init({
87
+ serviceId: 'shop-api', // or OBZERVER_SERVICE
88
+ // release version is inferred from CI or .git; set serviceVersion to override
89
+ http: { getUserId: (req: Request & { user?: { id: string } }) => req.user?.id },
90
+ });
91
+
92
+ // server.ts: your app, unchanged
93
+ import express from 'express';
94
+ const app = express();
95
+ app.get('/orders/:id', async (req, res) => {
96
+ res.json(await orders.findById(req.params.id)); // pg/mysql2/redis queries are traced
97
+ });
98
+ app.listen(3000);`,fastify:`// instrument.ts: loaded first with node --import ./instrument.ts server.ts
99
+ import { init } from '@obzerver/node';
100
+ init({ serviceId: 'billing' });
101
+
102
+ // server.ts
103
+ import Fastify from 'fastify';
104
+ import { pino } from '@obzerver/node';
105
+
106
+ const app = Fastify({ logger: { ...pino() } }); // optional: forward Fastify's logs
107
+ // Instances are picked up automatically via diagnostics_channel.
108
+ app.get('/invoices/:id', async (req) => invoices.find(req.params.id));
109
+ await app.listen({ port: 3001 });`};return(0,F.jsx)(V,{title:t,right:(0,F.jsx)(Ka,{value:i,onChange:a,options:[{id:`express`,label:`Express`},{id:`fastify`,label:`Fastify`},{id:`zero`,label:`Zero-code`}]}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[!o&&(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-[12.5px] text-ink2`,children:[(0,F.jsx)(Zr,{size:14,className:`text-mute`}),c?(0,F.jsxs)(F.Fragment,{children:[`Use your ingest key (starts with `,(0,F.jsxs)(`span`,{className:`mono`,children:[c.prefix,`…`]}),`), or`]}):(0,F.jsx)(F.Fragment,{children:`You need an ingest key:`}),(0,F.jsx)(`button`,{className:`btn h-7`,onClick:async()=>{s(await N(`/api/keys`,{method:`POST`,json:{name:`setup`,kind:`ingest`}})),r()},children:`Create a new key`})]}),o&&(0,F.jsx)(sz,{k:o,endpoint:u}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-ink2 text-[12px]`,children:`1. Environment`}),(0,F.jsx)(Ga,{text:d,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:d})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsxs)(`span`,{className:`text-ink2 text-[12px]`,children:[`2. `,i===`zero`?`Run`:`Initialise the SDK first`]}),(0,F.jsx)(Ga,{text:f[i],className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:f[i]})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[12px] leading-relaxed`,children:[`Traced automatically: every HTTP request (route templates, middleware & handler timings), thrown and `,(0,F.jsx)(`span`,{className:`mono`,children:`next(err)`}),` errors with source lines, console/pino logs, `,(0,F.jsx)(`span`,{className:`mono`,children:`pg`}),`, `,(0,F.jsx)(`span`,{className:`mono`,children:`mysql2`}),`, `,(0,F.jsx)(`span`,{className:`mono`,children:`ioredis`}),`, BullMQ workers, `,(0,F.jsx)(`span`,{className:`mono`,children:`node-cron`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`cron`}),` jobs, outbound `,(0,F.jsx)(`span`,{className:`mono`,children:`http`}),`/`,(0,F.jsx)(`span`,{className:`mono`,children:`fetch`}),` with `,(0,F.jsx)(`span`,{className:`mono`,children:`traceparent`}),` propagation, CPU/memory/event-loop/GC, and every method of classes in `,(0,F.jsx)(`span`,{className:`mono`,children:`*.service.ts`}),` / `,(0,F.jsx)(`span`,{className:`mono`,children:`*.repository.ts`}),` files. Add other classes with `,(0,F.jsx)(`span`,{className:`mono`,children:`instrument(MyClass)`}),`, any other background function with `,(0,F.jsx)(`span`,{className:`mono`,children:`job('name', fn)`}),`, and business numbers with `,(0,F.jsx)(`span`,{className:`mono`,children:`metrics.counter()`}),`.`]})]})})}function Jz(){let e=L(),t=P(`/api/projects`).data?.find(e=>e.slug===qn()),{data:n,error:r,reload:i}=P(`/api/settings`);return r?(0,F.jsx)(W,{error:r}):n?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(ji,{size:18,className:`text-brand`}),title:`Setup & settings`,sub:`Collector at ${n.endpoint} · data kept for ${n.retentionDays} days${n.passwordProtected?` · dashboard password protected`:``}`,right:(0,F.jsxs)(Nn,{to:e(`/projects`),className:`text-[12px] text-ink2 hover:text-ink`,children:[`Keys and setup for project `,(0,F.jsx)(`b`,{className:`text-ink`,children:t?.name??`…`})]})}),(0,F.jsx)(qz,{}),(0,F.jsx)(lz,{keys:n.keys,endpoint:n.endpoint,ingestRate:n.ingestRate,reload:i}),n.history&&(0,F.jsx)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(Jr,{size:14}),`Long-term history`]}),sub:`hourly roll-ups that outlive raw data; baselines and the assistant learn from them`,children:(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @lg:grid-cols-4 gap-4 text-[12.5px]`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Kept for`}),(0,F.jsxs)(`div`,{className:`font-medium`,children:[n.history.days,` days`]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[`hourly for `,n.history.hourlyDays,` days, then daily`]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Raw data`}),(0,F.jsxs)(`div`,{className:`font-medium`,children:[n.retentionDays,` days`]}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:`traces, spans, logs`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Oldest`}),(0,F.jsx)(`div`,{className:`font-medium`,children:n.history.oldest?Oa(n.history.oldest,!0):`nothing yet`}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:n.history.rolledUntil?(0,F.jsxs)(F.Fragment,{children:[`rolled up to `,(0,F.jsx)(io,{ts:n.history.rolledUntil})]}):`first roll-up within minutes`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Size`}),(0,F.jsx)(`div`,{className:`font-medium`,children:n.history.bytes==null?`—`:Ta(n.history.bytes)}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[n.history.rows.toLocaleString(),` rows · `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_HISTORY_DAYS`})]})]})]})}),(0,F.jsx)(Kz,{})]}):(0,F.jsx)(H,{})}var Yz=(e,t,n)=>`/operations/${e}/${ja(t)}/${ja(n)}`;function Xz(){let e=I(),t=so(),n=L(),r=ht(),{data:i,error:a}=P(`/api/overview${e.q()}`,[e.tick]);if(a)return(0,F.jsx)(W,{error:a});if(!i)return(0,F.jsx)(H,{});if(e.meta&&e.meta.counts.traces===0)return(0,F.jsx)(Qz,{});let o=i.kpis,s=az(i.series.points,i.band),c=oz(i.band),l=[{key:`s2xx`,label:`2xx/3xx`,color:QR[0],type:`bar`,stack:`s`},{key:`s4xx`,label:`4xx`,color:$R.warn,type:`bar`,stack:`s`},{key:`s5xx`,label:`5xx`,color:$R.crit,type:`bar`,stack:`s`},...c?[c.calls]:[]],u=[...c?[c.p95]:[],{key:`p95`,label:`p95`,color:QR[1],type:`line`},{key:`avg`,label:`Average`,color:QR[0],type:`line`}],d=o.usual&&o.usual.requests>=50?o.usual:o.prev&&o.prev.requests>=50?o.prev:null,f=d&&d===o.usual?`vs usual: ${o.usual.description}`:`vs the previous window of the same length`,p=(e,t)=>d&&t!=null?Aa(e,t):null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{title:`Overview`,sub:`${t.length} application${t.length===1?``:`s`} reporting${e.env?` in ${e.env}`:``} · ${d===o.usual&&d?`changes vs ${o.usual.description}`:d?`changes vs the previous window`:`drag across any chart to zoom`}`}),i.fromHistory&&(0,F.jsx)($z,{note:i.fromHistory.note}),i.secrets?.open>0&&(0,F.jsxs)(`button`,{className:`text-left rounded-xl border px-4 py-3 flex items-center gap-3 hover:brightness-110`,style:{borderColor:`#6b2330`,background:`rgba(208,59,59,.12)`},onClick:()=>r(n(`/secrets`)),children:[(0,F.jsx)(Mi,{size:20,className:`shrink-0`,style:{color:`#ff6b6b`}}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1 text-[13px]`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`b`,{style:{color:`#ffb0b0`},children:`Secrets are reaching your logs`}),` `,(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`· `,i.secrets.open,` place`,i.secrets.open===1?``:`s`,` to fix`,i.secrets.inWindow?` · ${B(i.secrets.inWindow)} in this window`:``,` · redacted before storage`]})]}),(0,F.jsx)(`div`,{className:`text-ink2 truncate text-[12px] mt-0.5`,children:i.secrets.top.map(e=>`${e.label} in ${e.source===`error`?`error messages`:`logs`} of ${e.service}${e.operation?` at ${e.operation}`:``}`).join(` · `)})]}),(0,F.jsx)(`span`,{className:`btn h-7 shrink-0`,children:`Review`})]}),i.firing.length>0&&(0,F.jsxs)(`div`,{className:`card px-4 py-2.5 flex items-center gap-3 cursor-pointer`,style:{borderColor:`#5a2328`,background:`rgba(208,59,59,.08)`},onClick:()=>r(n(`/alerts`)),children:[(0,F.jsx)(hr,{size:15,style:{color:$R.crit}}),(0,F.jsxs)(`span`,{className:`font-medium`,children:[i.firing.length,` alert`,i.firing.length>1?`s`:``,` firing:`]}),(0,F.jsx)(`span`,{className:`text-ink2 truncate`,children:i.firing.map(e=>e.name).join(` · `)}),(0,F.jsx)(fr,{size:14,className:`ml-auto text-mute`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @2xl:grid-cols-3 @5xl:grid-cols-6 gap-3`,children:[(0,F.jsx)(Ba,{label:`Requests`,value:B(o.requests),sub:`${B(o.rpm)} rpm`,deltaTitle:f,deltaText:p(o.requests,d?.requests)?.text,deltaDir:p(o.requests,d?.requests)?.dir,badWhen:`none`,spark:s.map(e=>e.count),onClick:()=>r(n(`/requests`))}),(0,F.jsx)(Ba,{label:`Failure rate (5xx)`,value:wa(o.failureRate),sub:`${B(o.failed)} failed · ${B(o.clientErrors)} 4xx`,deltaTitle:f,deltaText:p(o.failureRate,d?.failureRate)?.text,deltaDir:p(o.failureRate,d?.failureRate)?.dir,badWhen:`up`,color:o.failureRate>1?`#ff8a8a`:void 0}),(0,F.jsx)(Ba,{label:`p95 latency`,value:z(o.p95),sub:`p99 ${z(o.p99)}`,deltaTitle:f,deltaText:p(o.p95,d?.p95)?.text,deltaDir:p(o.p95,d?.p95)?.dir,badWhen:`up`}),(0,F.jsx)(Ba,{label:`Average latency`,value:z(o.avg),deltaTitle:f,deltaText:p(o.avg,d?.avg)?.text,deltaDir:p(o.avg,d?.avg)?.dir,badWhen:`up`}),(0,F.jsx)(Ba,{label:`Unhandled errors`,value:B(o.errors),sub:`${i.errorGroups.length} group${i.errorGroups.length===1?``:`s`}`,onClick:()=>r(n(`/errors`)),color:o.errors?`#ff8a8a`:void 0}),(0,F.jsx)(Ba,{label:`Jobs`,value:B(o.jobs),sub:o.jobsFailed?`${B(o.jobsFailed)} failed (${wa(o.jobsFailed/Math.max(1,o.jobs)*100)})`:`no failures`,onClick:()=>r(n(`/jobs`))})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-3`,children:[(0,F.jsx)(rz,{title:`Throughput`,sub:`requests per bucket by status`,series:l,children:(0,F.jsx)(nz,{data:s,series:l,fmt:e=>B(e)})}),(0,F.jsx)(rz,{title:`Latency`,series:u,children:(0,F.jsx)(nz,{data:s,series:u,fmt:e=>z(e)})})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:`Where time goes`,sub:`routes by total time`,pad:!1,right:(0,F.jsx)(`button`,{className:`btn btn-ghost h-6 text-[11.5px]`,onClick:()=>r(n(`/requests?sort=time`)),children:`All routes`}),children:(0,F.jsx)(Zz,{rows:i.topByTime,metric:e=>z(e.totalTime),onRow:e=>r(n(Yz(`http`,e.service,e.name)))})}),(0,F.jsx)(V,{title:`Slowest routes`,sub:`by p95`,pad:!1,right:(0,F.jsx)(`button`,{className:`btn btn-ghost h-6 text-[11.5px]`,onClick:()=>r(n(`/requests?sort=p95`)),children:`All routes`}),children:(0,F.jsx)(Zz,{rows:i.slowest,metric:e=>z(e.p95),onRow:e=>r(n(Yz(`http`,e.service,e.name)))})}),(0,F.jsx)(V,{title:`Unhandled errors`,sub:`by occurrences`,pad:!1,right:(0,F.jsx)(`button`,{className:`btn btn-ghost h-6 text-[11.5px]`,onClick:()=>r(n(`/errors`)),children:`All errors`}),children:i.errorGroups.length===0?(0,F.jsx)(U,{title:`No unhandled errors`,icon:(0,F.jsx)(`span`,{className:`text-[18px]`,children:`✓`}),children:`Nothing escaped a handler in this window.`}):(0,F.jsx)(`div`,{className:`flex flex-col`,children:i.errorGroups.map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-3 px-3.5 py-2 border-b border-[#1d1d26] last:border-0 cursor-pointer hover:bg-[#181821]`,onClick:()=>r(n(`/errors/${e.fingerprint}`)),children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium text-[#ff9b9b]`,children:e.class}),e.isNew&&(0,F.jsx)(G,{kind:`serious`,children:`new`})]}),(0,F.jsx)(`div`,{className:`text-mute truncate text-[12px]`,children:e.message})]}),(0,F.jsx)(Va,{data:e.spark,color:$R.crit,w:56}),(0,F.jsx)(`div`,{className:`text-right tabular-nums w-10`,children:B(e.count)})]},e.fingerprint))})})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(`div`,{className:`@5xl:col-span-2`,children:(0,F.jsx)(rz,{title:`Jobs`,sub:`runs and failures`,series:[{key:`count`,label:`Runs`,color:QR[2]},{key:`failed`,label:`Failed`,color:$R.crit}],children:(0,F.jsx)(nz,{data:i.jobSeries.points,height:150,series:[{key:`count`,label:`Runs`,color:QR[2],type:`area`},{key:`failed`,label:`Failed`,color:$R.crit,type:`line`}],fmt:e=>B(e)})})}),(0,F.jsx)(V,{title:`Instances`,sub:`latest runtime sample`,pad:!1,right:(0,F.jsx)(`button`,{className:`btn btn-ghost h-6 text-[11.5px]`,onClick:()=>r(n(`/profiler`)),children:`Profiler`}),children:(0,F.jsx)(qa,{rows:i.runtime,empty:(0,F.jsx)(U,{title:`No runtime samples yet`}),onRow:()=>r(n(`/profiler`)),cols:[{key:`i`,label:`Instance`,render:e=>(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`truncate`,children:e.service}),(0,F.jsx)(`div`,{className:`text-mute text-[11px] mono truncate`,children:e.instance})]})},{key:`cpu`,label:`CPU`,num:!0,render:e=>wa(e.cpu,0)},{key:`rss`,label:`RSS`,num:!0,render:e=>`${Math.round(e.rss/1048576)}MB`},{key:`el`,label:`Loop p99`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:e.elP99>100?$R.serious:void 0},children:z(e.elP99)})},{key:`ts`,label:`Seen`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(io,{ts:e.ts})})}]})})]})]})}function Zz({rows:e,metric:t,onRow:n}){return e.length?(0,F.jsx)(`div`,{className:`flex flex-col`,children:e.map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-3 px-3.5 py-2 border-b border-[#1d1d26] last:border-0 cursor-pointer hover:bg-[#181821]`,onClick:()=>n(e),children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(Wa,{name:e.name}),(0,F.jsxs)(`div`,{className:`text-mute text-[11px] pl-[44px]`,children:[e.service,` · `,B(e.calls),` calls`]})]}),(0,F.jsx)(`div`,{className:`tabular-nums font-medium`,children:t(e)})]},e.service+e.name))}):(0,F.jsx)(U,{title:`No requests in this window`})}function Qz({simple:e}){return(0,F.jsxs)(`div`,{className:`max-w-3xl mx-auto py-6 flex flex-col gap-4`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-tight`,children:e?`Let's connect your app`:`Waiting for your first request`}),(0,F.jsx)(`p`,{className:`text-ink2 mt-1`,children:e?`Two steps: add the environment variables below, then start your app with the SDK. Visit a few pages and this screen turns into a health check within seconds.`:`Add the SDK to an Express or Fastify app and send it some traffic. Requests, errors, logs and traces show up here within seconds. No spans to wire by hand.`})]}),(0,F.jsx)(qz,{initial:e?`zero`:void 0}),(0,F.jsxs)(`div`,{className:`text-mute text-[12.5px]`,children:[`Just exploring? Run `,(0,F.jsx)(`span`,{className:`mono text-ink2`,children:`npx obzerver seed`}),` to load 24 hours of demo telemetry.`]})]})}function $z({note:e}){return(0,F.jsxs)(`div`,{className:`card px-4 py-2 text-[12px] text-ink2 flex items-center gap-2`,style:{borderColor:`#2b3a55`,background:`rgba(57,135,229,.06)`},children:[(0,F.jsx)(Jr,{size:14,className:`text-[#7fb2f0] shrink-0`}),e]})}function eB({kind:e}){let t=I(),n=L(),r=ht(),[i,a]=(0,v.useState)(``),[o,s]=zn(),c=[`calls`,`rpm`,`avg`,`p95`,`fail`,`time`,`last`,`qw`,`name`,`service`].includes(o.get(`sort`)||``)?o.get(`sort`):`calls`,{data:l,error:u}=P(`/api/operations${t.q({kind:e})}`,[t.tick,e]),d=P(`/api/overview${t.q()}`,[t.tick]),f=e===`job`,p=e=>no.includes(e.method||e.name.split(` `)[0]),m=(l||[]).filter(p).length,h=f?null:o.get(`tab`)===`graphql`?`graphql`:`http`,g=h===`graphql`,_=l&&h?l.filter(e=>p(e)===g):l,y=!f&&m>0,b=P(y?`/api/operations/series${t.q({protocol:h})}`:null,[t.tick,h,y]),x=(o.get(`method`)||``).split(`,`).filter(Boolean),S=e=>{let t=o.get(e);return t===null||t===``||!Number.isFinite(Number(t))?null:Number(t)},C=S(`avgMin`),w=S(`avgMax`),T=S(`callsMin`),E=S(`callsMax`),D=e=>s(()=>{let t=new URLSearchParams(window.location.search);for(let[n,r]of Object.entries(e))r===null||r===``?t.delete(n):t.set(n,r);return t},{replace:!0}),O=(e,t)=>D({[e]:t}),k=e=>e.method||(e.name.includes(` `)?e.name.slice(0,e.name.indexOf(` `)):``),A=g?no:[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],j=[...A,...[...new Set((_||[]).map(k).filter(Boolean))].filter(e=>!A.includes(e)).sort()],ee=x.length>0||C!=null||w!=null||T!=null||E!=null,te=(_||[]).filter(e=>(!i||e.name.toLowerCase().includes(i.toLowerCase())||e.service.toLowerCase().includes(i.toLowerCase()))&&(!x.length||x.includes(k(e)))&&(C==null||(e.avg??0)>=C)&&(w==null||(e.avg??0)<=w)&&(T==null||e.calls>=T)&&(E==null||e.calls<=E)),ne=Math.max(1,...te.map(e=>e.totalTime)),re=d.data&&!y?f?d.data.jobBand:d.data.band:null,ie=y?(b.data?.points||[]).map(e=>({...e,ok:e.count-e.failed})):d.data?az((f?d.data.jobSeries:d.data.series).points,re):[],ae=oz(re),oe=new Set((_||[]).map(e=>e.service)),se=(t.meta?.versions||[]).filter(e=>(t.service?e.service===t.service:oe.has(e.service))&&e.first>t.from&&e.first<t.to).map(e=>({t:e.first,label:t.service?e.version:`${e.service}@${e.version}`})),ce=g?[{key:`ok`,label:`Succeeded`,color:QR[0],type:`bar`,stack:`g`},{key:`failed`,label:`Failed (resolver errors)`,color:$R.crit,type:`bar`,stack:`g`}]:f?[{key:`count`,label:`Runs`,color:QR[2],type:`bar`,stack:`a`},{key:`failed`,label:`Failed`,color:$R.crit,type:`bar`,stack:`a`}]:[{key:`s2xx`,label:`2xx/3xx`,color:QR[0],type:`bar`,stack:`s`},{key:`s4xx`,label:`4xx`,color:$R.warn,type:`bar`,stack:`s`},{key:`s5xx`,label:`5xx`,color:$R.crit,type:`bar`,stack:`s`}];ae&&ce.push(ae.calls);let le=f?[{key:`p95`,label:`Duration p95`,color:QR[1],type:`line`},{key:`queueWaitP95`,label:`Queue wait p95`,color:QR[6],type:`line`}]:[{key:`p95`,label:`p95`,color:QR[1],type:`line`},{key:`avg`,label:`Average`,color:QR[0],type:`line`}];return ae&&le.unshift({...ae.p95,label:f?`Normal duration p95`:`Normal p95`}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:f?(0,F.jsx)(qi,{size:18,className:`text-brand`}):(0,F.jsx)(lr,{size:18,className:`text-brand`}),title:f?`Jobs`:`Requests`,sub:f?`Queue consumers (BullMQ) and cron runs, with queue wait, attempts and failures.`:g?`Every GraphQL operation, by its name (anonymous ones by their root fields). A resolver that throws fails the request even when HTTP says 200.`:`Every HTTP route, by its route template. Click a route to see its executions.`}),h&&(0,F.jsx)(`div`,{className:`flex gap-2 -mt-3`,role:`tablist`,"aria-label":`Request type`,children:[[`http`,`HTTP`,Kr,l?l.length-m:null],[`graphql`,`GraphQL`,yr,l?m:null]].map(([e,t,n,r])=>(0,F.jsxs)(`button`,{role:`tab`,"aria-selected":h===e,onClick:()=>D({tab:e===`http`?null:e,method:null}),className:`group flex items-center gap-2 h-9 px-3 rounded-lg border text-[13px] font-semibold transition-colors ${h===e?`border-brand/60 bg-[rgba(255,61,127,.08)] text-ink cursor-default`:`border-line text-ink2 cursor-pointer hover:bg-[#1b1b25] hover:border-line2 hover:text-ink`}`,children:[(0,F.jsx)(n,{size:14,className:h===e?`text-brand`:`text-mute`}),t,r!=null&&(0,F.jsx)(`span`,{className:`text-[11px] font-medium px-1.5 rounded-full tabular-nums ${h===e?`bg-[rgba(255,61,127,.18)] text-ink`:`bg-[#1d1d27] text-mute group-hover:bg-[#2a2a37] group-hover:text-ink2`}`,children:r})]},e))}),_?.[0]?.fromHistory&&(0,F.jsx)($z,{note:`This window reaches past the raw data, so routes come from hourly summaries (latency within ~5%). Executions and traces are only kept for the raw-data period.`}),ie.length>0&&!(g&&!m)&&(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-3`,children:[(0,F.jsx)(rz,{title:f?`Runs`:`Throughput`,series:ce,children:(0,F.jsx)(nz,{data:ie,series:ce,height:150,fmt:e=>B(e),markers:se})}),(0,F.jsx)(rz,{title:f?`Duration & queue wait`:`Latency`,series:le,children:(0,F.jsx)(nz,{data:ie,series:le,height:150,fmt:e=>z(e),markers:se})})]}),(0,F.jsxs)(V,{pad:!1,title:`${te.length}${ee&&_?` of ${_.length}`:``} ${f?`job`:g?`operation`:`route`}${(ee?_?.length:te.length)===1?``:`s`}`,right:(0,F.jsx)(tB,{q:i,setQ:a,ops:_||[],label:f?`jobs`:g?`operations`:`routes`,onPick:t=>r(n(Yz(e,t.service,t.name)))}),children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-5 gap-y-2 px-4 pt-3 pb-1 text-[12px]`,children:[!f&&j.length>0&&(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute`,children:g?`Type`:`Method`}),(0,F.jsxs)(`div`,{className:`seg`,children:[(0,F.jsx)(`button`,{className:x.length?``:`on`,onClick:()=>O(`method`,null),children:`All`}),j.map(e=>(0,F.jsx)(`button`,{className:`mono font-semibold ${x.includes(e)?`on`:``}`,style:{color:to[e]||void 0},onClick:()=>O(`method`,(x.includes(e)?x.filter(t=>t!==e):[...x,e]).join(`,`)||null),children:e},e))]})]}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-5 gap-y-2 ml-auto`,children:[(0,F.jsx)(nB,{label:`Mean duration`,unit:`ms`,min:C,max:w,onChange:(e,t)=>D({avgMin:e,avgMax:t})}),(0,F.jsx)(nB,{label:f?`Runs`:`Calls`,min:T,max:E,onChange:(e,t)=>D({callsMin:e,callsMax:t})}),ee&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7 text-[12px]`,onClick:()=>D({method:null,avgMin:null,avgMax:null,callsMin:null,callsMax:null}),children:[(0,F.jsx)(Ji,{size:12}),`Clear filters`]})]})]}),(0,F.jsx)(`div`,{className:`pt-2`,children:u?(0,F.jsx)(W,{error:u}):_?(0,F.jsx)(qa,{rows:te,paged:!0,resetKey:`${h}|${i}|${o.get(`method`)}|${o.get(`avgMin`)}|${o.get(`avgMax`)}|${o.get(`callsMin`)}|${o.get(`callsMax`)}|${t.service}|${t.env}`,initialSort:c,initialDir:c===`name`||c===`service`?`asc`:`desc`,onRow:t=>r(n(Yz(e,t.service,t.name))),rowKey:e=>e.service+e.name,noun:f?`jobs`:g?`operations`:`routes`,empty:_.length>0?(0,F.jsx)(U,{title:`No ${f?`jobs`:g?`operations`:`routes`} match the filters`,children:`Change or clear the filters above to see more.`}):g?(0,F.jsx)(U,{title:`No GraphQL operations in this window`,children:`Nothing to set up: the SDK names each request after its operation with Apollo Server, Mercurius, graphql-yoga or graphql-http (graphql-js 16 or 17).`}):(0,F.jsx)(U,{title:f?`No jobs in this window`:`No requests in this window`,children:f?`Wrap processors with obzerver.bullmq(), obzerver.job() or obzerver.cron().`:`Send some traffic to an instrumented app.`}),cols:[{key:`name`,label:f?`Job`:g?`Operation`:`Route`,sort:e=>e.name,render:e=>(0,F.jsx)(`div`,{className:`min-w-0`,children:(0,F.jsx)(Wa,{name:e.name})})},{key:`service`,label:`Application`,sort:e=>e.service,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.service})},...f?[{key:`queue`,label:`Queue`,sort:e=>e.queue||``,render:e=>(0,F.jsx)(`span`,{className:`pill`,children:e.queue||`default`})}]:[],{key:`spark`,label:`Volume`,render:e=>(0,F.jsx)(Va,{data:e.spark,color:QR[0],w:64,h:18})},{key:`calls`,label:f?`Runs`:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`rpm`,label:`Per min`,num:!0,sort:e=>e.rpm,render:e=>B(e.rpm)},{key:`avg`,label:`Avg`,num:!0,sort:e=>e.avg,render:e=>z(e.avg)},{key:`p95`,label:`p95`,num:!0,sort:e=>e.p95,render:e=>z(e.p95)},...f?[{key:`qw`,label:`Wait p95`,num:!0,sort:e=>e.queueWaitP95||0,render:e=>(0,F.jsx)(`span`,{style:{color:e.queueWaitP95>1e3?$R.serious:void 0},children:z(e.queueWaitP95)})}]:[],{key:`fail`,label:`Failure`,num:!0,sort:e=>e.failureRate,render:e=>(0,F.jsx)(`span`,{style:{color:e.failureRate>=5?`#ff7070`:e.failureRate>1?`#ffb38a`:e.failureRate>0?`var(--color-ink2)`:`var(--color-mute)`},children:wa(e.failureRate)})},{key:`time`,label:`Total time`,num:!0,sort:e=>e.totalTime,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`inline-block min-w-[52px]`,children:z(e.totalTime)}),(0,F.jsx)(Qa,{value:e.totalTime,max:ne,w:50})]})},{key:`last`,label:`Last`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(io,{ts:e.lastSeen})})}]},c):(0,F.jsx)(H,{})})]})]})}function tB({q:e,setQ:t,ops:n,label:r,onPick:i}){let[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(-1),l=e.trim().toLowerCase(),u=l?n.filter(e=>e.name.toLowerCase().includes(l)||e.service.toLowerCase().includes(l)).sort((e,t)=>t.calls-e.calls).slice(0,8):[],d=a&&u.length>0,f=e=>{let t=e.toLowerCase().indexOf(l);return!l||t<0?e:(0,F.jsxs)(F.Fragment,{children:[e.slice(0,t),(0,F.jsx)(`mark`,{className:`bg-transparent text-brand`,children:e.slice(t,t+l.length)}),e.slice(t+l.length)]})},p=e=>{o(!1),c(-1),i(e)};return(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Oi,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input pl-8 w-[240px] h-7`,placeholder:`Filter…`,value:e,role:`combobox`,"aria-expanded":d,"aria-controls":`route-suggestions`,"aria-autocomplete":`list`,"aria-activedescendant":d&&s>=0?`route-suggestion-${s}`:void 0,onChange:e=>{t(e.target.value),o(!0),c(-1)},onFocus:()=>o(!0),onBlur:()=>setTimeout(()=>o(!1),120),onKeyDown:e=>{e.key===`Escape`?o(!1):d?e.key===`ArrowDown`?(c((s+1)%u.length),e.preventDefault()):e.key===`ArrowUp`?(c(s<=0?u.length-1:s-1),e.preventDefault()):e.key===`Enter`&&s>=0&&(p(u[s]),e.preventDefault()):e.key===`ArrowDown`&&u.length&&(o(!0),c(0),e.preventDefault())}}),d&&(0,F.jsx)(`ul`,{id:`route-suggestions`,role:`listbox`,"aria-label":`Matching ${r}`,className:`absolute right-0 top-[calc(100%+4px)] z-30 w-[420px] max-w-[80vw] rounded-lg border border-line2 bg-panel2 shadow-xl py-1 text-[12.5px]`,children:u.map((e,t)=>(0,F.jsxs)(`li`,{id:`route-suggestion-${t}`,role:`option`,"aria-selected":t===s,className:`flex items-center gap-3 px-3 h-8 cursor-pointer ${t===s?`bg-[#22222d]`:`hover:bg-[#1b1b25]`}`,onMouseDown:t=>{t.preventDefault(),p(e)},onMouseEnter:()=>c(t),children:[(0,F.jsx)(`div`,{className:`min-w-0 flex-1 truncate`,children:(0,F.jsx)(Wa,{name:e.name,render:f})}),(0,F.jsx)(`span`,{className:`text-mute shrink-0`,children:f(e.service)}),(0,F.jsx)(`span`,{className:`text-mute tabular-nums shrink-0 w-[64px] text-right`,children:B(e.calls)})]},e.service+e.name))})]})}function nB({label:e,unit:t,min:n,max:r,onChange:i}){let a=(t,a)=>(0,F.jsx)(`input`,{className:`input h-7 w-[76px] mono text-[12px] px-2`,type:`number`,min:0,inputMode:`numeric`,placeholder:a===`min`?`min`:`max`,"aria-label":`${e} ${a}`,value:t??``,onChange:e=>a===`min`?i(e.target.value||null,r==null?null:String(r)):i(n==null?null:String(n),e.target.value||null)});return(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`text-mute mr-0.5`,children:e}),(0,F.jsx)(`span`,{className:`text-mute`,children:`≥`}),a(n,`min`),(0,F.jsx)(`span`,{className:`text-mute`,children:`≤`}),a(r,`max`),t&&(0,F.jsx)(`span`,{className:`text-mute`,children:t})]})}var rB={request:{color:`#3987e5`,label:`Request`,Icon:Ai},job:{color:`#3987e5`,label:`Job`,Icon:qi},middleware:{color:`#9085e9`,label:`Middleware`,Icon:Qr},handler:{color:`#199e70`,label:`Handler`,Icon:Yi},function:{color:`#d55181`,label:`Function`,Icon:_r},custom:{color:`#c98500`,label:`Custom span`,Icon:Lr},db:{color:`#d95926`,label:`Database`,Icon:Br},http:{color:`#e66767`,label:`Outbound HTTP`,Icon:Kr},graphql:{color:`#e86fc4`,label:`GraphQL operation`,Icon:yr},resolver:{color:`#b48af0`,label:`Resolver`,Icon:fi}},iB=/\b(SELECT|FROM|WHERE|AND|OR|ORDER BY|GROUP BY|HAVING|LIMIT|OFFSET|INSERT INTO|VALUES|UPDATE|SET|DELETE FROM|LEFT JOIN|RIGHT JOIN|INNER JOIN|JOIN|ON|RETURNING|UNION)\b/g;function aB({text:e}){let t=e.replace(iB,`
110
+ $1`).trim().split(`
111
+ `);return(0,F.jsx)(`div`,{className:`code !whitespace-pre-wrap`,children:t.map((e,t)=>{let n=/^(SELECT|FROM|WHERE|AND|OR|ORDER BY|GROUP BY|HAVING|LIMIT|OFFSET|INSERT INTO|VALUES|UPDATE|SET|DELETE FROM|LEFT JOIN|RIGHT JOIN|INNER JOIN|JOIN|ON|RETURNING|UNION)\b(.*)$/.exec(e),r=n?n[1]:``,i=n?n[2]:e,a=[`AND`,`OR`,`ON`].includes(r)?` `:``;return(0,F.jsxs)(`div`,{children:[a,r&&(0,F.jsx)(`span`,{style:{color:`#ff6b9d`},children:r}),i.split(/(\?)/).map((e,t)=>e===`?`?(0,F.jsx)(`span`,{className:`px-[3px] rounded`,style:{background:`rgba(201,133,0,.25)`,color:`#ffc85a`},children:`?`},t):(0,F.jsx)(v.Fragment,{children:e},t))]},t)})})}function oB(e){let t=new Map;for(let n of e){let e=n.parentId??null;t.has(e)||t.set(e,[]),t.get(e).push(n)}for(let e of t.values())e.sort((e,t)=>e.start-t.start);let n=[],r=(e,i)=>{for(let a of t.get(e)||[])n.push({s:a,depth:i,hasKids:(t.get(a.id)||[]).length>0}),r(a.id,i+1)};return r(null,0),n}function sB({spans:e,logs:t=[],highlightSelf:n=!0}){let r=(0,v.useMemo)(()=>oB(e),[e]),i=Math.max(1,...e.map(e=>e.start+e.duration)),[a,o]=(0,v.useState)(new Set),[s,c]=(0,v.useState)(null),l=new Set(e.map(e=>e.service).filter(Boolean)).size>1,u=Math.max(...e.filter(e=>!e.root).map(e=>e.self),0),d=new Set,f=r.filter(({s:e})=>e.parentId&&(d.has(e.parentId)||a.has(e.parentId))?(d.add(e.id),!1):!0),p=[0,.25,.5,.75,1],m=[...new Set(e.map(e=>e.kind))].filter(e=>rB[e]);return(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1 text-[11.5px] text-ink2 mb-2 px-1`,children:[m.map(e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-sm`,style:{background:rB[e].color}}),rB[e].label]},e)),(0,F.jsx)(`span`,{className:`ml-auto text-mute`,children:`Bar = total time · bright segment = self time`})]}),(0,F.jsxs)(`div`,{className:`grid text-[12px]`,style:{gridTemplateColumns:`minmax(260px, 38%) 1fr 72px 72px`},children:[(0,F.jsx)(`div`,{className:`text-mute text-[10.5px] uppercase tracking-wider px-2 py-1.5 border-b border-line`,children:`Span`}),(0,F.jsxs)(`div`,{className:`relative border-b border-line`,children:[p.map(e=>(0,F.jsx)(`span`,{className:`absolute top-1.5 text-[10px] text-mute -translate-x-1/2`,style:{left:`${e*100}%`,transform:e===1?`translateX(-100%)`:e===0?`none`:void 0},children:z(i*e)},e)),t.map((e,t)=>(0,F.jsx)(`span`,{title:`${e.level.toUpperCase()} ${e.message}`,className:`absolute bottom-0 w-[2px] h-2 rounded`,style:{left:`${Math.min(100,Math.max(0,(e.offset??0)/i)*100)}%`,background:e.level===`error`?`#d03b3b`:e.level===`warn`?`#fab219`:`#82829a`}},t))]}),(0,F.jsx)(`div`,{className:`text-mute text-[10.5px] uppercase tracking-wider px-2 py-1.5 border-b border-line text-right`,children:`Total`}),(0,F.jsx)(`div`,{className:`text-mute text-[10.5px] uppercase tracking-wider px-2 py-1.5 border-b border-line text-right`,children:`Self`}),f.map(({s:e,depth:t,hasKids:r})=>{let d=rB[e.kind]||rB.function,f=e.start/i*100,m=Math.max(.3,e.duration/i*100),h=e.duration?Math.max(0,Math.min(1,e.self/e.duration)):0,g=n&&!e.root&&e.self===u&&u>0,_=s===e.id;return(0,F.jsxs)(v.Fragment,{children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-[5px] border-b border-[#1c1c25] cursor-pointer min-w-0 ${_?`bg-[#1a1a24]`:`hover:bg-[#16161e]`}`,style:{paddingLeft:8+t*14},onClick:()=>c(_?null:e.id),children:[r?(0,F.jsx)(`button`,{className:`text-mute hover:text-ink shrink-0`,onClick:t=>{t.stopPropagation();let n=new Set(a);n.has(e.id)?n.delete(e.id):n.add(e.id),o(n)},children:a.has(e.id)?(0,F.jsx)(Or,{size:13}):(0,F.jsx)(Er,{size:13})}):(0,F.jsx)(`span`,{className:`w-[13px] shrink-0`}),(0,F.jsx)(d.Icon,{size:12,style:{color:d.color},className:`shrink-0`}),(0,F.jsx)(`span`,{className:`truncate ${e.kind===`db`?`mono text-[11.5px]`:``}`,title:e.name,children:e.name}),e.count&&e.count>1&&(0,F.jsxs)(`span`,{className:`pill !text-[10px] !py-0`,style:{color:`#ffc85a`,borderColor:`#5a4512`},children:[`×`,e.count]}),l&&e.root&&e.service&&(0,F.jsx)(`span`,{className:`pill !text-[10px] !py-0`,children:e.service}),e.error&&(0,F.jsx)(Ui,{size:12,className:`shrink-0`,style:{color:`#ff7070`}}),g&&(0,F.jsx)(`span`,{className:`pill !text-[10px] !py-0`,style:{color:`#ffb38a`,borderColor:`#5a3322`},children:`most self time`})]}),(0,F.jsxs)(`div`,{className:`relative border-b border-[#1c1c25] cursor-pointer`,onClick:()=>c(_?null:e.id),children:[p.slice(1,-1).map(e=>(0,F.jsx)(`span`,{className:`absolute top-0 bottom-0 w-px bg-[#1c1c26]`,style:{left:`${e*100}%`}},e)),(0,F.jsx)(`div`,{className:`absolute top-1/2 -translate-y-1/2 h-[12px] rounded-[3px] overflow-hidden flex`,style:{left:`${f}%`,width:`${m}%`,background:`color-mix(in srgb, ${d.color} 32%, transparent)`,outline:e.error?`1.5px solid #ff5a5a`:void 0},children:(0,F.jsx)(`div`,{className:`h-full ml-auto`,style:{width:`${h*100}%`,background:d.color}})})]}),(0,F.jsx)(`div`,{className:`num px-2 py-[5px] border-b border-[#1c1c25] tabular-nums`,children:z(e.duration)}),(0,F.jsx)(`div`,{className:`num px-2 py-[5px] border-b border-[#1c1c25] tabular-nums`,style:{color:g?`#ffb38a`:`var(--color-ink2)`},children:z(e.self)}),_&&(0,F.jsx)(`div`,{className:`col-span-4 bg-[#111118] border-b border-line px-4 py-3`,style:{paddingLeft:24+t*14},children:(0,F.jsx)(cB,{s:e})})]},e.id)})]})]})}function cB({s:e}){let t=e.attrs||{},n=Object.entries(t).filter(([e])=>![`statement`,`system`,`url`,`collapsed`,`totalMs`].includes(e));return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2.5 text-[12px]`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-x-5 gap-y-1 text-ink2`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Kind`}),` `,rB[e.kind]?.label||e.kind]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Starts at`}),` +`,z(e.start)]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Total`}),` `,z(e.duration)]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Self`}),` `,z(e.self)]}),e.count&&e.count>1&&(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Repeated`}),` `,e.count,`× (collapsed; `,z(t.totalMs),` combined)`]}),t.system&&(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`System`}),` `,t.system]}),e.service&&(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Service`}),` `,e.service]})]}),e.error&&(0,F.jsxs)(`div`,{className:`text-[#ff9b9b] flex items-center gap-1.5`,children:[(0,F.jsx)(Ui,{size:13}),e.error]}),t.statement&&t.system!==`redis`&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Statement (values removed before sending)`}),(0,F.jsx)(Ga,{text:t.statement,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(aB,{text:t.statement})]}),t.url&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`URL`}),` `,(0,F.jsxs)(`span`,{className:`mono`,children:[t.method,` `,t.url]}),t.status&&(0,F.jsx)(`span`,{className:`ml-2 mono`,style:{color:t.status>=500?`#ff7070`:`#5fd38a`},children:t.status})]}),n.length>0&&(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(([e,t])=>(0,F.jsxs)(`span`,{className:`pill mono !text-[11px]`,children:[(0,F.jsx)(`span`,{className:`text-mute`,children:e}),`\xA0`,typeof t==`object`?JSON.stringify(t):String(t)]},e))})]})}function lB(){let{kind:e=`http`,service:t=``,name:n=``}=yt(),r=I(),i=L(),a=ht(),[o,s]=(0,v.useState)(`recent`),[c,l]=(0,v.useState)(`all`),[u,d]=(0,v.useState)(0),{data:f,error:p}=P(`/api/operation${r.q({kind:e,name:n,service:t,sort:o,filter:c,limit:50,offset:u*50})}`,[r.tick]),m=e===`job`;if(p)return(0,F.jsx)(W,{error:p});if(!f)return(0,F.jsx)(H,{});let h=f.stats,g=az(f.series.points,f.band),_=oz(f.band),y=(r.meta?.versions||[]).filter(e=>e.service===t&&e.first>r.from&&e.first<r.to).map(e=>({t:e.first,label:e.version})),b=[..._?[_.p95]:[],{key:`p95`,label:`p95`,color:QR[1],type:`line`},{key:`avg`,label:`Average`,color:QR[0],type:`line`},{key:`p50`,label:`Median`,color:QR[2],type:`line`,dashed:!0}],x=[{key:`count`,label:m?`Runs`:`Calls`,color:QR[0],type:`area`},{key:`failed`,label:`Failed`,color:$R.crit,type:`line`},..._?[_.calls]:[]],S=Math.max(1,...f.breakdown.map(e=>e.avgSelf)),C=Object.entries(f.statuses).sort((e,t)=>t[1]-e[1]);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsxs)(Nn,{to:i(m?`/jobs`:`/requests`),className:`text-mute hover:text-ink text-[12px] inline-flex items-center gap-1 -mb-2`,children:[(0,F.jsx)(Dr,{size:13}),m?`Jobs`:`Requests`]}),(0,F.jsx)(Ra,{title:(0,F.jsx)(Wa,{name:n}),sub:(0,F.jsxs)(`span`,{children:[t,` · `,m?`background job`:`HTTP route`]})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-6 gap-3`,children:[(0,F.jsx)(Ba,{label:m?`Runs`:`Calls`,value:B(h.calls),sub:`${B(h.rpm)} per min`,spark:g.map(e=>e.count)}),(0,F.jsx)(Ba,{label:`Failure rate`,value:wa(h.failureRate),sub:`${B(h.failed)} failed`,color:h.failureRate>1?`#ff8a8a`:void 0}),(0,F.jsx)(Ba,{label:`Average`,value:z(h.avg)}),(0,F.jsx)(Ba,{label:`p50`,value:z(h.p50)}),(0,F.jsx)(Ba,{label:`p95`,value:z(h.p95),sub:`p99 ${z(h.p99)}`}),(0,F.jsx)(Ba,{label:`Max`,value:z(h.max)})]}),f.fromHistory&&(0,F.jsx)($z,{note:f.fromHistory.note}),(0,F.jsx)(uB,{usual:f.usual,current:h,windowMin:(r.to-r.from)/6e4}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-3`,children:[(0,F.jsx)(rz,{title:m?`Runs`:`Throughput`,series:x,children:(0,F.jsx)(nz,{data:g,series:x,fmt:e=>B(e),markers:y})}),(0,F.jsx)(rz,{title:`Latency`,sub:`is it constant or spiky? did it start at a deploy?`,series:b,children:(0,F.jsx)(nz,{data:g,series:b,fmt:e=>z(e),markers:y})})]}),m&&(0,F.jsx)(rz,{title:`Queue wait`,sub:`time from enqueue to start`,series:[{key:`queueWaitP95`,label:`p95`,color:QR[6]},{key:`queueWaitAvg`,label:`Average`,color:QR[0]}],children:(0,F.jsx)(nz,{data:g,height:140,series:[{key:`queueWaitP95`,label:`p95`,color:QR[6],type:`line`},{key:`queueWaitAvg`,label:`Average`,color:QR[0],type:`line`}],fmt:e=>z(e)})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:`Where the time goes`,sub:`own time per span, averaged per execution`,pad:!1,className:`@5xl:col-span-2`,children:(0,F.jsx)(qa,{rows:f.breakdown,empty:(0,F.jsx)(U,{title:`No span detail yet`,children:`Spans are kept for sampled, failed and slow executions.`}),cols:[{key:`n`,label:`Span`,render:e=>{let t=rB[e.kind]||rB.function;return(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2 min-w-0`,children:[(0,F.jsx)(t.Icon,{size:12,style:{color:t.color}}),(0,F.jsx)(`span`,{className:`truncate ${e.kind===`db`?`mono text-[11.5px]`:``}`,children:e.name})]})}},{key:`k`,label:`Kind`,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:rB[e.kind]?.label||e.kind})},{key:`per`,label:`Calls / exec`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:e.perExec>=10?$R.serious:void 0},children:B(e.perExec)})},{key:`self`,label:`Self / exec`,num:!0,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`inline-block min-w-[52px]`,children:z(e.avgSelf)}),(0,F.jsx)(Qa,{value:e.avgSelf,max:S,color:QR[1],w:60})]})}]})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(V,{title:`Latency distribution`,children:(0,F.jsx)(iz,{data:f.histogram,highlight:e=>h.p95!=null&&e.le>=h.p95})}),(0,F.jsx)(V,{title:m?`Outcomes`:`Status codes`,children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:C.map(([e,t])=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Ha,{status:e===`none`?null:Number(e)}),(0,F.jsx)(`span`,{className:`tabular-nums text-ink2`,children:B(t)})]},e))})})]})]}),f.errors.length>0&&(0,F.jsx)(V,{title:`Errors on this operation`,pad:!1,children:(0,F.jsx)(qa,{rows:f.errors,onRow:e=>a(i(`/errors/${e.fingerprint}`)),cols:[{key:`c`,label:`Error`,render:e=>(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`font-medium`,style:{color:e.handled?`var(--color-ink)`:`#ff9b9b`},children:e.class}),` `,(0,F.jsx)(`span`,{className:`text-mute`,children:e.message})]})},{key:`h`,label:`Type`,render:e=>e.handled?(0,F.jsx)(G,{kind:`neutral`,children:`handled`}):(0,F.jsx)(G,{kind:`crit`,children:`unhandled`})},{key:`n`,label:`Count`,num:!0,render:e=>B(e.n)}]})}),(0,F.jsx)(V,{pad:!1,title:`Executions`,sub:`${B(f.total)} matching`,right:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(Ka,{value:c,onChange:e=>{l(e),d(0)},options:[{id:`all`,label:`All`},{id:`failed`,label:`Failed`},{id:`slow`,label:`≥ p95`}]}),(0,F.jsx)(Ka,{value:o,onChange:e=>{s(e),d(0)},options:[{id:`recent`,label:`Recent`},{id:`slowest`,label:`Slowest`}]})]}),children:(0,F.jsxs)(`div`,{className:`pt-2`,children:[(0,F.jsx)(qa,{rows:f.executions,onRow:e=>a(i(`/executions/${e.id}`)),empty:(0,F.jsx)(U,{title:`No executions match`}),cols:[{key:`ts`,label:`Time`,render:e=>(0,F.jsxs)(`span`,{className:`tabular-nums`,children:[Oa(e.ts,r.rangeMs>864e5),(0,F.jsx)(`span`,{className:`text-mute ml-2 text-[11px]`,children:(0,F.jsx)(io,{ts:e.ts})})]})},{key:`st`,label:`Status`,render:e=>(0,F.jsx)(Ha,{status:e.status})},{key:`d`,label:`Duration`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:h.p95&&e.duration>=h.p95?`#ffb38a`:void 0},children:z(e.duration)})},...m?[{key:`qw`,label:`Queue wait`,num:!0,render:e=>z(e.queue_wait)},{key:`at`,label:`Attempt`,num:!0,render:e=>e.attempt??`—`}]:[],{key:`u`,label:`User`,render:e=>e.user_id?(0,F.jsx)(Nn,{className:`link`,onClick:e=>e.stopPropagation(),to:i(`/users/${ja(e.user_id)}`),children:e.user_id}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})},{key:`v`,label:`Release`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px] text-ink2`,children:e.version||`—`})},{key:`err`,label:`Error`,render:e=>e.error_class?(0,F.jsxs)(`span`,{className:`truncate inline-block max-w-[320px] align-middle`,children:[(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:e.error_class}),` `,(0,F.jsx)(`span`,{className:`text-mute`,children:e.error_message})]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})}]}),f.total>50&&(0,F.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-3 py-2 border-t border-line text-mute`,children:[(0,F.jsxs)(`span`,{children:[u*50+1,`–`,Math.min(f.total,(u+1)*50),` of `,B(f.total)]}),(0,F.jsx)(`button`,{className:`btn h-7`,disabled:u===0,onClick:()=>d(u-1),children:`Prev`}),(0,F.jsx)(`button`,{className:`btn h-7`,disabled:(u+1)*50>=f.total,onClick:()=>d(u+1),children:`Next`})]})]})})]})}function uB({usual:e,current:t,windowMin:n}){let r=e?.thisHour,i=e?.last4Weeks;if(!r?.basis&&!i)return null;let a=(e,t)=>e==null||!t?null:e>t.high?`above`:e<t.low?`below`:null,o=n<=120&&t.calls>=20,s=o?a(t.p95,r?.p95):null,c=o?a(t.failureRate,r?.failureRate):null;return(0,F.jsxs)(`div`,{className:`card px-4 py-2.5 flex flex-wrap items-center gap-x-6 gap-y-1.5 text-[12.5px]`,children:[(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Jr,{size:14,className:`text-brand`}),(0,F.jsx)(`b`,{className:`font-medium`,children:`Usual`})]}),r?.basis?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`this hour: p95 `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:z(r.p95?.expected)}),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(normal `,z(r.p95?.low),`–`,z(r.p95?.high),`)`]})]}),(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`failures `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:wa(r.failureRate?.expected??0)})]}),(0,F.jsxs)(`span`,{className:`text-ink2`,children:[(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:B(Math.round(r.callsPerHour?.expected??0))}),` calls/hour`]}),(s||c)&&(0,F.jsx)(G,{kind:`serious`,children:[s&&`p95 ${s} normal`,c&&`failures ${c} normal`].filter(Boolean).join(` · `)})]}):(0,F.jsx)(`span`,{className:`text-mute`,children:r?.description}),i&&(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`last `,Math.round(i.days),` days: p50 `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:z(i.p50)}),` · p95 `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:z(i.p95)}),i.lastWeekVsBeforeP95Pct!=null&&Math.abs(i.lastWeekVsBeforeP95Pct)>=10&&(0,F.jsxs)(`span`,{className:`text-mute`,children:[` · last week p95 `,i.lastWeekVsBeforeP95Pct>0?`+`:``,i.lastWeekVsBeforeP95Pct,`%`]})]}),r?.basis&&(0,F.jsx)(`span`,{className:`text-mute ml-auto text-[11.5px]`,children:r.description})]})}function dB({frames:e,stack:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(!1),o=n?e:e.filter(e=>e.inApp),s=o.length?o:e.slice(0,5);return i&&t?(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,F.jsx)(`div`,{className:`flex justify-end`,children:(0,F.jsx)(`button`,{className:`btn h-6 text-[11px]`,onClick:()=>a(!1),children:`Frames`})}),(0,F.jsx)(`div`,{className:`code text-[11.5px]`,children:t})]}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,F.jsxs)(`label`,{className:`flex items-center gap-1.5 text-[11.5px] text-mute cursor-pointer`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>r(e.target.checked)}),` show library frames`]}),t&&(0,F.jsx)(`button`,{className:`btn h-6 text-[11px]`,onClick:()=>a(!0),children:`Raw`})]}),s.map((e,t)=>(0,F.jsx)(fB,{f:e,open:t===0&&!!e.context},t)),!s.length&&(0,F.jsx)(`div`,{className:`text-mute`,children:`No stack frames captured.`})]})}function fB({f:e,open:t}){let[n,r]=(0,v.useState)(t);return(0,F.jsxs)(`div`,{className:`rounded-lg border ${e.inApp?`border-line2`:`border-line opacity-70`} overflow-hidden`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-center gap-2 px-3 py-1.5 text-left bg-[#15151d] hover:bg-[#191922]`,onClick:()=>r(!n),disabled:!e.context,children:[e.context?n?(0,F.jsx)(Er,{size:13}):(0,F.jsx)(Or,{size:13}):(0,F.jsx)(`span`,{className:`w-[13px]`}),(0,F.jsx)(`span`,{className:`mono text-[12px] font-medium`,children:e.fn}),(0,F.jsxs)(`span`,{className:`mono text-[11.5px] text-mute truncate`,children:[e.rel,`:`,e.line,`:`,e.col]}),e.inApp&&(0,F.jsx)(`span`,{className:`pill !text-[10px] !py-0 ml-auto`,children:`in app`})]}),n&&e.context&&(0,F.jsx)(`div`,{className:`mono text-[12px] bg-[#0b0b0f] py-1.5 overflow-x-auto`,children:e.context.lines.map((t,n)=>{let r=e.context.start+n,i=r===e.line;return(0,F.jsxs)(`div`,{className:`flex whitespace-pre`,style:i?{background:`rgba(208,59,59,.16)`,boxShadow:`inset 2px 0 0 #d03b3b`}:void 0,children:[(0,F.jsx)(`span`,{className:`w-12 text-right pr-3 text-mute select-none shrink-0`,children:r}),(0,F.jsx)(`span`,{style:{color:i?`#ffd0d0`:`#c9c9d6`},children:t||` `})]},n)})})]})}var pB={error:$R.crit,fatal:$R.crit,warn:$R.warn,info:`#5aa2f0`,debug:`#82829a`,trace:`#82829a`};function mB({l:e,offset:t,showService:n}){let r=L();return(0,F.jsxs)(`div`,{className:`flex gap-3 px-3.5 py-[5px] border-b border-[#1b1b23] hover:bg-[#16161e] text-[12px] items-start`,style:e.level===`error`||e.level===`fatal`?{background:`rgba(208,59,59,.05)`}:void 0,children:[(0,F.jsx)(ro,{tip:Da(e.ts),underline:`hover`,className:`mono text-mute shrink-0 text-[11.5px] tabular-nums`,children:t==null?Oa(e.ts):`+${z(Math.max(0,t))}`}),(0,F.jsx)(`span`,{className:`mono shrink-0 w-[42px] text-[11px] font-semibold uppercase`,style:{color:pB[e.level]||`#aaa`},children:e.level}),n&&(0,F.jsx)(`span`,{className:`text-ink2 shrink-0 w-[92px] truncate`,children:e.service}),e.logger&&(0,F.jsxs)(`span`,{className:`text-mute shrink-0 max-w-[120px] truncate`,children:[`[`,e.logger,`]`]}),(0,F.jsxs)(`span`,{className:`mono text-[12px] flex-1 min-w-0 whitespace-pre-wrap break-words text-[#d8d8e2]`,children:[e.message,e.attrs&&(0,F.jsxs)(`span`,{className:`text-mute`,children:[` `,JSON.stringify(e.attrs)]})]}),e.executionId&&t==null&&(0,F.jsx)(Nn,{to:r(`/executions/${e.executionId}`),className:`link shrink-0 text-[11.5px]`,children:`See trace →`})]})}function hB(){let e=I(),[t,n]=zn(),[r,i]=(0,v.useState)(t.get(`q`)||``),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)([]),d=e.q({q:t.get(`q`)||``,level:a.join(`,`),traceId:t.get(`traceId`)||``,limit:300}),{data:f,error:p}=P(`/api/logs${d}`,[e.tick]),m=(0,v.useRef)(0);(0,v.useEffect)(()=>{u([])},[d]),(0,v.useEffect)(()=>{f?.logs?.length&&(m.current=f.logs[0].ts)},[f]),(0,v.useEffect)(()=>{if(!s)return;let n=setInterval(async()=>{let n=await N(`/api/logs?from=${m.current+1||Date.now()-1e4}&to=${Date.now()}&q=${encodeURIComponent(t.get(`q`)||``)}&level=${a.join(`,`)}${e.service?`&service=${e.service}`:``}&limit=200`);n.logs.length&&(m.current=n.logs[0].ts,u(e=>[...n.logs,...e].slice(0,1e3)))},2e3);return()=>clearInterval(n)},[s,a,t,e.service]);let h=[...l,...f?.logs||[]],g=[{key:`error`,label:`Error`,color:$R.crit,type:`bar`,stack:`l`},{key:`warn`,label:`Warn`,color:$R.warn,type:`bar`,stack:`l`},{key:`info`,label:`Info`,color:`#3987e5`,type:`bar`,stack:`l`},{key:`debug`,label:`Debug`,color:`#4a4a5c`,type:`bar`,stack:`l`}],_=e=>o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(Di,{size:18,className:`text-brand`}),title:`Logs`,sub:`Every line is tied to the request or job that wrote it.`}),f&&(0,F.jsx)(`div`,{className:`-mt-4`,children:(0,F.jsx)(rz,{title:`Volume by level`,series:g,children:(0,F.jsx)(nz,{data:f.series,series:g,height:180,fmt:e=>B(e)})})}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsxs)(`form`,{className:`flex items-center gap-2`,onSubmit:e=>{e.preventDefault();let i=new URLSearchParams(t);r?i.set(`q`,r):i.delete(`q`),n(i,{replace:!0})},children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Oi,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input pl-8 w-[320px] h-7`,placeholder:`Search messages… (Enter)`,value:r,onChange:e=>i(e.target.value)})]}),(0,F.jsx)(`div`,{className:`seg`,children:[`error`,`warn`,`info`,`debug`].map(e=>(0,F.jsxs)(`button`,{type:`button`,className:a.includes(e)?`on`:``,onClick:()=>_(e),children:[(0,F.jsx)(`span`,{style:{color:pB[e]},children:`●`}),` `,e]},e))}),t.get(`traceId`)&&(0,F.jsxs)(`span`,{className:`pill`,children:[`trace `,t.get(`traceId`).slice(0,8),`… `,(0,F.jsx)(`button`,{type:`button`,onClick:()=>{let e=new URLSearchParams(t);e.delete(`traceId`),n(e)},children:`✕`})]})]}),right:(0,F.jsxs)(`button`,{className:`btn h-7 ${s?`btn-primary`:``}`,onClick:()=>c(!s),children:[(0,F.jsx)(xi,{size:13}),s?`Tailing…`:`Live tail`]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:p?(0,F.jsx)(W,{error:p}):f?h.length===0?(0,F.jsx)(U,{title:`No logs in this window`,children:`Logs are forwarded from console, pino and obzerver.log() (forwardLogs is on by default).`}):(0,F.jsx)(`div`,{className:`max-h-[calc(100vh-380px)] min-h-[300px] overflow-auto`,children:h.map(e=>(0,F.jsx)(mB,{l:e,showService:!0},e.id))}):(0,F.jsx)(H,{})})})]})}function gB(){let{id:e}=yt(),t=L(),n=ht(),{data:r,error:i}=P(`/api/executions/${e}`,[e]),[a,o]=(0,v.useState)(!1);if(i)return(0,F.jsx)(W,{error:i});if(!r)return(0,F.jsx)(H,{});let s=r.execution,c=r.baseline,l=r.errors.find(e=>!e.handled)||r.errors[0],u=s.ts,d=Math.min(...r.waterfall.spans.filter(e=>e.executionId===s.id).map(e=>e.start)),f=r.logs.map(e=>({...e,offset:e.ts-u+(Number.isFinite(d)?d:0)})),p=r.host,m=p&&p.baseline&&(p.cpu>p.baseline.cpu*1.5&&p.cpu>40||p.elP99>p.baseline.elP99*2&&p.elP99>50),h=s.kind===`http`&&!s.graphql&&!!(s.request?.body||s.request?.bodyShape);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsxs)(Nn,{to:t(Yz(s.kind,s.service,s.name)),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:[`← `,s.name]}),(0,F.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`h1`,{className:`text-[19px] font-semibold tracking-tight`,children:(0,F.jsx)(Wa,{name:s.name})}),(0,F.jsx)(Ha,{status:s.status}),s.failed?(0,F.jsx)(G,{kind:`crit`,children:`failed`}):s.status>=400?(0,F.jsx)(G,{kind:`warn`,children:`client error`}):(0,F.jsx)(G,{kind:`good`,children:`ok`})]}),(0,F.jsxs)(`div`,{className:`text-ink2 mt-1.5 flex flex-wrap gap-x-4 gap-y-1 text-[12.5px]`,children:[(0,F.jsx)(`span`,{children:Oa(s.ts,!0)}),(0,F.jsx)(`span`,{className:`font-medium text-ink`,children:z(s.duration)}),(0,F.jsxs)(`span`,{children:[s.service,s.version&&(0,F.jsxs)(`span`,{className:`mono text-mute`,children:[`@`,s.version]})]}),s.path&&s.kind===`http`&&(0,F.jsx)(`span`,{className:`mono text-mute`,children:s.graphql?`GraphQL ${s.path}`:`${s.method} ${s.path}`}),s.userId&&(0,F.jsx)(Nn,{className:`link`,to:t(`/users/${ja(s.userId)}`),children:s.userId}),(0,F.jsxs)(`span`,{className:`mono text-mute text-[11.5px]`,children:[`trace `,s.traceId]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,F.jsx)(Ga,{text:s.traceId,label:`Trace id`}),r.worthInvestigating&&(0,F.jsx)(Ga,{className:`btn btn-primary`,label:`Copy agent prompt`,text:async()=>(await N(`/api/executions/${s.id}/prompt`)).prompt}),r.issue?(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>n(t(`/issues/${r.issue.id}`)),children:[(0,F.jsx)(Vr,{size:13}),`Issue #`,r.issue.id]}):(s.failed||l)&&(0,F.jsxs)(`button`,{className:`btn`,disabled:a,onClick:async()=>{o(!0);try{let e=await N(`/api/issues`,{method:`POST`,json:{title:l?`${l.class}: ${l.message.slice(0,100)}`:`${s.name} ${s.failed?`failed`:`slow`} (${z(s.duration)})`,severity:s.failed?`high`:`medium`,service:s.service,sourceType:l?`error`:`execution`,sourceRef:l?l.fingerprint:String(s.id),description:`From execution #${s.id} (trace ${s.traceId}) at ${new Date(s.ts).toISOString()}.`}});n(t(`/issues/${e.id}`))}finally{o(!1)}},children:[(0,F.jsx)(Fr,{size:13}),`Create issue`]})]})]}),h?(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-3 gap-3 items-start`,children:[(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 min-w-0`,children:[(0,F.jsx)(V,{title:s.graphql?`Compared with this operation`:`Compared with this route`,children:c.samples?(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,F.jsx)(`div`,{className:`text-[15px]`,children:c.slowerThanPct>=50?(0,F.jsxs)(F.Fragment,{children:[`Slower than `,(0,F.jsxs)(`b`,{style:{color:c.slowerThanPct>=95?`#ffb38a`:void 0},children:[c.slowerThanPct,`%`]}),` of calls`]}):(0,F.jsxs)(F.Fragment,{children:[`Faster than `,(0,F.jsxs)(`b`,{children:[100-c.slowerThanPct,`%`]}),` of calls`]})}),(0,F.jsx)($a,{items:[[s.graphql?`Operation average`:`Route average`,z(c.avg)],[s.graphql?`Operation p95`:`Route p95`,z(c.p95)],[`Samples`,`${c.samples} in the surrounding 24h`],...r.usual?.p95?[[`Usual at this hour`,(0,F.jsxs)(`span`,{children:[`p95 `,z(r.usual.p95.expected),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(normal up to `,z(r.usual.p95.high),`)`]}),r.usual.vsUsualP95>=2&&(0,F.jsxs)(`b`,{style:{color:`#ffb38a`},children:[` · `,r.usual.vsUsualP95,`× usual`]})]},`u`)]]:[]]}),r.usual&&(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[`Usual = `,r.usual.description,`.`]})]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`Not enough history.`})}),(0,F.jsx)(V,{title:`Host at the time`,right:m?(0,F.jsx)(G,{kind:`serious`,children:`under pressure`}):p?(0,F.jsx)(G,{kind:`good`,children:`normal`}):null,children:p?(0,F.jsx)($a,{items:[[`Instance`,(0,F.jsx)(`span`,{className:`mono text-[11.5px]`,children:s.instance})],[`CPU`,(0,F.jsxs)(F.Fragment,{children:[p.cpu?.toFixed(0),`% `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(hour avg `,p.baseline?.cpu?.toFixed(0),`%)`]})]})],[`Event loop p99`,(0,F.jsxs)(F.Fragment,{children:[z(p.elP99),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(avg `,z(p.baseline?.elP99),`)`]})]})],[`Memory`,Ta(p.rss)]]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`No runtime sample near this execution.`})})]}),(0,F.jsx)(`div`,{className:`@3xl:col-span-2 min-w-0`,children:s.kind===`http`&&!s.graphql?(0,F.jsx)(V,{title:`Request details`,sub:(0,F.jsxs)(`span`,{className:`mono`,children:[s.method,` `,s.path||s.route]}),children:(0,F.jsx)(SB,{e:s,rows:[[`Services in trace`,r.waterfall.services.join(`, `)],[`Spans`,s.sampled?String(r.waterfall.spans.length):`not sampled`],...s.tags?Object.entries(s.tags).map(([e,t])=>[e,String(t)]):[]]})}):(0,F.jsx)(V,{title:`Request`,children:(0,F.jsx)($a,{items:[[`Kind`,s.kind===`job`?`Job${s.queue?` · queue ${s.queue}`:``}`:s.graphql?`GraphQL ${s.graphql.type} over HTTP`:`HTTP`],...s.kind===`job`?[[`Queue wait`,z(s.queueWait)],[`Attempt`,s.attempt??1]]:[],[`Services in trace`,r.waterfall.services.join(`, `)],[`Spans`,s.sampled?String(r.waterfall.spans.length):`not sampled`],...s.tags?Object.entries(s.tags).map(([e,t])=>[e,String(t)]):[]]})})})]}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:s.graphql?`Compared with this operation`:`Compared with this route`,children:c.samples?(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,F.jsx)(`div`,{className:`text-[15px]`,children:c.slowerThanPct>=50?(0,F.jsxs)(F.Fragment,{children:[`Slower than `,(0,F.jsxs)(`b`,{style:{color:c.slowerThanPct>=95?`#ffb38a`:void 0},children:[c.slowerThanPct,`%`]}),` of calls`]}):(0,F.jsxs)(F.Fragment,{children:[`Faster than `,(0,F.jsxs)(`b`,{children:[100-c.slowerThanPct,`%`]}),` of calls`]})}),(0,F.jsx)($a,{items:[[s.graphql?`Operation average`:`Route average`,z(c.avg)],[s.graphql?`Operation p95`:`Route p95`,z(c.p95)],[`Samples`,`${c.samples} in the surrounding 24h`],...r.usual?.p95?[[`Usual at this hour`,(0,F.jsxs)(`span`,{children:[`p95 `,z(r.usual.p95.expected),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(normal up to `,z(r.usual.p95.high),`)`]}),r.usual.vsUsualP95>=2&&(0,F.jsxs)(`b`,{style:{color:`#ffb38a`},children:[` · `,r.usual.vsUsualP95,`× usual`]})]},`u`)]]:[]]}),r.usual&&(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[`Usual = `,r.usual.description,`.`]})]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`Not enough history.`})}),(0,F.jsx)(V,{title:`Host at the time`,right:m?(0,F.jsx)(G,{kind:`serious`,children:`under pressure`}):p?(0,F.jsx)(G,{kind:`good`,children:`normal`}):null,children:p?(0,F.jsx)($a,{items:[[`Instance`,(0,F.jsx)(`span`,{className:`mono text-[11.5px]`,children:s.instance})],[`CPU`,(0,F.jsxs)(F.Fragment,{children:[p.cpu?.toFixed(0),`% `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(hour avg `,p.baseline?.cpu?.toFixed(0),`%)`]})]})],[`Event loop p99`,(0,F.jsxs)(F.Fragment,{children:[z(p.elP99),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(avg `,z(p.baseline?.elP99),`)`]})]})],[`Memory`,Ta(p.rss)]]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`No runtime sample near this execution.`})}),s.kind===`http`&&!s.graphql?(0,F.jsx)(V,{title:`Request details`,sub:(0,F.jsxs)(`span`,{className:`mono`,children:[s.method,` `,s.path||s.route]}),children:(0,F.jsx)(SB,{e:s,rows:[[`Services in trace`,r.waterfall.services.join(`, `)],[`Spans`,s.sampled?String(r.waterfall.spans.length):`not sampled`],...s.tags?Object.entries(s.tags).map(([e,t])=>[e,String(t)]):[]]})}):(0,F.jsx)(V,{title:`Request`,children:(0,F.jsx)($a,{items:[[`Kind`,s.kind===`job`?`Job${s.queue?` · queue ${s.queue}`:``}`:s.graphql?`GraphQL ${s.graphql.type} over HTTP`:`HTTP`],...s.kind===`job`?[[`Queue wait`,z(s.queueWait)],[`Attempt`,s.attempt??1]]:[],[`Services in trace`,r.waterfall.services.join(`, `)],[`Spans`,s.sampled?String(r.waterfall.spans.length):`not sampled`],...s.tags?Object.entries(s.tags).map(([e,t])=>[e,String(t)]):[]]})})]}),s.graphql&&(0,F.jsx)(V,{title:`GraphQL operation`,sub:s.graphql.operation?`${s.graphql.type} ${s.graphql.operation}`:`anonymous ${s.graphql.type}`,right:s.graphql.errors?(0,F.jsxs)(G,{kind:`crit`,children:[s.graphql.errors,` resolver error`,s.graphql.errors===1?``:`s`]}):s.graphql.clientErrors?(0,F.jsxs)(G,{kind:`warn`,children:[s.graphql.clientErrors,` client error`,s.graphql.clientErrors===1?``:`s`]}):(0,F.jsx)(G,{kind:`good`,children:`no errors`}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)($a,{items:[[`Type`,s.graphql.type],[`Root fields`,s.graphql.fields.join(`, `)||`—`],[`HTTP status`,String(s.status??`—`)],...s.graphql.batch?[[`Operations in batch`,String(s.graphql.batch)]]:[]]}),s.graphql.errors>0&&s.status!==null&&s.status<400&&(0,F.jsxs)(`div`,{className:`text-[12.5px] text-ink2`,children:[`The server answered `,s.status,`, but a resolver threw, so this request counts as failed.`]}),s.graphql.document&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Query`}),(0,F.jsx)(`div`,{className:`code text-[11.5px] !whitespace-pre-wrap`,children:vB(s.graphql.document)})]})]})}),l&&(0,F.jsxs)(V,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(Ui,{size:14,style:{color:`#ff7070`}}),(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:l.class})]}),sub:l.handled?`handled`:`unhandled`,right:(0,F.jsx)(Nn,{className:`btn h-7`,to:t(`/errors/${l.fingerprint}`),children:`Error group`}),children:[(0,F.jsx)(`div`,{className:`mb-3 text-[13px]`,children:l.message}),(0,F.jsx)(dB,{frames:l.frames,stack:l.stack})]}),(0,F.jsx)(V,{title:`Waterfall`,sub:r.waterfall.services.length>1?`distributed across ${r.waterfall.services.length} services`:void 0,pad:!0,children:s.sampled||r.waterfall.services.length>1?(0,F.jsx)(sB,{spans:r.waterfall.spans,logs:f}):(0,F.jsx)(U,{title:`Span detail not kept`,icon:(0,F.jsx)(Wr,{size:20}),children:`This execution was not sampled. Failed, slow and sampled executions keep their full waterfall (tracesSampleRate).`})}),r.waterfall.executions.length>1&&(0,F.jsx)(V,{title:`Executions in this trace`,pad:!1,children:(0,F.jsx)(`div`,{className:`flex flex-col`,children:r.waterfall.executions.map(e=>(0,F.jsxs)(Nn,{to:t(`/executions/${e.id}`),className:`flex items-center gap-3 px-3.5 py-2 border-b border-[#1d1d26] last:border-0 hover:bg-[#181821] ${e.id===s.id?`bg-[#16161f]`:``}`,children:[(0,F.jsx)(`span`,{className:`w-28 text-ink2`,children:e.service}),(0,F.jsx)(Wa,{name:e.name}),(0,F.jsx)(`span`,{className:`ml-auto`,children:(0,F.jsx)(Ha,{status:e.status})}),(0,F.jsx)(`span`,{className:`w-20 text-right tabular-nums`,children:z(e.duration)})]},e.id))})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:`Logs`,sub:`${r.logs.length} line${r.logs.length===1?``:`s`} written during this trace`,pad:!1,className:s.capture?`@5xl:col-span-2`:`@5xl:col-span-3`,children:r.logs.length?(0,F.jsx)(`div`,{className:`max-h-[360px] overflow-auto`,children:f.map(e=>(0,F.jsx)(mB,{l:e,offset:e.offset},e.id))}):(0,F.jsx)(U,{title:`No logs for this trace`,children:`Logs written with console, pino (obzerver.pino()) or obzerver.log() inside the request are correlated automatically.`})}),s.capture&&(0,F.jsx)(V,{title:`Captured request`,sub:`kept because the request was ${s.capture.reason}`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[s.capture.headers&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Request headers`}),(0,F.jsx)(`div`,{className:`code text-[11.5px]`,children:Object.entries(s.capture.headers).map(([e,t])=>`${e}: ${t}`).join(`
112
+ `)})]}),s.capture.query&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Query`}),(0,F.jsx)(`div`,{className:`code text-[11.5px]`,children:s.capture.query})]}),s.capture.body&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Request body`}),(0,F.jsx)(`div`,{className:`code text-[11.5px] !whitespace-pre-wrap`,children:_B(s.capture.body)})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11px] flex items-center gap-1`,children:[(0,F.jsx)(gr,{size:11}),`Redacted inside your process before sending.`]})]})})]})]})}function _B(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function vB(e){let t=``,n=0,r=0,i=()=>{t=t.trimEnd()+`
113
+ `+` `.repeat(n)};for(let a=0;a<e.length;a++){let o=e[a];if(o===`(`&&r++,o===`)`&&(r=Math.max(0,r-1)),r)t+=o;else if(o===`{`)n++,t=t.trimEnd()+` {`,i();else if(o===`}`)n=Math.max(0,n-1),i(),t+=`}`;else if(/\s/.test(o)){let r=e.slice(a+1).trimStart()[0];!n&&t.endsWith(`}`)?t+=`
114
+
115
+ `:n&&r&&r!==`{`&&r!==`}`&&r!==`(`&&r!==`:`&&!/[:,]$/.test(t.trimEnd())?i():!/\s$/.test(t)&&r!==`{`&&(t+=` `)}else t+=o}return t.replace(/[ \t]+\n/g,`
116
+ `).trim()}function yB({title:e,rows:t}){return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:e}),(0,F.jsx)(`div`,{className:`rounded-lg border border-line overflow-hidden`,children:t.map(([e,t],n)=>(0,F.jsxs)(`div`,{className:`flex gap-3 px-3 py-1.5 border-b border-[#1d1d26] last:border-0 text-[12px]`,children:[(0,F.jsx)(`span`,{className:`mono text-ink2 w-36 shrink-0 truncate`,title:e,children:e}),(0,F.jsx)(`span`,{className:`mono text-ink break-all`,children:t||(0,F.jsx)(`span`,{className:`text-mute`,children:`(empty)`})})]},`${e}${n}`))})]})}var bB={string:`#7ee0a3`,number:`#f0b45a`,boolean:`#b89cff`,null:`#82829a`,undefined:`#82829a`};function xB({shape:e}){let t=e.split(/(\b(?:string|number|boolean|null|undefined)\b)/g);return(0,F.jsx)(`div`,{className:`code text-[11.5px] !whitespace-pre`,children:t.map((e,t)=>bB[e]?(0,F.jsx)(`span`,{style:{color:bB[e]},children:e},t):(0,F.jsx)(`span`,{children:e},t))})}function SB({e,rows:t}){let n=e.request||{},r=Object.entries(n.params||{}).map(([e,t])=>[e,String(t)]),i=n.query?[...new URLSearchParams(n.query).entries()]:[],a=n.body?_B(n.body):null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)($a,{items:[...t,[`Route`,(0,F.jsx)(`span`,{className:`mono`,children:e.route||`—`})],[`Status`,String(e.status??`—`)]]}),r.length>0&&(0,F.jsx)(yB,{title:`Route params`,rows:r}),i.length>0&&(0,F.jsx)(yB,{title:`Query`,rows:i}),a?(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider`,children:`Body`}),(0,F.jsx)(Ga,{text:a,label:``,className:`btn btn-ghost h-6 px-1.5 text-[11.5px]`})]}),(0,F.jsx)(`div`,{className:`code text-[11.5px] !whitespace-pre-wrap`,children:a})]}):n.bodyShape?(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:[`Body shape `,(0,F.jsx)(`span`,{className:`normal-case tracking-normal`,children:`· keys and types; the body itself isn't recorded`})]}),(0,F.jsx)(xB,{shape:n.bodyShape}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] mt-1.5`,children:[`To record the body (redacted) on every request, set `,(0,F.jsx)(`span`,{className:`mono text-ink2`,children:`http.capture.body: 'always'`}),`.`]})]}):null,(n.body||n.bodyShape||i.length>0)&&(0,F.jsxs)(`div`,{className:`text-mute text-[11px] flex items-center gap-1`,children:[(0,F.jsx)(gr,{size:11}),`Redacted inside your process before sending.`]})]})}function CB(){let e=I(),t=L(),n=ht(),[r,i]=zn(),[a,o]=(0,v.useState)(r.get(`q`)||``),[s,c]=(0,v.useState)(`all`),{data:l,error:u}=P(`/api/traces${e.q({q:r.get(`q`)||``,failed:s===`failed`?`1`:``,minDuration:s===`slow`?1e3:``,limit:200})}`,[e.tick,s]),d=(l||[]).filter(e=>s!==`distributed`||e.parts>1);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(Gr,{size:18,className:`text-brand`}),title:`Traces`,sub:`Recent requests and jobs. Distributed traces follow the traceparent header across services.`}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsxs)(`form`,{className:`flex items-center gap-2`,onSubmit:e=>{e.preventDefault();let t=new URLSearchParams(r);a?t.set(`q`,a):t.delete(`q`),i(t,{replace:!0})},children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Oi,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input pl-8 w-[360px] h-7`,placeholder:`Trace id, route, path, user id or error text`,value:a,onChange:e=>o(e.target.value)})]}),(0,F.jsx)(Ka,{value:s,onChange:c,options:[{id:`all`,label:`All`},{id:`failed`,label:`Failed`},{id:`slow`,label:`> 1s`},{id:`distributed`,label:`Multi-service`}]})]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:u?(0,F.jsx)(W,{error:u}):l?(0,F.jsx)(qa,{rows:d,onRow:e=>n(t(`/executions/${e.id}`)),empty:(0,F.jsx)(U,{title:`No traces match`}),cols:[{key:`t`,label:`Time`,render:e=>(0,F.jsxs)(`span`,{className:`tabular-nums`,children:[Oa(e.ts),` `,(0,F.jsx)(`span`,{className:`text-mute text-[11px] ml-1`,children:(0,F.jsx)(io,{ts:e.ts})})]})},{key:`n`,label:`Operation`,render:e=>(0,F.jsx)(Wa,{name:e.name})},{key:`s`,label:`Application`,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.service})},{key:`p`,label:`Apps`,num:!0,render:e=>e.parts>1?(0,F.jsx)(`span`,{className:`pill`,style:{color:`#9cc4ff`},children:e.parts}):(0,F.jsx)(`span`,{className:`text-mute`,children:`1`})},{key:`st`,label:`Status`,render:e=>(0,F.jsx)(Ha,{status:e.status})},{key:`d`,label:`Duration`,num:!0,render:e=>z(e.duration)},{key:`u`,label:`User`,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.user_id||`—`})},{key:`id`,label:`Trace id`,render:e=>(0,F.jsxs)(`span`,{className:`mono text-mute text-[11px]`,children:[e.trace_id.slice(0,16),`…`]})}]}):(0,F.jsx)(H,{})})})]})}function wB(){let e=I(),t=L(),n=ht(),[r,i]=(0,v.useState)(`0`),[a,o]=(0,v.useState)(``),{data:s,error:c}=P(`/api/errors${e.q({handled:r,status:a})}`,[e.tick]);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(br,{size:18,className:`text-brand`}),title:`Errors`,sub:`Grouped into defects by class and stack shape. Unhandled = 5xx or a thrown job/process error; a 4xx from your own code is your API working.`}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(Ka,{value:r,onChange:i,options:[{id:`0`,label:`Unhandled`},{id:`1`,label:`Handled`},{id:`all`,label:`All`}]}),(0,F.jsx)(Ka,{value:a,onChange:o,options:[{id:``,label:`Any status`},{id:`open`,label:`Open`},{id:`resolved`,label:`Resolved`},{id:`ignored`,label:`Ignored`}]})]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:c?(0,F.jsx)(W,{error:c}):s?(0,F.jsx)(qa,{rows:s,initialSort:`count`,onRow:e=>n(t(`/errors/${e.fingerprint}`)),rowKey:e=>e.fingerprint,empty:(0,F.jsx)(U,{title:`No errors in this window`,icon:(0,F.jsx)(`span`,{className:`text-[18px]`,children:`✓`}),children:`Nothing matched these filters.`}),cols:[{key:`e`,label:`Error`,sort:e=>e.class,render:e=>(0,F.jsxs)(`div`,{className:`min-w-0 max-w-[560px]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium`,style:{color:e.handled?`var(--color-ink)`:`#ff9b9b`},children:e.class}),e.isNew&&(0,F.jsx)(G,{kind:`serious`,children:`new`}),e.status!==`open`&&(0,F.jsx)(G,{kind:e.status===`resolved`?`good`:`neutral`,children:e.status})]}),(0,F.jsx)(`div`,{className:`text-mute truncate text-[12px]`,children:e.message})]})},{key:`op`,label:`Where`,render:e=>(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`truncate max-w-[220px]`,children:e.operation?(0,F.jsx)(Wa,{name:e.operation}):`—`}),(0,F.jsx)(`div`,{className:`text-mute text-[11px]`,children:e.service})]})},{key:`trend`,label:`Trend`,render:e=>(0,F.jsx)(Va,{data:e.spark,color:e.handled?`#82829a`:$R.crit,w:80,h:20})},{key:`count`,label:`Events`,num:!0,sort:e=>e.count,render:e=>B(e.count)},{key:`users`,label:`Users`,num:!0,sort:e=>e.users,render:e=>B(e.users)},{key:`rel`,label:`Introduced`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px] text-ink2`,children:e.firstVersion||`—`})},{key:`first`,label:`First seen`,num:!0,sort:e=>e.firstSeen,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(io,{ts:e.firstSeen})})},{key:`last`,label:`Last seen`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:(0,F.jsx)(io,{ts:e.lastSeen})})}]}):(0,F.jsx)(H,{})})})]})}var TB=e=>new Date(e).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,timeZoneName:`short`});function EB(){let e=I(),t=L(),n=ht(),[r,i]=zn(),[a,o]=(0,v.useState)(`open`),{data:s,error:c,reload:l}=P(`/api/secrets${e.q({status:a})}`,[e.tick,a]),u=r.get(`fp`),d=P(u?`/api/secrets/${u}`:null,[u,e.tick]),f=e=>i(t=>{let n=new URLSearchParams(t);return e?n.set(`fp`,e):n.delete(`fp`),n},{replace:!0}),p=async(e,t)=>{await N(`/api/secrets/${e}`,{method:`POST`,json:{status:t}}),l(),d.reload()};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(Mi,{size:18,style:{color:`#ff6b6b`}}),title:`Secrets in logs`,sub:`Passwords, tokens, API keys, private keys and card numbers that reached a log line or an error message. They are redacted before storage (the value is never kept); each row is a place in your code that logs one.`}),s&&s.open>0&&(0,F.jsxs)(`div`,{className:`rounded-xl border px-4 py-3 flex items-start gap-3`,style:{borderColor:`#6b2330`,background:`rgba(208,59,59,.10)`},children:[(0,F.jsx)(Mi,{size:18,className:`shrink-0 mt-0.5`,style:{color:`#ff6b6b`}}),(0,F.jsxs)(`div`,{className:`text-[13px] leading-relaxed`,children:[(0,F.jsxs)(`b`,{style:{color:`#ffb0b0`},children:[s.open,` place`,s.open===1?``:`s`,` in your code log`,s.open===1?`s`:``,` secrets.`]}),` `,(0,F.jsx)(`span`,{className:`text-ink2`,children:`Fix the log line, then mark it resolved. If a secret may have been exposed before it was redacted (other log sinks, stdout, a log shipper), rotate it.`})]})]}),u&&(0,F.jsx)(V,{title:d.data?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{style:{color:`#ff9b9b`},children:d.data.label}),(0,F.jsxs)(`span`,{className:`text-mute font-normal`,children:[`in `,d.data.source===`error`?`an error message`:`logs`]})]}):`Leak`,right:(0,F.jsx)(`button`,{className:`btn btn-ghost h-6`,onClick:()=>f(null),children:`Close`}),children:d.error?(0,F.jsx)(W,{error:d.error}):d.data?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 text-[12.5px]`,children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @lg:grid-cols-4 gap-4`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Where`}),(0,F.jsx)(`div`,{className:`font-medium`,children:d.data.service}),(0,F.jsx)(`div`,{className:`text-ink2`,children:d.data.operation?(0,F.jsx)(Wa,{name:d.data.operation}):`outside a request or job`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Logger`}),(0,F.jsx)(`div`,{className:`font-medium mono`,children:d.data.logger||`—`}),(0,F.jsx)(`div`,{className:`text-mute`,children:d.data.detectedBy===`sdk`?`Redacted by the SDK, in the process`:`Redacted by the server, before storage`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Seen`}),(0,F.jsxs)(`div`,{className:`font-medium`,children:[B(d.data.count),` times`]}),(0,F.jsxs)(`div`,{className:`text-ink2`,children:[`first `,(0,F.jsx)(io,{ts:d.data.firstSeen}),d.data.firstVersion?` in ${d.data.firstVersion}`:``,` · last `,(0,F.jsx)(io,{ts:d.data.lastSeen})]})]}),(0,F.jsxs)(`div`,{className:`flex flex-col items-start gap-1.5`,children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Status`}),(0,F.jsxs)(`div`,{className:`flex gap-1.5`,children:[d.data.status!==`resolved`&&(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>p(d.data.fingerprint,`resolved`),children:[(0,F.jsx)(Ni,{size:13}),`Mark fixed`]}),d.data.status===`open`&&(0,F.jsx)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>p(d.data.fingerprint,`ignored`),children:`Ignore`}),d.data.status!==`open`&&(0,F.jsx)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>p(d.data.fingerprint,`open`),children:`Reopen`}),d.data.issueId&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>n(t(`/issues/${d.data.issueId}`)),children:[(0,F.jsx)(Vr,{size:12}),`Issue #`,d.data.issueId]})]})]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute mb-1`,children:`Example, as stored`}),(0,F.jsx)(`pre`,{className:`mono text-[12px] whitespace-pre-wrap break-all rounded-md border border-line px-3 py-2`,style:{background:`#101016`},children:DB(d.data.sample||``)})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute mb-1`,children:`Recent occurrences`}),(0,F.jsx)(qa,{rows:d.data.findings,rowKey:e=>`${e.ts}${e.traceId}`,onRow:e=>e.traceId&&n(t(`/traces/${e.traceId}`)),cols:[{key:`t`,label:`Time`,render:e=>(0,F.jsx)(ro,{tip:TB(e.ts),children:Oa(e.ts,!0)})},{key:`v`,label:`Version`,render:e=>(0,F.jsx)(`span`,{className:`mono`,children:e.version||`—`})},{key:`i`,label:`Instance`,render:e=>(0,F.jsx)(`span`,{className:`mono text-ink2`,children:e.instance||`—`})},{key:`c`,label:`Count`,num:!0,render:e=>B(e.count)},{key:`s`,label:`Text (redacted)`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px] text-ink2 truncate inline-block max-w-[520px] align-bottom`,children:DB(e.sample||``)})},{key:`tr`,label:`Trace`,render:e=>e.traceId?(0,F.jsxs)(`span`,{className:`mono text-[11.5px]`,style:{color:`#ff9cc0`},children:[e.traceId.slice(0,8),`…`]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})}]})]})]}):(0,F.jsx)(H,{})}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsx)(Ka,{value:a,onChange:o,options:[{id:`open`,label:`To fix`},{id:`resolved`,label:`Fixed`},{id:`ignored`,label:`Ignored`},{id:``,label:`All`}]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:c?(0,F.jsx)(W,{error:c}):s?(0,F.jsx)(qa,{rows:s.groups,initialSort:`last`,rowKey:e=>e.fingerprint,onRow:e=>f(e.fingerprint),empty:(0,F.jsx)(U,{title:a===`open`?`No secrets in your logs`:`Nothing here`,icon:(0,F.jsx)(Ni,{size:20,className:`text-[#3fb68b]`}),children:`The SDK redacts passwords, tokens, keys and card numbers before logs leave your process, and the server checks again on arrival. Anything that gets through shows up here with a critical alert.`}),cols:[{key:`r`,label:`What leaked`,sort:e=>e.label,render:e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium`,style:{color:e.status===`open`?`#ff9b9b`:void 0},children:e.label}),e.status!==`open`&&(0,F.jsx)(G,{kind:e.status===`resolved`?`good`:`neutral`,children:e.status===`resolved`?`fixed`:e.status})]})},{key:`s`,label:`In`,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.source===`error`?`error message`:`log line`})},{key:`w`,label:`Where`,sort:e=>`${e.service} ${e.operation}`,render:e=>(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{children:e.service}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[e.operation?(0,F.jsx)(Wa,{name:e.operation}):`outside a request or job`,e.logger?` · ${e.logger}`:``]})]})},{key:`ex`,label:`Example (redacted)`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px] text-ink2 truncate inline-block max-w-[380px] align-bottom`,children:DB(e.sample||``)})},{key:`win`,label:`In window`,num:!0,sort:e=>e.inWindow,render:e=>B(e.inWindow)},{key:`c`,label:`Total`,num:!0,sort:e=>e.count,render:e=>B(e.count)},{key:`first`,label:`First seen`,sort:e=>e.firstSeen,render:e=>(0,F.jsxs)(`span`,{className:`text-ink2`,children:[(0,F.jsx)(io,{ts:e.firstSeen}),e.firstVersion?(0,F.jsxs)(`span`,{className:`text-mute`,children:[` · `,e.firstVersion]}):``]})},{key:`last`,label:`Last seen`,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(io,{ts:e.lastSeen,className:`text-ink2`})}]}):(0,F.jsx)(H,{})})})]})}function DB(e){let t=e.split(`[REDACTED]`);return t.map((e,n)=>(0,F.jsxs)(`span`,{children:[e,n<t.length-1&&(0,F.jsx)(`span`,{className:`rounded px-1 mx-px`,style:{background:`rgba(208,59,59,.22)`,color:`#ff9b9b`},children:`[REDACTED]`})]},n))}function OB(){let{fp:e=``}=yt(),t=I(),n=L(),r=ht(),{data:i,error:a,reload:o}=P(`/api/errors/${e}${t.q()}`,[t.tick]);if(a)return(0,F.jsx)(W,{error:a});if(!i)return(0,F.jsx)(H,{});let s=i.group,c=async t=>{await N(`/api/errors/${e}`,{method:`PATCH`,json:{status:t}}),o()};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Nn,{to:n(`/errors`),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:`← Errors`}),(0,F.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,F.jsx)(`h1`,{className:`text-[19px] font-semibold tracking-tight`,style:{color:s.handled?void 0:`#ff9b9b`},children:s.class}),s.handled?(0,F.jsx)(G,{kind:`neutral`,children:`handled`}):(0,F.jsx)(G,{kind:`crit`,children:`unhandled`}),(0,F.jsx)(G,{kind:s.status===`resolved`?`good`:s.status===`ignored`?`neutral`:`warn`,children:s.status})]}),(0,F.jsx)(`div`,{className:`mt-1.5 text-[13.5px]`,children:s.message}),(0,F.jsxs)(`div`,{className:`text-mute mt-1 text-[12px]`,children:[s.service,` · `,s.operation?(0,F.jsx)(Wa,{name:s.operation}):`no operation`,` · fingerprint `,(0,F.jsx)(`span`,{className:`mono`,children:s.fingerprint})]})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 shrink-0`,children:[i.issues[0]?(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>r(n(`/issues/${i.issues[0].id}`)),children:[`Issue #`,i.issues[0].id]}):(0,F.jsxs)(`button`,{className:`btn`,onClick:async()=>{let t=await N(`/api/issues`,{method:`POST`,json:{title:`${s.class}: ${String(s.message).slice(0,110)}`,severity:s.handled?`low`:`high`,service:s.service,sourceType:`error`,sourceRef:e,description:`Error group first seen ${new Date(s.firstSeen).toISOString()}${s.firstVersion?` in ${s.firstVersion}`:``}.`}});r(n(`/issues/${t.id}`))},children:[(0,F.jsx)(Fr,{size:13}),`Create issue`]}),s.status===`open`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>c(`resolved`),children:[(0,F.jsx)(Mr,{size:13}),`Resolve`]}),(0,F.jsxs)(`button`,{className:`btn btn-ghost`,onClick:()=>c(`ignored`),children:[(0,F.jsx)(Hr,{size:13}),`Ignore`]})]}):(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>c(`open`),children:[(0,F.jsx)(wi,{size:13}),`Reopen`]})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-5 gap-3`,children:[(0,F.jsx)(Ba,{label:`In this window`,value:B(i.windowCount)}),(0,F.jsx)(Ba,{label:`All time`,value:B(s.count)}),(0,F.jsx)(Ba,{label:`Users affected`,value:B(i.users.length)}),(0,F.jsx)(Ba,{label:`First seen`,value:(0,F.jsx)(`span`,{className:`text-[16px]`,children:(0,F.jsx)(io,{ts:s.firstSeen})}),sub:s.firstVersion?`in release ${s.firstVersion}`:void 0}),(0,F.jsx)(Ba,{label:`Last seen`,value:(0,F.jsx)(`span`,{className:`text-[16px]`,children:(0,F.jsx)(io,{ts:s.lastSeen})})})]}),(0,F.jsx)(rz,{title:`Occurrences`,children:(0,F.jsx)(nz,{data:i.series.points,series:[{key:`count`,label:`Occurrences`,color:s.handled?`#82829a`:$R.crit,type:`bar`}],height:130,fmt:e=>B(e)})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:`Latest stack trace`,sub:i.latest?Oa(i.latest.ts,!0):void 0,className:`@5xl:col-span-2`,children:i.latest?(0,F.jsx)(dB,{frames:i.latest.frames,stack:i.latest.stack}):(0,F.jsx)(U,{title:`No occurrence stored`})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(V,{title:`Releases`,pad:!1,children:(0,F.jsx)(qa,{rows:i.versions,cols:[{key:`v`,label:`Version`,render:e=>(0,F.jsx)(`span`,{className:`mono`,children:e.version||`—`})},{key:`n`,label:`Events`,num:!0,render:e=>B(e.n)},{key:`l`,label:`Last`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(io,{ts:e.last})})}]})}),(0,F.jsx)(V,{title:`Operations`,pad:!1,children:(0,F.jsx)(qa,{rows:i.operations,empty:(0,F.jsx)(U,{title:`—`}),cols:[{key:`o`,label:`Where`,render:e=>e.operation?(0,F.jsx)(Wa,{name:e.operation}):`—`},{key:`n`,label:`Events`,num:!0,render:e=>B(e.n)}]})}),i.users.length>0&&(0,F.jsx)(V,{title:`Affected users`,pad:!1,children:(0,F.jsx)(qa,{rows:i.users,maxHeight:220,onRow:e=>r(n(`/users/${ja(e.user_id)}`)),cols:[{key:`u`,label:`User`,render:e=>e.user_id},{key:`n`,label:`Events`,num:!0,render:e=>B(e.n)}]})})]})]}),(0,F.jsx)(V,{title:`Occurrences`,sub:`most recent 50`,pad:!1,children:(0,F.jsx)(qa,{rows:i.occurrences,onRow:e=>e.execution_id&&r(n(`/executions/${e.execution_id}`)),cols:[{key:`t`,label:`Time`,render:e=>Oa(e.ts,!0)},{key:`v`,label:`Release`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px]`,children:e.version||`—`})},{key:`i`,label:`Instance`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px] text-ink2`,children:e.instance})},{key:`u`,label:`User`,render:e=>e.user_id||`—`},{key:`s`,label:`Status`,render:e=>e.http_status??`—`},{key:`m`,label:`Message`,render:e=>(0,F.jsx)(`span`,{className:`text-mute truncate inline-block max-w-[380px] align-middle`,children:e.message})},{key:`x`,label:``,render:e=>e.execution_id?(0,F.jsx)(`span`,{className:`link whitespace-nowrap`,children:`See trace →`}):null}]})})]})}var kB=[[`requests`,`Requests`],[`jobs`,`Job runs`],[`errors`,`Errors`],[`logs`,`Log entries`],[`spans`,`Method spans`]],AB=e=>new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,timeZone:`UTC`}),jB=e=>`$${e.toLocaleString(void 0,{maximumFractionDigits:e<10?2:0})}`,MB=e=>e.overage===`none`?`Nothing to pass`:e.overage===`reduce`?`Less detail, then refused at 2×`:`Overage, within spend controls`;function NB(){let e=I(),{data:t,error:n,reload:r}=P(`/api/usage`,[e.tick]),[i,a]=(0,v.useState)(null),o=async t=>{a(null);try{await N(`/api/usage`,{method:`PUT`,json:t}),await r(),e.refresh()}catch(e){a(e.message)}},s=async t=>{a(null);try{await N(`/api/usage/${t}`,{method:`POST`}),await r(),e.refresh()}catch(e){a(e.message)}};if(n)return(0,F.jsx)(W,{error:n});if(!t)return(0,F.jsx)(H,{});let c=t,l=ea[c.state];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(Wr,{size:18,className:`text-brand`}),title:`Usage`,sub:(0,F.jsxs)(F.Fragment,{children:[`Observability Events in `,new Date(c.resetsAt-1).toLocaleDateString(void 0,{month:`long`,year:`numeric`,timeZone:`UTC`}),`, across every project. Resets `,AB(c.resetsAt),` 00:00 UTC.`]}),right:(0,F.jsx)(G,{kind:l.tone,children:l.label})}),i&&(0,F.jsx)(`div`,{className:`card px-3.5 py-2.5 text-[12.5px]`,style:{borderColor:`#5a2a2a`,color:`#f2a0a0`},children:i}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-4 items-start`,children:[(0,F.jsxs)(V,{title:`This month`,className:`@5xl:col-span-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`text-[30px] font-semibold tracking-tight tabular-nums`,children:Zi(c.used)}),(0,F.jsx)(`span`,{className:`text-ink2 text-[14px]`,children:c.included?(0,F.jsxs)(F.Fragment,{children:[`of `,Zi(c.included),` events`,c.pct!=null&&(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsx)(`b`,{className:`text-ink`,children:Qi(c.pct)})]})]}):`events (no allowance on Self-hosted)`})]}),c.included?(0,F.jsx)(`div`,{className:`mt-3 mb-1`,children:(0,F.jsx)(na,{used:c.used,included:c.included,thresholds:c.settings.thresholds})}):null,(0,F.jsxs)(`div`,{className:`text-[12.5px] text-ink2 mt-2.5 flex flex-wrap gap-x-4 gap-y-1`,children:[(0,F.jsxs)(`span`,{children:[`Today `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Zi(c.today)})]}),(0,F.jsxs)(`span`,{children:[`Projected by month end `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Zi(c.projected)}),c.included&&c.projected>c.included?(0,F.jsxs)(`span`,{style:{color:`#fab219`},children:[` (`,Zi(c.projected-c.included),` over)`]}):null]}),c.overage>0&&(0,F.jsxs)(`span`,{children:[`Overage `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Zi(c.overage)}),c.settings.overageRate?(0,F.jsxs)(F.Fragment,{children:[` ≈ `,jB(c.overage/1e6*c.settings.overageRate)]}):null]}),c.unbilled>0&&(0,F.jsxs)(`span`,{title:`Server errors and failed jobs collected while overage was paused`,children:[`Unbilled `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Zi(c.unbilled)})]}),c.dropped>0&&(0,F.jsxs)(`span`,{title:`Events the plan didn't keep`,children:[`Not kept `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Zi(c.dropped)})]})]}),c.reason&&(0,F.jsx)(`div`,{className:`mt-3 text-[12.5px] rounded-lg px-3 py-2 bg-[rgba(250,178,25,.08)] border border-[rgba(250,178,25,.25)]`,children:c.reason}),c.plan.id===`self-hosted`&&(0,F.jsx)(`div`,{className:`mt-3 text-[12.5px] text-mute`,children:`Self-hosted keeps everything. Events are still counted, so you can see what a plan would use.`}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 @lg:grid-cols-5 gap-2 mt-4`,children:kB.map(([e,t])=>(0,F.jsxs)(`div`,{className:`rounded-lg bg-[#14141b] border border-line px-3 py-2`,children:[(0,F.jsx)(`div`,{className:`text-[11px] text-mute`,children:t}),(0,F.jsx)(`div`,{className:`text-[15px] font-semibold tabular-nums`,children:Zi(c.kinds[e])})]},e))})]}),(0,F.jsx)(V,{title:`Plan`,right:(0,F.jsx)(`span`,{className:`text-[12px] text-mute`,children:c.plan.name}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 text-[13px]`,children:[(0,F.jsx)(PB,{label:`Included events`,value:c.plan.included==null?`No limit`:`${Zi(c.plan.included)} / month`}),(0,F.jsx)(PB,{label:`Retention`,value:c.plan.retentionDays==null?`Your setting (OBZERVER_RETENTION_DAYS)`:`${c.plan.retentionDays} days`}),c.limits.spanTreeDays&&(0,F.jsxs)(`div`,{className:`text-[11.5px] text-mute -mt-1`,children:[`Fast, successful executions keep their span tree for `,c.limits.spanTreeDays,` days; slow or failed ones keep it for the whole window.`]}),(0,F.jsx)(PB,{label:`Logs & alerts`,value:(0,F.jsx)(FB,{on:c.plan.features.logs&&c.plan.features.alerts})}),(0,F.jsx)(PB,{label:`SLOs`,value:(0,F.jsx)(FB,{on:c.plan.features.slos})}),(0,F.jsx)(PB,{label:`Past the allowance`,value:MB(c.plan)})]})})]}),(0,F.jsx)(V,{title:`Events per day`,sub:`UTC days, this month`,children:(0,F.jsx)(`div`,{style:{height:180},children:(0,F.jsx)(eh,{width:`100%`,height:`100%`,children:(0,F.jsxs)(XR,{data:c.daily,margin:{top:6,right:6,bottom:0,left:-6},barCategoryGap:3,children:[(0,F.jsx)(dF,{vertical:!1}),(0,F.jsx)(lL,{dataKey:`day`,tickLine:!1,axisLine:{stroke:`#2a2a35`},tickFormatter:e=>String(Number(e.slice(8))),interval:`preserveStartEnd`}),(0,F.jsx)(EL,{tickLine:!1,axisLine:!1,tickFormatter:e=>Zi(e),width:44}),c.limits.dailyPace&&(0,F.jsx)(SN,{y:c.limits.dailyPace,stroke:`#fab219`,strokeDasharray:`4 3`,label:{value:`Pace ${Zi(c.limits.dailyPace)}/day`,position:`insideTopRight`,fill:`#fab219`,fontSize:10.5}}),(0,F.jsx)(Fm,{cursor:{fill:`rgba(255,255,255,.04)`},isAnimationActive:!1,content:({active:e,payload:t})=>e&&t?.length?(0,F.jsxs)(`div`,{className:`rounded-lg border border-line2 px-3 py-1.5 text-[12px]`,style:{background:`rgba(20,20,27,.97)`},children:[(0,F.jsx)(`div`,{className:`text-mute`,children:AB(Date.parse(t[0].payload.day))}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`b`,{children:t[0].value.toLocaleString()}),` events`]}),t[0].payload.unbilled>0&&(0,F.jsxs)(`div`,{className:`text-ink2`,children:[t[0].payload.unbilled.toLocaleString(),` unbilled`]}),t[0].payload.dropped>0&&(0,F.jsxs)(`div`,{className:`text-ink2`,children:[t[0].payload.dropped.toLocaleString(),` not kept`]})]}):null}),(0,F.jsx)(sM,{dataKey:`events`,fill:QR[0],radius:[4,4,0,0],isAnimationActive:!1})]})})})}),(0,F.jsx)(IB,{report:c,onSave:o}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-4 items-start`,children:[(0,F.jsx)(LB,{report:c,onSave:o,onPost:s}),(0,F.jsx)(zB,{report:c,onSave:o})]}),(0,F.jsx)(BB,{report:c}),(0,F.jsx)(UB,{}),(0,F.jsx)(V,{title:`What counts`,right:(0,F.jsx)(Xr,{size:14,className:`text-mute`}),children:(0,F.jsxs)(`div`,{className:`text-[12.8px] text-ink2 leading-relaxed flex flex-col gap-2 max-w-[860px]`,children:[(0,F.jsx)(`p`,{children:`One Observability Event per request, background job run, error, log entry or trace span your apps report. Events add up: a request that ran through three of your own methods, wrote two log lines and raised one error is seven events.`}),(0,F.jsx)(`p`,{children:`Database-query and outbound-HTTP spans don't count: they are detail about a method span that is already counted. Runtime samples (CPU, memory, event loop) and custom metrics don't count either.`}),(0,F.jsxs)(`p`,{children:[`To send fewer events, ignore noisy routes in the SDK (`,(0,F.jsx)(`span`,{className:`mono`,children:`ignore`}),` in `,(0,F.jsx)(`span`,{className:`mono`,children:`init()`}),`) and keep log levels at `,(0,F.jsx)(`span`,{className:`mono`,children:`info`}),` or above in production.`]})]})})]})}function PB({label:e,value:t}){return(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsx)(`span`,{className:`text-ink2`,children:e}),(0,F.jsx)(`span`,{className:`text-right`,children:t})]})}function FB({on:e}){return e?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1`,style:{color:`#3ccf7a`},children:[(0,F.jsx)(Tr,{size:14}),`Included`]}):(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-mute`,children:[(0,F.jsx)(oi,{size:13}),`Not included`]})}function IB({report:e,onSave:t}){let[n,r]=(0,v.useState)({included:String(e.settings.enterprise.included),retentionDays:String(e.settings.enterprise.retentionDays)}),i=e.plan.id;return(0,F.jsxs)(V,{title:`Plans`,sub:`Choose the plan this server enforces`,pad:!1,children:[(0,F.jsx)(`div`,{className:`overflow-x-auto`,children:(0,F.jsxs)(`table`,{className:`w-full text-[12.8px]`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsx)(`tr`,{className:`text-mute text-[11.5px] text-left`,children:[`Plan`,`Included events / month`,`Retention`,`Logs & alerts`,`SLOs`,`Past the allowance`,``].map(e=>(0,F.jsx)(`th`,{className:`font-medium px-3.5 py-2 border-b border-line`,children:e},e))})}),(0,F.jsx)(`tbody`,{children:e.plans.map(e=>{let a=e.id===i,o=e.id===`enterprise`;return(0,F.jsxs)(`tr`,{className:a?`bg-[rgba(255,61,127,.06)]`:``,children:[(0,F.jsxs)(`td`,{className:`px-3.5 py-2.5 border-b border-line font-medium`,children:[e.name,a&&(0,F.jsx)(`span`,{className:`ml-2 text-[10.5px] font-semibold text-brand`,children:`CURRENT`})]}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line tabular-nums`,children:o?(0,F.jsx)(`input`,{className:`input h-7 w-[120px]`,"aria-label":`Enterprise included events`,value:n.included,onChange:e=>r({...n,included:e.target.value})}):e.included==null?`No limit`:Zi(e.included)}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line tabular-nums`,children:o?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`input`,{className:`input h-7 w-[70px]`,"aria-label":`Enterprise retention days`,value:n.retentionDays,onChange:e=>r({...n,retentionDays:e.target.value})}),`days`]}):e.retentionDays==null?`Your setting`:`${e.retentionDays} days`}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line`,children:(0,F.jsx)(FB,{on:e.features.logs})}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line`,children:(0,F.jsx)(FB,{on:e.features.slos})}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line text-ink2`,children:MB(e)}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line text-right`,children:o?(0,F.jsx)(`button`,{className:`btn h-7`,onClick:()=>t({plan:`enterprise`,enterprise:{included:Number(n.included),retentionDays:Number(n.retentionDays)}}),children:a?`Save`:`Choose`}):!a&&(0,F.jsx)(`button`,{className:`btn h-7`,onClick:()=>t({plan:e.id}),children:`Choose`})})]},e.id)})})]})}),(0,F.jsx)(`div`,{className:`px-3.5 py-2.5 text-[11.5px] text-mute`,children:`Choosing a plan applies its allowance, retention and features to every project on this server. Retention takes effect at the next hourly clean-up.`})]})}function LB({report:e,onSave:t,onPost:n}){let r=e.settings,[i,a]=(0,v.useState)(r.budget==null?``:String(r.budget)),[o,s]=(0,v.useState)(r.overageRate==null?``:String(r.overageRate));if((0,v.useEffect)(()=>{a(r.budget==null?``:String(r.budget)),s(r.overageRate==null?``:String(r.overageRate))},[r.budget,r.overageRate]),e.plan.overage===`none`)return(0,F.jsx)(V,{title:`Spend controls`,children:(0,F.jsx)(`div`,{className:`text-[12.8px] text-ink2`,children:`Self-hosted has no allowance, so there is nothing to control. Choose a plan above to meter against one.`})});if(e.plan.overage===`reduce`){let t=e.plan.included??0;return(0,F.jsxs)(V,{title:`Past the Free allowance`,children:[(0,F.jsxs)(`ol`,{className:`flex flex-col gap-2.5 text-[12.8px]`,children:[(0,F.jsx)(RB,{n:1,on:e.state===`paced`,title:`Paced day: past ${Zi(e.limits.dailyPace)} events in one UTC day`,children:`Most trace waterfalls pause until 00:00 UTC.`}),(0,F.jsx)(RB,{n:2,on:e.state===`reduced`,title:`Past ${Zi(t)} this month`,children:`Charts stay live, but most traces arrive without spans.`}),(0,F.jsx)(RB,{n:3,on:e.state===`refused`,title:`At ${Zi(e.limits.refuseAt)}`,children:`New telemetry is refused with a 429 until the 1st, and dropped, not queued.`})]}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute mt-3`,children:`While paced or reduced, server errors, failed jobs and anything slower than 1 second keep full traces.`})]})}let c=e.state===`paused`,l=e.spikeProtection.limit==null?``:r.overageRate?`${jB(50)} of overage (${Zi(e.spikeProtection.limit)} events)`:`${Zi(e.spikeProtection.limit)} overage events (half the allowance; set a price to use $50)`;return(0,F.jsx)(V,{title:`Spend controls`,right:c?(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>n(`resume`),children:[(0,F.jsx)(gi,{size:13}),`Resume overage`]}):(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>n(`pause`),children:[(0,F.jsx)(mi,{size:13}),`Pause overage`]}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 text-[12.8px]`,children:[(0,F.jsxs)(`label`,{className:`flex items-start gap-3 cursor-pointer`,children:[(0,F.jsx)(`input`,{type:`checkbox`,className:`mt-0.5`,checked:e.spikeProtection.on,onChange:e=>t({spikeProtection:e.target.checked})}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`font-medium flex items-center gap-1.5`,children:[(0,F.jsx)(Ni,{size:14,className:`text-mute`}),`Spike protection`]}),(0,F.jsxs)(`div`,{className:`text-ink2 mt-0.5`,children:[`Pauses overage when a surge would push this month's overage to `,l,` at the current pace.`,e.spikeProtection.resumed?` Off until the 1st: you resumed overage this month.`:``]})]})]}),(0,F.jsx)(K,{label:`Monthly overage budget (events beyond the allowance)`,hint:`Empty: no budget. 0: collect nothing beyond the included events.`,children:(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`input`,{className:`input h-8 w-[180px]`,inputMode:`numeric`,placeholder:`No budget`,value:i,onChange:e=>a(e.target.value)}),(0,F.jsx)(`button`,{className:`btn h-8`,onClick:()=>t({budget:i.trim()===``?null:Number(i)}),children:`Save`})]})}),(0,F.jsx)(K,{label:`Price per million overage events (optional, USD)`,hint:`Shows overage as money and sizes spike protection at $50.`,children:(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`input`,{className:`input h-8 w-[120px]`,inputMode:`decimal`,placeholder:`—`,value:o,onChange:e=>s(e.target.value)}),(0,F.jsx)(`button`,{className:`btn h-8`,onClick:()=>t({overageRate:o.trim()===``?null:Number(o)}),children:`Save`})]})}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute`,children:`While overage is paused, server errors, failed jobs, runtime and custom metrics continue unbilled. Other events beyond the allowance are dropped until the 1st, or until you resume, change the budget or upgrade.`})]})})}function RB({n:e,on:t,title:n,children:r}){return(0,F.jsxs)(`li`,{className:`flex gap-3 rounded-lg px-3 py-2 border ${t?`border-[rgba(250,178,25,.45)] bg-[rgba(250,178,25,.07)]`:`border-line`}`,children:[(0,F.jsx)(`span`,{className:`w-5 h-5 rounded-full grid place-items-center text-[11px] font-semibold bg-[#1d1d27] shrink-0`,children:e}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`font-medium`,children:[n,t&&(0,F.jsx)(`span`,{className:`ml-2 text-[10.5px] font-semibold`,style:{color:`#fab219`},children:`NOW`})]}),(0,F.jsx)(`div`,{className:`text-ink2 mt-0.5`,children:r})]})]})}function zB({report:e,onSave:t}){let n=e.settings,[r,i]=(0,v.useState)(n.thresholds.join(`, `)),[a,o]=(0,v.useState)(n.notify),s=P(`/api/settings`);(0,v.useEffect)(()=>{i(n.thresholds.join(`, `)),o(n.notify)},[n.thresholds.join(`,`),n.notify]);let c=!!s.data?.email?.configured;return(0,F.jsx)(V,{title:`Quota notifications`,right:(0,F.jsx)(hr,{size:14,className:`text-mute`}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 text-[12.8px]`,children:[(0,F.jsx)(K,{label:`Thresholds, % of the allowance (up to five)`,hint:`For example 50, 80, 100. Each one emails once a month.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,value:r,onChange:e=>i(e.target.value),placeholder:`50, 80, 100`,disabled:e.plan.included==null})}),(0,F.jsx)(K,{label:`Email to`,hint:c?`Comma-separated.`:`Email isn’t set up on this server yet (Settings → Email), so notifications only show here.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,value:a,onChange:e=>o(e.target.value),placeholder:`you@example.com`,disabled:e.plan.included==null})}),(0,F.jsx)(`button`,{className:`btn btn-primary h-8 self-start`,disabled:e.plan.included==null,onClick:()=>t({thresholds:r.split(/[\s,%]+/).filter(Boolean).map(Number),notify:a}),children:`Save notifications`}),e.plan.included==null?(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:`Self-hosted has no allowance to notify about.`}):e.notified.length>0&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute`,children:`This month`}),e.notified.map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between`,children:[(0,F.jsxs)(`span`,{children:[`Passed `,e.pct,`%`]}),(0,F.jsxs)(`span`,{className:`text-ink2`,children:[AB(e.ts),` · `,Zi(e.used),` events`]})]},e.pct))]})]})})}function BB({report:e}){let t=e.byProject.flatMap(e=>e.apps.map(t=>({...t,project:e.name,key:`${e.slug}/${t.service}/${t.env??``}`}))),n=Math.max(1,...t.map(e=>e.billed)),r=(e,t)=>({key:e,label:t,num:!0,sort:t=>t[e],render:t=>Zi(t[e])}),i=[...e.byProject.length>1?[{key:`project`,label:`Project`,sort:e=>e.project,render:e=>e.project}]:[],{key:`app`,label:`App`,sort:e=>e.service,render:e=>(0,F.jsx)(`span`,{className:`font-medium`,children:e.service})},{key:`env`,label:`Environment`,sort:e=>e.env??``,render:e=>e.env??(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})},{key:`billed`,label:`Events`,num:!0,sort:e=>e.billed,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(Qa,{value:e.billed,max:n}),Zi(e.billed)]})},r(`requests`,`Requests`),r(`jobs`,`Jobs`),r(`errors`,`Errors`),r(`logs`,`Logs`),r(`spans`,`Spans`)];return(0,F.jsx)(V,{title:`By project and app`,sub:`This month`,pad:!1,children:(0,F.jsx)(qa,{rows:t,cols:i,initialSort:`billed`,rowKey:e=>e.key,empty:(0,F.jsx)(`div`,{className:`px-3.5 py-4 text-mute text-[12.5px]`,children:`No events yet this month.`})})})}var VB=e=>e==null?null:`$${e<1?e.toFixed(e<.01?4:2):e.toFixed(2)}`,HB=e=>e==null?``:String(e);function UB(){let e=I(),{data:t,error:n,reload:r}=P(`/api/ai/usage`,[e.tick]),[i,a]=(0,v.useState)({}),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!1);if((0,v.useEffect)(()=>{if(!t)return;let e=t.limits;a({perQuestion:HB(e.perQuestion),perHour:HB(e.perHour),historyTurns:HB(e.historyTurns),budgetUnit:e.budgetUnit,daily:HB(e.daily),monthly:HB(e.monthly),priceIn:HB(e.prices.input),priceOut:HB(e.prices.output),thresholds:e.thresholds.join(`, `),notify:e.notify})},[t]),n)return(0,F.jsx)(W,{error:n});if(!t)return null;let u=t,d=u.limits,f=e=>t=>{l(!1),a({...i,[e]:t.target.value})},p=async()=>{s(null);try{await N(`/api/ai/usage`,{method:`PUT`,json:{perQuestion:i.perQuestion,perHour:i.perHour||0,historyTurns:i.historyTurns,budgetUnit:i.budgetUnit,daily:i.daily.trim()||null,monthly:i.monthly.trim()||null,prices:{input:i.priceIn.trim()||null,output:i.priceOut.trim()||null},thresholds:i.thresholds.split(/[\s,%]+/).filter(Boolean).map(Number),notify:i.notify}}),await r(),e.reloadMeta(),l(!0)}catch(e){s(e.message)}},m=d.budgetUnit===`usd`,h=e=>m?VB(e):`${Zi(e)} tokens`,g=(e,t)=>(0,F.jsxs)(`div`,{className:`rounded-lg bg-[#14141b] border border-line px-3 py-2`,children:[(0,F.jsx)(`div`,{className:`text-[11px] text-mute`,children:e}),(0,F.jsxs)(`div`,{className:`text-[15px] font-semibold tabular-nums`,children:[Zi(t.tokens),` `,(0,F.jsx)(`span`,{className:`text-[11.5px] font-normal text-ink2`,children:`tokens`})]}),(0,F.jsxs)(`div`,{className:`text-[11.5px] text-ink2 tabular-nums`,children:[t.questions,` question`,t.questions===1?``:`s`,t.cost==null?``:` · ${VB(t.cost)}`]})]});return(0,F.jsx)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Li,{size:14,className:`text-brand`}),`Ask Obzeri`]}),sub:`Tokens on your own model key. Questions over MCP use the client's model and cost nothing here.`,right:u.blocked?(0,F.jsx)(G,{kind:`serious`,children:`Paused`}):null,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[u.blocked&&(0,F.jsx)(`div`,{className:`text-[12.5px] rounded-lg px-3 py-2 bg-[rgba(250,178,25,.08)] border border-[rgba(250,178,25,.25)]`,children:u.blocked.error}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-3 gap-2`,children:[g(`This month`,u.month),g(`Today`,u.today),(0,F.jsxs)(`div`,{className:`rounded-lg bg-[#14141b] border border-line px-3 py-2`,children:[(0,F.jsx)(`div`,{className:`text-[11px] text-mute`,children:`Per question, on average`}),(0,F.jsx)(`div`,{className:`text-[15px] font-semibold tabular-nums`,children:u.perQuestion==null?`—`:(0,F.jsxs)(F.Fragment,{children:[Zi(u.perQuestion),` `,(0,F.jsx)(`span`,{className:`text-[11.5px] font-normal text-ink2`,children:`tokens`})]})}),(0,F.jsxs)(`div`,{className:`text-[11.5px] text-ink2`,children:[`Capped at `,Zi(d.perQuestion)]})]})]}),(d.monthly!=null||d.daily!=null)&&(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-2 gap-4`,children:[d.monthly!=null&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,children:[(0,F.jsx)(`span`,{children:`Monthly budget`}),(0,F.jsxs)(`span`,{className:`text-ink2 tabular-nums`,children:[h(u.spent.month),` of `,h(d.monthly)]})]}),(0,F.jsx)(na,{used:u.spent.month,included:d.monthly,thresholds:d.thresholds,height:8})]}),d.daily!=null&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,children:[(0,F.jsx)(`span`,{children:`Daily budget`}),(0,F.jsxs)(`span`,{className:`text-ink2 tabular-nums`,children:[h(u.spent.today),` of `,h(d.daily)]})]}),(0,F.jsx)(na,{used:u.spent.today,included:d.daily,height:8})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-3 gap-x-4 gap-y-3 text-[12.8px]`,children:[(0,F.jsx)(K,{label:`Tokens per question`,hint:`Past this, Obzeri answers with what it has.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`numeric`,value:i.perQuestion??``,onChange:f(`perQuestion`)})}),(0,F.jsx)(K,{label:`Questions per hour, per browser`,hint:`0 turns the limit off.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`numeric`,value:i.perHour??``,onChange:f(`perHour`)})}),(0,F.jsx)(K,{label:`Earlier messages sent with a question`,hint:`Each one is sent again on every step.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`numeric`,value:i.historyTurns??``,onChange:f(`historyTurns`)})}),(0,F.jsx)(K,{label:`Budgets in`,children:(0,F.jsxs)(`select`,{className:`input h-8 w-full`,value:i.budgetUnit??`tokens`,onChange:f(`budgetUnit`),children:[(0,F.jsx)(`option`,{value:`tokens`,children:`Tokens`}),(0,F.jsx)(`option`,{value:`usd`,children:`Dollars (needs prices)`})]})}),(0,F.jsx)(K,{label:`Daily budget${i.budgetUnit===`usd`?` ($)`:``}`,hint:`Empty: none. Resets 00:00 UTC.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`decimal`,placeholder:`No limit`,value:i.daily??``,onChange:f(`daily`)})}),(0,F.jsx)(K,{label:`Monthly budget${i.budgetUnit===`usd`?` ($)`:``}`,hint:`Empty: none. Resets on the 1st.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`decimal`,placeholder:`No limit`,value:i.monthly??``,onChange:f(`monthly`)})}),(0,F.jsx)(K,{label:`Price per million input tokens ($)`,hint:`From your provider's price list for this model.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`decimal`,placeholder:`—`,value:i.priceIn??``,onChange:f(`priceIn`)})}),(0,F.jsx)(K,{label:`Price per million output tokens ($)`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`decimal`,placeholder:`—`,value:i.priceOut??``,onChange:f(`priceOut`)})}),(0,F.jsx)(`div`,{}),(0,F.jsx)(K,{label:`Notify at, % of the monthly budget (up to five)`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,placeholder:`50, 80, 100`,value:i.thresholds??``,onChange:f(`thresholds`)})}),(0,F.jsx)(K,{label:`Email to`,hint:`Needs email set up in Integrations → Email.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,placeholder:`you@example.com`,value:i.notify??``,onChange:f(`notify`)})}),(0,F.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,F.jsx)(`button`,{className:`btn btn-primary h-8`,onClick:p,children:`Save limits`}),c&&(0,F.jsx)(`span`,{className:`text-[12px]`,style:{color:`#3ccf7a`},children:`Saved`})]})]}),o&&(0,F.jsx)(`div`,{className:`text-[12.5px]`,style:{color:`#f2a0a0`},children:o}),(u.byModel.length>0||u.byProject.length>1)&&(0,F.jsx)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-2 gap-4 text-[12.5px]`,children:[[`By model`,u.byModel],[`By project`,u.byProject]].filter(([,e])=>e.length>0).map(([e,t])=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute mb-1`,children:e}),t.map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between py-1 border-b border-line last:border-0`,children:[(0,F.jsx)(`span`,{className:`mono text-[12px]`,children:e.name}),(0,F.jsxs)(`span`,{className:`text-ink2 tabular-nums`,children:[Zi(e.tokens),` tokens · `,e.questions,` q`,e.cost==null?``:` · ${VB(e.cost)}`]})]},e.name))]},e))})]})})}function WB(){let e=I(),[t,n]=(0,v.useState)(``),[r,i]=(0,v.useState)(`all`),{data:a,error:o}=P(`/api/functions${e.q()}`,[e.tick]),s=(a||[]).filter(e=>(r===`all`||e.kind===r)&&(!t||e.name.toLowerCase().includes(t.toLowerCase()))),c=Math.max(1,...s.map(e=>e.share));return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(vr,{size:18,className:`text-brand`}),title:`Services`,sub:`Time per service class method, route handler and middleware. Own time excludes awaited work (queries, HTTP calls, nested methods), so the top of this list is where your own code spends time.`}),(0,F.jsx)(GB,{}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Oi,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input pl-8 w-[260px] h-7`,placeholder:`Filter by name`,value:t,onChange:e=>n(e.target.value)})]}),(0,F.jsx)(Ka,{value:r,onChange:i,options:[{id:`all`,label:`All`},{id:`function`,label:`Class methods`},{id:`handler`,label:`Handlers`},{id:`middleware`,label:`Middleware`},{id:`custom`,label:`Custom spans`}]})]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:o?(0,F.jsx)(W,{error:o}):a?(0,F.jsx)(qa,{rows:s,initialSort:`self`,rowKey:e=>e.service+e.name+e.kind,empty:(0,F.jsxs)(U,{title:`No timed code yet`,children:[`Handlers and middleware are timed automatically, and so are classes exported from `,(0,F.jsx)(`span`,{className:`mono`,children:`*.service.ts`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`*.repository.ts`}),` files. For other files, set `,(0,F.jsx)(`span`,{className:`mono`,children:`autoInstrument`}),` globs or call `,(0,F.jsx)(`span`,{className:`mono`,children:`instrument(MyClass)`}),`.`]}),cols:[{key:`n`,label:`Name`,sort:e=>e.name,render:e=>{let t=rB[e.kind]||rB.function;return(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(t.Icon,{size:12,style:{color:t.color}}),(0,F.jsx)(`span`,{className:`mono text-[12px]`,children:e.name})]})}},{key:`k`,label:`Kind`,sort:e=>e.kind,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:e.kind===`function`?`Class method`:rB[e.kind]?.label})},{key:`s`,label:`Application`,sort:e=>e.service,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-ink2`,children:e.service}),(0,F.jsx)(mo,{app:e.service,web:!0})]})},{key:`calls`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`avgSelf`,label:`Avg own`,num:!0,sort:e=>e.avgSelf,render:e=>z(e.avgSelf)},{key:`avgTotal`,label:`Avg total`,num:!0,sort:e=>e.avgTotal,render:e=>z(e.avgTotal)},{key:`self`,label:`Own time`,num:!0,sort:e=>e.self,render:e=>z(e.self)},{key:`total`,label:`Total time`,num:!0,sort:e=>e.total,render:e=>z(e.total)},{key:`share`,label:`Share of own time`,num:!0,sort:e=>e.share,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`inline-block min-w-[44px]`,children:wa(e.share,1)}),(0,F.jsx)(Qa,{value:e.share,max:c,color:QR[4],w:70})]})},{key:`err`,label:`Errors`,num:!0,sort:e=>e.errors,render:e=>e.errors?(0,F.jsx)(`span`,{style:{color:`#ff8a8a`},children:B(e.errors)}):(0,F.jsx)(`span`,{className:`text-mute`,children:`0`})}]}):(0,F.jsx)(H,{})})})]})}function GB(){let e=I(),t=e.meta?.environments??[],n=(e.meta?.services??[]).filter(t=>!e.service||t.id===e.service).filter(n=>!e.env||t.find(t=>t.id===e.env)?.services.includes(n.id));return n.length?(0,F.jsx)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-2 @6xl:grid-cols-3 gap-3`,children:n.map(e=>{let n=Date.now()-e.lastSeen<9e5,r=t.filter(t=>t.services.includes(e.id)).map(e=>e.id);return(0,F.jsxs)(`div`,{className:`card px-4 py-3 flex flex-col gap-2 min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full shrink-0`,style:{background:n?`#3ccf7a`:`#5c5c70`},title:n?`Reporting`:`Last heard $<Ago ts={s.lastSeen} /> (${Da(e.lastSeen)})`}),(0,F.jsx)(`span`,{className:`font-medium text-[13.5px] truncate`,children:e.id}),(0,F.jsx)(`span`,{className:`flex-1`}),(0,F.jsx)(`span`,{className:`text-[11.5px] text-mute shrink-0`,children:n?`reporting`:(0,F.jsx)(io,{ts:e.lastSeen})})]}),(0,F.jsx)(po,{frameworks:e.frameworks}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute truncate`,children:[e.node?`Node ${e.node.replace(/^v/,``)}`:null,`${e.instances.length} instance${e.instances.length===1?``:`s`}`,r.length?r.join(`, `):e.environment].filter(Boolean).join(` · `)})]},e.id)})}):null}function KB(){let[e,t]=zn(),n=ht(),{data:r,error:i,reload:a}=P(`/api/projects`),[o,s]=(0,v.useState)(e.get(`new`)===`1`),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),f=e.get(`project`)||`default`,p=()=>{if(s(!1),e.get(`new`)){let n=new URLSearchParams(e);n.delete(`new`),t(n,{replace:!0})}};return i?(0,F.jsx)(W,{error:i}):r?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(Ur,{size:18,className:`text-brand`}),title:`Projects`,sub:`Each project has its own apps, ingest keys, alerts, SLOs, issues, status pages, integrations and MCP token. Nothing is shared between projects.`,right:(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>s(!0),children:[(0,F.jsx)(yi,{size:14}),`New project`]})}),(0,F.jsx)(V,{pad:!1,children:(0,F.jsx)(qa,{rows:r,cols:[{key:`n`,label:`Project`,render:e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium`,children:e.name}),e.isDefault&&(0,F.jsx)(`span`,{className:`pill`,children:`default`}),e.slug===f&&(0,F.jsx)(G,{kind:`good`,children:`current`})]})},{key:`s`,label:`Slug`,render:e=>(0,F.jsx)(`span`,{className:`mono text-ink2`,children:e.slug})},{key:`a`,label:`Apps`,num:!0,render:e=>e.apps},{key:`l`,label:`Last data`,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.lastSeen?(0,F.jsx)(io,{ts:e.lastSeen}):`—`})},{key:`x`,label:``,render:t=>(0,F.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[t.slug!==f&&(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>n(Sa(t.slug,`/`,e)),children:[`Open`,(0,F.jsx)(fr,{size:12})]}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Rename`,onClick:()=>d(t),children:(0,F.jsx)(hi,{size:13})}),!t.isDefault&&(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2 text-[#ff8a8a]`,title:`Delete`,onClick:async()=>{window.prompt(`Delete "${t.name}" and all of its data (apps, alerts, issues, status pages, keys)? This cannot be undone.\n\nType the slug "${t.slug}" to confirm.`)===t.slug&&(await N(`/api/projects/${t.slug}`,{method:`DELETE`}),t.slug===f?n(Sa(`default`,`/projects`,e)):a())},children:(0,F.jsx)(Bi,{size:13})})]})}]})}),o&&(0,F.jsx)(qB,{onClose:p,onCreated:e=>{p(),l(e),a()}}),c&&(0,F.jsx)(JB,{project:c,onClose:()=>l(null),onOpen:()=>{l(null),n(Sa(c.slug,`/settings`,e))}}),u&&(0,F.jsx)(YB,{project:u,onClose:()=>d(null),onSaved:()=>{d(null),a()}})]}):(0,F.jsx)(H,{})}function qB({onClose:e,onCreated:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``);return(0,F.jsx)(eo,{open:!0,title:`New project`,onClose:e,children:(0,F.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:async e=>{e.preventDefault();try{t(await N(`/api/projects`,{method:`POST`,json:{name:n}}))}catch(e){a(e.message)}},children:[(0,F.jsx)(K,{label:`Name`,hint:`a product, a client or a team`,children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,value:n,onChange:e=>r(e.target.value),placeholder:`Acme Shop`})}),i&&(0,F.jsx)(`div`,{className:`text-[12.5px] text-[#ff8a8a]`,children:i}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{type:`button`,className:`btn`,onClick:e,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:!n.trim(),children:`Create`})]})]})})}function JB({project:e,onClose:t,onOpen:n}){let r=`OBZERVER_KEY=${e.ingestKey} OBZERVER_ENDPOINT=${window.location.origin} \\\n node --import @obzerver/node/register server.js`;return(0,F.jsx)(eo,{open:!0,title:`"${e.name}" is ready`,onClose:t,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 text-[13px]`,children:[(0,F.jsx)(`div`,{className:`text-ink2`,children:`Apps that send data with this project's ingest key show up only here.`}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-ink2 text-[12px]`,children:`Ingest key`}),(0,F.jsx)(Ga,{text:e.ingestKey,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:e.ingestKey})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-ink2 text-[12px]`,children:`Start an app with it`}),(0,F.jsx)(Ga,{text:r,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:r})]}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:t,children:`Stay here`}),(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:n,children:[`Open project setup`,(0,F.jsx)(fr,{size:13})]})]})]})})}function YB({project:e,onClose:t,onSaved:n}){let[r,i]=(0,v.useState)(e.name),[a,o]=(0,v.useState)(``);return(0,F.jsx)(eo,{open:!0,title:`Rename project`,onClose:t,children:(0,F.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:async t=>{t.preventDefault();try{await N(`/api/projects/${e.slug}`,{method:`PATCH`,json:{name:r}}),n()}catch(e){o(e.message)}},children:[(0,F.jsx)(K,{label:`Name`,hint:(0,F.jsxs)(F.Fragment,{children:[`the slug `,(0,F.jsx)(`span`,{className:`mono`,children:e.slug}),` stays, so links and keys keep working`]}),children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,value:r,onChange:e=>i(e.target.value)})}),a&&(0,F.jsx)(`div`,{className:`text-[12.5px] text-[#ff8a8a]`,children:a}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{type:`button`,className:`btn`,onClick:t,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:!r.trim(),children:`Save`})]})]})})}function XB(){let e=I(),[t,n]=(0,v.useState)(`db`),[r,i]=(0,v.useState)(null),a=P(t===`db`?`/api/queries${e.q()}`:null,[e.tick,t]),o=P(t===`http`?`/api/outbound${e.q()}`:null,[e.tick,t]);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(Br,{size:18,className:`text-brand`}),title:`Queries & dependencies`,sub:`Statements from pg, mysql2 and ioredis with literal values stripped in-process, plus outbound HTTP calls (http, https, fetch).`,right:(0,F.jsx)(Ka,{value:t,onChange:n,options:[{id:`db`,label:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Br,{size:12}),`Database`]})},{id:`http`,label:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Kr,{size:12}),`Outbound HTTP`]})}]})}),t===`db`?(0,F.jsx)(V,{pad:!1,children:a.error?(0,F.jsx)(W,{error:a.error}):a.data?(0,F.jsx)(qa,{rows:a.data,initialSort:`total`,rowKey:e=>e.service+e.statement,onRow:e=>i(r===e.service+e.statement?null:e.service+e.statement),empty:(0,F.jsx)(U,{title:`No queries recorded`,children:`pg, mysql2 and ioredis are instrumented automatically when installed.`}),cols:[{key:`st`,label:`Statement`,render:e=>(0,F.jsxs)(`div`,{className:`max-w-[640px]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`mono text-[12px] truncate`,children:e.statement}),e.nPlusOne&&(0,F.jsx)(G,{kind:`serious`,children:`N+1 suspect`})]}),r===e.service+e.statement&&(0,F.jsxs)(`div`,{className:`mt-2`,onClick:e=>e.stopPropagation(),children:[(0,F.jsx)(`div`,{className:`flex justify-end mb-1`,children:(0,F.jsx)(Ga,{text:e.statement,className:`btn h-6 text-[11px]`})}),(0,F.jsx)(aB,{text:e.statement})]})]})},{key:`sys`,label:`System`,sort:e=>e.system,render:e=>(0,F.jsx)(`span`,{className:`pill`,children:e.system})},{key:`svc`,label:`Application`,sort:e=>e.service,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.service})},{key:`calls`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`per`,label:`Per request`,num:!0,sort:e=>e.perRequest,render:e=>(0,F.jsxs)(`span`,{title:`max ${e.maxPerRequest} in one request`,style:{color:e.nPlusOne?`#ffb38a`:void 0},children:[B(e.perRequest),` `,(0,F.jsxs)(`span`,{className:`text-mute text-[11px]`,children:[`max `,e.maxPerRequest]})]})},{key:`avg`,label:`Avg`,num:!0,sort:e=>e.avg,render:e=>z(e.avg)},{key:`p95`,label:`p95`,num:!0,sort:e=>e.p95,render:e=>z(e.p95)},{key:`total`,label:`Total time`,num:!0,sort:e=>e.total,render:e=>z(e.total)}]}):(0,F.jsx)(H,{})}):(0,F.jsx)(V,{pad:!1,children:o.error?(0,F.jsx)(W,{error:o.error}):o.data?(0,F.jsx)(qa,{rows:o.data,initialSort:`calls`,empty:(0,F.jsx)(U,{title:`No outbound calls recorded`}),cols:[{key:`h`,label:`Host`,sort:e=>e.host,render:e=>(0,F.jsx)(`span`,{className:`mono`,children:e.host})},{key:`s`,label:`Called from`,sort:e=>e.service,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.service})},{key:`calls`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`err`,label:`Failures`,num:!0,sort:e=>e.errors,render:e=>e.errors?(0,F.jsxs)(`span`,{style:{color:`#ff8a8a`},children:[B(e.errors),` (`,wa(e.errors/e.calls*100),`)`]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`0`})},{key:`avg`,label:`Avg`,num:!0,sort:e=>e.avg,render:e=>z(e.avg)},{key:`p95`,label:`p95`,num:!0,sort:e=>e.p95,render:e=>z(e.p95)}]}):(0,F.jsx)(H,{})})]})}var ZB=({children:e})=>(0,F.jsx)(`code`,{className:`mono text-[11.5px] text-ink2 bg-[#1b1b24] border border-line rounded px-1 py-[1px]`,children:e});function QB({name:e,guessed:t,more:n=0,strong:r}){return e?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 whitespace-nowrap`,children:[(0,F.jsx)(`span`,{className:r?`font-medium`:`text-ink2`,children:e}),t&&(0,F.jsx)(`span`,{className:`text-[10.5px] text-mute border border-line rounded px-1 py-[0.5px]`,title:`No tenant was set for these requests; this is the email domain`,children:`email domain`}),n>0&&(0,F.jsxs)(`span`,{className:`text-[11px] text-mute`,children:[`+`,n]})]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})}function $B(){let e=I(),t=L(),n=ht(),[r,i]=(0,v.useState)(`user`),[a]=zn(),[o,s]=(0,v.useState)(()=>a.get(`tenant`)??``),{data:c,error:l}=P(`/api/users${e.q({groupBy:r===`tenant`?`tenant`:``})}`,[e.tick,r]),u=o.toLowerCase(),d=c?c.filter(e=>r===`user`==(e.userId!==void 0)):null,f=!!d&&(d.length>0||!c.length),p=(d||[]).filter(e=>!o||(r===`user`?[e.userId,e.tenant]:[e.tenant]).some(e=>e&&String(e).toLowerCase().includes(u)));return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(Gi,{size:18,className:`text-brand`}),title:`Users`,sub:(0,F.jsxs)(`span`,{className:`flex flex-col gap-1.5 mt-0.5`,children:[(0,F.jsxs)(`span`,{children:[`Who is affected. Users come from `,(0,F.jsx)(ZB,{children:`req.user.id`}),`, `,(0,F.jsx)(ZB,{children:`http.getUserId`}),` or `,(0,F.jsx)(ZB,{children:`obzerver.setUser()`}),`.`]}),(0,F.jsxs)(`span`,{children:[`Tenants come from `,(0,F.jsx)(ZB,{children:`req.user.tenantId`}),` / `,(0,F.jsx)(ZB,{children:`orgId`}),`, `,(0,F.jsx)(ZB,{children:`http.getTenantId`}),` or `,(0,F.jsx)(ZB,{children:`obzerver.setTenant()`}),`; without them, the email domain.`]})]})}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Oi,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input pl-8 w-[260px] h-7`,placeholder:r===`user`?`Filter users or tenants`:`Filter tenants`,value:o,onChange:e=>s(e.target.value)})]}),(0,F.jsx)(Ka,{value:r,onChange:i,options:[{id:`user`,label:`By user`},{id:`tenant`,label:`By tenant`}]})]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:l?(0,F.jsx)(W,{error:l}):f?r===`user`?(0,F.jsx)(qa,{rows:p,initialSort:`c`,onRow:e=>n(t(`/users/${ja(e.userId)}`)),rowKey:e=>e.userId,paged:!0,noun:`users`,resetKey:`${o}|${r}|${e.service}|${e.env}`,empty:d.length>0?(0,F.jsx)(U,{title:`No users match the filter`,children:`Change or clear the filter above to see more.`}):(0,F.jsx)(U,{title:`No identified users`,children:`Set http.getUserId in the SDK options, or populate req.user.`}),cols:[{key:`u`,label:`User`,sort:e=>e.userId,render:e=>(0,F.jsx)(`span`,{className:`font-medium`,children:e.userId})},{key:`t`,label:`Tenant`,sort:e=>e.tenant||``,render:e=>e.tenant?(0,F.jsx)(Nn,{to:t(Ma(e.tenant,e.tenantGuessed)),onClick:e=>e.stopPropagation(),className:`hover:underline decoration-dotted underline-offset-4`,children:(0,F.jsx)(QB,{name:e.tenant,guessed:e.tenantGuessed,more:e.tenants>1?e.tenants-1:0})}):(0,F.jsx)(QB,{name:null})},{key:`c`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`o`,label:`Operations`,num:!0,sort:e=>e.operations,render:e=>B(e.operations)},{key:`f`,label:`Failure rate`,num:!0,sort:e=>e.failureRate,render:e=>(0,F.jsxs)(`span`,{style:{color:e.failureRate>2?`#ff8a8a`:e.failureRate>0?`var(--color-ink2)`:`var(--color-mute)`},children:[wa(e.failureRate),` `,(0,F.jsxs)(`span`,{className:`text-mute text-[11px]`,children:[`(`,e.failed,`)`]})]})},{key:`a`,label:`Avg latency`,num:!0,sort:e=>e.avg,render:e=>z(e.avg)},{key:`l`,label:`Last seen`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:(0,F.jsx)(io,{ts:e.lastSeen})})}]},`users`):(0,F.jsx)(qa,{rows:p,initialSort:`n`,rowKey:e=>`${e.tenant}|${e.guessed}`,onRow:e=>{e.tenant!==`(no tenant)`&&n(t(Ma(e.tenant,e.guessed)))},paged:!0,noun:`tenants`,resetKey:`${o}|${r}|${e.service}|${e.env}`,empty:d.length>0?(0,F.jsx)(U,{title:`No tenants match the filter`,children:`Change or clear the filter above to see more.`}):(0,F.jsx)(U,{title:`No tenants yet`,children:`Set http.getTenantId in the SDK options, or req.user.tenantId; without them, users are grouped by email domain.`}),cols:[{key:`c`,label:`Tenant`,sort:e=>e.tenant,render:e=>(0,F.jsx)(QB,{name:e.tenant,guessed:e.guessed,strong:!0})},{key:`u`,label:`Users`,num:!0,sort:e=>e.users,render:e=>B(e.users)},{key:`n`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`f`,label:`Failure rate`,num:!0,sort:e=>e.failureRate,render:e=>(0,F.jsxs)(`span`,{style:{color:e.failureRate>2?`#ff8a8a`:void 0},children:[wa(e.failureRate),` `,(0,F.jsxs)(`span`,{className:`text-mute text-[11px]`,children:[`(`,e.failed,`)`]})]})},{key:`l`,label:`Last seen`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(io,{ts:e.lastSeen})}]},`tenants`):(0,F.jsx)(H,{})})})]})}function eV(e){let t=new Date(e),n=t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hour12:!1});return`${t.getDate()}/${t.getMonth()+1} ${n}`}function tV(e){if(e<6e4)return`<1m`;let t=Math.round(e/6e4);return t<60?`${t}m`:`${Math.floor(t/60)}h${t%60?` ${t%60}m`:``}`}function nV(e){return`Session #${e.n} · ${eV(e.start)} (${tV(e.end-e.start)})`}function rV({s:e,sticky:t,open:n,onClick:r}){return(0,F.jsxs)(`div`,{onClick:r,role:r?`button`:void 0,"aria-expanded":r?!!n:void 0,className:`flex items-center justify-between gap-3 px-3.5 py-2 border-b border-line ${n?`bg-[#17171f]`:`bg-[#111118]`} ${t?`sticky top-0 z-[1]`:``} ${r?`cursor-pointer hover:bg-[#191922] select-none`:``}`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-ink text-[12.5px] font-medium tabular-nums`,children:[r&&(0,F.jsx)(n?Er:Or,{size:14,className:n?`text-brand`:`text-mute`}),nV(e)]}),(0,F.jsxs)(`span`,{className:`flex items-center gap-2.5 text-mute text-[11.5px] tabular-nums whitespace-nowrap`,children:[B(e.actions),` `,e.actions===1?`action`:`actions`,e.failed>0&&(0,F.jsxs)(`span`,{className:`text-[11px] font-medium px-1.5 py-[1px] rounded`,style:{color:`var(--color-crit)`,background:`color-mix(in srgb, var(--color-crit) 16%, transparent)`},children:[B(e.failed),` failed`]})]})]})}function iV({items:e}){let t=ht(),n=L();return(0,F.jsx)(F.Fragment,{children:e.map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-3 px-3.5 py-1.5 border-b border-[#1b1b23] hover:bg-[#16161e] cursor-pointer`,onClick:()=>t(n(`/executions/${e.id}`)),children:[(0,F.jsx)(`span`,{className:`mono text-mute text-[11.5px] w-16`,children:Oa(e.ts)}),(0,F.jsxs)(`span`,{className:`flex-1 min-w-0 flex items-center`,children:[(0,F.jsx)(Wa,{name:e.name}),e.error_message&&(0,F.jsx)(`span`,{className:`text-[#ff9b9b] text-[12px] ml-2 truncate`,children:e.error_message})]}),(0,F.jsx)(Ha,{status:e.status}),(0,F.jsx)(`span`,{className:`w-16 text-right tabular-nums`,children:z(e.duration)})]},e.id))})}function aV({s:e}){return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(rV,{s:e,sticky:!0}),(0,F.jsx)(iV,{items:e.items||[]})]})}function oV({ts:e}){let t=e!=null&&Date.now()-e<3e5;return(0,F.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-line bg-panel px-3.5 py-2`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full ${t?`bg-good shadow-[0_0_0_3px_rgba(12,163,12,0.25)]`:`bg-mute`}`}),(0,F.jsxs)(`div`,{className:`leading-tight`,children:[(0,F.jsx)(`div`,{className:`text-[10.5px] uppercase tracking-wider text-mute`,children:`Last seen`}),(0,F.jsx)(`div`,{className:`text-ink text-[14px] font-semibold`,children:e?t?`Active now`:(0,F.jsx)(io,{ts:e}):`Never`})]}),e!=null&&(0,F.jsx)(`div`,{className:`text-mute text-[11.5px] tabular-nums pl-3 border-l border-line`,children:Oa(e,!0)})]})}function sV(){let{id:e=``}=yt(),t=I(),n=L(),r=ht(),{data:i,error:a}=P(`/api/users/${encodeURIComponent(e)}${t.q()}`,[t.tick]);if(a)return(0,F.jsx)(W,{error:a});if(!i)return(0,F.jsx)(H,{});let o=i.sessions,s=i.sessionCount>o.length;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Nn,{to:n(`/users`),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:`← Users`}),(0,F.jsx)(Ra,{title:e,sub:i.tenants.length?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[`tenant `,i.tenants.map((e,t)=>(0,F.jsxs)(`span`,{children:[t>0&&`, `,(0,F.jsx)(Nn,{to:n(Ma(e,i.tenantGuessed)),className:`text-ink2 hover:text-ink underline decoration-dotted underline-offset-4`,children:e})]},e)),i.tenantGuessed&&(0,F.jsx)(`span`,{className:`text-[10.5px] text-mute border border-line rounded px-1 py-[0.5px]`,children:`email domain`})]}):void 0,right:(0,F.jsx)(oV,{ts:i.lastSeen})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-4 gap-3`,children:[(0,F.jsx)(Ba,{label:`Actions in window`,value:B(i.actionCount)}),(0,F.jsx)(Ba,{label:`Failed`,value:B(i.failedCount),color:i.failedCount?`#ff8a8a`:void 0}),(0,F.jsx)(Ba,{label:`Sessions`,value:B(i.sessionCount)}),(0,F.jsx)(Ba,{label:`Distinct errors`,value:B(i.errors.length)})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:`Activity replay`,sub:s?`latest ${o.length} of ${B(i.sessionCount)} sessions, newest first`:`newest first`,pad:!1,className:`@5xl:col-span-2`,right:i.sessionCount>0&&(0,F.jsxs)(Nn,{to:n(`/users/${encodeURIComponent(e)}/sessions`),className:`text-[12px] text-ink2 hover:text-ink border border-line hover:border-line2 rounded-md px-2.5 py-1 whitespace-nowrap`,children:[`All sessions (`,B(i.sessionCount),`) →`]}),children:o.length===0?(0,F.jsx)(U,{title:`No activity in this window`}):(0,F.jsx)(`div`,{className:`max-h-[560px] overflow-auto`,children:o.map(e=>(0,F.jsx)(aV,{s:e},e.n))})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(V,{title:`Actions`,pad:!1,children:(0,F.jsx)(qa,{rows:i.operations,cols:[{key:`n`,label:`Operation`,render:e=>(0,F.jsx)(Wa,{name:e.name})},{key:`c`,label:`Calls`,num:!0,render:e=>B(e.calls)},{key:`f`,label:`Failed`,num:!0,render:e=>e.failed?(0,F.jsx)(`span`,{style:{color:`#ff8a8a`},children:e.failed}):(0,F.jsx)(`span`,{className:`text-mute`,children:`0`})}]})}),(0,F.jsx)(V,{title:`Common paths`,sub:`action → next action`,pad:!1,children:i.paths.length?i.paths.map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between gap-2 px-3.5 py-1.5 border-b border-[#1b1b23] text-[12px]`,children:[(0,F.jsx)(`span`,{className:`mono truncate`,children:e.path}),(0,F.jsx)(`span`,{className:`tabular-nums text-ink2`,children:e.n})]},e.path)):(0,F.jsx)(U,{title:`Not enough actions`})}),i.errors.length>0&&(0,F.jsx)(V,{title:`Errors hit`,pad:!1,children:(0,F.jsx)(qa,{rows:i.errors,onRow:e=>r(n(`/errors/${e.fingerprint}`)),cols:[{key:`c`,label:`Error`,render:e=>(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:e.class})},{key:`n`,label:`Count`,num:!0,render:e=>e.n}]})})]})]})]})}function cV({id:e,n:t}){let n=I(),r=n.q(),{data:i,error:a}=P(`/api/users/${encodeURIComponent(e)}/sessions${r}${r?`&`:`?`}session=${t}`,[n.tick,t]);return a?(0,F.jsx)(`div`,{className:`px-4 py-3 text-[#ff8a8a] text-[12px] border-b border-line`,children:a.message}):i?.session?(0,F.jsx)(`div`,{className:`bg-[#0f0f15] border-b border-line`,children:(0,F.jsx)(iV,{items:i.session.items})}):(0,F.jsx)(`div`,{className:`py-3 border-b border-line`,children:(0,F.jsx)(H,{})})}function lV(){let{id:e=``}=yt(),t=I(),n=L(),[r,i]=zn(),a=Number(r.get(`session`))||0,[o,s]=Ya(),[c,l]=(0,v.useState)(0),u=`/api/users/${encodeURIComponent(e)}`,{data:d,error:f}=P(`${u}/sessions${t.q()}`,[t.tick]),p=P(`${u}${t.q()}`,[t.tick]);if(f)return(0,F.jsx)(W,{error:f});if(!d)return(0,F.jsx)(H,{});let m=d.sessions,h=Math.max(1,Math.ceil(m.length/o)),g=Math.min(c,h-1),_=m.slice(g*o,g*o+o),y=e=>{let t=new URLSearchParams(r);e===a?t.delete(`session`):t.set(`session`,String(e)),i(t,{replace:!0})};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 @5xl:w-4/5`,children:[(0,F.jsxs)(Nn,{to:n(`/users/${encodeURIComponent(e)}`),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:[`← `,e]}),(0,F.jsx)(Ra,{title:`Sessions`,sub:(0,F.jsxs)(F.Fragment,{children:[e,` · `,B(m.length),` `,m.length===1?`session`:`sessions`,` in this window · a new session starts after 30 minutes without actions`]}),right:p.data&&(0,F.jsx)(oV,{ts:p.data.lastSeen})}),(0,F.jsx)(V,{title:`All sessions`,sub:`newest first · click a session to see its actions`,pad:!1,children:m.length===0?(0,F.jsx)(U,{title:`No sessions in this window`}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`border-t border-line`,children:_.map(t=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(rV,{s:t,open:t.n===a,onClick:()=>y(t.n)}),t.n===a&&(0,F.jsx)(cV,{id:e,n:t.n})]},t.n))}),(0,F.jsx)(Xa,{total:m.length,page:g,size:o,onPage:l,onSize:e=>{s(e),l(0)},noun:`sessions`})]})})]})}var uV={open:{kind:`crit`,label:`Open`},in_progress:{kind:`warn`,label:`In progress`},verifying:{kind:`serious`,label:`Verifying`},unverified:{kind:`neutral`,label:`Unverified`},resolved:{kind:`good`,label:`Resolved`},closed:{kind:`good`,label:`Closed`}},dV={critical:`#d03b3b`,high:`#ec835a`,medium:`#fab219`,low:`#82829a`};function fV(){let e=I(),t=L(),n=ht(),[r,i]=(0,v.useState)(`active`),[a,o]=(0,v.useState)(!1),{data:s,error:c}=P(`/api/issues`,[e.tick]);if(c)return(0,F.jsx)(W,{error:c});if(!s)return(0,F.jsx)(H,{});let l=s.filter(e=>r===`all`||(r===`active`?![`closed`,`resolved`].includes(e.status):[`closed`,`resolved`].includes(e.status)));return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(Pr,{size:18,className:`text-brand`}),title:`Issues`,sub:`Track what needs fixing. Issues linked to an error or route verify themselves against the next release and close or reopen automatically.`,right:(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>o(!0),children:[(0,F.jsx)(yi,{size:14}),`New issue`]})}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsx)(Ka,{value:r,onChange:i,options:[{id:`active`,label:`Active`},{id:`done`,label:`Done`},{id:`all`,label:`All`}]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:(0,F.jsx)(qa,{rows:l,onRow:e=>n(t(`/issues/${e.id}`)),empty:(0,F.jsx)(U,{title:`No issues`,children:`Create one from an error group, a failed execution, or let an alert open it.`}),cols:[{key:`id`,label:`#`,render:e=>(0,F.jsxs)(`span`,{className:`text-mute`,children:[`#`,e.id]}),width:50},{key:`t`,label:`Title`,render:e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-medium`,children:e.title}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[e.service||`no service`,e.sourceType?` · from ${e.sourceType}`:``]})]})},{key:`s`,label:`Status`,render:e=>(0,F.jsx)(G,{kind:uV[e.status]?.kind||`neutral`,children:uV[e.status]?.label||e.status})},{key:`sev`,label:`Severity`,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 capitalize`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full`,style:{background:dV[e.severity]}}),e.severity]})},{key:`tk`,label:`Ticket`,render:e=>e.ticket?(0,F.jsx)(mz,{ticket:e.ticket}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})},{key:`o`,label:`Owner`,render:e=>e.owner||(0,F.jsx)(`span`,{className:`text-mute`,children:`unassigned`})},{key:`d`,label:`Due`,render:e=>e.due?(0,F.jsx)(`span`,{style:{color:e.due<Date.now()&&![`closed`,`resolved`].includes(e.status)?`#ff8a8a`:void 0},children:Oa(e.due,!0).split(` `).slice(0,2).join(` `)}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})},{key:`u`,label:`Updated`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(io,{ts:e.updated})})}]})})}),a&&(0,F.jsx)(pV,{onClose:()=>o(!1),onCreated:e=>n(t(`/issues/${e}`))})]})}function pV({onClose:e,onCreated:t}){let n=I(),[r,i]=(0,v.useState)({title:``,severity:`medium`,owner:``,description:``,service:``,sourceType:``,sourceRef:``}),{settings:a,connected:o}=fz(),[s,c]=(0,v.useState)(null),l=s??(a?.autoCreate||``),[u,d]=(0,v.useState)(``);return(0,F.jsx)(eo,{open:!0,onClose:e,title:`New issue`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(K,{label:`Title`,children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,value:r.title,onChange:e=>i({...r,title:e.target.value})})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,F.jsx)(K,{label:`Severity`,children:(0,F.jsx)(`select`,{className:`select`,value:r.severity,onChange:e=>i({...r,severity:e.target.value}),children:Object.keys(dV).map(e=>(0,F.jsx)(`option`,{children:e},e))})}),(0,F.jsx)(K,{label:`Owner`,children:(0,F.jsx)(`input`,{className:`input`,value:r.owner,onChange:e=>i({...r,owner:e.target.value})})}),(0,F.jsx)(K,{label:`Application`,children:(0,F.jsxs)(`select`,{className:`select`,value:r.service,onChange:e=>i({...r,service:e.target.value}),children:[(0,F.jsx)(`option`,{value:``,children:`—`}),n.meta?.services.map(e=>(0,F.jsx)(`option`,{children:e.id},e.id))]})}),(0,F.jsx)(K,{label:`Measurable route (optional)`,hint:`e.g. "POST /checkout" enables auto-verification`,children:(0,F.jsx)(`input`,{className:`input`,value:r.sourceRef,onChange:e=>i({...r,sourceRef:e.target.value,sourceType:e.target.value?`operation`:``})})})]}),(0,F.jsx)(K,{label:`Description`,children:(0,F.jsx)(`textarea`,{className:`input`,rows:4,value:r.description,onChange:e=>i({...r,description:e.target.value})})}),o.length>0&&(0,F.jsx)(K,{label:`Also create a ticket in`,children:(0,F.jsxs)(`select`,{className:`select w-56`,value:l,onChange:e=>c(e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:`Don't create a ticket`}),o.map(e=>(0,F.jsx)(`option`,{value:e,children:dz[e]},e))]})}),u&&(0,F.jsx)(`div`,{className:`text-[12.5px] text-[#ff8a8a]`,children:u}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:e,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:!r.title,onClick:async()=>{let e=await N(`/api/issues`,{method:`POST`,json:{...r,tracker:l||void 0}});e.ticketError&&window.alert(`Issue #${e.id} was created, but the ticket was not: ${e.ticketError}`),t(e.id)},children:`Create`})]})]})})}function mV(e,t){let n=Aa(e,t);return n?{deltaText:n.text,deltaDir:n.dir,deltaTitle:`Compared with the previous period of the same length`}:{}}function hV(e,t,n,r=``){if(e==null||t==null)return null;let i=e=>`${n(e)}${r}`,a=t===0?e===0?1:1/0:e/t;return e===0||a>=.9&&a<=1.1?{text:`all tenants: ${n(t)}${r?` (${r.slice(2)})`:``}`,worse:!1}:Number.isFinite(a)?{text:a>1?`${a.toFixed(1)}× all tenants (${i(t)})`:`${Math.round((1-a)*100)}% below all tenants (${i(t)})`,worse:a>1.1}:{text:`all tenants: ${n(t)}${r?` (${r.slice(2)})`:``}`,worse:!0}}function gV(){let{id:e=``}=yt(),[t]=zn(),n=t.get(`guessed`)===`1`,r=I(),i=ht(),a=L(),o=r.q(),{data:s,error:c}=P(`/api/tenants/${ja(e)}${o}${n?`${o?`&`:`?`}guessed=1`:``}`,[r.tick,n]);if(c)return(0,F.jsx)(W,{error:c});if(!s)return(0,F.jsx)(H,{});let l=s.kpis,u=hV(l.failureRate,l.allFailureRate,e=>wa(e),`, ${B(l.allFailed)} ${l.allFailed===1?`failure`:`failures`}`),d=hV(l.p95,l.allP95,e=>z(e)),f=a(`/users?tenant=${ja(e)}`);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Nn,{to:a(`/users`),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:`← Users`}),(0,F.jsx)(Ra,{icon:(0,F.jsx)(xr,{size:18}),title:e,sub:n?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[`Tenant `,(0,F.jsx)(`span`,{className:`text-[10.5px] text-mute border border-line rounded px-1 py-[0.5px]`,children:`email domain`}),` requests without a tenant, from users `,(0,F.jsxs)(`span`,{className:`mono`,children:[`@`,e]})]}):`Tenant`,right:(0,F.jsx)(oV,{ts:s.lastSeen})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-3 @6xl:grid-cols-5 gap-3`,children:[(0,F.jsx)(Ba,{label:`Requests`,value:B(l.requests),...mV(l.requests,l.prevRequests),badWhen:`none`,sub:l.prevRequests?`${B(l.prevRequests)} in the previous period`:`no data for the previous period`}),(0,F.jsx)(Ba,{label:`Failure rate`,value:(0,F.jsxs)(F.Fragment,{children:[wa(l.failureRate),l.failed>0&&(0,F.jsxs)(`span`,{className:`text-mute text-[12px] font-normal ml-1.5`,children:[B(l.failed),` failed`]})]}),color:l.failureRate>0&&u?.worse?`#ff8a8a`:void 0,...mV(l.failureRate,l.prevFailureRate),badWhen:`up`,sub:u?(0,F.jsx)(`span`,{className:l.failureRate>0&&u.worse?`text-[#ff8a8a]`:``,children:u.text}):void 0}),(0,F.jsx)(Ba,{label:`p95 latency`,value:z(l.p95),color:d?.worse?`#ffb27a`:void 0,...mV(l.p95,l.prevP95),badWhen:`up`,sub:d?(0,F.jsx)(`span`,{className:d.worse?`text-[#ffb27a]`:``,children:d.text}):void 0}),(0,F.jsx)(Ba,{label:`Active users`,value:B(l.users),...mV(l.users,l.prevUsers),badWhen:`down`,sub:l.prevRequests?`${B(l.prevUsers)} in the previous period`:`no data for the previous period`,onClick:()=>i(f)}),(0,F.jsx)(Ba,{label:`Errors`,value:B(l.errors),color:l.errors?`#ff8a8a`:void 0,sub:l.incidents?`${l.incidents} open ${l.incidents===1?`incident`:`incidents`}`:`no open incidents`})]}),(0,F.jsx)(rz,{title:`Requests`,sub:`requests and failures over time`,series:[{key:`count`,label:`Requests`,color:QR[0]},{key:`failed`,label:`Failed`,color:$R.crit}],children:(0,F.jsx)(nz,{data:s.series.points,height:170,series:[{key:`count`,label:`Requests`,color:QR[0],type:`area`},{key:`failed`,label:`Failed`,color:$R.crit,type:`line`}],fmt:e=>B(e)})}),s.incidents.length>0&&(0,F.jsx)(V,{title:`Open incidents`,sub:`from errors that hit this tenant`,pad:!1,children:(0,F.jsx)(qa,{rows:s.incidents,rowKey:e=>e.id,onRow:e=>i(a(`/issues/${e.id}`)),cols:[{key:`t`,label:`Incident`,render:e=>(0,F.jsx)(`span`,{className:`text-ink`,children:e.title})},{key:`s`,label:`Status`,render:e=>(0,F.jsx)(G,{kind:uV[e.status]?.kind||`neutral`,children:uV[e.status]?.label||e.status})},{key:`u`,label:`Updated`,num:!0,render:e=>(0,F.jsx)(io,{ts:e.updated,className:`text-mute`})}]})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-3 items-start`,children:[(0,F.jsx)(V,{title:`Operations`,sub:`what this tenant uses, busiest first`,pad:!1,children:(0,F.jsx)(qa,{rows:s.operations,paged:!0,noun:`operations`,resetKey:`${e}|${r.service}|${r.env}`,initialSort:`c`,rowKey:e=>`${e.service}|${e.name}`,onRow:e=>i(a(Yz(e.kind,e.service,e.name))),empty:(0,F.jsx)(U,{title:`No requests in this window`}),cols:[{key:`o`,label:`Operation`,sort:e=>e.name,render:e=>(0,F.jsx)(Wa,{name:e.name})},{key:`c`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`f`,label:`Failure rate`,num:!0,sort:e=>e.failureRate??0,render:e=>(0,F.jsxs)(`span`,{style:{color:e.failed?`#ff8a8a`:void 0},children:[wa(e.failureRate),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(`,e.failed,`)`]})]})},{key:`p`,label:`p95`,num:!0,sort:e=>e.p95??0,render:e=>z(e.p95)}]})}),(0,F.jsx)(V,{title:`Users`,sub:(0,F.jsxs)(F.Fragment,{children:[`busiest first · `,(0,F.jsx)(Nn,{to:f,className:`text-ink2 hover:text-ink underline decoration-dotted underline-offset-4`,children:`in the Users list`})]}),pad:!1,children:(0,F.jsx)(qa,{rows:s.users,paged:!0,noun:`users`,resetKey:`${e}|${r.service}|${r.env}`,initialSort:`c`,rowKey:e=>e.userId,onRow:e=>i(a(`/users/${ja(e.userId)}`)),empty:(0,F.jsx)(U,{title:`No identified users in this window`}),cols:[{key:`u`,label:`User`,sort:e=>e.userId,render:e=>(0,F.jsx)(`span`,{className:`font-medium`,children:e.userId})},{key:`c`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`f`,label:`Failure rate`,num:!0,sort:e=>e.failureRate??0,render:e=>(0,F.jsxs)(`span`,{style:{color:e.failed?`#ff8a8a`:void 0},children:[wa(e.failureRate),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(`,e.failed,`)`]})]})},{key:`l`,label:`Last seen`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(io,{ts:e.lastSeen,className:`text-ink2`})}]})})]}),(0,F.jsx)(V,{title:`Errors`,sub:`that hit this tenant, most frequent first`,pad:!1,children:(0,F.jsx)(qa,{rows:s.errors,paged:!0,noun:`errors`,resetKey:`${e}|${r.service}|${r.env}`,initialSort:`n`,rowKey:e=>e.fingerprint,onRow:e=>i(a(`/errors/${ja(e.fingerprint)}`)),empty:(0,F.jsx)(U,{title:`No errors for this tenant in this window`}),cols:[{key:`e`,label:`Error`,render:e=>(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`mono text-[#ff9b9b]`,children:e.class}),` `,(0,F.jsx)(`span`,{className:`text-ink2 truncate`,children:e.message})]})},{key:`n`,label:`Events`,num:!0,sort:e=>e.n,render:e=>B(e.n)},{key:`u`,label:`Users`,num:!0,sort:e=>e.users,render:e=>B(e.users)},{key:`l`,label:`Last seen`,num:!0,sort:e=>e.last,render:e=>(0,F.jsx)(io,{ts:e.last,className:`text-ink2`})}]})})]})}var _V=e=>new Date(e).toLocaleString(`en-US`,{month:`long`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),vV=e=>String(e).padStart(2,`0`),yV=(e,t)=>{let n=new Date(e),r=`${vV(n.getHours())}:${vV(n.getMinutes())}`,i=`${vV(n.getMonth()+1)}/${vV(n.getDate())}`;return t<=72e6?r:t<=2592e5?`${i} ${r}`:i},bV=({color:e})=>(0,F.jsx)(`span`,{className:`inline-block w-[2px] h-[11px] rounded-full align-[-1px]`,style:{background:e}});function xV({title:e,sub:t,children:n}){return(0,F.jsxs)(`section`,{className:`flex flex-col gap-2.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2.5 px-0.5`,children:[(0,F.jsx)(`h2`,{className:`text-[15px] font-medium tracking-tight`,children:e}),(0,F.jsx)(`span`,{className:`mono text-[10.5px] uppercase tracking-[.12em] text-mute`,children:t})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-3`,children:n})]})}function SV({now:e,prev:t,unit:n,badWhen:r=`up`}){if(e==null||t==null||n===`pct`&&!t)return null;let i=n===`pp`?e-t:(e-t)/t*100,a=Math.abs(i)<(n===`pp`?.05:.5),o=i>0,s=!a&&(o?r===`up`:r===`down`),c=a?li:o?Hi:Vi,l=n===`pp`?`${o?`+`:`−`}${Math.abs(i).toFixed(2)}pp`:`${o?`+`:`−`}${Math.abs(i).toFixed(0)}%`;return(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[12px] text-ink2`,title:`Average over this window compared with the window of the same length before it`,children:[(0,F.jsx)(c,{size:13,style:{color:a?`var(--color-mute)`:s?`#f0506e`:`#3fb68b`}}),a?`no change`:l,` since last period`]})}function CV({value:e,color:t,fmt:n}){return e==null?null:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-[12px] text-ink2`,children:[(0,F.jsx)(bV,{color:t}),`AVG`,(0,F.jsx)(`span`,{className:`mono text-[11.5px] font-semibold px-1.5 py-[2px] rounded`,style:{background:`#2a2a33`,color:`#e8e8ef`},children:n(e)})]})}function wV({title:e,trend:t,right:n,children:r}){return(0,F.jsxs)(`div`,{className:`rounded-xl border border-line overflow-hidden`,style:{background:`linear-gradient(180deg, #17171d 0%, #121217 100%)`},children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-5 h-[52px] border-b border-line`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,F.jsx)(`span`,{className:`font-medium text-[14px] whitespace-nowrap`,children:e}),t]}),(0,F.jsx)(`div`,{className:`flex items-center gap-4 shrink-0`,children:n})]}),(0,F.jsx)(`div`,{className:`px-3 pt-4 pb-2`,children:r})]})}var TV=({series:e})=>(0,F.jsx)(F.Fragment,{children:e.map(e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[12px] text-ink2`,children:[(0,F.jsx)(bV,{color:e.color}),e.label]},e.key))});function EV({active:e,payload:t,label:n,series:r,fmt:i,pinned:a,hint:o,extra:s}){if(!e||!t?.length)return null;let c=t[0].payload;return(0,F.jsxs)(`div`,{className:`mono rounded-md border border-[#2c2c36] px-3 py-2.5 text-[11.5px] shadow-2xl`,style:{background:`rgba(17,17,22,.97)`,minWidth:200},children:[r.filter(e=>c[e.key]!=null).map(e=>{let t=a?.[e.key],n=t!=null&&c[e.key]!=null?c[e.key]-t:null;return(0,F.jsxs)(`div`,{className:`flex items-center gap-2 py-[2px]`,children:[(0,F.jsx)(bV,{color:e.color}),(0,F.jsxs)(`span`,{className:`font-semibold text-ink`,children:[e.label,`: `,i(c[e.key],e.key)]}),n!=null&&(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(`,n>=0?`+`:`−`,i(Math.abs(n),e.key),` vs pin)`]})]},e.key)}),s?.(c),(0,F.jsx)(`div`,{className:`text-ink2 mt-1.5`,children:_V(n)}),(0,F.jsx)(`div`,{className:`text-mute mt-2 pt-2 border-t border-[#24242c]`,children:a?`Pinned ${_V(a.t)} · shift+click to unpin`:o})]})}function DV({data:e,series:t,fmt:n,yFmt:r,height:i=240,yMax:a,onInspect:o,gcKey:s,extra:c,releases:l=[]}){let u=(0,v.useRef)(!1),[d,f]=(0,v.useState)(null);if(!e.length)return(0,F.jsx)(`div`,{className:`flex items-center justify-center text-mute text-[12px]`,style:{height:i},children:`No samples in this window`});let p=s?Math.max(1,...e.map(e=>e[s]||0)):1,m=t.some(e=>e.kind===`bar`),h=e.length>1?e[e.length-1].t-e[0].t:36e5,g=e.length>1?e[1].t-e[0].t:h,_=l.filter(t=>t.t>=e[0].t&&t.t<=e[e.length-1].t+g).map(t=>({...t,at:e.reduce((e,n)=>n.t<=t.t&&n.t>e?n.t:e,e[0].t)})),y=e=>_.filter(t=>t.at===e),b=o?`Click to see what ran here · shift+click to pin and compare`:`Shift+click to pin and compare`;return(0,F.jsx)(`div`,{className:`relative select-none`,onMouseDownCapture:e=>{u.current=e.shiftKey},children:(0,F.jsx)(`div`,{style:{height:i},children:(0,F.jsx)(eh,{width:`100%`,height:`100%`,children:(0,F.jsxs)(ZR,{data:e,margin:{top:8,right:44,bottom:0,left:0},barGap:2,barCategoryGap:`30%`,onClick:t=>{if(!t||t.activeLabel==null)return;let n=e.find(e=>e.t===t.activeLabel);u.current?f(e=>e&&e.t===t.activeLabel?null:n):o?.(t.activeLabel)},style:{cursor:o?`pointer`:`default`},children:[(0,F.jsx)(`defs`,{children:t.filter(e=>e.kind===`area`||e.kind===`bar`).map(e=>(0,F.jsxs)(`linearGradient`,{id:`g-${e.key}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:e.color,stopOpacity:e.kind===`bar`?1:.42}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:e.color,stopOpacity:e.kind===`bar`?.35:.02})]},e.key))}),(0,F.jsx)(dF,{vertical:!1,stroke:`#ffffff`,strokeOpacity:.045,strokeDasharray:`2 6`}),(0,F.jsx)(lL,{dataKey:`t`,type:m?`category`:`number`,domain:[`dataMin`,`dataMax`],scale:m?`auto`:`time`,tickFormatter:e=>yV(e,h),tick:{fill:`#6f6f7d`,fontSize:10.5,fontFamily:`var(--font-mono)`},tickLine:!1,axisLine:{stroke:`#2a2a35`},minTickGap:44,tickMargin:6}),(0,F.jsx)(EL,{yAxisId:`v`,width:64,tickLine:!1,axisLine:!1,tickCount:5,tick:{fill:`#6f6f7d`,fontSize:10.5,fontFamily:`var(--font-mono)`},tickFormatter:e=>(r??n)(e),domain:[0,a??`auto`],allowDecimals:!0}),s&&(0,F.jsx)(EL,{yAxisId:`gc`,hide:!0,domain:[0,p*6]}),(0,F.jsx)(Fm,{content:(0,F.jsx)(EV,{series:t,fmt:n,pinned:d,hint:b,extra:e=>(0,F.jsxs)(F.Fragment,{children:[y(e.t).map(e=>(0,F.jsxs)(`div`,{className:`py-[2px]`,style:{color:`#ff6b9d`},children:[`Release `,e.version,` deployed `,new Date(e.t).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hour12:!1})]},e.version)),c?.(e)]})}),cursor:{stroke:`#ffffff`,strokeOpacity:.18,strokeDasharray:`3 3`},isAnimationActive:!1}),s&&(0,F.jsx)(sM,{yAxisId:`gc`,dataKey:s,fill:`#8a8a98`,fillOpacity:.55,barSize:1.5,isAnimationActive:!1}),t.map(e=>e.kind===`bar`?(0,F.jsx)(sM,{yAxisId:`v`,dataKey:e.key,fill:`url(#g-${e.key})`,barSize:3,radius:[2,2,0,0],isAnimationActive:!1},e.key):e.kind===`area`?(0,F.jsx)(cI,{yAxisId:`v`,type:`monotone`,dataKey:e.key,stroke:e.color,strokeWidth:1.6,fill:`url(#g-${e.key})`,dot:!1,activeDot:{r:4,fill:e.color,stroke:`#121217`,strokeWidth:2},isAnimationActive:!1,connectNulls:!0},e.key):(0,F.jsx)(zF,{yAxisId:`v`,type:`monotone`,dataKey:e.key,stroke:e.color,strokeOpacity:e.faint?.55:1,strokeWidth:e.faint?1.3:1.6,dot:!1,activeDot:{r:4,fill:e.color,stroke:`#121217`,strokeWidth:2},isAnimationActive:!1,connectNulls:!0},e.key)),_.map(e=>(0,F.jsx)(SN,{yAxisId:`v`,x:e.at,stroke:`#ff6b9d`,strokeDasharray:`3 3`,strokeOpacity:.85,label:{value:e.version,position:`insideTopLeft`,fill:`#ff6b9d`,fontSize:10.5,fontFamily:`var(--font-mono)`}},`${e.version}${e.t}`)),d&&(0,F.jsx)(SN,{yAxisId:`v`,x:d.t,stroke:`#ff9cc0`,strokeDasharray:`4 3`,strokeOpacity:.8})]})})})})}var OV={heapUsed:`#f0506e`,heapTotal:`#b0344d`,rss:`#7c7c8a`,memUtil:`#3fa58a`,cpuUtil:`#e5484d`,user:`#e5484d`,system:`#f59bb0`,elP99:`#f0506e`,elP50:`#7c7c8a`,elu:`#9085e9`},kV=e=>e>=1024?`${(e/1024).toFixed(2)} GB`:`${e.toFixed(2)} MB`,AV=e=>`${e.toFixed(2)}%`,jV=e=>`${e<10&&e%1?e.toFixed(1):Math.round(e)}%`,MV=e=>e>=1024?`${(e/1024).toFixed(1)} GB`:`${Math.round(e)} MB`,NV=`Utilization needs @obzerver/node 0.8.2 or later, which reports the V8 heap limit, the container limits and CPU time.`;function PV(){let e=I(),t=L(),n=ht(),r=P(`/api/runtime${e.q()}`,[e.tick]),i=[...new Set((r.data||[]).map(e=>e.service))],[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(``),l=a&&i.includes(a)?a:e.service||i[0]||``,u=P(l?`/api/runtime/view${e.q({service:l,instance:s})}`:null,[e.tick,l,s]),[d,f]=(0,v.useState)(null);if((0,v.useEffect)(()=>{f(null),c(``)},[l]),(0,v.useEffect)(()=>{let e=u.data?.points;!e?.length||d&&!d.auto||b(e.reduce((e,t)=>(t.elP99??0)>(e.elP99??0)?t:e,e[0]).t,!0)},[u.data]),r.error)return(0,F.jsx)(W,{error:r.error});if(!r.data)return(0,F.jsx)(H,{});let p=u.data,m=p?.points||[],h=p?.summary,g=p?.prev,_=m.some(e=>e.memUtil!=null||e.cpuUtil!=null),y=(r.data||[]).filter(e=>e.service===l).map(e=>e.instance);async function b(e,t=!1){let n=u.data?.bucketMs||6e4,r=await N(`/api/runtime/spike?service=${encodeURIComponent(l)}${s?`&instance=${encodeURIComponent(s)}`:``}&ts=${e}&windowMs=${Math.max(6e4,n/2)}`);f({ts:e,rows:r,auto:t}),t||document.getElementById(`what-ran`)?.scrollIntoView({behavior:`smooth`,block:`start`})}let x=e=>{b(e)},S=(e.meta?.versions||[]).filter(t=>t.service===l&&t.first>=e.from&&t.first<=e.to).map(e=>({t:e.first,version:e.version})),C=p?.byInstance||[],w=e=>QR[Math.max(0,C.findIndex(t=>t.instance===e))%QR.length],T=!s&&C.length>1,E=e=>{let t=new Map;return C.forEach((n,r)=>{for(let i of n.points)t.has(i.t)||t.set(i.t,{t:i.t}),t.get(i.t)[`i${r}`]=i[e]}),[...t.values()].sort((e,t)=>e.t-t.t)},D=C.map((e,t)=>({key:`i${t}`,label:e.instance,color:QR[t%QR.length],kind:`line`})),O=[{key:`heapUsed`,label:`Heap Used`,color:OV.heapUsed,kind:`line`},{key:`heapTotal`,label:`Heap Total`,color:OV.heapTotal,kind:`line`},{key:`rss`,label:`RSS`,color:OV.rss,kind:`line`,faint:!0}],k=[{key:`cpuUser`,label:`User`,color:OV.user,kind:`bar`},{key:`cpuSystem`,label:`System`,color:OV.system,kind:`bar`}],A=[{key:`elP99`,label:`p99`,color:OV.elP99,kind:`line`},{key:`elP50`,label:`p50`,color:OV.elP50,kind:`line`,faint:!0}],j=!s&&y.length>1;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(zr,{size:18,className:`text-brand`}),title:`Profiler`,sub:`Memory, CPU and event-loop health for each app, sampled every 15 seconds.${j?` Across ${y.length} instances, memory and CPU time add up, while utilization and loop delay follow the busiest instance.`:``}`,right:i.length>0&&(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`select`,{className:`select`,value:l,onChange:e=>o(e.target.value),"aria-label":`Application`,children:i.map(e=>(0,F.jsx)(`option`,{children:e},e))}),y.length>1&&(0,F.jsxs)(`select`,{className:`select`,value:s,onChange:e=>c(e.target.value),"aria-label":`Instance`,children:[(0,F.jsxs)(`option`,{value:``,children:[`All instances (`,y.length,`)`]}),y.map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))]})]})}),i.length?u.error?(0,F.jsx)(W,{error:u.error}):p?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(V,{title:`Instances`,sub:`latest sample · click one to focus on it`,pad:!1,children:(0,F.jsx)(qa,{rows:p.instances,onRow:e=>c(e.instance===s?``:e.instance),cols:[{key:`i`,label:`Instance`,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-sm shrink-0`,style:{background:w(e.instance)}}),(0,F.jsx)(`span`,{className:`mono`,style:{color:e.instance===s?`#ff9cc0`:void 0},children:e.instance}),e.instance===s&&(0,F.jsx)(`span`,{className:`pill !h-5 !text-[10.5px]`,children:`focused`})]})},{key:`cu`,label:`CPU util`,num:!0,render:e=>e.cpuUtil==null?`—`:wa(e.cpuUtil,1)},{key:`cl`,label:`CPUs`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.cpuLimit?`${B(e.cpuLimit)} (quota)`:e.cores??`—`})},{key:`rss`,label:`RSS`,num:!0,render:e=>kV(e.rss)},{key:`heap`,label:`Heap used / total`,num:!0,render:e=>`${B(e.heapUsed)} / ${B(e.heapTotal)} MB`},{key:`mu`,label:`Mem util`,num:!0,render:e=>e.memUtil==null?`—`:(0,F.jsx)(`span`,{title:e.memBasis===`container`?`RSS of the container limit`:`Heap of the V8 limit`,children:wa(e.memUtil,1)})},{key:`lim`,label:`Limits`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:[e.heapLimitMb&&`heap ${kV(e.heapLimitMb)}`,e.memLimitMb&&`container ${kV(e.memLimitMb)}`].filter(Boolean).join(` · `)||`—`})},{key:`el`,label:`Loop p99`,num:!0,render:e=>z(e.elP99)},{key:`inf`,label:`In-flight`,num:!0,render:e=>B(e.inflight)},{key:`h`,label:`Handles`,num:!0,render:e=>B(e.handles)}]})}),(0,F.jsx)(`div`,{id:`what-ran`,className:`scroll-mt-4`,children:d?(0,F.jsx)(V,{title:`Running around ${Oa(d.ts,!0)}`,sub:d.auto?`the worst event-loop delay in this window · click any point on a chart to look at another moment`:`the moment you clicked · operations ranked by how far they moved from their own baseline`,pad:!1,children:(0,F.jsx)(qa,{rows:d.rows,onRow:e=>n(t(Yz(`http`,l,e.name))),empty:(0,F.jsx)(U,{title:`Nothing ran in that window`}),cols:[{key:`n`,label:`Operation`,render:e=>(0,F.jsx)(Wa,{name:e.name})},{key:`c`,label:`Calls`,num:!0,render:e=>B(e.calls)},{key:`a`,label:`Avg`,num:!0,render:e=>z(e.avg)},{key:`b`,label:`Baseline avg`,num:!0,render:e=>z(e.baselineAvg)},{key:`lx`,label:`Latency ×`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:e.latencyX>=2?`#ffb38a`:void 0},children:e.latencyX?`${e.latencyX}×`:`—`})},{key:`vx`,label:`Volume ×`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:e.volumeX>=2?`#ffb38a`:void 0},children:e.volumeX?`${e.volumeX}×`:`—`})}]})}):(0,F.jsx)(V,{title:`Running around…`,sub:`click any point on a chart to see which operations ran then`,children:(0,F.jsx)(`span`,{className:`text-mute text-[12px]`,children:`Loading…`})})}),(0,F.jsxs)(xV,{title:`Memory`,sub:`heap and resident size over time, with garbage collection`,children:[(0,F.jsx)(wV,{title:`Memory`,trend:(0,F.jsx)(SV,{now:h?.heapUsed,prev:g?.heapUsed,unit:`pct`}),right:(0,F.jsx)(TV,{series:[...O,{key:`gc`,label:`GC pauses`,color:`#8a8a98`,kind:`bar`}]}),children:(0,F.jsx)(DV,{releases:S,data:m,series:O,fmt:e=>kV(e),yFmt:MV,gcKey:`gcMs`,onInspect:x,extra:e=>e.gcCount?(0,F.jsxs)(`div`,{className:`text-mute py-[2px]`,children:[`GC: `,e.gcCount,` pauses · `,z(e.gcMs)]}):null})}),(0,F.jsx)(wV,{title:`Memory utilization`,trend:(0,F.jsx)(SV,{now:h?.memUtil,prev:g?.memUtil,unit:`pp`}),right:(0,F.jsxs)(F.Fragment,{children:[T&&(0,F.jsx)(TV,{series:D}),(0,F.jsx)(CV,{value:h?.memUtil,color:OV.memUtil,fmt:AV})]}),children:_?(0,F.jsx)(DV,{releases:S,data:T?E(`memUtil`):m,series:T?D:[{key:`memUtil`,label:`Utilization`,color:OV.memUtil,kind:`area`}],fmt:AV,yFmt:jV,extra:e=>e.memBasis&&(0,F.jsx)(`div`,{className:`text-mute py-[2px]`,children:e.memBasis===`container`?`RSS of the container memory limit`:`Heap used of the V8 heap limit`})}):(0,F.jsx)(FV,{})})]}),(0,F.jsxs)(xV,{title:`CPU`,sub:`share of the available CPU, and where the time goes`,children:[(0,F.jsx)(wV,{title:`CPU utilization`,trend:(0,F.jsx)(SV,{now:h?.cpuUtil,prev:g?.cpuUtil,unit:`pp`}),right:(0,F.jsxs)(F.Fragment,{children:[T&&(0,F.jsx)(TV,{series:D}),(0,F.jsx)(CV,{value:h?.cpuUtil,color:OV.cpuUtil,fmt:AV})]}),children:_?(0,F.jsx)(DV,{releases:S,data:T?E(`cpuUtil`):m,series:T?D:[{key:`cpuUtil`,label:`Utilization`,color:OV.cpuUtil,kind:`area`}],fmt:AV,yFmt:jV,onInspect:x}):(0,F.jsx)(FV,{})}),(0,F.jsx)(wV,{title:`CPU`,trend:(0,F.jsx)(SV,{now:h?.cpuTime,prev:g?.cpuTime,unit:`pct`}),right:(0,F.jsx)(TV,{series:k}),children:m.some(e=>e.cpuUser!=null)?(0,F.jsx)(DV,{releases:S,data:m,series:k,fmt:e=>`${e.toFixed(2)}ms`,yFmt:e=>`${Math.round(e)}ms`,onInspect:x,extra:()=>(0,F.jsx)(`div`,{className:`text-mute py-[2px]`,children:`CPU time per second of wall clock`})}):(0,F.jsx)(FV,{})})]}),(0,F.jsxs)(xV,{title:`Event loop`,sub:`queueing delay and how busy the loop is`,children:[(0,F.jsx)(wV,{title:T?`Event loop delay p99`:`Event loop delay`,trend:(0,F.jsx)(SV,{now:h?.elP99,prev:g?.elP99,unit:`pct`}),right:(0,F.jsx)(TV,{series:T?D:A}),children:(0,F.jsx)(DV,{releases:S,data:T?E(`elP99`):m,series:T?D:A,fmt:e=>z(e),yFmt:e=>`${Math.round(e)}ms`,onInspect:x})}),(0,F.jsx)(wV,{title:`Event loop utilization`,trend:(0,F.jsx)(SV,{now:h?.elu,prev:g?.elu,unit:`pp`}),right:(0,F.jsxs)(F.Fragment,{children:[T&&(0,F.jsx)(TV,{series:D}),(0,F.jsx)(CV,{value:h?.elu,color:OV.elu,fmt:AV})]}),children:(0,F.jsx)(DV,{releases:S,data:T?E(`elu`):m,series:T?D:[{key:`elu`,label:`Utilization`,color:OV.elu,kind:`area`}],fmt:AV,yFmt:jV})})]})]}):(0,F.jsx)(H,{}):(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`No runtime samples in this window`,children:`The SDK samples every 15s by default (runtimeMetricsInterval).`})})]})}function FV(){return(0,F.jsx)(`div`,{className:`h-[220px] flex items-center justify-center text-center text-mute text-[12px] px-8`,children:NV})}var IV={counter:`#9b8cff`,gauge:`#2fc191`,summary:`#f0a93a`},LV=e=>IV[e]||`#82829a`;function RV({type:e,small:t}){let n=LV(e);return(0,F.jsx)(`span`,{className:`mono uppercase tracking-wider font-semibold rounded-full border whitespace-nowrap ${t?`text-[9.5px] px-1.5 py-[1px]`:`text-[10.5px] px-2 py-[2px]`}`,style:{color:n,borderColor:`${n}66`,background:`${n}1a`},children:e})}var zV=e=>e==null?`—`:new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1}).format(e);function BV({points:e,color:t}){let n=e.map(e=>e.value),r=n.filter(e=>e!=null);if(r.length<2)return(0,F.jsx)(`div`,{className:`h-[64px]`});let i=Math.min(...r),a=Math.max(...r)-i||1,o=n.map((e,t)=>e==null?null:[t/(n.length-1)*300,8+(1-(e-i)/a)*48]).filter(e=>!!e),s=o.map(([e,t],n)=>{if(!n)return`M${e.toFixed(1)},${t.toFixed(1)}`;let[r,i]=o[n-1],a=(r+e)/2;return`C${a.toFixed(1)},${i.toFixed(1)} ${a.toFixed(1)},${t.toFixed(1)} ${e.toFixed(1)},${t.toFixed(1)}`}).join(` `),c=`${s} L${o[o.length-1][0].toFixed(1)},64 L${o[0][0].toFixed(1)},64 Z`,[l,u]=o[o.length-1],d=`g${t.slice(1)}`;return(0,F.jsxs)(`div`,{className:`relative h-[64px] mr-4`,children:[(0,F.jsxs)(`svg`,{viewBox:`0 0 300 64`,preserveAspectRatio:`none`,className:`absolute inset-0 w-full h-full`,"aria-hidden":!0,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:d,x1:`0`,x2:`0`,y1:`0`,y2:`1`,children:[(0,F.jsx)(`stop`,{offset:`0`,stopColor:t,stopOpacity:`0.28`}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:t,stopOpacity:`0`})]})}),(0,F.jsx)(`path`,{d:c,fill:`url(#${d})`}),(0,F.jsx)(`path`,{d:s,fill:`none`,stroke:t,strokeWidth:`2`,vectorEffect:`non-scaling-stroke`,strokeLinejoin:`round`})]}),(0,F.jsx)(`span`,{className:`absolute w-2.5 h-2.5 rounded-full -translate-x-1/2 -translate-y-1/2 ring-2 ring-[var(--color-panel)]`,style:{left:`${l/300*100}%`,top:`${u/64*100}%`,background:t}})]})}function VV({m:e,onOpen:t}){let n=LV(e.type),r=e.services.length===1?e.services[0]:e.services.length?`${e.services.length} applications`:`—`,i=e.type===`counter`&&e.lifetime?Math.min(1,(e.value||0)/e.lifetime):null;return(0,F.jsxs)(`div`,{className:`card card-click flex flex-col overflow-hidden min-w-0`,role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-4 py-3 border-b border-line`,children:[(0,F.jsx)(`span`,{className:`text-[14px] text-ink font-semibold truncate`,title:e.name,children:e.name}),(0,F.jsx)(RV,{type:e.type})]}),(0,F.jsxs)(`div`,{className:`px-4 pt-3.5 flex flex-col gap-1.5`,children:[(0,F.jsx)(`div`,{className:`font-semibold tracking-tight text-ink tabular-nums leading-none`,style:{fontFamily:`var(--font-mono)`,fontSize:30},children:B(e.value)}),(0,F.jsxs)(`div`,{className:`mono text-[11.5px] text-ink2 truncate`,children:[r,e.series>1?(0,F.jsxs)(`span`,{className:`text-mute`,children:[` · `,e.series,` series`]}):null]}),i!=null&&(0,F.jsx)(`div`,{className:`h-[3px] rounded-full bg-[#23232e] overflow-hidden mt-1`,children:(0,F.jsx)(`div`,{className:`h-full rounded-full`,style:{width:`${Math.max(1,i*100)}%`,background:n}})}),(0,F.jsx)(`div`,{className:`mono text-[11px] text-mute`,children:e.type===`counter`?(0,F.jsxs)(F.Fragment,{children:[`this window · `,zV(e.lifetime),` all time`]}):e.type===`gauge`?(0,F.jsxs)(F.Fragment,{children:[`latest reading · `,(0,F.jsx)(io,{ts:e.last})]}):(0,F.jsxs)(F.Fragment,{children:[`average · `,B(e.observations??0),` values`]})})]}),(0,F.jsx)(`div`,{className:`mt-auto pt-2`,children:(0,F.jsx)(BV,{points:e.spark,color:n})})]})}function HV(){let e=I(),[t,n]=zn(),r=t.get(`view`)===`list`?`list`:`kpis`,i=P(`/api/metrics${e.q()}`,[e.tick]),a=P(r===`kpis`?`/api/metric-cards${e.q()}`:null,[e.tick,r]),o=[...new Set((i.data||[]).map(e=>e.name))],s=(e,r=!1)=>{let i=new URLSearchParams(t);e.view&&(e.view===`list`?i.set(`view`,`list`):i.delete(`view`)),e.metric!==void 0&&(e.metric?i.set(`metric`,e.metric):i.delete(`metric`)),n(i,{replace:!r})};if(i.error)return(0,F.jsx)(W,{error:i.error});if(!i.data)return(0,F.jsx)(H,{});let c=(0,F.jsx)(Ra,{icon:(0,F.jsx)(Wr,{size:18,className:`text-brand`}),title:`Custom metrics`,sub:(0,F.jsxs)(F.Fragment,{children:[`Counters, gauges and summaries your code reports: `,(0,F.jsxs)(`span`,{className:`mono`,children:[`obzerver.metrics.counter('orders_created', `,`{`,` channel `,`}`,`).inc()`]})]})});return o.length===0?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[c,(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`No custom metrics yet`,children:`Report business numbers with obzerver.metrics.counter / gauge / summary. They are aggregated in-process and flushed every 10s.`})})]}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[c,(0,F.jsx)(`div`,{className:`flex gap-2 -mt-3`,role:`tablist`,"aria-label":`Metrics view`,children:[[`kpis`,`KPIs`,ei],[`list`,`List`,ii]].map(([e,t,n])=>(0,F.jsxs)(`button`,{role:`tab`,"aria-selected":r===e,onClick:()=>s({view:e}),className:`group flex items-center gap-2 h-9 px-3 rounded-lg border text-[13px] font-semibold transition-colors ${r===e?`border-brand/60 bg-[rgba(255,61,127,.08)] text-ink cursor-default`:`border-line text-ink2 cursor-pointer hover:bg-[#1b1b25] hover:border-line2 hover:text-ink`}`,children:[(0,F.jsx)(n,{size:14,className:r===e?`text-brand`:`text-mute`}),t,(0,F.jsx)(`span`,{className:`text-[11px] font-medium px-1.5 rounded-full tabular-nums ${r===e?`bg-[rgba(255,61,127,.18)] text-ink`:`bg-[#1d1d27] text-mute group-hover:bg-[#2a2a37] group-hover:text-ink2`}`,children:o.length})]},e))}),r===`kpis`?a.error?(0,F.jsx)(W,{error:a.error}):a.data?(0,F.jsx)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-2 @6xl:grid-cols-3 gap-3`,children:a.data.map(e=>(0,F.jsx)(VV,{m:e,onOpen:()=>s({view:`list`,metric:e.name},!0)},e.name))}):(0,F.jsx)(H,{}):(0,F.jsx)(UV,{rows:i.data,names:o,selected:t.get(`metric`),onSelect:e=>s({metric:e})})]})}function UV({rows:e,names:t,selected:n,onSelect:r}){let i=I(),a=n&&t.includes(n)?n:t[0]||``,o=P(a?`/api/metrics/${encodeURIComponent(a)}${i.q()}`:null,[i.tick,a]),s=(0,v.useRef)(new Map),c=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!n||c.current===n)return;c.current=n;let e=s.current.get(n);e&&(e.scrollIntoView({block:`center`,behavior:`smooth`}),e.classList.remove(`flash`),e.offsetWidth,e.classList.add(`flash`))},[n]);let l=e.filter(e=>e.name===a),u=[],d=[];if(o.data){let e=new Map;o.data.series.slice(0,8).forEach((t,n)=>{for(let r of t.points)e.has(r.t)||e.set(r.t,{t:r.t}),e.get(r.t)[`s${n}`]=r.value}),u=[...e.values()].sort((e,t)=>e.t-t.t),d=o.data.series.slice(0,8).map((e,t)=>({key:`s${t}`,label:Object.entries(e.labels).map(([e,t])=>`${e}=${t}`).join(`, `)||a,color:QR[t],type:e.type===`counter`?`bar`:`line`,stack:e.type===`counter`?`c`:void 0}))}return(0,F.jsxs)(`div`,{className:`grid grid-cols-[260px_1fr] gap-3 items-start`,children:[(0,F.jsx)(V,{pad:!1,title:`Metrics`,children:(0,F.jsx)(`div`,{className:`py-1.5 max-h-[70vh] overflow-auto`,children:t.map(t=>{let n=e.find(e=>e.name===t).type;return(0,F.jsxs)(`button`,{ref:e=>{e?s.current.set(t,e):s.current.delete(t)},onClick:()=>r(t),className:`w-full text-left px-3.5 py-2 flex items-center justify-between gap-2 border-l-2 ${t===a?`bg-[#1d1d27] border-l-brand`:`border-l-transparent hover:bg-[#16161e]`}`,children:[(0,F.jsx)(`span`,{className:`mono text-[12px] truncate`,children:t}),(0,F.jsx)(RV,{type:n,small:!0})]},t)})})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 min-w-0`,children:[(0,F.jsx)(rz,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`mono`,children:a}),l[0]&&(0,F.jsx)(RV,{type:l[0].type,small:!0})]}),sub:l[0]?.type===`counter`?`sum per bucket`:l[0]?.type===`gauge`?`last value per bucket`:`average per bucket`,series:d,children:o.data?(0,F.jsx)(nz,{data:u,series:d,height:260,fmt:e=>B(e)}):(0,F.jsx)(H,{})}),(0,F.jsx)(V,{title:`Series`,pad:!1,children:(0,F.jsxs)(`table`,{className:`tbl`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Labels`}),(0,F.jsx)(`th`,{children:`Application`}),(0,F.jsx)(`th`,{className:`num`,children:`Points`}),(0,F.jsx)(`th`,{className:`num`,children:`Average`})]})}),(0,F.jsx)(`tbody`,{children:l.map((e,t)=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`mono text-[12px]`,children:Object.entries(e.labels).map(([e,t])=>`${e}=${t}`).join(`, `)||`—`}),(0,F.jsx)(`td`,{className:`text-ink2`,children:e.service}),(0,F.jsx)(`td`,{className:`num`,children:B(e.points)}),(0,F.jsx)(`td`,{className:`num`,children:B(e.avg)})]},t))})]})})]})]})}var WV={regression:{kind:`crit`,label:`Regression`},changed:{kind:`warn`,label:`Changed`},clean:{kind:`good`,label:`Clean`},not_enough_data:{kind:`neutral`,label:`Not enough data`},baseline:{kind:`neutral`,label:`Baseline`}},GV=e=>e?new Date(e).toLocaleString(void 0,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,timeZoneName:`short`}):``;function KV(){let e=I(),{data:t,error:n}=P(`/api/releases${e.q()}`,[e.tick]),[r]=zn(),[i,a]=(0,v.useState)(r.get(`version`)?{service:r.get(`service`)||``,version:r.get(`version`)}:null);if(n)return(0,F.jsx)(W,{error:n});if(!t)return(0,F.jsx)(H,{});let o=i||(t[0]?{service:t[0].service,version:t[0].version}:null);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(Ci,{size:18,className:`text-brand`}),title:`Releases`,sub:(0,F.jsxs)(F.Fragment,{children:[`Each `,(0,F.jsx)(`span`,{className:`mono`,children:`serviceVersion`}),` compared with the one before it: 5xx rate, latency, new error groups, memory and CPU, and what changed in the code path.`]})}),t.length===0?(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`No releases yet`,children:`Set serviceVersion (or OBZERVER_VERSION / GIT_SHA) so every request is tagged with the release that served it.`})}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-[minmax(380px,40%)_1fr] gap-3 items-start`,children:[(0,F.jsx)(V,{pad:!1,children:(0,F.jsx)(qa,{rows:t,rowKey:e=>e.service+e.version,onRow:e=>a({service:e.service,version:e.version}),cols:[{key:`v`,label:`Release`,render:e=>(0,F.jsxs)(`div`,{className:o&&o.service===e.service&&o.version===e.version?`text-brand2`:``,children:[(0,F.jsx)(`div`,{className:`mono font-medium`,children:e.version}),(0,F.jsx)(`div`,{className:`text-mute text-[11px]`,children:e.service})]})},{key:`verdict`,label:`Verdict`,render:e=>(0,F.jsx)(G,{kind:WV[e.verdict]?.kind||`neutral`,children:WV[e.verdict]?.label||e.verdict})},{key:`f`,label:`Deployed`,num:!0,render:e=>(0,F.jsx)(io,{ts:e.first,className:`text-ink2`})},{key:`n`,label:`Requests`,num:!0,render:e=>B(e.requests)}]})}),o&&(0,F.jsx)(qV,{service:o.service,version:o.version})]})]})}function qV({service:e,version:t}){let n=L(),r=ht(),{data:i,error:a}=P(`/api/releases/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,[e,t]);if(a)return(0,F.jsx)(W,{error:a});if(!i)return(0,F.jsx)(H,{});let o=WV[i.verdict]||WV.baseline,s=i.previousStats,c=i.stats,l=e=>e===`query`?(0,F.jsx)(Br,{size:12,style:{color:`#d95926`}}):e===`outbound`?(0,F.jsx)(Kr,{size:12,style:{color:`#e66767`}}):(0,F.jsx)(_r,{size:12,style:{color:`#d55181`}}),u=e=>({new:`New`,gone:`Gone`,more_frequent:`${e.multiplier}× more often`,less_frequent:`${e.multiplier}× as often`,slower:`${e.multiplier}× slower`})[e.change];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsxs)(V,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`span`,{className:`mono`,children:[e,`@`,t]}),(0,F.jsx)(G,{kind:o.kind,children:o.label})]}),sub:i.previous?`vs ${i.previous}`:void 0,children:[(0,F.jsx)(`div`,{className:`text-[13px] leading-relaxed`,children:i.summary}),s&&(0,F.jsxs)(`table`,{className:`tbl mt-3`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{}),(0,F.jsx)(`th`,{className:`num`,children:i.previous}),(0,F.jsx)(`th`,{className:`num`,children:t})]})}),(0,F.jsxs)(`tbody`,{children:[(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Requests`}),(0,F.jsx)(`td`,{className:`num`,children:B(s.requests)}),(0,F.jsx)(`td`,{className:`num`,children:B(c.requests)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`5xx rate`}),(0,F.jsx)(`td`,{className:`num`,children:wa(s.errorRate)}),(0,F.jsx)(`td`,{className:`num`,style:{color:c.errorRate>s.errorRate*1.5&&c.errorRate>.3?`#ff8a8a`:void 0},children:wa(c.errorRate)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`p95`}),(0,F.jsx)(`td`,{className:`num`,children:z(s.p95)}),(0,F.jsx)(`td`,{className:`num`,style:{color:c.p95>s.p95*1.3?`#ffb38a`:void 0},children:z(c.p95)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Average`}),(0,F.jsx)(`td`,{className:`num`,children:z(s.avg)}),(0,F.jsx)(`td`,{className:`num`,children:z(c.avg)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Served from`}),(0,F.jsx)(`td`,{className:`num text-[11.5px]`,children:(0,F.jsx)(ro,{tip:GV(s.first),children:Oa(s.first,!0)})}),(0,F.jsx)(`td`,{className:`num text-[11.5px]`,children:(0,F.jsx)(ro,{tip:GV(c.first),children:Oa(c.first,!0)})})]}),(i.runtime||i.previousRuntime)&&(()=>{let e=i.previousRuntime||{},t=i.runtime||{},n=(e,t,n,r)=>e!=null&&t!=null&&t>e*n&&t-e>r,r=e=>e==null?`—`:`${e>0?`+`:``}${e.toFixed(1)} MB/h`,a=i.evidence?.some(e=>e.type===`memory_leak`);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`tr`,{children:(0,F.jsx)(`td`,{colSpan:3,className:`!pt-4 text-[10.5px] uppercase tracking-[.08em] text-mute`,children:`Runtime, per instance`})}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Heap used`}),(0,F.jsx)(`td`,{className:`num`,children:e.heapUsed==null?`—`:`${B(e.heapUsed)} MB`}),(0,F.jsx)(`td`,{className:`num`,style:{color:n(e.heapUsed,t.heapUsed,1.3,20)?`#ffb38a`:void 0},children:t.heapUsed==null?`—`:`${B(t.heapUsed)} MB`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,title:`Least-squares slope of heap used over the time each version served`,children:`Heap growth`}),(0,F.jsx)(`td`,{className:`num`,children:r(e.heapGrowth)}),(0,F.jsx)(`td`,{className:`num`,style:{color:a?`#ff8a8a`:void 0},children:r(t.heapGrowth)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`RSS`}),(0,F.jsx)(`td`,{className:`num`,children:e.rss==null?`—`:`${B(e.rss)} MB`}),(0,F.jsx)(`td`,{className:`num`,children:t.rss==null?`—`:`${B(t.rss)} MB`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:t.cpuUtil==null?`CPU`:`CPU utilization`}),(0,F.jsx)(`td`,{className:`num`,children:wa(e.cpuUtil??e.cpu)}),(0,F.jsx)(`td`,{className:`num`,style:{color:n(e.cpuUtil??e.cpu,t.cpuUtil??t.cpu,1.3,5)?`#ffb38a`:void 0},children:wa(t.cpuUtil??t.cpu)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Event loop p99`}),(0,F.jsx)(`td`,{className:`num`,children:z(e.elP99)}),(0,F.jsx)(`td`,{className:`num`,style:{color:n(e.elP99,t.elP99,1.5,10)?`#ffb38a`:void 0},children:z(t.elP99)})]})]})})()]})]})]}),(i.evidence?.length>0||i.newErrors?.length>0)&&(0,F.jsxs)(V,{title:`Evidence`,children:[(0,F.jsx)(`ul`,{className:`flex flex-col gap-1.5 list-disc pl-4`,children:i.evidence.map((e,t)=>(0,F.jsx)(`li`,{children:e.text},t))}),i.newErrors.length>0&&(0,F.jsx)(`div`,{className:`mt-3 flex flex-col`,children:i.newErrors.map(e=>(0,F.jsxs)(`button`,{className:`text-left flex items-center gap-2 py-1.5 border-b border-[#1d1d26] last:border-0 hover:text-white`,onClick:()=>r(n(`/errors/${e.fingerprint}`)),children:[(0,F.jsx)(G,{kind:`serious`,children:`new`}),(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:e.class}),(0,F.jsx)(`span`,{className:`text-mute truncate`,children:e.message}),(0,F.jsx)(`span`,{className:`ml-auto tabular-nums`,children:B(e.count)})]},e.fingerprint))})]}),(0,F.jsx)(V,{title:`What changed in the code`,sub:`queries, outbound calls and methods per request, beyond noise`,pad:!1,children:(0,F.jsx)(qa,{rows:i.changes||[],empty:(0,F.jsx)(U,{title:`No call-pattern changes detected`}),cols:[{key:`t`,label:`Call`,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2 min-w-0`,children:[l(e.type),(0,F.jsx)(`span`,{className:`mono text-[11.5px] truncate max-w-[420px]`,children:e.label})]})},{key:`c`,label:`Change`,render:e=>(0,F.jsx)(G,{kind:e.change===`gone`||e.change===`less_frequent`?`neutral`:e.change===`new`?`warn`:`serious`,children:u(e)})},{key:`p`,label:`Per request now`,num:!0,render:e=>e.perRequest==null?e.selfMs==null?`—`:`${z(e.selfMs)} self`:B(e.perRequest)}]})})]})}var JV=980,YV=160,XV=46;function ZV(e){return e>5?`#d03b3b`:e>1?`#e07a7a`:`#199e70`}function QV(){let e=I(),t=L(),n=ht(),{data:r,error:i}=P(`/api/map${e.q()}`,[e.tick]),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),l=(0,v.useMemo)(()=>{if(!r)return null;let e=r.nodes,t=r.edges,n=e.filter(e=>e.type===`service`||e.type===`queue`),i=e.filter(e=>e.type===`database`||e.type===`external`),a=new Map;for(let e of n)a.set(e.id,e.type===`queue`?0:1);for(let e=0;e<n.length;e++)for(let e of t){if(!a.has(e.from)||!a.has(e.to))continue;let t=a.get(e.from)+1;a.get(e.to)<t&&a.set(e.to,t)}let o=[...new Set(a.values())].sort((e,t)=>e-t).map(e=>n.filter(t=>a.get(t.id)===e)),s=e=>o.length===1?JV/2:110+e*760/(o.length-1),c=new Map,l=0;o.forEach((e,t)=>e.forEach((e,n)=>{c.set(e.id,{x:s(t),y:60+n*90}),l=Math.max(l,60+n*90)}));let u=l+150,d=new Map;for(let e of i){let n=t.filter(t=>t.to===e.id).sort((e,t)=>t.calls-e.calls)[0],r=n?n.from:`none`;d.has(r)||d.set(r,[]),d.get(r).push(e)}let f=[...d.entries()].sort((e,t)=>(c.get(e[0])?.x??0)-(c.get(t[0])?.x??0)).flatMap(([,e])=>e);return f.forEach((e,t)=>{let n=Math.floor(t/5),r=Math.min(5,f.length-n*5),i=t%5,a=r*180;c.set(e.id,{x:(JV-a)/2+i*180+YV/2,y:u+n*80})}),{nodes:e,edges:t,pos:c,height:Math.max(...[...c.values()].map(e=>e.y),100)+70}},[r]);if(i)return(0,F.jsx)(W,{error:i});if(!r||!l)return(0,F.jsx)(H,{});let u=a||s,d=e=>!u||e===u||l.edges.some(t=>t.from===u&&t.to===e||t.to===u&&t.from===e),f=s?l.nodes.find(e=>e.id===s):null,p=Math.max(1,...l.edges.map(e=>e.calls)),m=e=>e===`service`?Ai:e===`database`?Br:e===`queue`?Yr:Kr;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(fi,{size:18,className:`text-brand`}),title:`Service map`,sub:`Drawn from real traffic: applications and queues left to right in call order, their databases and external hosts below. Line weight is volume; red means errors.`}),l.nodes.length===0?(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`Nothing to draw yet`})}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-[1fr_300px] gap-3 items-start`,children:[(0,F.jsxs)(V,{pad:!1,children:[(0,F.jsxs)(`div`,{className:`flex gap-4 px-4 pt-3 text-[11.5px] text-ink2`,children:[(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`w-4 h-[3px] rounded`,style:{background:`#199e70`}}),`healthy`]}),(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`w-4 h-[3px] rounded`,style:{background:`#e07a7a`}}),`> 1% errors`]}),(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`w-4 h-[3px] rounded`,style:{background:`#d03b3b`}}),`> 5% errors`]}),(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`w-4 border-t-2 border-dashed`,style:{borderColor:`#7a7a90`}}),`service → service (shared trace ids)`]})]}),(0,F.jsxs)(`svg`,{viewBox:`0 0 ${JV} ${l.height}`,className:`w-full`,style:{minHeight:360},onClick:()=>c(null),children:[l.edges.map(e=>{let t=l.pos.get(e.from),n=l.pos.get(e.to);if(!t||!n)return null;let r=n.y>t.y+40,i=r?t.x:t.x+YV/2,a=r?t.y+XV/2:t.y,o=r?n.x:n.x-YV/2,s=r?n.y-XV/2:n.y,c=r?`M${i},${a} C${i},${(a+s)/2} ${o},${(a+s)/2} ${o},${s}`:`M${i},${a} C${(i+o)/2},${a} ${(i+o)/2},${s} ${o},${s}`,d=1.2+4.5*Math.sqrt(e.calls/p),f=!u||e.from===u||e.to===u,m=ZV(e.errorRate),h=e.from.startsWith(`svc:`)&&e.to.startsWith(`svc:`);return(0,F.jsxs)(`g`,{opacity:f?1:.12,children:[(0,F.jsx)(`path`,{d:c,fill:`none`,stroke:m,strokeOpacity:.55,strokeWidth:d,strokeDasharray:h?`8 6`:void 0}),(0,F.jsx)(`path`,{d:c,fill:`none`,stroke:`#ffffff`,strokeOpacity:.55,strokeWidth:Math.max(1,d/2.5),strokeLinecap:`round`,className:`flow`,style:{strokeDasharray:`1 23`,animationDuration:`${Math.max(.5,3-2.5*(e.calls/p))}s`}}),(0,F.jsxs)(`text`,{x:(i+o)/2,y:(a+s)/2-6,textAnchor:`middle`,fontSize:`11`,fill:`#9a9aab`,paintOrder:`stroke`,stroke:`#13131a`,strokeWidth:4,children:[B(e.calls),e.errorRate>0?` · ${wa(e.errorRate,1)}`:``]})]},e.from+e.to)}),l.nodes.map(e=>{let t=l.pos.get(e.id);if(!t)return null;let n=m(e.type),r=ZV(e.errorRate),i=s===e.id;return(0,F.jsxs)(`g`,{transform:`translate(${t.x-YV/2},${t.y-XV/2})`,opacity:d(e.id)?1:.25,style:{cursor:`pointer`},onMouseEnter:()=>o(e.id),onMouseLeave:()=>o(null),onClick:t=>{t.stopPropagation(),c(e.id)},children:[(0,F.jsx)(`rect`,{width:YV,height:XV,rx:10,fill:`#16161e`,stroke:i?`#ff3d7f`:e.type===`service`?r:`#33333f`,strokeWidth:i?2:1.4}),(0,F.jsx)(`foreignObject`,{x:10,y:14,width:18,height:18,children:(0,F.jsx)(n,{size:16,color:e.type===`service`?`#ececf1`:`#9a9aab`})}),(0,F.jsx)(`text`,{x:34,y:20,fontSize:`13`,fontWeight:`600`,fill:`#ececf1`,children:e.label.length>18?`${e.label.slice(0,17)}…`:e.label}),(0,F.jsx)(`text`,{x:34,y:36,fontSize:`11`,fill:`#82829a`,children:e.type===`service`?`${B(e.calls)} req · ${z(e.avg)}`:e.type===`queue`?`queue · ${B(e.calls)} jobs`:`${e.type===`database`?`database`:`external`} · ${B(e.calls)}`})]},e.id)})]})]}),(0,F.jsx)(V,{title:f?f.label:`Details`,sub:f?.type,children:f?(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)($a,{items:[[`Calls`,B(f.calls)],[`Errors`,`${B(f.errors)} (${wa(f.errorRate)})`],...f.avg==null?[]:[[`Avg`,z(f.avg)]]]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Callers`}),l.edges.filter(e=>e.to===f.id).map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between text-[12px] py-0.5`,children:[(0,F.jsx)(`span`,{children:l.nodes.find(t=>t.id===e.from)?.label}),(0,F.jsxs)(`span`,{className:`tabular-nums text-ink2`,children:[B(e.calls),` · `,z(e.avg)]})]},e.from)),!l.edges.some(e=>e.to===f.id)&&(0,F.jsx)(`div`,{className:`text-mute text-[12px]`,children:`—`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Calls out to`}),l.edges.filter(e=>e.from===f.id).map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between text-[12px] py-0.5`,children:[(0,F.jsx)(`span`,{className:`truncate`,children:l.nodes.find(t=>t.id===e.to)?.label}),(0,F.jsxs)(`span`,{className:`tabular-nums text-ink2`,children:[B(e.calls),` · `,z(e.avg)]})]},e.to)),!l.edges.some(e=>e.from===f.id)&&(0,F.jsx)(`div`,{className:`text-mute text-[12px]`,children:`—`})]}),f.type===`service`&&(0,F.jsx)(`button`,{className:`btn`,onClick:()=>n(t(`/requests?service=${encodeURIComponent(f.label)}`)),children:`View requests`}),f.type===`database`&&(0,F.jsx)(`button`,{className:`btn`,onClick:()=>n(t(`/queries`)),children:`View statements`})]}):(0,F.jsx)(`div`,{className:`text-mute text-[12.5px]`,children:`Hover a node to isolate its connections; click it for numbers.`})})]})]})}var $V={error_rate:[{key:`mode`,label:`Mode`,type:`select`,options:[`threshold`,`anomaly`]},{key:`threshold`,label:`Threshold (%) / anomaly floor`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`},{key:`minRequests`,label:`Minimum requests`,type:`number`}],p95_latency:[{key:`mode`,label:`Mode`,type:`select`,options:[`threshold`,`anomaly`]},{key:`threshold`,label:`Threshold (ms)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`},{key:`minRequests`,label:`Minimum requests`,type:`number`}],avg_latency:[{key:`threshold`,label:`Threshold (ms)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`},{key:`minRequests`,label:`Minimum requests`,type:`number`}],throughput:[{key:`op`,label:`Fire when`,type:`select`,options:[`<`,`>`]},{key:`threshold`,label:`Requests per minute`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],job_failure_rate:[{key:`threshold`,label:`Threshold (%)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`},{key:`minRequests`,label:`Minimum runs`,type:`number`}],job_queue_wait:[{key:`threshold`,label:`p95 queue wait (ms)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],silence:[{key:`windowMin`,label:`Silence tolerance (minutes)`,type:`number`,hint:`Never fires for a scope that has never reported.`}],job_silence:[{key:`windowMin`,label:`Silence tolerance (minutes)`,type:`number`}],log_pattern:[{key:`pattern`,label:`Message contains`,type:`text`},{key:`levels`,label:`Levels`,type:`levels`},{key:`logger`,label:`Logger / context`,type:`text`},{key:`threshold`,label:`Fire above N lines`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],new_error_group:[],secret_leak:[],event_loop_delay:[{key:`threshold`,label:`p99 delay (ms)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],memory:[{key:`threshold`,label:`RSS (MB)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],cpu:[{key:`threshold`,label:`CPU (%)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],custom_metric:[{key:`metric`,label:`Metric name`,type:`text`},{key:`agg`,label:`Aggregation`,type:`select`,options:[`sum`,`avg`,`max`,`min`]},{key:`op`,label:`Fire when`,type:`select`,options:[`>`,`<`]},{key:`threshold`,label:`Threshold`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}]},eH=new Set([`error_rate`,`p95_latency`,`avg_latency`,`throughput`,`job_failure_rate`,`job_queue_wait`,`silence`,`job_silence`]);function tH(){let e=I(),t=L(),n=ht(),[r]=zn(),i=P(`/api/alerts`,[e.tick]),a=P(`/api/alerts/events${r.get(`rule`)?`?rule=${r.get(`rule`)}`:``}`,[e.tick]),[o,s]=(0,v.useState)(null);if((0,v.useEffect)(()=>{N(`/api/alerts/events/read`,{method:`POST`}).then(()=>e.refresh()).catch(()=>{})},[]),i.error)return(0,F.jsx)(W,{error:i.error});if(!i.data)return(0,F.jsx)(H,{});let c=i.data.types,l=e=>c[e]?.unit||``,u=()=>{i.reload(),a.reload()};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(hr,{size:18,className:`text-brand`}),title:`Alerts`,sub:`Thresholds or anomaly detection against the metric's recent baseline. Evaluated every 30 seconds.`,right:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`button`,{className:`btn`,onClick:async()=>{await N(`/api/alerts/evaluate`,{method:`POST`}),u()},children:[(0,F.jsx)(gi,{size:13}),`Evaluate now`]}),(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>s({name:``,type:`error_rate`,params:{mode:`threshold`,threshold:5,windowMin:10,minRequests:20},channels:[{type:`inapp`}],enabled:!0,create_issue:!1}),children:[(0,F.jsx)(yi,{size:14}),`New rule`]})]})}),(0,F.jsx)(V,{pad:!1,title:`Rules`,children:(0,F.jsx)(qa,{rows:i.data.rules,rowKey:e=>e.id,cols:[{key:`s`,label:`State`,render:e=>e.enabled?e.state===`firing`?(0,F.jsx)(G,{kind:`crit`,children:`firing`}):(0,F.jsx)(G,{kind:`good`,children:`ok`}):(0,F.jsx)(G,{kind:`neutral`,children:`disabled`})},{key:`n`,label:`Rule`,render:e=>(0,F.jsxs)(`div`,{className:`group cursor-pointer`,role:`button`,tabIndex:0,title:e.type===`slo_burn`?`Managed by its SLO`:`Edit rule`,onClick:()=>e.type===`slo_burn`?n(t(`/slos?id=${e.params.sloId}`)):s(e),onKeyDown:r=>{r.key===`Enter`&&(e.type===`slo_burn`?n(t(`/slos?id=${e.params.sloId}`)):s(e))},children:[(0,F.jsx)(`div`,{className:`font-medium group-hover:underline underline-offset-4 decoration-[#6a6a80]`,children:e.name}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] group-hover:underline underline-offset-4 decoration-[#4a4a5c]`,children:[c[e.type]?.family,` · `,c[e.type]?.label,e.params.mode===`anomaly`?` · anomaly`:e.params.threshold!=null&&e.type!==`silence`?` ${e.params.op||`>`} ${e.params.threshold}${l(e.type)}`:``,e.params.windowMin?` over ${e.params.windowMin}m`:``,e.params.service?` · ${e.params.service}`:``,e.params.route?` ${e.params.route}`:``]})]})},{key:`v`,label:`Current`,num:!0,render:e=>e.type===`new_error_group`||e.type===`secret_leak`?(0,F.jsx)(`span`,{className:`text-mute`,children:`event`}):e.last_value==null?`—`:`${B(Math.round(e.last_value*100)/100)}${l(e.type)?` ${l(e.type)}`:``}`},{key:`c`,label:`Channels`,render:e=>(0,F.jsxs)(`div`,{className:`flex gap-1`,children:[e.channels.map((e,t)=>(0,F.jsx)(`span`,{className:`pill`,children:e.type},t)),e.create_issue&&(0,F.jsx)(`span`,{className:`pill`,children:`issue`})]})},{key:`ch`,label:`Last change`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(io,{ts:e.last_change})})},{key:`a`,label:``,render:e=>(0,F.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Send test notification`,onClick:async()=>{aH((await N(`/api/alerts/${e.id}/test`,{method:`POST`})).deliveries)},children:(0,F.jsx)(ki,{size:13})}),e.type!==`slo_burn`&&(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Delete`,onClick:async()=>{oH(e.name)&&(await N(`/api/alerts/${e.id}`,{method:`DELETE`}),u())},children:(0,F.jsx)(Bi,{size:13})})]})}]})}),(0,F.jsx)(V,{pad:!1,title:`History`,sub:`state transitions with per-channel delivery`,children:a.data?(0,F.jsx)(qa,{rows:a.data,empty:(0,F.jsx)(U,{title:`No alert events yet`}),maxHeight:480,cols:[{key:`t`,label:`Time`,render:e=>(0,F.jsx)(`span`,{className:`tabular-nums`,children:Oa(e.ts,!0)})},{key:`s`,label:`State`,render:e=>e.state===`firing`?(0,F.jsx)(G,{kind:`crit`,children:`firing`}):e.state===`resolved`?(0,F.jsx)(G,{kind:`good`,children:`resolved`}):(0,F.jsx)(G,{kind:`neutral`,children:e.state})},{key:`r`,label:`Rule`,render:e=>(0,F.jsx)(`span`,{className:`font-medium`,children:e.rule})},{key:`m`,label:`Message`,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.message})},{key:`d`,label:`Delivery`,render:e=>(0,F.jsx)(`div`,{className:`flex gap-1`,children:e.deliveries.map((e,t)=>(0,F.jsxs)(`span`,{className:`pill`,style:{color:e.ok?`#5fd38a`:`#ff8a8a`},title:e.error||String(e.status||``),children:[e.type,` `,e.ok?`✓`:`✕`]},t))})}]}):(0,F.jsx)(H,{})}),o&&(0,F.jsx)(lH,{rule:o,types:c,onClose:()=>s(null),onSaved:()=>{s(null),u()}})]})}var nH=/^[^\s@,;]+@[^\s@,;]+\.[^\s@,;]+$/;function rH({value:e,onChange:t,placeholder:n}){let r=e.split(/[,;\s]+/).map(e=>e.trim()).filter(Boolean),[i,a]=(0,v.useState)(``),o=e=>{let n=e.split(/[,;\s]+/).map(e=>e.trim()).filter(Boolean).filter(e=>!r.includes(e));n.length&&t([...r,...n].join(`, `)),a(``)},s=e=>t(r.filter(t=>t!==e).join(`, `));return(0,F.jsxs)(`div`,{className:`input !h-auto min-h-[34px] flex flex-wrap items-center gap-1.5 py-1 cursor-text`,onClick:e=>e.currentTarget.querySelector(`input`)?.focus(),children:[r.map(e=>{let t=nH.test(e);return(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border pl-2 pr-1 py-[1px] text-[12px] ${t?`border-line2 bg-[#1f1f2a] text-ink`:`border-[#ff8a8a66] bg-[#ff8a8a14] text-[#ff9b9b]`}`,title:t?e:`Not an email address`,children:[e,(0,F.jsx)(`button`,{type:`button`,className:`rounded hover:bg-[#ffffff14] p-0.5 text-mute hover:text-ink`,"aria-label":`Remove ${e}`,onClick:t=>{t.stopPropagation(),s(e)},children:(0,F.jsx)(Ji,{size:11})})]},e)}),(0,F.jsx)(`input`,{className:`flex-1 min-w-[140px] bg-transparent outline-none text-[13px] py-0.5`,value:i,placeholder:r.length?``:n,onChange:e=>{let t=e.target.value;/[,;\s]$/.test(t)?o(t):a(t)},onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),o(i)):e.key===`Backspace`&&!i&&r.length&&s(r[r.length-1])},onPaste:e=>{let t=e.clipboardData.getData(`text`);/[,;\s]/.test(t)&&(e.preventDefault(),o(i+t))},onBlur:()=>o(i)})]})}function iH({value:e,onChange:t}){let{data:n}=P(`/api/settings`),r=L();return(0,F.jsx)(K,{label:`Email to`,hint:n&&!n.email.configured?(0,F.jsxs)(`span`,{children:[`Email is not configured yet. `,(0,F.jsx)(Nn,{className:`link`,to:r(`/integrations/email`),children:`Set up SMTP in Integrations`}),` first.`]}):`Press Enter or comma after each address`,children:(0,F.jsx)(rH,{value:e,onChange:t,placeholder:`oncall@company.com`})})}function aH(e){let t=e.length?e.map(e=>`${e.type}: ${e.ok?`delivered`:`failed ${e.error||e.status||``}`}`).join(`
117
+ `):`No external channels configured (in-app only).`;window.alert(t)}function oH(e){return window.confirm(`Delete rule "${e}"?`)}function sH({n:e,title:t,summary:n,open:r,last:i,onOpen:a,children:o}){return(0,F.jsxs)(`div`,{className:`relative pl-10`,children:[!i&&(0,F.jsx)(`span`,{className:`absolute left-[13px] top-8 bottom-0 w-px bg-line`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`absolute left-0 top-2.5 w-[27px] h-[27px] rounded-full grid place-items-center text-[12px] font-semibold border transition-colors ${r?`bg-brand border-brand text-white`:`bg-[#16161e] border-line2 text-ink2`}`,children:e}),(0,F.jsxs)(`div`,{className:`rounded-lg transition-colors ${r?`bg-[#1a1a24] border border-[#2a2a37]`:`border border-transparent`}`,children:[(0,F.jsxs)(`button`,{type:`button`,"aria-expanded":r,onClick:a,className:`w-full flex items-center gap-3 text-left rounded-lg px-3 py-2.5 transition-colors ${r?``:`hover:bg-[#17171f] cursor-pointer`}`,children:[(0,F.jsx)(`span`,{className:`text-[13.5px] font-semibold text-ink shrink-0`,children:t}),(0,F.jsx)(`span`,{className:`flex-1 min-w-0 text-right text-[12px] text-mute truncate`,children:n}),(0,F.jsx)(Er,{size:15,className:`shrink-0 text-mute transition-transform ${r?`rotate-180`:``}`})]}),r&&(0,F.jsx)(`div`,{className:`px-3 pt-1 pb-4 grid grid-cols-2 gap-3`,children:o})]}),(0,F.jsx)(`div`,{className:`h-2`})]})}var cH=e=>`${String(e).padStart(2,`0`)}:00`;function lH({rule:e,types:t,onClose:n,onSaved:r}){let i=I(),[a,o]=(0,v.useState)(JSON.parse(JSON.stringify(e))),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(`definition`),d=(e,t)=>o({...a,params:{...a.params,[e]:t}}),f=a.channels.find(e=>e.type===`webhook`)?.url||``,p=a.channels.find(e=>e.type===`slack`)?.url||``,m=a.channels.find(e=>e.type===`email`)?.to||``,h=m.split(/[,;\s]+/).filter(Boolean).filter(e=>nH.test(e)),g=m.split(/[,;\s]+/).filter(Boolean).filter(e=>!nH.test(e)),_=e=>{let t=a.channels.filter(e=>e.type!==`email`);o({...a,channels:e.trim()?[...t,{type:`email`,to:e}]:t})},y=(e,t)=>{let n=a.channels.filter(t=>t.type!==e);o({...a,channels:t?[...n,{type:e,url:t}]:n})},b=a.params.mute||{},x=t[a.type]||{},S=x.unit||``,C=$V[a.type]||[],w=[x.label,a.params.service,a.params.route].filter(Boolean).join(` · `),T=C.length?a.params.mode===`anomaly`?`Unusual vs. its baseline${a.params.windowMin?` over ${a.params.windowMin}m`:``}`:[a.params.threshold!=null&&a.type!==`silence`&&a.type!==`job_silence`?`${a.params.op||`>`} ${a.params.threshold}${S}`:null,a.type===`silence`||a.type===`job_silence`?`No data for ${a.params.windowMin??`—`}m`:a.params.windowMin?`over ${a.params.windowMin}m`:null,a.params.minRequests?`at least ${a.params.minRequests} ${a.type.startsWith(`job`)?`runs`:`requests`}`:null,a.params.pattern?`"${a.params.pattern}"`:null,a.params.metric||null].filter(Boolean).join(` · `):`Fires on every occurrence`,E=[`In-app`,p&&`Slack`,f&&`Webhook`,h.length&&`${h.length} email${h.length===1?``:`s`}`,a.create_issue&&`opens an issue`].filter(Boolean).join(` · `),D=b.from!=null&&b.to!=null?`Muted daily ${cH(b.from)}–${cH(b.to)} UTC`:`Always notifies`,O=Object.entries(t).filter(([e])=>e!==`slo_burn`).reduce((e,[t,n])=>((e[n.family]||=[]).push([t,n]),e),{});return(0,F.jsxs)(eo,{open:!0,onClose:n,title:a.id?`Edit alert rule`:`New alert rule`,wide:!0,children:[(0,F.jsxs)(`div`,{className:`flex flex-col`,children:[(0,F.jsxs)(sH,{n:1,title:`Definition`,summary:w,open:l===`definition`,onOpen:()=>u(`definition`),children:[(0,F.jsx)(K,{label:`Name`,children:(0,F.jsx)(`input`,{className:`input`,value:a.name,placeholder:x.label,onChange:e=>o({...a,name:e.target.value})})}),(0,F.jsx)(K,{label:`What to watch`,children:(0,F.jsx)(`select`,{className:`select`,value:a.type,onChange:e=>o({...a,type:e.target.value,params:{windowMin:10}}),children:Object.entries(O).map(([e,t])=>(0,F.jsx)(`optgroup`,{label:e,children:t.map(([e,t])=>(0,F.jsx)(`option`,{value:e,children:t.label},e))},e))})}),eH.has(a.type)&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(K,{label:`Application`,hint:`Leave on All to watch every application`,children:(0,F.jsxs)(`select`,{className:`select`,value:a.params.service||``,onChange:e=>d(`service`,e.target.value||void 0),children:[(0,F.jsx)(`option`,{value:``,children:`All applications`}),i.meta?.services.map(e=>(0,F.jsx)(`option`,{children:e.id},e.id))]})}),(0,F.jsx)(K,{label:`Route or job`,hint:`Optional, e.g. "POST /checkout"`,children:(0,F.jsx)(`input`,{className:`input`,value:a.params.route||``,placeholder:`All routes`,onChange:e=>d(`route`,e.target.value||void 0)})})]})]}),(0,F.jsxs)(sH,{n:2,title:`Condition`,summary:T,open:l===`condition`,onOpen:()=>u(`condition`),children:[!C.length&&(0,F.jsx)(`div`,{className:`col-span-2 text-[12.5px] text-ink2`,children:`This rule has nothing to set: it fires each time it happens.`}),C.map(e=>(0,F.jsx)(K,{label:e.label,hint:e.hint,children:e.type===`select`?(0,F.jsx)(`select`,{className:`select`,value:a.params[e.key]??e.options[0],onChange:t=>d(e.key,t.target.value),children:e.options.map(e=>(0,F.jsx)(`option`,{children:e},e))}):e.type===`levels`?(0,F.jsx)(`div`,{className:`flex gap-3 h-[34px] items-center`,children:[`error`,`warn`,`info`,`debug`].map(e=>(0,F.jsxs)(`label`,{className:`flex items-center gap-1.5 text-[12.5px]`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:(a.params.levels||[]).includes(e),onChange:t=>d(`levels`,t.target.checked?[...a.params.levels||[],e]:(a.params.levels||[]).filter(t=>t!==e))}),e]},e))}):(0,F.jsx)(`input`,{className:`input`,type:e.type===`number`?`number`:`text`,value:a.params[e.key]??``,onChange:t=>d(e.key,e.type===`number`?t.target.value===``?void 0:Number(t.target.value):t.target.value)})},e.key))]}),(0,F.jsxs)(sH,{n:3,title:`Notify`,summary:E,open:l===`notify`,onOpen:()=>u(`notify`),children:[(0,F.jsx)(`div`,{className:`col-span-2 text-[12px] text-mute -mb-1`,children:`Always shown in-app. Add any of these:`}),(0,F.jsx)(K,{label:`Slack incoming webhook URL`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`https://hooks.slack.com/services/…`,value:p,onChange:e=>y(`slack`,e.target.value)})}),(0,F.jsx)(K,{label:`Webhook URL`,hint:`POSTs JSON { rule, state, value, message, link }`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`https://…`,value:f,onChange:e=>y(`webhook`,e.target.value)})}),(0,F.jsx)(`div`,{className:`col-span-2`,children:(0,F.jsx)(iH,{value:m,onChange:e=>_(e)})}),(0,F.jsxs)(`label`,{className:`col-span-2 flex items-center gap-2 text-[12.5px]`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:a.create_issue,onChange:e=>o({...a,create_issue:e.target.checked})}),`Open an issue when it fires`]})]}),(0,F.jsxs)(sH,{n:4,title:`Silence window`,summary:D,open:l===`silence`,last:!0,onOpen:()=>u(`silence`),children:[(0,F.jsxs)(`div`,{className:`col-span-2 flex items-center gap-2 text-[12.5px] flex-wrap`,children:[(0,F.jsx)(`span`,{className:`text-ink2`,children:`Don't notify daily from`}),(0,F.jsx)(`input`,{className:`input w-20`,type:`number`,min:0,max:23,placeholder:`22`,value:b.from??``,onChange:e=>d(`mute`,{...b,from:e.target.value===``?void 0:Number(e.target.value)})}),(0,F.jsx)(`span`,{className:`text-ink2`,children:`to`}),(0,F.jsx)(`input`,{className:`input w-20`,type:`number`,min:0,max:24,placeholder:`7`,value:b.to??``,onChange:e=>d(`mute`,{...b,to:e.target.value===``?void 0:Number(e.target.value)})}),(0,F.jsx)(`span`,{className:`text-mute`,children:`o'clock, UTC`})]}),(0,F.jsx)(`div`,{className:`col-span-2 text-mute text-[11.5px]`,children:`The rule still evaluates and shows in-app; only the notifications wait. Leave empty to always notify.`})]})]}),s&&(0,F.jsx)(`div`,{className:`text-[#ff8a8a] mt-3`,children:s}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mt-4 pt-4 border-t border-line`,children:[(0,F.jsxs)(`label`,{className:`flex items-center gap-2 text-[12.5px]`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:a.enabled,onChange:e=>o({...a,enabled:e.target.checked})}),`Enabled`]}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:n,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,onClick:async()=>{if(g.length)u(`notify`),c(`Fix or remove ${g.length===1?`this address`:`these addresses`}: ${g.join(`, `)}`);else try{let e={...a,channels:a.channels.some(e=>e.type===`inapp`)?a.channels:[{type:`inapp`},...a.channels]};a.id?await N(`/api/alerts/${a.id}`,{method:`PUT`,json:e}):await N(`/api/alerts`,{method:`POST`,json:e}),r()}catch(e){c(e.message)}},children:`Save rule`})]})]})]})}var uH={fixed:{kind:`good`,label:`Fixed`},not_fixed:{kind:`crit`,label:`Not fixed`},too_early:{kind:`warn`,label:`Too early to tell`},not_enough_data:{kind:`neutral`,label:`Not enough data`}};function dH(){let{id:e}=yt(),t=I(),n=L(),r=ht(),{data:i,error:a,reload:o}=P(`/api/issues/${e}`,[e,t.tick]),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(``),{connected:p}=fz(),[m,h]=(0,v.useState)(null),[g,_]=(0,v.useState)(!1),y=async e=>{_(!0),h(null);try{h({ok:!0,text:await e()}),o()}catch(e){h({ok:!1,text:e.message})}finally{_(!1)}};if(a)return(0,F.jsx)(W,{error:a});if(!i)return(0,F.jsx)(H,{});let b=async n=>{await N(`/api/issues/${e}`,{method:`PATCH`,json:n}),o(),t.refresh()},x=i.incident,S=(t.meta?.versions||[]).filter(e=>!i.service||e.service===i.service).map(e=>e.version),C=[`Issue #${i.id}: ${i.title}`,`Status: ${i.status} · Severity: ${i.severity}${i.owner?` · Owner: ${i.owner}`:``}`,x?`Error: ${x.error}\nOperation: ${x.operation}\nStarted: ${new Date(x.start).toISOString()}${x.end?`\nEnded: ${new Date(x.end).toISOString()}`:``}\nIntroduced in: ${x.introducedIn||`unknown`}${i.fixVersion?`\nFixed in: ${i.fixVersion}`:``}\nOccurrences: ${x.occurrences}\nAffected users: ${x.users.length}${x.tenants.length?`\nTenants: ${x.tenants.map(e=>e.name).join(`, `)}`:``}`:``,`Timeline:`,...i.timeline.map(e=>`- ${new Date(e.ts).toISOString()} ${e.text}`)].filter(Boolean).join(`
118
+ `),w=i.sourceType===`error`?`/errors/${i.sourceRef}`:i.sourceType===`execution`?`/executions/${i.sourceRef}`:i.sourceType===`alert`?`/alerts`:null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Nn,{to:n(`/issues`),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:`← Issues`}),(0,F.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,F.jsxs)(`span`,{className:`text-mute text-[19px]`,children:[`#`,i.id]}),(0,F.jsx)(`h1`,{className:`text-[19px] font-semibold tracking-tight`,children:i.title})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 mt-1.5`,children:[(0,F.jsx)(G,{kind:uV[i.status]?.kind||`neutral`,children:uV[i.status]?.label||i.status}),(0,F.jsxs)(`span`,{className:`text-mute text-[12px]`,children:[`opened `,(0,F.jsx)(io,{ts:i.created}),i.sourceType?` from ${i.sourceType}`:``]}),w&&(0,F.jsx)(`button`,{className:`link text-[12px]`,onClick:()=>r(n(w)),children:`view source →`})]})]}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(Ga,{text:C,label:`Copy summary`}),[`open`,`in_progress`,`unverified`].includes(i.status)&&(0,F.jsx)(`button`,{className:`btn btn-primary`,onClick:()=>b({status:`resolved`}),children:`Mark resolved`}),[`resolved`,`closed`,`verifying`].includes(i.status)&&(0,F.jsx)(`button`,{className:`btn`,onClick:()=>b({status:`open`}),children:`Reopen`})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsxs)(`div`,{className:`@5xl:col-span-2 flex flex-col gap-3`,children:[i.description&&(0,F.jsx)(V,{title:`Description`,children:(0,F.jsx)(`div`,{className:`whitespace-pre-wrap text-[13px]`,children:i.description})}),x&&(0,F.jsx)(V,{title:`Incident record`,children:(0,F.jsx)($a,{items:[[`Error`,(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:x.error})],[`Operation`,(0,F.jsx)(`span`,{className:`mono`,children:x.operation})],[`Started`,Oa(x.start,!0)],[`Ended`,x.end?Oa(x.end,!0):`ongoing`],[`Last seen`,(0,F.jsx)(io,{ts:x.lastSeen})],[`Introduced in`,(0,F.jsx)(`span`,{className:`mono`,children:x.introducedIn||`—`})],[`Fixed in`,(0,F.jsx)(`span`,{className:`mono`,children:i.fixVersion||`—`})],[`Occurrences`,x.occurrences],[`Users affected`,x.users.length],[`Tenants`,x.tenants.length?(0,F.jsx)(`span`,{children:x.tenants.map((e,t)=>(0,F.jsxs)(`span`,{children:[t>0&&`, `,(0,F.jsx)(Nn,{to:n(Ma(e.name,e.guessed)),className:`underline decoration-dotted underline-offset-4 hover:text-ink`,children:e.name})]},`${e.guessed}|${e.name}`))}):`—`]]})}),(0,F.jsxs)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(Ni,{size:14}),`Did a release fix this?`]}),children:[(0,F.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,F.jsx)(K,{label:`Release`,children:(0,F.jsxs)(`select`,{className:`select w-48`,value:d,onChange:e=>f(e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:i.fixVersion?`Fix version (${i.fixVersion})`:`Since resolution`}),[...new Set(S)].map(e=>(0,F.jsx)(`option`,{children:e},e))]})}),(0,F.jsx)(`button`,{className:`btn`,onClick:async()=>u(await N(`/api/issues/${e}/verify${d?`?version=${encodeURIComponent(d)}`:``}`)),children:`Check`}),d&&d!==i.fixVersion&&(0,F.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>b({fixVersion:d}),children:`Set as fix version`})]}),l&&(0,F.jsxs)(`div`,{className:`mt-3 flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(G,{kind:uH[l.verdict]?.kind||`neutral`,children:uH[l.verdict]?.label||l.verdict}),(0,F.jsx)(`span`,{className:`text-ink2`,children:l.reason})]}),l.newErrorGroupsInRelease>0&&(0,F.jsxs)(`div`,{className:`text-mute text-[12px]`,children:[`Note: `,l.newErrorGroupsInRelease,` new error group(s) appeared in that release.`]})]}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px] mt-3`,children:`Marking an issue with a measurable scope as resolved moves it to Verifying: it closes on its own once the fix holds, reopens if the failure returns, and becomes Unverified after 7 days without a conclusion.`})]}),(0,F.jsxs)(V,{title:`Timeline`,children:[(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:[...i.timeline].reverse().map((e,t)=>(0,F.jsxs)(`div`,{className:`flex gap-3 text-[12.5px]`,children:[(0,F.jsx)(`span`,{className:`text-mute w-[130px] shrink-0 tabular-nums`,children:Oa(e.ts,!0)}),(0,F.jsx)(`span`,{children:e.text})]},t))}),(0,F.jsxs)(`form`,{className:`flex gap-2 mt-3`,onSubmit:e=>{e.preventDefault(),s&&(b({comment:s}),c(``))},children:[(0,F.jsx)(`input`,{className:`input flex-1`,placeholder:`Add a comment`,value:s,onChange:e=>c(e.target.value)}),(0,F.jsx)(`button`,{className:`btn`,children:`Comment`})]})]})]}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsxs)(V,{title:`Ticket`,sub:i.ticket?`kept in step with this issue`:p.length?`track the work where your team works`:void 0,children:[i.ticket?(0,F.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,F.jsx)(`div`,{children:(0,F.jsx)(mz,{ticket:i.ticket})}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[i.ticket.syncedAt?(0,F.jsxs)(F.Fragment,{children:[`Checked `,(0,F.jsx)(io,{ts:i.ticket.syncedAt}),`. `]}):``,`Closing it starts verification here; the result is posted on the ticket.`]}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsxs)(`button`,{className:`btn h-7`,disabled:g,onClick:()=>y(async()=>(await N(`/api/issues/${e}/ticket/sync`,{method:`POST`}),`Synced.`)),children:[(0,F.jsx)(Si,{size:12}),`Sync now`]}),(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,disabled:g,onClick:()=>y(async()=>window.confirm(`Unlink the ticket? It is not deleted.`)?(await N(`/api/issues/${e}/ticket`,{method:`DELETE`}),`Unlinked.`):`Kept.`),children:[(0,F.jsx)(Wi,{size:12}),`Unlink`]})]})]}):p.length?(0,F.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:p.map(t=>(0,F.jsxs)(`button`,{className:`btn`,disabled:g,onClick:()=>y(async()=>{let n=await N(`/api/issues/${e}/ticket`,{method:`POST`,json:{provider:t}});return`Created ${dz[t]} ${n.key}.`}),children:[`Create in `,dz[t]]},t))}):(0,F.jsxs)(`div`,{className:`text-mute text-[12.5px]`,children:[`Connect GitHub or Linear in `,(0,F.jsx)(`button`,{className:`link`,onClick:()=>r(n(`/integrations`)),children:`Integrations`}),` to open tickets from issues.`]}),m&&(0,F.jsx)(`div`,{className:`text-[12px] mt-2`,style:{color:m.ok?`#5fd38a`:`#ff8a8a`},children:m.text})]}),(0,F.jsx)(V,{title:`Details`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(K,{label:`Status`,children:(0,F.jsx)(`select`,{className:`select`,value:i.status,onChange:e=>b({status:e.target.value}),children:Object.entries(uV).map(([e,t])=>(0,F.jsx)(`option`,{value:e,children:t.label},e))})}),(0,F.jsx)(K,{label:`Severity`,children:(0,F.jsx)(`select`,{className:`select`,value:i.severity,onChange:e=>b({severity:e.target.value}),children:Object.keys(dV).map(e=>(0,F.jsx)(`option`,{children:e},e))})}),(0,F.jsx)(K,{label:`Owner`,children:(0,F.jsx)(`input`,{className:`input`,defaultValue:i.owner||``,onBlur:e=>e.target.value!==(i.owner||``)&&b({owner:e.target.value}),placeholder:`name or email`})}),(0,F.jsx)(K,{label:`Due date`,children:(0,F.jsx)(`input`,{className:`input`,type:`date`,defaultValue:i.due?new Date(i.due).toISOString().slice(0,10):``,onChange:e=>b({due:e.target.value?new Date(e.target.value).getTime():null})})}),(0,F.jsx)($a,{items:[[`Application`,i.service||`—`],[`Created`,Oa(i.created,!0)],[`Updated`,(0,F.jsx)(io,{ts:i.updated})]]}),(0,F.jsx)(`button`,{className:`btn btn-ghost justify-center text-[#ff8a8a]`,onClick:async()=>{window.confirm(`Delete this issue?`)&&(await N(`/api/issues/${e}`,{method:`DELETE`}),r(n(`/issues`)))},children:`Delete issue`})]})})]})]})]})}var fH={healthy:{kind:`good`,label:`Healthy`},at_risk:{kind:`warn`,label:`At risk`},burning:{kind:`serious`,label:`Burning`},exhausted:{kind:`crit`,label:`Budget exhausted`},no_data:{kind:`neutral`,label:`No data`}},pH=e=>e==null?`#55556a`:e<=0?$R.crit:e<.25?$R.serious:e<.5?$R.warn:$R.good,mH=(e,t)=>e==null?void 0:e>t?`#ff8a8a`:e>1?`#ffc85a`:void 0,hH=e=>`${e.service||`all applications`}${e.operation?` · ${e.operation}`:``}${e.kind===`job`?` (jobs)`:``}`,gH=e=>`${e.kind===`job`?`runs succeed`:`requests succeed (non-5xx)`}${e.latencyMs?` and finish within ${e.latencyMs}ms`:``}`;function _H({value:e}){let t=e==null?0:Math.max(0,Math.min(1,e))*100;return(0,F.jsx)(`div`,{className:`h-1.5 rounded-full bg-[#24242e] overflow-hidden`,title:e==null?`no data`:`${(e*100).toFixed(1)}% budget left`,children:(0,F.jsx)(`div`,{className:`h-full rounded-full`,style:{width:`${t}%`,background:pH(e)}})})}function vH(){let e=I(),[t,n]=zn(),{data:r,error:i,reload:a}=P(`/api/slos`,[e.tick]),[o,s]=(0,v.useState)(null),c=Number(t.get(`id`))||r?.[0]?.slo.id||null,l=e=>{let r=new URLSearchParams(t);r.set(`id`,String(e)),n(r,{replace:!0})};return i?(0,F.jsx)(W,{error:i}):r?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(zi,{size:18,className:`text-brand`}),title:`SLOs`,sub:`Service level objectives on real traffic: the share of good requests or job runs over a rolling window, the error budget left, and burn-rate alerts that fire before the budget runs out.`,right:(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>s({target:99.5,windowDays:7,kind:`http`,channels:[{type:`inapp`}]}),children:[(0,F.jsx)(yi,{size:14}),`New SLO`]})}),r.length===0?(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`No SLOs yet`,icon:(0,F.jsx)(zi,{size:22}),children:`An SLO says how reliable something must be, e.g. 99.5% of checkout requests succeed over 7 days. Obzerver tracks the error budget and alerts on fast and slow burn.`})}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-[360px_1fr] gap-3 items-start`,children:[(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:r.map(e=>(0,F.jsxs)(`button`,{onClick:()=>l(e.slo.id),className:`card text-left px-3.5 py-3 flex flex-col gap-2 ${c===e.slo.id?`!border-[#5a2340]`:`hover:border-line2`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium truncate`,children:e.slo.name}),(0,F.jsx)(G,{kind:fH[e.state].kind,children:fH[e.state].label})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] truncate`,children:[hH(e.slo),` · `,e.slo.target,`% over `,e.slo.windowDays,`d`]}),(0,F.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`text-[18px] font-semibold tabular-nums`,children:e.sli==null?`—`:`${e.sli}%`}),(0,F.jsx)(`span`,{className:`text-[11.5px] tabular-nums`,style:{color:pH(e.budgetRemaining)},children:e.budgetRemaining==null?`no data`:`${(e.budgetRemaining*100).toFixed(1)}% budget left`})]}),(0,F.jsx)(_H,{value:e.budgetRemaining})]},e.slo.id))}),c&&(0,F.jsx)(yH,{id:c,onEdit:e=>s(e),onDeleted:()=>{let e=new URLSearchParams(t);e.delete(`id`),n(e),a()}})]}),o&&(0,F.jsx)(xH,{slo:o,onClose:()=>s(null),onSaved:e=>{s(null),a(),l(e)}})]}):(0,F.jsx)(H,{})}function yH({id:e,onEdit:t,onDeleted:n}){let r=I(),i=L(),{data:a,error:o}=P(`/api/slos/${e}`,[e,r.tick]);if(o)return(0,F.jsx)(W,{error:o});if(!a)return(0,F.jsx)(H,{});let s=a.slo,c=a.history.points,l=[[`5 minutes`,a.burn.m5,14.4],[`30 minutes`,a.burn.m30,6],[`1 hour`,a.burn.h1,14.4],[`6 hours`,a.burn.h6,6],[`1 day`,a.burn.d1,1]];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 min-w-0`,children:[(0,F.jsx)(V,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[s.name,(0,F.jsx)(G,{kind:fH[a.state].kind,children:fH[a.state].label})]}),right:(0,F.jsxs)(`div`,{className:`flex gap-1`,children:[(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>t(s),children:[(0,F.jsx)(hi,{size:13}),`Edit`]}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Delete`,onClick:async()=>{window.confirm(`Delete SLO "${s.name}" and its burn alerts?`)&&(await N(`/api/slos/${s.id}`,{method:`DELETE`}),n())},children:(0,F.jsx)(Bi,{size:13})})]}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[s.description&&(0,F.jsx)(`div`,{className:`text-ink2`,children:s.description}),(0,F.jsxs)(`div`,{className:`text-[13px]`,children:[(0,F.jsxs)(`b`,{children:[s.target,`%`]}),` of `,s.operation?(0,F.jsx)(Wa,{name:s.operation}):(0,F.jsx)(`span`,{children:s.kind===`job`?`job runs`:`requests`}),` in `,(0,F.jsx)(`b`,{children:s.service||`all applications`}),` `,gH(s),`, over a rolling `,(0,F.jsxs)(`b`,{children:[s.windowDays,`-day`]}),` window.`]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-4 gap-3`,children:[(0,F.jsx)(bH,{label:`Achieved`,value:a.sli==null?`—`:`${a.sli}%`,sub:`target ${s.target}%`,color:a.sli!=null&&a.sli<s.target?`#ff8a8a`:void 0}),(0,F.jsx)(bH,{label:`Error budget left`,value:a.budgetRemaining==null?`—`:`${(a.budgetRemaining*100).toFixed(1)}%`,color:pH(a.budgetRemaining),sub:(0,F.jsx)(_H,{value:a.budgetRemaining})}),(0,F.jsx)(bH,{label:`Bad events left`,value:a.budgetEventsLeft==null?`—`:B(Math.max(0,a.budgetEventsLeft)),sub:`${B(a.bad)} bad of ${B(a.total)}`}),(0,F.jsx)(bH,{label:`Burn rate (1h)`,value:a.burn.h1==null?`—`:`${a.burn.h1}×`,sub:`1× spends the budget exactly by window end`,color:mH(a.burn.h1,14.4)})]}),a.partialWindow&&(0,F.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px] text-[#ffc85a]`,children:[(0,F.jsx)(Ui,{size:13}),a.dataSince?`Data only goes back to ${Oa(a.dataSince,!0)}`:`No data yet`,`, so this window is partial.`,s.windowDays>a.retentionDays&&` Retention is ${a.retentionDays} days; raise OBZERVER_RETENTION_DAYS to cover the full ${s.windowDays}-day window.`]})]})}),(0,F.jsx)(rz,{title:`Error budget burn-down`,sub:`share of the window's budget still unspent`,children:(0,F.jsx)(nz,{data:c,series:[{key:`budget`,label:`Budget left`,color:QR[0],type:`area`}],height:190,fmt:e=>`${e.toFixed(1)}%`,refLines:[{y:0,label:`exhausted`,color:$R.crit}],zoom:!1})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @7xl:grid-cols-2 gap-3`,children:[(0,F.jsx)(rz,{title:`SLI per bucket`,sub:`good share per ${a.history.bucketMs>=864e5?`day`:a.history.bucketMs>=36e5?`${a.history.bucketMs/36e5}h`:`30m`}`,children:(0,F.jsx)(nz,{data:c,series:[{key:`sli`,label:`SLI`,color:QR[2],type:`line`}],height:170,fmt:e=>`${e.toFixed(2)}%`,refLines:[{y:s.target,label:`target ${s.target}%`,color:`#ff6b9d`}],yDomain:[`auto`,100],zoom:!1})}),(0,F.jsx)(V,{title:`Burn rates`,sub:`multiples of the sustainable rate`,children:(0,F.jsxs)(`table`,{className:`tbl`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Lookback`}),(0,F.jsx)(`th`,{className:`num`,children:`Burn rate`}),(0,F.jsx)(`th`,{className:`num`,children:`Error rate`})]})}),(0,F.jsx)(`tbody`,{children:l.map(([e,t,n])=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{children:e}),(0,F.jsx)(`td`,{className:`num`,style:{color:mH(t,n)},children:t==null?`—`:`${t}×`}),(0,F.jsx)(`td`,{className:`num text-ink2`,children:t==null?`—`:wa(t*(100-s.target))})]},e))})]})})]}),(0,F.jsxs)(V,{title:`Burn-rate alerts`,sub:`created and kept in step with this SLO`,pad:!1,children:[(0,F.jsx)(qa,{rows:a.rules,cols:[{key:`s`,label:`State`,render:e=>e.state===`firing`?(0,F.jsx)(G,{kind:`crit`,children:`firing`}):(0,F.jsx)(G,{kind:`good`,children:`ok`})},{key:`n`,label:`Rule`,render:e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{children:e.params.speed===`fast`?`Fast burn`:`Slow burn`}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:e.params.speed===`fast`?`over 14.4× on both the last 1h and 5m (about 2% of a 30-day budget in an hour)`:`over 6× on both the last 6h and 30m (about 5% of a 30-day budget in 6 hours)`})]})},{key:`v`,label:`Current`,num:!0,render:e=>e.last_value==null?`—`:`${e.last_value.toFixed(1)}×`},{key:`c`,label:`Notifies`,render:()=>(0,F.jsx)(`div`,{className:`flex gap-1`,children:s.channels.map((e,t)=>(0,F.jsx)(`span`,{className:`pill`,children:e.type},t))})}]}),a.events.length>0&&(0,F.jsx)(`div`,{className:`border-t border-line`,children:a.events.slice(0,8).map(e=>(0,F.jsxs)(`div`,{className:`flex gap-3 px-3.5 py-2 border-b border-[#1d1d26] last:border-0 text-[12px]`,children:[(0,F.jsx)(`span`,{className:`text-mute w-32 shrink-0`,children:(0,F.jsx)(io,{ts:e.ts})}),e.state===`firing`?(0,F.jsx)(G,{kind:`crit`,children:`firing`}):(0,F.jsx)(G,{kind:`good`,children:e.state}),(0,F.jsx)(`span`,{className:`text-ink2 truncate`,children:e.message})]},e.id))}),(0,F.jsxs)(`div`,{className:`px-3.5 py-2 border-t border-line text-[11.5px] text-mute`,children:[`Delivery history is on `,(0,F.jsx)(Nn,{className:`link`,to:i(`/alerts`),children:`Alerts`}),`.`]})]})]})}function bH({label:e,value:t,sub:n,color:r}){return(0,F.jsxs)(`div`,{className:`rounded-lg border border-line px-3 py-2.5 flex flex-col gap-1`,children:[(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:e}),(0,F.jsx)(`div`,{className:`text-[20px] font-semibold tabular-nums leading-none`,style:r?{color:r}:void 0,children:t}),n&&(0,F.jsx)(`div`,{className:`text-mute text-[11px]`,children:n})]})}function xH({slo:e,onClose:t,onSaved:n}){let r=I(),[i,a]=(0,v.useState)({...e,channels:e.channels??[{type:`inapp`}]}),[o,s]=(0,v.useState)(``),c=P(`/api/operations?range=604800000&kind=${i.kind||`http`}${i.service?`&service=${encodeURIComponent(i.service)}`:``}`,[i.kind,i.service]),l=e=>i.channels?.find(t=>t.type===e),u=(e,t)=>{let n=(i.channels||[]).filter(t=>t.type!==e);a({...i,channels:t?[...n,{type:e,...t}]:n})};(0,v.useEffect)(()=>s(``),[i]);let d=async()=>{try{let e={...i,channels:[{type:`inapp`},...(i.channels||[]).filter(e=>e.type!==`inapp`)]};n((i.id?await N(`/api/slos/${i.id}`,{method:`PUT`,json:e}):await N(`/api/slos`,{method:`POST`,json:e})).id)}catch(e){s(e.message)}},f=i.target?100-i.target:null;return(0,F.jsxs)(eo,{open:!0,onClose:t,title:i.id?`Edit SLO`:`New SLO`,wide:!0,children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,F.jsx)(K,{label:`Name`,children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,placeholder:`Checkout availability`,value:i.name||``,onChange:e=>a({...i,name:e.target.value})})}),(0,F.jsx)(K,{label:`Measures`,children:(0,F.jsx)(Ka,{value:i.kind||`http`,onChange:e=>a({...i,kind:e,operation:null}),options:[{id:`http`,label:`HTTP requests`},{id:`job`,label:`Job runs`}]})}),(0,F.jsx)(K,{label:`Application`,children:(0,F.jsxs)(`select`,{className:`select`,value:i.service||``,onChange:e=>a({...i,service:e.target.value||null,operation:null}),children:[(0,F.jsx)(`option`,{value:``,children:`All applications`}),r.meta?.services.map(e=>(0,F.jsx)(`option`,{children:e.id},e.id))]})}),(0,F.jsxs)(K,{label:i.kind===`job`?`Job (optional)`:`Route (optional)`,hint:`leave empty to cover everything in the application`,children:[(0,F.jsx)(`input`,{className:`input mono`,list:`slo-ops`,placeholder:i.kind===`job`?`send-email`:`POST /checkout`,value:i.operation||``,onChange:e=>a({...i,operation:e.target.value||null})}),(0,F.jsx)(`datalist`,{id:`slo-ops`,children:[...new Set((c.data||[]).map(e=>e.name))].map(e=>(0,F.jsx)(`option`,{value:e},e))})]}),(0,F.jsx)(K,{label:`Target (% good)`,hint:f==null?void 0:`allows ${f.toFixed(3).replace(/0+$/,``).replace(/\.$/,``)}% bad events`,children:(0,F.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,F.jsx)(`input`,{className:`input w-28`,type:`number`,step:`0.01`,min:`1`,max:`99.999`,value:i.target??``,onChange:e=>a({...i,target:e.target.value===``?void 0:Number(e.target.value)})}),[99,99.5,99.9,99.95].map(e=>(0,F.jsx)(`button`,{type:`button`,className:`btn h-7 px-2 ${i.target===e?`btn-primary`:``}`,onClick:()=>a({...i,target:e}),children:e},e))]})}),(0,F.jsx)(K,{label:`Window`,children:(0,F.jsx)(Ka,{value:String(i.windowDays??7),onChange:e=>a({...i,windowDays:Number(e)}),options:[`1`,`7`,`14`,`28`,`30`].map(e=>({id:e,label:`${e}d`}))})}),(0,F.jsx)(K,{label:`Latency threshold (optional)`,hint:`if set, a successful event slower than this also counts as bad`,children:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`input`,{className:`input w-32`,type:`number`,min:`1`,placeholder:`e.g. 800`,value:i.latencyMs??``,onChange:e=>a({...i,latencyMs:e.target.value===``?null:Number(e.target.value)})}),(0,F.jsx)(`span`,{className:`text-mute`,children:`ms`})]})}),(0,F.jsx)(K,{label:`Description (optional)`,children:(0,F.jsx)(`input`,{className:`input`,value:i.description||``,onChange:e=>a({...i,description:e.target.value||null})})})]}),(0,F.jsxs)(`div`,{className:`mt-4 pt-4 border-t border-line grid grid-cols-2 gap-3`,children:[(0,F.jsx)(`div`,{className:`col-span-2 text-[12px] font-semibold`,children:`Burn-rate alerts notify`}),(0,F.jsx)(K,{label:`Slack incoming webhook URL`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`https://hooks.slack.com/services/…`,value:l(`slack`)?.url||``,onChange:e=>u(`slack`,e.target.value?{url:e.target.value}:null)})}),(0,F.jsx)(K,{label:`Generic webhook URL`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`https://…`,value:l(`webhook`)?.url||``,onChange:e=>u(`webhook`,e.target.value?{url:e.target.value}:null)})}),(0,F.jsx)(`div`,{className:`col-span-2`,children:(0,F.jsx)(iH,{value:l(`email`)?.to||``,onChange:e=>u(`email`,e.trim()?{to:e}:null)})})]}),o&&(0,F.jsx)(`div`,{className:`text-[#ff8a8a] mt-3`,children:o}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2 mt-4`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:t,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,onClick:d,children:`Save SLO`})]})]})}var SH={operational:{label:`Operational`,color:`#0ca30c`,kind:`good`},degraded:{label:`Degraded`,color:`#e6a100`,kind:`warn`},partial_outage:{label:`Partial outage`,color:`#ec835a`,kind:`serious`},major_outage:{label:`Major outage`,color:`#d03b3b`,kind:`crit`},no_data:{label:`No data`,color:`#3a3a48`,kind:`neutral`}},CH=[`investigating`,`identified`,`monitoring`,`resolved`],wH=e=>e[0].toUpperCase()+e.slice(1).replace(`_`,` `);function TH(){let e=I(),[t,n]=zn(),{data:r,error:i,reload:a}=P(`/api/status-pages`,[e.tick]),[o,s]=(0,v.useState)(null);if(i)return(0,F.jsx)(W,{error:i});if(!r)return(0,F.jsx)(H,{});let c=Number(t.get(`id`))||r[0]?.id||null,l=e=>{let r=new URLSearchParams(t);r.set(`id`,String(e)),n(r,{replace:!0})};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ra,{icon:(0,F.jsx)(xi,{size:18,className:`text-brand`}),title:`Status pages`,sub:`Public pages for your customers. Each component's status comes from its live traffic, and incidents can be posted by hand or opened automatically during an outage.`,right:(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>s({autoIncidents:!0,published:!0,components:[]}),children:[(0,F.jsx)(yi,{size:14}),`New status page`]})}),r.length===0?(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`No status pages yet`,icon:(0,F.jsx)(xi,{size:22}),children:`Create a page, map components like "Checkout" or "API" to your applications and routes, and share the public link.`})}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-[300px_1fr] gap-3 items-start`,children:[(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:r.map(e=>(0,F.jsxs)(`button`,{onClick:()=>l(e.id),className:`card text-left px-3.5 py-3 flex flex-col gap-1.5 ${c===e.id?`!border-[#5a2340]`:`hover:border-line2`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium truncate`,children:e.title}),(0,F.jsx)(G,{kind:SH[e.overall].kind,children:SH[e.overall].label})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] mono`,children:[`/status/`,e.slug,!e.published&&` · unpublished`]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[e.components.length,` component`,e.components.length===1?``:`s`,e.activeIncidents?` · ${e.activeIncidents} active incident${e.activeIncidents>1?`s`:``}`:``]})]},e.id))}),c&&(0,F.jsx)(EH,{id:c,onEdit:s,onDeleted:()=>{let e=new URLSearchParams(t);e.delete(`id`),n(e),a()},onChanged:a})]}),o&&(0,F.jsx)(kH,{page:o,onClose:()=>s(null),onSaved:e=>{s(null),a(),l(e)}})]})}function EH({id:e,onEdit:t,onDeleted:n,onChanged:r}){let i=I(),{data:a,error:o,reload:s}=P(`/api/status-pages/${e}`,[e,i.tick]),[c,l]=(0,v.useState)(null);if(o)return(0,F.jsx)(W,{error:o});if(!a)return(0,F.jsx)(H,{});let u=a.page,d=`${window.location.origin}/status/${u.slug}`,f=()=>{s(),r()},p=a.incidents.filter(e=>e.status!==`resolved`),m=a.incidents.filter(e=>e.status===`resolved`),h=e=>u.components.find(t=>t.id===e)?.name||`removed component`;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 min-w-0`,children:[(0,F.jsxs)(V,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[u.title,(0,F.jsx)(G,{kind:SH[a.overall].kind,children:SH[a.overall].label})]}),right:(0,F.jsxs)(`div`,{className:`flex gap-1`,children:[(0,F.jsxs)(`a`,{className:`btn h-7`,href:`/status/${u.slug}`,target:`_blank`,rel:`noreferrer`,children:[(0,F.jsx)(Vr,{size:13}),`Open public page`]}),(0,F.jsx)(Ga,{text:d,label:`Copy link`,className:`btn h-7`}),(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>t(u),children:[(0,F.jsx)(hi,{size:13}),`Edit`]}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Delete`,onClick:async()=>{window.confirm(`Delete status page "${u.title}" and its incidents?`)&&(await N(`/api/status-pages/${u.id}`,{method:`DELETE`}),n())},children:(0,F.jsx)(Bi,{size:13})})]}),children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-x-5 gap-y-1 text-[12.5px] text-ink2`,children:[(0,F.jsxs)(`span`,{children:[u.published?`Public at `:`Unpublished · `,(0,F.jsx)(`span`,{className:`mono`,children:d})]}),(0,F.jsxs)(`span`,{children:[`Automatic incidents: `,(0,F.jsx)(`b`,{children:u.autoIncidents?`on`:`off`})]})]}),u.description&&(0,F.jsx)(`div`,{className:`text-ink2 mt-2`,children:u.description})]}),(0,F.jsx)(V,{title:`Components`,sub:`status from the last 10 minutes of traffic; bars show the last 90 days`,pad:!1,children:a.components.length===0?(0,F.jsx)(U,{title:`No components`,children:`Edit the page to map components to applications and routes.`}):a.components.map(e=>(0,F.jsxs)(`div`,{className:`px-3.5 py-3 border-b border-[#1d1d26] last:border-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`font-medium`,children:e.name}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] mono truncate`,children:[e.service,e.operation?` · ${e.operation}`:``,e.latencyMs?` · degraded above p95 ${e.latencyMs}ms`:``]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-4 shrink-0 text-[12px]`,children:[(0,F.jsx)(`span`,{className:`text-mute tabular-nums`,children:e.live.requests?`${e.live.requests} req · ${wa(e.live.errorRate)} 5xx · p95 ${z(e.live.p95)}`:`no recent traffic`}),(0,F.jsx)(G,{kind:SH[e.status].kind,children:SH[e.status].label})]})]}),(0,F.jsx)(`div`,{className:`flex gap-[2px] h-6 mt-2`,children:e.days.map(e=>(0,F.jsx)(`span`,{className:`flex-1 rounded-[2px]`,style:{background:SH[e.status].color},title:`${new Date(e.day).toISOString().slice(0,10)}: ${SH[e.status].label}${e.requests?` · ${e.requests} req, ${wa(e.errorRate)} errors`:``}`},e.day))}),(0,F.jsxs)(`div`,{className:`flex justify-between text-mute text-[11px] mt-1`,children:[(0,F.jsx)(`span`,{children:`90 days ago`}),(0,F.jsx)(`span`,{children:e.uptime==null?``:`${e.uptime}% uptime`}),(0,F.jsx)(`span`,{children:`today`})]})]},e.id))}),(0,F.jsx)(V,{title:`Incidents`,right:(0,F.jsxs)(`button`,{className:`btn btn-primary h-7`,disabled:!u.components.length,onClick:()=>l({impact:`minor`,status:`investigating`,components:[]}),children:[(0,F.jsx)(ci,{size:13}),`Post incident`]}),pad:!1,children:a.incidents.length===0?(0,F.jsx)(U,{title:`No incidents`,children:`Post one when something is wrong, or let automatic incidents handle outages.`}):(0,F.jsx)(`div`,{children:[...p,...m.slice(0,10)].map(e=>(0,F.jsx)(DH,{inc:e,name:h,onChanged:f},e.id))})}),c&&(0,F.jsx)(OH,{page:u,inc:c,onClose:()=>l(null),onSaved:()=>{l(null),f()}})]})}function DH({inc:e,name:t,onChanged:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(e.status===`resolved`?`resolved`:e.status),s=e.status!==`resolved`,c=async()=>{await N(`/api/incidents/${e.id}`,{method:`PATCH`,json:{status:a,message:r}}),i(``),n()},l=e.impact===`critical`?`crit`:e.impact===`major`?`serious`:`warn`;return(0,F.jsxs)(`div`,{className:`px-3.5 py-3 border-b border-[#1d1d26] last:border-0 flex flex-col gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,F.jsx)(`span`,{className:`font-medium truncate`,children:e.title}),(0,F.jsx)(G,{kind:s?l:`good`,children:s?`${e.impact} · ${e.status}`:`resolved`}),e.auto&&(0,F.jsx)(`span`,{className:`pill`,children:`automatic`})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0 text-mute text-[11.5px]`,children:[Oa(e.created,!0),e.resolvedAt&&` → ${Oa(e.resolvedAt,!0)}`,(0,F.jsx)(`button`,{className:`btn btn-ghost h-6 px-1.5`,title:`Delete`,onClick:async()=>{window.confirm(`Delete this incident? It disappears from the public page.`)&&(await N(`/api/incidents/${e.id}`,{method:`DELETE`}),n())},children:(0,F.jsx)(Ji,{size:12})})]})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[`Affects: `,e.components.map(t).join(`, `)||`—`]}),(0,F.jsx)(`div`,{className:`flex flex-col gap-1 border-l border-line2 pl-3`,children:[...e.updates].reverse().map((e,t)=>(0,F.jsxs)(`div`,{className:`text-[12.5px]`,children:[(0,F.jsx)(`b`,{className:`capitalize`,children:e.status}),` `,(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`— `,e.text]}),` `,(0,F.jsx)(`span`,{className:`text-mute text-[11px]`,children:(0,F.jsx)(io,{ts:e.ts})})]},t))}),s&&(0,F.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,F.jsx)(`select`,{className:`select`,value:a,onChange:e=>o(e.target.value),children:CH.map(e=>(0,F.jsx)(`option`,{value:e,children:wH(e)},e))}),(0,F.jsx)(`input`,{className:`input flex-1`,placeholder:a===`resolved`?`What fixed it (optional)`:`Post an update for customers`,value:r,onChange:e=>i(e.target.value)}),(0,F.jsx)(`button`,{className:`btn`,disabled:!r&&a===e.status,onClick:c,children:a===`resolved`?`Resolve`:`Post update`})]})]})}function OH({page:e,inc:t,onClose:n,onSaved:r}){let[i,a]=(0,v.useState)({title:t.title||``,impact:t.impact||`minor`,status:t.status||`investigating`,components:t.components||[],message:``}),[o,s]=(0,v.useState)(``),c=e=>a({...i,components:i.components.includes(e)?i.components.filter(t=>t!==e):[...i.components,e]});return(0,F.jsx)(eo,{open:!0,onClose:n,title:`Post incident`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(K,{label:`Title`,children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,placeholder:`Checkout errors for some customers`,value:i.title,onChange:e=>a({...i,title:e.target.value})})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,F.jsx)(K,{label:`Impact`,hint:`minor = degraded, major = partial outage, critical = major outage`,children:(0,F.jsx)(Ka,{value:i.impact,onChange:e=>a({...i,impact:e}),options:[{id:`minor`,label:`Minor`},{id:`major`,label:`Major`},{id:`critical`,label:`Critical`}]})}),(0,F.jsx)(K,{label:`Status`,children:(0,F.jsx)(`select`,{className:`select`,value:i.status,onChange:e=>a({...i,status:e.target.value}),children:CH.filter(e=>e!==`resolved`).map(e=>(0,F.jsx)(`option`,{value:e,children:wH(e)},e))})})]}),(0,F.jsx)(K,{label:`Affected components`,children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.components.map(e=>(0,F.jsxs)(`label`,{className:`pill cursor-pointer !py-1 ${i.components.includes(e.id)?`!border-[#ff3d7f] !text-white`:``}`,children:[(0,F.jsx)(`input`,{type:`checkbox`,className:`hidden`,checked:i.components.includes(e.id),onChange:()=>c(e.id)}),e.name]},e.id))})}),(0,F.jsx)(K,{label:`First update (shown publicly)`,children:(0,F.jsx)(`textarea`,{className:`input`,rows:3,placeholder:`We are investigating elevated error rates on checkout.`,value:i.message,onChange:e=>a({...i,message:e.target.value})})}),o&&(0,F.jsx)(`div`,{className:`text-[#ff8a8a]`,children:o}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:n,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:!i.title||!i.components.length,onClick:async()=>{try{await N(`/api/status-pages/${e.id}/incidents`,{method:`POST`,json:i}),r()}catch(e){s(e.message)}},children:`Post incident`})]})]})})}function kH({page:e,onClose:t,onSaved:n}){let r=I(),[i,a]=(0,v.useState)({...e,components:e.components??[]}),[o,s]=(0,v.useState)(``),c=i.components||[],l=(e,t)=>a({...i,components:c.map((n,r)=>r===e?{...n,...t}:n)});return(0,F.jsxs)(eo,{open:!0,onClose:t,title:i.id?`Edit status page`:`New status page`,wide:!0,children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,F.jsx)(K,{label:`Title`,children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,placeholder:`Acme Status`,value:i.title||``,onChange:e=>a({...i,title:e.target.value})})}),(0,F.jsx)(K,{label:`URL slug`,hint:`public at /status/${i.slug||(i.title||``).toLowerCase().replace(/[^\w]+/g,`-`)||`…`}`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:`from the title`,value:i.slug||``,onChange:e=>a({...i,slug:e.target.value})})}),(0,F.jsx)(`div`,{className:`col-span-2`,children:(0,F.jsx)(K,{label:`Description (optional)`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`Live status of Acme's APIs and checkout`,value:i.description||``,onChange:e=>a({...i,description:e.target.value||null})})})}),(0,F.jsxs)(`label`,{className:`flex items-center gap-2 text-[12.5px]`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:i.published!==!1,onChange:e=>a({...i,published:e.target.checked})}),`Published (anyone with the link can view it)`]}),(0,F.jsxs)(`label`,{className:`flex items-center gap-2 text-[12.5px]`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:i.autoIncidents!==!1,onChange:e=>a({...i,autoIncidents:e.target.checked})}),`Open and resolve incidents automatically on outages`]})]}),(0,F.jsxs)(`div`,{className:`mt-4 pt-4 border-t border-line flex flex-col gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsx)(`span`,{className:`text-[12px] font-semibold`,children:`Components`}),(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>a({...i,components:[...c,{id:``,name:``,service:r.meta?.services[0]?.id||``,operation:null,latencyMs:null}]}),children:[(0,F.jsx)(yi,{size:13}),`Add component`]})]}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:`Customers only see the component name and its status. The application and route stay private.`}),c.length===0&&(0,F.jsx)(`div`,{className:`text-mute text-[12.5px] py-2`,children:`No components yet.`}),c.map((e,t)=>(0,F.jsxs)(`div`,{className:`grid grid-cols-[1.2fr_1fr_1.2fr_110px_auto] gap-2 items-center`,children:[(0,F.jsx)(`input`,{className:`input`,placeholder:`Name, e.g. Checkout`,value:e.name,onChange:e=>l(t,{name:e.target.value})}),(0,F.jsxs)(`select`,{className:`select`,value:e.service,onChange:e=>l(t,{service:e.target.value}),children:[(0,F.jsx)(`option`,{value:``,children:`Application…`}),r.meta?.services.map(e=>(0,F.jsx)(`option`,{children:e.id},e.id))]}),(0,F.jsx)(`input`,{className:`input mono`,placeholder:`Route (optional)`,value:e.operation||``,onChange:e=>l(t,{operation:e.target.value||null})}),(0,F.jsx)(`input`,{className:`input`,type:`number`,placeholder:`p95 ms`,title:`Degraded when p95 is above this (optional)`,value:e.latencyMs??``,onChange:e=>l(t,{latencyMs:e.target.value===``?null:Number(e.target.value)})}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,onClick:()=>a({...i,components:c.filter((e,n)=>n!==t)}),children:(0,F.jsx)(Bi,{size:13})})]},t))]}),o&&(0,F.jsx)(`div`,{className:`text-[#ff8a8a] mt-3`,children:o}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2 mt-4`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:t,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,onClick:async()=>{try{n((i.id?await N(`/api/status-pages/${i.id}`,{method:`PUT`,json:i}):await N(`/api/status-pages`,{method:`POST`,json:i})).id)}catch(e){s(e.message)}},children:`Save page`})]})]})}var AH={good:Mr,warn:jr,bad:pi,neutral:Nr};function jH(e){if(!e)return``;let t=Date.now()-e;if(t<6e4)return`just now`;let n=Math.round(t/6e4);if(n<60)return`${n} minute${n===1?``:`s`} ago`;let r=Math.round(t/36e5);if(r<24)return`${r} hour${r===1?``:`s`} ago`;let i=Math.round(t/864e5);return i===1?`yesterday`:`${i} days ago`}function MH({n:e,title:t,right:n,children:r,className:i=``}){return(0,F.jsxs)(`section`,{className:`card p-5 flex flex-col gap-3.5 ${i}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,F.jsx)(`h2`,{className:`text-[16px] font-semibold tracking-tight`,children:t}),e!=null&&e>0&&(0,F.jsx)(`span`,{className:`text-[11px] font-semibold px-2 py-0.5 rounded-full bg-[#22222d] text-ink2`,children:e}),(0,F.jsx)(`div`,{className:`flex-1`}),n]}),r]})}function NH({question:e,label:t=`Ask Obzeri`,className:n=`btn btn-ghost h-7 px-2 text-[12px]`}){return(0,F.jsxs)(`button`,{className:n,title:`Ask Obzeri: ${e}`,onClick:t=>{t.stopPropagation(),ir(e)},children:[(0,F.jsx)(Li,{size:13,className:`text-brand`}),t]})}function PH({title:e,children:t}){return(0,F.jsxs)(`div`,{className:`tone-good rounded-xl px-4 py-5 flex items-center gap-3`,style:{background:`var(--tone-bg)`},children:[(0,F.jsx)(Mr,{size:22,style:{color:`var(--tone)`},className:`shrink-0`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-medium text-[14px]`,children:e}),t&&(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px] mt-0.5`,children:t})]})]})}var FH={"15m":`the last 15 minutes`,"1h":`the last hour`,"6h":`the last 6 hours`,"24h":`the last 24 hours`,"7d":`the last 7 days`,"30d":`the last 30 days`,custom:`the selected time`},IH={healthy:{tone:`good`,Icon:Mr},attention:{tone:`warn`,Icon:jr},broken:{tone:`bad`,Icon:pi},idle:{tone:`neutral`,Icon:di},no_data:{tone:`neutral`,Icon:di}},LH={secret:Mi,silent:bi,error:br,endpoint:Ei,jobs:qi,alert:hr,release:Ci,new_errors:br,traffic:Hi,speed:Wr,failures:lr};function RH(){let e=I(),{data:t,error:n}=P(`/api/simple${e.q()}`,[e.tick]);return n?(0,F.jsx)(W,{error:n}):t?t.health===`no_data`?(0,F.jsx)(Qz,{simple:!0}):(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsx)(zH,{d:t}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @4xl:grid-cols-5 gap-5 items-start`,children:[(0,F.jsxs)(`div`,{className:`@4xl:col-span-3 flex flex-col gap-5`,children:[(0,F.jsx)(UH,{items:t.broke}),(0,F.jsx)(WH,{items:t.changed,basis:t.usualBasis})]}),(0,F.jsxs)(`div`,{className:`@4xl:col-span-2 flex flex-col gap-5`,children:[(0,F.jsx)(KH,{items:t.todo}),(0,F.jsx)(JH,{suggestions:t.suggestions})]})]})]}):(0,F.jsx)(H,{})}function zH({d:e}){let t=I(),n=IH[e.health];return(0,F.jsxs)(`section`,{className:`card tone-${n.tone} p-6 grid grid-cols-1 @4xl:grid-cols-[1fr_420px] gap-6`,style:{borderColor:`var(--tone-line)`,background:`linear-gradient(135deg, var(--tone-bg), transparent 55%), var(--color-panel)`},children:[(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 min-w-0`,children:[(0,F.jsx)(`div`,{className:`text-[11.5px] uppercase tracking-wider font-semibold text-mute`,children:`Is my app healthy?`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,F.jsx)(`div`,{className:`w-14 h-14 rounded-full flex items-center justify-center shrink-0 ${e.health===`healthy`?`health-orb`:``}`,style:{background:`var(--tone-bg)`,border:`1px solid var(--tone-line)`},children:(0,F.jsx)(n.Icon,{size:28,style:{color:`var(--tone)`}})}),(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`h1`,{className:`text-[26px] font-semibold tracking-tight leading-tight`,children:e.headline}),(0,F.jsx)(`p`,{className:`text-ink2 text-[14px] mt-1 leading-relaxed`,children:e.summary})]})]}),(0,F.jsx)(VH,{points:e.timeline,bucketMs:e.bucketMs,label:FH[t.range]||`this period`})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 @2xl:@max-4xl:grid-cols-4 gap-3 content-start`,children:e.vitals.map(e=>(0,F.jsx)(BH,{v:e},e.id))})]})}function BH({v:e}){let t=AH[e.tone];return(0,F.jsxs)(`div`,{className:`tone-${e.tone} rounded-xl border border-line bg-[#111118] px-3.5 py-3 min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[12px] text-ink2 font-medium`,children:[(0,F.jsx)(t,{size:13,style:{color:`var(--tone)`}}),e.label]}),(0,F.jsx)(`div`,{className:`text-[22px] font-semibold tracking-tight mt-1 tabular-nums`,style:{color:e.tone===`bad`||e.tone===`warn`?`var(--tone)`:void 0},children:e.value}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute leading-snug mt-0.5`,children:e.note}),e.usual&&(0,F.jsx)(`div`,{className:`text-[11.5px] text-ink2 mt-1`,children:e.usual})]})}function VH({points:e,bucketMs:t,label:n}){if(!e.length)return null;let r=Math.max(1,...e.map(e=>e.count)),i=e=>e.count?e.failed/e.count>=.05?`#e05252`:e.failed/e.count>=.01?`#e8a92a`:`#36b56a`:`#2a2a35`,a=e.length*t;return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`flex items-end gap-[2px] h-[54px]`,children:e.map(e=>(0,F.jsx)(`div`,{className:`flex-1 rounded-[3px] min-w-[2px] hover:opacity-80`,style:{height:`${Math.max(8,e.count/r*100)}%`,background:i(e)},title:`${Oa(e.t,a>864e5)} · ${B(e.count)} requests${e.failed?` · ${B(e.failed)} failed`:``}`},e.t))}),(0,F.jsxs)(`div`,{className:`flex flex-wrap justify-between gap-x-4 gap-y-1 text-[11px] text-mute mt-1.5`,children:[(0,F.jsx)(`span`,{className:`whitespace-nowrap`,children:n.charAt(0).toUpperCase()+n.slice(1)}),(0,F.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 whitespace-nowrap`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`i`,{className:`w-2 h-2 rounded-sm inline-block bg-[#36b56a]`}),`fine`]}),(0,F.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`i`,{className:`w-2 h-2 rounded-sm inline-block bg-[#e8a92a]`}),`some failures`]}),(0,F.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`i`,{className:`w-2 h-2 rounded-sm inline-block bg-[#e05252]`}),`many failures`]}),(0,F.jsx)(`span`,{children:`now`})]})]})]})}function HH({f:e,timeline:t}){let n=ht(),r=L(),i=LH[e.kind]||br;return(0,F.jsxs)(`div`,{className:`tone-${e.tone} group flex items-start gap-3 rounded-xl px-3.5 py-3 border border-transparent ${e.link?`cursor-pointer hover:bg-[#181821] hover:border-line`:``}`,onClick:()=>e.link&&n(r(e.link)),children:[(0,F.jsx)(`div`,{className:`${t?`w-8 h-8`:`w-9 h-9`} rounded-lg flex items-center justify-center shrink-0`,style:{background:`var(--tone-bg)`},children:(0,F.jsx)(i,{size:t?15:17,style:{color:`var(--tone)`}})}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`font-medium text-[13.5px]`,children:e.title}),e.isNew&&(0,F.jsx)(`span`,{className:`text-[10.5px] font-semibold px-1.5 py-px rounded-full`,style:{color:`var(--tone)`,background:`var(--tone-bg)`},children:`NEW`})]}),(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px] mt-0.5 leading-relaxed break-words`,children:e.detail}),e.ts&&(0,F.jsx)(`div`,{className:`text-mute text-[11.5px] mt-1`,children:t?jH(e.ts):`last seen ${jH(e.ts)}`})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0 opacity-70 group-hover:opacity-100`,children:[e.ask&&(0,F.jsx)(NH,{question:e.ask,label:`Ask`}),e.link&&(0,F.jsx)(Or,{size:16,className:`text-mute`})]})]})}function UH({items:e}){let[t,n]=(0,v.useState)(!1),r=t?e:e.slice(0,5);return(0,F.jsx)(MH,{title:`What broke?`,n:e.length,children:e.length===0?(0,F.jsx)(PH,{title:`Nothing is broken`,children:`No crashes, failing pages, leaks or firing alerts in this period.`}):(0,F.jsxs)(`div`,{className:`flex flex-col -mx-1.5`,children:[r.map(e=>(0,F.jsx)(HH,{f:e},e.id)),e.length>5&&(0,F.jsx)(`button`,{className:`btn btn-ghost self-start ml-1.5 mt-1`,onClick:()=>n(!t),children:t?`Show less`:`Show ${e.length-5} more`})]})})}function WH({items:e,basis:t}){return(0,F.jsx)(MH,{title:`What changed?`,n:e.length,right:t?(0,F.jsxs)(`span`,{className:`text-[11.5px] text-mute`,title:`Compared with ${t}`,children:[`vs a normal `,t.includes(`week`)?`week`:`day`]}):null,children:e.length===0?(0,F.jsxs)(`div`,{className:`text-ink2 text-[13px] px-1`,children:[`Nothing new: no deploys, no new kinds of errors, and traffic and speed look `,t?`like they usually do at this time`:`steady`,`.`]}):(0,F.jsx)(`div`,{className:`flex flex-col -mx-1.5`,children:e.map(e=>(0,F.jsx)(HH,{f:e,timeline:!0},e.id))})})}var GH={now:{label:`Do now`,tone:`bad`},soon:{label:`Soon`,tone:`warn`},later:{label:`When you can`,tone:`neutral`}};function KH({items:e}){let[t,n]=(0,v.useState)(e[0]?.id??null);return(0,F.jsx)(MH,{title:`What should I do?`,n:e.length,children:e.length===0?(0,F.jsx)(PH,{title:`Nothing to do right now`,children:`Go build something. We will tell you when that changes.`}):(0,F.jsx)(`ol`,{className:`flex flex-col gap-2`,children:e.map((e,r)=>(0,F.jsx)(qH,{t:e,n:r+1,open:t===e.id,onToggle:()=>n(t===e.id?null:e.id)},e.id))})})}function qH({t:e,n:t,open:n,onToggle:r}){let i=ht(),a=L(),o=GH[e.urgency];return(0,F.jsxs)(`li`,{className:`tone-${o.tone} rounded-xl border bg-[#111118] ${n?`border-line2`:`border-line`}`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-start gap-3 px-3.5 py-3 text-left`,onClick:r,"aria-expanded":n,children:[(0,F.jsx)(`span`,{className:`w-6 h-6 rounded-full flex items-center justify-center text-[12px] font-semibold shrink-0 mt-px`,style:{background:`var(--tone-bg)`,color:`var(--tone)`},children:t}),(0,F.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`font-medium text-[13.5px]`,children:e.title}),(0,F.jsx)(`span`,{className:`text-[10.5px] font-semibold uppercase tracking-wide`,style:{color:`var(--tone)`},children:o.label})]}),!n&&(0,F.jsx)(`span`,{className:`block text-mute text-[12px] truncate mt-0.5`,children:e.why})]}),n?(0,F.jsx)(Er,{size:15,className:`text-mute mt-1`}):(0,F.jsx)(Or,{size:15,className:`text-mute mt-1`})]}),n&&(0,F.jsxs)(`div`,{className:`px-3.5 pb-3.5 pl-[50px] flex flex-col gap-3`,children:[(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px] leading-relaxed`,children:e.why}),e.steps.length>0&&(0,F.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.steps.map((e,t)=>(0,F.jsxs)(`li`,{className:`flex gap-2 text-[12.5px]`,children:[(0,F.jsxs)(`span`,{className:`text-mute tabular-nums`,children:[t+1,`.`]}),(0,F.jsx)(`span`,{children:e})]},t))}),(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.executionId&&(0,F.jsx)(Ga,{className:`btn btn-primary h-8`,label:`Copy fix prompt`,text:async()=>(await N(`/api/executions/${e.executionId}/prompt`)).prompt}),e.link&&(0,F.jsxs)(`button`,{className:`btn h-8 ${e.executionId?``:`btn-primary`}`,onClick:()=>i(a(e.link)),children:[e.linkLabel||`Open`,(0,F.jsx)(Or,{size:13})]}),e.ask&&(0,F.jsx)(NH,{question:e.ask,className:`btn h-8`})]}),e.executionId&&(0,F.jsxs)(`div`,{className:`text-[11.5px] text-mute flex items-center gap-1.5`,children:[(0,F.jsx)(Ki,{size:12}),`The prompt has the error, the code around it and what happened, ready for Cursor, Claude Code or Copilot.`]})]})]})}function JH({suggestions:e}){let[t,n]=(0,v.useState)(``);return(0,F.jsxs)(MH,{title:`Ask Obzeri`,children:[(0,F.jsxs)(`form`,{className:`relative`,onSubmit:e=>{e.preventDefault(),t.trim()&&(ir(t.trim()),n(``))},children:[(0,F.jsx)(Li,{size:15,className:`absolute left-3 top-1/2 -translate-y-1/2 text-brand`}),(0,F.jsx)(`input`,{dir:`auto`,className:`input w-full h-11 pl-9 pr-11 text-[13.5px] rounded-xl`,placeholder:`Ask anything about your app…`,value:t,onChange:e=>n(e.target.value)}),(0,F.jsx)(`button`,{className:`absolute right-1.5 top-1/2 -translate-y-1/2 btn btn-primary h-8 w-8 !p-0 justify-center rounded-lg`,disabled:!t.trim(),title:`Ask`,children:(0,F.jsx)(pr,{size:15})})]}),(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.map(e=>(0,F.jsx)(`button`,{className:`text-left rounded-full border border-line hover:border-line2 hover:bg-panel2 px-3 py-1.5 text-[12px] text-ink2 hover:text-ink max-w-full truncate`,title:e,onClick:()=>ir(e),children:e},e))}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute`,children:`Plain answers from your app's own data, in any language.`})]})}function YH(){let e=I(),{data:t,error:n,setData:r}=P(`/api/simple/alerts`,[e.tick]);if((0,v.useEffect)(()=>{N(`/api/alerts/events/read`,{method:`POST`}).then(()=>e.refresh()).catch(()=>{})},[]),n)return(0,F.jsx)(W,{error:n});if(!t)return(0,F.jsx)(H,{});let i=async e=>r(await N(`/api/simple/alerts`,{method:`PUT`,json:e}));return(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-[24px] font-semibold tracking-tight flex items-center gap-2.5`,children:[(0,F.jsx)(hr,{size:22,className:`text-brand`}),`Alerts`]}),(0,F.jsx)(`p`,{className:`text-ink2 mt-1 text-[14px]`,children:`Hear about problems before your users tell you.`})]}),(0,F.jsx)(XH,{firing:t.firing}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @4xl:grid-cols-5 gap-5 items-start`,children:[(0,F.jsxs)(`div`,{className:`@4xl:col-span-3 flex flex-col gap-5`,children:[(0,F.jsx)(MH,{title:`Tell me when…`,children:(0,F.jsx)(`div`,{className:`flex flex-col divide-y divide-[#1f1f29]`,children:t.presets.map(e=>(0,F.jsx)(QH,{p:e,onChange:t=>i({presets:{[e.id]:t}})},e.id))})}),(0,F.jsx)(eU,{events:t.events})]}),(0,F.jsx)(`div`,{className:`@4xl:col-span-2`,children:(0,F.jsx)($H,{data:t,onSave:e=>i({channels:e})})})]})]})}function XH({firing:e}){let t=I(),n=ht(),r=L(),i=rr(),a=t.meta?.openSecrets||0;return!e.length&&!a?(0,F.jsx)(PH,{title:`All quiet right now`,children:`No alert is firing. The switches below decide what wakes you up.`}):(0,F.jsxs)(`section`,{className:`card tone-bad p-5 flex flex-col gap-2`,style:{borderColor:`var(--tone-line)`,background:`linear-gradient(135deg, var(--tone-bg), transparent 60%), var(--color-panel)`},children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 font-semibold text-[15px]`,children:[(0,F.jsx)(mr,{size:17,style:{color:`var(--tone)`}}),`Happening right now`]}),a>0&&(0,F.jsxs)(`button`,{className:`flex items-center gap-3 text-left rounded-lg px-2 py-2 hover:bg-[#1c1c25]`,onClick:()=>n(r(`/secrets`)),children:[(0,F.jsx)(Mi,{size:16,style:{color:`var(--tone)`}}),(0,F.jsxs)(`span`,{className:`flex-1 text-[13.5px]`,children:[a===1?`A secret is`:`${a} secrets are`,` being written to your logs`]}),(0,F.jsx)(Or,{size:15,className:`text-mute`})]}),e.map(e=>(0,F.jsxs)(`button`,{className:`flex items-center gap-3 text-left rounded-lg px-2 py-2 hover:bg-[#1c1c25]`,onClick:()=>i(`/alerts?rule=${e.id}`),children:[(0,F.jsx)(hr,{size:16,style:{color:`var(--tone)`}}),(0,F.jsx)(`span`,{className:`flex-1 text-[13.5px]`,children:e.name}),e.since&&(0,F.jsxs)(`span`,{className:`text-mute text-[12px]`,children:[`since `,jH(e.since)]}),(0,F.jsx)(Or,{size:15,className:`text-mute`})]},e.id))]})}function ZH({on:e,onChange:t,label:n}){return(0,F.jsx)(`button`,{role:`switch`,"aria-checked":e,"aria-label":n,onClick:()=>t(!e),className:`relative w-[42px] h-[24px] rounded-full shrink-0 transition-colors`,style:{background:e?`linear-gradient(120deg, #ff3d7f, #a855f7)`:`#2c2c38`},children:(0,F.jsx)(`span`,{className:`absolute top-[3px] w-[18px] h-[18px] rounded-full bg-white shadow transition-[left]`,style:{left:e?21:3}})})}function QH({p:e,onChange:t}){let[n,r]=(0,v.useState)(!1);return(0,F.jsxs)(`div`,{className:`flex items-center gap-4 py-3.5`,children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`font-medium text-[14px]`,children:e.label}),e.firing&&(0,F.jsx)(`span`,{className:`tone-bad text-[10.5px] font-semibold px-1.5 py-px rounded-full`,style:{color:`var(--tone)`,background:`var(--tone-bg)`},children:`FIRING`})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[12.5px] mt-0.5`,children:[e.description,e.lastFired?` · last time ${jH(e.lastFired)}`:``]})]}),(0,F.jsx)(ZH,{on:e.enabled,label:e.label,onChange:async e=>{r(!0);try{await t(e)}finally{r(!1)}}}),n&&(0,F.jsx)(`span`,{className:`sr-only`,children:`saving`})]})}function $H({data:e,onSave:t}){let n=rr(),[r,i]=(0,v.useState)(e.channels.email),[a,o]=(0,v.useState)(e.channels.slack),[s,c]=(0,v.useState)(null),l=r!==e.channels.email||a!==e.channels.slack,u=!!(e.channels.email||e.channels.slack);return(0,F.jsxs)(MH,{title:`Where should we tell you?`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3 text-[13px]`,children:[(0,F.jsx)(ui,{size:16,className:`text-mute`}),(0,F.jsx)(`span`,{className:`flex-1`,children:`In this dashboard`}),(0,F.jsx)(`span`,{className:`text-mute text-[12px]`,children:`always on`})]}),(0,F.jsxs)(`form`,{className:`flex flex-col gap-3.5`,onSubmit:async e=>{e.preventDefault();try{await t({email:r,slack:a}),c({ok:!0,text:`Saved.`})}catch(e){c({ok:!1,text:e.message})}},children:[(0,F.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,F.jsx)(si,{size:15,className:`text-mute`}),`Email`]}),(0,F.jsx)(`input`,{className:`input h-9`,type:`text`,placeholder:`you@example.com`,value:r,onChange:e=>i(e.target.value),disabled:!e.emailReady&&!r}),!e.emailReady&&(0,F.jsxs)(`span`,{className:`text-[11.5px] text-mute`,children:[`Email needs a mail server first. `,(0,F.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>n(`/integrations/email`),children:`Set one up`})]})]}),(0,F.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,F.jsx)(Pi,{size:15,className:`text-mute`}),`Slack`]}),(0,F.jsx)(`input`,{className:`input h-9`,type:`url`,placeholder:`https://hooks.slack.com/services/…`,value:a,onChange:e=>o(e.target.value)}),(0,F.jsxs)(`a`,{className:`text-[11.5px] link inline-flex items-center gap-1 self-start`,href:`https://api.slack.com/messaging/webhooks`,target:`_blank`,rel:`noreferrer`,children:[`How to get a Slack webhook`,(0,F.jsx)(Vr,{size:11})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`button`,{className:`btn btn-primary h-9`,disabled:!l,children:`Save`}),(0,F.jsxs)(`button`,{type:`button`,className:`btn h-9`,disabled:!u||l,title:l?`Save first`:void 0,onClick:async()=>{c(null);try{let e=(await N(`/api/simple/alerts/test`,{method:`POST`})).deliveries.filter(e=>e.type!==`inapp`&&!e.ok);c(e.length?{ok:!1,text:`Could not reach ${e.map(e=>`${e.type}${e.error?` (${e.error})`:``}`).join(`, `)}`}:{ok:!0,text:`Test sent. Check your inbox or Slack.`})}catch(e){c({ok:!1,text:e.message})}},children:[(0,F.jsx)(ki,{size:13}),`Send a test`]})]}),s&&(0,F.jsxs)(`div`,{className:`text-[12.5px] flex items-center gap-1.5 ${s.ok?`text-[#5ad17a]`:`text-[#ff8a8a]`}`,children:[s.ok&&(0,F.jsx)(Mr,{size:13}),s.text]})]}),(0,F.jsxs)(`div`,{className:`text-[11.5px] text-mute border-t border-line pt-3`,children:[`Webhooks, Discord, per-route rules and quiet hours are in `,(0,F.jsx)(`button`,{className:`link`,onClick:()=>n(`/alerts`),children:`Advanced → Alerts`}),`.`]})]})}function eU({events:e}){let[t,n]=(0,v.useState)(!1),r=t?e:e.slice(0,8);return(0,F.jsx)(MH,{title:`Recent alerts`,n:e.length,children:e.length===0?(0,F.jsx)(`div`,{className:`text-ink2 text-[13px]`,children:`Nothing has fired yet.`}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[r.map(e=>{let t=e.state===`firing`?`bad`:`good`;return(0,F.jsxs)(`div`,{className:`tone-${t} flex items-start gap-3 px-1 py-2`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full mt-[7px] shrink-0`,style:{background:`var(--tone)`}}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`text-[13px]`,children:[(0,F.jsx)(`span`,{className:`font-medium`,children:e.rule}),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`· `,e.state===`firing`?`went off`:`back to normal`,` `,jH(e.ts)]})]}),(0,F.jsx)(`div`,{className:`text-ink2 text-[12px] mt-0.5 break-words`,children:e.message})]})]},e.id)}),e.length>8&&(0,F.jsx)(`button`,{className:`btn btn-ghost self-start`,onClick:()=>n(!t),children:t?`Show less`:`Show ${e.length-8} more`})]})})}function tU(){let e=I(),t=rr(),n=P(`/api/overview${e.q()}`,[e.tick]),r=P(`/api/runtime${e.q()}`,[e.tick]),i=P(`/api/metrics${e.q()}`,[e.tick]);if(n.error)return(0,F.jsx)(W,{error:n.error});if(!n.data)return(0,F.jsx)(H,{});let a=n.data,o=a.kpis,s=o.usual&&o.usual.requests>=50?o.usual:null,c=az(a.series.points,a.band),l=oz(a.band),u=FH[e.range]||`this period`,d=[{key:`count`,label:`Requests`,color:QR[0],type:`bar`},...l?[{...l.calls,label:`Usual`}]:[]],f=[...l?[{...l.p95,label:`Normal range`}]:[],{key:`p95`,label:`Slowest 5%`,color:QR[1],type:`line`},{key:`avg`,label:`Average`,color:QR[2],type:`line`}],p=[{key:`s5xx`,label:`Failed (server errors)`,color:$R.crit,type:`bar`,stack:`e`},{key:`s4xx`,label:`Rejected (bad requests)`,color:$R.warn,type:`bar`,stack:`e`}],m=new Map;for(let e of r.data||[])for(let t of e.points){let e=m.get(t.t)||{t:t.t,cpu:null,mem:null};t.cpuUtil!=null&&(e.cpu=Math.max(e.cpu??0,t.cpuUtil)),t.memUtil!=null&&(e.mem=Math.max(e.mem??0,t.memUtil)),m.set(t.t,e)}let h=[...m.values()].sort((e,t)=>e.t-t.t),g=h[h.length-1],_=[{key:`cpu`,label:`CPU`,color:QR[0],type:`line`},{key:`mem`,label:`Memory`,color:QR[6],type:`line`}],v=Math.max(g?.cpu??0,g?.mem??0),y=s?.requests?o.requests/s.requests:null,b=s?.p95&&o.p95?o.p95/s.p95:null,x=o.requests>=20&&o.failureRate>=5?`bad`:o.failureRate>=1&&o.failed>=3?`warn`:`good`,S=[...new Set((i.data||[]).map(e=>e.name))];return(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-[24px] font-semibold tracking-tight flex items-center gap-2.5`,children:[(0,F.jsx)(wr,{size:22,className:`text-brand`}),`Metrics`]}),(0,F.jsxs)(`p`,{className:`text-ink2 mt-1 text-[14px]`,children:[`How your app did over `,u,s?`, next to what is normal for this time`:``,`.`]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @4xl:grid-cols-2 gap-5`,children:[(0,F.jsx)(nU,{title:`Traffic`,what:`How many requests your app handled.`,value:B(o.requests),unit:`requests`,status:y==null?{tone:`neutral`,text:o.rpm?`About ${B(o.rpm)} a minute`:`No requests yet`}:y>=1.5?{tone:`neutral`,text:`${y.toFixed(1)}× busier than usual`}:y<=.67?{tone:`warn`,text:`${Math.round((1-y)*100)}% quieter than usual`}:{tone:`good`,text:`About as busy as usual`},series:d,children:(0,F.jsx)(nz,{data:c,series:d,height:190,zoom:!1,fmt:e=>B(e)})}),(0,F.jsx)(nU,{title:`Speed`,what:`How long requests take. Lower is better; the slowest 5% is what unhappy users feel.`,value:z(o.p95),unit:`slowest 5%`,status:o.p95==null?{tone:`neutral`,text:`Nothing to time yet`}:b!=null&&b>=1.4?{tone:`warn`,text:`Slower than usual (normally ${z(s.p95)})`}:o.p95>=1500?{tone:`warn`,text:`On the slow side`}:{tone:`good`,text:s?.p95?`Normal (usually ${z(s.p95)})`:`Fast`},series:f,children:(0,F.jsx)(nz,{data:c,series:f,height:190,zoom:!1,fmt:e=>z(e),yFmt:e=>e>=1e3?`${+(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`})}),(0,F.jsx)(nU,{title:`Errors`,what:`Requests that failed because of your server (red), and requests your app rejected, like a wrong password or a missing page (yellow).`,value:wa(o.failureRate),unit:`failed`,status:{tone:x,text:o.failed?`${B(o.failed)} failed, ${B(o.clientErrors)} rejected`:`No server errors`},series:p,children:(0,F.jsx)(nz,{data:c,series:p,height:190,zoom:!1,fmt:e=>B(e)})}),(0,F.jsx)(nU,{title:`Server load`,what:`How much of its CPU and memory your app uses. Near 100% it slows down or restarts.`,value:g?`${Math.round(v)}%`:`—`,unit:`busiest`,status:g?v>=90?{tone:`bad`,text:`Close to the limit`}:v>=75?{tone:`warn`,text:`Busy`}:{tone:`good`,text:`Plenty of room`}:{tone:`neutral`,text:`No server stats yet`},series:_,children:r.data?(0,F.jsx)(nz,{data:h,series:_,height:190,zoom:!1,fmt:e=>`${Math.round(e)}%`,yDomain:[0,`auto`]}):(0,F.jsx)(H,{})})]}),S.length>0&&(0,F.jsxs)(`section`,{className:`card p-5 flex flex-col gap-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`h2`,{className:`text-[16px] font-semibold`,children:`Your own numbers`}),(0,F.jsx)(`span`,{className:`text-mute text-[12.5px]`,children:`counters and gauges your code reports`})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 @lg:grid-cols-3 @5xl:grid-cols-4 gap-3`,children:S.slice(0,12).map(e=>{let n=(i.data||[]).filter(t=>t.name===e),r=n.reduce((e,t)=>e+(t.type===`counter`?t.count??0:0),0);return(0,F.jsxs)(`button`,{className:`text-left rounded-xl border border-line hover:border-line2 bg-[#111118] px-3.5 py-3 group`,onClick:()=>t(`/metrics`),children:[(0,F.jsx)(`div`,{className:`mono text-[11.5px] text-ink2 truncate`,children:e}),(0,F.jsx)(`div`,{className:`text-[20px] font-semibold mt-1 tabular-nums`,children:n[0]?.type===`counter`?B(r):B(n[0]?.avg)}),(0,F.jsxs)(`div`,{className:`text-[11px] text-mute flex items-center gap-1`,children:[n[0]?.type===`counter`?`total`:`average`,(0,F.jsx)(Or,{size:11,className:`opacity-0 group-hover:opacity-100`})]})]},e)})})]})]})}function nU({title:e,what:t,value:n,unit:r,status:i,series:a,children:o}){let s=AH[i.tone];return(0,F.jsxs)(`section`,{className:`card p-5 flex flex-col gap-3 min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`h2`,{className:`text-[16px] font-semibold`,children:e}),(0,F.jsx)(`p`,{className:`text-mute text-[12.5px] mt-0.5 leading-snug`,children:t})]}),(0,F.jsxs)(`div`,{className:`text-right shrink-0`,children:[(0,F.jsx)(`div`,{className:`text-[24px] font-semibold tabular-nums leading-tight`,children:n}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute`,children:r})]})]}),(0,F.jsxs)(`div`,{className:`tone-${i.tone} flex items-center gap-1.5 text-[12.5px] font-medium`,style:{color:`var(--tone)`},children:[(0,F.jsx)(s,{size:14}),i.text]}),o,(0,F.jsx)(tz,{series:a})]})}var rU=[{id:`all`,label:`Everything`,levels:``},{id:`problems`,label:`Problems only`,levels:`warn,error,fatal`},{id:`errors`,label:`Errors only`,levels:`error,fatal`}],iU={fatal:{word:`Error`,color:`#ff7a7a`,bg:`rgba(208,59,59,.14)`},error:{word:`Error`,color:`#ff7a7a`,bg:`rgba(208,59,59,.14)`},warn:{word:`Warning`,color:`#f5c04e`,bg:`rgba(250,178,25,.12)`},info:{word:`Info`,color:`#7fb2f0`,bg:`rgba(57,135,229,.12)`},debug:{word:`Debug`,color:`#9a9ab0`,bg:`rgba(130,130,154,.12)`},trace:{word:`Debug`,color:`#9a9ab0`,bg:`rgba(130,130,154,.12)`}};function aU(){let e=I(),[t,n]=zn(),[r,i]=(0,v.useState)(t.get(`q`)||``),a=rU.find(e=>e.id===t.get(`show`))??rU[0],{data:o,error:s}=P(`/api/logs${e.q({q:t.get(`q`)||``,level:a.levels,limit:300})}`,[e.tick]),c=(e,t)=>{let r=new URLSearchParams(window.location.search);t?r.set(e,t):r.delete(e),n(r,{replace:!0})},l={all:0,error:0,warn:0};for(let e of o?.series||[]){for(let t of[`error`,`fatal`,`warn`,`info`,`debug`,`trace`])l.all+=e[t]||0;l.error+=(e.error||0)+(e.fatal||0),l.warn+=e.warn||0}return(0,F.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-[24px] font-semibold tracking-tight flex items-center gap-2.5`,children:[(0,F.jsx)(Di,{size:22,className:`text-brand`}),`Logs`]}),(0,F.jsx)(`p`,{className:`text-ink2 mt-1 text-[14px]`,children:`Everything your app printed, newest first. Each line knows which request wrote it.`})]}),(0,F.jsxs)(`section`,{className:`card p-5 flex flex-col gap-4`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,F.jsxs)(`form`,{className:`relative flex-1 min-w-[240px]`,onSubmit:e=>{e.preventDefault(),c(`q`,r.trim())},children:[(0,F.jsx)(Oi,{size:15,className:`absolute left-3 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input w-full h-10 pl-9 pr-9 text-[13.5px] rounded-xl`,placeholder:`Search your logs, then press Enter`,value:r,onChange:e=>i(e.target.value)}),t.get(`q`)&&(0,F.jsx)(`button`,{type:`button`,className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-mute hover:text-ink`,title:`Clear`,onClick:()=>{i(``),c(`q`,``)},children:(0,F.jsx)(Ji,{size:15})})]}),(0,F.jsx)(`div`,{className:`seg seg-lg`,children:rU.map(e=>(0,F.jsx)(`button`,{className:a.id===e.id?`on`:``,onClick:()=>c(`show`,e.id===`all`?``:e.id),children:e.label},e.id))})]}),o&&(0,F.jsxs)(`div`,{className:`text-[12.5px] text-ink2`,children:[B(l.all),` line`,l.all===1?``:`s`,` in `,FH[e.range]||`this period`,l.error>0&&(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsxs)(`span`,{className:`text-[#ff8a8a]`,children:[B(l.error),` error`,l.error===1?``:`s`]})]}),l.warn>0&&(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsxs)(`span`,{className:`text-[#f5c04e]`,children:[B(l.warn),` warning`,l.warn===1?``:`s`]})]}),t.get(`q`)&&(0,F.jsxs)(F.Fragment,{children:[` · matching “`,t.get(`q`),`”`]})]}),s?(0,F.jsx)(W,{error:s}):o?o.logs.length===0?(0,F.jsx)(`div`,{className:`text-center text-ink2 py-12 text-[13.5px]`,children:t.get(`q`)||a.levels?`Nothing matches. Try another word or show everything.`:`No logs in this period. console.log and pino output shows up here automatically.`}):(0,F.jsx)(`div`,{className:`flex flex-col -mx-2`,children:o.logs.map(e=>(0,F.jsx)(oU,{l:e},e.id))}):(0,F.jsx)(H,{})]})]})}function oU({l:e}){let[t,n]=(0,v.useState)(!1),r=ht(),i=L(),a=iU[e.level]||iU.info;return(0,F.jsxs)(`div`,{className:`rounded-lg ${t?`bg-[#16161e]`:`hover:bg-[#15151c]`}`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-start gap-3 px-2 py-2 text-left`,onClick:()=>n(!t),children:[(0,F.jsx)(`span`,{className:`text-mute text-[12px] tabular-nums shrink-0 w-[62px] pt-px`,title:jH(e.ts),children:Oa(e.ts)}),(0,F.jsx)(`span`,{className:`text-[11px] font-semibold px-2 py-0.5 rounded-md shrink-0 w-[64px] text-center`,style:{color:a.color,background:a.bg},children:a.word}),(0,F.jsx)(`span`,{className:`mono text-[12.5px] flex-1 min-w-0 text-[#dcdce6] ${t?`whitespace-pre-wrap break-words`:`truncate`}`,children:e.message}),(0,F.jsx)(`span`,{className:`text-mute text-[12px] shrink-0 max-w-[110px] truncate`,children:e.service}),(0,F.jsx)(Or,{size:14,className:`text-mute shrink-0 mt-0.5 transition-transform ${t?`rotate-90`:``}`})]}),t&&(0,F.jsxs)(`div`,{className:`px-2 pb-3 pl-[150px] flex flex-col gap-2.5`,children:[(0,F.jsxs)(`div`,{className:`text-[12px] text-mute`,children:[Oa(e.ts,!0),` · `,jH(e.ts),e.logger?` · ${e.logger}`:``,e.instance?` · ${e.instance}`:``]}),e.attrs&&(0,F.jsx)(`pre`,{className:`code !text-[11.5px] !py-2 max-h-[240px] overflow-auto`,children:JSON.stringify(e.attrs,null,2)}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[e.executionId&&(0,F.jsxs)(`button`,{className:`btn h-8`,onClick:()=>r(i(`/executions/${e.executionId}`)),children:[`See the request that wrote it`,(0,F.jsx)(Or,{size:13})]}),(0,F.jsx)(NH,{className:`btn h-8`,label:`Ask Obzeri about this`,question:`What does this ${e.level} log from ${e.service} mean, and do I need to do anything? "${String(e.message).slice(0,300)}"`})]})]})]})}function sU(){let e=I(),t=ht(),n=L(),r=rr(),i=P(`/api/settings`),a=P(`/api/settings/ai`);if(i.error)return(0,F.jsx)(W,{error:i.error});if(!i.data)return(0,F.jsx)(H,{});let o=i.data,s=e.meta?.services||[];return(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-[24px] font-semibold tracking-tight flex items-center gap-2.5`,children:[(0,F.jsx)(ji,{size:22,className:`text-brand`}),`Settings`]}),(0,F.jsx)(`p`,{className:`text-ink2 mt-1 text-[14px]`,children:`Connect your app, choose how the dashboard looks, and turn on the assistant.`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @4xl:grid-cols-5 gap-5 items-start`,children:[(0,F.jsxs)(`div`,{className:`@4xl:col-span-3 flex flex-col gap-5`,children:[(0,F.jsx)(MH,{title:`Your apps`,n:s.length,children:s.length===0?(0,F.jsx)(`div`,{className:`text-ink2 text-[13px]`,children:`No app has reported yet. Follow the steps below.`}):(0,F.jsx)(`div`,{className:`flex flex-col divide-y divide-[#1f1f29]`,children:s.map(t=>{let n=Date.now()-t.lastSeen<9e5,r=(e.meta?.versions||[]).filter(e=>e.service===t.id);return(0,F.jsxs)(`div`,{className:`flex items-center gap-3 py-3`,children:[(0,F.jsx)(vr,{size:17,className:`text-mute shrink-0`}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`div`,{className:`font-medium text-[14px]`,children:t.id}),(0,F.jsx)(po,{frameworks:t.frameworks,className:`mt-1`}),(0,F.jsx)(`div`,{className:`text-mute text-[12px] mt-1`,children:[r.length?`version ${r[r.length-1].version}`:null,t.instances.length>1?`${t.instances.length} instances`:null].filter(Boolean).join(` · `)||`Node.js`})]}),(0,F.jsxs)(`span`,{className:`tone-${n?`good`:`neutral`} text-[12px] font-medium flex items-center gap-1.5`,style:{color:`var(--tone)`},children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full ${n?`live-dot`:``}`,style:{background:`var(--tone)`}}),n?`Reporting`:`Last heard ${jH(t.lastSeen)}`]})]},t.id)})})}),(0,F.jsx)(qz,{initial:`zero`,title:`Connect an app`})]}),(0,F.jsxs)(`div`,{className:`@4xl:col-span-2 flex flex-col gap-5`,children:[(0,F.jsx)(cU,{}),(0,F.jsx)(lU,{}),(0,F.jsx)(MH,{title:`Ask Obzeri`,children:a.data?a.data.configured?(0,F.jsxs)(`div`,{className:`tone-good flex items-center gap-2 text-[13px]`,children:[(0,F.jsx)(Mr,{size:16,style:{color:`var(--tone)`}}),`Ready, using `,(0,F.jsx)(`b`,{children:a.data.model})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`text-ink2 text-[13px] leading-relaxed`,children:`Ask questions about your app in plain words. Needs an AI model: Claude, any OpenAI-compatible API, or a local one through Ollama.`}),(0,F.jsxs)(`button`,{className:`btn btn-primary h-9 self-start`,onClick:()=>t(n(`/integrations/ai`)),children:[(0,F.jsx)(Li,{size:14}),`Set up Ask Obzeri`]})]}):(0,F.jsx)(H,{})}),(0,F.jsxs)(MH,{title:`Privacy & data`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-3 text-[13px]`,children:[(0,F.jsx)(oi,{size:15,className:`text-mute mt-0.5`}),(0,F.jsx)(`div`,{children:o.passwordProtected?`The dashboard is password protected.`:(0,F.jsxs)(F.Fragment,{children:[`No password: anyone who can reach this address can open the dashboard. Set `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_PASSWORD`}),` to lock it.`]})})]}),(0,F.jsxs)(`div`,{className:`flex items-start gap-3 text-[13px]`,children:[(0,F.jsx)(Ir,{size:15,className:`text-mute mt-0.5`}),(0,F.jsxs)(`div`,{children:[`Details are kept for `,o.retentionDays,` days`,o.history?`, daily summaries for ${o.history.days} days`:``,`. Passwords and keys found in logs are hidden before saving.`]})]}),(0,F.jsxs)(`div`,{className:`flex items-start gap-3 text-[13px]`,children:[(0,F.jsx)(Fi,{size:15,className:`text-mute mt-0.5`}),(0,F.jsxs)(`div`,{children:[`Your app keys are stored as hashes and shown only once. Create, rotate or limit them to one environment in `,(0,F.jsx)(`button`,{className:`link`,onClick:()=>r(`/settings`),children:`Advanced → Settings`}),`.`]})]})]}),(0,F.jsxs)(`button`,{className:`card p-4 text-left flex items-center gap-3 hover:border-line2 group`,onClick:()=>r(`/settings`),children:[(0,F.jsx)(Fi,{size:17,className:`text-mute`}),(0,F.jsxs)(`div`,{className:`flex-1`,children:[(0,F.jsx)(`div`,{className:`font-medium text-[13.5px]`,children:`All settings`}),(0,F.jsx)(`div`,{className:`text-mute text-[12px]`,children:`Ingest keys, projects, email, MCP, ticket trackers, history`})]}),(0,F.jsx)(Or,{size:15,className:`text-mute group-hover:translate-x-0.5 transition-transform`})]})]})]})]})}function cU(){let e=I(),t=ht(),n=L(),r=e.meta?.usage;if(!r)return null;let i={unlimited:`No monthly limit: everything your apps send is kept.`,ok:`${Zi(r.included==null?null:Math.max(0,r.included-r.used))} events left this month.`,paced:`You sent a lot today, so most step-by-step timings pause until midnight (UTC). Errors and slow requests still keep theirs.`,reduced:`You used this month's events. Charts stay live, but most requests arrive without step-by-step timings.`,refused:`You used twice this month's events, so new data is turned away until the 1st.`,overage:`Past this month's events: extra ones are collected within your spending limits.`,paused:`Extra events are paused. Server errors and failed jobs are still collected.`};return(0,F.jsxs)(MH,{title:`Your plan`,right:(0,F.jsx)(`span`,{className:`text-[12px] text-mute`,children:r.name}),children:[r.included!=null&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`flex items-baseline justify-between text-[13px]`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`b`,{className:`text-[16px]`,children:Zi(r.used)}),` of `,Zi(r.included),` events used`]}),(0,F.jsx)(`span`,{className:`text-mute`,children:Qi(r.pct)})]}),(0,F.jsx)(na,{used:r.used,included:r.included})]}),(0,F.jsx)(`div`,{className:`text-[13px] leading-relaxed tone-${ea[r.state].tone}`,children:i[r.state]}),(0,F.jsx)(`div`,{className:`text-[12px] text-mute leading-snug`,children:`An event is one request, background job, error, log line or step inside your code. Database calls are free.`}),(0,F.jsx)(`button`,{className:`btn h-9 self-start`,onClick:()=>t(n(`/usage`)),children:`Usage & plans`})]})}function lU(){let{mode:e,setMode:t}=nr(),n=(n,r,i,a)=>(0,F.jsxs)(`button`,{className:`text-left rounded-xl border px-3.5 py-3 flex gap-3 ${e===n?`border-brand bg-[rgba(255,61,127,.06)]`:`border-line hover:border-line2`}`,onClick:()=>t(n),"aria-pressed":e===n,children:[(0,F.jsx)(r,{size:18,className:e===n?`text-brand mt-0.5`:`text-mute mt-0.5`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-medium text-[13.5px]`,children:i}),(0,F.jsx)(`div`,{className:`text-mute text-[12px] mt-0.5 leading-snug`,children:a})]})]});return(0,F.jsxs)(MH,{title:`Dashboard mode`,children:[n(`simple`,Ii,`Simple`,`Is my app healthy, what broke, what changed, what to do. Plain words, no jargon.`),n(`advanced`,Fi,`Advanced`,`Every request, trace, query, release and runtime detail, for digging deep.`),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute`,children:`Saved in this browser. Switch any time from the top bar.`})]})}var uU=e=>`${e.service}@${e.version}`;function dU(){let e=I(),[t]=zn(),{data:n,error:r}=P(`/api/simple/releases${e.q()}`,[e.tick]),i=t.get(`release`)||(t.get(`service`)&&t.get(`version`)?`${t.get(`service`)}@${t.get(`version`)}`:null);if(r)return(0,F.jsx)(W,{error:r});if(!n)return(0,F.jsx)(H,{});let a=n.filter(e=>e.latest),o=n.filter(e=>!e.latest);return(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-[24px] font-semibold tracking-tight flex items-center gap-2.5`,children:[(0,F.jsx)(Ci,{size:22,className:`text-brand`}),`Releases`]}),(0,F.jsx)(`p`,{className:`text-ink2 mt-1 text-[14px]`,children:`Every deploy, and whether it made your app better or worse than the one before.`})]}),n.length===0?(0,F.jsx)(vU,{}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`flex flex-col gap-5`,children:a.map(e=>(0,F.jsx)(hU,{r:e,focus:i===uU(e)},uU(e)))}),o.length>0&&(0,F.jsx)(MH,{title:`Earlier deploys`,n:o.length,children:(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:o.map(e=>(0,F.jsx)(gU,{r:e,focus:i===uU(e)},uU(e)))})})]})]})}function fU({r:e}){return(0,F.jsxs)(ro,{tip:`Deployed ${Oa(e.first,!0)} · last request ${Oa(e.last,!0)}`,children:[`deployed `,jH(e.first)]})}function pU({r:e,big:t}){let n=AH[e.tone];return(0,F.jsxs)(`span`,{className:`tone-${e.tone} inline-flex items-center gap-1.5 font-semibold rounded-full ${t?`text-[12.5px] px-2.5 py-1`:`text-[11.5px] px-2 py-0.5`}`,style:{color:`var(--tone)`,background:`var(--tone-bg)`},children:[(0,F.jsx)(n,{size:t?14:12}),e.label]})}function mU(e){let t=(0,v.useRef)(null);return(0,v.useEffect)(()=>{e&&setTimeout(()=>t.current?.scrollIntoView({block:`start`,behavior:`smooth`}),100)},[e]),t}function hU({r:e,focus:t}){let n=mU(t);return(0,F.jsxs)(`section`,{ref:n,className:`card tone-${e.tone} p-6 flex flex-col gap-5 scroll-mt-4`,style:{borderColor:e.tone===`bad`||e.tone===`warn`||t?`var(--tone-line)`:void 0,background:e.tone===`bad`||e.tone===`warn`?`linear-gradient(135deg, var(--tone-bg), transparent 50%), var(--color-panel)`:void 0},children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-4 flex-wrap`,children:[(0,F.jsx)(`div`,{className:`w-12 h-12 rounded-xl flex items-center justify-center shrink-0`,style:{background:`var(--tone-bg)`,border:`1px solid var(--tone-line)`},children:(0,F.jsx)(Ci,{size:22,style:{color:`var(--tone)`}})}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`text-[11.5px] uppercase tracking-wider font-semibold text-mute`,children:[`Latest deploy of `,e.service]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap mt-0.5`,children:[(0,F.jsxs)(`h2`,{className:`text-[22px] font-semibold tracking-tight`,children:[e.service,` `,(0,F.jsx)(`span`,{className:`font-mono text-[19px]`,children:e.version})]}),(0,F.jsx)(pU,{r:e,big:!0})]}),(0,F.jsx)(`div`,{className:`text-ink2 text-[14px] mt-1.5 leading-relaxed`,children:e.summary}),(0,F.jsxs)(`div`,{className:`text-mute text-[12px] mt-1`,children:[(0,F.jsx)(fU,{r:e}),` · `,B(e.requests),` requests since`,e.previous?(0,F.jsxs)(F.Fragment,{children:[` · compared with `,(0,F.jsx)(`span`,{className:`mono`,children:e.previous})]}):null]})]}),(0,F.jsx)(`div`,{className:`flex gap-2 shrink-0`,children:(0,F.jsx)(NH,{question:e.ask,className:`btn h-9`})})]}),(0,F.jsx)(_U,{r:e})]})}function gU({r:e,focus:t}){let[n,r]=(0,v.useState)(t),i=mU(t);return(0,F.jsxs)(`div`,{ref:i,className:`rounded-xl border bg-[#111118] scroll-mt-4 ${n?`border-line2`:`border-line`}`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-center gap-3 px-4 py-3 text-left flex-wrap`,onClick:()=>r(!n),"aria-expanded":n,children:[(0,F.jsxs)(`span`,{className:`font-medium text-[14px] min-w-[150px]`,children:[e.service,` `,(0,F.jsx)(`span`,{className:`font-mono text-[13px]`,children:e.version})]}),(0,F.jsx)(pU,{r:e}),(0,F.jsx)(`span`,{className:`text-mute text-[12.5px] flex-1 min-w-[200px] truncate`,children:e.summary}),(0,F.jsx)(`span`,{className:`text-mute text-[12px] shrink-0`,children:jH(e.first)}),n?(0,F.jsx)(Er,{size:15,className:`text-mute`}):(0,F.jsx)(Or,{size:15,className:`text-mute`})]}),n&&(0,F.jsxs)(`div`,{className:`px-4 pb-4 flex flex-col gap-4`,children:[(0,F.jsxs)(`div`,{className:`text-mute text-[12px]`,children:[(0,F.jsx)(fU,{r:e}),` · `,B(e.requests),` requests`]}),(0,F.jsx)(_U,{r:e}),(0,F.jsx)(`div`,{children:(0,F.jsx)(NH,{question:e.ask,className:`btn h-8`})})]})]})}function _U({r:e}){let t=ht(),n=L(),r=rr(),i=e.newErrors.length>0||e.codeChanges.length>0;return!e.compare.length&&!i&&!e.advice?e.verdict===`baseline`?null:(0,F.jsx)(`div`,{className:`text-ink2 text-[13px]`,children:`Not enough traffic on this version yet to compare. Check back after a few hundred requests.`}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[e.advice&&(0,F.jsxs)(`div`,{className:`tone-${e.tone} rounded-xl px-4 py-3.5 flex gap-3`,style:{background:`var(--tone-bg)`,border:`1px solid var(--tone-line)`},children:[(0,F.jsx)(ti,{size:17,style:{color:`var(--tone)`},className:`shrink-0 mt-0.5`}),(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:`What to do`}),(0,F.jsx)(`ol`,{className:`mt-1.5 flex flex-col gap-1`,children:e.advice.map((e,t)=>(0,F.jsxs)(`li`,{className:`text-[13px] flex gap-2`,children:[(0,F.jsxs)(`span`,{className:`text-mute tabular-nums`,children:[t+1,`.`]}),e]},t))})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 ${i&&e.compare.length?`@4xl:grid-cols-2`:``} gap-4`,children:[e.compare.length>0&&(0,F.jsxs)(`div`,{className:`rounded-xl border border-line overflow-hidden`,children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto_20px_auto] gap-x-3 items-center px-4 py-2 text-[11px] uppercase tracking-wider text-mute border-b border-line bg-[#111118]`,children:[(0,F.jsx)(`span`,{children:`Before vs after`}),(0,F.jsx)(`span`,{className:`mono normal-case tracking-normal text-right`,children:e.previous}),(0,F.jsx)(`span`,{}),(0,F.jsx)(`span`,{className:`mono normal-case tracking-normal`,children:e.version})]}),e.compare.map(e=>(0,F.jsxs)(`div`,{className:`tone-${e.tone} grid grid-cols-[1fr_auto_20px_auto] gap-x-3 items-center px-4 py-2.5 border-b border-[#1d1d26] last:border-0`,children:[(0,F.jsx)(`span`,{className:`text-[13px] text-ink2`,children:e.hint?(0,F.jsx)(ro,{tip:e.hint,children:e.label}):e.label}),(0,F.jsx)(`span`,{className:`text-[13px] tabular-nums text-mute text-right`,children:e.before}),(0,F.jsx)(fr,{size:13,className:`text-mute`}),(0,F.jsx)(`span`,{className:`text-[13.5px] tabular-nums font-semibold min-w-[70px]`,style:{color:e.tone===`neutral`?void 0:`var(--tone)`},children:e.after})]},e.label))]}),i&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[e.newErrors.length>0&&(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`text-[12.5px] font-semibold flex items-center gap-1.5 mb-1.5`,children:[(0,F.jsx)(br,{size:14,className:`text-[#ff8a8a]`}),`New errors in this version`]}),(0,F.jsx)(`div`,{className:`flex flex-col`,children:e.newErrors.map(e=>(0,F.jsxs)(`button`,{className:`text-left rounded-lg px-2.5 py-2 -mx-2.5 hover:bg-[#181821] flex items-center gap-3 group`,onClick:()=>t(n(`/errors/${e.fingerprint}`)),children:[(0,F.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`span`,{className:`text-[13px] font-medium text-[#ff9b9b]`,children:e.class}),(0,F.jsx)(`span`,{className:`block text-mute text-[12px] truncate`,children:e.message})]}),(0,F.jsxs)(`span`,{className:`text-[12px] text-ink2 tabular-nums`,children:[B(e.count),`×`]}),(0,F.jsx)(Or,{size:14,className:`text-mute`})]},e.fingerprint))})]}),e.codeChanges.length>0&&(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`text-[12.5px] font-semibold flex items-center gap-1.5 mb-1.5`,children:[(0,F.jsx)(Lr,{size:14,className:`text-mute`}),`What changed in the code`]}),(0,F.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.codeChanges.map(e=>(0,F.jsxs)(`li`,{className:`text-[13px] text-ink2 flex gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`•`}),e]},e))})]})]})]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`button`,{className:`btn btn-ghost h-8 px-2 text-[12.5px]`,onClick:()=>r(`/releases?service=${encodeURIComponent(e.service)}&version=${encodeURIComponent(e.version)}`),children:[(0,F.jsx)(Fi,{size:13}),`Full comparison in Advanced`]})})]})}function vU(){let e=`OBZERVER_VERSION=$(git rev-parse --short HEAD)`;return(0,F.jsxs)(MH,{title:`Tag your deploys to see them here`,children:[(0,F.jsxs)(`div`,{className:`text-ink2 text-[13.5px] leading-relaxed`,children:[`Obzerver compares each version of your app with the one before: did errors go up, did it get slower, does it leak memory. Most CI and hosting providers (GitHub Actions, GitLab, Vercel, Render, Railway, Netlify, Heroku…) and a `,(0,F.jsx)(`span`,{className:`mono`,children:`.git`}),` folder are detected automatically. Otherwise, set a version when you deploy:`]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`code flex-1`,children:e}),(0,F.jsx)(Ga,{text:e,className:`btn h-9`})]})]})}function yU({simple:e,advanced:t}){let{mode:n}=nr();return(0,F.jsx)(F.Fragment,{children:n===`simple`?e:t})}function bU(){let{traceId:e}=yt(),[t,n]=(0,v.useState)(void 0);return(0,v.useEffect)(()=>{N(`/api/traces/${e}`).then(e=>n(e.execution.id)).catch(()=>n(null))},[e]),t===void 0?(0,F.jsx)(H,{}):t===null?(0,F.jsxs)(`div`,{className:`text-mute py-10 text-center`,children:[`Trace `,e,` not found.`]}):(0,F.jsx)(Vt,{to:`/executions/${t}${window.location.search}`,replace:!0})}function xU({onDone:e}){let[t,n]=(0,v.useState)(``),[r,i]=(0,v.useState)(``);return(0,F.jsxs)(`div`,{className:`h-full overflow-y-auto flex flex-col items-center justify-center gap-10 px-6 py-10`,children:[(0,F.jsxs)(`div`,{className:`flex flex-col items-center gap-6 text-center`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-[18px] max-[480px]:scale-[0.72]`,children:[(0,F.jsx)(Co,{size:88}),(0,F.jsx)(To,{size:64})]}),(0,F.jsx)(`p`,{className:`m-0 text-[15px] text-[#a3a3b8]`,children:`Know your app is healthy. Zero-config observability for Express and Fastify.`})]}),(0,F.jsxs)(`form`,{className:`card p-5 w-full max-w-[340px] flex flex-col gap-3`,onSubmit:async n=>{n.preventDefault();try{await N(`/api/auth/login`,{method:`POST`,json:{password:t}}),e()}catch(e){i(e.message||`Wrong password`)}},children:[(0,F.jsx)(`label`,{className:`text-[12.5px] text-ink2`,htmlFor:`obz-password`,children:`Dashboard password`}),(0,F.jsx)(`input`,{id:`obz-password`,type:`password`,autoFocus:!0,className:`input h-9`,placeholder:`Password`,value:t,onChange:e=>n(e.target.value)}),r&&(0,F.jsx)(`div`,{className:`text-[#ff8a8a] text-[12px]`,children:r}),(0,F.jsx)(`button`,{className:`btn btn-primary justify-center h-9`,children:`Sign in`})]})]})}function SU({children:e}){let[t]=zn();return(0,F.jsx)(v.Fragment,{children:e},t.get(`project`)||`default`)}function CU(){let[e,t]=(0,v.useState)(`loading`),n=()=>N(`/api/auth`).then(e=>t(e.ok?`ok`:`login`)).catch(()=>t(`ok`));return(0,v.useEffect)(()=>{n();let e=()=>t(`login`);return window.addEventListener(`obz:unauthorized`,e),()=>window.removeEventListener(`obz:unauthorized`,e)},[]),e===`loading`?(0,F.jsx)(H,{}):e===`login`?(0,F.jsx)(xU,{onDone:()=>t(`ok`)}):(0,F.jsx)(Mn,{basename:`/`.replace(/\/$/,``)||void 0,children:(0,F.jsx)(SU,{children:(0,F.jsx)(Zn,{children:(0,F.jsx)(tr,{children:(0,F.jsx)(Gt,{children:(0,F.jsxs)(Ut,{element:(0,F.jsx)(Eo,{}),children:[(0,F.jsx)(Ut,{index:!0,element:(0,F.jsx)(yU,{simple:(0,F.jsx)(RH,{}),advanced:(0,F.jsx)(Xz,{})})}),(0,F.jsx)(Ut,{path:`requests`,element:(0,F.jsx)(eB,{kind:`http`})}),(0,F.jsx)(Ut,{path:`jobs`,element:(0,F.jsx)(eB,{kind:`job`})}),(0,F.jsx)(Ut,{path:`operations/:kind/:service/:name`,element:(0,F.jsx)(lB,{})}),(0,F.jsx)(Ut,{path:`executions/:id`,element:(0,F.jsx)(gB,{})}),(0,F.jsx)(Ut,{path:`traces`,element:(0,F.jsx)(CB,{})}),(0,F.jsx)(Ut,{path:`traces/:traceId`,element:(0,F.jsx)(bU,{})}),(0,F.jsx)(Ut,{path:`map`,element:(0,F.jsx)(QV,{})}),(0,F.jsx)(Ut,{path:`errors`,element:(0,F.jsx)(wB,{})}),(0,F.jsx)(Ut,{path:`secrets`,element:(0,F.jsx)(EB,{})}),(0,F.jsx)(Ut,{path:`errors/:fp`,element:(0,F.jsx)(OB,{})}),(0,F.jsx)(Ut,{path:`logs`,element:(0,F.jsx)($i,{feature:`logs`,children:(0,F.jsx)(yU,{simple:(0,F.jsx)(aU,{}),advanced:(0,F.jsx)(hB,{})})})}),(0,F.jsx)(Ut,{path:`services`,element:(0,F.jsx)(WB,{})}),(0,F.jsx)(Ut,{path:`integrations`,element:(0,F.jsx)(Iz,{})}),(0,F.jsx)(Ut,{path:`projects`,element:(0,F.jsx)(KB,{})}),(0,F.jsx)(Ut,{path:`integrations/:id`,element:(0,F.jsx)(Iz,{})}),(0,F.jsx)(Ut,{path:`functions`,element:(0,F.jsx)(Vt,{to:`/services${window.location.search}`,replace:!0})}),(0,F.jsx)(Ut,{path:`queries`,element:(0,F.jsx)(XB,{})}),(0,F.jsx)(Ut,{path:`users`,element:(0,F.jsx)($B,{})}),(0,F.jsx)(Ut,{path:`users/:id`,element:(0,F.jsx)(sV,{})}),(0,F.jsx)(Ut,{path:`users/:id/sessions`,element:(0,F.jsx)(lV,{})}),(0,F.jsx)(Ut,{path:`tenants/:id`,element:(0,F.jsx)(gV,{})}),(0,F.jsx)(Ut,{path:`profiler`,element:(0,F.jsx)(PV,{})}),(0,F.jsx)(Ut,{path:`metrics`,element:(0,F.jsx)(yU,{simple:(0,F.jsx)(tU,{}),advanced:(0,F.jsx)(HV,{})})}),(0,F.jsx)(Ut,{path:`releases`,element:(0,F.jsx)(yU,{simple:(0,F.jsx)(dU,{}),advanced:(0,F.jsx)(KV,{})})}),(0,F.jsx)(Ut,{path:`alerts`,element:(0,F.jsx)($i,{feature:`alerts`,children:(0,F.jsx)(yU,{simple:(0,F.jsx)(YH,{}),advanced:(0,F.jsx)(tH,{})})})}),(0,F.jsx)(Ut,{path:`slos`,element:(0,F.jsx)($i,{feature:`slos`,children:(0,F.jsx)(vH,{})})}),(0,F.jsx)(Ut,{path:`usage`,element:(0,F.jsx)(NB,{})}),(0,F.jsx)(Ut,{path:`status-pages`,element:(0,F.jsx)(TH,{})}),(0,F.jsx)(Ut,{path:`issues`,element:(0,F.jsx)(fV,{})}),(0,F.jsx)(Ut,{path:`issues/:id`,element:(0,F.jsx)(dH,{})}),(0,F.jsx)(Ut,{path:`settings`,element:(0,F.jsx)(yU,{simple:(0,F.jsx)(sU,{}),advanced:(0,F.jsx)(Jz,{})})}),(0,F.jsx)(Ut,{path:`*`,element:(0,F.jsx)(`div`,{className:`text-mute py-10 text-center`,children:`Not found`})})]})})})})})})}(0,Gn.createRoot)(document.getElementById(`root`)).render((0,F.jsx)(v.StrictMode,{children:(0,F.jsx)(CU,{})}));