var _b=e=>{throw TypeError(e)};var Jh=(e,t,r)=>t.has(e)||_b("Cannot "+r);var E=(e,t,r)=>(Jh(e,t,"read from private field"),r?r.call(e):t.get(e)),te=(e,t,r)=>t.has(e)?_b("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Q=(e,t,r,n)=>(Jh(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),fe=(e,t,r)=>(Jh(e,t,"access private method"),r);var ec=(e,t,r,n)=>({set _(i){Q(e,t,i,r)},get _(){return E(e,t,n)}});function VC(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var tc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I_={exports:{}},Rd={},R_={exports:{}},he={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ru=Symbol.for("react.element"),qC=Symbol.for("react.portal"),GC=Symbol.for("react.fragment"),XC=Symbol.for("react.strict_mode"),QC=Symbol.for("react.profiler"),YC=Symbol.for("react.provider"),JC=Symbol.for("react.context"),ZC=Symbol.for("react.forward_ref"),e$=Symbol.for("react.suspense"),t$=Symbol.for("react.memo"),r$=Symbol.for("react.lazy"),Pb=Symbol.iterator;function n$(e){return e===null||typeof e!="object"?null:(e=Pb&&e[Pb]||e["@@iterator"],typeof e=="function"?e:null)}var D_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L_=Object.assign,z_={};function gs(e,t,r){this.props=e,this.context=t,this.refs=z_,this.updater=r||D_}gs.prototype.isReactComponent={};gs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};gs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function B_(){}B_.prototype=gs.prototype;function rg(e,t,r){this.props=e,this.context=t,this.refs=z_,this.updater=r||D_}var ng=rg.prototype=new B_;ng.constructor=rg;L_(ng,gs.prototype);ng.isPureReactComponent=!0;var Ab=Array.isArray,F_=Object.prototype.hasOwnProperty,ig={current:null},U_={key:!0,ref:!0,__self:!0,__source:!0};function W_(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)F_.call(t,n)&&!U_.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,H=T[q];if(0>>1;qi(ge,U))Lei(xe,ge)?(T[q]=xe,T[Le]=U,q=Le):(T[q]=ge,T[ne]=U,q=ne);else if(Lei(xe,U))T[q]=xe,T[Le]=U,q=Le;else break e}}return B}function i(T,B){var U=T.sortIndex-B.sortIndex;return U!==0?U:T.id-B.id}if(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 l=[],u=[],f=1,c=null,d=3,h=!1,p=!1,y=!1,m=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(T){for(var B=r(u);B!==null;){if(B.callback===null)n(u);else if(B.startTime<=T)n(u),B.sortIndex=B.expirationTime,t(l,B);else break;B=r(u)}}function S(T){if(y=!1,x(T),!p)if(r(l)!==null)p=!0,D(w);else{var B=r(u);B!==null&&F(S,B.startTime-T)}}function w(T,B){p=!1,y&&(y=!1,v(P),P=-1),h=!0;var U=d;try{for(x(B),c=r(l);c!==null&&(!(c.expirationTime>B)||T&&!N());){var q=c.callback;if(typeof q=="function"){c.callback=null,d=c.priorityLevel;var H=q(c.expirationTime<=B);B=e.unstable_now(),typeof H=="function"?c.callback=H:c===r(l)&&n(l),x(B)}else n(l);c=r(l)}if(c!==null)var X=!0;else{var ne=r(u);ne!==null&&F(S,ne.startTime-B),X=!1}return X}finally{c=null,d=U,h=!1}}var O=!1,_=null,P=-1,A=5,C=-1;function N(){return!(e.unstable_now()-CT||125q?(T.sortIndex=U,t(u,T),r(l)===null&&T===r(u)&&(y?(v(P),P=-1):y=!0,F(S,U-q))):(T.sortIndex=H,t(l,T),p||h||(p=!0,D(w))),T},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(T){var B=d;return function(){var U=d;d=B;try{return T.apply(this,arguments)}finally{d=U}}}})(G_);q_.exports=G_;var m$=q_.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var y$=k,sr=m$;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),um=Object.prototype.hasOwnProperty,v$=/^[: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]*$/,Eb={},kb={};function g$(e){return um.call(kb,e)?!0:um.call(Eb,e)?!1:v$.test(e)?kb[e]=!0:(Eb[e]=!0,!1)}function b$(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function x$(e,t,r,n){if(t===null||typeof t>"u"||b$(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function zt(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){wt[e]=new zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];wt[t]=new zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){wt[e]=new zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wt[e]=new zt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){wt[e]=new zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){wt[e]=new zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){wt[e]=new zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){wt[e]=new zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){wt[e]=new zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var og=/[\-:]([a-z])/g;function sg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(og,sg);wt[t]=new zt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(og,sg);wt[t]=new zt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(og,sg);wt[t]=new zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){wt[e]=new zt(e,1,!1,e.toLowerCase(),null,!1,!1)});wt.xlinkHref=new zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){wt[e]=new zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function lg(e,t,r,n){var i=wt.hasOwnProperty(t)?wt[t]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{tp=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?sl(e):""}function w$(e){switch(e.tag){case 5:return sl(e.type);case 16:return sl("Lazy");case 13:return sl("Suspense");case 19:return sl("SuspenseList");case 0:case 2:case 15:return e=rp(e.type,!1),e;case 11:return e=rp(e.type.render,!1),e;case 1:return e=rp(e.type,!0),e;default:return""}}function hm(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ya:return"Fragment";case Qa:return"Portal";case cm:return"Profiler";case ug:return"StrictMode";case fm:return"Suspense";case dm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Y_:return(e.displayName||"Context")+".Consumer";case Q_:return(e._context.displayName||"Context")+".Provider";case cg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fg:return t=e.displayName||null,t!==null?t:hm(e.type)||"Memo";case qn:t=e._payload,e=e._init;try{return hm(e(t))}catch{}}return null}function S$(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hm(t);case 8:return t===ug?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _i(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Z_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function O$(e){var t=Z_(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&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(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ic(e){e._valueTracker||(e._valueTracker=O$(e))}function eP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Z_(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function nf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function pm(e,t){var r=t.checked;return We({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Cb(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=_i(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function tP(e,t){t=t.checked,t!=null&&lg(e,"checked",t,!1)}function mm(e,t){tP(e,t);var r=_i(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ym(e,t.type,r):t.hasOwnProperty("defaultValue")&&ym(e,t.type,_i(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $b(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ym(e,t,r){(t!=="number"||nf(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ll=Array.isArray;function po(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ac.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function kl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var hl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_$=["Webkit","ms","Moz","O"];Object.keys(hl).forEach(function(e){_$.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hl[t]=hl[e]})});function aP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||hl.hasOwnProperty(e)&&hl[e]?(""+t).trim():t+"px"}function oP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=aP(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var P$=We({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bm(e,t){if(t){if(P$[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function xm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 wm=null;function dg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sm=null,mo=null,yo=null;function Ib(e){if(e=zu(e)){if(typeof Sm!="function")throw Error(V(280));var t=e.stateNode;t&&(t=Fd(t),Sm(e.stateNode,e.type,t))}}function sP(e){mo?yo?yo.push(e):yo=[e]:mo=e}function lP(){if(mo){var e=mo,t=yo;if(yo=mo=null,Ib(e),t)for(e=0;e>>=0,e===0?32:31-(R$(e)/D$|0)|0}var oc=64,sc=4194304;function ul(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lf(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=ul(s):(a&=o,a!==0&&(n=ul(a)))}else o=r&~i,o!==0?n=ul(o):a!==0&&(n=ul(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Du(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-zr(t),e[t]=r}function F$(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=ml),Hb=" ",Kb=!1;function EP(e,t){switch(e){case"keyup":return m2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kP(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ja=!1;function v2(e,t){switch(e){case"compositionend":return kP(t);case"keypress":return t.which!==32?null:(Kb=!0,Hb);case"textInput":return e=t.data,e===Hb&&Kb?null:e;default:return null}}function g2(e,t){if(Ja)return e==="compositionend"||!xg&&EP(e,t)?(e=AP(),Fc=vg=li=null,Ja=!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)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Xb(r)}}function NP(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?NP(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function MP(){for(var e=window,t=nf();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=nf(e.document)}return t}function wg(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")}function j2(e){var t=MP(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&NP(r.ownerDocument.documentElement,r)){if(n!==null&&wg(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=Qb(r,a);var o=Qb(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Za=null,Em=null,vl=null,km=!1;function Yb(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;km||Za==null||Za!==nf(n)||(n=Za,"selectionStart"in n&&wg(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),vl&&Il(vl,n)||(vl=n,n=ff(Em,"onSelect"),0ro||(e.current=Im[ro],Im[ro]=null,ro--)}function $e(e,t){ro++,Im[ro]=e.current,e.current=t}var Pi={},Tt=Ei(Pi),qt=Ei(!1),ba=Pi;function Lo(e,t){var r=e.type.contextTypes;if(!r)return Pi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Gt(e){return e=e.childContextTypes,e!=null}function hf(){De(qt),De(Tt)}function ix(e,t,r){if(Tt.current!==Pi)throw Error(V(168));$e(Tt,t),$e(qt,r)}function WP(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(V(108,S$(e)||"Unknown",i));return We({},r,n)}function pf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Pi,ba=Tt.current,$e(Tt,e),$e(qt,qt.current),!0}function ax(e,t,r){var n=e.stateNode;if(!n)throw Error(V(169));r?(e=WP(e,t,ba),n.__reactInternalMemoizedMergedChildContext=e,De(qt),De(Tt),$e(Tt,e)):De(qt),$e(qt,r)}var mn=null,Ud=!1,yp=!1;function HP(e){mn===null?mn=[e]:mn.push(e)}function z2(e){Ud=!0,HP(e)}function ki(){if(!yp&&mn!==null){yp=!0;var e=0,t=_e;try{var r=mn;for(_e=1;e>=o,i-=o,xn=1<<32-zr(t)+i|r<P?(A=_,_=null):A=_.sibling;var C=d(v,_,x[P],S);if(C===null){_===null&&(_=A);break}e&&_&&C.alternate===null&&t(v,_),b=a(C,b,P),O===null?w=C:O.sibling=C,O=C,_=A}if(P===x.length)return r(v,_),ze&&Ui(v,P),w;if(_===null){for(;PP?(A=_,_=null):A=_.sibling;var N=d(v,_,C.value,S);if(N===null){_===null&&(_=A);break}e&&_&&N.alternate===null&&t(v,_),b=a(N,b,P),O===null?w=N:O.sibling=N,O=N,_=A}if(C.done)return r(v,_),ze&&Ui(v,P),w;if(_===null){for(;!C.done;P++,C=x.next())C=c(v,C.value,S),C!==null&&(b=a(C,b,P),O===null?w=C:O.sibling=C,O=C);return ze&&Ui(v,P),w}for(_=n(v,_);!C.done;P++,C=x.next())C=h(_,v,P,C.value,S),C!==null&&(e&&C.alternate!==null&&_.delete(C.key===null?P:C.key),b=a(C,b,P),O===null?w=C:O.sibling=C,O=C);return e&&_.forEach(function($){return t(v,$)}),ze&&Ui(v,P),w}function m(v,b,x,S){if(typeof x=="object"&&x!==null&&x.type===Ya&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case nc:e:{for(var w=x.key,O=b;O!==null;){if(O.key===w){if(w=x.type,w===Ya){if(O.tag===7){r(v,O.sibling),b=i(O,x.props.children),b.return=v,v=b;break e}}else if(O.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===qn&&lx(w)===O.type){r(v,O.sibling),b=i(O,x.props),b.ref=Vs(v,O,x),b.return=v,v=b;break e}r(v,O);break}else t(v,O);O=O.sibling}x.type===Ya?(b=pa(x.props.children,v.mode,S,x.key),b.return=v,v=b):(S=Xc(x.type,x.key,x.props,null,v.mode,S),S.ref=Vs(v,b,x),S.return=v,v=S)}return o(v);case Qa:e:{for(O=x.key;b!==null;){if(b.key===O)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(v,b.sibling),b=i(b,x.children||[]),b.return=v,v=b;break e}else{r(v,b);break}else t(v,b);b=b.sibling}b=_p(x,v.mode,S),b.return=v,v=b}return o(v);case qn:return O=x._init,m(v,b,O(x._payload),S)}if(ll(x))return p(v,b,x,S);if(Fs(x))return y(v,b,x,S);pc(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(v,b.sibling),b=i(b,x),b.return=v,v=b):(r(v,b),b=Op(x,v.mode,S),b.return=v,v=b),o(v)):r(v,b)}return m}var Bo=GP(!0),XP=GP(!1),vf=Ei(null),gf=null,ao=null,Pg=null;function Ag(){Pg=ao=gf=null}function jg(e){var t=vf.current;De(vf),e._currentValue=t}function Lm(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function go(e,t){gf=e,Pg=ao=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Kt=!0),e.firstContext=null)}function _r(e){var t=e._currentValue;if(Pg!==e)if(e={context:e,memoizedValue:t,next:null},ao===null){if(gf===null)throw Error(V(308));ao=e,gf.dependencies={lanes:0,firstContext:e}}else ao=ao.next=e;return t}var Xi=null;function Eg(e){Xi===null?Xi=[e]:Xi.push(e)}function QP(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Eg(t)):(r.next=i.next,i.next=r),t.interleaved=r,$n(e,n)}function $n(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Gn=!1;function kg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function YP(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function vi(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ve&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,$n(e,r)}return i=n.interleaved,i===null?(t.next=t,Eg(n)):(t.next=i.next,i.next=t),n.interleaved=t,$n(e,r)}function Wc(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,pg(e,r)}}function ux(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function bf(e,t,r,n){var i=e.updateQueue;Gn=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==o&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=l))}if(a!==null){var c=i.baseState;o=0,f=u=l=null,s=a;do{var d=s.lane,h=s.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,y=s;switch(d=t,h=r,y.tag){case 1:if(p=y.payload,typeof p=="function"){c=p.call(h,c,d);break e}c=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=y.payload,d=typeof p=="function"?p.call(h,c,d):p,d==null)break e;c=We({},c,d);break e;case 2:Gn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=h,l=c):f=f.next=h,o|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Sa|=o,e.lanes=o,e.memoizedState=c}}function cx(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=gp.transition;gp.transition={};try{e(!1),t()}finally{_e=r,gp.transition=n}}function pA(){return Pr().memoizedState}function W2(e,t,r){var n=bi(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},mA(e))yA(t,r);else if(r=QP(e,t,r,n),r!==null){var i=Dt();Br(r,e,n,i),vA(r,t,n)}}function H2(e,t,r){var n=bi(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(mA(e))yA(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,r);if(i.hasEagerState=!0,i.eagerState=s,Ur(s,o)){var l=t.interleaved;l===null?(i.next=i,Eg(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=QP(e,t,i,n),r!==null&&(i=Dt(),Br(r,e,n,i),vA(r,t,n))}}function mA(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function yA(e,t){gl=wf=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function vA(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,pg(e,r)}}var Sf={readContext:_r,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},K2={readContext:_r,useCallback:function(e,t){return qr().memoizedState=[e,t===void 0?null:t],e},useContext:_r,useEffect:dx,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Kc(4194308,4,uA.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Kc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Kc(4,2,e,t)},useMemo:function(e,t){var r=qr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=qr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=W2.bind(null,Ue,e),[n.memoizedState,e]},useRef:function(e){var t=qr();return e={current:e},t.memoizedState=e},useState:fx,useDebugValue:Dg,useDeferredValue:function(e){return qr().memoizedState=e},useTransition:function(){var e=fx(!1),t=e[0];return e=U2.bind(null,e[1]),qr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ue,i=qr();if(ze){if(r===void 0)throw Error(V(407));r=r()}else{if(r=t(),mt===null)throw Error(V(349));wa&30||tA(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,dx(nA.bind(null,n,a,e),[e]),n.flags|=2048,Wl(9,rA.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=qr(),t=mt.identifierPrefix;if(ze){var r=wn,n=xn;r=(n&~(1<<32-zr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Fl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Yr]=t,e[Ll]=n,jA(e,t,!1,!1),t.stateNode=e;e:{switch(o=xm(r,n),r){case"dialog":Me("cancel",e),Me("close",e),i=n;break;case"iframe":case"object":case"embed":Me("load",e),i=n;break;case"video":case"audio":for(i=0;iWo&&(t.flags|=128,n=!0,qs(a,!1),t.lanes=4194304)}else{if(!n)if(e=xf(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),qs(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!ze)return Ot(t),null}else 2*Ge()-a.renderingStartTime>Wo&&r!==1073741824&&(t.flags|=128,n=!0,qs(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ge(),t.sibling=null,r=Fe.current,$e(Fe,n?r&1|2:r&1),t):(Ot(t),null);case 22:case 23:return Wg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?er&1073741824&&(Ot(t),t.subtreeFlags&6&&(t.flags|=8192)):Ot(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function Z2(e,t){switch(Og(t),t.tag){case 1:return Gt(t.type)&&hf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fo(),De(qt),De(Tt),$g(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Cg(t),null;case 13:if(De(Fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));zo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return De(Fe),null;case 4:return Fo(),null;case 10:return jg(t.type._context),null;case 22:case 23:return Wg(),null;case 24:return null;default:return null}}var yc=!1,jt=!1,eN=typeof WeakSet=="function"?WeakSet:Set,Y=null;function oo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ve(e,t,n)}else r.current=null}function qm(e,t,r){try{r()}catch(n){Ve(e,t,n)}}var Ox=!1;function tN(e,t){if(Tm=uf,e=MP(),wg(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==r||i!==0&&c.nodeType!==3||(s=o+i),c!==a||n!==0&&c.nodeType!==3||(l=o+n),c.nodeType===3&&(o+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===r&&++u===i&&(s=o),d===a&&++f===n&&(l=o),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Cm={focusedElem:e,selectionRange:r},uf=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var y=p.memoizedProps,m=p.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:$r(t.type,y),m);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(S){Ve(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return p=Ox,Ox=!1,p}function bl(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&qm(t,r,a)}i=i.next}while(i!==n)}}function Kd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Gm(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function TA(e){var t=e.alternate;t!==null&&(e.alternate=null,TA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Yr],delete t[Ll],delete t[Mm],delete t[D2],delete t[L2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function CA(e){return e.tag===5||e.tag===3||e.tag===4}function _x(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||CA(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xm(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=df));else if(n!==4&&(e=e.child,e!==null))for(Xm(e,t,r),e=e.sibling;e!==null;)Xm(e,t,r),e=e.sibling}function Qm(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Qm(e,t,r),e=e.sibling;e!==null;)Qm(e,t,r),e=e.sibling}var bt=null,Ir=!1;function Wn(e,t,r){for(r=r.child;r!==null;)$A(e,t,r),r=r.sibling}function $A(e,t,r){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount(Dd,r)}catch{}switch(r.tag){case 5:jt||oo(r,t);case 6:var n=bt,i=Ir;bt=null,Wn(e,t,r),bt=n,Ir=i,bt!==null&&(Ir?(e=bt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):bt.removeChild(r.stateNode));break;case 18:bt!==null&&(Ir?(e=bt,r=r.stateNode,e.nodeType===8?mp(e.parentNode,r):e.nodeType===1&&mp(e,r),Nl(e)):mp(bt,r.stateNode));break;case 4:n=bt,i=Ir,bt=r.stateNode.containerInfo,Ir=!0,Wn(e,t,r),bt=n,Ir=i;break;case 0:case 11:case 14:case 15:if(!jt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&qm(r,t,o),i=i.next}while(i!==n)}Wn(e,t,r);break;case 1:if(!jt&&(oo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ve(r,t,s)}Wn(e,t,r);break;case 21:Wn(e,t,r);break;case 22:r.mode&1?(jt=(n=jt)||r.memoizedState!==null,Wn(e,t,r),jt=n):Wn(e,t,r);break;default:Wn(e,t,r)}}function Px(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new eN),t.forEach(function(n){var i=cN.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function kr(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Ge()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*nN(n/1960))-n,10e?16:e,ui===null)var n=!1;else{if(e=ui,ui=null,Pf=0,ve&6)throw Error(V(331));var i=ve;for(ve|=4,Y=e.current;Y!==null;){var a=Y,o=a.child;if(Y.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lGe()-Fg?ha(e,0):Bg|=r),Xt(e,t)}function BA(e,t){t===0&&(e.mode&1?(t=sc,sc<<=1,!(sc&130023424)&&(sc=4194304)):t=1);var r=Dt();e=$n(e,t),e!==null&&(Du(e,t,r),Xt(e,r))}function uN(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),BA(e,r)}function cN(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(V(314))}n!==null&&n.delete(t),BA(e,r)}var FA;FA=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||qt.current)Kt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Kt=!1,Y2(e,t,r);Kt=!!(e.flags&131072)}else Kt=!1,ze&&t.flags&1048576&&KP(t,yf,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Vc(e,t),e=t.pendingProps;var i=Lo(t,Tt.current);go(t,r),i=Mg(null,t,n,e,i,r);var a=Ig();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Gt(n)?(a=!0,pf(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,kg(t),i.updater=Hd,t.stateNode=i,i._reactInternals=t,Bm(t,n,e,r),t=Wm(null,t,n,!0,a,r)):(t.tag=0,ze&&a&&Sg(t),$t(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Vc(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=dN(n),e=$r(n,e),i){case 0:t=Um(null,t,n,e,r);break e;case 1:t=xx(null,t,n,e,r);break e;case 11:t=gx(null,t,n,e,r);break e;case 14:t=bx(null,t,n,$r(n.type,e),r);break e}throw Error(V(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:$r(n,i),Um(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:$r(n,i),xx(e,t,n,i,r);case 3:e:{if(_A(t),e===null)throw Error(V(387));n=t.pendingProps,a=t.memoizedState,i=a.element,YP(e,t),bf(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Uo(Error(V(423)),t),t=wx(e,t,n,r,i);break e}else if(n!==i){i=Uo(Error(V(424)),t),t=wx(e,t,n,r,i);break e}else for(ir=yi(t.stateNode.containerInfo.firstChild),ar=t,ze=!0,Dr=null,r=XP(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(zo(),n===i){t=Nn(e,t,r);break e}$t(e,t,n,r)}t=t.child}return t;case 5:return JP(t),e===null&&Dm(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,$m(n,i)?o=null:a!==null&&$m(n,a)&&(t.flags|=32),OA(e,t),$t(e,t,o,r),t.child;case 6:return e===null&&Dm(t),null;case 13:return PA(e,t,r);case 4:return Tg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Bo(t,null,n,r):$t(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:$r(n,i),gx(e,t,n,i,r);case 7:return $t(e,t,t.pendingProps,r),t.child;case 8:return $t(e,t,t.pendingProps.children,r),t.child;case 12:return $t(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,$e(vf,n._currentValue),n._currentValue=o,a!==null)if(Ur(a.value,o)){if(a.children===i.children&&!qt.current){t=Nn(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=Pn(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Lm(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(V(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Lm(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}$t(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,go(t,r),i=_r(i),n=n(i),t.flags|=1,$t(e,t,n,r),t.child;case 14:return n=t.type,i=$r(n,t.pendingProps),i=$r(n.type,i),bx(e,t,n,i,r);case 15:return wA(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:$r(n,i),Vc(e,t),t.tag=1,Gt(n)?(e=!0,pf(t)):e=!1,go(t,r),gA(t,n,i),Bm(t,n,i,r),Wm(null,t,n,!0,e,r);case 19:return AA(e,t,r);case 22:return SA(e,t,r)}throw Error(V(156,t.tag))};function UA(e,t){return mP(e,t)}function fN(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function br(e,t,r,n){return new fN(e,t,r,n)}function Kg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dN(e){if(typeof e=="function")return Kg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cg)return 11;if(e===fg)return 14}return 2}function xi(e,t){var r=e.alternate;return r===null?(r=br(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Xc(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")Kg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ya:return pa(r.children,i,a,t);case ug:o=8,i|=8;break;case cm:return e=br(12,r,t,i|2),e.elementType=cm,e.lanes=a,e;case fm:return e=br(13,r,t,i),e.elementType=fm,e.lanes=a,e;case dm:return e=br(19,r,t,i),e.elementType=dm,e.lanes=a,e;case J_:return qd(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q_:o=10;break e;case Y_:o=9;break e;case cg:o=11;break e;case fg:o=14;break e;case qn:o=16,n=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=br(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function pa(e,t,r,n){return e=br(7,e,n,t),e.lanes=r,e}function qd(e,t,r,n){return e=br(22,e,n,t),e.elementType=J_,e.lanes=r,e.stateNode={isHidden:!1},e}function Op(e,t,r){return e=br(6,e,null,t),e.lanes=r,e}function _p(e,t,r){return t=br(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hN(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ip(0),this.expirationTimes=ip(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ip(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vg(e,t,r,n,i,a,o,s,l){return e=new hN(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=br(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},kg(a),e}function pN(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(VA)}catch(e){console.error(e)}}VA(),V_.exports=lr;var bN=V_.exports,Nx=bN;lm.createRoot=Nx.createRoot,lm.hydrateRoot=Nx.hydrateRoot;/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Qg(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function wN(){return Math.random().toString(36).substr(2,8)}function Ix(e,t){return{usr:e.state,key:e.key,idx:t}}function ty(e,t,r,n){return r===void 0&&(r=null),Kl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ws(t):t,{state:r,key:t&&t.key||n||wN()})}function Ef(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function ws(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function SN(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=ci.Pop,l=null,u=f();u==null&&(u=0,o.replaceState(Kl({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function c(){s=ci.Pop;let m=f(),v=m==null?null:m-u;u=m,l&&l({action:s,location:y.location,delta:v})}function d(m,v){s=ci.Push;let b=ty(y.location,m,v);u=f()+1;let x=Ix(b,u),S=y.createHref(b);try{o.pushState(x,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}a&&l&&l({action:s,location:y.location,delta:1})}function h(m,v){s=ci.Replace;let b=ty(y.location,m,v);u=f();let x=Ix(b,u),S=y.createHref(b);o.replaceState(x,"",S),a&&l&&l({action:s,location:y.location,delta:0})}function p(m){let v=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof m=="string"?m:Ef(m);return b=b.replace(/ $/,"%20"),Xe(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let y={get action(){return s},get location(){return e(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Mx,c),l=m,()=>{i.removeEventListener(Mx,c),l=null}},createHref(m){return t(i,m)},createURL:p,encodeLocation(m){let v=p(m);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:d,replace:h,go(m){return o.go(m)}};return y}var Rx;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Rx||(Rx={}));function ON(e,t,r){return r===void 0&&(r="/"),_N(e,t,r)}function _N(e,t,r,n){let i=typeof t=="string"?ws(t):t,a=Yg(i.pathname||"/",r);if(a==null)return null;let o=qA(e);PN(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Xe(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=wi([n,l.relativePath]),f=r.concat(l);a.children&&a.children.length>0&&(Xe(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),qA(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:$N(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of GA(a.path))i(a,o,l)}),t}function GA(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=GA(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function PN(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:NN(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const AN=/^:[\w-]+$/,jN=3,EN=2,kN=1,TN=10,CN=-2,Dx=e=>e==="*";function $N(e,t){let r=e.split("/"),n=r.length;return r.some(Dx)&&(n+=CN),t&&(n+=EN),r.filter(i=>!Dx(i)).reduce((i,a)=>i+(AN.test(a)?jN:a===""?kN:TN),n)}function NN(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function MN(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:d,isOptional:h}=f;if(d==="*"){let y=s[c]||"";o=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const p=s[c];return h&&!p?u[d]=void 0:u[d]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function RN(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Qg(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function DN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Qg(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Yg(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const LN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zN=e=>LN.test(e);function BN(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?ws(e):e,a;if(r)if(zN(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),Qg(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=Lx(r.substring(1),"/"):a=Lx(r,t)}else a=t;return{pathname:a,search:WN(n),hash:HN(i)}}function Lx(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Pp(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function FN(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Jg(e,t){let r=FN(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Zg(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=ws(e):(i=Kl({},e),Xe(!i.pathname||!i.pathname.includes("?"),Pp("?","pathname","search",i)),Xe(!i.pathname||!i.pathname.includes("#"),Pp("#","pathname","hash",i)),Xe(!i.search||!i.search.includes("#"),Pp("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let c=t.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),c-=1;i.pathname=d.join("/")}s=c>=0?t[c]:"/"}let l=BN(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const wi=e=>e.join("/").replace(/\/\/+/g,"/"),UN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),WN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,HN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function KN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const XA=["post","put","patch","delete"];new Set(XA);const VN=["get",...XA];new Set(VN);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Vl(){return Vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),k.useCallback(function(u,f){if(f===void 0&&(f={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let c=Zg(u,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:wi([t,c.pathname])),(f.replace?n.replace:n.push)(c,f.state,f)},[t,n,o,a,e])}const QN=k.createContext(null);function YN(e){let t=k.useContext(sn).outlet;return t&&k.createElement(QN.Provider,{value:e},t)}function JN(){let{matches:e}=k.useContext(sn),t=e[e.length-1];return t?t.params:{}}function JA(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=k.useContext(Ti),{matches:i}=k.useContext(sn),{pathname:a}=Os(),o=JSON.stringify(Jg(i,n.v7_relativeSplatPath));return k.useMemo(()=>Zg(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function ZN(e,t){return eM(e,t)}function eM(e,t,r,n){Ss()||Xe(!1);let{navigator:i}=k.useContext(Ti),{matches:a}=k.useContext(sn),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Os(),f;if(t){var c;let m=typeof t=="string"?ws(t):t;l==="/"||(c=m.pathname)!=null&&c.startsWith(l)||Xe(!1),f=m}else f=u;let d=f.pathname||"/",h=d;if(l!=="/"){let m=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=ON(e,{pathname:h}),y=aM(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:wi([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:wi([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return t&&y?k.createElement(Jd.Provider,{value:{location:Vl({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:ci.Pop}},y):y}function tM(){let e=uM(),t=KN(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),r?k.createElement("pre",{style:i},r):null,null)}const rM=k.createElement(tM,null);class nM extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?k.createElement(sn.Provider,{value:this.props.routeContext},k.createElement(QA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function iM(e){let{routeContext:t,match:r,children:n}=e,i=k.useContext(e0);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),k.createElement(sn.Provider,{value:t},n)}function aM(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let f=o.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id])!==void 0);f>=0||Xe(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,c,d)=>{let h,p=!1,y=null,m=null;r&&(h=s&&c.route.id?s[c.route.id]:void 0,y=c.route.errorElement||rM,l&&(u<0&&d===0?(fM("route-fallback"),p=!0,m=null):u===d&&(p=!0,m=c.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,d+1)),b=()=>{let x;return h?x=y:p?x=m:c.route.Component?x=k.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=f,k.createElement(iM,{match:c,routeContext:{outlet:f,matches:v,isDataRoute:r!=null},children:x})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?k.createElement(nM,{location:r.location,revalidation:r.revalidation,component:y,error:h,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}var ZA=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ZA||{}),ej=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ej||{});function oM(e){let t=k.useContext(e0);return t||Xe(!1),t}function sM(e){let t=k.useContext(qN);return t||Xe(!1),t}function lM(e){let t=k.useContext(sn);return t||Xe(!1),t}function tj(e){let t=lM(),r=t.matches[t.matches.length-1];return r.route.id||Xe(!1),r.route.id}function uM(){var e;let t=k.useContext(QA),r=sM(),n=tj();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function cM(){let{router:e}=oM(ZA.UseNavigateStable),t=tj(ej.UseNavigateStable),r=k.useRef(!1);return YA(()=>{r.current=!0}),k.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Vl({fromRouteId:t},a)))},[e,t])}const zx={};function fM(e,t,r){zx[e]||(zx[e]=!0)}function dM(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function hM(e){let{to:t,replace:r,state:n,relative:i}=e;Ss()||Xe(!1);let{future:a,static:o}=k.useContext(Ti),{matches:s}=k.useContext(sn),{pathname:l}=Os(),u=Fu(),f=Zg(t,Jg(s,a.v7_relativeSplatPath),l,i==="path"),c=JSON.stringify(f);return k.useEffect(()=>u(JSON.parse(c),{replace:r,state:n,relative:i}),[u,c,i,r,n]),null}function pM(e){return YN(e.context)}function Cr(e){Xe(!1)}function mM(e){let{basename:t="/",children:r=null,location:n,navigationType:i=ci.Pop,navigator:a,static:o=!1,future:s}=e;Ss()&&Xe(!1);let l=t.replace(/^\/*/,"/"),u=k.useMemo(()=>({basename:l,navigator:a,static:o,future:Vl({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=ws(n));let{pathname:f="/",search:c="",hash:d="",state:h=null,key:p="default"}=n,y=k.useMemo(()=>{let m=Yg(f,l);return m==null?null:{location:{pathname:m,search:c,hash:d,state:h,key:p},navigationType:i}},[l,f,c,d,h,p,i]);return y==null?null:k.createElement(Ti.Provider,{value:u},k.createElement(Jd.Provider,{children:r,value:y}))}function yM(e){let{children:t,location:r}=e;return ZN(ry(t),r)}new Promise(()=>{});function ry(e,t){t===void 0&&(t=[]);let r=[];return k.Children.forEach(e,(n,i)=>{if(!k.isValidElement(n))return;let a=[...t,i];if(n.type===k.Fragment){r.push.apply(r,ry(n.props.children,a));return}n.type!==Cr&&Xe(!1),!n.props.index||!n.props.children||Xe(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=ry(n.props.children,a)),r.push(o)}),r}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ny(){return ny=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function gM(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bM(e,t){return e.button===0&&(!t||t==="_self")&&!gM(e)}const xM=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],wM="6";try{window.__reactRouterVersion=wM}catch{}const SM="startTransition",Bx=l$[SM];function OM(e){let{basename:t,children:r,future:n,window:i}=e,a=k.useRef();a.current==null&&(a.current=xN({window:i,v5Compat:!0}));let o=a.current,[s,l]=k.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},f=k.useCallback(c=>{u&&Bx?Bx(()=>l(c)):l(c)},[l,u]);return k.useLayoutEffect(()=>o.listen(f),[o,f]),k.useEffect(()=>dM(n),[n]),k.createElement(mM,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const _M=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ho=k.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:f,viewTransition:c}=t,d=vM(t,xM),{basename:h}=k.useContext(Ti),p,y=!1;if(typeof u=="string"&&PM.test(u)&&(p=u,_M))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),w=Yg(S.pathname,h);S.origin===x.origin&&w!=null?u=w+S.search+S.hash:y=!0}catch{}let m=GN(u,{relative:i}),v=AM(u,{replace:o,state:s,target:l,preventScrollReset:f,relative:i,viewTransition:c});function b(x){n&&n(x),x.defaultPrevented||v(x)}return k.createElement("a",ny({},d,{href:p||m,onClick:y||a?n:b,ref:r,target:l}))});var Fx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Fx||(Fx={}));var Ux;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ux||(Ux={}));function AM(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=Fu(),u=Os(),f=JA(e,{relative:o});return k.useCallback(c=>{if(bM(c,r)){c.preventDefault();let d=n!==void 0?n:Ef(u)===Ef(f);l(e,{replace:d,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,f,n,i,r,e,a,o,s])}var _s=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},jM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Zn,tg,__,EM=(__=class{constructor(){te(this,Zn,jM);te(this,tg,!1)}setTimeoutProvider(e){Q(this,Zn,e)}setTimeout(e,t){return E(this,Zn).setTimeout(e,t)}clearTimeout(e){E(this,Zn).clearTimeout(e)}setInterval(e,t){return E(this,Zn).setInterval(e,t)}clearInterval(e){E(this,Zn).clearInterval(e)}},Zn=new WeakMap,tg=new WeakMap,__),Yi=new EM;function kM(e){setTimeout(e,0)}var _a=typeof window>"u"||"Deno"in globalThis;function Nt(){}function TM(e,t){return typeof e=="function"?e(t):e}function iy(e){return typeof e=="number"&&e>=0&&e!==1/0}function rj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Si(e,t){return typeof e=="function"?e(t):e}function mr(e,t){return typeof e=="function"?e(t):e}function Wx(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==t0(o,t.options))return!1}else if(!ql(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Hx(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Pa(t.options.mutationKey)!==Pa(a))return!1}else if(!ql(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function t0(e,t){return((t==null?void 0:t.queryKeyHashFn)||Pa)(e)}function Pa(e){return JSON.stringify(e,(t,r)=>ay(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function ql(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ql(e[r],t[r])):!1}var CM=Object.prototype.hasOwnProperty;function nj(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=Kx(e)&&Kx(t);if(!n&&!(ay(e)&&ay(t)))return t;const a=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),s=o.length,l=n?new Array(s):{};let u=0;for(let f=0;f{Yi.setTimeout(t,e)})}function oy(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?nj(e,t):t}function NM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function MM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var r0=Symbol();function ij(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===r0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function n0(e,t){return typeof e=="function"?e(...t):!!e}function IM(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var ia,ei,Po,P_,RM=(P_=class extends _s{constructor(){super();te(this,ia);te(this,ei);te(this,Po);Q(this,Po,t=>{if(!_a&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){E(this,ei)||this.setEventListener(E(this,Po))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,ei))==null||t.call(this),Q(this,ei,void 0))}setEventListener(t){var r;Q(this,Po,t),(r=E(this,ei))==null||r.call(this),Q(this,ei,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){E(this,ia)!==t&&(Q(this,ia,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof E(this,ia)=="boolean"?E(this,ia):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ia=new WeakMap,ei=new WeakMap,Po=new WeakMap,P_),i0=new RM;function sy(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var DM=kM;function LM(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=DM;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var ot=LM(),Ao,ti,jo,A_,zM=(A_=class extends _s{constructor(){super();te(this,Ao,!0);te(this,ti);te(this,jo);Q(this,jo,t=>{if(!_a&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){E(this,ti)||this.setEventListener(E(this,jo))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,ti))==null||t.call(this),Q(this,ti,void 0))}setEventListener(t){var r;Q(this,jo,t),(r=E(this,ti))==null||r.call(this),Q(this,ti,t(this.setOnline.bind(this)))}setOnline(t){E(this,Ao)!==t&&(Q(this,Ao,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return E(this,Ao)}},Ao=new WeakMap,ti=new WeakMap,jo=new WeakMap,A_),Tf=new zM;function BM(e){return Math.min(1e3*2**e,3e4)}function aj(e){return(e??"online")==="online"?Tf.isOnline():!0}var ly=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function oj(e){let t=!1,r=0,n;const i=sy(),a=()=>i.status!=="pending",o=y=>{var m;if(!a()){const v=new ly(y);d(v),(m=e.onCancel)==null||m.call(e,v)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>i0.isFocused()&&(e.networkMode==="always"||Tf.isOnline())&&e.canRun(),f=()=>aj(e.networkMode)&&e.canRun(),c=y=>{a()||(n==null||n(),i.resolve(y))},d=y=>{a()||(n==null||n(),i.reject(y))},h=()=>new Promise(y=>{var m;n=v=>{(a()||u())&&y(v)},(m=e.onPause)==null||m.call(e)}).then(()=>{var y;n=void 0,a()||(y=e.onContinue)==null||y.call(e)}),p=()=>{if(a())return;let y;const m=r===0?e.initialPromise:void 0;try{y=m??e.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(c).catch(v=>{var O;if(a())return;const b=e.retry??(_a?0:3),x=e.retryDelay??BM,S=typeof x=="function"?x(r,v):x,w=b===!0||typeof b=="number"&&ru()?void 0:h()).then(()=>{t?d(v):p()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:s,continueRetry:l,canStart:f,start:()=>(f()?p():h().then(p),i)}}var aa,j_,sj=(j_=class{constructor(){te(this,aa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),iy(this.gcTime)&&Q(this,aa,Yi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_a?1/0:5*60*1e3))}clearGcTimeout(){E(this,aa)&&(Yi.clearTimeout(E(this,aa)),Q(this,aa,void 0))}},aa=new WeakMap,j_),oa,Eo,pr,sa,ft,Cu,la,Nr,dn,E_,FM=(E_=class extends sj{constructor(t){super();te(this,Nr);te(this,oa);te(this,Eo);te(this,pr);te(this,sa);te(this,ft);te(this,Cu);te(this,la);Q(this,la,!1),Q(this,Cu,t.defaultOptions),this.setOptions(t.options),this.observers=[],Q(this,sa,t.client),Q(this,pr,E(this,sa).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Q(this,oa,Gx(this.options)),this.state=t.state??E(this,oa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,ft))==null?void 0:t.promise}setOptions(t){if(this.options={...E(this,Cu),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Gx(this.options);r.data!==void 0&&(this.setState(qx(r.data,r.dataUpdatedAt)),Q(this,oa,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,pr).remove(this)}setData(t,r){const n=oy(this.state.data,t,this.options);return fe(this,Nr,dn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){fe(this,Nr,dn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=E(this,ft))==null?void 0:n.promise;return(i=E(this,ft))==null||i.cancel(t),r?r.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,oa))}isActive(){return this.observers.some(t=>mr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===r0||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Si(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!rj(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,ft))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,ft))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,pr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(E(this,ft)&&(E(this,la)?E(this,ft).cancel({revert:!0}):E(this,ft).cancelRetry()),this.scheduleGc()),E(this,pr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||fe(this,Nr,dn).call(this,{type:"invalidate"})}async fetch(t,r){var l,u,f,c,d,h,p,y,m,v,b,x;if(this.state.fetchStatus!=="idle"&&((l=E(this,ft))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(E(this,ft))return E(this,ft).continueRetry(),E(this,ft).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(w=>w.options.queryFn);S&&this.setOptions(S.options)}const n=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(Q(this,la,!0),n.signal)})},a=()=>{const S=ij(this.options,r),O=(()=>{const _={client:E(this,sa),queryKey:this.queryKey,meta:this.meta};return i(_),_})();return Q(this,la,!1),this.options.persister?this.options.persister(S,O,this):S(O)},s=(()=>{const S={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:E(this,sa),state:this.state,fetchFn:a};return i(S),S})();(u=this.options.behavior)==null||u.onFetch(s,this),Q(this,Eo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=s.fetchOptions)==null?void 0:f.meta))&&fe(this,Nr,dn).call(this,{type:"fetch",meta:(c=s.fetchOptions)==null?void 0:c.meta}),Q(this,ft,oj({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof ly&&S.revert&&this.setState({...E(this,Eo),fetchStatus:"idle"}),n.abort()},onFail:(S,w)=>{fe(this,Nr,dn).call(this,{type:"failed",failureCount:S,error:w})},onPause:()=>{fe(this,Nr,dn).call(this,{type:"pause"})},onContinue:()=>{fe(this,Nr,dn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await E(this,ft).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(h=(d=E(this,pr).config).onSuccess)==null||h.call(d,S,this),(y=(p=E(this,pr).config).onSettled)==null||y.call(p,S,this.state.error,this),S}catch(S){if(S instanceof ly){if(S.silent)return E(this,ft).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw fe(this,Nr,dn).call(this,{type:"error",error:S}),(v=(m=E(this,pr).config).onError)==null||v.call(m,S,this),(x=(b=E(this,pr).config).onSettled)==null||x.call(b,this.state.data,S,this),S}finally{this.scheduleGc()}}},oa=new WeakMap,Eo=new WeakMap,pr=new WeakMap,sa=new WeakMap,ft=new WeakMap,Cu=new WeakMap,la=new WeakMap,Nr=new WeakSet,dn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...lj(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...qx(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Q(this,Eo,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),ot.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),E(this,pr).notify({query:this,type:"updated",action:t})})},E_);function lj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:aj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Gx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ft,pe,$u,Ct,ua,ko,yn,ri,Nu,To,Co,ca,fa,ni,$o,Se,fl,uy,cy,fy,dy,hy,py,my,uj,k_,UM=(k_=class extends _s{constructor(t,r){super();te(this,Se);te(this,Ft);te(this,pe);te(this,$u);te(this,Ct);te(this,ua);te(this,ko);te(this,yn);te(this,ri);te(this,Nu);te(this,To);te(this,Co);te(this,ca);te(this,fa);te(this,ni);te(this,$o,new Set);this.options=r,Q(this,Ft,t),Q(this,ri,null),Q(this,yn,sy()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,pe).addObserver(this),Xx(E(this,pe),this.options)?fe(this,Se,fl).call(this):this.updateResult(),fe(this,Se,dy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yy(E(this,pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yy(E(this,pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,fe(this,Se,hy).call(this),fe(this,Se,py).call(this),E(this,pe).removeObserver(this)}setOptions(t){const r=this.options,n=E(this,pe);if(this.options=E(this,Ft).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof mr(this.options.enabled,E(this,pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");fe(this,Se,my).call(this),E(this,pe).setOptions(this.options),r._defaulted&&!kf(this.options,r)&&E(this,Ft).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,pe),observer:this});const i=this.hasListeners();i&&Qx(E(this,pe),n,this.options,r)&&fe(this,Se,fl).call(this),this.updateResult(),i&&(E(this,pe)!==n||mr(this.options.enabled,E(this,pe))!==mr(r.enabled,E(this,pe))||Si(this.options.staleTime,E(this,pe))!==Si(r.staleTime,E(this,pe)))&&fe(this,Se,uy).call(this);const a=fe(this,Se,cy).call(this);i&&(E(this,pe)!==n||mr(this.options.enabled,E(this,pe))!==mr(r.enabled,E(this,pe))||a!==E(this,ni))&&fe(this,Se,fy).call(this,a)}getOptimisticResult(t){const r=E(this,Ft).getQueryCache().build(E(this,Ft),t),n=this.createResult(r,t);return HM(this,n)&&(Q(this,Ct,n),Q(this,ko,this.options),Q(this,ua,E(this,pe).state)),n}getCurrentResult(){return E(this,Ct)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&E(this,yn).status==="pending"&&E(this,yn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){E(this,$o).add(t)}getCurrentQuery(){return E(this,pe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=E(this,Ft).defaultQueryOptions(t),n=E(this,Ft).getQueryCache().build(E(this,Ft),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return fe(this,Se,fl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,Ct)))}createResult(t,r){var A;const n=E(this,pe),i=this.options,a=E(this,Ct),o=E(this,ua),s=E(this,ko),u=t!==n?t.state:E(this,$u),{state:f}=t;let c={...f},d=!1,h;if(r._optimisticResults){const C=this.hasListeners(),N=!C&&Xx(t,r),$=C&&Qx(t,n,r,i);(N||$)&&(c={...c,...lj(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:y,status:m}=c;h=c.data;let v=!1;if(r.placeholderData!==void 0&&h===void 0&&m==="pending"){let C;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(C=a.data,v=!0):C=typeof r.placeholderData=="function"?r.placeholderData((A=E(this,Co))==null?void 0:A.state.data,E(this,Co)):r.placeholderData,C!==void 0&&(m="success",h=oy(a==null?void 0:a.data,C,r),d=!0)}if(r.select&&h!==void 0&&!v)if(a&&h===(o==null?void 0:o.data)&&r.select===E(this,Nu))h=E(this,To);else try{Q(this,Nu,r.select),h=r.select(h),h=oy(a==null?void 0:a.data,h,r),Q(this,To,h),Q(this,ri,null)}catch(C){Q(this,ri,C)}E(this,ri)&&(p=E(this,ri),h=E(this,To),y=Date.now(),m="error");const b=c.fetchStatus==="fetching",x=m==="pending",S=m==="error",w=x&&b,O=h!==void 0,P={status:m,fetchStatus:c.fetchStatus,isPending:x,isSuccess:m==="success",isError:S,isInitialLoading:w,isLoading:w,data:h,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:y,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!O,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:S&&O,isStale:a0(t,r),refetch:this.refetch,promise:E(this,yn),isEnabled:mr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const C=P.data!==void 0,N=P.status==="error"&&!C,$=I=>{N?I.reject(P.error):C&&I.resolve(P.data)},L=()=>{const I=Q(this,yn,P.promise=sy());$(I)},R=E(this,yn);switch(R.status){case"pending":t.queryHash===n.queryHash&&$(R);break;case"fulfilled":(N||P.data!==R.value)&&L();break;case"rejected":(!N||P.error!==R.reason)&&L();break}}return P}updateResult(){const t=E(this,Ct),r=this.createResult(E(this,pe),this.options);if(Q(this,ua,E(this,pe).state),Q(this,ko,this.options),E(this,ua).data!==void 0&&Q(this,Co,E(this,pe)),kf(r,t))return;Q(this,Ct,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!E(this,$o).size)return!0;const o=new Set(a??E(this,$o));return this.options.throwOnError&&o.add("error"),Object.keys(E(this,Ct)).some(s=>{const l=s;return E(this,Ct)[l]!==t[l]&&o.has(l)})};fe(this,Se,uj).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&fe(this,Se,dy).call(this)}},Ft=new WeakMap,pe=new WeakMap,$u=new WeakMap,Ct=new WeakMap,ua=new WeakMap,ko=new WeakMap,yn=new WeakMap,ri=new WeakMap,Nu=new WeakMap,To=new WeakMap,Co=new WeakMap,ca=new WeakMap,fa=new WeakMap,ni=new WeakMap,$o=new WeakMap,Se=new WeakSet,fl=function(t){fe(this,Se,my).call(this);let r=E(this,pe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Nt)),r},uy=function(){fe(this,Se,hy).call(this);const t=Si(this.options.staleTime,E(this,pe));if(_a||E(this,Ct).isStale||!iy(t))return;const n=rj(E(this,Ct).dataUpdatedAt,t)+1;Q(this,ca,Yi.setTimeout(()=>{E(this,Ct).isStale||this.updateResult()},n))},cy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,pe)):this.options.refetchInterval)??!1},fy=function(t){fe(this,Se,py).call(this),Q(this,ni,t),!(_a||mr(this.options.enabled,E(this,pe))===!1||!iy(E(this,ni))||E(this,ni)===0)&&Q(this,fa,Yi.setInterval(()=>{(this.options.refetchIntervalInBackground||i0.isFocused())&&fe(this,Se,fl).call(this)},E(this,ni)))},dy=function(){fe(this,Se,uy).call(this),fe(this,Se,fy).call(this,fe(this,Se,cy).call(this))},hy=function(){E(this,ca)&&(Yi.clearTimeout(E(this,ca)),Q(this,ca,void 0))},py=function(){E(this,fa)&&(Yi.clearInterval(E(this,fa)),Q(this,fa,void 0))},my=function(){const t=E(this,Ft).getQueryCache().build(E(this,Ft),this.options);if(t===E(this,pe))return;const r=E(this,pe);Q(this,pe,t),Q(this,$u,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},uj=function(t){ot.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(E(this,Ct))}),E(this,Ft).getQueryCache().notify({query:E(this,pe),type:"observerResultsUpdated"})})},k_);function WM(e,t){return mr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Xx(e,t){return WM(e,t)||e.state.data!==void 0&&yy(e,t,t.refetchOnMount)}function yy(e,t,r){if(mr(t.enabled,e)!==!1&&Si(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&a0(e,t)}return!1}function Qx(e,t,r,n){return(e!==t||mr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&a0(e,r)}function a0(e,t){return mr(t.enabled,e)!==!1&&e.isStaleByTime(Si(t.staleTime,e))}function HM(e,t){return!kf(e.getCurrentResult(),t)}function Yx(e){return{onFetch:(t,r)=>{var f,c,d,h,p;const n=t.options,i=(d=(c=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:d.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((p=t.state.data)==null?void 0:p.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const m=x=>{IM(x,()=>t.signal,()=>y=!0)},v=ij(t.options,t.fetchOptions),b=async(x,S,w)=>{if(y)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const _=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return m(N),N})(),P=await v(_),{maxPages:A}=t.options,C=w?MM:NM;return{pages:C(x.pages,P,A),pageParams:C(x.pageParams,S,A)}};if(i&&a.length){const x=i==="backward",S=x?KM:Jx,w={pages:a,pageParams:o},O=S(n,w);s=await b(w,O,x)}else{const x=e??a.length;do{const S=l===0?o[0]??n.initialPageParam:Jx(n,s);if(l>0&&S==null)break;s=await b(s,S),l++}while(l{var y,m;return(m=(y=t.options).persister)==null?void 0:m.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function Jx(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function KM(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Mu,Gr,_t,da,Xr,Kn,T_,VM=(T_=class extends sj{constructor(t){super();te(this,Xr);te(this,Mu);te(this,Gr);te(this,_t);te(this,da);Q(this,Mu,t.client),this.mutationId=t.mutationId,Q(this,_t,t.mutationCache),Q(this,Gr,[]),this.state=t.state||cj(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,Gr).includes(t)||(E(this,Gr).push(t),this.clearGcTimeout(),E(this,_t).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Q(this,Gr,E(this,Gr).filter(r=>r!==t)),this.scheduleGc(),E(this,_t).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,Gr).length||(this.state.status==="pending"?this.scheduleGc():E(this,_t).remove(this))}continue(){var t;return((t=E(this,da))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,l,u,f,c,d,h,p,y,m,v,b,x,S,w,O,_;const r=()=>{fe(this,Xr,Kn).call(this,{type:"continue"})},n={client:E(this,Mu),meta:this.options.meta,mutationKey:this.options.mutationKey};Q(this,da,oj({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(P,A)=>{fe(this,Xr,Kn).call(this,{type:"failed",failureCount:P,error:A})},onPause:()=>{fe(this,Xr,Kn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,_t).canRun(this)}));const i=this.state.status==="pending",a=!E(this,da).canStart();try{if(i)r();else{fe(this,Xr,Kn).call(this,{type:"pending",variables:t,isPaused:a}),E(this,_t).config.onMutate&&await E(this,_t).config.onMutate(t,this,n);const A=await((s=(o=this.options).onMutate)==null?void 0:s.call(o,t,n));A!==this.state.context&&fe(this,Xr,Kn).call(this,{type:"pending",context:A,variables:t,isPaused:a})}const P=await E(this,da).start();return await((u=(l=E(this,_t).config).onSuccess)==null?void 0:u.call(l,P,t,this.state.context,this,n)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,P,t,this.state.context,n)),await((h=(d=E(this,_t).config).onSettled)==null?void 0:h.call(d,P,null,this.state.variables,this.state.context,this,n)),await((y=(p=this.options).onSettled)==null?void 0:y.call(p,P,null,t,this.state.context,n)),fe(this,Xr,Kn).call(this,{type:"success",data:P}),P}catch(P){try{await((v=(m=E(this,_t).config).onError)==null?void 0:v.call(m,P,t,this.state.context,this,n))}catch(A){Promise.reject(A)}try{await((x=(b=this.options).onError)==null?void 0:x.call(b,P,t,this.state.context,n))}catch(A){Promise.reject(A)}try{await((w=(S=E(this,_t).config).onSettled)==null?void 0:w.call(S,void 0,P,this.state.variables,this.state.context,this,n))}catch(A){Promise.reject(A)}try{await((_=(O=this.options).onSettled)==null?void 0:_.call(O,void 0,P,t,this.state.context,n))}catch(A){Promise.reject(A)}throw fe(this,Xr,Kn).call(this,{type:"error",error:P}),P}finally{E(this,_t).runNext(this)}}},Mu=new WeakMap,Gr=new WeakMap,_t=new WeakMap,da=new WeakMap,Xr=new WeakSet,Kn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),ot.batch(()=>{E(this,Gr).forEach(n=>{n.onMutationUpdate(t)}),E(this,_t).notify({mutation:this,type:"updated",action:t})})},T_);function cj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vn,Mr,Iu,C_,qM=(C_=class extends _s{constructor(t={}){super();te(this,vn);te(this,Mr);te(this,Iu);this.config=t,Q(this,vn,new Set),Q(this,Mr,new Map),Q(this,Iu,0)}build(t,r,n){const i=new VM({client:t,mutationCache:this,mutationId:++ec(this,Iu)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){E(this,vn).add(t);const r=bc(t);if(typeof r=="string"){const n=E(this,Mr).get(r);n?n.push(t):E(this,Mr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(E(this,vn).delete(t)){const r=bc(t);if(typeof r=="string"){const n=E(this,Mr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&E(this,Mr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=bc(t);if(typeof r=="string"){const n=E(this,Mr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=bc(t);if(typeof r=="string"){const i=(n=E(this,Mr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ot.batch(()=>{E(this,vn).forEach(t=>{this.notify({type:"removed",mutation:t})}),E(this,vn).clear(),E(this,Mr).clear()})}getAll(){return Array.from(E(this,vn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Hx(r,n))}findAll(t={}){return this.getAll().filter(r=>Hx(t,r))}notify(t){ot.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return ot.batch(()=>Promise.all(t.map(r=>r.continue().catch(Nt))))}},vn=new WeakMap,Mr=new WeakMap,Iu=new WeakMap,C_);function bc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var gn,ii,Ut,bn,kn,Qc,vy,$_,GM=($_=class extends _s{constructor(r,n){super();te(this,kn);te(this,gn);te(this,ii);te(this,Ut);te(this,bn);Q(this,gn,r),this.setOptions(n),this.bindMethods(),fe(this,kn,Qc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=E(this,gn).defaultMutationOptions(r),kf(this.options,n)||E(this,gn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,Ut),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Pa(n.mutationKey)!==Pa(this.options.mutationKey)?this.reset():((i=E(this,Ut))==null?void 0:i.state.status)==="pending"&&E(this,Ut).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=E(this,Ut))==null||r.removeObserver(this)}onMutationUpdate(r){fe(this,kn,Qc).call(this),fe(this,kn,vy).call(this,r)}getCurrentResult(){return E(this,ii)}reset(){var r;(r=E(this,Ut))==null||r.removeObserver(this),Q(this,Ut,void 0),fe(this,kn,Qc).call(this),fe(this,kn,vy).call(this)}mutate(r,n){var i;return Q(this,bn,n),(i=E(this,Ut))==null||i.removeObserver(this),Q(this,Ut,E(this,gn).getMutationCache().build(E(this,gn),this.options)),E(this,Ut).addObserver(this),E(this,Ut).execute(r)}},gn=new WeakMap,ii=new WeakMap,Ut=new WeakMap,bn=new WeakMap,kn=new WeakSet,Qc=function(){var n;const r=((n=E(this,Ut))==null?void 0:n.state)??cj();Q(this,ii,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},vy=function(r){ot.batch(()=>{var n,i,a,o,s,l,u,f;if(E(this,bn)&&this.hasListeners()){const c=E(this,ii).variables,d=E(this,ii).context,h={client:E(this,gn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(i=(n=E(this,bn)).onSuccess)==null||i.call(n,r.data,c,d,h)}catch(p){Promise.reject(p)}try{(o=(a=E(this,bn)).onSettled)==null||o.call(a,r.data,null,c,d,h)}catch(p){Promise.reject(p)}}else if((r==null?void 0:r.type)==="error"){try{(l=(s=E(this,bn)).onError)==null||l.call(s,r.error,c,d,h)}catch(p){Promise.reject(p)}try{(f=(u=E(this,bn)).onSettled)==null||f.call(u,void 0,r.error,c,d,h)}catch(p){Promise.reject(p)}}}this.listeners.forEach(c=>{c(E(this,ii))})})},$_),Qr,N_,XM=(N_=class extends _s{constructor(t={}){super();te(this,Qr);this.config=t,Q(this,Qr,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??t0(i,r);let o=this.get(a);return o||(o=new FM({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){E(this,Qr).has(t.queryHash)||(E(this,Qr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=E(this,Qr).get(t.queryHash);r&&(t.destroy(),r===t&&E(this,Qr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ot.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,Qr).get(t)}getAll(){return[...E(this,Qr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Wx(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Wx(t,n)):r}notify(t){ot.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ot.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ot.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Qr=new WeakMap,N_),Ke,ai,oi,No,Mo,si,Io,Ro,M_,QM=(M_=class{constructor(e={}){te(this,Ke);te(this,ai);te(this,oi);te(this,No);te(this,Mo);te(this,si);te(this,Io);te(this,Ro);Q(this,Ke,e.queryCache||new XM),Q(this,ai,e.mutationCache||new qM),Q(this,oi,e.defaultOptions||{}),Q(this,No,new Map),Q(this,Mo,new Map),Q(this,si,0)}mount(){ec(this,si)._++,E(this,si)===1&&(Q(this,Io,i0.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ke).onFocus())})),Q(this,Ro,Tf.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ke).onOnline())})))}unmount(){var e,t;ec(this,si)._--,E(this,si)===0&&((e=E(this,Io))==null||e.call(this),Q(this,Io,void 0),(t=E(this,Ro))==null||t.call(this),Q(this,Ro,void 0))}isFetching(e){return E(this,Ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,ai).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Ke).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=E(this,Ke).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Si(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return E(this,Ke).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=E(this,Ke).get(n.queryHash),a=i==null?void 0:i.state.data,o=TM(t,a);if(o!==void 0)return E(this,Ke).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return ot.batch(()=>E(this,Ke).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Ke).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=E(this,Ke);ot.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=E(this,Ke);return ot.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=ot.batch(()=>E(this,Ke).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Nt).catch(Nt)}invalidateQueries(e,t={}){return ot.batch(()=>(E(this,Ke).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=ot.batch(()=>E(this,Ke).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Nt)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Nt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=E(this,Ke).build(this,t);return r.isStaleByTime(Si(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nt).catch(Nt)}fetchInfiniteQuery(e){return e.behavior=Yx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nt).catch(Nt)}ensureInfiniteQueryData(e){return e.behavior=Yx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Tf.isOnline()?E(this,ai).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Ke)}getMutationCache(){return E(this,ai)}getDefaultOptions(){return E(this,oi)}setDefaultOptions(e){Q(this,oi,e)}setQueryDefaults(e,t){E(this,No).set(Pa(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,No).values()],r={};return t.forEach(n=>{ql(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){E(this,Mo).set(Pa(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,Mo).values()],r={};return t.forEach(n=>{ql(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,oi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=t0(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===r0&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,oi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Ke).clear(),E(this,ai).clear()}},Ke=new WeakMap,ai=new WeakMap,oi=new WeakMap,No=new WeakMap,Mo=new WeakMap,si=new WeakMap,Io=new WeakMap,Ro=new WeakMap,M_),fj=k.createContext(void 0),Ps=e=>{const t=k.useContext(fj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},YM=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(fj.Provider,{value:e,children:t})),dj=k.createContext(!1),JM=()=>k.useContext(dj);dj.Provider;function ZM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var eI=k.createContext(ZM()),tI=()=>k.useContext(eI),rI=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?n0(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},nI=e=>{k.useEffect(()=>{e.clearReset()},[e])},iI=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||n0(r,[e.error,n])),aI=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},oI=(e,t)=>e.isLoading&&e.isFetching&&!t,sI=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Zx=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function lI(e,t,r){var d,h,p,y;const n=JM(),i=tI(),a=Ps(),o=a.defaultQueryOptions(e);(h=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,o);const s=a.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",aI(o),rI(o,i,s),nI(i);const l=!a.getQueryCache().get(o.queryHash),[u]=k.useState(()=>new t(a,o)),f=u.getOptimisticResult(o),c=!n&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(m=>{const v=c?u.subscribe(ot.batchCalls(m)):Nt;return u.updateResult(),v},[u,c]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),k.useEffect(()=>{u.setOptions(o)},[o,u]),sI(o,f))throw Zx(o,u,i);if(iI({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;if((y=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||y.call(p,o,f),o.experimental_prefetchInRender&&!_a&&oI(f,n)){const m=l?Zx(o,u,i):s==null?void 0:s.promise;m==null||m.catch(Nt).finally(()=>{u.updateResult()})}return o.notifyOnChangeProps?f:u.trackResult(f)}function Ai(e,t){return lI(e,UM)}function ma(e,t){const r=Ps(),[n]=k.useState(()=>new GM(r,e));k.useEffect(()=>{n.setOptions(e)},[n,e]);const i=k.useSyncExternalStore(k.useCallback(o=>n.subscribe(ot.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=k.useCallback((o,s)=>{n.mutate(o,s).catch(Nt)},[n]);if(i.error&&n0(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function hj(e,t){return function(){return e.apply(t,arguments)}}const{toString:uI}=Object.prototype,{getPrototypeOf:o0}=Object,{iterator:Zd,toStringTag:pj}=Symbol,eh=(e=>t=>{const r=uI.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Wr=e=>(e=e.toLowerCase(),t=>eh(t)===e),th=e=>t=>typeof t===e,{isArray:As}=Array,Ko=th("undefined");function Uu(e){return e!==null&&!Ko(e)&&e.constructor!==null&&!Ko(e.constructor)&&Qt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mj=Wr("ArrayBuffer");function cI(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mj(e.buffer),t}const fI=th("string"),Qt=th("function"),yj=th("number"),Wu=e=>e!==null&&typeof e=="object",dI=e=>e===!0||e===!1,Yc=e=>{if(eh(e)!=="object")return!1;const t=o0(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(pj in e)&&!(Zd in e)},hI=e=>{if(!Wu(e)||Uu(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},pI=Wr("Date"),mI=Wr("File"),yI=Wr("Blob"),vI=Wr("FileList"),gI=e=>Wu(e)&&Qt(e.pipe),bI=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Qt(e.append)&&((t=eh(e))==="formdata"||t==="object"&&Qt(e.toString)&&e.toString()==="[object FormData]"))},xI=Wr("URLSearchParams"),[wI,SI,OI,_I]=["ReadableStream","Request","Response","Headers"].map(Wr),PI=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hu(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),As(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Ji=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gj=e=>!Ko(e)&&e!==Ji;function gy(){const{caseless:e,skipUndefined:t}=gj(this)&&this||{},r={},n=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const o=e&&vj(r,a)||a;Yc(r[o])&&Yc(i)?r[o]=gy(r[o],i):Yc(i)?r[o]=gy({},i):As(i)?r[o]=i.slice():(!t||!Ko(i))&&(r[o]=i)};for(let i=0,a=arguments.length;i(Hu(t,(i,a)=>{r&&Qt(i)?Object.defineProperty(e,a,{value:hj(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),jI=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),EI=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},kI=(e,t,r,n)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&o0(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},TI=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},CI=e=>{if(!e)return null;if(As(e))return e;let t=e.length;if(!yj(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},$I=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&o0(Uint8Array)),NI=(e,t)=>{const n=(e&&e[Zd]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},MI=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},II=Wr("HTMLFormElement"),RI=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),ew=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),DI=Wr("RegExp"),bj=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Hu(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},LI=e=>{bj(e,(t,r)=>{if(Qt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Qt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},zI=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return As(e)?n(e):n(String(e).split(t)),r},BI=()=>{},FI=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function UI(e){return!!(e&&Qt(e.append)&&e[pj]==="FormData"&&e[Zd])}const WI=e=>{const t=new Array(10),r=(n,i)=>{if(Wu(n)){if(t.indexOf(n)>=0)return;if(Uu(n))return n;if(!("toJSON"in n)){t[i]=n;const a=As(n)?[]:{};return Hu(n,(o,s)=>{const l=r(o,i+1);!Ko(l)&&(a[s]=l)}),t[i]=void 0,a}}return n};return r(e,0)},HI=Wr("AsyncFunction"),KI=e=>e&&(Wu(e)||Qt(e))&&Qt(e.then)&&Qt(e.catch),xj=((e,t)=>e?setImmediate:t?((r,n)=>(Ji.addEventListener("message",({source:i,data:a})=>{i===Ji&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Ji.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Qt(Ji.postMessage)),VI=typeof queueMicrotask<"u"?queueMicrotask.bind(Ji):typeof process<"u"&&process.nextTick||xj,qI=e=>e!=null&&Qt(e[Zd]),M={isArray:As,isArrayBuffer:mj,isBuffer:Uu,isFormData:bI,isArrayBufferView:cI,isString:fI,isNumber:yj,isBoolean:dI,isObject:Wu,isPlainObject:Yc,isEmptyObject:hI,isReadableStream:wI,isRequest:SI,isResponse:OI,isHeaders:_I,isUndefined:Ko,isDate:pI,isFile:mI,isBlob:yI,isRegExp:DI,isFunction:Qt,isStream:gI,isURLSearchParams:xI,isTypedArray:$I,isFileList:vI,forEach:Hu,merge:gy,extend:AI,trim:PI,stripBOM:jI,inherits:EI,toFlatObject:kI,kindOf:eh,kindOfTest:Wr,endsWith:TI,toArray:CI,forEachEntry:NI,matchAll:MI,isHTMLForm:II,hasOwnProperty:ew,hasOwnProp:ew,reduceDescriptors:bj,freezeMethods:LI,toObjectSet:zI,toCamelCase:RI,noop:BI,toFiniteNumber:FI,findKey:vj,global:Ji,isContextDefined:gj,isSpecCompliantForm:UI,toJSONObject:WI,isAsyncFn:HI,isThenable:KI,setImmediate:xj,asap:VI,isIterable:qI};let oe=class wj extends Error{static from(t,r,n,i,a,o){const s=new wj(t.message,r||t.code,n,i,a);return s.cause=t,s.name=t.name,o&&Object.assign(s,o),s}constructor(t,r,n,i,a){super(t),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.status}}};oe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";oe.ERR_BAD_OPTION="ERR_BAD_OPTION";oe.ECONNABORTED="ECONNABORTED";oe.ETIMEDOUT="ETIMEDOUT";oe.ERR_NETWORK="ERR_NETWORK";oe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";oe.ERR_DEPRECATED="ERR_DEPRECATED";oe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";oe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";oe.ERR_CANCELED="ERR_CANCELED";oe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";oe.ERR_INVALID_URL="ERR_INVALID_URL";const GI=null;function by(e){return M.isPlainObject(e)||M.isArray(e)}function Sj(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function tw(e,t,r){return e?e.concat(t).map(function(i,a){return i=Sj(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function XI(e){return M.isArray(e)&&!e.some(by)}const QI=M.toFlatObject(M,{},null,function(t){return/^is[A-Z]/.test(t)});function rh(e,t,r){if(!M.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=M.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!M.isUndefined(m[y])});const n=r.metaTokens,i=r.visitor||f,a=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(M.isDate(p))return p.toISOString();if(M.isBoolean(p))return p.toString();if(!l&&M.isBlob(p))throw new oe("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(p)||M.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,y,m){let v=p;if(p&&!m&&typeof p=="object"){if(M.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(M.isArray(p)&&XI(p)||(M.isFileList(p)||M.endsWith(y,"[]"))&&(v=M.toArray(p)))return y=Sj(y),v.forEach(function(x,S){!(M.isUndefined(x)||x===null)&&t.append(o===!0?tw([y],S,a):o===null?y:y+"[]",u(x))}),!1}return by(p)?!0:(t.append(tw(m,y,a),u(p)),!1)}const c=[],d=Object.assign(QI,{defaultVisitor:f,convertValue:u,isVisitable:by});function h(p,y){if(!M.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));c.push(p),M.forEach(p,function(v,b){(!(M.isUndefined(v)||v===null)&&i.call(t,v,M.isString(b)?b.trim():b,y,d))===!0&&h(v,y?y.concat(b):[b])}),c.pop()}}if(!M.isObject(e))throw new TypeError("data must be an object");return h(e),t}function rw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function s0(e,t){this._pairs=[],e&&rh(e,this,t)}const Oj=s0.prototype;Oj.append=function(t,r){this._pairs.push([t,r])};Oj.toString=function(t){const r=t?function(n){return t.call(this,n,rw)}:rw;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function YI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _j(e,t,r){if(!t)return e;const n=r&&r.encode||YI,i=M.isFunction(r)?{serialize:r}:r,a=i&&i.serialize;let o;if(a?o=a(t,i):o=M.isURLSearchParams(t)?t.toString():new s0(t,i).toString(n),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class nw{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){M.forEach(this.handlers,function(n){n!==null&&t(n)})}}const l0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},JI=typeof URLSearchParams<"u"?URLSearchParams:s0,ZI=typeof FormData<"u"?FormData:null,eR=typeof Blob<"u"?Blob:null,tR={isBrowser:!0,classes:{URLSearchParams:JI,FormData:ZI,Blob:eR},protocols:["http","https","file","blob","url","data"]},u0=typeof window<"u"&&typeof document<"u",xy=typeof navigator=="object"&&navigator||void 0,rR=u0&&(!xy||["ReactNative","NativeScript","NS"].indexOf(xy.product)<0),nR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iR=u0&&window.location.href||"http://localhost",aR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:u0,hasStandardBrowserEnv:rR,hasStandardBrowserWebWorkerEnv:nR,navigator:xy,origin:iR},Symbol.toStringTag,{value:"Module"})),kt={...aR,...tR};function oR(e,t){return rh(e,new kt.classes.URLSearchParams,{visitor:function(r,n,i,a){return kt.isNode&&M.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function sR(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function lR(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n=r.length;return o=!o&&M.isArray(i)?i.length:o,l?(M.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!M.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&M.isArray(i[o])&&(i[o]=lR(i[o])),!s)}if(M.isFormData(e)&&M.isFunction(e.entries)){const r={};return M.forEachEntry(e,(n,i)=>{t(sR(n),i,r,0)}),r}return null}function uR(e,t,r){if(M.isString(e))try{return(t||JSON.parse)(e),M.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ku={transitional:l0,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=M.isObject(t);if(a&&M.isHTMLForm(t)&&(t=new FormData(t)),M.isFormData(t))return i?JSON.stringify(Pj(t)):t;if(M.isArrayBuffer(t)||M.isBuffer(t)||M.isStream(t)||M.isFile(t)||M.isBlob(t)||M.isReadableStream(t))return t;if(M.isArrayBufferView(t))return t.buffer;if(M.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return oR(t,this.formSerializer).toString();if((s=M.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return rh(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),uR(t)):t}],transformResponse:[function(t){const r=this.transitional||Ku.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(M.isResponse(t)||M.isReadableStream(t))return t;if(t&&M.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?oe.from(s,oe.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kt.classes.FormData,Blob:kt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],e=>{Ku.headers[e]={}});const cR=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fR=e=>{const t={};let r,n,i;return e&&e.split(` `).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&cR[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},iw=Symbol("internals");function Xs(e){return e&&String(e).trim().toLowerCase()}function Jc(e){return e===!1||e==null?e:M.isArray(e)?e.map(Jc):String(e)}function dR(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const hR=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ap(e,t,r,n,i){if(M.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!M.isString(t)){if(M.isString(n))return t.indexOf(n)!==-1;if(M.isRegExp(n))return n.test(t)}}function pR(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function mR(e,t){const r=M.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let Yt=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,l,u){const f=Xs(l);if(!f)throw new Error("header name must be a non-empty string");const c=M.findKey(i,f);(!c||i[c]===void 0||u===!0||u===void 0&&i[c]!==!1)&&(i[c||l]=Jc(s))}const o=(s,l)=>M.forEach(s,(u,f)=>a(u,f,l));if(M.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(M.isString(t)&&(t=t.trim())&&!hR(t))o(fR(t),r);else if(M.isObject(t)&&M.isIterable(t)){let s={},l,u;for(const f of t){if(!M.isArray(f))throw TypeError("Object iterator must return a key-value pair");s[u=f[0]]=(l=s[u])?M.isArray(l)?[...l,f[1]]:[l,f[1]]:f[1]}o(s,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=Xs(t),t){const n=M.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return dR(i);if(M.isFunction(r))return r.call(this,i,n);if(M.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Xs(t),t){const n=M.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Ap(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=Xs(o),o){const s=M.findKey(n,o);s&&(!r||Ap(n,n[s],s,r))&&(delete n[s],i=!0)}}return M.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||Ap(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return M.forEach(this,(i,a)=>{const o=M.findKey(n,a);if(o){r[o]=Jc(i),delete r[a];return}const s=t?pR(a):String(a).trim();s!==a&&delete r[a],r[s]=Jc(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return M.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&M.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[iw]=this[iw]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Xs(o);n[s]||(mR(i,o),n[s]=!0)}return M.isArray(t)?t.forEach(a):a(t),this}};Yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);M.reduceDescriptors(Yt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});M.freezeMethods(Yt);function jp(e,t){const r=this||Ku,n=t||r,i=Yt.from(n.headers);let a=n.data;return M.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Aj(e){return!!(e&&e.__CANCEL__)}let Vu=class extends oe{constructor(t,r,n){super(t??"canceled",oe.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function jj(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new oe("Request failed with status code "+r.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function yR(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function vR(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=n[a];o||(o=u),r[i]=l,n[i]=u;let c=a,d=0;for(;c!==i;)d+=r[c++],c=c%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{r=f,i=null,a&&(clearTimeout(a),a=null),e(...u)};return[(...u)=>{const f=Date.now(),c=f-r;c>=n?o(u,f):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},n-c)))},()=>i&&o(i)]}const Cf=(e,t,r=3)=>{let n=0;const i=vR(50,250);return gR(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=o-n,u=i(l),f=o<=s;n=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&f?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(c)},r)},aw=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},ow=e=>(...t)=>M.asap(()=>e(...t)),bR=kt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,kt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(kt.origin),kt.navigator&&/(msie|trident)/i.test(kt.navigator.userAgent)):()=>!0,xR=kt.hasStandardBrowserEnv?{write(e,t,r,n,i,a,o){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];M.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),M.isString(n)&&s.push(`path=${n}`),M.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push("secure"),M.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function wR(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function SR(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ej(e,t,r){let n=!wR(t);return e&&(n||r==!1)?SR(e,t):t}const sw=e=>e instanceof Yt?{...e}:e;function Aa(e,t){t=t||{};const r={};function n(u,f,c,d){return M.isPlainObject(u)&&M.isPlainObject(f)?M.merge.call({caseless:d},u,f):M.isPlainObject(f)?M.merge({},f):M.isArray(f)?f.slice():f}function i(u,f,c,d){if(M.isUndefined(f)){if(!M.isUndefined(u))return n(void 0,u,c,d)}else return n(u,f,c,d)}function a(u,f){if(!M.isUndefined(f))return n(void 0,f)}function o(u,f){if(M.isUndefined(f)){if(!M.isUndefined(u))return n(void 0,u)}else return n(void 0,f)}function s(u,f,c){if(c in t)return n(u,f);if(c in e)return n(void 0,u)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,f,c)=>i(sw(u),sw(f),c,!0)};return M.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const c=M.hasOwnProp(l,f)?l[f]:i,d=c(e[f],t[f],f);M.isUndefined(d)&&c!==s||(r[f]=d)}),r}const kj=e=>{const t=Aa({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=Yt.from(o),t.url=_j(Ej(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),M.isFormData(r)){if(kt.hasStandardBrowserEnv||kt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(M.isFunction(r.getHeaders)){const l=r.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([f,c])=>{u.includes(f.toLowerCase())&&o.set(f,c)})}}if(kt.hasStandardBrowserEnv&&(n&&M.isFunction(n)&&(n=n(t)),n||n!==!1&&bR(t.url))){const l=i&&a&&xR.read(a);l&&o.set(i,l)}return t},OR=typeof XMLHttpRequest<"u",_R=OR&&function(e){return new Promise(function(r,n){const i=kj(e);let a=i.data;const o=Yt.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,f,c,d,h,p;function y(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function v(){if(!m)return;const x=Yt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:x,config:e,request:m};jj(function(_){r(_),y()},function(_){n(_),y()},w),m=null}"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(v)},m.onabort=function(){m&&(n(new oe("Request aborted",oe.ECONNABORTED,e,m)),m=null)},m.onerror=function(S){const w=S&&S.message?S.message:"Network Error",O=new oe(w,oe.ERR_NETWORK,e,m);O.event=S||null,n(O),m=null},m.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||l0;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),n(new oe(S,w.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,m)),m=null},a===void 0&&o.setContentType(null),"setRequestHeader"in m&&M.forEach(o.toJSON(),function(S,w){m.setRequestHeader(w,S)}),M.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),s&&s!=="json"&&(m.responseType=i.responseType),u&&([d,p]=Cf(u,!0),m.addEventListener("progress",d)),l&&m.upload&&([c,h]=Cf(l),m.upload.addEventListener("progress",c),m.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(f=x=>{m&&(n(!x||x.type?new Vu(null,e,m):x),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const b=yR(i.url);if(b&&kt.protocols.indexOf(b)===-1){n(new oe("Unsupported protocol "+b+":",oe.ERR_BAD_REQUEST,e));return}m.send(a||null)})},PR=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const a=function(u){if(!i){i=!0,s();const f=u instanceof Error?u:this.reason;n.abort(f instanceof oe?f:new Vu(f instanceof Error?f.message:f))}};let o=t&&setTimeout(()=>{o=null,a(new oe(`timeout of ${t}ms exceeded`,oe.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:l}=n;return l.unsubscribe=()=>M.asap(s),l}},AR=function*(e,t){let r=e.byteLength;if(r{const i=jR(e,t);let a=0,o,s=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:f}=await i.next();if(u){s(),l.close();return}let c=f.byteLength;if(r){let d=a+=c;r(d)}l.enqueue(new Uint8Array(f))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},uw=64*1024,{isFunction:xc}=M,kR=(({Request:e,Response:t})=>({Request:e,Response:t}))(M.global),{ReadableStream:cw,TextEncoder:fw}=M.global,dw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},TR=e=>{e=M.merge.call({skipUndefined:!0},kR,e);const{fetch:t,Request:r,Response:n}=e,i=t?xc(t):typeof fetch=="function",a=xc(r),o=xc(n);if(!i)return!1;const s=i&&xc(cw),l=i&&(typeof fw=="function"?(p=>y=>p.encode(y))(new fw):async p=>new Uint8Array(await new r(p).arrayBuffer())),u=a&&s&&dw(()=>{let p=!1;const y=new r(kt.origin,{body:new cw,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!y}),f=o&&s&&dw(()=>M.isReadableStream(new n("").body)),c={stream:f&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!c[p]&&(c[p]=(y,m)=>{let v=y&&y[p];if(v)return v.call(y);throw new oe(`Response type '${p}' is not supported`,oe.ERR_NOT_SUPPORT,m)})});const d=async p=>{if(p==null)return 0;if(M.isBlob(p))return p.size;if(M.isSpecCompliantForm(p))return(await new r(kt.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(M.isArrayBufferView(p)||M.isArrayBuffer(p))return p.byteLength;if(M.isURLSearchParams(p)&&(p=p+""),M.isString(p))return(await l(p)).byteLength},h=async(p,y)=>{const m=M.toFiniteNumber(p.getContentLength());return m??d(y)};return async p=>{let{url:y,method:m,data:v,signal:b,cancelToken:x,timeout:S,onDownloadProgress:w,onUploadProgress:O,responseType:_,headers:P,withCredentials:A="same-origin",fetchOptions:C}=kj(p),N=t||fetch;_=_?(_+"").toLowerCase():"text";let $=PR([b,x&&x.toAbortSignal()],S),L=null;const R=$&&$.unsubscribe&&(()=>{$.unsubscribe()});let I;try{if(O&&u&&m!=="get"&&m!=="head"&&(I=await h(P,v))!==0){let q=new r(y,{method:"POST",body:v,duplex:"half"}),H;if(M.isFormData(v)&&(H=q.headers.get("content-type"))&&P.setContentType(H),q.body){const[X,ne]=aw(I,Cf(ow(O)));v=lw(q.body,uw,X,ne)}}M.isString(A)||(A=A?"include":"omit");const D=a&&"credentials"in r.prototype,F={...C,signal:$,method:m.toUpperCase(),headers:P.normalize().toJSON(),body:v,duplex:"half",credentials:D?A:void 0};L=a&&new r(y,F);let T=await(a?N(L,C):N(y,F));const B=f&&(_==="stream"||_==="response");if(f&&(w||B&&R)){const q={};["status","statusText","headers"].forEach(ge=>{q[ge]=T[ge]});const H=M.toFiniteNumber(T.headers.get("content-length")),[X,ne]=w&&aw(H,Cf(ow(w),!0))||[];T=new n(lw(T.body,uw,X,()=>{ne&&ne(),R&&R()}),q)}_=_||"text";let U=await c[M.findKey(c,_)||"text"](T,p);return!B&&R&&R(),await new Promise((q,H)=>{jj(q,H,{data:U,headers:Yt.from(T.headers),status:T.status,statusText:T.statusText,config:p,request:L})})}catch(D){throw R&&R(),D&&D.name==="TypeError"&&/Load failed|fetch/i.test(D.message)?Object.assign(new oe("Network Error",oe.ERR_NETWORK,p,L,D&&D.response),{cause:D.cause||D}):oe.from(D,D&&D.code,p,L,D&&D.response)}}},CR=new Map,Tj=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,a=[n,i,r];let o=a.length,s=o,l,u,f=CR;for(;s--;)l=a[s],u=f.get(l),u===void 0&&f.set(l,u=s?new Map:TR(t)),f=u;return u};Tj();const c0={http:GI,xhr:_R,fetch:{get:Tj}};M.forEach(c0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const hw=e=>`- ${e}`,$R=e=>M.isFunction(e)||e===null||e===!1;function NR(e,t){e=M.isArray(e)?e:[e];const{length:r}=e;let n,i;const a={};for(let o=0;o`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=r?o.length>1?`since : `+o.map(hw).join(` `):" "+hw(o[0]):"as no adapter specified";throw new oe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i}const Cj={getAdapter:NR,adapters:c0};function Ep(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vu(null,e)}function pw(e){return Ep(e),e.headers=Yt.from(e.headers),e.data=jp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Cj.getAdapter(e.adapter||Ku.adapter,e)(e).then(function(n){return Ep(e),n.data=jp.call(e,e.transformResponse,n),n.headers=Yt.from(n.headers),n},function(n){return Aj(n)||(Ep(e),n&&n.response&&(n.response.data=jp.call(e,e.transformResponse,n.response),n.response.headers=Yt.from(n.response.headers))),Promise.reject(n)})}const $j="1.13.5",nh={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{nh[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const mw={};nh.transitional=function(t,r,n){function i(a,o){return"[Axios v"+$j+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new oe(i(o," has been removed"+(r?" in "+r:"")),oe.ERR_DEPRECATED);return r&&!mw[o]&&(mw[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};nh.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function MR(e,t,r){if(typeof e!="object")throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new oe("option "+a+" must be "+l,oe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new oe("Unknown option "+a,oe.ERR_BAD_OPTION)}}const Zc={assertOptions:MR,validators:nh},cr=Zc.validators;let ya=class{constructor(t){this.defaults=t||{},this.interceptors={request:new nw,response:new nw}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=` `+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Aa(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Zc.assertOptions(n,{silentJSONParsing:cr.transitional(cr.boolean),forcedJSONParsing:cr.transitional(cr.boolean),clarifyTimeoutError:cr.transitional(cr.boolean),legacyInterceptorReqResOrdering:cr.transitional(cr.boolean)},!1),i!=null&&(M.isFunction(i)?r.paramsSerializer={serialize:i}:Zc.assertOptions(i,{encode:cr.function,serialize:cr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Zc.assertOptions(r,{baseUrl:cr.spelling("baseURL"),withXsrfToken:cr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&M.merge(a.common,a[r.method]);a&&M.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),r.headers=Yt.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(r)===!1)return;l=l&&y.synchronous;const m=r.transitional||l0;m&&m.legacyInterceptorReqResOrdering?s.unshift(y.fulfilled,y.rejected):s.push(y.fulfilled,y.rejected)});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let f,c=0,d;if(!l){const p=[pw.bind(this),void 0];for(p.unshift(...s),p.push(...u),d=p.length,f=Promise.resolve(r);c{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new Vu(a,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Nj(function(i){t=i}),cancel:t}}};function RR(e){return function(r){return e.apply(null,r)}}function DR(e){return M.isObject(e)&&e.isAxiosError===!0}const wy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(wy).forEach(([e,t])=>{wy[t]=e});function Mj(e){const t=new ya(e),r=hj(ya.prototype.request,t);return M.extend(r,ya.prototype,t,{allOwnKeys:!0}),M.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Mj(Aa(e,i))},r}const Qe=Mj(Ku);Qe.Axios=ya;Qe.CanceledError=Vu;Qe.CancelToken=IR;Qe.isCancel=Aj;Qe.VERSION=$j;Qe.toFormData=rh;Qe.AxiosError=oe;Qe.Cancel=Qe.CanceledError;Qe.all=function(t){return Promise.all(t)};Qe.spread=RR;Qe.isAxiosError=DR;Qe.mergeConfig=Aa;Qe.AxiosHeaders=Yt;Qe.formToJSON=e=>Pj(M.isHTMLForm(e)?new FormData(e):e);Qe.getAdapter=Cj.getAdapter;Qe.HttpStatusCode=wy;Qe.default=Qe;const{Axios:koe,AxiosError:Toe,CanceledError:Coe,isCancel:$oe,CancelToken:Noe,VERSION:Moe,all:Ioe,Cancel:Roe,isAxiosError:Doe,spread:Loe,toFormData:zoe,AxiosHeaders:Boe,HttpStatusCode:Foe,formToJSON:Uoe,getAdapter:Woe,mergeConfig:Hoe}=Qe,Ee=Qe.create({baseURL:"/api",headers:{"Content-Type":"application/json"}});Ee.interceptors.request.use(e=>{const t=localStorage.getItem("access_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});Ee.interceptors.response.use(e=>e,async e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token"),window.location.href="/login"),Promise.reject(e)});const LR={login:(e,t)=>Ee.post("/auth/login",null,{params:{email:e,password:t}}),register:e=>Ee.post("/auth/register",e),refresh:e=>Ee.post("/auth/refresh",null,{params:{refresh_token:e}})},Ij={me:()=>Ee.get("/users/me"),updateMe:e=>Ee.patch("/users/me",e)},Gl={list:()=>Ee.get("/organizations"),create:e=>Ee.post("/organizations",e),get:e=>Ee.get(`/organizations/${e}`),update:(e,t)=>Ee.patch(`/organizations/${e}`,t),members:e=>Ee.get(`/organizations/${e}/members`),invite:(e,t)=>Ee.post(`/organizations/${e}/members`,t)},kp={list:e=>Ee.get("/integrations",{params:{org_id:e}}),create:(e,t)=>Ee.post("/integrations",t,{params:{org_id:e}}),get:(e,t)=>Ee.get(`/integrations/${t}`,{params:{org_id:e}}),update:(e,t,r)=>Ee.patch(`/integrations/${t}`,r,{params:{org_id:e}}),delete:(e,t)=>Ee.delete(`/integrations/${t}`,{params:{org_id:e}}),test:(e,t)=>Ee.post(`/integrations/${t}/test`,null,{params:{org_id:e}})},$f={list:(e,t={})=>Ee.get("/issues",{params:{org_id:e,...t}}),stats:e=>Ee.get("/issues/stats",{params:{org_id:e}}),get:(e,t)=>Ee.get(`/issues/${t}`,{params:{org_id:e}}),create:(e,t)=>Ee.post("/issues",t,{params:{org_id:e}}),reanalyze:(e,t)=>Ee.post(`/issues/${t}/reanalyze`,null,{params:{org_id:e}}),addComment:(e,t,r)=>Ee.post(`/issues/${t}/comments`,r,{params:{org_id:e}})},Sy={summary:(e,t=30)=>Ee.get("/reports/summary",{params:{org_id:e,days:t}}),exportCsv:(e,t=30)=>Ee.get("/reports/export/csv",{params:{org_id:e,days:t},responseType:"blob"})},Rj=k.createContext(null);function zR({children:e}){const[t,r]=k.useState(null),[n,i]=k.useState(!0),[a,o]=k.useState(null);k.useEffect(()=>{localStorage.getItem("access_token")?s():i(!1)},[]);const s=async()=>{try{const c=await Ij.me();r(c.data);const d=localStorage.getItem("current_org");d&&o(JSON.parse(d))}catch{localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}finally{i(!1)}},l=async(c,d)=>{const h=await LR.login(c,d);localStorage.setItem("access_token",h.data.access_token),localStorage.setItem("refresh_token",h.data.refresh_token),await s()},u=()=>{localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token"),localStorage.removeItem("current_org"),r(null),o(null)},f=c=>{o(c),localStorage.setItem("current_org",JSON.stringify(c))};return g.jsx(Rj.Provider,{value:{user:t,loading:n,login:l,logout:u,currentOrg:a,selectOrg:f},children:e})}const Hr=()=>k.useContext(Rj);function Dj(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),Lj=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Nf="-",yw=[],UR="arbitrary..",WR=e=>{const t=KR(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return HR(o);const s=o.split(Nf),l=s[0]===""&&s.length>1?1:0;return zj(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=n[o],u=r[o];return l?u?BR(u,l):l:u||yw}return r[o]||yw}}},zj=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const u=zj(e,t+1,a);if(u)return u}const o=r.validators;if(o===null)return;const s=t===0?e.join(Nf):e.slice(t).join(Nf),l=o.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?UR+n:void 0})(),KR=e=>{const{theme:t,classGroups:r}=e;return VR(r,t)},VR=(e,t)=>{const r=Lj();for(const n in e){const i=e[n];f0(i,r,n,t)}return r},f0=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){GR(e,t,r);return}if(typeof e=="function"){XR(e,t,r,n);return}QR(e,t,r,n)},GR=(e,t,r)=>{const n=e===""?t:Bj(t,e);n.classGroupId=r},XR=(e,t,r,n)=>{if(YR(e)){f0(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(FR(r,e))},QR=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let o=0;o{let r=e;const n=t.split(Nf),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,JR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let o=r[a];if(o!==void 0)return o;if((o=n[a])!==void 0)return i(a,o),o},set(a,o){a in r?r[a]=o:i(a,o)}}},Oy="!",vw=":",ZR=[],gw=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),eD=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,s=0,l=0,u;const f=i.length;for(let y=0;yl?u-l:void 0;return gw(a,h,d,p)};if(t){const i=t+vw,a=n;n=o=>o.startsWith(i)?a(o.slice(i.length)):gw(ZR,!1,o,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},tD=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},rD=e=>({cache:JR(e.cacheSize),parseClassName:eD(e),sortModifiers:tD(e),...WR(e)}),nD=/\s+/,iD=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(nD);let l="";for(let u=s.length-1;u>=0;u-=1){const f=s[u],{isExternal:c,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:y}=r(f);if(c){l=f+(l.length>0?" "+l:l);continue}let m=!!y,v=n(m?p.substring(0,y):p);if(!v){if(!m){l=f+(l.length>0?" "+l:l);continue}if(v=n(p),!v){l=f+(l.length>0?" "+l:l);continue}m=!1}const b=d.length===0?"":d.length===1?d[0]:a(d).join(":"),x=h?b+Oy:b,S=x+v;if(o.indexOf(S)>-1)continue;o.push(S);const w=i(v,m);for(let O=0;O0?" "+l:l)}return l},aD=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const o=l=>{const u=t.reduce((f,c)=>c(f),e());return r=rD(u),n=r.cache.get,i=r.cache.set,a=s,s(l)},s=l=>{const u=n(l);if(u)return u;const f=iD(l,r);return i(l,f),f};return a=o,(...l)=>a(aD(...l))},sD=[],rt=e=>{const t=r=>r[e]||sD;return t.isThemeGetter=!0,t},Uj=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wj=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lD=/^\d+\/\d+$/,uD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Va=e=>lD.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),Hn=e=>!!e&&Number.isInteger(Number(e)),Tp=e=>e.endsWith("%")&&de(e.slice(0,-1)),cn=e=>uD.test(e),Hj=()=>!0,pD=e=>cD.test(e)&&!fD.test(e),d0=()=>!1,mD=e=>dD.test(e),yD=e=>hD.test(e),vD=e=>!Z(e)&&!ee(e),gD=e=>Ci(e,qj,d0),Z=e=>Uj.test(e),Li=e=>Ci(e,Gj,pD),bw=e=>Ci(e,AD,de),bD=e=>Ci(e,Qj,Hj),xD=e=>Ci(e,Xj,d0),xw=e=>Ci(e,Kj,d0),wD=e=>Ci(e,Vj,yD),wc=e=>Ci(e,Yj,mD),ee=e=>Wj.test(e),Qs=e=>Da(e,Gj),SD=e=>Da(e,Xj),ww=e=>Da(e,Kj),OD=e=>Da(e,qj),_D=e=>Da(e,Vj),Sc=e=>Da(e,Yj,!0),PD=e=>Da(e,Qj,!0),Ci=(e,t,r)=>{const n=Uj.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Da=(e,t,r=!1)=>{const n=Wj.exec(e);return n?n[1]?t(n[1]):r:!1},Kj=e=>e==="position"||e==="percentage",Vj=e=>e==="image"||e==="url",qj=e=>e==="length"||e==="size"||e==="bg-size",Gj=e=>e==="length",AD=e=>e==="number",Xj=e=>e==="family-name",Qj=e=>e==="number"||e==="weight",Yj=e=>e==="shadow",jD=()=>{const e=rt("color"),t=rt("font"),r=rt("text"),n=rt("font-weight"),i=rt("tracking"),a=rt("leading"),o=rt("breakpoint"),s=rt("container"),l=rt("spacing"),u=rt("radius"),f=rt("shadow"),c=rt("inset-shadow"),d=rt("text-shadow"),h=rt("drop-shadow"),p=rt("blur"),y=rt("perspective"),m=rt("aspect"),v=rt("ease"),b=rt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),ee,Z],O=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],P=()=>[ee,Z,l],A=()=>[Va,"full","auto",...P()],C=()=>[Hn,"none","subgrid",ee,Z],N=()=>["auto",{span:["full",Hn,ee,Z]},Hn,ee,Z],$=()=>[Hn,"auto",ee,Z],L=()=>["auto","min","max","fr",ee,Z],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...P()],F=()=>[Va,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],T=()=>[e,ee,Z],B=()=>[...S(),ww,xw,{position:[ee,Z]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",OD,gD,{size:[ee,Z]}],H=()=>[Tp,Qs,Li],X=()=>["","none","full",u,ee,Z],ne=()=>["",de,Qs,Li],ge=()=>["solid","dashed","dotted","double"],Le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[de,Tp,ww,xw],vt=()=>["","none",p,ee,Z],G=()=>["none",de,ee,Z],se=()=>["none",de,ee,Z],ue=()=>[de,ee,Z],W=()=>[Va,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[cn],breakpoint:[cn],color:[Hj],container:[cn],"drop-shadow":[cn],ease:["in","out","in-out"],font:[vD],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[cn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[cn],shadow:[cn],spacing:["px",de],text:[cn],"text-shadow":[cn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Va,Z,ee,m]}],container:["container"],columns:[{columns:[de,Z,ee,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Hn,"auto",ee,Z]}],basis:[{basis:[Va,"full","auto",s,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,Va,"auto","initial","none",Z]}],grow:[{grow:["",de,ee,Z]}],shrink:[{shrink:["",de,ee,Z]}],order:[{order:[Hn,"first","last","none",ee,Z]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[s,"screen",...F()]}],"min-w":[{"min-w":[s,"screen","none",...F()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",r,Qs,Li]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,PD,bD]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Tp,Z]}],"font-family":[{font:[SD,xD,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ee,Z]}],"line-clamp":[{"line-clamp":[de,"none",ee,bw]}],leading:[{leading:[a,...P()]}],"list-image":[{"list-image":["none",ee,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",ee,Li]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[de,"auto",ee,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Hn,ee,Z],radial:["",ee,Z],conic:[Hn,ee,Z]},_D,wD]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,ee,Z]}],"outline-w":[{outline:["",de,Qs,Li]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",f,Sc,wc]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",c,Sc,wc]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[de,Li]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",d,Sc,wc]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[de,ee,Z]}],"mix-blend":[{"mix-blend":[...Le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Le()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[ee,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Z]}],filter:[{filter:["","none",ee,Z]}],blur:[{blur:vt()}],brightness:[{brightness:[de,ee,Z]}],contrast:[{contrast:[de,ee,Z]}],"drop-shadow":[{"drop-shadow":["","none",h,Sc,wc]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",de,ee,Z]}],"hue-rotate":[{"hue-rotate":[de,ee,Z]}],invert:[{invert:["",de,ee,Z]}],saturate:[{saturate:[de,ee,Z]}],sepia:[{sepia:["",de,ee,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Z]}],"backdrop-blur":[{"backdrop-blur":vt()}],"backdrop-brightness":[{"backdrop-brightness":[de,ee,Z]}],"backdrop-contrast":[{"backdrop-contrast":[de,ee,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,ee,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,ee,Z]}],"backdrop-invert":[{"backdrop-invert":["",de,ee,Z]}],"backdrop-opacity":[{"backdrop-opacity":[de,ee,Z]}],"backdrop-saturate":[{"backdrop-saturate":[de,ee,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",de,ee,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[de,"initial",ee,Z]}],ease:[{ease:["linear","initial",v,ee,Z]}],delay:[{delay:[de,ee,Z]}],animate:[{animate:["none",b,ee,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,ee,Z]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[ee,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:W()}],"translate-x":[{"translate-x":W()}],"translate-y":[{"translate-y":W()}],"translate-z":[{"translate-z":W()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,Z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,Z]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[de,Qs,Li,bw]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ED=oD(jD);function At(...e){return ED(le(e))}/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Jj=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const TD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sw=e=>{const t=TD(e);return t.charAt(0).toUpperCase()+t.slice(1)};/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var CD={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $D=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ND=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>k.createElement("svg",{ref:l,...CD,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Jj("lucide",i),...!a&&!$D(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,f])=>k.createElement(u,f)),...Array.isArray(a)?a:[a]]));/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Oe=(e,t)=>{const r=k.forwardRef(({className:n,...i},a)=>k.createElement(ND,{ref:a,iconNode:t,className:Jj(`lucide-${kD(Sw(e))}`,`lucide-${e}`,n),...i}));return r.displayName=Sw(e),r};/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const MD=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Zj=Oe("arrow-right",MD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ID=[["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"}]],RD=Oe("bell",ID);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const DD=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],_y=Oe("building-2",DD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const LD=[["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"}]],zD=Oe("chart-column",LD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const BD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Py=Oe("chevron-right",BD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const FD=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],UD=Oe("chevrons-up-down",FD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const WD=[["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"}]],Ow=Oe("circle-alert",WD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const HD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ay=Oe("circle-check",HD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const KD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],VD=Oe("circle-x",KD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],GD=Oe("clock",qD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const XD=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],eE=Oe("git-pull-request",XD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const QD=[["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"}]],YD=Oe("layout-dashboard",QD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const JD=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],h0=Oe("loader-circle",JD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ZD=[["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"}]],tE=Oe("lock",ZD);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const eL=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],tL=Oe("log-out",eL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const rL=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],rE=Oe("mail",rL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const nL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],iL=Oe("panel-left-close",nL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const aL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],oL=Oe("panel-left-open",aL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const sL=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],lL=Oe("plug",sL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const uL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],nE=Oe("plus",uL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cL=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ef=Oe("search",cL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fL=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],dL=Oe("settings",fL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hL=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],pL=Oe("sliders-horizontal",hL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mL=[["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"}]],yL=Oe("target",mL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vL=[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],p0=Oe("ticket-check",vL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gL=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],bL=Oe("trending-down",gL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xL=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],wL=Oe("trending-up",xL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const SL=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],OL=Oe("user",SL);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _L=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],PL=Oe("users",_L);/** * @license lucide-react v0.574.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const AL=[["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"}]],Xl=Oe("zap",AL),jL=[{label:"Main",items:[{path:"/",label:"Dashboard",icon:YD},{path:"/issues",label:"Issues",icon:p0}]},{label:"Management",items:[{path:"/integrations",label:"Integrations",icon:lL},{path:"/team",label:"Team",icon:PL},{path:"/reports",label:"Reports",icon:zD}]},{label:"System",items:[{path:"/settings",label:"Settings",icon:dL}]}],EL={"/":"Dashboard","/issues":"Issues","/integrations":"Integrations","/team":"Team","/reports":"Reports","/settings":"Settings"};function kL(){var x,S,w,O;const{user:e,logout:t,currentOrg:r,selectOrg:n}=Hr(),i=Os(),a=Fu(),[o,s]=k.useState(!1),[l,u]=k.useState(!1),[f,c]=k.useState(!1),[d,h]=k.useState(!1),[p,y]=k.useState(""),{data:m}=Ai({queryKey:["organizations"],queryFn:()=>Gl.list()});k.useEffect(()=>{const _=P=>{(P.metaKey||P.ctrlKey)&&P.key==="k"&&(P.preventDefault(),c(A=>!A)),P.key==="Escape"&&(c(!1),u(!1))};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[]);const v=()=>{const _=i.pathname.split("/").filter(Boolean);if(_.length===0)return[{label:"Dashboard",path:"/"}];const P=[];let A="";for(const C of _)A+=`/${C}`,P.push({label:EL[A]||C.charAt(0).toUpperCase()+C.slice(1),path:A});return P},b=_=>_==="/"?i.pathname==="/":i.pathname.startsWith(_);return g.jsxs("div",{className:"min-h-screen flex bg-gray-950 text-gray-200",children:[f&&g.jsxs("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[20vh]",onClick:()=>c(!1),children:[g.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),g.jsx("div",{className:"relative w-full max-w-lg mx-4 animate-slide-up",onClick:_=>_.stopPropagation(),children:g.jsxs("div",{className:"card border-gray-700 shadow-2xl",children:[g.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-800",children:[g.jsx(ef,{size:18,className:"text-gray-500"}),g.jsx("input",{autoFocus:!0,value:p,onChange:_=>y(_.target.value),placeholder:"Search issues, projects, settings...",className:"flex-1 bg-transparent text-sm outline-none placeholder:text-gray-500"}),g.jsx("kbd",{className:"kbd",children:"ESC"})]}),g.jsxs("div",{className:"p-2 max-h-80 overflow-auto",children:[["Dashboard","Issues","Integrations","Team","Reports","Settings"].filter(_=>_.toLowerCase().includes(p.toLowerCase())).map(_=>g.jsxs("button",{className:"w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm text-gray-300 hover:bg-gray-800 transition-colors",onClick:()=>{a(`/${_.toLowerCase()==="dashboard"?"":_.toLowerCase()}`),c(!1),y("")},children:[g.jsx(Py,{size:14,className:"text-gray-600"}),_]},_)),p&&g.jsxs("div",{className:"px-3 py-6 text-center text-sm text-gray-500",children:['Press Enter to search for "',p,'"']})]})]})})]}),g.jsxs("aside",{className:At("fixed top-0 left-0 h-full flex flex-col border-r border-gray-800/50 bg-gray-950 z-40 transition-all duration-300",o?"w-[68px]":"w-[260px]"),children:[g.jsx("div",{className:At("h-14 flex items-center border-b border-gray-800/50 px-4",o&&"justify-center px-0"),children:o?g.jsx("div",{className:"w-8 h-8 rounded-lg bg-indigo-600 flex items-center justify-center",children:g.jsx(Xl,{size:16,className:"text-white"})}):g.jsxs("div",{className:"flex items-center gap-2.5",children:[g.jsx("div",{className:"w-8 h-8 rounded-lg bg-indigo-600 flex items-center justify-center shadow-lg shadow-indigo-500/20",children:g.jsx(Xl,{size:16,className:"text-white"})}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-sm font-semibold text-white",children:"JIRA AI Fixer"}),g.jsx("p",{className:"text-[10px] text-gray-500 font-medium",children:"Enterprise v2.0"})]})]})}),!o&&g.jsxs("div",{className:"px-3 py-3 border-b border-gray-800/50 relative",children:[g.jsxs("button",{onClick:()=>u(!l),className:"w-full flex items-center gap-2.5 px-3 py-2 rounded-lg bg-gray-900/60 hover:bg-gray-800/80 border border-gray-800/50 transition-all",children:[g.jsx("div",{className:"w-6 h-6 rounded bg-indigo-600/20 flex items-center justify-center flex-shrink-0",children:g.jsx(_y,{size:12,className:"text-indigo-400"})}),g.jsx("span",{className:"flex-1 text-left text-sm truncate",children:(r==null?void 0:r.name)||"Select org"}),g.jsx(UD,{size:14,className:"text-gray-500"})]}),l&&(m==null?void 0:m.data)&&g.jsxs("div",{className:"absolute left-3 right-3 top-full mt-1 bg-gray-900 border border-gray-700 rounded-lg shadow-xl z-50 animate-slide-up",children:[m.data.map(_=>g.jsxs("button",{onClick:()=>{n(_),u(!1)},className:At("w-full flex items-center gap-2.5 px-3 py-2 text-sm hover:bg-gray-800 first:rounded-t-lg last:rounded-b-lg transition-colors",(r==null?void 0:r.id)===_.id&&"bg-indigo-600/10 text-indigo-400"),children:[g.jsx(_y,{size:14}),_.name]},_.id)),g.jsxs("button",{onClick:()=>{a("/settings"),u(!1)},className:"w-full flex items-center gap-2.5 px-3 py-2 text-sm text-indigo-400 hover:bg-gray-800 border-t border-gray-800 rounded-b-lg",children:[g.jsx(nE,{size:14}),"New organization"]})]})]}),!o&&g.jsx("div",{className:"px-3 pt-3",children:g.jsxs("button",{onClick:()=>c(!0),className:"w-full flex items-center gap-2.5 px-3 py-2 rounded-lg text-gray-500 hover:text-gray-300 bg-gray-900/40 hover:bg-gray-800/60 border border-gray-800/30 transition-all text-sm",children:[g.jsx(ef,{size:14}),g.jsx("span",{className:"flex-1 text-left",children:"Search..."}),g.jsxs("div",{className:"flex items-center gap-0.5",children:[g.jsx("kbd",{className:"kbd",children:"⌘"}),g.jsx("kbd",{className:"kbd",children:"K"})]})]})}),g.jsx("nav",{className:"flex-1 overflow-auto px-3 py-4 space-y-5",children:jL.map(_=>g.jsxs("div",{children:[!o&&g.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-gray-600 px-3 mb-1.5",children:_.label}),g.jsx("div",{className:"space-y-0.5",children:_.items.map(P=>{const A=P.icon,C=b(P.path);return g.jsxs(Ho,{to:P.path,title:o?P.label:void 0,className:At("sidebar-item",C?"sidebar-item-active":"sidebar-item-inactive",o&&"justify-center px-0"),children:[g.jsx(A,{size:18,strokeWidth:C?2:1.5}),!o&&g.jsx("span",{children:P.label})]},P.path)})})]},_.label))}),g.jsx("div",{className:"px-3 py-2 border-t border-gray-800/50",children:g.jsxs("button",{onClick:()=>s(!o),className:At("sidebar-item sidebar-item-inactive w-full",o&&"justify-center px-0"),children:[o?g.jsx(oL,{size:18}):g.jsx(iL,{size:18}),!o&&g.jsx("span",{children:"Collapse"})]})}),g.jsx("div",{className:At("px-3 py-3 border-t border-gray-800/50",o&&"px-2"),children:g.jsxs("div",{className:At("flex items-center gap-2.5",o&&"justify-center"),children:[g.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center text-xs font-semibold text-white flex-shrink-0",children:((S=(x=e==null?void 0:e.full_name)==null?void 0:x[0])==null?void 0:S.toUpperCase())||((O=(w=e==null?void 0:e.email)==null?void 0:w[0])==null?void 0:O.toUpperCase())||"?"}),!o&&g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("p",{className:"text-sm font-medium truncate",children:(e==null?void 0:e.full_name)||(e==null?void 0:e.email)}),g.jsxs("button",{onClick:t,className:"text-xs text-gray-500 hover:text-red-400 transition-colors flex items-center gap-1",children:[g.jsx(tL,{size:10}),"Sign out"]})]})]})})]}),g.jsxs("div",{className:At("flex-1 flex flex-col transition-all duration-300",o?"ml-[68px]":"ml-[260px]"),children:[g.jsxs("header",{className:"h-14 flex items-center justify-between px-6 border-b border-gray-800/50 bg-gray-950/80 backdrop-blur-md sticky top-0 z-30",children:[g.jsx("div",{className:"flex items-center gap-1.5 text-sm",children:v().map((_,P)=>g.jsxs("div",{className:"flex items-center gap-1.5",children:[P>0&&g.jsx(Py,{size:12,className:"text-gray-600"}),g.jsx(Ho,{to:_.path,className:At("hover:text-white transition-colors",P===v().length-1?"text-white font-medium":"text-gray-400"),children:_.label})]},_.path))}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>c(!0),className:"btn-ghost btn-icon rounded-lg",children:g.jsx(ef,{size:16})}),g.jsxs("button",{onClick:()=>h(!d),className:"btn-ghost btn-icon rounded-lg relative",children:[g.jsx(RD,{size:16}),g.jsx("span",{className:"absolute top-1.5 right-1.5 w-2 h-2 rounded-full bg-indigo-500"})]})]})]}),g.jsx("main",{className:"flex-1 overflow-auto",children:g.jsx(pM,{})})]})]})}function TL(){const[e,t]=k.useState(""),[r,n]=k.useState(""),[i,a]=k.useState(""),[o,s]=k.useState(!1),{login:l}=Hr(),u=Fu(),f=async c=>{var d,h;c.preventDefault(),a(""),s(!0);try{await l(e,r),u("/")}catch(p){a(((h=(d=p.response)==null?void 0:d.data)==null?void 0:h.detail)||"Invalid email or password")}finally{s(!1)}};return g.jsxs("div",{className:"min-h-screen flex bg-gray-950",children:[g.jsxs("div",{className:"hidden lg:flex lg:w-1/2 relative overflow-hidden",children:[g.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-indigo-600 via-indigo-700 to-purple-800"}),g.jsx("div",{className:"absolute inset-0 opacity-10",style:{backgroundImage:"radial-gradient(circle at 2px 2px, white 1px, transparent 0)",backgroundSize:"32px 32px"}}),g.jsxs("div",{className:"relative z-10 flex flex-col justify-center px-16",children:[g.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[g.jsx("div",{className:"w-12 h-12 rounded-xl bg-white/10 backdrop-blur flex items-center justify-center",children:g.jsx(Xl,{size:24,className:"text-white"})}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-white",children:"JIRA AI Fixer"}),g.jsx("p",{className:"text-sm text-indigo-200",children:"Enterprise v2.0"})]})]}),g.jsxs("h2",{className:"text-4xl font-bold text-white leading-tight mb-4",children:["AI-Powered Issue",g.jsx("br",{}),"Analysis & Resolution"]}),g.jsx("p",{className:"text-lg text-indigo-200 max-w-md",children:"Automatically analyze issues from JIRA, ServiceNow, GitHub and more. Get root cause analysis and automated Pull Requests."}),g.jsx("div",{className:"mt-12 grid grid-cols-3 gap-6",children:[{value:"95%",label:"Accuracy"},{value:"10x",label:"Faster Resolution"},{value:"24/7",label:"Automated"}].map(c=>g.jsxs("div",{children:[g.jsx("p",{className:"text-3xl font-bold text-white",children:c.value}),g.jsx("p",{className:"text-sm text-indigo-300 mt-1",children:c.label})]},c.label))})]})]}),g.jsx("div",{className:"flex-1 flex items-center justify-center px-6",children:g.jsxs("div",{className:"w-full max-w-sm",children:[g.jsx("div",{className:"lg:hidden text-center mb-8",children:g.jsxs("div",{className:"inline-flex items-center gap-2.5",children:[g.jsx("div",{className:"w-10 h-10 rounded-xl bg-indigo-600 flex items-center justify-center shadow-lg shadow-indigo-500/25",children:g.jsx(Xl,{size:20,className:"text-white"})}),g.jsxs("div",{className:"text-left",children:[g.jsx("h1",{className:"text-lg font-bold text-white",children:"JIRA AI Fixer"}),g.jsx("p",{className:"text-xs text-gray-500",children:"Enterprise v2.0"})]})]})}),g.jsxs("div",{className:"mb-8",children:[g.jsx("h2",{className:"text-2xl font-bold text-white",children:"Welcome back"}),g.jsx("p",{className:"text-gray-400 mt-1",children:"Sign in to your account to continue"})]}),g.jsxs("form",{onSubmit:f,className:"space-y-4",children:[i&&g.jsx("div",{className:"p-3 bg-red-500/10 border border-red-500/20 rounded-lg text-sm text-red-400 animate-fade-in",children:i}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-xs font-medium text-gray-400 mb-1.5 uppercase tracking-wide",children:"Email"}),g.jsxs("div",{className:"relative",children:[g.jsx(rE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),g.jsx("input",{type:"email",value:e,onChange:c=>t(c.target.value),className:"input pl-10",placeholder:"you@company.com",required:!0})]})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-xs font-medium text-gray-400 mb-1.5 uppercase tracking-wide",children:"Password"}),g.jsxs("div",{className:"relative",children:[g.jsx(tE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),g.jsx("input",{type:"password",value:r,onChange:c=>n(c.target.value),className:"input pl-10",placeholder:"••••••••",required:!0})]})]}),g.jsx("button",{type:"submit",disabled:o,className:"btn btn-primary w-full h-11 justify-center mt-2",children:o?g.jsx(h0,{size:16,className:"animate-spin"}):g.jsxs(g.Fragment,{children:["Sign in",g.jsx(Zj,{size:16})]})})]}),g.jsxs("p",{className:"text-center mt-6 text-sm text-gray-500",children:["Don't have an account?"," ",g.jsx(Ho,{to:"/register",className:"text-indigo-400 hover:text-indigo-300 transition-colors",children:"Create account"})]})]})})]})}function CL(){const[e,t]=k.useState({email:"",password:"",full_name:""}),[r,n]=k.useState(""),[i,a]=k.useState(!1),{register:o}=Hr(),s=Fu(),l=async u=>{var f,c;u.preventDefault(),n(""),a(!0);try{await o(e),s("/")}catch(d){n(((c=(f=d.response)==null?void 0:f.data)==null?void 0:c.detail)||"Registration failed")}finally{a(!1)}};return g.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-950 px-6",children:g.jsxs("div",{className:"w-full max-w-sm",children:[g.jsx("div",{className:"text-center mb-8",children:g.jsxs("div",{className:"inline-flex items-center gap-2.5",children:[g.jsx("div",{className:"w-10 h-10 rounded-xl bg-indigo-600 flex items-center justify-center shadow-lg shadow-indigo-500/25",children:g.jsx(Xl,{size:20,className:"text-white"})}),g.jsxs("div",{className:"text-left",children:[g.jsx("h1",{className:"text-lg font-bold text-white",children:"JIRA AI Fixer"}),g.jsx("p",{className:"text-xs text-gray-500",children:"Enterprise v2.0"})]})]})}),g.jsxs("div",{className:"mb-8",children:[g.jsx("h2",{className:"text-2xl font-bold text-white",children:"Create account"}),g.jsx("p",{className:"text-gray-400 mt-1",children:"Get started with AI-powered issue analysis"})]}),g.jsxs("form",{onSubmit:l,className:"space-y-4",children:[r&&g.jsx("div",{className:"p-3 bg-red-500/10 border border-red-500/20 rounded-lg text-sm text-red-400 animate-fade-in",children:r}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-xs font-medium text-gray-400 mb-1.5 uppercase tracking-wide",children:"Full Name"}),g.jsxs("div",{className:"relative",children:[g.jsx(OL,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),g.jsx("input",{type:"text",value:e.full_name,onChange:u=>t({...e,full_name:u.target.value}),className:"input pl-10",placeholder:"John Doe",required:!0})]})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-xs font-medium text-gray-400 mb-1.5 uppercase tracking-wide",children:"Email"}),g.jsxs("div",{className:"relative",children:[g.jsx(rE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),g.jsx("input",{type:"email",value:e.email,onChange:u=>t({...e,email:u.target.value}),className:"input pl-10",placeholder:"you@company.com",required:!0})]})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-xs font-medium text-gray-400 mb-1.5 uppercase tracking-wide",children:"Password"}),g.jsxs("div",{className:"relative",children:[g.jsx(tE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),g.jsx("input",{type:"password",value:e.password,onChange:u=>t({...e,password:u.target.value}),className:"input pl-10",placeholder:"••••••••",minLength:8,required:!0})]})]}),g.jsx("button",{type:"submit",disabled:i,className:"btn btn-primary w-full h-11 justify-center mt-2",children:i?g.jsx(h0,{size:16,className:"animate-spin"}):g.jsxs(g.Fragment,{children:[g.jsx("span",{children:"Create account"}),g.jsx(Zj,{size:16})]})})]}),g.jsxs("p",{className:"text-center mt-6 text-sm text-gray-500",children:["Already have an account?"," ",g.jsx(Ho,{to:"/login",className:"text-indigo-400 hover:text-indigo-300 transition-colors",children:"Sign in"})]})]})})}var $L=Array.isArray,Jt=$L,NL=typeof tc=="object"&&tc&&tc.Object===Object&&tc,iE=NL,ML=iE,IL=typeof self=="object"&&self&&self.Object===Object&&self,RL=ML||IL||Function("return this")(),ln=RL,DL=ln,LL=DL.Symbol,qu=LL,_w=qu,aE=Object.prototype,zL=aE.hasOwnProperty,BL=aE.toString,Ys=_w?_w.toStringTag:void 0;function FL(e){var t=zL.call(e,Ys),r=e[Ys];try{e[Ys]=void 0;var n=!0}catch{}var i=BL.call(e);return n&&(t?e[Ys]=r:delete e[Ys]),i}var UL=FL,WL=Object.prototype,HL=WL.toString;function KL(e){return HL.call(e)}var VL=KL,Pw=qu,qL=UL,GL=VL,XL="[object Null]",QL="[object Undefined]",Aw=Pw?Pw.toStringTag:void 0;function YL(e){return e==null?e===void 0?QL:XL:Aw&&Aw in Object(e)?qL(e):GL(e)}var Ln=YL;function JL(e){return e!=null&&typeof e=="object"}var zn=JL,ZL=Ln,e3=zn,t3="[object Symbol]";function r3(e){return typeof e=="symbol"||e3(e)&&ZL(e)==t3}var js=r3,n3=Jt,i3=js,a3=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o3=/^\w*$/;function s3(e,t){if(n3(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||i3(e)?!0:o3.test(e)||!a3.test(e)||t!=null&&e in Object(t)}var m0=s3;function l3(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var $i=l3;const Es=Pe($i);var u3=Ln,c3=$i,f3="[object AsyncFunction]",d3="[object Function]",h3="[object GeneratorFunction]",p3="[object Proxy]";function m3(e){if(!c3(e))return!1;var t=u3(e);return t==d3||t==h3||t==f3||t==p3}var y0=m3;const ae=Pe(y0);var y3=ln,v3=y3["__core-js_shared__"],g3=v3,Cp=g3,jw=function(){var e=/[^.]+$/.exec(Cp&&Cp.keys&&Cp.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function b3(e){return!!jw&&jw in e}var x3=b3,w3=Function.prototype,S3=w3.toString;function O3(e){if(e!=null){try{return S3.call(e)}catch{}try{return e+""}catch{}}return""}var oE=O3,_3=y0,P3=x3,A3=$i,j3=oE,E3=/[\\^$.*+?()[\]{}|]/g,k3=/^\[object .+?Constructor\]$/,T3=Function.prototype,C3=Object.prototype,$3=T3.toString,N3=C3.hasOwnProperty,M3=RegExp("^"+$3.call(N3).replace(E3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function I3(e){if(!A3(e)||P3(e))return!1;var t=_3(e)?M3:k3;return t.test(j3(e))}var R3=I3;function D3(e,t){return e==null?void 0:e[t]}var L3=D3,z3=R3,B3=L3;function F3(e,t){var r=B3(e,t);return z3(r)?r:void 0}var La=F3,U3=La,W3=U3(Object,"create"),ih=W3,Ew=ih;function H3(){this.__data__=Ew?Ew(null):{},this.size=0}var K3=H3;function V3(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var q3=V3,G3=ih,X3="__lodash_hash_undefined__",Q3=Object.prototype,Y3=Q3.hasOwnProperty;function J3(e){var t=this.__data__;if(G3){var r=t[e];return r===X3?void 0:r}return Y3.call(t,e)?t[e]:void 0}var Z3=J3,e4=ih,t4=Object.prototype,r4=t4.hasOwnProperty;function n4(e){var t=this.__data__;return e4?t[e]!==void 0:r4.call(t,e)}var i4=n4,a4=ih,o4="__lodash_hash_undefined__";function s4(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=a4&&t===void 0?o4:t,this}var l4=s4,u4=K3,c4=q3,f4=Z3,d4=i4,h4=l4;function ks(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var T4=k4,C4=ah;function $4(e,t){var r=this.__data__,n=C4(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var N4=$4,M4=y4,I4=_4,R4=j4,D4=T4,L4=N4;function Ts(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},Zi=function(t){return ja(t)&&t.indexOf("%")===t.length-1},K=function(t){return iB(t)&&!$s(t)},lB=function(t){return ce(t)},ut=function(t){return K(t)||ja(t)},uB=0,Ns=function(t){var r=++uB;return"".concat(t||"").concat(r)},It=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!K(t)&&!ja(t))return n;var a;if(Zi(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return $s(a)&&(a=n),i&&a>r&&(a=r),a},Jn=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},cB=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ey(e){"@babel/helpers - typeof";return Ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ey(e)}var Iw={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"},An=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Rw=null,Np=null,A0=function e(t){if(t===Rw&&Array.isArray(Np))return Np;var r=[];return k.Children.forEach(t,function(n){ce(n)||(Zz.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Np=r,Rw=t,r};function Sr(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return An(i)}):n=[An(t)],A0(e).forEach(function(i){var a=or(i,"type.displayName")||or(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function tr(e,t){var r=Sr(e,t);return r&&r[0]}var Dw=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!K(n)||n<=0||!K(i)||i<=0)},gB=["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"],bB=function(t){return t&&t.type&&ja(t.type)&&gB.indexOf(t.type)>=0},xB=function(t){return t&&Ey(t)==="object"&&"clipDot"in t},wB=function(t,r,n,i){var a,o=(a=$p==null?void 0:$p[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ae(t)&&(i&&o.includes(r)||hB.includes(r))||n&&P0.includes(r)},re=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(k.isValidElement(t)&&(i=t.props),!Es(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;wB((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},ky=function e(t,r){if(t===r)return!0;var n=k.Children.count(t);if(n!==k.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Lw(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function AB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Cy(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=PB(e,_B),f=i||{width:r,height:n,x:0,y:0},c=le("recharts-surface",a);return j.createElement("svg",Ty({},re(u,!0,"svg"),{className:c,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),j.createElement("title",null,s),j.createElement("desc",null,l),t)}var jB=["children","className"];function $y(){return $y=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var me=j.forwardRef(function(e,t){var r=e.children,n=e.className,i=EB(e,jB),a=le("recharts-layer",n);return j.createElement("g",$y({className:a},re(i,!0),{ref:t}),r)}),Fr=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:$B(e,t,r)}var MB=NB,IB="\\ud800-\\udfff",RB="\\u0300-\\u036f",DB="\\ufe20-\\ufe2f",LB="\\u20d0-\\u20ff",zB=RB+DB+LB,BB="\\ufe0e\\ufe0f",FB="\\u200d",UB=RegExp("["+FB+IB+zB+BB+"]");function WB(e){return UB.test(e)}var yE=WB;function HB(e){return e.split("")}var KB=HB,vE="\\ud800-\\udfff",VB="\\u0300-\\u036f",qB="\\ufe20-\\ufe2f",GB="\\u20d0-\\u20ff",XB=VB+qB+GB,QB="\\ufe0e\\ufe0f",YB="["+vE+"]",Ny="["+XB+"]",My="\\ud83c[\\udffb-\\udfff]",JB="(?:"+Ny+"|"+My+")",gE="[^"+vE+"]",bE="(?:\\ud83c[\\udde6-\\uddff]){2}",xE="[\\ud800-\\udbff][\\udc00-\\udfff]",ZB="\\u200d",wE=JB+"?",SE="["+QB+"]?",eF="(?:"+ZB+"(?:"+[gE,bE,xE].join("|")+")"+SE+wE+")*",tF=SE+wE+eF,rF="(?:"+[gE+Ny+"?",Ny,bE,xE,YB].join("|")+")",nF=RegExp(My+"(?="+My+")|"+rF+tF,"g");function iF(e){return e.match(nF)||[]}var aF=iF,oF=KB,sF=yE,lF=aF;function uF(e){return sF(e)?lF(e):oF(e)}var cF=uF,fF=MB,dF=yE,hF=cF,pF=cE;function mF(e){return function(t){t=pF(t);var r=dF(t)?hF(t):void 0,n=r?r[0]:t.charAt(0),i=r?fF(r,1).join(""):t.slice(1);return n[e]()+i}}var yF=mF,vF=yF,gF=vF("toUpperCase"),bF=gF;const bh=Pe(bF);function Ce(e){return function(){return e}}const OE=Math.cos,Rf=Math.sin,Kr=Math.sqrt,Df=Math.PI,xh=2*Df,Iy=Math.PI,Ry=2*Iy,Hi=1e-6,xF=Ry-Hi;function _E(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _E;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iHi)if(!(Math.abs(c*l-u*f)>Hi)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,p=i-s,y=l*l+u*u,m=h*h+p*p,v=Math.sqrt(y),b=Math.sqrt(d),x=a*Math.tan((Iy-Math.acos((y+d-m)/(2*v*b)))/2),S=x/b,w=x/v;Math.abs(S-1)>Hi&&this._append`L${t+S*f},${r+S*c}`,this._append`A${a},${a},0,0,${+(c*h>f*p)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,f=r+l,c=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Hi||Math.abs(this._y1-f)>Hi)&&this._append`L${u},${f}`,n&&(d<0&&(d=d%Ry+Ry),d>xF?this._append`A${n},${n},0,1,${c},${t-s},${r-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=f}`:d>Hi&&this._append`A${n},${n},0,${+(d>=Iy)},${c},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function j0(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new SF(t)}function E0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function PE(e){this._context=e}PE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function wh(e){return new PE(e)}function AE(e){return e[0]}function jE(e){return e[1]}function EE(e,t){var r=Ce(!0),n=null,i=wh,a=null,o=j0(s);e=typeof e=="function"?e:e===void 0?AE:Ce(e),t=typeof t=="function"?t:t===void 0?jE:Ce(t);function s(l){var u,f=(l=E0(l)).length,c,d=!1,h;for(n==null&&(a=i(h=o())),u=0;u<=f;++u)!(u=h;--p)s.point(x[p],S[p]);s.lineEnd(),s.areaEnd()}v&&(x[d]=+e(m,d,c),S[d]=+t(m,d,c),s.point(n?+n(m,d,c):x[d],r?+r(m,d,c):S[d]))}if(b)return s=null,b+""||null}function f(){return EE().defined(i).curve(o).context(a)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ce(+c),n=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:Ce(+c),u):e},u.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Ce(+c),u):n},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ce(+c),r=null,u):t},u.y0=function(c){return arguments.length?(t=typeof c=="function"?c:Ce(+c),u):t},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Ce(+c),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(c){return arguments.length?(i=typeof c=="function"?c:Ce(!!c),u):i},u.curve=function(c){return arguments.length?(o=c,a!=null&&(s=o(a)),u):o},u.context=function(c){return arguments.length?(c==null?a=s=null:s=o(a=c),u):a},u}class kE{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function OF(e){return new kE(e,!0)}function _F(e){return new kE(e,!1)}const k0={draw(e,t){const r=Kr(t/Df);e.moveTo(r,0),e.arc(0,0,r,0,xh)}},PF={draw(e,t){const r=Kr(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},TE=Kr(1/3),AF=TE*2,jF={draw(e,t){const r=Kr(t/AF),n=r*TE;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},EF={draw(e,t){const r=Kr(t),n=-r/2;e.rect(n,n,r,r)}},kF=.8908130915292852,CE=Rf(Df/10)/Rf(7*Df/10),TF=Rf(xh/10)*CE,CF=-OE(xh/10)*CE,$F={draw(e,t){const r=Kr(t*kF),n=TF*r,i=CF*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=xh*a/5,s=OE(o),l=Rf(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},Mp=Kr(3),NF={draw(e,t){const r=-Kr(t/(Mp*3));e.moveTo(0,r*2),e.lineTo(-Mp*r,-r),e.lineTo(Mp*r,-r),e.closePath()}},fr=-.5,dr=Kr(3)/2,Dy=1/Kr(12),MF=(Dy/2+1)*3,IF={draw(e,t){const r=Kr(t/MF),n=r/2,i=r*Dy,a=n,o=r*Dy+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(fr*n-dr*i,dr*n+fr*i),e.lineTo(fr*a-dr*o,dr*a+fr*o),e.lineTo(fr*s-dr*l,dr*s+fr*l),e.lineTo(fr*n+dr*i,fr*i-dr*n),e.lineTo(fr*a+dr*o,fr*o-dr*a),e.lineTo(fr*s+dr*l,fr*l-dr*s),e.closePath()}};function RF(e,t){let r=null,n=j0(i);e=typeof e=="function"?e:Ce(e||k0),t=typeof t=="function"?t:Ce(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ce(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ce(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Lf(){}function zf(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function $E(e){this._context=e}$E.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:zf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:zf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function DF(e){return new $E(e)}function NE(e){this._context=e}NE.prototype={areaStart:Lf,areaEnd:Lf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:zf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function LF(e){return new NE(e)}function ME(e){this._context=e}ME.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:zf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zF(e){return new ME(e)}function IE(e){this._context=e}IE.prototype={areaStart:Lf,areaEnd:Lf,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 BF(e){return new IE(e)}function Bw(e){return e<0?-1:1}function Fw(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Bw(a)+Bw(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Uw(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ip(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Bf(e){this._context=e}Bf.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:Ip(this,this._t0,Uw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ip(this,Uw(this,r=Fw(this,e,t)),r);break;default:Ip(this,this._t0,r=Fw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function RE(e){this._context=new DE(e)}(RE.prototype=Object.create(Bf.prototype)).point=function(e,t){Bf.prototype.point.call(this,t,e)};function DE(e){this._context=e}DE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function FF(e){return new Bf(e)}function UF(e){return new RE(e)}function LE(e){this._context=e}LE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Ww(e),i=Ww(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function HF(e){return new Sh(e,.5)}function KF(e){return new Sh(e,0)}function VF(e){return new Sh(e,1)}function Vo(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r=0;)r[t]=t;return r}function qF(e,t){return e[t]}function GF(e){const t=[];return t.key=e,t}function XF(){var e=Ce([]),t=Ly,r=Vo,n=qF;function i(a){var o=Array.from(e.apply(this,arguments),GF),s,l=o.length,u=-1,f;for(const c of a)for(s=0,++u;s0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function i5(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var zE={symbolCircle:k0,symbolCross:PF,symbolDiamond:jF,symbolSquare:EF,symbolStar:$F,symbolTriangle:NF,symbolWye:IF},a5=Math.PI/180,o5=function(t){var r="symbol".concat(bh(t));return zE[r]||k0},s5=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*a5;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},l5=function(t,r){zE["symbol".concat(bh(t))]=r},T0=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=n5(t,ZF),u=Kw(Kw({},l),{},{type:n,size:a,sizeType:s}),f=function(){var m=o5(n),v=RF().type(m).size(s5(a,s,n));return v()},c=u.className,d=u.cx,h=u.cy,p=re(u,!0);return d===+d&&h===+h&&a===+a?j.createElement("path",zy({},p,{className:le("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};T0.registerSymbol=l5;function qo(e){"@babel/helpers - typeof";return qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qo(e)}function By(){return By=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=h.inactive?u:h.color;return j.createElement("li",By({className:m,style:c,key:"legend-item-".concat(p)},Ea(n.props,h,p)),j.createElement(Cy,{width:o,height:o,viewBox:f,style:d},n.renderIcon(h)),j.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},y?y(v,h,p):v))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return j.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(k.PureComponent);Yl(C0,"displayName","Legend");Yl(C0,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var g5=oh;function b5(){this.__data__=new g5,this.size=0}var x5=b5;function w5(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var S5=w5;function O5(e){return this.__data__.get(e)}var _5=O5;function P5(e){return this.__data__.has(e)}var A5=P5,j5=oh,E5=g0,k5=b0,T5=200;function C5(e,t){var r=this.__data__;if(r instanceof j5){var n=r.__data__;if(!E5||n.lengths))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var c=-1,d=!0,h=r&Z5?new X5:void 0;for(a.set(e,t),a.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=n8}var I0=i8,a8=Ln,o8=I0,s8=zn,l8="[object Arguments]",u8="[object Array]",c8="[object Boolean]",f8="[object Date]",d8="[object Error]",h8="[object Function]",p8="[object Map]",m8="[object Number]",y8="[object Object]",v8="[object RegExp]",g8="[object Set]",b8="[object String]",x8="[object WeakMap]",w8="[object ArrayBuffer]",S8="[object DataView]",O8="[object Float32Array]",_8="[object Float64Array]",P8="[object Int8Array]",A8="[object Int16Array]",j8="[object Int32Array]",E8="[object Uint8Array]",k8="[object Uint8ClampedArray]",T8="[object Uint16Array]",C8="[object Uint32Array]",Ie={};Ie[O8]=Ie[_8]=Ie[P8]=Ie[A8]=Ie[j8]=Ie[E8]=Ie[k8]=Ie[T8]=Ie[C8]=!0;Ie[l8]=Ie[u8]=Ie[w8]=Ie[c8]=Ie[S8]=Ie[f8]=Ie[d8]=Ie[h8]=Ie[p8]=Ie[m8]=Ie[y8]=Ie[v8]=Ie[g8]=Ie[b8]=Ie[x8]=!1;function $8(e){return s8(e)&&o8(e.length)&&!!Ie[a8(e)]}var N8=$8;function M8(e){return function(t){return e(t)}}var QE=M8,Hf={exports:{}};Hf.exports;(function(e,t){var r=iE,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Hf,Hf.exports);var I8=Hf.exports,R8=N8,D8=QE,Jw=I8,Zw=Jw&&Jw.isTypedArray,L8=Zw?D8(Zw):R8,YE=L8,z8=U6,B8=N0,F8=Jt,U8=XE,W8=M0,H8=YE,K8=Object.prototype,V8=K8.hasOwnProperty;function q8(e,t){var r=F8(e),n=!r&&B8(e),i=!r&&!n&&U8(e),a=!r&&!n&&!i&&H8(e),o=r||n||i||a,s=o?z8(e.length,String):[],l=s.length;for(var u in e)(t||V8.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||W8(u,l)))&&s.push(u);return s}var G8=q8,X8=Object.prototype;function Q8(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||X8;return e===r}var Y8=Q8;function J8(e,t){return function(r){return e(t(r))}}var JE=J8,Z8=JE,eU=Z8(Object.keys,Object),tU=eU,rU=Y8,nU=tU,iU=Object.prototype,aU=iU.hasOwnProperty;function oU(e){if(!rU(e))return nU(e);var t=[];for(var r in Object(e))aU.call(e,r)&&r!="constructor"&&t.push(r);return t}var sU=oU,lU=y0,uU=I0;function cU(e){return e!=null&&uU(e.length)&&!lU(e)}var Gu=cU,fU=G8,dU=sU,hU=Gu;function pU(e){return hU(e)?fU(e):dU(e)}var Oh=pU,mU=T6,yU=B6,vU=Oh;function gU(e){return mU(e,vU,yU)}var bU=gU,e1=bU,xU=1,wU=Object.prototype,SU=wU.hasOwnProperty;function OU(e,t,r,n,i,a){var o=r&xU,s=e1(e),l=s.length,u=e1(t),f=u.length;if(l!=f&&!o)return!1;for(var c=l;c--;){var d=s[c];if(!(o?d in t:SU.call(t,d)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var y=!0;a.set(e,t),a.set(t,e);for(var m=o;++c-1}var w9=x9;function S9(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=D9){var u=t?null:I9(e);if(u)return R9(u);o=!1,i=M9,l=new C9}else l=t?[]:s;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Z9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function eH(e){return e.value}function tH(e,t){if(j.isValidElement(e))return j.cloneElement(e,t);if(typeof e=="function")return j.createElement(e,t);t.ref;var r=J9(t,H9);return j.createElement(C0,r)}var y1=1,wo=function(e){function t(){var r;K9(this,t);for(var n=arguments.length,i=new Array(n),a=0;ay1||Math.abs(i.height-this.lastBoundingBox.height)>y1)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?fn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,f=i.chartHeight,c,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();c={left:((u||0)-h.width)/2}}else c=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var p=this.getBBoxSnapshot();d={top:((f||0)-p.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return fn(fn({},c),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,c=fn(fn({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return j.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(h){n.wrapperNode=h}},tH(a,fn(fn({},this.props),{},{payload:ak(f,u,eH)})))}}],[{key:"getWithHeight",value:function(n,i){var a=fn(fn({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&K(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(k.PureComponent);_h(wo,"displayName","Legend");_h(wo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var v1=qu,rH=N0,nH=Jt,g1=v1?v1.isConcatSpreadable:void 0;function iH(e){return nH(e)||rH(e)||!!(g1&&e&&e[g1])}var aH=iH,oH=qE,sH=aH;function lk(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=sH),i||(i=[]);++a0&&r(s)?t>1?lk(s,t-1,r,n,i):oH(i,s):n||(i[i.length]=s)}return i}var uk=lk;function lH(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var uH=lH,cH=uH,fH=cH(),dH=fH,hH=dH,pH=Oh;function mH(e,t){return e&&hH(e,t,pH)}var ck=mH,yH=Gu;function vH(e,t){return function(r,n){if(r==null)return r;if(!yH(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var CH=TH,zp=w0,$H=S0,NH=un,MH=fk,IH=AH,RH=QE,DH=CH,LH=Rs,zH=Jt;function BH(e,t,r){t.length?t=zp(t,function(a){return zH(a)?function(o){return $H(o,a.length===1?a[0]:a)}:a}):t=[LH];var n=-1;t=zp(t,RH(NH));var i=MH(e,function(a,o,s){var l=zp(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return IH(i,function(a,o){return DH(a,o,r)})}var FH=BH;function UH(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var WH=UH,HH=WH,x1=Math.max;function KH(e,t,r){return t=x1(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=x1(n.length-t,0),o=Array(a);++i0){if(++t>=t7)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var a7=i7,o7=e7,s7=a7,l7=s7(o7),u7=l7,c7=Rs,f7=VH,d7=u7;function h7(e,t){return d7(f7(e,t,c7),e+"")}var p7=h7,m7=v0,y7=Gu,v7=M0,g7=$i;function b7(e,t,r){if(!g7(r))return!1;var n=typeof t;return(n=="number"?y7(r)&&v7(t,r.length):n=="string"&&t in r)?m7(r[t],e):!1}var Ph=b7,x7=uk,w7=FH,S7=p7,S1=Ph,O7=S7(function(e,t){if(e==null)return[];var r=t.length;return r>1&&S1(e,t[0],t[1])?t=[]:r>2&&S1(t[0],t[1],t[2])&&(t=[t[0]]),w7(e,x7(t,1),[])}),_7=O7;const L0=Pe(_7);function Jl(e){"@babel/helpers - typeof";return Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jl(e)}function Gy(){return Gy=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(Js,"-left"),K(r)&&t&&K(t.x)&&r=t.y),"".concat(Js,"-top"),K(n)&&t&&K(t.y)&&ny?Math.max(f,l[n]):Math.max(c,l[n])}function z7(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function B7(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,c;return o.height>0&&o.width>0&&r?(f=P1({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),c=P1({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=z7({translateX:f,translateY:c,useTranslate3d:s})):u=D7,{cssProperties:u,cssClasses:L7({translateX:f,translateY:c,coordinate:r})}}function Xo(e){"@babel/helpers - typeof";return Xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(e)}function A1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function j1(e){for(var t=1;tE1||Math.abs(n.height-this.state.lastBoundingBox.height)>E1)&&this.setState({lastBoundingBox:{width:n.width,height:n.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(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,f=i.coordinate,c=i.hasPayload,d=i.isAnimationActive,h=i.offset,p=i.position,y=i.reverseDirection,m=i.useTranslate3d,v=i.viewBox,b=i.wrapperStyle,x=B7({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:p,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:v}),S=x.cssClasses,w=x.cssProperties,O=j1(j1({transition:d&&a?"transform ".concat(s,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&c?"visible":"hidden",position:"absolute",top:0,left:0},b);return j.createElement("div",{tabIndex:-1,className:S,style:O,ref:function(P){n.wrapperNode=P}},u)}}])}(k.PureComponent),Q7=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},za={isSsr:Q7()};function Qo(e){"@babel/helpers - typeof";return Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(e)}function k1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function T1(e){for(var t=1;t0;return j.createElement(X7,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:a,coordinate:f,hasPayload:O,offset:h,position:m,reverseDirection:v,useTranslate3d:b,viewBox:x,wrapperStyle:S},oK(u,T1(T1({},this.props),{},{payload:w})))}}])}(k.PureComponent);z0(rr,"displayName","Tooltip");z0(rr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!za.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 sK=ln,lK=function(){return sK.Date.now()},uK=lK,cK=/\s/;function fK(e){for(var t=e.length;t--&&cK.test(e.charAt(t)););return t}var dK=fK,hK=dK,pK=/^\s+/;function mK(e){return e&&e.slice(0,hK(e)+1).replace(pK,"")}var yK=mK,vK=yK,C1=$i,gK=js,$1=NaN,bK=/^[-+]0x[0-9a-f]+$/i,xK=/^0b[01]+$/i,wK=/^0o[0-7]+$/i,SK=parseInt;function OK(e){if(typeof e=="number")return e;if(gK(e))return $1;if(C1(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=C1(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=vK(e);var r=xK.test(e);return r||wK.test(e)?SK(e.slice(2),r?2:8):bK.test(e)?$1:+e}var vk=OK,_K=$i,Fp=uK,N1=vk,PK="Expected a function",AK=Math.max,jK=Math.min;function EK(e,t,r){var n,i,a,o,s,l,u=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(PK);t=N1(t)||0,_K(r)&&(f=!!r.leading,c="maxWait"in r,a=c?AK(N1(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d);function h(O){var _=n,P=i;return n=i=void 0,u=O,o=e.apply(P,_),o}function p(O){return u=O,s=setTimeout(v,t),f?h(O):o}function y(O){var _=O-l,P=O-u,A=t-_;return c?jK(A,a-P):A}function m(O){var _=O-l,P=O-u;return l===void 0||_>=t||_<0||c&&P>=a}function v(){var O=Fp();if(m(O))return b(O);s=setTimeout(v,y(O))}function b(O){return s=void 0,d&&n?h(O):(n=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function S(){return s===void 0?o:b(Fp())}function w(){var O=Fp(),_=m(O);if(n=arguments,i=this,l=O,_){if(s===void 0)return p(l);if(c)return clearTimeout(s),s=setTimeout(v,t),h(l)}return s===void 0&&(s=setTimeout(v,t)),o}return w.cancel=x,w.flush=S,w}var kK=EK,TK=kK,CK=$i,$K="Expected a function";function NK(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError($K);return CK(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),TK(e,t,{leading:n,maxWait:t,trailing:i})}var MK=NK;const gk=Pe(MK);function eu(e){"@babel/helpers - typeof";return eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eu(e)}function M1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ac(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(L=gk(L,y,{trailing:!0,leading:!1}));var R=new ResizeObserver(L),I=w.current.getBoundingClientRect(),D=I.width,F=I.height;return N(D,F),R.observe(w.current),function(){R.disconnect()}},[N,y]);var $=k.useMemo(function(){var L=A.containerWidth,R=A.containerHeight;if(L<0||R<0)return null;Fr(Zi(o)||Zi(l),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,o,l),Fr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var I=Zi(o)?L:o,D=Zi(l)?R:l;r&&r>0&&(I?D=I/r:D&&(I=D*r),d&&D>d&&(D=d)),Fr(I>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the height and width.`,I,D,o,l,f,c,r);var F=!Array.isArray(h)&&An(h.type).endsWith("Chart");return j.Children.map(h,function(T){return j.isValidElement(T)?k.cloneElement(T,Ac({width:I,height:D},F?{style:Ac({height:"100%",width:"100%",maxHeight:D,maxWidth:I},T.props.style)}:{})):T})},[r,h,l,d,c,f,A,o]);return j.createElement("div",{id:m?"".concat(m):void 0,className:le("recharts-responsive-container",v),style:Ac(Ac({},S),{},{width:o,height:l,minWidth:f,minHeight:c,maxHeight:d}),ref:w},$)}),Ah=function(t){return null};Ah.displayName="Cell";function tu(e){"@babel/helpers - typeof";return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}function R1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jy(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||za.isSsr)return{width:0,height:0};var n=GK(r),i=JSON.stringify({text:t,copyStyle:n});if(qa.widthCache[i])return qa.widthCache[i];try{var a=document.getElementById(D1);a||(a=document.createElement("span"),a.setAttribute("id",D1),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Jy(Jy({},qK),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return qa.widthCache[i]=l,++qa.cacheCount>VK&&(qa.cacheCount=0,qa.widthCache={}),l}catch{return{width:0,height:0}}},XK=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ru(e){"@babel/helpers - typeof";return ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(e)}function Gf(e,t){return ZK(e)||JK(e,t)||YK(e,t)||QK()}function QK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YK(e,t){if(e){if(typeof e=="string")return L1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L1(e,t)}}function L1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function H1(e,t){return vV(e)||yV(e,t)||mV(e,t)||pV()}function pV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mV(e,t){if(e){if(typeof e=="string")return K1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return K1(e,t)}}function K1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(D,F){var T=F.word,B=F.width,U=D[D.length-1];if(U&&(i==null||a||U.width+B+nF.width?D:F})};if(!f)return h;for(var y="…",m=function(I){var D=c.slice(0,I),F=Sk({breakAll:u,style:l,children:D+y}).wordsWithComputedWidth,T=d(F),B=T.length>o||p(T).width>Number(i);return[B,T]},v=0,b=c.length-1,x=0,S;v<=b&&x<=c.length-1;){var w=Math.floor((v+b)/2),O=w-1,_=m(O),P=H1(_,2),A=P[0],C=P[1],N=m(w),$=H1(N,1),L=$[0];if(!A&&!L&&(v=w+1),A&&L&&(b=w-1),!A&&L){S=C;break}x++}return S||h},V1=function(t){var r=ce(t)?[]:t.toString().split(wk);return[{words:r}]},bV=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!za.isSsr){var l,u,f=Sk({breakAll:o,children:i,style:a});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;l=c,u=d}else return V1(i);return gV({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return V1(i)},q1="#808080",ka=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,h=d===void 0?"start":d,p=t.verticalAnchor,y=p===void 0?"end":p,m=t.fill,v=m===void 0?q1:m,b=W1(t,fV),x=k.useMemo(function(){return bV({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:c,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,c,b.style,b.width]),S=b.dx,w=b.dy,O=b.angle,_=b.className,P=b.breakAll,A=W1(b,dV);if(!ut(n)||!ut(a))return null;var C=n+(K(S)?S:0),N=a+(K(w)?w:0),$;switch(y){case"start":$=Up("calc(".concat(u,")"));break;case"middle":$=Up("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:$=Up("calc(".concat(x.length-1," * -").concat(s,")"));break}var L=[];if(c){var R=x[0].width,I=b.width;L.push("scale(".concat((K(I)?I/R:1)/R,")"))}return O&&L.push("rotate(".concat(O,", ").concat(C,", ").concat(N,")")),L.length&&(A.transform=L.join(" ")),j.createElement("text",Zy({},re(A,!0),{x:C,y:N,className:le("recharts-text",_),textAnchor:h,fill:v.includes("url")?q1:v}),x.map(function(D,F){var T=D.words.join(P?"":" ");return j.createElement("tspan",{x:C,dy:F===0?$:s,key:"".concat(T,"-").concat(F)},T)}))};function Oi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function xV(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function B0(e){let t,r,n;e.length!==2?(t=Oi,r=(s,l)=>Oi(e(s),l),n=(s,l)=>e(s)-l):(t=e===Oi||e===xV?e:wV,r=e,n=e);function i(s,l,u=0,f=s.length){if(u>>1;r(s[c],l)<0?u=c+1:f=c}while(u>>1;r(s[c],l)<=0?u=c+1:f=c}while(uu&&n(s[c-1],l)>-n(s[c],l)?c-1:c}return{left:i,center:o,right:a}}function wV(){return 0}function Ok(e){return e===null?NaN:+e}function*SV(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const OV=B0(Oi),Xu=OV.right;B0(Ok).center;class G1 extends Map{constructor(t,r=AV){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(X1(this,t))}has(t){return super.has(X1(this,t))}set(t,r){return super.set(_V(this,t),r)}delete(t){return super.delete(PV(this,t))}}function X1({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function _V({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function PV({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function AV(e){return e!==null&&typeof e=="object"?e.valueOf():e}function jV(e=Oi){if(e===Oi)return _k;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function _k(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const EV=Math.sqrt(50),kV=Math.sqrt(10),TV=Math.sqrt(2);function Xf(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=EV?10:a>=kV?5:a>=TV?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const n=t=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u=n)&&(r=n);return r}function Y1(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Pk(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?_k:jV(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,f=Math.log(l),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(l-c)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(t-u*c/l+d)),p=Math.min(n,Math.floor(t+(l-u)*c/l+d));Pk(e,t,h,p,i)}const a=e[t];let o=r,s=n;for(Zs(e,r,t),i(e[n],a)>0&&Zs(e,r,n);o0;)--s}i(e[r],a)===0?Zs(e,r,s):(++s,Zs(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Zs(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function CV(e,t,r){if(e=Float64Array.from(SV(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Y1(e);if(t>=1)return Q1(e);var n,i=(n-1)*t,a=Math.floor(i),o=Q1(Pk(e,a).subarray(0,a+1)),s=Y1(e.subarray(a+1));return o+(s-o)*(i-a)}}function $V(e,t,r=Ok){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function NV(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ec(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ec(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=IV.exec(e))?new Vt(t[1],t[2],t[3],1):(t=RV.exec(e))?new Vt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=DV.exec(e))?Ec(t[1],t[2],t[3],t[4]):(t=LV.exec(e))?Ec(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zV.exec(e))?iS(t[1],t[2]/100,t[3]/100,1):(t=BV.exec(e))?iS(t[1],t[2]/100,t[3]/100,t[4]):J1.hasOwnProperty(e)?tS(J1[e]):e==="transparent"?new Vt(NaN,NaN,NaN,0):null}function tS(e){return new Vt(e>>16&255,e>>8&255,e&255,1)}function Ec(e,t,r,n){return n<=0&&(e=t=r=NaN),new Vt(e,t,r,n)}function WV(e){return e instanceof Qu||(e=ou(e)),e?(e=e.rgb(),new Vt(e.r,e.g,e.b,e.opacity)):new Vt}function iv(e,t,r,n){return arguments.length===1?WV(e):new Vt(e,t,r,n??1)}function Vt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}U0(Vt,iv,jk(Qu,{brighter(e){return e=e==null?Qf:Math.pow(Qf,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?iu:Math.pow(iu,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vt(va(this.r),va(this.g),va(this.b),Yf(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:rS,formatHex:rS,formatHex8:HV,formatRgb:nS,toString:nS}));function rS(){return`#${ea(this.r)}${ea(this.g)}${ea(this.b)}`}function HV(){return`#${ea(this.r)}${ea(this.g)}${ea(this.b)}${ea((isNaN(this.opacity)?1:this.opacity)*255)}`}function nS(){const e=Yf(this.opacity);return`${e===1?"rgb(":"rgba("}${va(this.r)}, ${va(this.g)}, ${va(this.b)}${e===1?")":`, ${e})`}`}function Yf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function va(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ea(e){return e=va(e),(e<16?"0":"")+e.toString(16)}function iS(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Lr(e,t,r,n)}function Ek(e){if(e instanceof Lr)return new Lr(e.h,e.s,e.l,e.opacity);if(e instanceof Qu||(e=ou(e)),!e)return new Lr;if(e instanceof Lr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new Lr(o,s,l,e.opacity)}function KV(e,t,r,n){return arguments.length===1?Ek(e):new Lr(e,t,r,n??1)}function Lr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}U0(Lr,KV,jk(Qu,{brighter(e){return e=e==null?Qf:Math.pow(Qf,e),new Lr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?iu:Math.pow(iu,e),new Lr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Vt(Wp(e>=240?e-240:e+120,i,n),Wp(e,i,n),Wp(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Lr(aS(this.h),kc(this.s),kc(this.l),Yf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Yf(this.opacity);return`${e===1?"hsl(":"hsla("}${aS(this.h)}, ${kc(this.s)*100}%, ${kc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function aS(e){return e=(e||0)%360,e<0?e+360:e}function kc(e){return Math.max(0,Math.min(1,e||0))}function Wp(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const W0=e=>()=>e;function VV(e,t){return function(r){return e+r*t}}function qV(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function GV(e){return(e=+e)==1?kk:function(t,r){return r-t?qV(t,r,e):W0(isNaN(t)?r:t)}}function kk(e,t){var r=t-e;return r?VV(e,r):W0(isNaN(e)?t:e)}const oS=function e(t){var r=GV(t);function n(i,a){var o=r((i=iv(i)).r,(a=iv(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=kk(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return n.gamma=e,n}(1);function XV(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Jf(n,i)})),r=Hp.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function oq(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?sq:oq,l=u=null,c}function c(d){return d==null||isNaN(d=+d)?a:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return c.invert=function(d){return o(i((u||(u=s(t,e.map(n),Jf)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,Zf),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),r=H0,f()},c.clamp=function(d){return arguments.length?(o=d?!0:Rt,f()):o!==Rt},c.interpolate=function(d){return arguments.length?(r=d,f()):r},c.unknown=function(d){return arguments.length?(a=d,c):a},function(d,h){return n=d,i=h,f()}}function K0(){return jh()(Rt,Rt)}function lq(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ed(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Yo(e){return e=ed(Math.abs(e)),e?e[1]:NaN}function uq(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function cq(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var fq=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function su(e){if(!(t=fq.exec(e)))throw new Error("invalid format: "+e);var t;return new V0({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]})}su.prototype=V0.prototype;function V0(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+""}V0.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 dq(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var td;function hq(e,t){var r=ed(e,t);if(!r)return td=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(td=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+ed(e,Math.max(0,t+a-1))[0]}function lS(e,t){var r=ed(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const uS={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lq,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)=>lS(e*100,t),r:lS,s:hq,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function cS(e){return e}var fS=Array.prototype.map,dS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pq(e){var t=e.grouping===void 0||e.thousands===void 0?cS:uq(fS.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?cS:cq(fS.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(c,d){c=su(c);var h=c.fill,p=c.align,y=c.sign,m=c.symbol,v=c.zero,b=c.width,x=c.comma,S=c.precision,w=c.trim,O=c.type;O==="n"?(x=!0,O="g"):uS[O]||(S===void 0&&(S=12),w=!0,O="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var _=(d&&d.prefix!==void 0?d.prefix:"")+(m==="$"?r:m==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),P=(m==="$"?n:/[%p]/.test(O)?o:"")+(d&&d.suffix!==void 0?d.suffix:""),A=uS[O],C=/[defgprs%]/.test(O);S=S===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function N($){var L=_,R=P,I,D,F;if(O==="c")R=A($)+R,$="";else{$=+$;var T=$<0||1/$<0;if($=isNaN($)?l:A(Math.abs($),S),w&&($=dq($)),T&&+$==0&&y!=="+"&&(T=!1),L=(T?y==="("?y:s:y==="-"||y==="("?"":y)+L,R=(O==="s"&&!isNaN($)&&td!==void 0?dS[8+td/3]:"")+R+(T&&y==="("?")":""),C){for(I=-1,D=$.length;++IF||F>57){R=(F===46?i+$.slice(I+1):$.slice(I))+R,$=$.slice(0,I);break}}}x&&!v&&($=t($,1/0));var B=L.length+$.length+R.length,U=B>1)+L+$+R+U.slice(B);break;default:$=U+L+$+R;break}return a($)}return N.toString=function(){return c+""},N}function f(c,d){var h=Math.max(-8,Math.min(8,Math.floor(Yo(d)/3)))*3,p=Math.pow(10,-h),y=u((c=su(c),c.type="f",c),{suffix:dS[8+h/3]});return function(m){return y(p*m)}}return{format:u,formatPrefix:f}}var Tc,q0,Tk;mq({thousands:",",grouping:[3],currency:["$",""]});function mq(e){return Tc=pq(e),q0=Tc.format,Tk=Tc.formatPrefix,Tc}function yq(e){return Math.max(0,-Yo(Math.abs(e)))}function vq(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yo(t)/3)))*3-Yo(Math.abs(e)))}function gq(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Yo(t)-Yo(e))+1}function Ck(e,t,r,n){var i=rv(e,t,r),a;switch(n=su(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=vq(i,o))&&(n.precision=a),Tk(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=gq(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=yq(i))&&(n.precision=a-(n.type==="%")*2);break}}return q0(n)}function Ni(e){var t=e.domain;return e.ticks=function(r){var n=t();return ev(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return Ck(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,f=10;for(s0;){if(u=tv(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function rd(){var e=K0();return e.copy=function(){return Yu(e,rd())},Er.apply(e,arguments),Ni(e)}function $k(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Zf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return $k(e).unknown(t)},e=arguments.length?Array.from(e,Zf):[0,1],Ni(r)}function Nk(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function Oq(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 mS(e){return(t,r)=>-e(-t,r)}function G0(e){const t=e(hS,pS),r=t.domain;let n=10,i,a;function o(){return i=Oq(n),a=Sq(n),r()[0]<0?(i=mS(i),a=mS(a),e(bq,xq)):e(hS,pS),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],f=l[l.length-1];const c=f0){for(;d<=h;++d)for(p=1;pf)break;v.push(y)}}else for(;d<=h;++d)for(p=n-1;p>=1;--p)if(y=d>0?p/a(-d):p*a(d),!(yf)break;v.push(y)}v.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=su(l)).precision==null&&(l.trim=!0),l=q0(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return f=>{let c=f/a(Math.round(i(f)));return c*nr(Nk(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function Mk(){const e=G0(jh()).domain([1,10]);return e.copy=()=>Yu(e,Mk()).base(e.base()),Er.apply(e,arguments),e}function yS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function vS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function X0(e){var t=1,r=e(yS(t),vS(t));return r.constant=function(n){return arguments.length?e(yS(t=+n),vS(t)):t},Ni(r)}function Ik(){var e=X0(jh());return e.copy=function(){return Yu(e,Ik()).constant(e.constant())},Er.apply(e,arguments)}function gS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function _q(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Pq(e){return e<0?-e*e:e*e}function Q0(e){var t=e(Rt,Rt),r=1;function n(){return r===1?e(Rt,Rt):r===.5?e(_q,Pq):e(gS(r),gS(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Ni(t)}function Y0(){var e=Q0(jh());return e.copy=function(){return Yu(e,Y0()).exponent(e.exponent())},Er.apply(e,arguments),e}function Aq(){return Y0.apply(null,arguments).exponent(.5)}function bS(e){return Math.sign(e)*e*e}function jq(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Rk(){var e=K0(),t=[0,1],r=!1,n;function i(a){var o=jq(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(bS(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Zf)).map(bS)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Rk(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Er.apply(i,arguments),Ni(i)}function Dk(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return Lk().domain([e,t]).range(i).unknown(a)},Er.apply(Ni(o),arguments)}function zk(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Xu(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return zk().domain(e).range(t).unknown(r)},Er.apply(i,arguments)}const Kp=new Date,Vp=new Date;function ct(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(uct(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(Kp.setTime(+a),Vp.setTime(+o),e(Kp),e(Vp),Math.floor(r(Kp,Vp))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const nd=ct(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);nd.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ct(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):nd);nd.range;const Sn=1e3,xr=Sn*60,On=xr*60,Mn=On*24,J0=Mn*7,xS=Mn*30,qp=Mn*365,ta=ct(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Sn)},(e,t)=>(t-e)/Sn,e=>e.getUTCSeconds());ta.range;const Z0=ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Sn)},(e,t)=>{e.setTime(+e+t*xr)},(e,t)=>(t-e)/xr,e=>e.getMinutes());Z0.range;const eb=ct(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xr)},(e,t)=>(t-e)/xr,e=>e.getUTCMinutes());eb.range;const tb=ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Sn-e.getMinutes()*xr)},(e,t)=>{e.setTime(+e+t*On)},(e,t)=>(t-e)/On,e=>e.getHours());tb.range;const rb=ct(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*On)},(e,t)=>(t-e)/On,e=>e.getUTCHours());rb.range;const Ju=ct(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xr)/Mn,e=>e.getDate()-1);Ju.range;const Eh=ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Mn,e=>e.getUTCDate()-1);Eh.range;const Bk=ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Mn,e=>Math.floor(e/Mn));Bk.range;function Ba(e){return ct(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*xr)/J0)}const kh=Ba(0),id=Ba(1),Eq=Ba(2),kq=Ba(3),Jo=Ba(4),Tq=Ba(5),Cq=Ba(6);kh.range;id.range;Eq.range;kq.range;Jo.range;Tq.range;Cq.range;function Fa(e){return ct(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/J0)}const Th=Fa(0),ad=Fa(1),$q=Fa(2),Nq=Fa(3),Zo=Fa(4),Mq=Fa(5),Iq=Fa(6);Th.range;ad.range;$q.range;Nq.range;Zo.range;Mq.range;Iq.range;const nb=ct(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());nb.range;const ib=ct(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());ib.range;const In=ct(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());In.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ct(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});In.range;const Rn=ct(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());Rn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ct(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Rn.range;function Fk(e,t,r,n,i,a){const o=[[ta,1,Sn],[ta,5,5*Sn],[ta,15,15*Sn],[ta,30,30*Sn],[a,1,xr],[a,5,5*xr],[a,15,15*xr],[a,30,30*xr],[i,1,On],[i,3,3*On],[i,6,6*On],[i,12,12*On],[n,1,Mn],[n,2,2*Mn],[r,1,J0],[t,1,xS],[t,3,3*xS],[e,1,qp]];function s(u,f,c){const d=fm).right(o,d);if(h===o.length)return e.every(rv(u/qp,f/qp,c));if(h===0)return nd.every(Math.max(rv(u,f,c),1));const[p,y]=o[d/o[h-1][2]53)return null;"w"in W||(W.w=1),"Z"in W?(ye=Xp(el(W.y,0,1)),et=ye.getUTCDay(),ye=et>4||et===0?ad.ceil(ye):ad(ye),ye=Eh.offset(ye,(W.V-1)*7),W.y=ye.getUTCFullYear(),W.m=ye.getUTCMonth(),W.d=ye.getUTCDate()+(W.w+6)%7):(ye=Gp(el(W.y,0,1)),et=ye.getDay(),ye=et>4||et===0?id.ceil(ye):id(ye),ye=Ju.offset(ye,(W.V-1)*7),W.y=ye.getFullYear(),W.m=ye.getMonth(),W.d=ye.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),et="Z"in W?Xp(el(W.y,0,1)).getUTCDay():Gp(el(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(et+5)%7:W.w+W.U*7-(et+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,Xp(W)):Gp(W)}}function P(G,se,ue,W){for(var He=0,ye=se.length,et=ue.length,tt,Bt;He=et)return-1;if(tt=se.charCodeAt(He++),tt===37){if(tt=se.charAt(He++),Bt=w[tt in wS?se.charAt(He++):tt],!Bt||(W=Bt(G,ue,W))<0)return-1}else if(tt!=ue.charCodeAt(W++))return-1}return W}function A(G,se,ue){var W=u.exec(se.slice(ue));return W?(G.p=f.get(W[0].toLowerCase()),ue+W[0].length):-1}function C(G,se,ue){var W=h.exec(se.slice(ue));return W?(G.w=p.get(W[0].toLowerCase()),ue+W[0].length):-1}function N(G,se,ue){var W=c.exec(se.slice(ue));return W?(G.w=d.get(W[0].toLowerCase()),ue+W[0].length):-1}function $(G,se,ue){var W=v.exec(se.slice(ue));return W?(G.m=b.get(W[0].toLowerCase()),ue+W[0].length):-1}function L(G,se,ue){var W=y.exec(se.slice(ue));return W?(G.m=m.get(W[0].toLowerCase()),ue+W[0].length):-1}function R(G,se,ue){return P(G,t,se,ue)}function I(G,se,ue){return P(G,r,se,ue)}function D(G,se,ue){return P(G,n,se,ue)}function F(G){return o[G.getDay()]}function T(G){return a[G.getDay()]}function B(G){return l[G.getMonth()]}function U(G){return s[G.getMonth()]}function q(G){return i[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function X(G){return o[G.getUTCDay()]}function ne(G){return a[G.getUTCDay()]}function ge(G){return l[G.getUTCMonth()]}function Le(G){return s[G.getUTCMonth()]}function xe(G){return i[+(G.getUTCHours()>=12)]}function vt(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var se=O(G+="",x);return se.toString=function(){return G},se},parse:function(G){var se=_(G+="",!1);return se.toString=function(){return G},se},utcFormat:function(G){var se=O(G+="",S);return se.toString=function(){return G},se},utcParse:function(G){var se=_(G+="",!0);return se.toString=function(){return G},se}}}var wS={"-":"",_:" ",0:"0"},yt=/^\s*\d+/,Fq=/^%/,Uq=/[\\^$*+?|[\]().{}]/g;function be(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function Hq(e,t,r){var n=yt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Kq(e,t,r){var n=yt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Vq(e,t,r){var n=yt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function qq(e,t,r){var n=yt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Gq(e,t,r){var n=yt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function SS(e,t,r){var n=yt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function OS(e,t,r){var n=yt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Xq(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Qq(e,t,r){var n=yt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Yq(e,t,r){var n=yt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function _S(e,t,r){var n=yt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Jq(e,t,r){var n=yt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function PS(e,t,r){var n=yt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Zq(e,t,r){var n=yt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function eG(e,t,r){var n=yt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function tG(e,t,r){var n=yt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function rG(e,t,r){var n=yt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function nG(e,t,r){var n=Fq.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function iG(e,t,r){var n=yt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function aG(e,t,r){var n=yt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function AS(e,t){return be(e.getDate(),t,2)}function oG(e,t){return be(e.getHours(),t,2)}function sG(e,t){return be(e.getHours()%12||12,t,2)}function lG(e,t){return be(1+Ju.count(In(e),e),t,3)}function Uk(e,t){return be(e.getMilliseconds(),t,3)}function uG(e,t){return Uk(e,t)+"000"}function cG(e,t){return be(e.getMonth()+1,t,2)}function fG(e,t){return be(e.getMinutes(),t,2)}function dG(e,t){return be(e.getSeconds(),t,2)}function hG(e){var t=e.getDay();return t===0?7:t}function pG(e,t){return be(kh.count(In(e)-1,e),t,2)}function Wk(e){var t=e.getDay();return t>=4||t===0?Jo(e):Jo.ceil(e)}function mG(e,t){return e=Wk(e),be(Jo.count(In(e),e)+(In(e).getDay()===4),t,2)}function yG(e){return e.getDay()}function vG(e,t){return be(id.count(In(e)-1,e),t,2)}function gG(e,t){return be(e.getFullYear()%100,t,2)}function bG(e,t){return e=Wk(e),be(e.getFullYear()%100,t,2)}function xG(e,t){return be(e.getFullYear()%1e4,t,4)}function wG(e,t){var r=e.getDay();return e=r>=4||r===0?Jo(e):Jo.ceil(e),be(e.getFullYear()%1e4,t,4)}function SG(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function jS(e,t){return be(e.getUTCDate(),t,2)}function OG(e,t){return be(e.getUTCHours(),t,2)}function _G(e,t){return be(e.getUTCHours()%12||12,t,2)}function PG(e,t){return be(1+Eh.count(Rn(e),e),t,3)}function Hk(e,t){return be(e.getUTCMilliseconds(),t,3)}function AG(e,t){return Hk(e,t)+"000"}function jG(e,t){return be(e.getUTCMonth()+1,t,2)}function EG(e,t){return be(e.getUTCMinutes(),t,2)}function kG(e,t){return be(e.getUTCSeconds(),t,2)}function TG(e){var t=e.getUTCDay();return t===0?7:t}function CG(e,t){return be(Th.count(Rn(e)-1,e),t,2)}function Kk(e){var t=e.getUTCDay();return t>=4||t===0?Zo(e):Zo.ceil(e)}function $G(e,t){return e=Kk(e),be(Zo.count(Rn(e),e)+(Rn(e).getUTCDay()===4),t,2)}function NG(e){return e.getUTCDay()}function MG(e,t){return be(ad.count(Rn(e)-1,e),t,2)}function IG(e,t){return be(e.getUTCFullYear()%100,t,2)}function RG(e,t){return e=Kk(e),be(e.getUTCFullYear()%100,t,2)}function DG(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function LG(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Zo(e):Zo.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function zG(){return"+0000"}function ES(){return"%"}function kS(e){return+e}function TS(e){return Math.floor(+e/1e3)}var Ga,Vk,qk;BG({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 BG(e){return Ga=Bq(e),Vk=Ga.format,Ga.parse,qk=Ga.utcFormat,Ga.utcParse,Ga}function FG(e){return new Date(e)}function UG(e){return e instanceof Date?+e:+new Date(+e)}function ab(e,t,r,n,i,a,o,s,l,u){var f=K0(),c=f.invert,d=f.domain,h=u(".%L"),p=u(":%S"),y=u("%I:%M"),m=u("%I %p"),v=u("%a %d"),b=u("%b %d"),x=u("%B"),S=u("%Y");function w(O){return(l(O)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>CV(e,a/n))},r.copy=function(){return Yk(t).domain(e)},Bn.apply(r,arguments)}function $h(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=Rt,f,c=!1,d;function h(y){return isNaN(y=+y)?d:(y=.5+((y=+f(y))-a)*(n*yt}var tT=XG,QG=Nh,YG=tT,JG=Rs;function ZG(e){return e&&e.length?QG(e,JG,YG):void 0}var eX=ZG;const fi=Pe(eX);function tX(e,t){return ee.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};J.decimalPlaces=J.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Re;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};J.dividedBy=J.div=function(e){return jn(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,r=t.constructor;return ke(jn(t,new r(e),0,1),r.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return Ze(this)};J.greaterThan=J.gt=function(e){return this.cmp(e)>0};J.greaterThanOrEqualTo=J.gte=function(e){return this.cmp(e)>=0};J.isInteger=J.isint=function(){return this.e>this.d.length-2};J.isNegative=J.isneg=function(){return this.s<0};J.isPositive=J.ispos=function(){return this.s>0};J.isZero=function(){return this.s===0};J.lessThan=J.lt=function(e){return this.cmp(e)<0};J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1};J.logarithm=J.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(nr))throw Error(Ar+"NaN");if(r.s<1)throw Error(Ar+(r.s?"NaN":"-Infinity"));return r.eq(nr)?new n(0):(Be=!1,t=jn(lu(r,a),lu(e,a),a),Be=!0,ke(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?oT(t,e):iT(t,(e.s=-e.s,e))};J.modulo=J.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Ar+"NaN");return r.s?(Be=!1,t=jn(r,e,0,1).times(e),Be=!0,r.minus(t)):ke(new n(r),i)};J.naturalExponential=J.exp=function(){return aT(this)};J.naturalLogarithm=J.ln=function(){return lu(this)};J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};J.plus=J.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?iT(t,e):oT(t,(e.s=-e.s,e))};J.precision=J.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ga+e);if(t=Ze(i)+1,n=i.d.length-1,r=n*Re+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};J.squareRoot=J.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ar+"NaN")}for(e=Ze(s),Be=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Jr(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=zs((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(jn(s,a,o+2)).times(.5),Jr(a.d).slice(0,o)===(t=Jr(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(ke(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Be=!0,ke(n,r)};J.times=J.mul=function(e){var t,r,n,i,a,o,s,l,u,f=this,c=f.constructor,d=f.d,h=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,r=f.e+e.e,l=d.length,u=h.length,l=0;){for(t=0,i=l+n;i>n;)s=a[i]+h[n]*d[i-n-1]+t,a[i--]=s%dt|0,t=s/dt|0;a[i]=(a[i]+t)%dt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Be?ke(e,c.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(an(e,0,Ls),t===void 0?t=n.rounding:an(t,0,8),ke(r,e+Ze(r)+1,t))};J.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ta(n,!0):(an(e,0,Ls),t===void 0?t=i.rounding:an(t,0,8),n=ke(new i(n),e+1,t),r=Ta(n,!0,e+1)),r};J.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ta(i):(an(e,0,Ls),t===void 0?t=a.rounding:an(t,0,8),n=ke(new a(i),e+Ze(i)+1,t),r=Ta(n.abs(),!1,e+Ze(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return ke(new t(e),Ze(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l(nr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ar+"Infinity");return s}if(s.eq(nr))return s;if(n=l.precision,e.eq(nr))return ke(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=f<0?-f:f)<=nT){for(i=new l(nr),t=Math.ceil(n/Re+4),Be=!1;r%2&&(i=i.times(s),NS(i.d,t)),r=zs(r/2),r!==0;)s=s.times(s),NS(s.d,t);return Be=!0,e.s<0?new l(nr).div(i):ke(i,n)}}else if(a<0)throw Error(Ar+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Be=!1,i=e.times(lu(s,n+u)),Be=!0,i=aT(i),i.s=a,i};J.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Ze(i),n=Ta(i,r<=a.toExpNeg||r>=a.toExpPos)):(an(e,1,Ls),t===void 0?t=a.rounding:an(t,0,8),i=ke(new a(i),e,t),r=Ze(i),n=Ta(i,e<=r||r<=a.toExpNeg,e)),n};J.toSignificantDigits=J.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(an(e,1,Ls),t===void 0?t=n.rounding:an(t,0,8)),ke(new n(r),e,t)};J.toString=J.valueOf=J.val=J.toJSON=J[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ze(e),r=e.constructor;return Ta(e,t<=r.toExpNeg||t>=r.toExpPos)};function iT(e,t){var r,n,i,a,o,s,l,u,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Be?ke(t,c):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(c/Re),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/dt|0,l[a]%=dt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Be?ke(t,c):t}function an(e,t,r){if(e!==~~e||er)throw Error(ga+e)}function Jr(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]1;)n.shift()}return function(n,i,a,o){var s,l,u,f,c,d,h,p,y,m,v,b,x,S,w,O,_,P,A=n.constructor,C=n.s==i.s?1:-1,N=n.d,$=i.d;if(!n.s)return new A(n);if(!i.s)throw Error(Ar+"Division by zero");for(l=n.e-i.e,_=$.length,w=N.length,h=new A(C),p=h.d=[],u=0;$[u]==(N[u]||0);)++u;if($[u]>(N[u]||0)&&--l,a==null?b=a=A.precision:o?b=a+(Ze(n)-Ze(i))+1:b=a,b<0)return new A(0);if(b=b/Re+2|0,u=0,_==1)for(f=0,$=$[0],b++;(u1&&($=e($,f),N=e(N,f),_=$.length,w=N.length),S=_,y=N.slice(0,_),m=y.length;m<_;)y[m++]=0;P=$.slice(),P.unshift(0),O=$[0],$[1]>=dt/2&&++O;do f=0,s=t($,y,_,m),s<0?(v=y[0],_!=m&&(v=v*dt+(y[1]||0)),f=v/O|0,f>1?(f>=dt&&(f=dt-1),c=e($,f),d=c.length,m=y.length,s=t(c,y,d,m),s==1&&(f--,r(c,_16)throw Error(lb+Ze(e));if(!e.s)return new f(nr);for(Be=!1,s=c,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Vi(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new f(nr),f.precision=s;;){if(i=ke(i.times(e),s),r=r.times(++l),o=a.plus(jn(i,r,s)),Jr(o.d).slice(0,s)===Jr(a.d).slice(0,s)){for(;u--;)a=ke(a.times(a),s);return f.precision=c,t==null?(Be=!0,ke(a,c)):a}a=o}}function Ze(e){for(var t=e.e*Re,r=e.d[0];r>=10;r/=10)t++;return t}function Qp(e,t,r){if(t>e.LN10.sd())throw Be=!0,r&&(e.precision=r),Error(Ar+"LN10 precision limit exceeded");return ke(new e(e.LN10),t)}function Xn(e){for(var t="";e--;)t+="0";return t}function lu(e,t){var r,n,i,a,o,s,l,u,f,c=1,d=10,h=e,p=h.d,y=h.constructor,m=y.precision;if(h.s<1)throw Error(Ar+(h.s?"NaN":"-Infinity"));if(h.eq(nr))return new y(0);if(t==null?(Be=!1,u=m):u=t,h.eq(10))return t==null&&(Be=!0),Qp(y,u);if(u+=d,y.precision=u,r=Jr(p),n=r.charAt(0),a=Ze(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Jr(h.d),n=r.charAt(0),c++;a=Ze(h),n>1?(h=new y("0."+r),a++):h=new y(n+"."+r.slice(1))}else return l=Qp(y,u+2,m).times(a+""),h=lu(new y(n+"."+r.slice(1)),u-d).plus(l),y.precision=m,t==null?(Be=!0,ke(h,m)):h;for(s=o=h=jn(h.minus(nr),h.plus(nr),u),f=ke(h.times(h),u),i=3;;){if(o=ke(o.times(f),u),l=s.plus(jn(o,new y(i),u)),Jr(l.d).slice(0,u)===Jr(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(Qp(y,u+2,m).times(a+""))),s=jn(s,new y(c),u),y.precision=m,t==null?(Be=!0,ke(s,m)):s;s=l,i+=2}}function $S(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=zs(r/Re),e.d=[],n=(r+1)%Re,r<0&&(n+=Re),nod||e.e<-od))throw Error(lb+r)}else e.s=0,e.e=0,e.d=[0];return e}function ke(e,t,r){var n,i,a,o,s,l,u,f,c=e.d;for(o=1,a=c[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Re,i=t,u=c[f=0];else{if(f=Math.ceil((n+1)/Re),a=c.length,f>=a)return e;for(u=a=c[f],o=1;a>=10;a/=10)o++;n%=Re,i=n-Re+o}if(r!==void 0&&(a=Vi(10,o-i-1),s=u/a%10|0,l=t<0||c[f+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/Vi(10,o-i):0:c[f-1])%10&1||r==(e.s<0?8:7))),t<1||!c[0])return l?(a=Ze(e),c.length=1,t=t-a-1,c[0]=Vi(10,(Re-t%Re)%Re),e.e=zs(-t/Re)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(n==0?(c.length=f,a=1,f--):(c.length=f+1,a=Vi(10,Re-n),c[f]=i>0?(u/Vi(10,o-i)%Vi(10,i)|0)*a:0),l)for(;;)if(f==0){(c[0]+=a)==dt&&(c[0]=1,++e.e);break}else{if(c[f]+=a,c[f]!=dt)break;c[f--]=0,a=1}for(n=c.length;c[--n]===0;)c.pop();if(Be&&(e.e>od||e.e<-od))throw Error(lb+Ze(e));return e}function oT(e,t){var r,n,i,a,o,s,l,u,f,c,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Be?ke(t,h):t;if(l=e.d,c=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(f=o<0,f?(r=l,o=-o,s=c.length):(r=c,n=u,s=l.length),i=Math.max(Math.ceil(h/Re),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=c.length,f=i0;--i)l[s++]=0;for(i=c.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+Xn(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Xn(-i-1)+a,r&&(n=r-o)>0&&(a+=Xn(n))):i>=o?(a+=Xn(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Xn(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=Xn(n))),e.s<0?"-"+a:a}function NS(e,t){if(e.length>t)return e.length=t,!0}function sT(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(ga+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return $S(o,a.toString())}else if(typeof a!="string")throw Error(ga+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,SX.test(a))$S(o,a);else throw Error(ga+a)}if(i.prototype=J,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=sT,i.config=i.set=OX,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(ga+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ga+r+": "+n);return this}var ub=sT(wX);nr=new ub(1);const je=ub;function _X(e){return EX(e)||jX(e)||AX(e)||PX()}function PX(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AX(e,t){if(e){if(typeof e=="string")return sv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sv(e,t)}}function jX(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function EX(e){if(Array.isArray(e))return sv(e)}function sv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-o,MS(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function WX(e){if(Array.isArray(e))return e}function dT(e){var t=uu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function hT(e,t,r){if(e.lte(0))return new je(0);var n=Rh.getDigitCount(e.toNumber()),i=new je(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new je(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new je(Math.ceil(l))}function HX(e,t,r){var n=1,i=new je(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new je(10).pow(Rh.getDigitCount(e)-1),i=new je(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new je(Math.floor(e)))}else e===0?i=new je(Math.floor((t-1)/2)):r||(i=new je(Math.floor(e)));var o=Math.floor((t-1)/2),s=$X(CX(function(l){return i.add(new je(l-o).mul(n)).toNumber()}),lv);return s(0,t)}function pT(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new je(0),tickMin:new je(0),tickMax:new je(0)};var a=hT(new je(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new je(0):(o=new je(e).add(t).div(2),o=o.sub(new je(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new je(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?pT(e,t,r,n,i+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new je(s).mul(a)),tickMax:o.add(new je(l).mul(a))})}function KX(e){var t=uu(e,2),r=t[0],n=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=dT([r,n]),l=uu(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var c=f===1/0?[u].concat(cv(lv(0,i-1).map(function(){return 1/0}))):[].concat(cv(lv(0,i-1).map(function(){return-1/0})),[f]);return r>n?uv(c):c}if(u===f)return HX(u,i,a);var d=pT(u,f,o,a),h=d.step,p=d.tickMin,y=d.tickMax,m=Rh.rangeStep(p,y.add(new je(.1).mul(h)),h);return r>n?uv(m):m}function VX(e,t){var r=uu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=dT([n,i]),s=uu(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var f=Math.max(t,2),c=hT(new je(u).sub(l).div(f-1),a,0),d=[].concat(cv(Rh.rangeStep(new je(l),new je(u).sub(new je(.99).mul(c)),c)),[u]);return n>i?uv(d):d}var qX=cT(KX),GX=cT(VX),XX="Invariant failed";function Ca(e,t){throw new Error(XX)}var QX=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ts(e){"@babel/helpers - typeof";return ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ts(e)}function sd(){return sd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function iQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aQ(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,c=i[u].coordinate,d=u>=s-1?i[0].coordinate:i[u+1].coordinate,h=void 0;if(Mt(c-f)!==Mt(d-c)){var p=[];if(Mt(d-c)===Mt(l[1]-l[0])){h=d;var y=c+l[1]-l[0];p[0]=Math.min(y,(y+f)/2),p[1]=Math.max(y,(y+f)/2)}else{h=f;var m=d+l[1]-l[0];p[0]=Math.min(c,(m+c)/2),p[1]=Math.max(c,(m+c)/2)}var v=[Math.min(c,(h+c)/2),Math.max(c,(h+c)/2)];if(t>v[0]&&t<=v[1]||t>=p[0]&&t<=p[1]){o=i[u].index;break}}else{var b=Math.min(f,d),x=Math.max(f,d);if(t>(b+c)/2&&t<=(x+c)/2){o=i[u].index;break}}}else for(var S=0;S0&&S(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},cb=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?qe(qe({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},SQ=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l=0});if(v&&v.length){var b=v[0].type.defaultProps,x=b!==void 0?qe(qe({},b),v[0].props):v[0].props,S=x.barSize,w=x[m];o[w]||(o[w]=[]);var O=ce(S)?r:S;o[w].push({item:v[0],stackList:v.slice(1),barSize:ce(O)?void 0:It(O,n,0)})}}return o},OQ=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=It(r,i,0,!0),f,c=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/l,p=o.reduce(function(S,w){return S+w.barSize||0},0);p+=(l-1)*u,p>=i&&(p-=(l-1)*u,u=0),p>=i&&h>0&&(d=!0,h*=.9,p=l*h);var y=(i-p)/2>>0,m={offset:y-u,size:0};f=o.reduce(function(S,w){var O={item:w.item,position:{offset:m.offset+m.size+u,size:d?h:w.barSize}},_=[].concat(DS(S),[O]);return m=_[_.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(P){_.push({item:P,position:m})}),_},c)}else{var v=It(n,i,0,!0);i-2*v-(l-1)*u<=0&&(u=0);var b=(i-2*v-(l-1)*u)/l;b>1&&(b>>=0);var x=s===+s?Math.min(b,s):b;f=o.reduce(function(S,w,O){var _=[].concat(DS(S),[{item:w.item,position:{offset:v+(b+u)*O+(b-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(P){_.push({item:P,position:_[_.length-1].position})}),_},c)}return f},_Q=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=gT({children:a,legendWidth:l});if(u){var f=i||{},c=f.width,d=f.height,h=u.align,p=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&p==="middle")&&h!=="center"&&K(t[h]))return qe(qe({},t),{},Oo({},h,t[h]+(c||0)));if((y==="horizontal"||y==="vertical"&&h==="center")&&p!=="middle"&&K(t[p]))return qe(qe({},t),{},Oo({},p,t[p]+(d||0)))}return t},PQ=function(t,r,n){return ce(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},bT=function(t,r,n,i,a){var o=r.props.children,s=Sr(o,Dh).filter(function(u){return PQ(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var c=st(f,n);if(ce(c))return u;var d=Array.isArray(c)?[Mh(c),fi(c)]:[c,c],h=l.reduce(function(p,y){var m=st(f,y,0),v=d[0]-Math.abs(Array.isArray(m)?m[0]:m),b=d[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(v,p[0]),Math.max(b,p[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},AQ=function(t,r,n,i,a){var o=r.map(function(s){return bT(t,s,n,a,i)}).filter(function(s){return!ce(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},xT=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&bT(t,l,u,i)||_l(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var f=0,c=u.length;f=2?Mt(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=a?a.indexOf(c):c;return{coordinate:i(d)+u,value:c,offset:u}});return f.filter(function(c){return!$s(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:i(c)+u,value:c,index:d,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(c){return{coordinate:i(c)+u,value:c,offset:u}}):i.domain().map(function(c,d){return{coordinate:i(c)+u,value:a?a[c]:c,index:d,offset:u}})},Yp=new WeakMap,Cc=function(t,r){if(typeof r!="function")return t;Yp.has(t)||Yp.set(t,new WeakMap);var n=Yp.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},OT=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:nu(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:rd(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ol(),realScaleType:"point"}:a==="category"?{scale:nu(),realScaleType:"band"}:{scale:rd(),realScaleType:"linear"};if(ja(i)){var l="scale".concat(bh(i));return{scale:(CS[l]||Ol)(),realScaleType:CS[l]?l:"point"}}return ae(i)?{scale:i}:{scale:Ol(),realScaleType:"point"}},zS=1e-4,_T=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-zS,o=Math.max(i[0],i[1])+zS,s=t(r[0]),l=t(r[n-1]);(so||lo)&&t.domain([r[0],r[n-1]])}},jQ=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},TQ=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},CQ={sign:kQ,expand:QF,none:Vo,silhouette:YF,wiggle:JF,positive:TQ},$Q=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=CQ[n],o=XF().keys(i).value(function(s,l){return+st(s,l,0)}).order(Ly).offset(a);return o(t)},NQ=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(c,d){var h,p=(h=d.type)!==null&&h!==void 0&&h.defaultProps?qe(qe({},d.type.defaultProps),d.props):d.props,y=p.stackId,m=p.hide;if(m)return c;var v=p[n],b=c[v]||{hasStack:!1,stackGroups:{}};if(ut(y)){var x=b.stackGroups[y]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(d),b.hasStack=!0,b.stackGroups[y]=x}else b.stackGroups[Ns("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return qe(qe({},c),{},Oo({},v,b))},l),f={};return Object.keys(u).reduce(function(c,d){var h=u[d];if(h.hasStack){var p={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(y,m){var v=h.stackGroups[m];return qe(qe({},y),{},Oo({},m,{numericAxisId:n,cateAxisId:i,items:v.items,stackedData:$Q(t,v.items,a)}))},p)}return qe(qe({},c),{},Oo({},d,h))},f)},PT=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=qX(u,a,s);return t.domain([Mh(f),fi(f)]),{niceTicks:f}}if(a&&i==="number"){var c=t.domain(),d=GX(c,a,s);return{niceTicks:d}}return null};function BS(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ce(i[t.dataKey])){var s=Mf(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=st(i,ce(o)?t.dataKey:o);return ce(l)?null:t.scale(l)}var FS=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=st(o,r.dataKey,r.domain[s]);return ce(l)?null:r.scale(l)-a/2+i},MQ=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},IQ=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?qe(qe({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(ut(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},RQ=function(t){return t.reduce(function(r,n){return[Mh(n.concat([r[0]]).filter(K)),fi(n.concat([r[1]]).filter(K))]},[1/0,-1/0])},AT=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,f){var c=RQ(f.slice(r,n+1));return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},US=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,WS=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,pv=function(t,r,n){if(ae(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(K(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(US.test(t[0])){var a=+US.exec(t[0])[1];i[0]=r[0]-a}else ae(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(K(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(WS.test(t[1])){var o=+WS.exec(t[1])[1];i[1]=r[1]+o}else ae(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},ud=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=L0(r,function(c){return c.coordinate}),o=1/0,s=1,l=a.length;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},KQ=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,f=It(t.cx,o,o/2),c=It(t.cy,s,s/2),d=kT(o,s,n),h=It(t.innerRadius,d,0),p=It(t.outerRadius,d,d*.8),y=Object.keys(r);return y.reduce(function(m,v){var b=r[v],x=b.domain,S=b.reversed,w;if(ce(b.range))i==="angleAxis"?w=[l,u]:i==="radiusAxis"&&(w=[h,p]),S&&(w=[w[1],w[0]]);else{w=b.range;var O=w,_=zQ(O,2);l=_[0],u=_[1]}var P=OT(b,a),A=P.realScaleType,C=P.scale;C.domain(x).range(w),_T(C);var N=PT(C,pn(pn({},b),{},{realScaleType:A})),$=pn(pn(pn({},b),N),{},{range:w,radius:p,realScaleType:A,scale:C,cx:f,cy:c,innerRadius:h,outerRadius:p,startAngle:l,endAngle:u});return pn(pn({},m),{},ET({},v,$))},{})},VQ=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},qQ=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=VQ({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:HQ(u),angleInRadian:u}},GQ=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},XQ=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},qS=function(t,r){var n=t.x,i=t.y,a=qQ({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(ou)return!1;if(o===0)return!0;var f=GQ(r),c=f.startAngle,d=f.endAngle,h=s,p;if(c<=d){for(;h>d;)h-=360;for(;h=c&&h<=d}else{for(;h>c;)h-=360;for(;h=d&&h<=c}return p?pn(pn({},r),{},{radius:o,angle:XQ(h,r)}):null},TT=function(t){return!k.isValidElement(t)&&!ae(t)&&typeof t!="boolean"?t.className:""};function hu(e){"@babel/helpers - typeof";return hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(e)}var QQ=["offset"];function YQ(e){return tY(e)||eY(e)||ZQ(e)||JQ()}function JQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZQ(e,t){if(e){if(typeof e=="string")return mv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mv(e,t)}}function eY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tY(e){if(Array.isArray(e))return mv(e)}function mv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nY(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function GS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function it(e){for(var t=1;t=0?1:-1,x,S;i==="insideStart"?(x=h+b*o,S=y):i==="insideEnd"?(x=p-b*o,S=!y):i==="end"&&(x=p+b*o,S=y),S=v<=0?S:!S;var w=Ne(u,f,m,x),O=Ne(u,f,m,x+(S?1:-1)*359),_="M".concat(w.x,",").concat(w.y,` A`).concat(m,",").concat(m,",0,1,").concat(S?0:1,`, `).concat(O.x,",").concat(O.y),P=ce(t.id)?Ns("recharts-radial-line-"):t.id;return j.createElement("text",pu({},n,{dominantBaseline:"central",className:le("recharts-radial-bar-label",s)}),j.createElement("defs",null,j.createElement("path",{id:P,d:_})),j.createElement("textPath",{xlinkHref:"#".concat(P)},r))},cY=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,f=a.startAngle,c=a.endAngle,d=(f+c)/2;if(i==="outside"){var h=Ne(o,s,u+n,d),p=h.x,y=h.y;return{x:p,y,textAnchor:p>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var m=(l+u)/2,v=Ne(o,s,m,d),b=v.x,x=v.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},fY=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,f=o.height,c=f>=0?1:-1,d=c*i,h=c>0?"end":"start",p=c>0?"start":"end",y=u>=0?1:-1,m=y*i,v=y>0?"end":"start",b=y>0?"start":"end";if(a==="top"){var x={x:s+u/2,y:l-c*i,textAnchor:"middle",verticalAnchor:h};return it(it({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+f+d,textAnchor:"middle",verticalAnchor:p};return it(it({},S),n?{height:Math.max(n.y+n.height-(l+f),0),width:u}:{})}if(a==="left"){var w={x:s-m,y:l+f/2,textAnchor:v,verticalAnchor:"middle"};return it(it({},w),n?{width:Math.max(w.x-n.x,0),height:f}:{})}if(a==="right"){var O={x:s+u+m,y:l+f/2,textAnchor:b,verticalAnchor:"middle"};return it(it({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:f}:{})}var _=n?{width:u,height:f}:{};return a==="insideLeft"?it({x:s+m,y:l+f/2,textAnchor:b,verticalAnchor:"middle"},_):a==="insideRight"?it({x:s+u-m,y:l+f/2,textAnchor:v,verticalAnchor:"middle"},_):a==="insideTop"?it({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:p},_):a==="insideBottom"?it({x:s+u/2,y:l+f-d,textAnchor:"middle",verticalAnchor:h},_):a==="insideTopLeft"?it({x:s+m,y:l+d,textAnchor:b,verticalAnchor:p},_):a==="insideTopRight"?it({x:s+u-m,y:l+d,textAnchor:v,verticalAnchor:p},_):a==="insideBottomLeft"?it({x:s+m,y:l+f-d,textAnchor:b,verticalAnchor:h},_):a==="insideBottomRight"?it({x:s+u-m,y:l+f-d,textAnchor:v,verticalAnchor:h},_):Es(a)&&(K(a.x)||Zi(a.x))&&(K(a.y)||Zi(a.y))?it({x:s+It(a.x,u),y:l+It(a.y,f),textAnchor:"end",verticalAnchor:"end"},_):it({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},_)},dY=function(t){return"cx"in t&&K(t.cx)};function pt(e){var t=e.offset,r=t===void 0?5:t,n=rY(e,QQ),i=it({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,f=i.className,c=f===void 0?"":f,d=i.textBreakAll;if(!a||ce(s)&&ce(l)&&!k.isValidElement(u)&&!ae(u))return null;if(k.isValidElement(u))return k.cloneElement(u,i);var h;if(ae(u)){if(h=k.createElement(u,i),k.isValidElement(h))return h}else h=sY(i);var p=dY(a),y=re(i,!0);if(p&&(o==="insideStart"||o==="insideEnd"||o==="end"))return uY(i,h,y);var m=p?cY(i):fY(i);return j.createElement(ka,pu({className:le("recharts-label",c)},y,m,{breakAll:d}),h)}pt.displayName="Label";var CT=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,c=t.x,d=t.y,h=t.top,p=t.left,y=t.width,m=t.height,v=t.clockWise,b=t.labelViewBox;if(b)return b;if(K(y)&&K(m)){if(K(c)&&K(d))return{x:c,y:d,width:y,height:m};if(K(h)&&K(p))return{x:h,y:p,width:y,height:m}}return K(c)&&K(d)?{x:c,y:d,width:0,height:0}:K(r)&&K(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:v}:t.viewBox?t.viewBox:{}},hY=function(t,r){return t?t===!0?j.createElement(pt,{key:"label-implicit",viewBox:r}):ut(t)?j.createElement(pt,{key:"label-implicit",viewBox:r,value:t}):k.isValidElement(t)?t.type===pt?k.cloneElement(t,{key:"label-implicit",viewBox:r}):j.createElement(pt,{key:"label-implicit",content:t,viewBox:r}):ae(t)?j.createElement(pt,{key:"label-implicit",content:t,viewBox:r}):Es(t)?j.createElement(pt,pu({viewBox:r},t,{key:"label-implicit"})):null:null},pY=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=CT(t),o=Sr(i,pt).map(function(l,u){return k.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=hY(t.label,r||a);return[s].concat(YQ(o))};pt.parseViewBox=CT;pt.renderCallByParent=pY;function mY(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var yY=mY;const vY=Pe(yY);function mu(e){"@babel/helpers - typeof";return mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(e)}var gY=["valueAccessor"],bY=["data","dataKey","clockWise","id","textBreakAll"];function xY(e){return _Y(e)||OY(e)||SY(e)||wY()}function wY(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SY(e,t){if(e){if(typeof e=="string")return yv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yv(e,t)}}function OY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _Y(e){if(Array.isArray(e))return yv(e)}function yv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function EY(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var kY=function(t){return Array.isArray(t.value)?vY(t.value):t.value};function En(e){var t=e.valueAccessor,r=t===void 0?kY:t,n=YS(e,gY),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=YS(n,bY);return!i||!i.length?null:j.createElement(me,{className:"recharts-label-list"},i.map(function(f,c){var d=ce(a)?r(f,c):st(f&&f.payload,a),h=ce(s)?{}:{id:"".concat(s,"-").concat(c)};return j.createElement(pt,fd({},re(f,!0),u,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:l,viewBox:pt.parseViewBox(ce(o)?f:QS(QS({},f),{},{clockWise:o})),key:"label-".concat(c),index:c}))}))}En.displayName="LabelList";function TY(e,t){return e?e===!0?j.createElement(En,{key:"labelList-implicit",data:t}):j.isValidElement(e)||ae(e)?j.createElement(En,{key:"labelList-implicit",data:t,content:e}):Es(e)?j.createElement(En,fd({data:t},e,{key:"labelList-implicit"})):null:null}function CY(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Sr(n,En).map(function(o,s){return k.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=TY(e.label,t);return[a].concat(xY(i))}En.renderCallByParent=CY;function yu(e){"@babel/helpers - typeof";return yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yu(e)}function vv(){return vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, `).concat(c.x,",").concat(c.y,` `);if(i>0){var h=Ne(r,n,i,o),p=Ne(r,n,i,u);d+="L ".concat(p.x,",").concat(p.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`, `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},RY=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,c=Mt(f-u),d=$c({cx:r,cy:n,radius:a,angle:u,sign:c,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,p=d.lineTangency,y=d.theta,m=$c({cx:r,cy:n,radius:a,angle:f,sign:-c,cornerRadius:o,cornerIsExternal:l}),v=m.circleTangency,b=m.lineTangency,x=m.theta,S=l?Math.abs(u-f):Math.abs(u-f)-y-x;if(S<0)return s?"M ".concat(p.x,",").concat(p.y,` a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 `):$T({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var w="M ".concat(p.x,",").concat(p.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(h.x,",").concat(h.y,` A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(c<0),",").concat(v.x,",").concat(v.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(b.x,",").concat(b.y,` `);if(i>0){var O=$c({cx:r,cy:n,radius:i,angle:u,sign:c,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=O.circleTangency,P=O.lineTangency,A=O.theta,C=$c({cx:r,cy:n,radius:i,angle:f,sign:-c,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),N=C.circleTangency,$=C.lineTangency,L=C.theta,R=l?Math.abs(u-f):Math.abs(u-f)-A-L;if(R<0&&o===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat($.x,",").concat($.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(N.x,",").concat(N.y,` A`).concat(i,",").concat(i,",0,").concat(+(R>180),",").concat(+(c>0),",").concat(_.x,",").concat(_.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(P.x,",").concat(P.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},DY={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},NT=function(t){var r=ZS(ZS({},DY),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,c=r.endAngle,d=r.className;if(o0&&Math.abs(f-c)<360?m=RY({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(y,p/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:c}):m=$T({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:c}),j.createElement("path",vv({},re(r,!0),{className:h,d:m,role:"img"}))};function vu(e){"@babel/helpers - typeof";return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vu(e)}function gv(){return gv=Object.assign?Object.assign.bind():function(e){for(var t=1;tQY.call(e,t));function Ua(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const ZY="__v",eJ="__o",tJ="_owner",{getOwnPropertyDescriptor:iO,keys:aO}=Object;function rJ(e,t){return e.byteLength===t.byteLength&&dd(new Uint8Array(e),new Uint8Array(t))}function nJ(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function iJ(e,t){return e.byteLength===t.byteLength&&dd(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function aJ(e,t){return Ua(e.getTime(),t.getTime())}function oJ(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function sJ(e,t){return e===t}function oO(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let f=!1,c=0;for(;(s=u.next())&&!s.done;){if(i[c]){c++;continue}const d=o.value,h=s.value;if(r.equals(d[0],h[0],l,c,e,t,r)&&r.equals(d[1],h[1],d[0],h[0],e,t,r)){f=i[c]=!0;break}c++}if(!f)return!1;l++}return!0}const lJ=Ua;function uJ(e,t,r){const n=aO(e);let i=n.length;if(aO(t).length!==i)return!1;for(;i-- >0;)if(!DT(e,t,r,n[i]))return!1;return!0}function al(e,t,r){const n=nO(e);let i=n.length;if(nO(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!DT(e,t,r,a)||(o=iO(e,a),s=iO(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function cJ(e,t){return Ua(e.valueOf(),t.valueOf())}function fJ(e,t){return e.source===t.source&&e.flags===t.flags}function sO(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,f=0;for(;(s=l.next())&&!s.done;){if(!i[f]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function dd(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function dJ(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function DT(e,t,r,n){return(n===tJ||n===eJ||n===ZY)&&(e.$$typeof||t.$$typeof)?!0:JY(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const hJ="[object ArrayBuffer]",pJ="[object Arguments]",mJ="[object Boolean]",yJ="[object DataView]",vJ="[object Date]",gJ="[object Error]",bJ="[object Map]",xJ="[object Number]",wJ="[object Object]",SJ="[object RegExp]",OJ="[object Set]",_J="[object String]",PJ={"[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},AJ="[object URL]",jJ=Object.prototype.toString;function EJ({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:f,areSetsEqual:c,areTypedArraysEqual:d,areUrlsEqual:h,unknownTagComparators:p}){return function(m,v,b){if(m===v)return!0;if(m==null||v==null)return!1;const x=typeof m;if(x!==typeof v)return!1;if(x!=="object")return x==="number"?s(m,v,b):x==="function"?a(m,v,b):!1;const S=m.constructor;if(S!==v.constructor)return!1;if(S===Object)return l(m,v,b);if(Array.isArray(m))return t(m,v,b);if(S===Date)return n(m,v,b);if(S===RegExp)return f(m,v,b);if(S===Map)return o(m,v,b);if(S===Set)return c(m,v,b);const w=jJ.call(m);if(w===vJ)return n(m,v,b);if(w===SJ)return f(m,v,b);if(w===bJ)return o(m,v,b);if(w===OJ)return c(m,v,b);if(w===wJ)return typeof m.then!="function"&&typeof v.then!="function"&&l(m,v,b);if(w===AJ)return h(m,v,b);if(w===gJ)return i(m,v,b);if(w===pJ)return l(m,v,b);if(PJ[w])return d(m,v,b);if(w===hJ)return e(m,v,b);if(w===yJ)return r(m,v,b);if(w===mJ||w===xJ||w===_J)return u(m,v,b);if(p){let O=p[w];if(!O){const _=YY(m);_&&(O=p[_])}if(O)return O(m,v,b)}return!1}}function kJ({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:rJ,areArraysEqual:r?al:nJ,areDataViewsEqual:iJ,areDatesEqual:aJ,areErrorsEqual:oJ,areFunctionsEqual:sJ,areMapsEqual:r?Jp(oO,al):oO,areNumbersEqual:lJ,areObjectsEqual:r?al:uJ,arePrimitiveWrappersEqual:cJ,areRegExpsEqual:fJ,areSetsEqual:r?Jp(sO,al):sO,areTypedArraysEqual:r?Jp(dd,al):dd,areUrlsEqual:dJ,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=Mc(n.areArraysEqual),a=Mc(n.areMapsEqual),o=Mc(n.areObjectsEqual),s=Mc(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function TJ(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function CJ({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:f}=r();return t(s,l,{cache:u,equals:n,meta:f,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const $J=Ii();Ii({strict:!0});Ii({circular:!0});Ii({circular:!0,strict:!0});Ii({createInternalComparator:()=>Ua});Ii({strict:!0,createInternalComparator:()=>Ua});Ii({circular:!0,createInternalComparator:()=>Ua});Ii({circular:!0,createInternalComparator:()=>Ua,strict:!0});function Ii(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=kJ(e),o=EJ(a),s=r?r(o):TJ(o);return CJ({circular:t,comparator:o,createState:n,equals:s,strict:i})}function NJ(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function lO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):NJ(i)};requestAnimationFrame(n)}function bv(e){"@babel/helpers - typeof";return bv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bv(e)}function MJ(e){return LJ(e)||DJ(e)||RJ(e)||IJ()}function IJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RJ(e,t){if(e){if(typeof e=="string")return uO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uO(e,t)}}function uO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:v<0?0:v},y=function(v){for(var b=v>1?1:v,x=b,S=0;S<8;++S){var w=c(x)-b,O=h(x);if(Math.abs(w-b)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(f,c,d){var h=-(f-c)*n,p=d*a,y=d+(h-p)*s/1e3,m=d*s/1e3+f;return Math.abs(m-c)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mZ(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function Zp(e){return bZ(e)||gZ(e)||vZ(e)||yZ()}function yZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vZ(e,t){if(e){if(typeof e=="string")return _v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _v(e,t)}}function gZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bZ(e){if(Array.isArray(e))return _v(e)}function _v(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"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 md(e){return md=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},md(e)}var on=function(e){_Z(r,e);var t=PZ(r);function r(n,i){var a;xZ(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,f=o.to,c=o.steps,d=o.children,h=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(jv(a)),a.changeStyle=a.changeStyle.bind(jv(a)),!s||h<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:f}),Av(a);if(c&&c.length)a.state={style:c[0].style};else if(u){if(typeof d=="function")return a.state={style:u},Av(a);a.state={style:l?dl({},l,u):u}}else a.state={style:{}};return a}return SZ(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,f=a.to,c=a.from,d=this.state.style;if(s){if(!o){var h={style:l?dl({},l,f):f};this.state&&d&&(l&&d[l]!==f||!l&&d!==f)&&this.setState(h);return}if(!($J(i.to,f)&&i.canBegin&&i.isActive)){var p=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=p||u?c:i.to;if(this.state&&d){var m={style:l?dl({},l,y):y};(l&&d[l]!==y||!l&&d!==y)&&this.setState(m)}this.runAnimation(Tr(Tr({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,f=i.begin,c=i.onAnimationEnd,d=i.onAnimationStart,h=dZ(o,s,tZ(u),l,this.changeStyle),p=function(){a.stopJSAnimation=h()};this.manager.start([d,f,p,l,c])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],f=u.style,c=u.duration,d=c===void 0?0:c,h=function(y,m,v){if(v===0)return y;var b=m.duration,x=m.easing,S=x===void 0?"ease":x,w=m.style,O=m.properties,_=m.onAnimationEnd,P=v>0?o[v-1]:m,A=O||Object.keys(w);if(typeof S=="function"||S==="spring")return[].concat(Zp(y),[a.runJSAnimation.bind(a,{from:P.style,to:w,duration:b,easing:S}),b]);var C=dO(A,b,S),N=Tr(Tr(Tr({},P.style),w),{},{transition:C});return[].concat(Zp(y),[N,b,_]).filter(WJ)};return this.manager.start([l].concat(Zp(o.reduce(h,[f,Math.max(d,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=zJ());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,f=i.onAnimationStart,c=i.onAnimationEnd,d=i.steps,h=i.children,p=this.manager;if(this.unSubscribe=p.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var y=s?dl({},s,l):l,m=dO(Object.keys(y),o,u);p.start([f,a,Tr(Tr({},y),{},{transition:m}),o,c])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=pZ(i,hZ),u=k.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||u===0||o<=0)return a;var c=function(h){var p=h.props,y=p.style,m=y===void 0?{}:y,v=p.className,b=k.cloneElement(h,Tr(Tr({},l),{},{style:Tr(Tr({},m),f),className:v}));return b};return u===1?c(k.Children.only(a)):j.createElement("div",null,k.Children.map(a,function(d){return c(d)}))}}]),r}(k.PureComponent);on.displayName="Animate";on.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};on.propTypes={from:we.oneOfType([we.object,we.string]),to:we.oneOfType([we.object,we.string]),attributeName:we.string,duration:we.number,begin:we.number,easing:we.oneOfType([we.string,we.func]),steps:we.arrayOf(we.shape({duration:we.number.isRequired,style:we.object.isRequired,easing:we.oneOfType([we.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),we.func]),properties:we.arrayOf("string"),onAnimationEnd:we.func})),children:we.oneOfType([we.node,we.func]),isActive:we.bool,canBegin:we.bool,onAnimationEnd:we.func,shouldReAnimate:we.bool,onAnimationStart:we.func,onAnimationReStart:we.func};function xu(e){"@babel/helpers - typeof";return xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xu(e)}function yd(){return yd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var c=[0,0,0,0],d=0,h=4;do?o:a[d];f="M".concat(t,",").concat(r+s*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(u,",").concat(t+l*c[0],",").concat(r)),f+="L ".concat(t+n-l*c[1],",").concat(r),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(u,`, `).concat(t+n,",").concat(r+s*c[1])),f+="L ".concat(t+n,",").concat(r+i-s*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(u,`, `).concat(t+n-l*c[2],",").concat(r+i)),f+="L ".concat(t+l*c[3],",").concat(r+i),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(u,`, `).concat(t,",").concat(r+i-s*c[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var p=Math.min(o,a);f="M ".concat(t,",").concat(r+s*p,` A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+l*p,",").concat(r,` L `).concat(t+n-l*p,",").concat(r,` A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*p,` L `).concat(t+n,",").concat(r+i-s*p,` A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+n-l*p,",").concat(r+i,` L `).concat(t+l*p,",").concat(r+i,` A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*p," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},IZ=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),f=Math.max(a,a+s),c=Math.min(o,o+l),d=Math.max(o,o+l);return n>=u&&n<=f&&i>=c&&i<=d}return!1},RZ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fb=function(t){var r=xO(xO({},RZ),t),n=k.useRef(),i=k.useState(-1),a=jZ(i,2),o=a[0],s=a[1];k.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,u=r.y,f=r.width,c=r.height,d=r.radius,h=r.className,p=r.animationEasing,y=r.animationDuration,m=r.animationBegin,v=r.isAnimationActive,b=r.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||c!==+c||f===0||c===0)return null;var x=le("recharts-rectangle",h);return b?j.createElement(on,{canBegin:o>0,from:{width:f,height:c,x:l,y:u},to:{width:f,height:c,x:l,y:u},duration:y,animationEasing:p,isActive:b},function(S){var w=S.width,O=S.height,_=S.x,P=S.y;return j.createElement(on,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:y,isActive:v,easing:p},j.createElement("path",yd({},re(r,!0),{className:x,d:wO(_,P,w,O,d),ref:n})))}):j.createElement("path",yd({},re(r,!0),{className:x,d:wO(l,u,f,c,d)}))},DZ=["points","className","baseLinePoints","connectNulls"];function uo(){return uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function SO(e){return WZ(e)||UZ(e)||FZ(e)||BZ()}function BZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FZ(e,t){if(e){if(typeof e=="string")return Ev(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ev(e,t)}}function UZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WZ(e){if(Array.isArray(e))return Ev(e)}function Ev(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){OO(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),OO(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},Al=function(t,r){var n=HZ(t);r&&(n=[n.reduce(function(a,o){return[].concat(SO(a),SO(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},KZ=function(t,r,n){var i=Al(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Al(r.reverse(),n).slice(1))},VZ=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=LZ(t,DZ);if(!r||!r.length)return null;var s=le("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=KZ(r,i,a);return j.createElement("g",{className:s},j.createElement("path",uo({},re(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?j.createElement("path",uo({},re(o,!0),{fill:"none",d:Al(r,a)})):null,l?j.createElement("path",uo({},re(o,!0),{fill:"none",d:Al(i,a)})):null)}var f=Al(r,a);return j.createElement("path",uo({},re(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:s,d:f}))};function kv(){return kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var eee=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},tee=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,f=t.width,c=f===void 0?0:f,d=t.height,h=d===void 0?0:d,p=t.className,y=JZ(t,qZ),m=GZ({x:n,y:a,top:s,left:u,width:c,height:h},y);return!K(n)||!K(a)||!K(c)||!K(h)||!K(s)||!K(u)?null:j.createElement("path",Tv({},re(m,!0),{className:le("recharts-cross",p),d:eee(n,a,c,h,s,u)}))},ree=Nh,nee=tT,iee=un;function aee(e,t){return e&&e.length?ree(e,iee(t),nee):void 0}var oee=aee;const see=Pe(oee);var lee=Nh,uee=un,cee=rT;function fee(e,t){return e&&e.length?lee(e,uee(t),cee):void 0}var dee=fee;const hee=Pe(dee);var pee=["cx","cy","angle","ticks","axisLine"],mee=["ticks","tick","angle","tickFormatter","stroke"];function ns(e){"@babel/helpers - typeof";return ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ns(e)}function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function vee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jO(e,t){for(var r=0;rTO?o=i==="outer"?"start":"end":a<-TO?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,l=n.axisLineType,u=Fi(Fi({},re(this.props,!1)),{},{fill:"none"},re(s,!1));if(l==="circle")return j.createElement(Lh,qi({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var f=this.props.ticks,c=f.map(function(d){return Ne(i,a,o,d.coordinate)});return j.createElement(VZ,qi({className:"recharts-polar-angle-axis-line"},u,{points:c}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,f=re(this.props,!1),c=re(o,!1),d=Fi(Fi({},f),{},{fill:"none"},re(s,!1)),h=a.map(function(p,y){var m=n.getTickLineCoord(p),v=n.getTickTextAnchor(p),b=Fi(Fi(Fi({textAnchor:v},f),{},{stroke:"none",fill:u},c),{},{index:y,payload:p,x:m.x2,y:m.y2});return j.createElement(me,qi({className:le("recharts-polar-angle-axis-tick",TT(o)),key:"tick-".concat(p.coordinate)},Ea(n.props,p,y)),s&&j.createElement("line",qi({className:"recharts-polar-angle-axis-tick-line"},d,m)),o&&t.renderTickItem(o,b,l?l(p.value,y):p.value))});return j.createElement(me,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:j.createElement(me,{className:le("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return j.isValidElement(n)?o=j.cloneElement(n,i):ae(n)?o=n(i):o=j.createElement(ka,qi({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(k.PureComponent);Fh(Uh,"displayName","PolarAngleAxis");Fh(Uh,"axisType","angleAxis");Fh(Uh,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var $ee=JE,Nee=$ee(Object.getPrototypeOf,Object),Mee=Nee,Iee=Ln,Ree=Mee,Dee=zn,Lee="[object Object]",zee=Function.prototype,Bee=Object.prototype,GT=zee.toString,Fee=Bee.hasOwnProperty,Uee=GT.call(Object);function Wee(e){if(!Dee(e)||Iee(e)!=Lee)return!1;var t=Ree(e);if(t===null)return!0;var r=Fee.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&>.call(r)==Uee}var Hee=Wee;const Kee=Pe(Hee);var Vee=Ln,qee=zn,Gee="[object Boolean]";function Xee(e){return e===!0||e===!1||qee(e)&&Vee(e)==Gee}var Qee=Xee;const Yee=Pe(Qee);function Su(e){"@babel/helpers - typeof";return Su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Su(e)}function bd(){return bd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:f,lowerWidth:c,height:d,x:l,y:u},duration:y,animationEasing:p,isActive:v},function(x){var S=x.upperWidth,w=x.lowerWidth,O=x.height,_=x.x,P=x.y;return j.createElement(on,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:y,easing:p},j.createElement("path",bd({},re(r,!0),{className:b,d:MO(_,P,S,w,O),ref:n})))}):j.createElement("g",null,j.createElement("path",bd({},re(r,!0),{className:b,d:MO(l,u,f,c,d)})))},lte=["option","shapeType","propTransformer","activeClassName","isActive"];function Ou(e){"@babel/helpers - typeof";return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(e)}function ute(e,t){if(e==null)return{};var r=cte(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function IO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xd(e){for(var t=1;t0?or(x,"paddingAngle",0):0;if(w){var _=Ht(w.endAngle-w.startAngle,x.endAngle-x.startAngle),P=Te(Te({},x),{},{startAngle:b+O,endAngle:b+_(y)+O});m.push(P),b=P.endAngle}else{var A=x.endAngle,C=x.startAngle,N=Ht(0,A-C),$=N(y),L=Te(Te({},x),{},{startAngle:b+O,endAngle:b+$+O});m.push(L),b=L.endAngle}}),j.createElement(me,null,n.renderSectorsStatically(m))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!es(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,u=i.cx,f=i.cy,c=i.innerRadius,d=i.outerRadius,h=i.isAnimationActive,p=this.state.isAnimationFinished;if(a||!o||!o.length||!K(u)||!K(f)||!K(c)||!K(d))return null;var y=le("recharts-pie",s);return j.createElement(me,{tabIndex:this.props.rootTabIndex,className:y,ref:function(v){n.pieRef=v}},this.renderSectors(),l&&this.renderLabels(o),pt.renderCallByParent(this.props,null,!1),(!h||p)&&En.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?b:b-1)*l,S=m-b*h-x,w=i.reduce(function(P,A){var C=st(A,v,0);return P+(K(C)?C:0)},0),O;if(w>0){var _;O=i.map(function(P,A){var C=st(P,v,0),N=st(P,f,A),$=(K(C)?C:0)/w,L;A?L=_.endAngle+Mt(y)*l*(C!==0?1:0):L=o;var R=L+Mt(y)*((C!==0?h:0)+$*S),I=(L+R)/2,D=(p.innerRadius+p.outerRadius)/2,F=[{name:N,value:C,payload:P,dataKey:v,type:d}],T=Ne(p.cx,p.cy,D,I);return _=Te(Te(Te({percent:$,cornerRadius:a,name:N,tooltipPayload:F,midAngle:I,middleRadius:D,tooltipPosition:T},P),p),{},{value:st(P,v),startAngle:L,endAngle:R,payload:P,paddingAngle:Mt(y)*l}),_})}return Te(Te({},p),{},{sectors:O,data:i})});var Cte=Math.ceil,$te=Math.max;function Nte(e,t,r,n){for(var i=-1,a=$te(Cte((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var Mte=Nte,Ite=vk,zO=1/0,Rte=17976931348623157e292;function Dte(e){if(!e)return e===0?e:0;if(e=Ite(e),e===zO||e===-zO){var t=e<0?-1:1;return t*Rte}return e===e?e:0}var JT=Dte,Lte=Mte,zte=Ph,em=JT;function Bte(e){return function(t,r,n){return n&&typeof n!="number"&&zte(t,r,n)&&(r=n=void 0),t=em(t),r===void 0?(r=t,t=0):r=em(r),n=n===void 0?t0&&n.handleDrag(i.changedTouches[0])}),Zt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),Zt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Zt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Zt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Zt(n,"handleSlideDragStart",function(i){var a=HO(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return ere(t,e),Qte(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,f=u.length-1,c=Math.min(i,a),d=Math.max(i,a),h=t.getIndexInRange(o,c),p=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:p===f?f:p-p%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=st(a[n],s,n);return ae(o)?o(l,n):l}},{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(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,f=l.width,c=l.travellerWidth,d=l.startIndex,h=l.endIndex,p=l.onChange,y=n.pageX-a;y>0?y=Math.min(y,u+f-c-s,u+f-c-o):y<0&&(y=Math.max(y,u-o,u-s));var m=this.getIndex({startX:o+y,endX:s+y});(m.startIndex!==d||m.endIndex!==h)&&p&&p(m),this.setState({startX:o+y,endX:s+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=HO(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],f=this.props,c=f.x,d=f.width,h=f.travellerWidth,p=f.onChange,y=f.gap,m=f.data,v={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,c+d-h-u):b<0&&(b=Math.max(b,c-u)),v[o]=u+b;var x=this.getIndex(v),S=x.startIndex,w=x.endIndex,O=function(){var P=m.length-1;return o==="startX"&&(s>l?S%y===0:w%y===0)||sl?w%y===0:S%y===0)||s>l&&w===P};this.setState(Zt(Zt({},o,u+b),"brushMoveStartX",n.pageX),function(){p&&O()&&p(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,f=this.state[i],c=s.indexOf(f);if(c!==-1){var d=c+n;if(!(d===-1||d>=s.length)){var h=s[d];i==="startX"&&h>=u||i==="endX"&&h<=l||this.setState(Zt({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return j.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,f=n.padding,c=k.Children.only(u);return c?j.cloneElement(c,{x:i,y:a,width:o,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,f=l.travellerWidth,c=l.height,d=l.traveller,h=l.ariaLabel,p=l.data,y=l.startIndex,m=l.endIndex,v=Math.max(n,this.props.x),b=tm(tm({},re(this.props,!1)),{},{x:v,y:u,width:f,height:c}),x=h||"Min value: ".concat((a=p[y])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=p[m])===null||o===void 0?void 0:o.name);return j.createElement(me,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),s.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,b))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,f=Math.min(n,i)+u,c=Math.max(Math.abs(i-n)-u,0);return j.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:o,width:c,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,f=this.state,c=f.startX,d=f.endX,h=5,p={pointerEvents:"none",fill:u};return j.createElement(me,{className:"recharts-brush-texts"},j.createElement(ka,Od({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-h,y:o+s/2},p),this.getTextOfTick(i)),j.createElement(ka,Od({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+l+h,y:o+s/2},p),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,f=n.height,c=n.alwaysShowText,d=this.state,h=d.startX,p=d.endX,y=d.isTextActive,m=d.isSlideMoving,v=d.isTravellerMoving,b=d.isTravellerFocused;if(!i||!i.length||!K(s)||!K(l)||!K(u)||!K(f)||u<=0||f<=0)return null;var x=le("recharts-brush",a),S=j.Children.count(o)===1,w=Gte("userSelect","none");return j.createElement(me,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(h,p),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(p,"endX"),(y||m||v||b||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return j.createElement(j.Fragment,null,j.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),j.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),j.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return j.isValidElement(n)?a=j.cloneElement(n,i):ae(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,f=n.startIndex,c=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return tm({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?rre({data:a,width:o,x:s,travellerWidth:l,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var d=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(k.PureComponent);Zt(ss,"displayName","Brush");Zt(ss,"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 nre=D0;function ire(e,t){var r;return nre(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var are=ire,ore=HE,sre=un,lre=are,ure=Jt,cre=Ph;function fre(e,t,r){var n=ure(e)?ore:lre;return r&&cre(e,t,r)&&(t=void 0),n(e,sre(t))}var dre=fre;const hre=Pe(dre);var nn=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},KO=dk;function pre(e,t,r){t=="__proto__"&&KO?KO(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var mre=pre,yre=mre,vre=ck,gre=un;function bre(e,t){var r={};return t=gre(t),vre(e,function(n,i,a){yre(r,i,t(n,i,a))}),r}var xre=bre;const wre=Pe(xre);function Sre(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zre(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Bre(e,t){var r=e.x,n=e.y,i=Lre(e,Mre),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),c="".concat(t.width||i.width),d=parseInt(c,10);return ol(ol(ol(ol(ol({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function qO(e){return j.createElement(XT,Iv({shapeType:"rectangle",propTransformer:Bre,activeClassName:"recharts-active-bar"},e))}var Fre=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=K(n)||lB(n);return a?t(n,i):(a||Ca(),r)}},Ure=["value","background"],nC;function ls(e){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ls(e)}function Wre(e,t){if(e==null)return{};var r=Hre(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Hre(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Pd(){return Pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(I)0&&Math.abs(R)0&&(L=Math.min((ne||0)-(R[ge-1]||0),L))}),Number.isFinite(L)){var I=L/$,D=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(_=I*D/2),y.padding==="no-gap"){var F=It(t.barCategoryGap,I*D),T=I*D/2;_=T-F-(T-F)/D*F}}}i==="xAxis"?P=[n.left+(x.left||0)+(_||0),n.left+n.width-(x.right||0)-(_||0)]:i==="yAxis"?P=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(_||0),n.top+n.height-(x.bottom||0)-(_||0)]:P=y.range,w&&(P=[P[1],P[0]]);var B=OT(y,a,d),U=B.scale,q=B.realScaleType;U.domain(v).range(P),_T(U);var H=PT(U,Rr(Rr({},y),{},{realScaleType:q}));i==="xAxis"?(N=m==="top"&&!S||m==="bottom"&&S,A=n.left,C=c[O]-N*y.height):i==="yAxis"&&(N=m==="left"&&!S||m==="right"&&S,A=c[O]-N*y.width,C=n.top);var X=Rr(Rr(Rr({},y),H),{},{realScaleType:q,x:A,y:C,scale:U,width:i==="xAxis"?n.width:y.width,height:i==="yAxis"?n.height:y.height});return X.bandSize=ud(X,H),!y.hide&&i==="xAxis"?c[O]+=(N?-1:1)*X.height:y.hide||(c[O]+=(N?-1:1)*X.width),Rr(Rr({},h),{},Kh({},p,X))},{})},lC=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},tne=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return lC({x:r,y:n},{x:i,y:a})},uC=function(){function e(t){Jre(this,e),this.scale=t}return Zre(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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();Kh(uC,"EPS",1e-4);var db=function(t){var r=Object.keys(t).reduce(function(n,i){return Rr(Rr({},n),{},Kh({},i,uC.create(t[i])))},{});return Rr(Rr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return wre(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return rC(i,function(a,o){return r[o].isInRange(a)})}})};function rne(e){return(e%180+180)%180}var nne=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=rne(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o-1?i[a?t[o]:o]:void 0}}var lne=sne,une=JT;function cne(e){var t=une(e),r=t%1;return t===t?r?t-r:t:0}var fne=cne,dne=ik,hne=un,pne=fne,mne=Math.max;function yne(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:pne(r);return i<0&&(i=mne(n+i,0)),dne(e,hne(t),i)}var vne=yne,gne=lne,bne=vne,xne=gne(bne),wne=xne;const Sne=Pe(wne);var One=pz(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("")}),hb=k.createContext(void 0),pb=k.createContext(void 0),cC=k.createContext(void 0),fC=k.createContext({}),dC=k.createContext(void 0),hC=k.createContext(0),pC=k.createContext(0),JO=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,f=One(a);return j.createElement(hb.Provider,{value:n},j.createElement(pb.Provider,{value:i},j.createElement(fC.Provider,{value:a},j.createElement(cC.Provider,{value:f},j.createElement(dC.Provider,{value:o},j.createElement(hC.Provider,{value:u},j.createElement(pC.Provider,{value:l},s)))))))},_ne=function(){return k.useContext(dC)},mC=function(t){var r=k.useContext(hb);r==null&&Ca();var n=r[t];return n==null&&Ca(),n},Pne=function(){var t=k.useContext(hb);return Jn(t)},Ane=function(){var t=k.useContext(pb),r=Sne(t,function(n){return rC(n.domain,Number.isFinite)});return r||Jn(t)},yC=function(t){var r=k.useContext(pb);r==null&&Ca();var n=r[t];return n==null&&Ca(),n},jne=function(){var t=k.useContext(cC);return t},Ene=function(){return k.useContext(fC)},mb=function(){return k.useContext(pC)},yb=function(){return k.useContext(hC)};function us(e){"@babel/helpers - typeof";return us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},us(e)}function kne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tne(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function fie(e,t){return OC(e,t+1)}function die(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,f=o,c=function(){var p=n==null?void 0:n[l];if(p===void 0)return{v:OC(n,u)};var y=l,m,v=function(){return m===void 0&&(m=r(p,y)),m},b=p.coordinate,x=l===0||Td(e,b,v,f,s);x||(l=0,f=o,u+=1),x&&(f=b+e*(v()/2+i),l+=u)},d;u<=a.length;)if(d=c(),d)return d.v;return[]}function Eu(e){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eu(e)}function o_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t0?h.coordinate-m*e:h.coordinate})}else a[d]=h=Pt(Pt({},h),{},{tickCoord:h.coordinate});var v=Td(e,h.tickCoord,y,s,l);v&&(l=h.tickCoord-e*(y()/2+i),a[d]=Pt(Pt({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function vie(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var f=n[s-1],c=r(f,s-1),d=e*(f.coordinate+e*c/2-u);o[s-1]=f=Pt(Pt({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var h=Td(e,f.tickCoord,function(){return c},l,u);h&&(u=f.tickCoord-e*(c/2+i),o[s-1]=Pt(Pt({},f),{},{isShow:!0}))}for(var p=a?s-1:s,y=function(b){var x=o[b],S,w=function(){return S===void 0&&(S=r(x,b)),S};if(b===0){var O=e*(x.coordinate-e*w()/2-l);o[b]=x=Pt(Pt({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[b]=x=Pt(Pt({},x),{},{tickCoord:x.coordinate});var _=Td(e,x.tickCoord,w,l,u);_&&(l=x.tickCoord+e*(w()/2+i),o[b]=Pt(Pt({},x),{},{isShow:!0}))},m=0;m=2?Mt(i[1].coordinate-i[0].coordinate):1,v=cie(a,m,h);return l==="equidistantPreserveStart"?die(m,v,y,i,o):(l==="preserveStart"||l==="preserveStartEnd"?d=vie(m,v,y,i,o,l==="preserveStartEnd"):d=yie(m,v,y,i,o),d.filter(function(b){return b.isShow}))}var gie=["viewBox"],bie=["viewBox"],xie=["ticks"];function ds(e){"@babel/helpers - typeof";return ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ds(e)}function fo(){return fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l_(e,t){for(var r=0;r0?l(this.props):l(h)),o<=0||s<=0||!p||!p.length?null:j.createElement(me,{className:le("recharts-cartesian-axis",u),ref:function(m){n.layerReference=m}},a&&this.renderAxisLine(),this.renderTicks(p,this.state.fontSize,this.state.letterSpacing),pt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=le(i.className,"recharts-cartesian-axis-tick-value");return j.isValidElement(n)?o=j.cloneElement(n,nt(nt({},i),{},{className:s})):ae(n)?o=n(nt(nt({},i),{},{className:s})):o=j.createElement(ka,fo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(k.Component);xb(Bs,"displayName","CartesianAxis");xb(Bs,"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 kie=["x1","y1","x2","y2","key"],Tie=["offset"];function $a(e){"@babel/helpers - typeof";return $a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$a(e)}function u_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Iie=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return j.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function AC(e,t){var r;if(j.isValidElement(e))r=j.cloneElement(e,t);else if(ae(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=c_(t,kie),u=re(l,!1);u.offset;var f=c_(u,Tie);r=j.createElement("line",ra({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function Rie(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Et(Et({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return AC(i,u)});return j.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function Die(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Et(Et({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return AC(i,u)});return j.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function Lie(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var f=s.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==f[0]&&f.unshift(0);var c=f.map(function(d,h){var p=!f[h+1],y=p?i+o-d:f[h+1]-d;if(y<=0)return null;var m=h%t.length;return j.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:y,width:a,stroke:"none",fill:t[m],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function zie(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==f[0]&&f.unshift(0);var c=f.map(function(d,h){var p=!f[h+1],y=p?a+s-d:f[h+1]-d;if(y<=0)return null;var m=h%n.length;return j.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:y,height:l,stroke:"none",fill:n[m],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var Bie=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return ST(bb(Et(Et(Et({},Bs.defaultProps),n),{},{ticks:_n(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},Fie=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return ST(bb(Et(Et(Et({},Bs.defaultProps),n),{},{ticks:_n(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Xa={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Hv(e){var t,r,n,i,a,o,s=mb(),l=yb(),u=Ene(),f=Et(Et({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Xa.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Xa.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Xa.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Xa.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Xa.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Xa.verticalFill,x:K(e.x)?e.x:u.left,y:K(e.y)?e.y:u.top,width:K(e.width)?e.width:u.width,height:K(e.height)?e.height:u.height}),c=f.x,d=f.y,h=f.width,p=f.height,y=f.syncWithTicks,m=f.horizontalValues,v=f.verticalValues,b=Pne(),x=Ane();if(!K(h)||h<=0||!K(p)||p<=0||!K(c)||c!==+c||!K(d)||d!==+d)return null;var S=f.verticalCoordinatesGenerator||Bie,w=f.horizontalCoordinatesGenerator||Fie,O=f.horizontalPoints,_=f.verticalPoints;if((!O||!O.length)&&ae(w)){var P=m&&m.length,A=w({yAxis:x?Et(Et({},x),{},{ticks:P?m:x.ticks}):void 0,width:s,height:l,offset:u},P?!0:y);Fr(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat($a(A),"]")),Array.isArray(A)&&(O=A)}if((!_||!_.length)&&ae(S)){var C=v&&v.length,N=S({xAxis:b?Et(Et({},b),{},{ticks:C?v:b.ticks}):void 0,width:s,height:l,offset:u},C?!0:y);Fr(Array.isArray(N),"verticalCoordinatesGenerator should return Array but instead it returned [".concat($a(N),"]")),Array.isArray(N)&&(_=N)}return j.createElement("g",{className:"recharts-cartesian-grid"},j.createElement(Iie,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),j.createElement(Rie,ra({},f,{offset:u,horizontalPoints:O,xAxis:b,yAxis:x})),j.createElement(Die,ra({},f,{offset:u,verticalPoints:_,xAxis:b,yAxis:x})),j.createElement(Lie,ra({},f,{horizontalPoints:O})),j.createElement(zie,ra({},f,{verticalPoints:_})))}Hv.displayName="CartesianGrid";var Uie=["layout","type","stroke","connectNulls","isRange","ref"],Wie=["key"],jC;function hs(e){"@babel/helpers - typeof";return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hs(e)}function EC(e,t){if(e==null)return{};var r=Hie(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Hie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function na(){return na=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!es(f,o)||!es(c,s))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.top,f=i.left,c=i.xAxis,d=i.yAxis,h=i.width,p=i.height,y=i.isAnimationActive,m=i.id;if(a||!s||!s.length)return null;var v=this.state.isAnimationFinished,b=s.length===1,x=le("recharts-area",l),S=c&&c.allowDataOverflow,w=d&&d.allowDataOverflow,O=S||w,_=ce(m)?this.id:m,P=(n=re(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=P.r,C=A===void 0?3:A,N=P.strokeWidth,$=N===void 0?2:N,L=xB(o)?o:{},R=L.clipDot,I=R===void 0?!0:R,D=C*2+$;return j.createElement(me,{className:x},S||w?j.createElement("defs",null,j.createElement("clipPath",{id:"clipPath-".concat(_)},j.createElement("rect",{x:S?f:f-h/2,y:w?u:u-p/2,width:S?h:h*2,height:w?p:p*2})),!I&&j.createElement("clipPath",{id:"clipPath-dots-".concat(_)},j.createElement("rect",{x:f-D/2,y:u-D/2,width:h+D,height:p+D}))):null,b?null:this.renderArea(O,_),(o||b)&&this.renderDots(O,I,_),(!y||v)&&En.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(k.PureComponent);jC=Or;Zr(Or,"displayName","Area");Zr(Or,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!za.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Zr(Or,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(K(s)&&typeof s=="number")return s;var l=i==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var f=Math.max(u[0],u[1]),c=Math.min(u[0],u[1]);return s==="dataMin"?c:s==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});Zr(Or,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,f=e.dataStartIndex,c=e.displayedData,d=e.offset,h=t.layout,p=u&&u.length,y=jC.getBaseValue(t,r,n,i),m=h==="horizontal",v=!1,b=c.map(function(S,w){var O;p?O=u[f+w]:(O=st(S,l),Array.isArray(O)?v=!0:O=[y,O]);var _=O[1]==null||p&&st(S,l)==null;return m?{x:BS({axis:n,ticks:a,bandSize:s,entry:S,index:w}),y:_?null:i.scale(O[1]),value:O,payload:S}:{x:_?null:n.scale(O[1]),y:BS({axis:i,ticks:o,bandSize:s,entry:S,index:w}),value:O,payload:S}}),x;return p||v?x=b.map(function(S){var w=Array.isArray(S.value)?S.value[0]:null;return m?{x:S.x,y:w!=null&&S.y!=null?i.scale(w):null}:{x:w!=null?n.scale(w):null,y:S.y}}):x=m?i.scale(y):n.scale(y),Vn({points:b,baseLine:x,layout:h,isRange:v},d)});Zr(Or,"renderDotItem",function(e,t){var r;if(j.isValidElement(e))r=j.cloneElement(e,t);else if(ae(e))r=e(t);else{var n=le("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=EC(t,Wie);r=j.createElement(Lh,na({},a,{key:i,className:n}))}return r});function ps(e){"@babel/helpers - typeof";return ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(e)}function Jie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zie(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Bae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fae(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&K(i)&&K(a)?t.slice(i,a+1):[]};function HC(e){return e==="number"?[0,"auto"]:void 0}var eg=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Qh(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var f,c=(f=u.props.data)!==null&&f!==void 0?f:r;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=c===void 0?s:c;d=Mf(h,o.dataKey,i)}else d=c&&c[n]||s[n];return d?[].concat(vs(l),[jT(u,d)]):l},[])},g_=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=Zae(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=wQ(o,s,u,l);if(f>=0&&u){var c=u[f]&&u[f].value,d=eg(t,r,f,c),h=eoe(n,s,f,a);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:h}}return null},toe=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,h=wT(f,a);return n.reduce(function(p,y){var m,v=y.type.defaultProps!==void 0?z(z({},y.type.defaultProps),y.props):y.props,b=v.type,x=v.dataKey,S=v.allowDataOverflow,w=v.allowDuplicatedCategory,O=v.scale,_=v.ticks,P=v.includeHidden,A=v[o];if(p[A])return p;var C=Qh(t.data,{graphicalItems:i.filter(function(H){var X,ne=o in H.props?H.props[o]:(X=H.type.defaultProps)===null||X===void 0?void 0:X[o];return ne===A}),dataStartIndex:l,dataEndIndex:u}),N=C.length,$,L,R;jae(v.domain,S,b)&&($=pv(v.domain,null,S),h&&(b==="number"||O!=="auto")&&(R=_l(C,x,"category")));var I=HC(b);if(!$||$.length===0){var D,F=(D=v.domain)!==null&&D!==void 0?D:I;if(x){if($=_l(C,x,b),b==="category"&&h){var T=cB($);w&&T?(L=$,$=Sd(0,N)):w||($=HS(F,$,y).reduce(function(H,X){return H.indexOf(X)>=0?H:[].concat(vs(H),[X])},[]))}else if(b==="category")w?$=$.filter(function(H){return H!==""&&!ce(H)}):$=HS(F,$,y).reduce(function(H,X){return H.indexOf(X)>=0||X===""||ce(X)?H:[].concat(vs(H),[X])},[]);else if(b==="number"){var B=AQ(C,i.filter(function(H){var X,ne,ge=o in H.props?H.props[o]:(X=H.type.defaultProps)===null||X===void 0?void 0:X[o],Le="hide"in H.props?H.props.hide:(ne=H.type.defaultProps)===null||ne===void 0?void 0:ne.hide;return ge===A&&(P||!Le)}),x,a,f);B&&($=B)}h&&(b==="number"||O!=="auto")&&(R=_l(C,x,"category"))}else h?$=Sd(0,N):s&&s[A]&&s[A].hasStack&&b==="number"?$=d==="expand"?[0,1]:AT(s[A].stackGroups,l,u):$=xT(C,i.filter(function(H){var X=o in H.props?H.props[o]:H.type.defaultProps[o],ne="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return X===A&&(P||!ne)}),b,f,!0);if(b==="number")$=Yv(c,$,A,a,_),F&&($=pv(F,$,S));else if(b==="category"&&F){var U=F,q=$.every(function(H){return U.indexOf(H)>=0});q&&($=U)}}return z(z({},p),{},ie({},A,z(z({},v),{},{axisType:a,domain:$,categoricalDomain:R,duplicateDomain:L,originalDomain:(m=v.domain)!==null&&m!==void 0?m:I,isCategorical:h,layout:f})))},{})},roe=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,c=t.children,d=Qh(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),h=d.length,p=wT(f,a),y=-1;return n.reduce(function(m,v){var b=v.type.defaultProps!==void 0?z(z({},v.type.defaultProps),v.props):v.props,x=b[o],S=HC("number");if(!m[x]){y++;var w;return p?w=Sd(0,h):s&&s[x]&&s[x].hasStack?(w=AT(s[x].stackGroups,l,u),w=Yv(c,w,x,a)):(w=pv(S,xT(d,n.filter(function(O){var _,P,A=o in O.props?O.props[o]:(_=O.type.defaultProps)===null||_===void 0?void 0:_[o],C="hide"in O.props?O.props.hide:(P=O.type.defaultProps)===null||P===void 0?void 0:P.hide;return A===x&&!C}),"number",f),i.defaultProps.allowDataOverflow),w=Yv(c,w,x,a)),z(z({},m),{},ie({},x,z(z({axisType:a},i.defaultProps),{},{hide:!0,orientation:or(Yae,"".concat(a,".").concat(y%2),null),domain:w,originalDomain:S,isCategorical:p,layout:f})))}return m},{})},noe=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.children,c="".concat(i,"Id"),d=Sr(f,a),h={};return d&&d.length?h=toe(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=roe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},ioe=function(t){var r=Jn(t),n=_n(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:L0(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ud(r,n)}},b_=function(t){var r=t.children,n=t.defaultShowTooltip,i=tr(r,ss),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},aoe=function(t){return!t||!t.length?!1:t.some(function(r){var n=An(r&&r.type);return n&&n.indexOf("Bar")>=0})},x_=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},ooe=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,f=n.height,c=n.children,d=n.margin||{},h=tr(c,ss),p=tr(c,wo),y=Object.keys(l).reduce(function(w,O){var _=l[O],P=_.orientation;return!_.mirror&&!_.hide?z(z({},w),{},ie({},P,w[P]+_.width)):w},{left:d.left||0,right:d.right||0}),m=Object.keys(o).reduce(function(w,O){var _=o[O],P=_.orientation;return!_.mirror&&!_.hide?z(z({},w),{},ie({},P,or(w,"".concat(P))+_.height)):w},{top:d.top||0,bottom:d.bottom||0}),v=z(z({},m),y),b=v.bottom;h&&(v.bottom+=h.props.height||ss.defaultProps.height),p&&r&&(v=_Q(v,i,n,r));var x=u-v.left-v.right,S=f-v.top-v.bottom;return z(z({brushBottom:b},v),{},{width:Math.max(x,0),height:Math.max(S,0)})},soe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},wb=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,d=function(v,b){var x=b.graphicalItems,S=b.stackGroups,w=b.offset,O=b.updateId,_=b.dataStartIndex,P=b.dataEndIndex,A=v.barSize,C=v.layout,N=v.barGap,$=v.barCategoryGap,L=v.maxBarSize,R=x_(C),I=R.numericAxisName,D=R.cateAxisName,F=aoe(x),T=[];return x.forEach(function(B,U){var q=Qh(v.data,{graphicalItems:[B],dataStartIndex:_,dataEndIndex:P}),H=B.type.defaultProps!==void 0?z(z({},B.type.defaultProps),B.props):B.props,X=H.dataKey,ne=H.maxBarSize,ge=H["".concat(I,"Id")],Le=H["".concat(D,"Id")],xe={},vt=l.reduce(function(Ri,Di){var Yh=b["".concat(Di.axisType,"Map")],Sb=H["".concat(Di.axisType,"Id")];Yh&&Yh[Sb]||Di.axisType==="zAxis"||Ca();var Ob=Yh[Sb];return z(z({},Ri),{},ie(ie({},Di.axisType,Ob),"".concat(Di.axisType,"Ticks"),_n(Ob)))},xe),G=vt[D],se=vt["".concat(D,"Ticks")],ue=S&&S[ge]&&S[ge].hasStack&&IQ(B,S[ge].stackGroups),W=An(B.type).indexOf("Bar")>=0,He=ud(G,se),ye=[],et=F&&SQ({barSize:A,stackGroups:S,totalSize:soe(vt,D)});if(W){var tt,Bt,Un=ce(ne)?L:ne,Ha=(tt=(Bt=ud(G,se,!0))!==null&&Bt!==void 0?Bt:Un)!==null&&tt!==void 0?tt:0;ye=OQ({barGap:N,barCategoryGap:$,bandSize:Ha!==He?Ha:He,sizeList:et[Le],maxBarSize:Un}),Ha!==He&&(ye=ye.map(function(Ri){return z(z({},Ri),{},{position:z(z({},Ri.position),{},{offset:Ri.position.offset-Ha/2})})}))}var Zu=B&&B.type&&B.type.getComposedData;Zu&&T.push({props:z(z({},Zu(z(z({},vt),{},{displayedData:q,props:v,dataKey:X,item:B,bandSize:He,barPosition:ye,offset:w,stackedData:ue,layout:C,dataStartIndex:_,dataEndIndex:P}))),{},ie(ie(ie({key:B.key||"item-".concat(U)},I,vt[I]),D,vt[D]),"animationId",O)),childIndex:OB(B,v.children),item:B})}),T},h=function(v,b){var x=v.props,S=v.dataStartIndex,w=v.dataEndIndex,O=v.updateId;if(!Dw({props:x}))return null;var _=x.children,P=x.layout,A=x.stackOffset,C=x.data,N=x.reverseStackOrder,$=x_(P),L=$.numericAxisName,R=$.cateAxisName,I=Sr(_,n),D=NQ(C,I,"".concat(L,"Id"),"".concat(R,"Id"),A,N),F=l.reduce(function(H,X){var ne="".concat(X.axisType,"Map");return z(z({},H),{},ie({},ne,noe(x,z(z({},X),{},{graphicalItems:I,stackGroups:X.axisType===L&&D,dataStartIndex:S,dataEndIndex:w}))))},{}),T=ooe(z(z({},F),{},{props:x,graphicalItems:I}),b==null?void 0:b.legendBBox);Object.keys(F).forEach(function(H){F[H]=f(x,F[H],T,H.replace("Map",""),r)});var B=F["".concat(R,"Map")],U=ioe(B),q=d(x,z(z({},F),{},{dataStartIndex:S,dataEndIndex:w,updateId:O,graphicalItems:I,stackGroups:D,offset:T}));return z(z({formattedGraphicalItems:q,graphicalItems:I,offset:T,stackGroups:D},U),F)},p=function(m){function v(b){var x,S,w;return Bae(this,v),w=Wae(this,v,[b]),ie(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ie(w,"accessibilityManager",new Aae),ie(w,"handleLegendBBoxUpdate",function(O){if(O){var _=w.state,P=_.dataStartIndex,A=_.dataEndIndex,C=_.updateId;w.setState(z({legendBBox:O},h({props:w.props,dataStartIndex:P,dataEndIndex:A,updateId:C},z(z({},w.state),{},{legendBBox:O}))))}}),ie(w,"handleReceiveSyncEvent",function(O,_,P){if(w.props.syncId===O){if(P===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(_)}}),ie(w,"handleBrushChange",function(O){var _=O.startIndex,P=O.endIndex;if(_!==w.state.dataStartIndex||P!==w.state.dataEndIndex){var A=w.state.updateId;w.setState(function(){return z({dataStartIndex:_,dataEndIndex:P},h({props:w.props,dataStartIndex:_,dataEndIndex:P,updateId:A},w.state))}),w.triggerSyncEvent({dataStartIndex:_,dataEndIndex:P})}}),ie(w,"handleMouseEnter",function(O){var _=w.getMouseInfo(O);if(_){var P=z(z({},_),{},{isTooltipActive:!0});w.setState(P),w.triggerSyncEvent(P);var A=w.props.onMouseEnter;ae(A)&&A(P,O)}}),ie(w,"triggeredAfterMouseMove",function(O){var _=w.getMouseInfo(O),P=_?z(z({},_),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(P),w.triggerSyncEvent(P);var A=w.props.onMouseMove;ae(A)&&A(P,O)}),ie(w,"handleItemMouseEnter",function(O){w.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),ie(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),ie(w,"handleMouseMove",function(O){O.persist(),w.throttleTriggeredAfterMouseMove(O)}),ie(w,"handleMouseLeave",function(O){w.throttleTriggeredAfterMouseMove.cancel();var _={isTooltipActive:!1};w.setState(_),w.triggerSyncEvent(_);var P=w.props.onMouseLeave;ae(P)&&P(_,O)}),ie(w,"handleOuterEvent",function(O){var _=SB(O),P=or(w.props,"".concat(_));if(_&&ae(P)){var A,C;/.*touch.*/i.test(_)?C=w.getMouseInfo(O.changedTouches[0]):C=w.getMouseInfo(O),P((A=C)!==null&&A!==void 0?A:{},O)}}),ie(w,"handleClick",function(O){var _=w.getMouseInfo(O);if(_){var P=z(z({},_),{},{isTooltipActive:!0});w.setState(P),w.triggerSyncEvent(P);var A=w.props.onClick;ae(A)&&A(P,O)}}),ie(w,"handleMouseDown",function(O){var _=w.props.onMouseDown;if(ae(_)){var P=w.getMouseInfo(O);_(P,O)}}),ie(w,"handleMouseUp",function(O){var _=w.props.onMouseUp;if(ae(_)){var P=w.getMouseInfo(O);_(P,O)}}),ie(w,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),ie(w,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseDown(O.changedTouches[0])}),ie(w,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseUp(O.changedTouches[0])}),ie(w,"handleDoubleClick",function(O){var _=w.props.onDoubleClick;if(ae(_)){var P=w.getMouseInfo(O);_(P,O)}}),ie(w,"handleContextMenu",function(O){var _=w.props.onContextMenu;if(ae(_)){var P=w.getMouseInfo(O);_(P,O)}}),ie(w,"triggerSyncEvent",function(O){w.props.syncId!==void 0&&nm.emit(im,w.props.syncId,O,w.eventEmitterSymbol)}),ie(w,"applySyncEvent",function(O){var _=w.props,P=_.layout,A=_.syncMethod,C=w.state.updateId,N=O.dataStartIndex,$=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)w.setState(z({dataStartIndex:N,dataEndIndex:$},h({props:w.props,dataStartIndex:N,dataEndIndex:$,updateId:C},w.state)));else if(O.activeTooltipIndex!==void 0){var L=O.chartX,R=O.chartY,I=O.activeTooltipIndex,D=w.state,F=D.offset,T=D.tooltipTicks;if(!F)return;if(typeof A=="function")I=A(T,O);else if(A==="value"){I=-1;for(var B=0;B=0){var ue,W;if(L.dataKey&&!L.allowDuplicatedCategory){var He=typeof L.dataKey=="function"?se:"payload.".concat(L.dataKey.toString());ue=Mf(B,He,I),W=U&&q&&Mf(q,He,I)}else ue=B==null?void 0:B[R],W=U&&q&&q[R];if(Le||ge){var ye=O.props.activeIndex!==void 0?O.props.activeIndex:R;return[k.cloneElement(O,z(z(z({},A.props),vt),{},{activeIndex:ye})),null,null]}if(!ce(ue))return[G].concat(vs(w.renderActivePoints({item:A,activePoint:ue,basePoint:W,childIndex:R,isRange:U})))}else{var et,tt=(et=w.getItemByXY(w.state.activeCoordinate))!==null&&et!==void 0?et:{graphicalItem:G},Bt=tt.graphicalItem,Un=Bt.item,Ha=Un===void 0?O:Un,Zu=Bt.childIndex,Ri=z(z(z({},A.props),vt),{},{activeIndex:Zu});return[k.cloneElement(Ha,Ri),null,null]}return U?[G,null,null]:[G,null]}),ie(w,"renderCustomized",function(O,_,P){return k.cloneElement(O,z(z({key:"recharts-customized-".concat(P)},w.props),w.state))}),ie(w,"renderMap",{CartesianGrid:{handler:Rc,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:Rc},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:Rc},YAxis:{handler:Rc},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=b.id)!==null&&x!==void 0?x:Ns("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=gk(w.triggeredAfterMouseMove,(S=b.throttleDelay)!==null&&S!==void 0?S:1e3/60),w.state={},w}return Vae(v,m),Uae(v,[{key:"componentDidMount",value:function(){var x,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,S=x.children,w=x.data,O=x.height,_=x.layout,P=tr(S,rr);if(P){var A=P.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var C=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,N=eg(this.state,w,A,C),$=this.state.tooltipTicks[A].coordinate,L=(this.state.offset.top+O)/2,R=_==="horizontal",I=R?{x:$,y:L}:{y:$,x:L},D=this.state.formattedGraphicalItems.find(function(T){var B=T.item;return B.type.name==="Scatter"});D&&(I=z(z({},I),D.props.points[A].tooltipPosition),N=D.props.points[A].tooltipPayload);var F={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:C,activePayload:N,activeCoordinate:I};this.setState(F),this.renderCursor(P),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,O;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(x){ky([tr(x.children,rr)],[tr(this.props.children,rr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=tr(this.props.children,rr);if(x&&typeof x.props.shared=="boolean"){var S=x.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var S=this.container,w=S.getBoundingClientRect(),O=XK(w),_={chartX:Math.round(x.pageX-O.left),chartY:Math.round(x.pageY-O.top)},P=w.width/S.offsetWidth||1,A=this.inRange(_.chartX,_.chartY,P);if(!A)return null;var C=this.state,N=C.xAxisMap,$=C.yAxisMap,L=this.getTooltipEventType(),R=g_(this.state,this.props.data,this.props.layout,A);if(L!=="axis"&&N&&$){var I=Jn(N).scale,D=Jn($).scale,F=I&&I.invert?I.invert(_.chartX):null,T=D&&D.invert?D.invert(_.chartY):null;return z(z({},_),{},{xValue:F,yValue:T},R)}return R?z(z({},_),R):null}},{key:"inRange",value:function(x,S){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,_=x/w,P=S/w;if(O==="horizontal"||O==="vertical"){var A=this.state.offset,C=_>=A.left&&_<=A.left+A.width&&P>=A.top&&P<=A.top+A.height;return C?{x:_,y:P}:null}var N=this.state,$=N.angleAxisMap,L=N.radiusAxisMap;if($&&L){var R=Jn($);return qS({x:_,y:P},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,S=this.getTooltipEventType(),w=tr(x,rr),O={};w&&S==="axis"&&(w.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var _=If(this.props,this.handleOuterEvent);return z(z({},_),O)}},{key:"addListener",value:function(){nm.on(im,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){nm.removeListener(im,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,S,w){for(var O=this.state.formattedGraphicalItems,_=0,P=O.length;_g.jsx("div",{className:"stat-card",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"skeleton h-3 w-20"}),g.jsx("div",{className:"skeleton h-8 w-16"})]}),g.jsx("div",{className:"skeleton h-10 w-10 rounded-lg"})]})}),om=()=>g.jsxs("div",{className:"card",children:[g.jsx("div",{className:"card-header",children:g.jsx("div",{className:"skeleton h-4 w-32"})}),g.jsx("div",{className:"card-body",children:g.jsx("div",{className:"skeleton h-56 w-full rounded-lg"})})]}),sm=({active:e,payload:t,label:r})=>!e||!t?null:g.jsxs("div",{className:"bg-gray-900 border border-gray-700 rounded-lg px-3 py-2 shadow-xl text-xs",children:[g.jsx("p",{className:"text-gray-400 mb-1",children:r}),t.map((n,i)=>g.jsxs("p",{className:"text-white font-medium",children:[g.jsx("span",{className:"inline-block w-2 h-2 rounded-full mr-1.5",style:{backgroundColor:n.color}}),n.name,": ",n.value]},i))]});function foe(){const{currentOrg:e}=Hr(),{data:t,isLoading:r}=Ai({queryKey:["issues-stats",e==null?void 0:e.id],queryFn:()=>$f.stats(e.id),enabled:!!e}),{data:n,isLoading:i}=Ai({queryKey:["report-summary",e==null?void 0:e.id],queryFn:()=>Sy.summary(e.id,14),enabled:!!e});if(!e)return g.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:g.jsxs("div",{className:"text-center max-w-md",children:[g.jsx("div",{className:"w-16 h-16 rounded-2xl bg-indigo-600/10 flex items-center justify-center mx-auto mb-4",children:g.jsx(_y,{size:28,className:"text-indigo-400"})}),g.jsx("h2",{className:"text-xl font-semibold text-white mb-2",children:"Select an organization"}),g.jsx("p",{className:"text-gray-400 text-sm",children:"Choose an organization from the sidebar to view your dashboard and manage issues."})]})});const a=(t==null?void 0:t.data)||{},o=(n==null?void 0:n.data)||{},s=r||i,l=[{label:"Total Issues",value:a.total||0,icon:p0,color:"text-blue-400",bg:"bg-blue-500/10",trend:"+12%",up:!0},{label:"Analyzed",value:a.analyzed||0,icon:Ay,color:"text-emerald-400",bg:"bg-emerald-500/10",trend:"+8%",up:!0},{label:"PRs Created",value:a.pr_created||0,icon:eE,color:"text-purple-400",bg:"bg-purple-500/10",trend:"+15%",up:!0},{label:"Avg Confidence",value:a.avg_confidence?`${(a.avg_confidence*100).toFixed(0)}%`:"N/A",icon:yL,color:"text-amber-400",bg:"bg-amber-500/10",trend:"+3%",up:!0}],u=[{name:"Pending",value:a.pending||0},{name:"Analyzing",value:a.analyzing||0},{name:"Analyzed",value:a.analyzed||0},{name:"PR Created",value:a.pr_created||0},{name:"Error",value:a.error||0}].filter(c=>c.value>0),f=Object.entries(a.by_source||{}).map(([c,d])=>({name:c.replace("_"," ").replace(/\b\w/g,h=>h.toUpperCase()),value:d}));return g.jsxs("div",{className:"p-6 animate-fade-in",children:[g.jsxs("div",{className:"page-header",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"page-title",children:"Dashboard"}),g.jsx("p",{className:"page-subtitle",children:"Overview of your issue analysis pipeline"})]}),g.jsx("div",{className:"flex items-center gap-2",children:g.jsxs("span",{className:"badge badge-green",children:[g.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),"System operational"]})})]}),g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:s?Array(4).fill(0).map((c,d)=>g.jsx(coe,{},d)):l.map(c=>{const d=c.icon;return g.jsx("div",{className:"stat-card",children:g.jsxs("div",{className:"flex items-center justify-between relative z-10",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-xs font-medium text-gray-400 uppercase tracking-wide",children:c.label}),g.jsx("p",{className:"text-2xl font-bold text-white mt-1",children:c.value}),g.jsxs("div",{className:At("flex items-center gap-1 mt-1.5 text-xs font-medium",c.up?"text-emerald-400":"text-red-400"),children:[c.up?g.jsx(wL,{size:12}):g.jsx(bL,{size:12}),c.trend,g.jsx("span",{className:"text-gray-500 font-normal ml-0.5",children:"vs last week"})]})]}),g.jsx("div",{className:At("w-11 h-11 rounded-xl flex items-center justify-center",c.bg),children:g.jsx(d,{size:20,className:c.color})})]})},c.label)})}),g.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-6",children:s?g.jsxs(g.Fragment,{children:[g.jsx(om,{}),g.jsx(om,{})]}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"card",children:[g.jsxs("div",{className:"card-header",children:[g.jsx("h3",{className:"text-sm font-semibold",children:"Issues Trend"}),g.jsx("span",{className:"badge badge-gray text-[10px]",children:"Last 14 days"})]}),g.jsx("div",{className:"card-body",children:g.jsx("div",{className:"h-56",children:g.jsx(tf,{width:"100%",height:"100%",children:g.jsxs(KC,{data:o.daily_breakdown||[],children:[g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"colorTotal",x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.3}),g.jsx("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),g.jsxs("linearGradient",{id:"colorAnalyzed",x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"5%",stopColor:"#22c55e",stopOpacity:.3}),g.jsx("stop",{offset:"95%",stopColor:"#22c55e",stopOpacity:0})]})]}),g.jsx(Hv,{strokeDasharray:"3 3",stroke:"#1e1e2a"}),g.jsx(Na,{dataKey:"date",tick:{fill:"#5a5a70",fontSize:11},tickLine:!1,axisLine:!1}),g.jsx(Ma,{tick:{fill:"#5a5a70",fontSize:11},tickLine:!1,axisLine:!1}),g.jsx(rr,{content:g.jsx(sm,{})}),g.jsx(Or,{type:"monotone",dataKey:"total",stroke:"#6366f1",fill:"url(#colorTotal)",strokeWidth:2,name:"Total"}),g.jsx(Or,{type:"monotone",dataKey:"analyzed",stroke:"#22c55e",fill:"url(#colorAnalyzed)",strokeWidth:2,name:"Analyzed"})]})})})})]}),g.jsxs("div",{className:"card",children:[g.jsx("div",{className:"card-header",children:g.jsx("h3",{className:"text-sm font-semibold",children:"Status Distribution"})}),g.jsx("div",{className:"card-body",children:g.jsx("div",{className:"h-56 flex items-center",children:u.length>0?g.jsx(tf,{width:"100%",height:"100%",children:g.jsxs(uoe,{children:[g.jsx(Fn,{data:u,cx:"50%",cy:"50%",innerRadius:55,outerRadius:80,paddingAngle:4,dataKey:"value",label:({name:c,percent:d})=>`${c} ${(d*100).toFixed(0)}%`,children:u.map((c,d)=>g.jsx(Ah,{fill:w_[d%w_.length]},c.name))}),g.jsx(rr,{content:g.jsx(sm,{})})]})}):g.jsxs("div",{className:"w-full text-center",children:[g.jsx(Ow,{size:24,className:"text-gray-600 mx-auto mb-2"}),g.jsx("p",{className:"text-gray-500 text-sm",children:"No data yet"})]})})})]})]})}),s?g.jsx(om,{}):g.jsxs("div",{className:"card",children:[g.jsx("div",{className:"card-header",children:g.jsx("h3",{className:"text-sm font-semibold",children:"Issues by Source"})}),g.jsx("div",{className:"card-body",children:g.jsx("div",{className:"h-56",children:f.length>0?g.jsx(tf,{width:"100%",height:"100%",children:g.jsxs(loe,{data:f,layout:"vertical",children:[g.jsx(Hv,{strokeDasharray:"3 3",stroke:"#1e1e2a",horizontal:!1}),g.jsx(Na,{type:"number",tick:{fill:"#5a5a70",fontSize:11},tickLine:!1,axisLine:!1}),g.jsx(Ma,{type:"category",dataKey:"name",tick:{fill:"#8888a0",fontSize:12},width:100,tickLine:!1,axisLine:!1}),g.jsx(rr,{content:g.jsx(sm,{})}),g.jsx(Wa,{dataKey:"value",fill:"#6366f1",radius:[0,6,6,0],barSize:24,name:"Issues"})]})}):g.jsx("div",{className:"h-full flex items-center justify-center",children:g.jsxs("div",{className:"text-center",children:[g.jsx(Ow,{size:24,className:"text-gray-600 mx-auto mb-2"}),g.jsx("p",{className:"text-gray-500 text-sm",children:"No data yet"}),g.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"Connect an integration to start tracking"})]})})})})]})]})}const Dc={pending:{badge:"badge-yellow",icon:GD,label:"Pending"},analyzing:{badge:"badge-blue",icon:h0,label:"Analyzing"},analyzed:{badge:"badge-green",icon:Ay,label:"Analyzed"},pr_created:{badge:"badge-purple",icon:eE,label:"PR Created"},completed:{badge:"badge-gray",icon:Ay,label:"Completed"},error:{badge:"badge-red",icon:VD,label:"Error"}},S_={critical:{badge:"badge-red",label:"Critical"},high:{badge:"badge-yellow",label:"High"},medium:{badge:"badge-blue",label:"Medium"},low:{badge:"badge-green",label:"Low"}},doe={jira_cloud:"🔵",servicenow:"⚙️",zendesk:"💚",github:"🐙",gitlab:"🦊",tickethub:"🎫",generic:"📝"},hoe=()=>g.jsxs("div",{className:"flex items-center gap-4 px-5 py-4 table-row",children:[g.jsx("div",{className:"skeleton h-4 w-20"}),g.jsxs("div",{className:"flex-1 space-y-1.5",children:[g.jsx("div",{className:"skeleton h-4 w-3/4"}),g.jsx("div",{className:"skeleton h-3 w-1/4"})]}),g.jsx("div",{className:"skeleton h-5 w-16 rounded-md"})]});function poe(){var c,d;const{currentOrg:e}=Hr(),[t,r]=k.useState({status:"",source:""}),[n,i]=k.useState(""),[a,o]=k.useState(!1),{data:s,isLoading:l}=Ai({queryKey:["issues",e==null?void 0:e.id,t],queryFn:()=>$f.list(e.id,t),enabled:!!e});if(!e)return g.jsx("div",{className:"flex items-center justify-center h-full p-8",children:g.jsx("p",{className:"text-gray-500",children:"Select an organization"})});const u=((s==null?void 0:s.data)||[]).filter(h=>{var p,y;return!n||((p=h.title)==null?void 0:p.toLowerCase().includes(n.toLowerCase()))||((y=h.external_key)==null?void 0:y.toLowerCase().includes(n.toLowerCase()))}),f={};return((s==null?void 0:s.data)||[]).forEach(h=>{f[h.status]=(f[h.status]||0)+1}),g.jsxs("div",{className:"p-6 animate-fade-in",children:[g.jsxs("div",{className:"page-header",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"page-title",children:"Issues"}),g.jsxs("p",{className:"page-subtitle",children:[((c=s==null?void 0:s.data)==null?void 0:c.length)||0," total issues"]})]}),g.jsxs("button",{className:"btn btn-primary",children:[g.jsx(nE,{size:16}),"New Issue"]})]}),g.jsxs("div",{className:"flex items-center gap-1 mb-4 overflow-x-auto pb-1",children:[g.jsxs("button",{onClick:()=>r({...t,status:""}),className:At("badge cursor-pointer transition-all",t.status?"badge-gray hover:bg-gray-700/50":"badge-indigo"),children:["All ",((d=s==null?void 0:s.data)==null?void 0:d.length)||0]}),Object.entries(Dc).map(([h,p])=>{const y=f[h]||0;return!y&&h!=="pending"?null:g.jsxs("button",{onClick:()=>r({...t,status:t.status===h?"":h}),className:At("badge cursor-pointer transition-all",t.status===h?p.badge:"badge-gray hover:bg-gray-700/50"),children:[p.label," ",y]},h)})]}),g.jsxs("div",{className:"card mb-4",children:[g.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[g.jsx(ef,{size:16,className:"text-gray-500"}),g.jsx("input",{value:n,onChange:h=>i(h.target.value),placeholder:"Search issues by title or key...",className:"flex-1 bg-transparent text-sm outline-none placeholder:text-gray-500"}),g.jsxs("button",{onClick:()=>o(!a),className:At("btn btn-sm btn-ghost",a&&"text-indigo-400"),children:[g.jsx(pL,{size:14}),"Filters"]})]}),a&&g.jsxs("div",{className:"px-4 py-3 border-t border-gray-800/50 flex items-center gap-3 animate-slide-up",children:[g.jsxs("select",{value:t.status,onChange:h=>r({...t,status:h.target.value}),className:"input-sm input w-36",children:[g.jsx("option",{value:"",children:"All Status"}),Object.entries(Dc).map(([h,p])=>g.jsx("option",{value:h,children:p.label},h))]}),g.jsxs("select",{value:t.source,onChange:h=>r({...t,source:h.target.value}),className:"input-sm input w-36",children:[g.jsx("option",{value:"",children:"All Sources"}),g.jsx("option",{value:"jira_cloud",children:"JIRA"}),g.jsx("option",{value:"servicenow",children:"ServiceNow"}),g.jsx("option",{value:"zendesk",children:"Zendesk"}),g.jsx("option",{value:"github",children:"GitHub"}),g.jsx("option",{value:"gitlab",children:"GitLab"}),g.jsx("option",{value:"tickethub",children:"TicketHub"})]}),(t.status||t.source)&&g.jsx("button",{onClick:()=>r({status:"",source:""}),className:"btn btn-sm btn-ghost text-red-400",children:"Clear"})]})]}),g.jsxs("div",{className:"card overflow-hidden",children:[g.jsxs("div",{className:"flex items-center gap-4 px-5 py-3 border-b border-gray-800/50 text-xs font-medium text-gray-500 uppercase tracking-wide",children:[g.jsx("div",{className:"w-24",children:"Key"}),g.jsx("div",{className:"flex-1",children:"Title"}),g.jsx("div",{className:"w-24",children:"Status"}),g.jsx("div",{className:"w-20",children:"Priority"}),g.jsx("div",{className:"w-20",children:"Confidence"}),g.jsx("div",{className:"w-8"})]}),l?Array(5).fill(0).map((h,p)=>g.jsx(hoe,{},p)):u.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[g.jsx("div",{className:"w-14 h-14 rounded-2xl bg-gray-800/50 flex items-center justify-center mb-3",children:g.jsx(p0,{size:24,className:"text-gray-600"})}),g.jsx("p",{className:"text-gray-400 font-medium",children:"No issues found"}),g.jsx("p",{className:"text-gray-600 text-sm mt-1",children:"Issues from your integrations will appear here"})]}):u.map(h=>{var v;const p=Dc[h.status]||Dc.pending,y=S_[h.priority]||S_.medium,m=p.icon;return g.jsxs(Ho,{to:`/issues/${h.id}`,className:"flex items-center gap-4 px-5 py-3.5 table-row group",children:[g.jsx("div",{className:"w-24",children:g.jsx("span",{className:"font-mono text-xs text-indigo-400",children:h.external_key||`#${h.id}`})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("p",{className:"text-sm font-medium truncate group-hover:text-white transition-colors",children:h.title}),g.jsx("p",{className:"text-xs text-gray-500 mt-0.5 flex items-center gap-2",children:g.jsxs("span",{children:[doe[h.source]||"📝"," ",(v=h.source)==null?void 0:v.replace("_"," ")]})})]}),g.jsx("div",{className:"w-24",children:g.jsxs("span",{className:At("badge text-[10px]",p.badge),children:[g.jsx(m,{size:10,className:h.status==="analyzing"?"animate-spin":""}),p.label]})}),g.jsx("div",{className:"w-20",children:g.jsx("span",{className:At("badge text-[10px]",y.badge),children:y.label})}),g.jsx("div",{className:"w-20",children:h.confidence?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"flex-1 bg-gray-800 rounded-full h-1.5",children:g.jsx("div",{className:"bg-indigo-500 h-1.5 rounded-full transition-all",style:{width:`${h.confidence*100}%`}})}),g.jsxs("span",{className:"text-[10px] text-gray-400 font-mono w-7 text-right",children:[(h.confidence*100).toFixed(0),"%"]})]}):g.jsx("span",{className:"text-xs text-gray-600",children:"—"})}),g.jsx("div",{className:"w-8",children:g.jsx(Py,{size:14,className:"text-gray-600 group-hover:text-gray-400 transition-colors"})})]},h.id)})]})]})}function moe(){var s,l;const{id:e}=JN(),{currentOrg:t}=Hr(),r=Ps(),{data:n,isLoading:i}=Ai({queryKey:["issue",t==null?void 0:t.id,e],queryFn:()=>$f.get(t.id,e),enabled:!!t}),a=ma({mutationFn:()=>$f.reanalyze(t.id,e),onSuccess:()=>{r.invalidateQueries(["issue",t==null?void 0:t.id,e])}});if(!t)return null;if(i)return g.jsx("div",{className:"p-8 text-center text-gray-400",children:"Loading..."});const o=n==null?void 0:n.data;return o?g.jsxs("div",{className:"p-8",children:[g.jsx("div",{className:"mb-6",children:g.jsx(Ho,{to:"/issues",className:"text-gray-400 hover:text-white",children:"← Back to Issues"})}),g.jsxs("div",{className:"flex items-start justify-between mb-6",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[g.jsx("span",{className:"font-mono text-primary-400 text-xl",children:o.external_key||`#${o.id}`}),g.jsx("span",{className:le("px-3 py-1 rounded text-sm",o.status==="analyzed"?"bg-green-500/20 text-green-400":o.status==="pr_created"?"bg-purple-500/20 text-purple-400":o.status==="error"?"bg-red-500/20 text-red-400":"bg-yellow-500/20 text-yellow-400"),children:o.status})]}),g.jsx("h1",{className:"text-2xl font-bold",children:o.title}),g.jsxs("p",{className:"text-gray-400 mt-1",children:["Source: ",o.source," • Created: ",new Date(o.created_at).toLocaleString()]})]}),g.jsxs("div",{className:"flex gap-2",children:[o.external_url&&g.jsx("a",{href:o.external_url,target:"_blank",rel:"noopener noreferrer",className:"btn btn-secondary",children:"View Original →"}),g.jsx("button",{onClick:()=>a.mutate(),disabled:a.isPending,className:"btn btn-primary",children:a.isPending?"Analyzing...":"🔄 Re-analyze"})]})]}),g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[g.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[g.jsxs("div",{className:"card",children:[g.jsx("h3",{className:"font-semibold mb-3",children:"Description"}),g.jsx("pre",{className:"whitespace-pre-wrap text-gray-300 text-sm bg-gray-900 p-4 rounded-lg",children:o.description||"No description"})]}),o.root_cause&&g.jsxs("div",{className:"card border-green-500/30 bg-green-500/5",children:[g.jsx("h3",{className:"font-semibold mb-3 text-green-400",children:"🔍 Root Cause Analysis"}),g.jsx("pre",{className:"whitespace-pre-wrap text-gray-300 text-sm",children:o.root_cause})]}),((s=o.affected_files)==null?void 0:s.length)>0&&g.jsxs("div",{className:"card",children:[g.jsx("h3",{className:"font-semibold mb-3",children:"📁 Affected Files"}),g.jsx("div",{className:"flex flex-wrap gap-2",children:o.affected_files.map(u=>g.jsx("span",{className:"px-3 py-1 bg-gray-700 rounded font-mono text-sm",children:u},u))})]}),o.suggested_fix&&g.jsxs("div",{className:"card border-purple-500/30 bg-purple-500/5",children:[g.jsx("h3",{className:"font-semibold mb-3 text-purple-400",children:"🔧 Suggested Fix"}),g.jsx("pre",{className:"whitespace-pre-wrap text-gray-300 text-sm font-mono bg-gray-900 p-4 rounded-lg overflow-x-auto",children:o.suggested_fix})]})]}),g.jsxs("div",{className:"space-y-6",children:[o.confidence&&g.jsxs("div",{className:"card",children:[g.jsx("h3",{className:"font-semibold mb-3",children:"Confidence"}),g.jsxs("div",{className:"text-center",children:[g.jsxs("div",{className:"text-4xl font-bold text-green-400",children:[(o.confidence*100).toFixed(0),"%"]}),g.jsx("div",{className:"w-full bg-gray-700 rounded-full h-3 mt-3",children:g.jsx("div",{className:"bg-green-500 h-3 rounded-full transition-all",style:{width:`${o.confidence*100}%`}})})]})]}),o.pr_url&&g.jsxs("div",{className:"card border-blue-500/30 bg-blue-500/5",children:[g.jsx("h3",{className:"font-semibold mb-3 text-blue-400",children:"🔀 Pull Request"}),g.jsxs("p",{className:"text-sm text-gray-400 mb-2",children:["Branch: ",o.pr_branch]}),g.jsx("a",{href:o.pr_url,target:"_blank",rel:"noopener noreferrer",className:"btn btn-primary w-full",children:"View PR →"})]}),((l=o.labels)==null?void 0:l.length)>0&&g.jsxs("div",{className:"card",children:[g.jsx("h3",{className:"font-semibold mb-3",children:"Labels"}),g.jsx("div",{className:"flex flex-wrap gap-2",children:o.labels.map(u=>g.jsx("span",{className:"px-2 py-1 bg-primary-500/20 text-primary-400 rounded text-sm",children:u},u))})]}),g.jsxs("div",{className:"card",children:[g.jsx("h3",{className:"font-semibold mb-3",children:"Timeline"}),g.jsxs("div",{className:"space-y-3 text-sm",children:[g.jsxs("div",{className:"flex justify-between",children:[g.jsx("span",{className:"text-gray-400",children:"Created"}),g.jsx("span",{children:new Date(o.created_at).toLocaleString()})]}),o.analysis_completed_at&&g.jsxs("div",{className:"flex justify-between",children:[g.jsx("span",{className:"text-gray-400",children:"Analyzed"}),g.jsx("span",{children:new Date(o.analysis_completed_at).toLocaleString()})]})]})]})]})]})]}):g.jsx("div",{className:"p-8 text-center text-gray-400",children:"Issue not found"})}const O_=[{type:"jira_cloud",name:"JIRA Cloud",icon:"🔵",desc:"Atlassian JIRA Cloud"},{type:"servicenow",name:"ServiceNow",icon:"⚙️",desc:"ServiceNow ITSM"},{type:"zendesk",name:"Zendesk",icon:"💚",desc:"Zendesk Support"},{type:"github",name:"GitHub",icon:"🐙",desc:"GitHub Issues"},{type:"gitlab",name:"GitLab",icon:"🦊",desc:"GitLab Issues"},{type:"azure_devops",name:"Azure DevOps",icon:"🔷",desc:"Azure Boards"},{type:"tickethub",name:"TicketHub",icon:"🎫",desc:"TicketHub"},{type:"custom_webhook",name:"Custom Webhook",icon:"🔗",desc:"Custom integration"}];function yoe(){const{currentOrg:e}=Hr(),t=Ps(),[r,n]=k.useState(!1),[i,a]=k.useState(null),[o,s]=k.useState({}),{data:l,isLoading:u}=Ai({queryKey:["integrations",e==null?void 0:e.id],queryFn:()=>kp.list(e.id),enabled:!!e}),f=ma({mutationFn:p=>kp.create(e.id,p),onSuccess:()=>{t.invalidateQueries(["integrations",e==null?void 0:e.id]),n(!1),s({}),a(null)}}),c=ma({mutationFn:p=>kp.delete(e.id,p),onSuccess:()=>t.invalidateQueries(["integrations",e==null?void 0:e.id])});if(!e)return g.jsx("div",{className:"p-8 text-center text-gray-400",children:"Select an organization"});const d=(l==null?void 0:l.data)||[],h=()=>{f.mutate({name:o.name,type:i.type,base_url:o.base_url,api_key:o.api_key,callback_url:o.callback_url})};return g.jsxs("div",{className:"p-8",children:[g.jsxs("div",{className:"flex items-center justify-between mb-6",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Integrations"}),g.jsx("button",{onClick:()=>n(!0),className:"btn btn-primary",children:"+ Add Integration"})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[d.map(p=>{const y=O_.find(m=>m.type===p.type);return g.jsxs("div",{className:"card",children:[g.jsxs("div",{className:"flex items-start justify-between mb-4",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"text-3xl",children:(y==null?void 0:y.icon)||"🔗"}),g.jsxs("div",{children:[g.jsx("h3",{className:"font-semibold",children:p.name}),g.jsx("p",{className:"text-sm text-gray-400",children:y==null?void 0:y.name})]})]}),g.jsx("span",{className:le("px-2 py-1 rounded text-xs",p.status==="active"?"bg-green-500/20 text-green-400":"bg-gray-500/20 text-gray-400"),children:p.status})]}),g.jsxs("div",{className:"space-y-2 text-sm mb-4",children:[g.jsxs("div",{className:"flex justify-between",children:[g.jsx("span",{className:"text-gray-400",children:"Issues Processed"}),g.jsx("span",{children:p.issues_processed||0})]}),p.last_sync_at&&g.jsxs("div",{className:"flex justify-between",children:[g.jsx("span",{className:"text-gray-400",children:"Last Event"}),g.jsx("span",{children:new Date(p.last_sync_at).toLocaleDateString()})]})]}),g.jsxs("div",{className:"p-3 bg-gray-900 rounded-lg mb-4",children:[g.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Webhook URL"}),g.jsx("code",{className:"text-xs text-primary-400 break-all",children:p.webhook_url})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"btn btn-secondary flex-1 text-sm",children:"Configure"}),g.jsx("button",{onClick:()=>c.mutate(p.id),className:"btn bg-red-500/20 text-red-400 hover:bg-red-500/30 text-sm",children:"Delete"})]})]},p.id)}),d.length===0&&!u&&g.jsxs("div",{className:"col-span-full text-center py-12",children:[g.jsx("span",{className:"text-5xl",children:"🔌"}),g.jsx("h3",{className:"text-xl font-semibold mt-4",children:"No integrations yet"}),g.jsx("p",{className:"text-gray-400 mt-2",children:"Connect your first issue tracker to get started"})]})]}),r&&g.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:g.jsxs("div",{className:"bg-gray-800 rounded-xl w-full max-w-2xl max-h-[90vh] overflow-hidden",children:[g.jsxs("div",{className:"p-4 border-b border-gray-700 flex justify-between items-center",children:[g.jsx("h2",{className:"text-lg font-semibold",children:i?`Configure ${i.name}`:"Add Integration"}),g.jsx("button",{onClick:()=>{n(!1),a(null)},className:"text-gray-400 hover:text-white",children:"✕"})]}),g.jsx("div",{className:"p-6 overflow-y-auto",children:i?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Name"}),g.jsx("input",{type:"text",value:o.name||"",onChange:p=>s({...o,name:p.target.value}),placeholder:`My ${i.name}`,className:"input"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Base URL (optional)"}),g.jsx("input",{type:"url",value:o.base_url||"",onChange:p=>s({...o,base_url:p.target.value}),placeholder:"https://your-instance.atlassian.net",className:"input"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"API Key (optional)"}),g.jsx("input",{type:"password",value:o.api_key||"",onChange:p=>s({...o,api_key:p.target.value}),placeholder:"Your API key",className:"input"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Callback URL (where to post results)"}),g.jsx("input",{type:"url",value:o.callback_url||"",onChange:p=>s({...o,callback_url:p.target.value}),placeholder:"https://your-instance.atlassian.net/rest/api/2",className:"input"})]}),g.jsxs("div",{className:"flex gap-2 pt-4",children:[g.jsx("button",{onClick:()=>a(null),className:"btn btn-secondary flex-1",children:"Back"}),g.jsx("button",{onClick:h,disabled:!o.name||f.isPending,className:"btn btn-primary flex-1",children:f.isPending?"Creating...":"Create Integration"})]})]}):g.jsx("div",{className:"grid grid-cols-2 gap-4",children:O_.map(p=>g.jsxs("button",{onClick:()=>a(p),className:"p-4 bg-gray-700 rounded-lg hover:bg-gray-600 text-left",children:[g.jsx("span",{className:"text-3xl",children:p.icon}),g.jsx("h3",{className:"font-semibold mt-2",children:p.name}),g.jsx("p",{className:"text-sm text-gray-400",children:p.desc})]},p.type))})})]})})]})}const voe={owner:"bg-yellow-500/20 text-yellow-400",admin:"bg-red-500/20 text-red-400",manager:"bg-purple-500/20 text-purple-400",analyst:"bg-blue-500/20 text-blue-400",viewer:"bg-gray-500/20 text-gray-400"};function goe(){const{currentOrg:e}=Hr(),t=Ps(),[r,n]=k.useState(!1),[i,a]=k.useState({email:"",role:"viewer"}),{data:o,isLoading:s}=Ai({queryKey:["org-members",e==null?void 0:e.id],queryFn:()=>Gl.members(e.id),enabled:!!e}),l=ma({mutationFn:()=>Gl.invite(e.id,i),onSuccess:()=>{t.invalidateQueries(["org-members",e==null?void 0:e.id]),n(!1),a({email:"",role:"viewer"})}});if(!e)return g.jsx("div",{className:"p-8 text-center text-gray-400",children:"Select an organization"});const u=(o==null?void 0:o.data)||[];return g.jsxs("div",{className:"p-8",children:[g.jsxs("div",{className:"flex items-center justify-between mb-6",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Team"}),g.jsx("button",{onClick:()=>n(!0),className:"btn btn-primary",children:"+ Invite Member"})]}),g.jsx("div",{className:"card",children:s?g.jsx("div",{className:"text-center py-8 text-gray-400",children:"Loading..."}):g.jsx("div",{className:"divide-y divide-gray-700",children:u.map(f=>{var c,d,h,p,y,m;return g.jsxs("div",{className:"flex items-center justify-between p-4",children:[g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx("div",{className:"w-10 h-10 bg-primary-600 rounded-full flex items-center justify-center font-semibold",children:((d=(c=f.user)==null?void 0:c.full_name)==null?void 0:d[0])||((p=(h=f.user)==null?void 0:h.email)==null?void 0:p[0])||"?"}),g.jsxs("div",{children:[g.jsx("p",{className:"font-medium",children:((y=f.user)==null?void 0:y.full_name)||"Unknown"}),g.jsx("p",{className:"text-sm text-gray-400",children:(m=f.user)==null?void 0:m.email})]})]}),g.jsx("span",{className:`px-3 py-1 rounded text-sm ${voe[f.role]}`,children:f.role})]},f.id)})})}),r&&g.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:g.jsxs("div",{className:"bg-gray-800 rounded-xl w-full max-w-md p-6",children:[g.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Invite Team Member"}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Email"}),g.jsx("input",{type:"email",value:i.email,onChange:f=>a({...i,email:f.target.value}),className:"input",placeholder:"colleague@company.com"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Role"}),g.jsxs("select",{value:i.role,onChange:f=>a({...i,role:f.target.value}),className:"input",children:[g.jsx("option",{value:"viewer",children:"Viewer - Read only"}),g.jsx("option",{value:"analyst",children:"Analyst - Can analyze"}),g.jsx("option",{value:"manager",children:"Manager - Can manage issues"}),g.jsx("option",{value:"admin",children:"Admin - Full access"})]})]})]}),g.jsxs("div",{className:"flex gap-2 mt-6",children:[g.jsx("button",{onClick:()=>n(!1),className:"btn btn-secondary flex-1",children:"Cancel"}),g.jsx("button",{onClick:()=>l.mutate(),disabled:!i.email||l.isPending,className:"btn btn-primary flex-1",children:l.isPending?"Sending...":"Send Invite"})]})]})})]})}function boe(){const{currentOrg:e}=Hr(),[t,r]=k.useState(30),{data:n,isLoading:i}=Ai({queryKey:["report",e==null?void 0:e.id,t],queryFn:()=>Sy.summary(e.id,t),enabled:!!e}),a=async()=>{const s=await Sy.exportCsv(e.id,t),l=window.URL.createObjectURL(new Blob([s.data])),u=document.createElement("a");u.href=l,u.download=`issues-report-${new Date().toISOString().split("T")[0]}.csv`,u.click()};if(!e)return g.jsx("div",{className:"p-8 text-center text-gray-400",children:"Select an organization"});const o=(n==null?void 0:n.data)||{};return g.jsxs("div",{className:"p-8",children:[g.jsxs("div",{className:"flex items-center justify-between mb-6",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Reports"}),g.jsxs("div",{className:"flex gap-4",children:[g.jsxs("select",{value:t,onChange:s=>r(Number(s.target.value)),className:"input w-40",children:[g.jsx("option",{value:7,children:"Last 7 days"}),g.jsx("option",{value:14,children:"Last 14 days"}),g.jsx("option",{value:30,children:"Last 30 days"}),g.jsx("option",{value:90,children:"Last 90 days"})]}),g.jsx("button",{onClick:a,className:"btn btn-primary",children:"📥 Export CSV"})]})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6 mb-8",children:[g.jsxs("div",{className:"card",children:[g.jsx("p",{className:"text-gray-400 text-sm",children:"Total Issues"}),g.jsx("p",{className:"text-3xl font-bold mt-1",children:o.total_issues||0})]}),g.jsxs("div",{className:"card",children:[g.jsx("p",{className:"text-gray-400 text-sm",children:"Analyzed"}),g.jsx("p",{className:"text-3xl font-bold mt-1 text-green-400",children:o.analyzed_issues||0})]}),g.jsxs("div",{className:"card",children:[g.jsx("p",{className:"text-gray-400 text-sm",children:"PRs Created"}),g.jsx("p",{className:"text-3xl font-bold mt-1 text-purple-400",children:o.prs_created||0})]}),g.jsxs("div",{className:"card",children:[g.jsx("p",{className:"text-gray-400 text-sm",children:"Avg Confidence"}),g.jsx("p",{className:"text-3xl font-bold mt-1 text-yellow-400",children:o.avg_confidence?`${(o.avg_confidence*100).toFixed(0)}%`:"N/A"})]})]}),g.jsxs("div",{className:"card mb-8",children:[g.jsx("h3",{className:"font-semibold mb-4",children:"Trend"}),g.jsx("div",{className:"h-80",children:i?g.jsx("div",{className:"flex items-center justify-center h-full text-gray-400",children:"Loading..."}):g.jsx(tf,{width:"100%",height:"100%",children:g.jsxs(KC,{data:o.daily_breakdown||[],children:[g.jsx(Na,{dataKey:"date",tick:{fill:"#9ca3af",fontSize:12}}),g.jsx(Ma,{tick:{fill:"#9ca3af",fontSize:12}}),g.jsx(rr,{contentStyle:{backgroundColor:"#1f2937",border:"1px solid #374151"}}),g.jsx(Or,{type:"monotone",dataKey:"total",stroke:"#6366f1",fill:"#6366f1",fillOpacity:.3,name:"Total"}),g.jsx(Or,{type:"monotone",dataKey:"analyzed",stroke:"#22c55e",fill:"#22c55e",fillOpacity:.3,name:"Analyzed"}),g.jsx(Or,{type:"monotone",dataKey:"prs_created",stroke:"#a855f7",fill:"#a855f7",fillOpacity:.3,name:"PRs"})]})})})]}),g.jsxs("div",{className:"card",children:[g.jsx("h3",{className:"font-semibold mb-4",children:"Top Sources"}),g.jsx("div",{className:"space-y-3",children:(o.top_sources||[]).map(s=>g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx("span",{className:"w-24 text-gray-400",children:s.source}),g.jsx("div",{className:"flex-1 bg-gray-700 rounded-full h-4",children:g.jsx("div",{className:"bg-primary-500 h-4 rounded-full",style:{width:`${s.count/o.total_issues*100||0}%`}})}),g.jsx("span",{className:"w-12 text-right",children:s.count})]},s.source))})]})]})}function xoe(){const{currentOrg:e,selectOrg:t,user:r}=Hr(),n=Ps(),[i,a]=k.useState("profile"),[o,s]=k.useState({full_name:(r==null?void 0:r.full_name)||""}),[l,u]=k.useState({name:(e==null?void 0:e.name)||"",slug:(e==null?void 0:e.slug)||""}),[f,c]=k.useState({name:"",slug:""}),d=ma({mutationFn:m=>Ij.updateMe(m),onSuccess:()=>n.invalidateQueries(["user"])}),h=ma({mutationFn:m=>Gl.update(e.id,m),onSuccess:m=>{n.invalidateQueries(["organizations"]),t(m.data)}}),p=ma({mutationFn:m=>Gl.create(m),onSuccess:m=>{n.invalidateQueries(["organizations"]),t(m.data),c({name:"",slug:""})}}),y=[{id:"profile",label:"Profile",icon:"👤"},{id:"organization",label:"Organization",icon:"🏢"},{id:"new-org",label:"New Organization",icon:"➕"}];return g.jsxs("div",{className:"p-8",children:[g.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Settings"}),g.jsxs("div",{className:"flex gap-8",children:[g.jsx("div",{className:"w-48 space-y-1",children:y.map(m=>g.jsxs("button",{onClick:()=>a(m.id),className:`w-full text-left px-4 py-2 rounded-lg flex items-center gap-2 ${i===m.id?"bg-primary-600 text-white":"text-gray-400 hover:bg-gray-700"}`,children:[g.jsx("span",{children:m.icon}),g.jsx("span",{children:m.label})]},m.id))}),g.jsxs("div",{className:"flex-1",children:[i==="profile"&&g.jsxs("div",{className:"card max-w-xl",children:[g.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Profile Settings"}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Email"}),g.jsx("input",{type:"email",value:(r==null?void 0:r.email)||"",disabled:!0,className:"input bg-gray-900"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Full Name"}),g.jsx("input",{type:"text",value:o.full_name,onChange:m=>s({...o,full_name:m.target.value}),className:"input"})]}),g.jsx("button",{onClick:()=>d.mutate(o),disabled:d.isPending,className:"btn btn-primary",children:d.isPending?"Saving...":"Save Profile"})]})]}),i==="organization"&&e&&g.jsxs("div",{className:"card max-w-xl",children:[g.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Organization Settings"}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Organization Name"}),g.jsx("input",{type:"text",value:l.name,onChange:m=>u({...l,name:m.target.value}),className:"input"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Slug"}),g.jsx("input",{type:"text",value:l.slug,onChange:m=>u({...l,slug:m.target.value}),className:"input"})]}),g.jsxs("div",{className:"pt-4 border-t border-gray-700",children:[g.jsx("h3",{className:"font-medium mb-2",children:"Webhook Base URL"}),g.jsxs("code",{className:"block p-3 bg-gray-900 rounded-lg text-sm text-primary-400 break-all",children:["https://jira-fixer.startdata.com.br/api/webhook/",e.id,"/"]}),g.jsx("p",{className:"text-xs text-gray-400 mt-2",children:"Append: jira, servicenow, zendesk, github, gitlab, tickethub, or generic"})]}),g.jsx("button",{onClick:()=>h.mutate(l),disabled:h.isPending,className:"btn btn-primary",children:h.isPending?"Saving...":"Save Organization"})]})]}),i==="new-org"&&g.jsxs("div",{className:"card max-w-xl",children:[g.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Create New Organization"}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Organization Name"}),g.jsx("input",{type:"text",value:f.name,onChange:m=>c({...f,name:m.target.value}),className:"input",placeholder:"Acme Corp"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium mb-2",children:"Slug (URL-friendly)"}),g.jsx("input",{type:"text",value:f.slug,onChange:m=>c({...f,slug:m.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")}),className:"input",placeholder:"acme-corp"})]}),g.jsx("button",{onClick:()=>p.mutate(f),disabled:!f.name||!f.slug||p.isPending,className:"btn btn-primary",children:p.isPending?"Creating...":"Create Organization"})]})]})]})]})]})}function woe({children:e}){const{user:t,loading:r}=Hr();return r?g.jsx("div",{className:"flex items-center justify-center h-screen",children:"Loading..."}):t?e:g.jsx(hM,{to:"/login"})}function Soe(){return g.jsxs(yM,{children:[g.jsx(Cr,{path:"/login",element:g.jsx(TL,{})}),g.jsx(Cr,{path:"/register",element:g.jsx(CL,{})}),g.jsxs(Cr,{path:"/",element:g.jsx(woe,{children:g.jsx(kL,{})}),children:[g.jsx(Cr,{index:!0,element:g.jsx(foe,{})}),g.jsx(Cr,{path:"issues",element:g.jsx(poe,{})}),g.jsx(Cr,{path:"issues/:id",element:g.jsx(moe,{})}),g.jsx(Cr,{path:"integrations",element:g.jsx(yoe,{})}),g.jsx(Cr,{path:"team",element:g.jsx(goe,{})}),g.jsx(Cr,{path:"reports",element:g.jsx(boe,{})}),g.jsx(Cr,{path:"settings",element:g.jsx(xoe,{})})]})]})}const Ooe=new QM({defaultOptions:{queries:{staleTime:3e4,retry:1}}});lm.createRoot(document.getElementById("root")).render(g.jsx(j.StrictMode,{children:g.jsx(YM,{client:Ooe,children:g.jsx(OM,{children:g.jsx(zR,{children:g.jsx(Soe,{})})})})}));