From 3e9bfd3f33eae4e8bb1dbfcbefbfd79279c16b93 Mon Sep 17 00:00:00 2001 From: hosseintaromi Date: Mon, 21 Jul 2025 23:48:39 +0330 Subject: [PATCH] feat(swagger): add Swagger UI documentation page --- dist/assets/index-11d6a01f.js | 325 -------------------------------- dist/assets/index-3e6ed4d8.css | 1 + dist/assets/index-53835730.css | 1 - dist/assets/index-f7f2c4d5.js | 330 +++++++++++++++++++++++++++++++++ dist/index.html | 4 +- swagger-ui.html | 46 +++++ 6 files changed, 379 insertions(+), 328 deletions(-) delete mode 100644 dist/assets/index-11d6a01f.js create mode 100644 dist/assets/index-3e6ed4d8.css delete mode 100644 dist/assets/index-53835730.css create mode 100644 dist/assets/index-f7f2c4d5.js create mode 100644 swagger-ui.html diff --git a/dist/assets/index-11d6a01f.js b/dist/assets/index-11d6a01f.js deleted file mode 100644 index 93a6a4d..0000000 --- a/dist/assets/index-11d6a01f.js +++ /dev/null @@ -1,325 +0,0 @@ -var M$=Object.defineProperty;var I$=(e,t,r)=>t in e?M$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ku=(e,t,r)=>(I$(e,typeof t!="symbol"?t+"":t,r),r),np=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var U=(e,t,r)=>(np(e,t,"read from private field"),r?r.call(e):t.get(e)),ge=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},fe=(e,t,r,n)=>(np(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Gu=(e,t,r,n)=>({set _(i){fe(e,t,i,r)},get _(){return U(e,t,n)}}),_t=(e,t,r)=>(np(e,t,"access private method"),r);function D$(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 Xu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Se(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C_={exports:{}},Td={},N_={exports:{}},pe={};/** - * @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 ju=Symbol.for("react.element"),R$=Symbol.for("react.portal"),L$=Symbol.for("react.fragment"),F$=Symbol.for("react.strict_mode"),B$=Symbol.for("react.profiler"),z$=Symbol.for("react.provider"),U$=Symbol.for("react.context"),V$=Symbol.for("react.forward_ref"),W$=Symbol.for("react.suspense"),H$=Symbol.for("react.memo"),q$=Symbol.for("react.lazy"),mx=Symbol.iterator;function K$(e){return e===null||typeof e!="object"?null:(e=mx&&e[mx]||e["@@iterator"],typeof e=="function"?e:null)}var M_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I_=Object.assign,D_={};function cs(e,t,r){this.props=e,this.context=t,this.refs=D_,this.updater=r||M_}cs.prototype.isReactComponent={};cs.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")};cs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function R_(){}R_.prototype=cs.prototype;function Kv(e,t,r){this.props=e,this.context=t,this.refs=D_,this.updater=r||M_}var Gv=Kv.prototype=new R_;Gv.constructor=Kv;I_(Gv,cs.prototype);Gv.isPureReactComponent=!0;var vx=Array.isArray,L_=Object.prototype.hasOwnProperty,Xv={current:null},F_={key:!0,ref:!0,__self:!0,__source:!0};function B_(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)L_.call(t,n)&&!F_.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,K=I[Q];if(0>>1;Qi(Ee,H))Vei(St,Ee)?(I[Q]=St,I[Ve]=H,Q=Ve):(I[Q]=Ee,I[me]=H,Q=me);else if(Vei(St,H))I[Q]=St,I[Ve]=H,Q=Ve;else break e}}return F}function i(I,F){var H=I.sortIndex-F.sortIndex;return H!==0?H:I.id-F.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,y=!1,p=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(I){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=I)n(u),F.sortIndex=F.expirationTime,t(l,F);else break;F=r(u)}}function O(I){if(p=!1,v(I),!y)if(r(l)!==null)y=!0,L(w);else{var F=r(u);F!==null&&V(O,F.startTime-I)}}function w(I,F){y=!1,p&&(p=!1,x(P),P=-1),h=!0;var H=d;try{for(v(F),c=r(l);c!==null&&(!(c.expirationTime>F)||I&&!E());){var Q=c.callback;if(typeof Q=="function"){c.callback=null,d=c.priorityLevel;var K=Q(c.expirationTime<=F);F=e.unstable_now(),typeof K=="function"?c.callback=K:c===r(l)&&n(l),v(F)}else n(l);c=r(l)}if(c!==null)var ne=!0;else{var me=r(u);me!==null&&V(O,me.startTime-F),ne=!1}return ne}finally{c=null,d=H,h=!1}}var S=!1,_=null,P=-1,A=5,C=-1;function E(){return!(e.unstable_now()-CI||125Q?(I.sortIndex=H,t(u,I),r(l)===null&&I===r(u)&&(p?(x(P),P=-1):p=!0,V(O,H-Q))):(I.sortIndex=K,t(l,I),y||h||(y=!0,L(w))),I},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(I){var F=d;return function(){var H=d;d=F;try{return I.apply(this,arguments)}finally{d=H}}}})(H_);W_.exports=H_;var aT=W_.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 oT=j,fr=aT;function q(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"),py=Object.prototype.hasOwnProperty,sT=/^[: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]*$/,xx={},bx={};function lT(e){return py.call(bx,e)?!0:py.call(xx,e)?!1:sT.test(e)?bx[e]=!0:(xx[e]=!0,!1)}function uT(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 cT(e,t,r,n){if(t===null||typeof t>"u"||uT(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 Wt(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 Wt(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 Wt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){wt[e]=new Wt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wt[e]=new Wt(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 Wt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){wt[e]=new Wt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){wt[e]=new Wt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){wt[e]=new Wt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){wt[e]=new Wt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Qv=/[\-:]([a-z])/g;function Zv(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(Qv,Zv);wt[t]=new Wt(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(Qv,Zv);wt[t]=new Wt(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(Qv,Zv);wt[t]=new Wt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){wt[e]=new Wt(e,1,!1,e.toLowerCase(),null,!1,!1)});wt.xlinkHref=new Wt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){wt[e]=new Wt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Jv(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{op=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Zs(e):""}function fT(e){switch(e.tag){case 5:return Zs(e.type);case 16:return Zs("Lazy");case 13:return Zs("Suspense");case 19:return Zs("SuspenseList");case 0:case 2:case 15:return e=sp(e.type,!1),e;case 11:return e=sp(e.type.render,!1),e;case 1:return e=sp(e.type,!0),e;default:return""}}function gy(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 Ka:return"Fragment";case qa:return"Portal";case yy:return"Profiler";case eg:return"StrictMode";case my:return"Suspense";case vy:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case G_:return(e.displayName||"Context")+".Consumer";case K_:return(e._context.displayName||"Context")+".Provider";case tg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case rg:return t=e.displayName||null,t!==null?t:gy(e.type)||"Memo";case ni:t=e._payload,e=e._init;try{return gy(e(t))}catch{}}return null}function dT(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 gy(t);case 8:return t===eg?"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 Ti(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Y_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hT(e){var t=Y_(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 Zu(e){e._valueTracker||(e._valueTracker=hT(e))}function Q_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Y_(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Gc(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 xy(e,t){var r=t.checked;return Ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Sx(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ti(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 Z_(e,t){t=t.checked,t!=null&&Jv(e,"checked",t,!1)}function by(e,t){Z_(e,t);var r=Ti(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")?wy(e,t.type,r):t.hasOwnProperty("defaultValue")&&wy(e,t.type,Ti(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ox(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 wy(e,t,r){(t!=="number"||Gc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Js=Array.isArray;function fo(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ju.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _l(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var nl={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},pT=["Webkit","ms","Moz","O"];Object.keys(nl).forEach(function(e){pT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nl[t]=nl[e]})});function rP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||nl.hasOwnProperty(e)&&nl[e]?(""+t).trim():t+"px"}function nP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=rP(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var yT=Ke({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 _y(e,t){if(t){if(yT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function Py(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 Ay=null;function ng(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ky=null,ho=null,po=null;function Ax(e){if(e=Tu(e)){if(typeof ky!="function")throw Error(q(280));var t=e.stateNode;t&&(t=Dd(t),ky(e.stateNode,e.type,t))}}function iP(e){ho?po?po.push(e):po=[e]:ho=e}function aP(){if(ho){var e=ho,t=po;if(po=ho=null,Ax(e),t)for(e=0;e>>=0,e===0?32:31-(AT(e)/kT|0)|0}var ec=64,tc=4194304;function el(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 Zc(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=el(s):(a&=o,a!==0&&(n=el(a)))}else o=r&~i,o!==0?n=el(o):a!==0&&(n=el(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 Eu(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Hr(t),e[t]=r}function TT(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=al),Ix=String.fromCharCode(32),Dx=!1;function PP(e,t){switch(e){case"keyup":return aC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function AP(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ga=!1;function sC(e,t){switch(e){case"compositionend":return AP(t);case"keypress":return t.which!==32?null:(Dx=!0,Ix);case"textInput":return e=t.data,e===Ix&&Dx?null:e;default:return null}}function lC(e,t){if(Ga)return e==="compositionend"||!fg&&PP(e,t)?(e=OP(),Mc=lg=mi=null,Ga=!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=Bx(r)}}function $P(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?$P(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function TP(){for(var e=window,t=Gc();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Gc(e.document)}return t}function dg(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 vC(e){var t=TP(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&$P(r.ownerDocument.documentElement,r)){if(n!==null&&dg(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=zx(r,a);var o=zx(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,Xa=null,Ny=null,sl=null,My=!1;function Ux(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;My||Xa==null||Xa!==Gc(n)||(n=Xa,"selectionStart"in n&&dg(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}),sl&&$l(sl,n)||(sl=n,n=tf(Ny,"onSelect"),0Za||(e.current=By[Za],By[Za]=null,Za--)}function Me(e,t){Za++,By[Za]=e.current,e.current=t}var Ci={},Ct=Ii(Ci),Qt=Ii(!1),va=Ci;function Co(e,t){var r=e.type.contextTypes;if(!r)return Ci;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 Zt(e){return e=e.childContextTypes,e!=null}function nf(){Fe(Qt),Fe(Ct)}function Xx(e,t,r){if(Ct.current!==Ci)throw Error(q(168));Me(Ct,t),Me(Qt,r)}function BP(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(q(108,dT(e)||"Unknown",i));return Ke({},r,n)}function af(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ci,va=Ct.current,Me(Ct,e),Me(Qt,Qt.current),!0}function Yx(e,t,r){var n=e.stateNode;if(!n)throw Error(q(169));r?(e=BP(e,t,va),n.__reactInternalMemoizedMergedChildContext=e,Fe(Qt),Fe(Ct),Me(Ct,e)):Fe(Qt),Me(Qt,r)}var An=null,Rd=!1,wp=!1;function zP(e){An===null?An=[e]:An.push(e)}function EC(e){Rd=!0,zP(e)}function Di(){if(!wp&&An!==null){wp=!0;var e=0,t=_e;try{var r=An;for(_e=1;e>=o,i-=o,jn=1<<32-Hr(t)+i|r<P?(A=_,_=null):A=_.sibling;var C=d(x,_,v[P],O);if(C===null){_===null&&(_=A);break}e&&_&&C.alternate===null&&t(x,_),m=a(C,m,P),S===null?w=C:S.sibling=C,S=C,_=A}if(P===v.length)return r(x,_),ze&&Hi(x,P),w;if(_===null){for(;PP?(A=_,_=null):A=_.sibling;var E=d(x,_,C.value,O);if(E===null){_===null&&(_=A);break}e&&_&&E.alternate===null&&t(x,_),m=a(E,m,P),S===null?w=E:S.sibling=E,S=E,_=A}if(C.done)return r(x,_),ze&&Hi(x,P),w;if(_===null){for(;!C.done;P++,C=v.next())C=c(x,C.value,O),C!==null&&(m=a(C,m,P),S===null?w=C:S.sibling=C,S=C);return ze&&Hi(x,P),w}for(_=n(x,_);!C.done;P++,C=v.next())C=h(_,x,P,C.value,O),C!==null&&(e&&C.alternate!==null&&_.delete(C.key===null?P:C.key),m=a(C,m,P),S===null?w=C:S.sibling=C,S=C);return e&&_.forEach(function(T){return t(x,T)}),ze&&Hi(x,P),w}function b(x,m,v,O){if(typeof v=="object"&&v!==null&&v.type===Ka&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Qu:e:{for(var w=v.key,S=m;S!==null;){if(S.key===w){if(w=v.type,w===Ka){if(S.tag===7){r(x,S.sibling),m=i(S,v.props.children),m.return=x,x=m;break e}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===ni&&Jx(w)===S.type){r(x,S.sibling),m=i(S,v.props),m.ref=Ds(x,S,v),m.return=x,x=m;break e}r(x,S);break}else t(x,S);S=S.sibling}v.type===Ka?(m=ha(v.props.children,x.mode,O,v.key),m.return=x,x=m):(O=Uc(v.type,v.key,v.props,null,x.mode,O),O.ref=Ds(x,m,v),O.return=x,x=O)}return o(x);case qa:e:{for(S=v.key;m!==null;){if(m.key===S)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){r(x,m.sibling),m=i(m,v.children||[]),m.return=x,x=m;break e}else{r(x,m);break}else t(x,m);m=m.sibling}m=Ep(v,x.mode,O),m.return=x,x=m}return o(x);case ni:return S=v._init,b(x,m,S(v._payload),O)}if(Js(v))return y(x,m,v,O);if(Ts(v))return p(x,m,v,O);lc(x,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(r(x,m.sibling),m=i(m,v),m.return=x,x=m):(r(x,m),m=jp(v,x.mode,O),m.return=x,x=m),o(x)):r(x,m)}return b}var Mo=HP(!0),qP=HP(!1),lf=Ii(null),uf=null,to=null,mg=null;function vg(){mg=to=uf=null}function gg(e){var t=lf.current;Fe(lf),e._currentValue=t}function Vy(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 mo(e,t){uf=e,mg=to=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xt=!0),e.firstContext=null)}function kr(e){var t=e._currentValue;if(mg!==e)if(e={context:e,memoizedValue:t,next:null},to===null){if(uf===null)throw Error(q(308));to=e,uf.dependencies={lanes:0,firstContext:e}}else to=to.next=e;return t}var Zi=null;function xg(e){Zi===null?Zi=[e]:Zi.push(e)}function KP(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,xg(t)):(r.next=i.next,i.next=r),t.interleaved=r,Fn(e,n)}function Fn(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 ii=!1;function bg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function GP(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 Nn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function _i(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,Fn(e,r)}return i=n.interleaved,i===null?(t.next=t,xg(n)):(t.next=i.next,i.next=t),n.interleaved=t,Fn(e,r)}function Dc(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,ag(e,r)}}function eb(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 cf(e,t,r,n){var i=e.updateQueue;ii=!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 y=e,p=s;switch(d=t,h=r,p.tag){case 1:if(y=p.payload,typeof y=="function"){c=y.call(h,c,d);break e}c=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=p.payload,d=typeof y=="function"?y.call(h,c,d):y,d==null)break e;c=Ke({},c,d);break e;case 2:ii=!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(1);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);ba|=o,e.lanes=o,e.memoizedState=c}}function tb(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Op.transition;Op.transition={};try{e(!1),t()}finally{_e=r,Op.transition=n}}function fA(){return jr().memoizedState}function NC(e,t,r){var n=Ai(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},dA(e))hA(t,r);else if(r=KP(e,t,r,n),r!==null){var i=Ut();qr(r,e,n,i),pA(r,t,n)}}function MC(e,t,r){var n=Ai(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(dA(e))hA(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,Gr(s,o)){var l=t.interleaved;l===null?(i.next=i,xg(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=KP(e,t,i,n),r!==null&&(i=Ut(),qr(r,e,n,i),pA(r,t,n))}}function dA(e){var t=e.alternate;return e===He||t!==null&&t===He}function hA(e,t){ll=df=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function pA(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ag(e,r)}}var hf={readContext:kr,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},IC={readContext:kr,useCallback:function(e,t){return Qr().memoizedState=[e,t===void 0?null:t],e},useContext:kr,useEffect:nb,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Lc(4194308,4,oA.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Lc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Lc(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=NC.bind(null,He,e),[n.memoizedState,e]},useRef:function(e){var t=Qr();return e={current:e},t.memoizedState=e},useState:rb,useDebugValue:jg,useDeferredValue:function(e){return Qr().memoizedState=e},useTransition:function(){var e=rb(!1),t=e[0];return e=CC.bind(null,e[1]),Qr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=He,i=Qr();if(ze){if(r===void 0)throw Error(q(407));r=r()}else{if(r=t(),yt===null)throw Error(q(349));xa&30||ZP(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,nb(eA.bind(null,n,a,e),[e]),n.flags|=2048,Ll(9,JP.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=Qr(),t=yt.identifierPrefix;if(ze){var r=En,n=jn;r=(n&~(1<<32-Hr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Dl++,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[nn]=t,e[Nl]=n,_A(e,t,!1,!1),t.stateNode=e;e:{switch(o=Py(r,n),r){case"dialog":De("cancel",e),De("close",e),i=n;break;case"iframe":case"object":case"embed":De("load",e),i=n;break;case"video":case"audio":for(i=0;iRo&&(t.flags|=128,n=!0,Rs(a,!1),t.lanes=4194304)}else{if(!n)if(e=ff(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Rs(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!ze)return At(t),null}else 2*Je()-a.renderingStartTime>Ro&&r!==1073741824&&(t.flags|=128,n=!0,Rs(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=Je(),t.sibling=null,r=We.current,Me(We,n?r&1|2:r&1),t):(At(t),null);case 22:case 23:return Mg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?nr&1073741824&&(At(t),t.subtreeFlags&6&&(t.flags|=8192)):At(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function VC(e,t){switch(pg(t),t.tag){case 1:return Zt(t.type)&&nf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Io(),Fe(Qt),Fe(Ct),Og(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Sg(t),null;case 13:if(Fe(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));No()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fe(We),null;case 4:return Io(),null;case 10:return gg(t.type._context),null;case 22:case 23:return Mg(),null;case 24:return null;default:return null}}var cc=!1,$t=!1,WC=typeof WeakSet=="function"?WeakSet:Set,ee=null;function ro(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ye(e,t,n)}else r.current=null}function Zy(e,t,r){try{r()}catch(n){Ye(e,t,n)}}var pb=!1;function HC(e,t){if(Iy=Jc,e=TP(),dg(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(Dy={focusedElem:e,selectionRange:r},Jc=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var p=y.memoizedProps,b=y.memoizedState,x=t.stateNode,m=x.getSnapshotBeforeUpdate(t.elementType===t.type?p:Mr(t.type,p),b);x.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(O){Ye(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return y=pb,pb=!1,y}function ul(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&&Zy(t,r,a)}i=i.next}while(i!==n)}}function Bd(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 Jy(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 kA(e){var t=e.alternate;t!==null&&(e.alternate=null,kA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nn],delete t[Nl],delete t[Fy],delete t[kC],delete t[jC])),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 jA(e){return e.tag===5||e.tag===3||e.tag===4}function yb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jA(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 em(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=rf));else if(n!==4&&(e=e.child,e!==null))for(em(e,t,r),e=e.sibling;e!==null;)em(e,t,r),e=e.sibling}function tm(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(tm(e,t,r),e=e.sibling;e!==null;)tm(e,t,r),e=e.sibling}var xt=null,Lr=!1;function Jn(e,t,r){for(r=r.child;r!==null;)EA(e,t,r),r=r.sibling}function EA(e,t,r){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(Cd,r)}catch{}switch(r.tag){case 5:$t||ro(r,t);case 6:var n=xt,i=Lr;xt=null,Jn(e,t,r),xt=n,Lr=i,xt!==null&&(Lr?(e=xt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):xt.removeChild(r.stateNode));break;case 18:xt!==null&&(Lr?(e=xt,r=r.stateNode,e.nodeType===8?bp(e.parentNode,r):e.nodeType===1&&bp(e,r),jl(e)):bp(xt,r.stateNode));break;case 4:n=xt,i=Lr,xt=r.stateNode.containerInfo,Lr=!0,Jn(e,t,r),xt=n,Lr=i;break;case 0:case 11:case 14:case 15:if(!$t&&(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)&&Zy(r,t,o),i=i.next}while(i!==n)}Jn(e,t,r);break;case 1:if(!$t&&(ro(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ye(r,t,s)}Jn(e,t,r);break;case 21:Jn(e,t,r);break;case 22:r.mode&1?($t=(n=$t)||r.memoizedState!==null,Jn(e,t,r),$t=n):Jn(e,t,r);break;default:Jn(e,t,r)}}function mb(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new WC),t.forEach(function(n){var i=eN.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Cr(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Je()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*KC(n/1960))-n,10e?16:e,vi===null)var n=!1;else{if(e=vi,vi=null,mf=0,ve&6)throw Error(q(331));var i=ve;for(ve|=4,ee=e.current;ee!==null;){var a=ee,o=a.child;if(ee.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lJe()-Cg?da(e,0):Tg|=r),Jt(e,t)}function RA(e,t){t===0&&(e.mode&1?(t=tc,tc<<=1,!(tc&130023424)&&(tc=4194304)):t=1);var r=Ut();e=Fn(e,t),e!==null&&(Eu(e,t,r),Jt(e,r))}function JC(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),RA(e,r)}function eN(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(q(314))}n!==null&&n.delete(t),RA(e,r)}var LA;LA=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qt.current)Xt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Xt=!1,zC(e,t,r);Xt=!!(e.flags&131072)}else Xt=!1,ze&&t.flags&1048576&&UP(t,sf,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Fc(e,t),e=t.pendingProps;var i=Co(t,Ct.current);mo(t,r),i=Pg(null,t,n,e,i,r);var a=Ag();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,Zt(n)?(a=!0,af(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,bg(t),i.updater=Fd,t.stateNode=i,i._reactInternals=t,Hy(t,n,e,r),t=Gy(null,t,n,!0,a,r)):(t.tag=0,ze&&a&&hg(t),It(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Fc(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=rN(n),e=Mr(n,e),i){case 0:t=Ky(null,t,n,e,r);break e;case 1:t=fb(null,t,n,e,r);break e;case 11:t=ub(null,t,n,e,r);break e;case 14:t=cb(null,t,n,Mr(n.type,e),r);break e}throw Error(q(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Mr(n,i),Ky(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Mr(n,i),fb(e,t,n,i,r);case 3:e:{if(wA(t),e===null)throw Error(q(387));n=t.pendingProps,a=t.memoizedState,i=a.element,GP(e,t),cf(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=Do(Error(q(423)),t),t=db(e,t,n,r,i);break e}else if(n!==i){i=Do(Error(q(424)),t),t=db(e,t,n,r,i);break e}else for(sr=Oi(t.stateNode.containerInfo.firstChild),lr=t,ze=!0,zr=null,r=qP(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(No(),n===i){t=Bn(e,t,r);break e}It(e,t,n,r)}t=t.child}return t;case 5:return XP(t),e===null&&Uy(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,Ry(n,i)?o=null:a!==null&&Ry(n,a)&&(t.flags|=32),bA(e,t),It(e,t,o,r),t.child;case 6:return e===null&&Uy(t),null;case 13:return SA(e,t,r);case 4:return wg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Mo(t,null,n,r):It(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Mr(n,i),ub(e,t,n,i,r);case 7:return It(e,t,t.pendingProps,r),t.child;case 8:return It(e,t,t.pendingProps.children,r),t.child;case 12:return It(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,Me(lf,n._currentValue),n._currentValue=o,a!==null)if(Gr(a.value,o)){if(a.children===i.children&&!Qt.current){t=Bn(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=Nn(-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),Vy(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(q(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Vy(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}It(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,mo(t,r),i=kr(i),n=n(i),t.flags|=1,It(e,t,n,r),t.child;case 14:return n=t.type,i=Mr(n,t.pendingProps),i=Mr(n.type,i),cb(e,t,n,i,r);case 15:return gA(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Mr(n,i),Fc(e,t),t.tag=1,Zt(n)?(e=!0,af(t)):e=!1,mo(t,r),yA(t,n,i),Hy(t,n,i,r),Gy(null,t,n,!0,e,r);case 19:return OA(e,t,r);case 22:return xA(e,t,r)}throw Error(q(156,t.tag))};function FA(e,t){return dP(e,t)}function tN(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 _r(e,t,r,n){return new tN(e,t,r,n)}function Dg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rN(e){if(typeof e=="function")return Dg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tg)return 11;if(e===rg)return 14}return 2}function ki(e,t){var r=e.alternate;return r===null?(r=_r(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 Uc(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")Dg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ka:return ha(r.children,i,a,t);case eg:o=8,i|=8;break;case yy:return e=_r(12,r,t,i|2),e.elementType=yy,e.lanes=a,e;case my:return e=_r(13,r,t,i),e.elementType=my,e.lanes=a,e;case vy:return e=_r(19,r,t,i),e.elementType=vy,e.lanes=a,e;case X_:return Ud(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case K_:o=10;break e;case G_:o=9;break e;case tg:o=11;break e;case rg:o=14;break e;case ni:o=16,n=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=_r(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function ha(e,t,r,n){return e=_r(7,e,n,t),e.lanes=r,e}function Ud(e,t,r,n){return e=_r(22,e,n,t),e.elementType=X_,e.lanes=r,e.stateNode={isHidden:!1},e}function jp(e,t,r){return e=_r(6,e,null,t),e.lanes=r,e}function Ep(e,t,r){return t=_r(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nN(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=up(0),this.expirationTimes=up(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=up(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Rg(e,t,r,n,i,a,o,s,l){return e=new nN(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=_r(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},bg(a),e}function iN(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=dr;var uN=V_.exports,_b=uN;hy.createRoot=_b.createRoot,hy.hydrateRoot=_b.hydrateRoot;/** - * @remix-run/router v1.23.0 - * - * 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 Bl(){return Bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function WA(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function fN(){return Math.random().toString(36).substr(2,8)}function Ab(e,t){return{usr:e.state,key:e.key,idx:t}}function om(e,t,r,n){return r===void 0&&(r=null),Bl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?hs(t):t,{state:r,key:t&&t.key||n||fN()})}function xf(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 hs(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 dN(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=gi.Pop,l=null,u=f();u==null&&(u=0,o.replaceState(Bl({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function c(){s=gi.Pop;let b=f(),x=b==null?null:b-u;u=b,l&&l({action:s,location:p.location,delta:x})}function d(b,x){s=gi.Push;let m=om(p.location,b,x);r&&r(m,b),u=f()+1;let v=Ab(m,u),O=p.createHref(m);try{o.pushState(v,"",O)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(O)}a&&l&&l({action:s,location:p.location,delta:1})}function h(b,x){s=gi.Replace;let m=om(p.location,b,x);r&&r(m,b),u=f();let v=Ab(m,u),O=p.createHref(m);o.replaceState(v,"",O),a&&l&&l({action:s,location:p.location,delta:0})}function y(b){let x=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof b=="string"?b:xf(b);return m=m.replace(/ $/,"%20"),qe(x,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,x)}let p={get action(){return s},get location(){return e(i,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Pb,c),l=b,()=>{i.removeEventListener(Pb,c),l=null}},createHref(b){return t(i,b)},createURL:y,encodeLocation(b){let x=y(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:d,replace:h,go(b){return o.go(b)}};return p}var kb;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(kb||(kb={}));function hN(e,t,r){return r===void 0&&(r="/"),pN(e,t,r,!1)}function pN(e,t,r,n){let i=typeof t=="string"?hs(t):t,a=Lo(i.pathname||"/",r);if(a==null)return null;let o=HA(e);yN(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("/")&&(qe(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=ji([n,l.relativePath]),f=r.concat(l);a.children&&a.children.length>0&&(qe(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),HA(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:SN(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 qA(a.path))i(a,o,l)}),t}function qA(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=qA(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 yN(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ON(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const mN=/^:[\w-]+$/,vN=3,gN=2,xN=1,bN=10,wN=-2,jb=e=>e==="*";function SN(e,t){let r=e.split("/"),n=r.length;return r.some(jb)&&(n+=wN),t&&(n+=gN),r.filter(i=>!jb(i)).reduce((i,a)=>i+(mN.test(a)?vN:a===""?xN:bN),n)}function ON(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 _N(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:d,isOptional:h}=f;if(d==="*"){let p=s[c]||"";o=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}const y=s[c];return h&&!y?u[d]=void 0:u[d]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function PN(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),WA(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 AN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return WA(!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 Lo(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)||"/"}function kN(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?hs(e):e;return{pathname:r?r.startsWith("/")?r:jN(r,t):t,search:TN(n),hash:CN(i)}}function jN(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 $p(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 EN(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function zg(e,t){let r=EN(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Ug(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=hs(e):(i=Bl({},e),qe(!i.pathname||!i.pathname.includes("?"),$p("?","pathname","search",i)),qe(!i.pathname||!i.pathname.includes("#"),$p("#","pathname","hash",i)),qe(!i.search||!i.search.includes("#"),$p("#","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=kN(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const ji=e=>e.join("/").replace(/\/\/+/g,"/"),$N=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),TN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,CN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function NN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const KA=["post","put","patch","delete"];new Set(KA);const MN=["get",...KA];new Set(MN);/** - * React Router v6.30.1 - * - * 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 zl(){return zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),j.useCallback(function(u,f){if(f===void 0&&(f={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let c=Ug(u,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:ji([t,c.pathname])),(f.replace?n.replace:n.push)(c,f.state,f)},[t,n,o,a,e])}const RN=j.createContext(null);function LN(e){let t=j.useContext(Kn).outlet;return t&&j.createElement(RN.Provider,{value:e},t)}function Xd(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=j.useContext(qn),{matches:i}=j.useContext(Kn),{pathname:a}=ys(),o=JSON.stringify(zg(i,n.v7_relativeSplatPath));return j.useMemo(()=>Ug(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function FN(e,t){return BN(e,t)}function BN(e,t,r,n){ps()||qe(!1);let{navigator:i}=j.useContext(qn),{matches:a}=j.useContext(Kn),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=ys(),f;if(t){var c;let b=typeof t=="string"?hs(t):t;l==="/"||(c=b.pathname)!=null&&c.startsWith(l)||qe(!1),f=b}else f=u;let d=f.pathname||"/",h=d;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=hN(e,{pathname:h}),p=HN(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},s,b.params),pathname:ji([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:ji([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),a,r,n);return t&&p?j.createElement(Gd.Provider,{value:{location:zl({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:gi.Pop}},p):p}function zN(){let e=XN(),t=NN(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)"},a=null;return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),r?j.createElement("pre",{style:i},r):null,a)}const UN=j.createElement(zN,null);class VN extends j.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?j.createElement(Kn.Provider,{value:this.props.routeContext},j.createElement(XA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function WN(e){let{routeContext:t,match:r,children:n}=e,i=j.useContext(Kd);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),j.createElement(Kn.Provider,{value:t},n)}function HN(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||qe(!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,y=!1,p=null,b=null;r&&(h=s&&c.route.id?s[c.route.id]:void 0,p=c.route.errorElement||UN,l&&(u<0&&d===0?(QN("route-fallback",!1),y=!0,b=null):u===d&&(y=!0,b=c.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,d+1)),m=()=>{let v;return h?v=p:y?v=b:c.route.Component?v=j.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=f,j.createElement(WN,{match:c,routeContext:{outlet:f,matches:x,isDataRoute:r!=null},children:v})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?j.createElement(VN,{location:r.location,revalidation:r.revalidation,component:p,error:h,children:m(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):m()},null)}var ZA=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ZA||{}),wf=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}(wf||{});function qN(e){let t=j.useContext(Kd);return t||qe(!1),t}function KN(e){let t=j.useContext(GA);return t||qe(!1),t}function GN(e){let t=j.useContext(Kn);return t||qe(!1),t}function JA(e){let t=GN(),r=t.matches[t.matches.length-1];return r.route.id||qe(!1),r.route.id}function XN(){var e;let t=j.useContext(XA),r=KN(wf.UseRouteError),n=JA(wf.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function YN(){let{router:e}=qN(ZA.UseNavigateStable),t=JA(wf.UseNavigateStable),r=j.useRef(!1);return YA(()=>{r.current=!0}),j.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,zl({fromRouteId:t},a)))},[e,t])}const Eb={};function QN(e,t,r){!t&&!Eb[e]&&(Eb[e]=!0)}function ZN(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function ek(e){let{to:t,replace:r,state:n,relative:i}=e;ps()||qe(!1);let{future:a,static:o}=j.useContext(qn),{matches:s}=j.useContext(Kn),{pathname:l}=ys(),u=QA(),f=Ug(t,zg(s,a.v7_relativeSplatPath),l,i==="path"),c=JSON.stringify(f);return j.useEffect(()=>u(JSON.parse(c),{replace:r,state:n,relative:i}),[u,c,i,r,n]),null}function JN(e){return LN(e.context)}function Sn(e){qe(!1)}function eM(e){let{basename:t="/",children:r=null,location:n,navigationType:i=gi.Pop,navigator:a,static:o=!1,future:s}=e;ps()&&qe(!1);let l=t.replace(/^\/*/,"/"),u=j.useMemo(()=>({basename:l,navigator:a,static:o,future:zl({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=hs(n));let{pathname:f="/",search:c="",hash:d="",state:h=null,key:y="default"}=n,p=j.useMemo(()=>{let b=Lo(f,l);return b==null?null:{location:{pathname:b,search:c,hash:d,state:h,key:y},navigationType:i}},[l,f,c,d,h,y,i]);return p==null?null:j.createElement(qn.Provider,{value:u},j.createElement(Gd.Provider,{children:r,value:p}))}function tM(e){let{children:t,location:r}=e;return FN(sm(t),r)}new Promise(()=>{});function sm(e,t){t===void 0&&(t=[]);let r=[];return j.Children.forEach(e,(n,i)=>{if(!j.isValidElement(n))return;let a=[...t,i];if(n.type===j.Fragment){r.push.apply(r,sm(n.props.children,a));return}n.type!==Sn&&qe(!1),!n.props.index||!n.props.children||qe(!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=sm(n.props.children,a)),r.push(o)}),r}/** - * React Router DOM v6.30.1 - * - * 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 Sf(){return Sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function rM(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nM(e,t){return e.button===0&&(!t||t==="_self")&&!rM(e)}const iM=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],aM=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],oM="6";try{window.__reactRouterVersion=oM}catch{}const sM=j.createContext({isTransitioning:!1}),lM="startTransition",$b=Z$[lM];function uM(e){let{basename:t,children:r,future:n,window:i}=e,a=j.useRef();a.current==null&&(a.current=cN({window:i,v5Compat:!0}));let o=a.current,[s,l]=j.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},f=j.useCallback(c=>{u&&$b?$b(()=>l(c)):l(c)},[l,u]);return j.useLayoutEffect(()=>o.listen(f),[o,f]),j.useEffect(()=>ZN(n),[n]),j.createElement(eM,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const cM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",fM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dM=j.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=tk(t,iM),{basename:h}=j.useContext(qn),y,p=!1;if(typeof u=="string"&&fM.test(u)&&(y=u,cM))try{let v=new URL(window.location.href),O=u.startsWith("//")?new URL(v.protocol+u):new URL(u),w=Lo(O.pathname,h);O.origin===v.origin&&w!=null?u=w+O.search+O.hash:p=!0}catch{}let b=IN(u,{relative:i}),x=pM(u,{replace:o,state:s,target:l,preventScrollReset:f,relative:i,viewTransition:c});function m(v){n&&n(v),v.defaultPrevented||x(v)}return j.createElement("a",Sf({},d,{href:y||b,onClick:p||a?n:m,ref:r,target:l}))}),Tp=j.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:i=!1,className:a="",end:o=!1,style:s,to:l,viewTransition:u,children:f}=t,c=tk(t,aM),d=Xd(l,{relative:c.relative}),h=ys(),y=j.useContext(GA),{navigator:p,basename:b}=j.useContext(qn),x=y!=null&&yM(d)&&u===!0,m=p.encodeLocation?p.encodeLocation(d).pathname:d.pathname,v=h.pathname,O=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;i||(v=v.toLowerCase(),O=O?O.toLowerCase():null,m=m.toLowerCase()),O&&b&&(O=Lo(O,b)||O);const w=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let S=v===m||!o&&v.startsWith(m)&&v.charAt(w)==="/",_=O!=null&&(O===m||!o&&O.startsWith(m)&&O.charAt(m.length)==="/"),P={isActive:S,isPending:_,isTransitioning:x},A=S?n:void 0,C;typeof a=="function"?C=a(P):C=[a,S?"active":null,_?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let E=typeof s=="function"?s(P):s;return j.createElement(dM,Sf({},c,{"aria-current":A,className:C,ref:r,style:E,to:l,viewTransition:u}),typeof f=="function"?f(P):f)});var lm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lm||(lm={}));var Tb;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Tb||(Tb={}));function hM(e){let t=j.useContext(Kd);return t||qe(!1),t}function pM(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=QA(),u=ys(),f=Xd(e,{relative:o});return j.useCallback(c=>{if(nM(c,r)){c.preventDefault();let d=n!==void 0?n:xf(u)===xf(f);l(e,{replace:d,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,f,n,i,r,e,a,o,s])}function yM(e,t){t===void 0&&(t={});let r=j.useContext(sM);r==null&&qe(!1);let{basename:n}=hM(lm.useViewTransitionState),i=Xd(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=Lo(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=Lo(r.nextLocation.pathname,n)||r.nextLocation.pathname;return bf(i.pathname,o)!=null||bf(i.pathname,a)!=null}var Yd=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(){}},Qd=typeof window>"u"||"Deno"in globalThis;function Ir(){}function mM(e,t){return typeof e=="function"?e(t):e}function vM(e){return typeof e=="number"&&e>=0&&e!==1/0}function gM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function um(e,t){return typeof e=="function"?e(t):e}function xM(e,t){return typeof e=="function"?e(t):e}function Cb(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==Vg(o,t.options))return!1}else if(!Vl(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 Nb(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Ul(t.options.mutationKey)!==Ul(a))return!1}else if(!Vl(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Vg(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ul)(e)}function Ul(e){return JSON.stringify(e,(t,r)=>cm(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Vl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Vl(e[r],t[r])):!1}function rk(e,t){if(e===t)return e;const r=Mb(e)&&Mb(t);if(r||cm(e)&&cm(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{},l=new Set(n);let u=0;for(let f=0;f{setTimeout(t,e)})}function wM(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?rk(e,t):t}function SM(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function OM(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Wg=Symbol();function nk(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Wg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var sa,fi,So,__,_M=(__=class extends Yd{constructor(){super();ge(this,sa,void 0);ge(this,fi,void 0);ge(this,So,void 0);fe(this,So,t=>{if(!Qd&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){U(this,fi)||this.setEventListener(U(this,So))}onUnsubscribe(){var t;this.hasListeners()||((t=U(this,fi))==null||t.call(this),fe(this,fi,void 0))}setEventListener(t){var r;fe(this,So,t),(r=U(this,fi))==null||r.call(this),fe(this,fi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){U(this,sa)!==t&&(fe(this,sa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof U(this,sa)=="boolean"?U(this,sa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},sa=new WeakMap,fi=new WeakMap,So=new WeakMap,__),ik=new _M,Oo,di,_o,P_,PM=(P_=class extends Yd{constructor(){super();ge(this,Oo,!0);ge(this,di,void 0);ge(this,_o,void 0);fe(this,_o,t=>{if(!Qd&&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(){U(this,di)||this.setEventListener(U(this,_o))}onUnsubscribe(){var t;this.hasListeners()||((t=U(this,di))==null||t.call(this),fe(this,di,void 0))}setEventListener(t){var r;fe(this,_o,t),(r=U(this,di))==null||r.call(this),fe(this,di,t(this.setOnline.bind(this)))}setOnline(t){U(this,Oo)!==t&&(fe(this,Oo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return U(this,Oo)}},Oo=new WeakMap,di=new WeakMap,_o=new WeakMap,P_),Of=new PM;function AM(){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}function kM(e){return Math.min(1e3*2**e,3e4)}function ak(e){return(e??"online")==="online"?Of.isOnline():!0}var ok=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Cp(e){return e instanceof ok}function sk(e){let t=!1,r=0,n=!1,i;const a=AM(),o=p=>{var b;n||(d(new ok(p)),(b=e.abort)==null||b.call(e))},s=()=>{t=!0},l=()=>{t=!1},u=()=>ik.isFocused()&&(e.networkMode==="always"||Of.isOnline())&&e.canRun(),f=()=>ak(e.networkMode)&&e.canRun(),c=p=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,p),i==null||i(),a.resolve(p))},d=p=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,p),i==null||i(),a.reject(p))},h=()=>new Promise(p=>{var b;i=x=>{(n||u())&&p(x)},(b=e.onPause)==null||b.call(e)}).then(()=>{var p;i=void 0,n||(p=e.onContinue)==null||p.call(e)}),y=()=>{if(n)return;let p;const b=r===0?e.initialPromise:void 0;try{p=b??e.fn()}catch(x){p=Promise.reject(x)}Promise.resolve(p).then(c).catch(x=>{var S;if(n)return;const m=e.retry??(Qd?0:3),v=e.retryDelay??kM,O=typeof v=="function"?v(r,x):v,w=m===!0||typeof m=="number"&&ru()?void 0:h()).then(()=>{t?d(x):y()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:l,canStart:f,start:()=>(f()?y():h().then(y),a)}}var jM=e=>setTimeout(e,0);function EM(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=jM;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 Rt=EM(),la,A_,lk=(A_=class{constructor(){ge(this,la,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vM(this.gcTime)&&fe(this,la,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qd?1/0:5*60*1e3))}clearGcTimeout(){U(this,la)&&(clearTimeout(U(this,la)),fe(this,la,void 0))}},la=new WeakMap,A_),Po,Ao,gr,ua,jt,Au,ca,Dr,On,k_,$M=(k_=class extends lk{constructor(t){super();ge(this,Dr);ge(this,Po,void 0);ge(this,Ao,void 0);ge(this,gr,void 0);ge(this,ua,void 0);ge(this,jt,void 0);ge(this,Au,void 0);ge(this,ca,void 0);fe(this,ca,!1),fe(this,Au,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,ua,t.client),fe(this,gr,U(this,ua).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,Po,CM(this.options)),this.state=t.state??U(this,Po),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=U(this,jt))==null?void 0:t.promise}setOptions(t){this.options={...U(this,Au),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,gr).remove(this)}setData(t,r){const n=wM(this.state.data,t,this.options);return _t(this,Dr,On).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){_t(this,Dr,On).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=U(this,jt))==null?void 0:n.promise;return(i=U(this,jt))==null||i.cancel(t),r?r.then(Ir).catch(Ir):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(U(this,Po))}isActive(){return this.observers.some(t=>xM(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wg||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>um(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:!gM(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=U(this,jt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=U(this,jt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),U(this,gr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(U(this,jt)&&(U(this,ca)?U(this,jt).cancel({revert:!0}):U(this,jt).cancelRetry()),this.scheduleGc()),U(this,gr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||_t(this,Dr,On).call(this,{type:"invalidate"})}fetch(t,r){var u,f,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(U(this,jt))return U(this,jt).continueRetry(),U(this,jt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(fe(this,ca,!0),n.signal)})},a=()=>{const d=nk(this.options,r),y=(()=>{const p={client:U(this,ua),queryKey:this.queryKey,meta:this.meta};return i(p),p})();return fe(this,ca,!1),this.options.persister?this.options.persister(d,y,this):d(y)},s=(()=>{const d={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:U(this,ua),state:this.state,fetchFn:a};return i(d),d})();(u=this.options.behavior)==null||u.onFetch(s,this),fe(this,Ao,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=s.fetchOptions)==null?void 0:f.meta))&&_t(this,Dr,On).call(this,{type:"fetch",meta:(c=s.fetchOptions)==null?void 0:c.meta});const l=d=>{var h,y,p,b;Cp(d)&&d.silent||_t(this,Dr,On).call(this,{type:"error",error:d}),Cp(d)||((y=(h=U(this,gr).config).onError)==null||y.call(h,d,this),(b=(p=U(this,gr).config).onSettled)==null||b.call(p,this.state.data,d,this)),this.scheduleGc()};return fe(this,jt,sk({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:d=>{var h,y,p,b;if(d===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(x){l(x);return}(y=(h=U(this,gr).config).onSuccess)==null||y.call(h,d,this),(b=(p=U(this,gr).config).onSettled)==null||b.call(p,d,this.state.error,this),this.scheduleGc()},onError:l,onFail:(d,h)=>{_t(this,Dr,On).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{_t(this,Dr,On).call(this,{type:"pause"})},onContinue:()=>{_t(this,Dr,On).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),U(this,jt).start()}},Po=new WeakMap,Ao=new WeakMap,gr=new WeakMap,ua=new WeakMap,jt=new WeakMap,Au=new WeakMap,ca=new WeakMap,Dr=new WeakSet,On=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,...TM(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Cp(i)&&i.revert&&U(this,Ao)?{...U(this,Ao),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Rt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),U(this,gr).notify({query:this,type:"updated",action:t})})},k_);function TM(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ak(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function CM(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 en,j_,NM=(j_=class extends Yd{constructor(t={}){super();ge(this,en,void 0);this.config=t,fe(this,en,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Vg(i,r);let o=this.get(a);return o||(o=new $M({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){U(this,en).has(t.queryHash)||(U(this,en).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=U(this,en).get(t.queryHash);r&&(t.destroy(),r===t&&U(this,en).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Rt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return U(this,en).get(t)}getAll(){return[...U(this,en).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Cb(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Cb(t,n)):r}notify(t){Rt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Rt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Rt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},en=new WeakMap,j_),tn,Mt,fa,rn,ti,E_,MM=(E_=class extends lk{constructor(t){super();ge(this,rn);ge(this,tn,void 0);ge(this,Mt,void 0);ge(this,fa,void 0);this.mutationId=t.mutationId,fe(this,Mt,t.mutationCache),fe(this,tn,[]),this.state=t.state||IM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){U(this,tn).includes(t)||(U(this,tn).push(t),this.clearGcTimeout(),U(this,Mt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,tn,U(this,tn).filter(r=>r!==t)),this.scheduleGc(),U(this,Mt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){U(this,tn).length||(this.state.status==="pending"?this.scheduleGc():U(this,Mt).remove(this))}continue(){var t;return((t=U(this,fa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,l,u,f,c,d,h,y,p,b,x,m,v,O,w,S,_,P;const r=()=>{_t(this,rn,ti).call(this,{type:"continue"})};fe(this,fa,sk({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,C)=>{_t(this,rn,ti).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{_t(this,rn,ti).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,Mt).canRun(this)}));const n=this.state.status==="pending",i=!U(this,fa).canStart();try{if(n)r();else{_t(this,rn,ti).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=U(this,Mt).config).onMutate)==null?void 0:o.call(a,t,this));const C=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));C!==this.state.context&&_t(this,rn,ti).call(this,{type:"pending",context:C,variables:t,isPaused:i})}const A=await U(this,fa).start();return await((f=(u=U(this,Mt).config).onSuccess)==null?void 0:f.call(u,A,t,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,A,t,this.state.context)),await((y=(h=U(this,Mt).config).onSettled)==null?void 0:y.call(h,A,null,this.state.variables,this.state.context,this)),await((b=(p=this.options).onSettled)==null?void 0:b.call(p,A,null,t,this.state.context)),_t(this,rn,ti).call(this,{type:"success",data:A}),A}catch(A){try{throw await((m=(x=U(this,Mt).config).onError)==null?void 0:m.call(x,A,t,this.state.context,this)),await((O=(v=this.options).onError)==null?void 0:O.call(v,A,t,this.state.context)),await((S=(w=U(this,Mt).config).onSettled)==null?void 0:S.call(w,void 0,A,this.state.variables,this.state.context,this)),await((P=(_=this.options).onSettled)==null?void 0:P.call(_,void 0,A,t,this.state.context)),A}finally{_t(this,rn,ti).call(this,{type:"error",error:A})}}finally{U(this,Mt).runNext(this)}}},tn=new WeakMap,Mt=new WeakMap,fa=new WeakMap,rn=new WeakSet,ti=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),Rt.batch(()=>{U(this,tn).forEach(n=>{n.onMutationUpdate(t)}),U(this,Mt).notify({mutation:this,type:"updated",action:t})})},E_);function IM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kn,Rr,ku,$_,DM=($_=class extends Yd{constructor(t={}){super();ge(this,kn,void 0);ge(this,Rr,void 0);ge(this,ku,void 0);this.config=t,fe(this,kn,new Set),fe(this,Rr,new Map),fe(this,ku,0)}build(t,r,n){const i=new MM({mutationCache:this,mutationId:++Gu(this,ku)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){U(this,kn).add(t);const r=hc(t);if(typeof r=="string"){const n=U(this,Rr).get(r);n?n.push(t):U(this,Rr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(U(this,kn).delete(t)){const r=hc(t);if(typeof r=="string"){const n=U(this,Rr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&U(this,Rr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=hc(t);if(typeof r=="string"){const n=U(this,Rr).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=hc(t);if(typeof r=="string"){const i=(n=U(this,Rr).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(){Rt.batch(()=>{U(this,kn).forEach(t=>{this.notify({type:"removed",mutation:t})}),U(this,kn).clear(),U(this,Rr).clear()})}getAll(){return Array.from(U(this,kn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Nb(r,n))}findAll(t={}){return this.getAll().filter(r=>Nb(t,r))}notify(t){Rt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Rt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ir))))}},kn=new WeakMap,Rr=new WeakMap,ku=new WeakMap,$_);function hc(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Db(e){return{onFetch:(t,r)=>{var f,c,d,h,y;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=((y=t.state.data)==null?void 0:y.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let p=!1;const b=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},x=nk(t.options,t.fetchOptions),m=async(v,O,w)=>{if(p)return Promise.reject();if(O==null&&v.pages.length)return Promise.resolve(v);const _=(()=>{const E={client:t.client,queryKey:t.queryKey,pageParam:O,direction:w?"backward":"forward",meta:t.options.meta};return b(E),E})(),P=await x(_),{maxPages:A}=t.options,C=w?OM:SM;return{pages:C(v.pages,P,A),pageParams:C(v.pageParams,O,A)}};if(i&&a.length){const v=i==="backward",O=v?RM:Rb,w={pages:a,pageParams:o},S=O(n,w);s=await m(w,S,v)}else{const v=e??a.length;do{const O=l===0?o[0]??n.initialPageParam:Rb(n,s);if(l>0&&O==null)break;s=await m(s,O),l++}while(l{var p,b;return(b=(p=t.options).persister)==null?void 0:b.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function Rb(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 RM(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 Xe,hi,pi,ko,jo,yi,Eo,$o,T_,LM=(T_=class{constructor(e={}){ge(this,Xe,void 0);ge(this,hi,void 0);ge(this,pi,void 0);ge(this,ko,void 0);ge(this,jo,void 0);ge(this,yi,void 0);ge(this,Eo,void 0);ge(this,$o,void 0);fe(this,Xe,e.queryCache||new NM),fe(this,hi,e.mutationCache||new DM),fe(this,pi,e.defaultOptions||{}),fe(this,ko,new Map),fe(this,jo,new Map),fe(this,yi,0)}mount(){Gu(this,yi)._++,U(this,yi)===1&&(fe(this,Eo,ik.subscribe(async e=>{e&&(await this.resumePausedMutations(),U(this,Xe).onFocus())})),fe(this,$o,Of.subscribe(async e=>{e&&(await this.resumePausedMutations(),U(this,Xe).onOnline())})))}unmount(){var e,t;Gu(this,yi)._--,U(this,yi)===0&&((e=U(this,Eo))==null||e.call(this),fe(this,Eo,void 0),(t=U(this,$o))==null||t.call(this),fe(this,$o,void 0))}isFetching(e){return U(this,Xe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return U(this,hi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=U(this,Xe).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=U(this,Xe).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(um(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return U(this,Xe).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=U(this,Xe).get(n.queryHash),a=i==null?void 0:i.state.data,o=mM(t,a);if(o!==void 0)return U(this,Xe).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Rt.batch(()=>U(this,Xe).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=U(this,Xe).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=U(this,Xe);Rt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=U(this,Xe);return Rt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Rt.batch(()=>U(this,Xe).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Ir).catch(Ir)}invalidateQueries(e,t={}){return Rt.batch(()=>(U(this,Xe).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=Rt.batch(()=>U(this,Xe).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Ir)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Ir)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=U(this,Xe).build(this,t);return r.isStaleByTime(um(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ir).catch(Ir)}fetchInfiniteQuery(e){return e.behavior=Db(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ir).catch(Ir)}ensureInfiniteQueryData(e){return e.behavior=Db(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Of.isOnline()?U(this,hi).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,Xe)}getMutationCache(){return U(this,hi)}getDefaultOptions(){return U(this,pi)}setDefaultOptions(e){fe(this,pi,e)}setQueryDefaults(e,t){U(this,ko).set(Ul(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...U(this,ko).values()],r={};return t.forEach(n=>{Vl(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){U(this,jo).set(Ul(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...U(this,jo).values()],r={};return t.forEach(n=>{Vl(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...U(this,pi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Vg(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===Wg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...U(this,pi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){U(this,Xe).clear(),U(this,hi).clear()}},Xe=new WeakMap,hi=new WeakMap,pi=new WeakMap,ko=new WeakMap,jo=new WeakMap,yi=new WeakMap,Eo=new WeakMap,$o=new WeakMap,T_),FM=j.createContext(void 0),BM=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(FM.Provider,{value:e,children:t})),zM=function(){return null};const uk=j.createContext(void 0),UM=(e,t)=>{switch(t.type){case"LOGIN_SUCCESS":return{isAuthenticated:!0,user:t.payload.user,permissions:t.payload.user.permissions,token:t.payload.token};case"LOGOUT":return{isAuthenticated:!1,user:null,permissions:[],token:null};case"RESTORE_SESSION":return{isAuthenticated:!0,user:t.payload.user,permissions:t.payload.user.permissions,token:t.payload.token};default:return e}},VM={isAuthenticated:!1,user:null,permissions:[],token:null},WM=({children:e})=>{const[t,r]=j.useReducer(UM,VM);j.useEffect(()=>{const o=localStorage.getItem("admin_token"),s=localStorage.getItem("admin_user");if(o&&s)try{const l=JSON.parse(s);r({type:"RESTORE_SESSION",payload:{user:l,token:o}})}catch{localStorage.removeItem("admin_token"),localStorage.removeItem("admin_user")}},[]);const n=async(o,s)=>{try{const l={id:"1",name:"مدیر کل",email:o,role:"admin",permissions:[1,2,3,4,5,10,15,20,22,25,30],status:"active",createdAt:new Date().toISOString(),lastLogin:new Date().toISOString()},u="mock-jwt-token-"+Date.now();return o==="admin@test.com"&&s==="admin123"?(localStorage.setItem("admin_token",u),localStorage.setItem("admin_user",JSON.stringify(l)),r({type:"LOGIN_SUCCESS",payload:{user:l,token:u}}),!0):!1}catch(l){return console.error("Login error:",l),!1}},i=()=>{localStorage.removeItem("admin_token"),localStorage.removeItem("admin_user"),r({type:"LOGOUT"})},a=o=>t.permissions.includes(o);return g.jsx(uk.Provider,{value:{...t,login:n,logout:i,hasPermission:a},children:e})},Nu=()=>{const e=j.useContext(uk);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e},ck=j.createContext(void 0),HM=({children:e})=>{const[t,r]=j.useState("light");j.useEffect(()=>{const i=localStorage.getItem("admin_theme"),a=window.matchMedia("(prefers-color-scheme: dark)").matches,o=i||(a?"dark":"light");r(o),o==="dark"&&document.documentElement.classList.add("dark")},[]);const n=()=>{const i=t==="light"?"dark":"light";r(i),localStorage.setItem("admin_theme",i),i==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")};return g.jsx(ck.Provider,{value:{mode:t,toggleTheme:n},children:e})},qM=()=>{const e=j.useContext(ck);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};let KM={data:""},GM=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||KM,XM=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,YM=/\/\*[^]*?\*\/| +/g,Lb=/\n+/g,li=(e,t)=>{let r="",n="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?r=a+" "+o+";":n+=a[1]=="f"?li(o,a):a+"{"+li(o,a[1]=="k"?"":t)+"}":typeof o=="object"?n+=li(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=li.p?li.p(a,o):a+":"+o+";")}return r+(t&&i?t+"{"+i+"}":i)+n},gn={},fk=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+fk(e[r]);return t}return e},QM=(e,t,r,n,i)=>{let a=fk(e),o=gn[a]||(gn[a]=(l=>{let u=0,f=11;for(;u>>0;return"go"+f})(a));if(!gn[o]){let l=a!==e?e:(u=>{let f,c,d=[{}];for(;f=XM.exec(u.replace(YM,""));)f[4]?d.shift():f[3]?(c=f[3].replace(Lb," ").trim(),d.unshift(d[0][c]=d[0][c]||{})):d[0][f[1]]=f[2].replace(Lb," ").trim();return d[0]})(e);gn[o]=li(i?{["@keyframes "+o]:l}:l,r?"":"."+o)}let s=r&&gn.g?gn.g:null;return r&&(gn.g=gn[o]),((l,u,f,c)=>{c?u.data=u.data.replace(c,l):u.data.indexOf(l)===-1&&(u.data=f?l+u.data:u.data+l)})(gn[o],t,n,s),o},ZM=(e,t,r)=>e.reduce((n,i,a)=>{let o=t[a];if(o&&o.call){let s=o(r),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":li(s,""):s===!1?"":s}return n+i+(o??"")},"");function Zd(e){let t=this||{},r=e.call?e(t.p):e;return QM(r.unshift?r.raw?ZM(r,[].slice.call(arguments,1),t.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(t.p):i),{}):r,GM(t.target),t.g,t.o,t.k)}let dk,fm,dm;Zd.bind({g:1});let zn=Zd.bind({k:1});function JM(e,t,r,n){li.p=t,dk=e,fm=r,dm=n}function Ri(e,t){let r=this||{};return function(){let n=arguments;function i(a,o){let s=Object.assign({},a),l=s.className||i.className;r.p=Object.assign({theme:fm&&fm()},s),r.o=/ *go\d+/.test(l),s.className=Zd.apply(r,n)+(l?" "+l:""),t&&(s.ref=o);let u=e;return e[0]&&(u=s.as||e,delete s.as),dm&&u[0]&&dm(s),dk(u,s)}return t?t(i):i}}var eI=e=>typeof e=="function",_f=(e,t)=>eI(e)?e(t):e,tI=(()=>{let e=0;return()=>(++e).toString()})(),hk=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),rI=20,pk=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,rI)};case 1:return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:r}=t;return pk(e,{type:e.toasts.find(a=>a.id===r.id)?1:0,toast:r});case 3:let{toastId:n}=t;return{...e,toasts:e.toasts.map(a=>a.id===n||n===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Vc=[],ea={toasts:[],pausedAt:void 0},Ta=e=>{ea=pk(ea,e),Vc.forEach(t=>{t(ea)})},nI={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},iI=(e={})=>{let[t,r]=j.useState(ea),n=j.useRef(ea);j.useEffect(()=>(n.current!==ea&&r(ea),Vc.push(r),()=>{let a=Vc.indexOf(r);a>-1&&Vc.splice(a,1)}),[]);let i=t.toasts.map(a=>{var o,s,l;return{...e,...e[a.type],...a,removeDelay:a.removeDelay||((o=e[a.type])==null?void 0:o.removeDelay)||(e==null?void 0:e.removeDelay),duration:a.duration||((s=e[a.type])==null?void 0:s.duration)||(e==null?void 0:e.duration)||nI[a.type],style:{...e.style,...(l=e[a.type])==null?void 0:l.style,...a.style}}});return{...t,toasts:i}},aI=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||tI()}),Mu=e=>(t,r)=>{let n=aI(t,e,r);return Ta({type:2,toast:n}),n.id},Lt=(e,t)=>Mu("blank")(e,t);Lt.error=Mu("error");Lt.success=Mu("success");Lt.loading=Mu("loading");Lt.custom=Mu("custom");Lt.dismiss=e=>{Ta({type:3,toastId:e})};Lt.remove=e=>Ta({type:4,toastId:e});Lt.promise=(e,t,r)=>{let n=Lt.loading(t.loading,{...r,...r==null?void 0:r.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let a=t.success?_f(t.success,i):void 0;return a?Lt.success(a,{id:n,...r,...r==null?void 0:r.success}):Lt.dismiss(n),i}).catch(i=>{let a=t.error?_f(t.error,i):void 0;a?Lt.error(a,{id:n,...r,...r==null?void 0:r.error}):Lt.dismiss(n)}),e};var oI=(e,t)=>{Ta({type:1,toast:{id:e,height:t}})},sI=()=>{Ta({type:5,time:Date.now()})},dl=new Map,lI=1e3,uI=(e,t=lI)=>{if(dl.has(e))return;let r=setTimeout(()=>{dl.delete(e),Ta({type:4,toastId:e})},t);dl.set(e,r)},cI=e=>{let{toasts:t,pausedAt:r}=iI(e);j.useEffect(()=>{if(r)return;let a=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(l<0){s.visible&&Lt.dismiss(s.id);return}return setTimeout(()=>Lt.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,r]);let n=j.useCallback(()=>{r&&Ta({type:6,time:Date.now()})},[r]),i=j.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:u}=o||{},f=t.filter(h=>(h.position||u)===(a.position||u)&&h.height),c=f.findIndex(h=>h.id===a.id),d=f.filter((h,y)=>yh.visible).slice(...s?[d+1]:[0,d]).reduce((h,y)=>h+(y.height||0)+l,0)},[t]);return j.useEffect(()=>{t.forEach(a=>{if(a.dismissed)uI(a.id,a.removeDelay);else{let o=dl.get(a.id);o&&(clearTimeout(o),dl.delete(a.id))}})},[t]),{toasts:t,handlers:{updateHeight:oI,startPause:sI,endPause:n,calculateOffset:i}}},fI=zn` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,dI=zn` -from { - transform: scale(0); - opacity: 0; -} -to { - transform: scale(1); - opacity: 1; -}`,hI=zn` -from { - transform: scale(0) rotate(90deg); - opacity: 0; -} -to { - transform: scale(1) rotate(90deg); - opacity: 1; -}`,pI=Ri("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${e=>e.primary||"#ff4b4b"}; - position: relative; - transform: rotate(45deg); - - animation: ${fI} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - - &:after, - &:before { - content: ''; - animation: ${dI} 0.15s ease-out forwards; - animation-delay: 150ms; - position: absolute; - border-radius: 3px; - opacity: 0; - background: ${e=>e.secondary||"#fff"}; - bottom: 9px; - left: 4px; - height: 2px; - width: 12px; - } - - &:before { - animation: ${hI} 0.15s ease-out forwards; - animation-delay: 180ms; - transform: rotate(90deg); - } -`,yI=zn` - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -`,mI=Ri("div")` - width: 12px; - height: 12px; - box-sizing: border-box; - border: 2px solid; - border-radius: 100%; - border-color: ${e=>e.secondary||"#e0e0e0"}; - border-right-color: ${e=>e.primary||"#616161"}; - animation: ${yI} 1s linear infinite; -`,vI=zn` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,gI=zn` -0% { - height: 0; - width: 0; - opacity: 0; -} -40% { - height: 0; - width: 6px; - opacity: 1; -} -100% { - opacity: 1; - height: 10px; -}`,xI=Ri("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${e=>e.primary||"#61d345"}; - position: relative; - transform: rotate(45deg); - - animation: ${vI} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - &:after { - content: ''; - box-sizing: border-box; - animation: ${gI} 0.2s ease-out forwards; - opacity: 0; - animation-delay: 200ms; - position: absolute; - border-right: 2px solid; - border-bottom: 2px solid; - border-color: ${e=>e.secondary||"#fff"}; - bottom: 6px; - left: 6px; - height: 10px; - width: 6px; - } -`,bI=Ri("div")` - position: absolute; -`,wI=Ri("div")` - position: relative; - display: flex; - justify-content: center; - align-items: center; - min-width: 20px; - min-height: 20px; -`,SI=zn` -from { - transform: scale(0.6); - opacity: 0.4; -} -to { - transform: scale(1); - opacity: 1; -}`,OI=Ri("div")` - position: relative; - transform: scale(0.6); - opacity: 0.4; - min-width: 20px; - animation: ${SI} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; -`,_I=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?j.createElement(OI,null,t):t:r==="blank"?null:j.createElement(wI,null,j.createElement(mI,{...n}),r!=="loading"&&j.createElement(bI,null,r==="error"?j.createElement(pI,{...n}):j.createElement(xI,{...n})))},PI=e=>` -0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} -100% {transform: translate3d(0,0,0) scale(1); opacity:1;} -`,AI=e=>` -0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} -100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} -`,kI="0%{opacity:0;} 100%{opacity:1;}",jI="0%{opacity:1;} 100%{opacity:0;}",EI=Ri("div")` - display: flex; - align-items: center; - background: #fff; - color: #363636; - line-height: 1.3; - will-change: transform; - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); - max-width: 350px; - pointer-events: auto; - padding: 8px 10px; - border-radius: 8px; -`,$I=Ri("div")` - display: flex; - justify-content: center; - margin: 4px 10px; - color: inherit; - flex: 1 1 auto; - white-space: pre-line; -`,TI=(e,t)=>{let r=e.includes("top")?1:-1,[n,i]=hk()?[kI,jI]:[PI(r),AI(r)];return{animation:t?`${zn(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${zn(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},CI=j.memo(({toast:e,position:t,style:r,children:n})=>{let i=e.height?TI(e.position||t||"top-center",e.visible):{opacity:0},a=j.createElement(_I,{toast:e}),o=j.createElement($I,{...e.ariaProps},_f(e.message,e));return j.createElement(EI,{className:e.className,style:{...i,...r,...e.style}},typeof n=="function"?n({icon:a,message:o}):j.createElement(j.Fragment,null,a,o))});JM(j.createElement);var NI=({id:e,className:t,style:r,onHeightUpdate:n,children:i})=>{let a=j.useCallback(o=>{if(o){let s=()=>{let l=o.getBoundingClientRect().height;n(e,l)};s(),new MutationObserver(s).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return j.createElement("div",{ref:a,className:t,style:r},i)},MI=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:hk()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...i}},II=Zd` - z-index: 9999; - > * { - pointer-events: auto; - } -`,pc=16,DI=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:l}=cI(r);return j.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:pc,left:pc,right:pc,bottom:pc,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(u=>{let f=u.position||t,c=l.calculateOffset(u,{reverseOrder:e,gutter:n,defaultPosition:t}),d=MI(f,c);return j.createElement(NI,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?II:"",style:d},u.type==="custom"?_f(u.message,u):i?i(u):j.createElement(CI,{toast:u,position:f}))}))},ri=Lt;const RI=j.createContext(void 0),ei={duration:4e3,position:"top-center",style:{fontFamily:"inherit",direction:"rtl"}},LI=({children:e})=>{const t=(l,u)=>{ri.success(l,{...ei,...u})},r=(l,u)=>{ri.error(l,{...ei,...u})},n=(l,u)=>{ri(l,{...ei,icon:"⚠️",style:{...ei.style,backgroundColor:"#fef3c7",color:"#92400e"},...u})},i=(l,u)=>{ri(l,{...ei,icon:"ℹ️",style:{...ei.style,backgroundColor:"#dbeafe",color:"#1e40af"},...u})},a=(l,u)=>ri.loading(l,{...ei,...u}),o=l=>{ri.dismiss(l)},s=(l,u,f)=>ri.promise(l,u,{...ei,...f});return g.jsxs(RI.Provider,{value:{success:t,error:r,warning:n,info:i,loading:a,dismiss:o,promise:s},children:[e,g.jsx(DI,{position:"top-center",reverseOrder:!1,gutter:8,containerStyle:{direction:"rtl"},toastOptions:{duration:4e3,style:{background:"var(--toast-bg)",color:"var(--toast-color)",fontFamily:"inherit",direction:"rtl"},success:{iconTheme:{primary:"#10b981",secondary:"#ffffff"}},error:{iconTheme:{primary:"#ef4444",secondary:"#ffffff"}}}})]})};var FI={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"};const BI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zI=(e,t)=>{const r=j.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:o,children:s,...l},u)=>j.createElement("svg",{ref:u,...FI,width:i,height:i,stroke:n,strokeWidth:o?Number(a)*24/Number(i):a,className:`lucide lucide-${BI(e)}`,...l},[...t.map(([f,c])=>j.createElement(f,c)),...(Array.isArray(s)?s:[s])||[]]));return r.displayName=`${e}`,r};var he=zI;const Np=he("AlertCircle",[["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"}]]),UI=he("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),hl=he("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]),VI=he("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["polyline",{points:"22 4 12 14.01 9 11.01",key:"6xbx8j"}]]),Fb=he("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),yk=he("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),WI=he("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),HI=he("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),qI=he("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),mk=he("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]),KI=he("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),GI=he("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]),XI=he("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),hm=he("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]),Hg=he("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),YI=he("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]),QI=he("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),vk=he("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),Bb=he("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),ZI=he("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),gk=he("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),JI=he("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),eD=he("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),Mp=he("Package",[["path",{d:"M16.5 9.4 7.55 4.24",key:"10qotr"}],["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]),tD=he("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]),qg=he("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),rD=he("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Jd=he("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Kg=he("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]),pm=he("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]),nD=he("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),iD=he("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]),Wl=he("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),aD=he("UserCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]),xk=he("User",[["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"}]]),Gg=he("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),zb=he("XCircle",[["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"}]]),Xg=he("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function bk(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 l="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",u={primary:"bg-primary-600 hover:bg-primary-700 text-white focus:ring-primary-500",secondary:"bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-gray-100 focus:ring-gray-500",danger:"bg-red-600 hover:bg-red-700 text-white focus:ring-red-500",success:"bg-green-600 hover:bg-green-700 text-white focus:ring-green-500"},f={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},c=n||i?"opacity-50 cursor-not-allowed pointer-events-none":"";return g.jsxs("button",{type:o,onClick:a,disabled:n||i,className:ue(l,u[t],f[r],c,s),children:[i&&g.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e]})};class oD extends j.Component{constructor(r){super(r);Ku(this,"logErrorToService",(r,n)=>{console.log("Error logged to service:",{error:r,errorInfo:n})});Ku(this,"handleRetry",()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})});Ku(this,"handleGoHome",()=>{window.location.href="/"});this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0}}componentDidCatch(r,n){this.setState({error:r,errorInfo:n}),console.error("ErrorBoundary caught an error:",r,n),this.logErrorToService(r,n)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:g.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center p-4",children:g.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 text-center",children:[g.jsx("div",{className:"mb-4",children:g.jsx(UI,{className:"h-16 w-16 text-red-500 mx-auto"})}),g.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-gray-100 mb-2",children:"خطایی رخ داده است"}),g.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:"متأسفانه مشکلی در برنامه رخ داده است. لطفاً دوباره تلاش کنید یا با پشتیبانی تماس بگیرید."}),!1,g.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[g.jsxs(je,{onClick:this.handleRetry,className:"flex-1",variant:"primary",children:[g.jsx(rD,{className:"h-4 w-4 ml-2"}),"تلاش دوباره"]}),g.jsxs(je,{onClick:this.handleGoHome,className:"flex-1",variant:"secondary",children:[g.jsx(YI,{className:"h-4 w-4 ml-2"}),"بازگشت به خانه"]})]})]})}):this.props.children}}const sD=new LM({defaultOptions:{queries:{retry:(e,t)=>{var r,n,i;return((r=t==null?void 0:t.response)==null?void 0:r.status)===404||((n=t==null?void 0:t.response)==null?void 0:n.status)===403||((i=t==null?void 0:t.response)==null?void 0:i.status)===401?!1:e<2},staleTime:5*60*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!0},mutations:{onError:e=>{var r,n;const t=((n=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:n.message)||(e==null?void 0:e.message)||"خطایی رخ داده است";ri.error(t)}}}});var Iu=e=>e.type==="checkbox",ta=e=>e instanceof Date,Dt=e=>e==null;const wk=e=>typeof e=="object";var et=e=>!Dt(e)&&!Array.isArray(e)&&wk(e)&&!ta(e),lD=e=>et(e)&&e.target?Iu(e.target)?e.target.checked:e.target.value:e,uD=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,cD=(e,t)=>e.has(uD(t)),fD=e=>{const t=e.constructor&&e.constructor.prototype;return et(t)&&t.hasOwnProperty("isPrototypeOf")},Yg=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function kt(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Yg&&(e instanceof Blob||n))&&(r||et(e)))if(t=r?[]:{},!r&&!fD(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=kt(e[i]));else return e;return t}var eh=e=>Array.isArray(e)?e.filter(Boolean):[],rt=e=>e===void 0,re=(e,t,r)=>{if(!t||!et(e))return r;const n=eh(t.split(/[,[\].]+?/)).reduce((i,a)=>Dt(i)?i:i[a],e);return rt(n)||n===e?rt(e[t])?r:e[t]:n},Zr=e=>typeof e=="boolean",Qg=e=>/^\w*$/.test(e),Sk=e=>eh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ae=(e,t,r)=>{let n=-1;const i=Qg(t)?[t]:Sk(t),a=i.length,o=a-1;for(;++n{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Ur.all&&(t._proxyFormState[o]=!n||Ur.all),r&&(r[o]=!0),e[o]}});return i};const hD=typeof window<"u"?j.useLayoutEffect:j.useEffect;var an=e=>typeof e=="string",pD=(e,t,r,n,i)=>an(e)?(n&&t.watch.add(e),re(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),re(r,a))):(n&&(t.watchAll=!0),r),Ok=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},pl=e=>Array.isArray(e)?e:[e],Vb=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},ym=e=>Dt(e)||!wk(e);function ui(e,t){if(ym(e)||ym(t))return e===t;if(ta(e)&&ta(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const o=t[i];if(ta(a)&&ta(o)||et(a)&&et(o)||Array.isArray(a)&&Array.isArray(o)?!ui(a,o):a!==o)return!1}}return!0}var qt=e=>et(e)&&!Object.keys(e).length,Zg=e=>e.type==="file",Vr=e=>typeof e=="function",Pf=e=>{if(!Yg)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},_k=e=>e.type==="select-multiple",Jg=e=>e.type==="radio",yD=e=>Jg(e)||Iu(e),Ip=e=>Pf(e)&&e.isConnected;function mD(e,t){const r=t.slice(0,-1).length;let n=0;for(;n{for(const t in e)if(Vr(e[t]))return!0;return!1};function Af(e,t={}){const r=Array.isArray(e);if(et(e)||r)for(const n in e)Array.isArray(e[n])||et(e[n])&&!Pk(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Af(e[n],t[n])):Dt(e[n])||(t[n]=!0);return t}function Ak(e,t,r){const n=Array.isArray(e);if(et(e)||n)for(const i in e)Array.isArray(e[i])||et(e[i])&&!Pk(e[i])?rt(t)||ym(r[i])?r[i]=Array.isArray(e[i])?Af(e[i],[]):{...Af(e[i])}:Ak(e[i],Dt(t)?{}:t[i],r[i]):r[i]=!ui(e[i],t[i]);return r}var Fs=(e,t)=>Ak(e,t,Af(t));const Wb={value:!1,isValid:!1},Hb={value:!0,isValid:!0};var kk=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!rt(e[0].attributes.value)?rt(e[0].value)||e[0].value===""?Hb:{value:e[0].value,isValid:!0}:Hb:Wb}return Wb},jk=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>rt(e)?e:t?e===""?NaN:e&&+e:r&&an(e)?new Date(e):n?n(e):e;const qb={isValid:!1,value:null};var Ek=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,qb):qb;function Kb(e){const t=e.ref;return Zg(t)?t.files:Jg(t)?Ek(e.refs).value:_k(t)?[...t.selectedOptions].map(({value:r})=>r):Iu(t)?kk(e.refs).value:jk(rt(t.value)?e.ref.value:t.value,e)}var gD=(e,t,r,n)=>{const i={};for(const a of e){const o=re(t,a);o&&Ae(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},kf=e=>e instanceof RegExp,Bs=e=>rt(e)?e:kf(e)?e.source:et(e)?kf(e.value)?e.value.source:e.value:e,Gb=e=>({isOnSubmit:!e||e===Ur.onSubmit,isOnBlur:e===Ur.onBlur,isOnChange:e===Ur.onChange,isOnAll:e===Ur.all,isOnTouch:e===Ur.onTouched});const Xb="AsyncFunction";var xD=e=>!!e&&!!e.validate&&!!(Vr(e.validate)&&e.validate.constructor.name===Xb||et(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Xb)),bD=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Yb=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const yl=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=re(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(yl(s,t))break}else if(et(s)&&yl(s,t))break}}};function Qb(e,t,r){const n=re(e,r);if(n||Qg(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=re(t,a),s=re(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var wD=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return qt(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||Ur.all))},SD=(e,t,r)=>!e||!t||e===t||pl(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),OD=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,_D=(e,t)=>!eh(re(e,t)).length&&ot(e,t),PD=(e,t,r)=>{const n=pl(re(e,r));return Ae(n,"root",t[r]),Ae(e,r,n),e},Wc=e=>an(e);function Zb(e,t,r="validate"){if(Wc(e)||Array.isArray(e)&&e.every(Wc)||Zr(e)&&!e)return{type:r,message:Wc(e)?e:"",ref:t}}var Ba=e=>et(e)&&!kf(e)?e:{value:e,message:""},Jb=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:u,minLength:f,min:c,max:d,pattern:h,validate:y,name:p,valueAsNumber:b,mount:x}=e._f,m=re(r,p);if(!x||t.has(p))return{};const v=s?s[0]:o,O=T=>{i&&v.reportValidity&&(v.setCustomValidity(Zr(T)?"":T||""),v.reportValidity())},w={},S=Jg(o),_=Iu(o),P=S||_,A=(b||Zg(o))&&rt(o.value)&&rt(m)||Pf(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,C=Ok.bind(null,p,n,w),E=(T,N,D,R=xn.maxLength,L=xn.minLength)=>{const V=T?N:D;w[p]={type:T?R:L,message:V,ref:o,...C(T?R:L,V)}};if(a?!Array.isArray(m)||!m.length:l&&(!P&&(A||Dt(m))||Zr(m)&&!m||_&&!kk(s).isValid||S&&!Ek(s).isValid)){const{value:T,message:N}=Wc(l)?{value:!!l,message:l}:Ba(l);if(T&&(w[p]={type:xn.required,message:N,ref:v,...C(xn.required,N)},!n))return O(N),w}if(!A&&(!Dt(c)||!Dt(d))){let T,N;const D=Ba(d),R=Ba(c);if(!Dt(m)&&!isNaN(m)){const L=o.valueAsNumber||m&&+m;Dt(D.value)||(T=L>D.value),Dt(R.value)||(N=Lnew Date(new Date().toDateString()+" "+H),I=o.type=="time",F=o.type=="week";an(D.value)&&m&&(T=I?V(m)>V(D.value):F?m>D.value:L>new Date(D.value)),an(R.value)&&m&&(N=I?V(m)+T.value,R=!Dt(N.value)&&m.length<+N.value;if((D||R)&&(E(D,T.message,N.message),!n))return O(w[p].message),w}if(h&&!A&&an(m)){const{value:T,message:N}=Ba(h);if(kf(T)&&!m.match(T)&&(w[p]={type:xn.pattern,message:N,ref:o,...C(xn.pattern,N)},!n))return O(N),w}if(y){if(Vr(y)){const T=await y(m,r),N=Zb(T,v);if(N&&(w[p]={...N,...C(xn.validate,N.message)},!n))return O(N.message),w}else if(et(y)){let T={};for(const N in y){if(!qt(T)&&!n)break;const D=Zb(await y[N](m,r),v,N);D&&(T={...D,...C(N,D.message)},O(D.message),n&&(w[p]=T))}if(!qt(T)&&(w[p]={ref:v,...T},!n))return w}}return O(!0),w};const AD={mode:Ur.onSubmit,reValidateMode:Ur.onChange,shouldFocusError:!0};function kD(e={}){let t={...AD,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Vr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const n={};let i=et(t.defaultValues)||et(t.values)?kt(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:kt(i),o={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let c={...f};const d={array:Vb(),state:Vb()},h=t.criteriaMode===Ur.all,y=$=>M=>{clearTimeout(u),u=setTimeout($,M)},p=async $=>{if(!t.disabled&&(f.isValid||c.isValid||$)){const M=t.resolver?qt((await _()).errors):await A(n,!0);M!==r.isValid&&d.state.next({isValid:M})}},b=($,M)=>{!t.disabled&&(f.isValidating||f.validatingFields||c.isValidating||c.validatingFields)&&(($||Array.from(s.mount)).forEach(B=>{B&&(M?Ae(r.validatingFields,B,M):ot(r.validatingFields,B))}),d.state.next({validatingFields:r.validatingFields,isValidating:!qt(r.validatingFields)}))},x=($,M=[],B,J,Y=!0,G=!0)=>{if(J&&B&&!t.disabled){if(o.action=!0,G&&Array.isArray(re(n,$))){const ie=B(re(n,$),J.argA,J.argB);Y&&Ae(n,$,ie)}if(G&&Array.isArray(re(r.errors,$))){const ie=B(re(r.errors,$),J.argA,J.argB);Y&&Ae(r.errors,$,ie),_D(r.errors,$)}if((f.touchedFields||c.touchedFields)&&G&&Array.isArray(re(r.touchedFields,$))){const ie=B(re(r.touchedFields,$),J.argA,J.argB);Y&&Ae(r.touchedFields,$,ie)}(f.dirtyFields||c.dirtyFields)&&(r.dirtyFields=Fs(i,a)),d.state.next({name:$,isDirty:E($,M),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ae(a,$,M)},m=($,M)=>{Ae(r.errors,$,M),d.state.next({errors:r.errors})},v=$=>{r.errors=$,d.state.next({errors:r.errors,isValid:!1})},O=($,M,B,J)=>{const Y=re(n,$);if(Y){const G=re(a,$,rt(B)?re(i,$):B);rt(G)||J&&J.defaultChecked||M?Ae(a,$,M?G:Kb(Y._f)):D($,G),o.mount&&p()}},w=($,M,B,J,Y)=>{let G=!1,ie=!1;const Oe={name:$};if(!t.disabled){if(!B||J){(f.isDirty||c.isDirty)&&(ie=r.isDirty,r.isDirty=Oe.isDirty=E(),G=ie!==Oe.isDirty);const Te=ui(re(i,$),M);ie=!!re(r.dirtyFields,$),Te?ot(r.dirtyFields,$):Ae(r.dirtyFields,$,!0),Oe.dirtyFields=r.dirtyFields,G=G||(f.dirtyFields||c.dirtyFields)&&ie!==!Te}if(B){const Te=re(r.touchedFields,$);Te||(Ae(r.touchedFields,$,B),Oe.touchedFields=r.touchedFields,G=G||(f.touchedFields||c.touchedFields)&&Te!==B)}G&&Y&&d.state.next(Oe)}return G?Oe:{}},S=($,M,B,J)=>{const Y=re(r.errors,$),G=(f.isValid||c.isValid)&&Zr(M)&&r.isValid!==M;if(t.delayError&&B?(l=y(()=>m($,B)),l(t.delayError)):(clearTimeout(u),l=null,B?Ae(r.errors,$,B):ot(r.errors,$)),(B?!ui(Y,B):Y)||!qt(J)||G){const ie={...J,...G&&Zr(M)?{isValid:M}:{},errors:r.errors,name:$};r={...r,...ie},d.state.next(ie)}},_=async $=>{b($,!0);const M=await t.resolver(a,t.context,gD($||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b($),M},P=async $=>{const{errors:M}=await _($);if($)for(const B of $){const J=re(M,B);J?Ae(r.errors,B,J):ot(r.errors,B)}else r.errors=M;return M},A=async($,M,B={valid:!0})=>{for(const J in $){const Y=$[J];if(Y){const{_f:G,...ie}=Y;if(G){const Oe=s.array.has(G.name),Te=Y._f&&xD(Y._f);Te&&f.validatingFields&&b([J],!0);const pr=await Jb(Y,s.disabled,a,h,t.shouldUseNativeValidation&&!M,Oe);if(Te&&f.validatingFields&&b([J]),pr[G.name]&&(B.valid=!1,M))break;!M&&(re(pr,G.name)?Oe?PD(r.errors,pr,G.name):Ae(r.errors,G.name,pr[G.name]):ot(r.errors,G.name))}!qt(ie)&&await A(ie,M,B)}}return B.valid},C=()=>{for(const $ of s.unMount){const M=re(n,$);M&&(M._f.refs?M._f.refs.every(B=>!Ip(B)):!Ip(M._f.ref))&&St($)}s.unMount=new Set},E=($,M)=>!t.disabled&&($&&M&&Ae(a,$,M),!ui(H(),i)),T=($,M,B)=>pD($,s,{...o.mount?a:rt(M)?i:an($)?{[$]:M}:M},B,M),N=$=>eh(re(o.mount?a:i,$,t.shouldUnregister?re(i,$,[]):[])),D=($,M,B={})=>{const J=re(n,$);let Y=M;if(J){const G=J._f;G&&(!G.disabled&&Ae(a,$,jk(M,G)),Y=Pf(G.ref)&&Dt(M)?"":M,_k(G.ref)?[...G.ref.options].forEach(ie=>ie.selected=Y.includes(ie.value)):G.refs?Iu(G.ref)?G.refs.forEach(ie=>{(!ie.defaultChecked||!ie.disabled)&&(Array.isArray(Y)?ie.checked=!!Y.find(Oe=>Oe===ie.value):ie.checked=Y===ie.value||!!Y)}):G.refs.forEach(ie=>ie.checked=ie.value===Y):Zg(G.ref)?G.ref.value="":(G.ref.value=Y,G.ref.type||d.state.next({name:$,values:kt(a)})))}(B.shouldDirty||B.shouldTouch)&&w($,Y,B.shouldTouch,B.shouldDirty,!0),B.shouldValidate&&F($)},R=($,M,B)=>{for(const J in M){if(!M.hasOwnProperty(J))return;const Y=M[J],G=$+"."+J,ie=re(n,G);(s.array.has($)||et(Y)||ie&&!ie._f)&&!ta(Y)?R(G,Y,B):D(G,Y,B)}},L=($,M,B={})=>{const J=re(n,$),Y=s.array.has($),G=kt(M);Ae(a,$,G),Y?(d.array.next({name:$,values:kt(a)}),(f.isDirty||f.dirtyFields||c.isDirty||c.dirtyFields)&&B.shouldDirty&&d.state.next({name:$,dirtyFields:Fs(i,a),isDirty:E($,G)})):J&&!J._f&&!Dt(G)?R($,G,B):D($,G,B),Yb($,s)&&d.state.next({...r}),d.state.next({name:o.mount?$:void 0,values:kt(a)})},V=async $=>{o.mount=!0;const M=$.target;let B=M.name,J=!0;const Y=re(n,B),G=Te=>{J=Number.isNaN(Te)||ta(Te)&&isNaN(Te.getTime())||ui(Te,re(a,B,Te))},ie=Gb(t.mode),Oe=Gb(t.reValidateMode);if(Y){let Te,pr;const qu=M.type?Kb(Y._f):lD($),Zn=$.type===Ub.BLUR||$.type===Ub.FOCUS_OUT,T$=!bD(Y._f)&&!t.resolver&&!re(r.errors,B)&&!Y._f.deps||OD(Zn,re(r.touchedFields,B),r.isSubmitted,Oe,ie),tp=Yb(B,s,Zn);Ae(a,B,qu),Zn?(Y._f.onBlur&&Y._f.onBlur($),l&&l(0)):Y._f.onChange&&Y._f.onChange($);const rp=w(B,qu,Zn),C$=!qt(rp)||tp;if(!Zn&&d.state.next({name:B,type:$.type,values:kt(a)}),T$)return(f.isValid||c.isValid)&&(t.mode==="onBlur"?Zn&&p():Zn||p()),C$&&d.state.next({name:B,...tp?{}:rp});if(!Zn&&tp&&d.state.next({...r}),t.resolver){const{errors:px}=await _([B]);if(G(qu),J){const N$=Qb(r.errors,n,B),yx=Qb(px,n,N$.name||B);Te=yx.error,B=yx.name,pr=qt(px)}}else b([B],!0),Te=(await Jb(Y,s.disabled,a,h,t.shouldUseNativeValidation))[B],b([B]),G(qu),J&&(Te?pr=!1:(f.isValid||c.isValid)&&(pr=await A(n,!0)));J&&(Y._f.deps&&F(Y._f.deps),S(B,pr,Te,rp))}},I=($,M)=>{if(re(r.errors,M)&&$.focus)return $.focus(),1},F=async($,M={})=>{let B,J;const Y=pl($);if(t.resolver){const G=await P(rt($)?$:Y);B=qt(G),J=$?!Y.some(ie=>re(G,ie)):B}else $?(J=(await Promise.all(Y.map(async G=>{const ie=re(n,G);return await A(ie&&ie._f?{[G]:ie}:ie)}))).every(Boolean),!(!J&&!r.isValid)&&p()):J=B=await A(n);return d.state.next({...!an($)||(f.isValid||c.isValid)&&B!==r.isValid?{}:{name:$},...t.resolver||!$?{isValid:B}:{},errors:r.errors}),M.shouldFocus&&!J&&yl(n,I,$?Y:s.mount),J},H=$=>{const M={...o.mount?a:i};return rt($)?M:an($)?re(M,$):$.map(B=>re(M,B))},Q=($,M)=>({invalid:!!re((M||r).errors,$),isDirty:!!re((M||r).dirtyFields,$),error:re((M||r).errors,$),isValidating:!!re(r.validatingFields,$),isTouched:!!re((M||r).touchedFields,$)}),K=$=>{$&&pl($).forEach(M=>ot(r.errors,M)),d.state.next({errors:$?r.errors:{}})},ne=($,M,B)=>{const J=(re(n,$,{_f:{}})._f||{}).ref,Y=re(r.errors,$)||{},{ref:G,message:ie,type:Oe,...Te}=Y;Ae(r.errors,$,{...Te,...M,ref:J}),d.state.next({name:$,errors:r.errors,isValid:!1}),B&&B.shouldFocus&&J&&J.focus&&J.focus()},me=($,M)=>Vr($)?d.state.subscribe({next:B=>$(T(void 0,M),B)}):T($,M,!0),Ee=$=>d.state.subscribe({next:M=>{SD($.name,M.name,$.exact)&&wD(M,$.formState||f,Ot,$.reRenderRoot)&&$.callback({values:{...a},...r,...M})}}).unsubscribe,Ve=$=>(o.mount=!0,c={...c,...$.formState},Ee({...$,formState:c})),St=($,M={})=>{for(const B of $?pl($):s.mount)s.mount.delete(B),s.array.delete(B),M.keepValue||(ot(n,B),ot(a,B)),!M.keepError&&ot(r.errors,B),!M.keepDirty&&ot(r.dirtyFields,B),!M.keepTouched&&ot(r.touchedFields,B),!M.keepIsValidating&&ot(r.validatingFields,B),!t.shouldUnregister&&!M.keepDefaultValue&&ot(i,B);d.state.next({values:kt(a)}),d.state.next({...r,...M.keepDirty?{isDirty:E()}:{}}),!M.keepIsValid&&p()},vt=({disabled:$,name:M})=>{(Zr($)&&o.mount||$||s.disabled.has(M))&&($?s.disabled.add(M):s.disabled.delete(M))},Z=($,M={})=>{let B=re(n,$);const J=Zr(M.disabled)||Zr(t.disabled);return Ae(n,$,{...B||{},_f:{...B&&B._f?B._f:{ref:{name:$}},name:$,mount:!0,...M}}),s.mount.add($),B?vt({disabled:Zr(M.disabled)?M.disabled:t.disabled,name:$}):O($,!0,M.value),{...J?{disabled:M.disabled||t.disabled}:{},...t.progressive?{required:!!M.required,min:Bs(M.min),max:Bs(M.max),minLength:Bs(M.minLength),maxLength:Bs(M.maxLength),pattern:Bs(M.pattern)}:{},name:$,onChange:V,onBlur:V,ref:Y=>{if(Y){Z($,M),B=re(n,$);const G=rt(Y.value)&&Y.querySelectorAll&&Y.querySelectorAll("input,select,textarea")[0]||Y,ie=yD(G),Oe=B._f.refs||[];if(ie?Oe.find(Te=>Te===G):G===B._f.ref)return;Ae(n,$,{_f:{...B._f,...ie?{refs:[...Oe.filter(Ip),G,...Array.isArray(re(i,$))?[{}]:[]],ref:{type:G.type,name:$}}:{ref:G}}}),O($,!1,void 0,G)}else B=re(n,$,{}),B._f&&(B._f.mount=!1),(t.shouldUnregister||M.shouldUnregister)&&!(cD(s.array,$)&&o.action)&&s.unMount.add($)}}},le=()=>t.shouldFocusError&&yl(n,I,s.mount),de=$=>{Zr($)&&(d.state.next({disabled:$}),yl(n,(M,B)=>{const J=re(n,B);J&&(M.disabled=J._f.disabled||$,Array.isArray(J._f.refs)&&J._f.refs.forEach(Y=>{Y.disabled=J._f.disabled||$}))},0,!1))},W=($,M)=>async B=>{let J;B&&(B.preventDefault&&B.preventDefault(),B.persist&&B.persist());let Y=kt(a);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:G,values:ie}=await _();r.errors=G,Y=ie}else await A(n);if(s.disabled.size)for(const G of s.disabled)Ae(Y,G,void 0);if(ot(r.errors,"root"),qt(r.errors)){d.state.next({errors:{}});try{await $(Y,B)}catch(G){J=G}}else M&&await M({...r.errors},B),le(),setTimeout(le);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:qt(r.errors)&&!J,submitCount:r.submitCount+1,errors:r.errors}),J)throw J},Be=($,M={})=>{re(n,$)&&(rt(M.defaultValue)?L($,kt(re(i,$))):(L($,M.defaultValue),Ae(i,$,kt(M.defaultValue))),M.keepTouched||ot(r.touchedFields,$),M.keepDirty||(ot(r.dirtyFields,$),r.isDirty=M.defaultValue?E($,kt(re(i,$))):E()),M.keepError||(ot(r.errors,$),f.isValid&&p()),d.state.next({...r}))},ye=($,M={})=>{const B=$?kt($):i,J=kt(B),Y=qt($),G=Y?i:J;if(M.keepDefaultValues||(i=B),!M.keepValues){if(M.keepDirtyValues){const ie=new Set([...s.mount,...Object.keys(Fs(i,a))]);for(const Oe of Array.from(ie))re(r.dirtyFields,Oe)?Ae(G,Oe,re(a,Oe)):L(Oe,re(G,Oe))}else{if(Yg&&rt($))for(const ie of s.mount){const Oe=re(n,ie);if(Oe&&Oe._f){const Te=Array.isArray(Oe._f.refs)?Oe._f.refs[0]:Oe._f.ref;if(Pf(Te)){const pr=Te.closest("form");if(pr){pr.reset();break}}}}for(const ie of s.mount)L(ie,re(G,ie))}a=kt(G),d.array.next({values:{...G}}),d.state.next({values:{...G}})}s={mount:M.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!M.keepIsValid||!!M.keepDirtyValues,o.watch=!!t.shouldUnregister,d.state.next({submitCount:M.keepSubmitCount?r.submitCount:0,isDirty:Y?!1:M.keepDirty?r.isDirty:!!(M.keepDefaultValues&&!ui($,i)),isSubmitted:M.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:Y?{}:M.keepDirtyValues?M.keepDefaultValues&&a?Fs(i,a):r.dirtyFields:M.keepDefaultValues&&$?Fs(i,$):M.keepDirty?r.dirtyFields:{},touchedFields:M.keepTouched?r.touchedFields:{},errors:M.keepErrors?r.errors:{},isSubmitSuccessful:M.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ge=($,M)=>ye(Vr($)?$(a):$,M),Ze=($,M={})=>{const B=re(n,$),J=B&&B._f;if(J){const Y=J.refs?J.refs[0]:J.ref;Y.focus&&(Y.focus(),M.shouldSelect&&Vr(Y.select)&&Y.select())}},Ot=$=>{r={...r,...$}},vn={control:{register:Z,unregister:St,getFieldState:Q,handleSubmit:W,setError:ne,_subscribe:Ee,_runSchema:_,_focusError:le,_getWatch:T,_getDirty:E,_setValid:p,_setFieldArray:x,_setDisabledField:vt,_setErrors:v,_getFieldArray:N,_reset:ye,_resetDefaultValues:()=>Vr(t.defaultValues)&&t.defaultValues().then($=>{Ge($,t.resetOptions),d.state.next({isLoading:!1})}),_removeUnmounted:C,_disableForm:de,_subjects:d,_proxyFormState:f,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state($){o=$},get _defaultValues(){return i},get _names(){return s},set _names($){s=$},get _formState(){return r},get _options(){return t},set _options($){t={...t,...$}}},subscribe:Ve,trigger:F,register:Z,handleSubmit:W,watch:me,setValue:L,getValues:H,reset:Ge,resetField:Be,clearErrors:K,unregister:St,setError:ne,setFocus:Ze,getFieldState:Q};return{...vn,formControl:vn}}function $k(e={}){const t=k.useRef(void 0),r=k.useRef(void 0),[n,i]=k.useState({isDirty:!1,isValidating:!1,isLoading:Vr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Vr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...e.formControl?e.formControl:kD(e),formState:n},e.formControl&&e.defaultValues&&!Vr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const a=t.current.control;return a._options=e,hD(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),k.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),k.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),k.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),k.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),k.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),k.useEffect(()=>{e.values&&!ui(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(o=>({...o}))):a._resetDefaultValues()},[a,e.values]),k.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=dD(n,a),t.current}const e1=(e,t,r)=>{if(e&&"reportValidity"in e){const n=re(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Tk=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?e1(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>e1(i,r,e))}},jD=(e,t)=>{t.shouldUseNativeValidation&&Tk(e,t);const r={};for(const n in e){const i=re(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(ED(t.names||Object.keys(e),n)){const o=Object.assign({},re(r,n));Ae(o,"root",a),Ae(r,n,o)}else Ae(r,n,a)}return r},ED=(e,t)=>{const r=t1(t);return e.some(n=>t1(n).match(`^${r}\\.\\d+`))};function t1(e){return e.replace(/\]|\[/g,"")}function Ck(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(o,s){try{var l=(t!=null&&t.context,Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:i}))).then(function(u){return a.shouldUseNativeValidation&&Tk({},a),{values:r.raw?Object.assign({},n):u,errors:{}}}))}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l}(0,function(o){if(!o.inner)throw o;return{values:{},errors:jD((s=o,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(s.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),l){var c=u[f.path].types,d=c&&c[f.type];u[f.path]=Ok(f.path,l,u,f.type,d?[].concat(d,f.message):f.message)}return u},{})),a)};var s,l}))}catch(o){return Promise.reject(o)}}}const io=j.forwardRef(({label:e,error:t,type:r="text",placeholder:n,className:i,icon:a,disabled:o,...s},l)=>g.jsxs("div",{className:"space-y-1",children:[e&&g.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:e}),g.jsxs("div",{className:"relative",children:[a&&g.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:g.jsx(a,{className:"h-5 w-5 text-gray-400"})}),g.jsx("input",{ref:l,type:r,placeholder:n,disabled:o,className:ue("input",a&&"pr-10",t&&"border-red-500 dark:border-red-500 focus:ring-red-500",o&&"opacity-50 cursor-not-allowed",i),...s})]}),t&&g.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:t})]}));io.displayName="Input";function Ca(e){this._maxSize=e,this.clear()}Ca.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Ca.prototype.get=function(e){return this._values[e]};Ca.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var $D=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Nk=/^\d+$/,TD=/^\d/,CD=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,ND=/^\s*(['"]?)(.*?)(\1)\s*$/,e0=512,r1=new Ca(e0),n1=new Ca(e0),i1=new Ca(e0),pa={Cache:Ca,split:mm,normalizePath:Dp,setter:function(e){var t=Dp(e);return n1.get(e)||n1.set(e,function(n,i){for(var a=0,o=t.length,s=n;ae.match(LD)||[],rh=e=>e[0].toUpperCase()+e.slice(1),r0=(e,t)=>th(e).join(t).toLowerCase(),Mk=e=>th(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),FD=e=>rh(Mk(e)),BD=e=>r0(e,"_"),zD=e=>r0(e,"-"),UD=e=>rh(r0(e," ")),VD=e=>th(e).map(rh).join(" ");var Rp={words:th,upperFirst:rh,camelCase:Mk,pascalCase:FD,snakeCase:BD,kebabCase:zD,sentenceCase:UD,titleCase:VD},n0={exports:{}};n0.exports=function(e){return Ik(WD(e),e)};n0.exports.array=Ik;function Ik(e,t){var r=e.length,n=new Array(r),i={},a=r,o=HD(t),s=qD(e);for(t.forEach(function(u){if(!s.has(u[0])||!s.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});a--;)i[a]||l(e[a],a,new Set);return n;function l(u,f,c){if(c.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!s.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[f]){i[f]=!0;var h=o.get(u)||new Set;if(h=Array.from(h),f=h.length){c.add(u);do{var y=h[--f];l(y,s.get(y),c)}while(f);c.delete(u)}n[--r]=u}}}function WD(e){for(var t=new Set,r=0,n=e.length;r"",JD=/^Symbol\((.*)\)(.*)$/;function eR(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function a1(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return eR(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return ZD.call(e).replace(JD,"Symbol($1)");const n=XD.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+YD.call(e)+"]":n==="RegExp"?QD.call(e):null}function Ei(e,t){let r=a1(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=a1(this[n],t);return a!==null?a:i},2)}function Dk(e){return e==null?[]:[].concat(e)}let Rk,Lk,Fk,tR=/\$\{\s*(\w+)\s*\}/g;Rk=Symbol.toStringTag;class o1{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Rk]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],Dk(t).forEach(a=>{if(Gt.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Lk=Symbol.hasInstance;Fk=Symbol.toStringTag;class Gt extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(tR,(i,a)=>Ei(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const o=new o1(t,r,n,i);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Fk]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Gt)}static[Lk](t){return o1[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Jr={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${Ei(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ei(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Ei(r,!0)}\``+i}},Ht={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},rR={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},vm={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},nR={isValue:"${path} field must be ${value}"},Hc={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},iR={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},aR={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.lengthi)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${Ei(r,!0)}\``}return Gt.formatError(Jr.notType,e)}};Object.assign(Object.create(null),{mixed:Jr,string:Ht,number:rR,date:vm,object:Hc,array:iR,boolean:nR,tuple:aR});const i0=e=>e&&e.__isYupSchema__;class jf{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new jf(t,(s,l)=>{var u;let f=o(...s)?i:a;return(u=f==null?void 0:f(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(a=>a.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!i0(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const yc={context:"$",value:"."};class Na{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===yc.context,this.isValue=this.key[0]===yc.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?yc.context:this.isValue?yc.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&pa.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Na.prototype.__isYupRef=!0;const ra=e=>e==null;function za(e){function t({value:r,path:n="",options:i,originalValue:a,schema:o},s,l){const{name:u,test:f,params:c,message:d,skipAbsent:h}=e;let{parent:y,context:p,abortEarly:b=o.spec.abortEarly,disableStackTrace:x=o.spec.disableStackTrace}=i;function m(E){return Na.isRef(E)?E.getValue(r,y,p):E}function v(E={}){const T=Object.assign({value:r,originalValue:a,label:o.spec.label,path:E.path||n,spec:o.spec,disableStackTrace:E.disableStackTrace||x},c,E.params);for(const D of Object.keys(T))T[D]=m(T[D]);const N=new Gt(Gt.formatError(E.message||d,T),r,T.path,E.type||u,T.disableStackTrace);return N.params=T,N}const O=b?s:l;let w={path:n,parent:y,type:u,from:i.from,createError:v,resolve:m,options:i,originalValue:a,schema:o};const S=E=>{Gt.isError(E)?O(E):E?l(null):O(v())},_=E=>{Gt.isError(E)?O(E):s(E)};if(h&&ra(r))return S(!0);let A;try{var C;if(A=f.call(w,r,w),typeof((C=A)==null?void 0:C.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${w.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(A).then(S,_)}}catch(E){_(E);return}S(A)}return t.OPTIONS=e,t}function oR(e,t,r,n=r){let i,a,o;return t?(pa.forEach(t,(s,l,u)=>{let f=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:i,value:r});let c=e.type==="tuple",d=u?parseInt(f,10):0;if(e.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&d>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[d],e=c?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=r,r=r&&r[f],e=e.fields[f]}a=f,o=l?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class Ef extends Set{describe(){const t=[];for(const r of this.values())t.push(Na.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Ef(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function ao(e,t=new Map){if(i0(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n{this.typeError(Jr.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=ao(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&ra(a))return a;let o=Ei(t),s=Ei(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". - -attempted value: ${o} -`+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:a,value:l,originalValue:o,options:r,tests:u},n,f=>{if(f.length)return i(f,l);this.runTests({path:a,value:l,originalValue:o,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:o,originalValue:s,path:l,options:u}=t,f=p=>{i||(i=!0,r(p,o))},c=p=>{i||(i=!0,n(p,o))},d=a.length,h=[];if(!d)return c([]);let y={value:o,originalValue:s,path:l,options:u,schema:this};for(let p=0;pthis.resolve(f)._validate(u,f,d,h)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,r,(l,u)=>{Gt.isError(l)&&(l.value=u),s(l)},(l,u)=>{l.length?s(new Gt(l,u,void 0,void 0,a)):o(u)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw Gt.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new Gt(s,t,void 0,void 0,o);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Gt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Gt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):ao(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=za({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=za({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Jr.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Jr.notNull){return this.nullability(!1,t)}required(t=Jr.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Jr.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=za(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=Dk(t).map(a=>new Na(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new jf(i,r):jf.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=za({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Jr.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=za({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),n}notOneOf(t,r=Jr.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=za({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:o}=r.spec;return{meta:i,label:n,optional:a,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,f)=>f.findIndex(c=>c.name===l.name)===u)}}}dn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])dn.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:o}=oR(this,t,r,n.context);return o[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])dn.prototype[e]=dn.prototype.oneOf;for(const e of["not","nope"])dn.prototype[e]=dn.prototype.notOneOf;const sR=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function lR(e){const t=gm(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function gm(e){var t,r;const n=sR.exec(e);return n?{year:bn(n[1]),month:bn(n[2],1)-1,day:bn(n[3],1),hour:bn(n[4]),minute:bn(n[5]),second:bn(n[6]),millisecond:n[7]?bn(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:bn(n[10]),minuteOffset:bn(n[11])}:null}function bn(e,t=0){return Number(e)||t}let uR=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cR=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,fR=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,dR="^\\d{4}-\\d{2}-\\d{2}",hR="\\d{2}:\\d{2}:\\d{2}",pR="(([+-]\\d{2}(:?\\d{2})?)|Z)",yR=new RegExp(`${dR}T${hR}(\\.\\d+)?${pR}$`),mR=e=>ra(e)||e===e.trim(),vR={}.toString();function Sr(){return new Bk}class Bk extends dn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===vR?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Jr.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=Ht.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=Ht.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=Ht.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||Ht.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=Ht.email){return this.matches(uR,{name:"email",message:t,excludeEmptyString:!0})}url(t=Ht.url){return this.matches(cR,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Ht.uuid){return this.matches(fR,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(yR,{name:"datetime",message:r||Ht.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Ht.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const o=gm(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:r||Ht.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=gm(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Ht.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:mR})}lowercase(t=Ht.lowercase){return this.transform(r=>ra(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ra(r)||r===r.toLowerCase()})}uppercase(t=Ht.uppercase){return this.transform(r=>ra(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ra(r)||r===r.toUpperCase()})}}Sr.prototype=Bk.prototype;let gR=new Date(""),xR=e=>Object.prototype.toString.call(e)==="[object Date]";class nh extends dn{constructor(){super({type:"date",check(t){return xR(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=lR(t),isNaN(t)?nh.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Na.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=vm.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=vm.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}nh.INVALID_DATE=gR;nh.prototype;function bR(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let l=pa.split(o)[0];n.add(l),i.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),Na.isRef(s)&&s.isSibling?a(s.path,o):i0(s)&&"deps"in s&&s.deps.forEach(l=>a(l,o))}return GD.array(Array.from(n),r).reverse()}function s1(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function zk(e){return(t,r)=>s1(e,t)-s1(e,r)}const wR=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function qc(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=qc(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=qc(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(qc)}):"optional"in e?e.optional():e}const SR=(e,t)=>{const r=[...pa.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=pa.getter(pa.join(r),!0)(e);return!!(i&&n in i)};let l1=e=>Object.prototype.toString.call(e)==="[object Object]";function u1(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const OR=zk([]);function ih(e){return new Uk(e)}class Uk extends dn{constructor(t){super({type:"object",check(r){return l1(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=OR,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),f=!1;for(const c of s){let d=a[c],h=c in i;if(d){let y,p=i[c];u.path=(r.path?`${r.path}.`:"")+c,d=d.resolve({value:p,context:r.context,parent:l});let b=d instanceof dn?d.spec:void 0,x=b==null?void 0:b.strict;if(b!=null&&b.strip){f=f||c in i;continue}y=!r.__validating||!x?d.cast(i[c],u):i[c],y!==void 0&&(l[c]=y)}else h&&!o&&(l[c]=i[c]);(h!==c in l||l[c]!==i[c])&&(f=!0)}return f?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...a],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,u)=>{if(!s||!l1(u)){i(l,u);return}o=o||u;let f=[];for(let c of this._nodes){let d=this.fields[c];!d||Na.isRef(d)||f.push(d.asNestedTest({options:r,key:c,parent:u,parentPath:r.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:r},n,c=>{i(c.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const o=n[i];n[i]=o===void 0?a:o}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=bR(t,r),n._sortErrors=zk(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return qc(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=pa.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return SR(a,t)&&(o=Object.assign({},a),n||delete o[t],o[r]=i(a)),o})}json(){return this.transform(wR)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Hc.exact,test(r){if(r==null)return!0;const n=u1(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Hc.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=u1(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Hc.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(Rp.camelCase)}snakeCase(){return this.transformKeys(Rp.snakeCase)}constantCase(){return this.transformKeys(t=>Rp.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,o]of Object.entries(r.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),n.fields[a]=o.describe(s)}return n}}ih.prototype=Uk.prototype;const _R=ih({email:Sr().required("ایمیل الزامی است").email("فرمت ایمیل صحیح نیست"),password:Sr().required("رمز عبور الزامی است").min(6,"رمز عبور باید حداقل ۶ کاراکتر باشد")}),PR=ih({name:Sr().required("نام الزامی است").min(2,"نام باید حداقل ۲ کاراکتر باشد"),email:Sr().required("ایمیل الزامی است").email("فرمت ایمیل صحیح نیست"),phone:Sr().required("شماره تلفن الزامی است").matches(/^09\d{9}$/,"شماره تلفن صحیح نیست"),role:Sr().required("نقش الزامی است"),password:Sr().optional().min(6,"رمز عبور باید حداقل ۶ کاراکتر باشد")});ih({siteName:Sr().required("نام سایت الزامی است"),siteDescription:Sr().required("توضیحات سایت الزامی است"),adminEmail:Sr().required("ایمیل مدیر الزامی است").email("فرمت ایمیل صحیح نیست"),language:Sr().required("زبان الزامی است")});const AR=()=>{var h;const{isAuthenticated:e,login:t}=Nu(),[r,n]=j.useState(!1),[i,a]=j.useState(!1),[o,s]=j.useState(""),{register:l,handleSubmit:u,formState:{errors:f,isValid:c}}=$k({resolver:Ck(_R),mode:"onChange"});if(e)return g.jsx(ek,{to:"/",replace:!0});const d=async y=>{a(!0),s("");try{await t(y.email,y.password)||s("ایمیل یا رمز عبور اشتباه است")}catch{s("خطایی رخ داده است. لطفا دوباره تلاش کنید")}finally{a(!1)}};return g.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8",children:g.jsxs("div",{className:"max-w-md w-full space-y-8",children:[g.jsxs("div",{children:[g.jsx("div",{className:"mx-auto h-12 w-12 bg-primary-600 rounded-lg flex items-center justify-center",children:g.jsx(Bb,{className:"h-6 w-6 text-white"})}),g.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-gray-100",children:"ورود به پنل مدیریت"}),g.jsx("p",{className:"mt-2 text-center text-sm text-gray-600 dark:text-gray-400",children:"لطفا اطلاعات خود را وارد کنید"})]}),g.jsxs("form",{className:"mt-8 space-y-6",onSubmit:u(d),children:[g.jsxs("div",{className:"space-y-4",children:[g.jsx(io,{label:"ایمیل",type:"email",placeholder:"admin@test.com",icon:gk,error:(h=f.email)==null?void 0:h.message,...l("email")}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"رمز عبور"}),g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:g.jsx(Bb,{className:"h-5 w-5 text-gray-400"})}),g.jsx("input",{type:r?"text":"password",placeholder:"admin123",className:`input pr-10 pl-10 ${f.password?"border-red-500 dark:border-red-500 focus:ring-red-500":""}`,...l("password")}),g.jsx("button",{type:"button",className:"absolute inset-y-0 left-0 pl-3 flex items-center",onClick:()=>n(!r),children:r?g.jsx(GI,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"}):g.jsx(XI,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"})})]}),f.password&&g.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:f.password.message})]})]}),o&&g.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 px-4 py-3 rounded-lg text-sm",children:o}),g.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 text-blue-600 dark:text-blue-400 px-4 py-3 rounded-lg text-sm",children:[g.jsx("p",{className:"font-medium",children:"اطلاعات تست:"}),g.jsx("p",{children:"ایمیل: admin@test.com"}),g.jsx("p",{children:"رمز عبور: admin123"})]}),g.jsx(je,{type:"submit",loading:i,disabled:!c,className:"w-full",children:"ورود"})]})]})})},kR=({title:e,value:t,change:r,icon:n,color:i="blue"})=>{const a={blue:"bg-blue-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500",purple:"bg-purple-500"},o=r&&r>0,s=r&&r<0;return g.jsx("div",{className:"card p-6 animate-fade-in",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"flex-shrink-0",children:g.jsx("div",{className:`p-3 rounded-lg ${a[i]||a.blue}`,children:g.jsx(n,{className:"h-6 w-6 text-white"})})}),g.jsx("div",{className:"mr-5 w-0 flex-1",children:g.jsxs("dl",{children:[g.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate",children:e}),g.jsxs("dd",{className:"flex items-baseline",children:[g.jsx("div",{className:"text-2xl font-semibold text-gray-900 dark:text-gray-100",children:typeof t=="number"?t.toLocaleString():t}),r!==void 0&&g.jsxs("div",{className:`mr-2 flex items-baseline text-sm font-semibold ${o?"text-green-600":s?"text-red-600":"text-gray-500"}`,children:[o&&g.jsx(Wl,{className:"h-4 w-4 flex-shrink-0 self-center ml-1"}),s&&g.jsx(iD,{className:"h-4 w-4 flex-shrink-0 self-center ml-1"}),g.jsx("span",{className:"sr-only",children:o?"افزایش":"کاهش"}),Math.abs(r),"%"]})]})]})})]})})};var jR=Array.isArray,er=jR,ER=typeof Xu=="object"&&Xu&&Xu.Object===Object&&Xu,Vk=ER,$R=Vk,TR=typeof self=="object"&&self&&self.Object===Object&&self,CR=$R||TR||Function("return this")(),pn=CR,NR=pn,MR=NR.Symbol,Du=MR,c1=Du,Wk=Object.prototype,IR=Wk.hasOwnProperty,DR=Wk.toString,zs=c1?c1.toStringTag:void 0;function RR(e){var t=IR.call(e,zs),r=e[zs];try{e[zs]=void 0;var n=!0}catch{}var i=DR.call(e);return n&&(t?e[zs]=r:delete e[zs]),i}var LR=RR,FR=Object.prototype,BR=FR.toString;function zR(e){return BR.call(e)}var UR=zR,f1=Du,VR=LR,WR=UR,HR="[object Null]",qR="[object Undefined]",d1=f1?f1.toStringTag:void 0;function KR(e){return e==null?e===void 0?qR:HR:d1&&d1 in Object(e)?VR(e):WR(e)}var Gn=KR;function GR(e){return e!=null&&typeof e=="object"}var Xn=GR,XR=Gn,YR=Xn,QR="[object Symbol]";function ZR(e){return typeof e=="symbol"||YR(e)&&XR(e)==QR}var ms=ZR,JR=er,e3=ms,t3=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r3=/^\w*$/;function n3(e,t){if(JR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||e3(e)?!0:r3.test(e)||!t3.test(e)||t!=null&&e in Object(t)}var a0=n3;function i3(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Li=i3;const vs=Se(Li);var a3=Gn,o3=Li,s3="[object AsyncFunction]",l3="[object Function]",u3="[object GeneratorFunction]",c3="[object Proxy]";function f3(e){if(!o3(e))return!1;var t=a3(e);return t==l3||t==u3||t==s3||t==c3}var o0=f3;const se=Se(o0);var d3=pn,h3=d3["__core-js_shared__"],p3=h3,Lp=p3,h1=function(){var e=/[^.]+$/.exec(Lp&&Lp.keys&&Lp.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function y3(e){return!!h1&&h1 in e}var m3=y3,v3=Function.prototype,g3=v3.toString;function x3(e){if(e!=null){try{return g3.call(e)}catch{}try{return e+""}catch{}}return""}var Hk=x3,b3=o0,w3=m3,S3=Li,O3=Hk,_3=/[\\^$.*+?()[\]{}|]/g,P3=/^\[object .+?Constructor\]$/,A3=Function.prototype,k3=Object.prototype,j3=A3.toString,E3=k3.hasOwnProperty,$3=RegExp("^"+j3.call(E3).replace(_3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function T3(e){if(!S3(e)||w3(e))return!1;var t=b3(e)?$3:P3;return t.test(O3(e))}var C3=T3;function N3(e,t){return e==null?void 0:e[t]}var M3=N3,I3=C3,D3=M3;function R3(e,t){var r=D3(e,t);return I3(r)?r:void 0}var Ma=R3,L3=Ma,F3=L3(Object,"create"),ah=F3,p1=ah;function B3(){this.__data__=p1?p1(null):{},this.size=0}var z3=B3;function U3(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var V3=U3,W3=ah,H3="__lodash_hash_undefined__",q3=Object.prototype,K3=q3.hasOwnProperty;function G3(e){var t=this.__data__;if(W3){var r=t[e];return r===H3?void 0:r}return K3.call(t,e)?t[e]:void 0}var X3=G3,Y3=ah,Q3=Object.prototype,Z3=Q3.hasOwnProperty;function J3(e){var t=this.__data__;return Y3?t[e]!==void 0:Z3.call(t,e)}var eL=J3,tL=ah,rL="__lodash_hash_undefined__";function nL(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tL&&t===void 0?rL:t,this}var iL=nL,aL=z3,oL=V3,sL=X3,lL=eL,uL=iL;function gs(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var AL=PL,kL=oh;function jL(e,t){var r=this.__data__,n=kL(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var EL=jL,$L=dL,TL=bL,CL=OL,NL=AL,ML=EL;function xs(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},na=function(t){return Sa(t)&&t.indexOf("%")===t.length-1},X=function(t){return rF(t)&&!Ru(t)},ct=function(t){return X(t)||Sa(t)},oF=0,ws=function(t){var r=++oF;return"".concat(t||"").concat(r)},Bt=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(!X(t)&&!Sa(t))return n;var a;if(na(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Ru(a)&&(a=n),i&&a>r&&(a=r),a},ci=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},sF=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 pF(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 bm(e){"@babel/helpers - typeof";return bm=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},bm(e)}var w1={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"},Mn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},S1=null,Bp=null,m0=function e(t){if(t===S1&&Array.isArray(Bp))return Bp;var r=[];return j.Children.forEach(t,function(n){ce(n)||(Q4.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Bp=r,S1=t,r};function cr(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Mn(i)}):n=[Mn(t)],m0(e).forEach(function(i){var a=ur(i,"type.displayName")||ur(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function ir(e,t){var r=cr(e,t);return r&&r[0]}var O1=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!X(n)||n<=0||!X(i)||i<=0)},yF=["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"],mF=function(t){return t&&t.type&&Sa(t.type)&&yF.indexOf(t.type)>=0},vF=function(t){return t&&bm(t)==="object"&&"clipDot"in t},gF=function(t,r,n,i){var a,o=(a=Fp==null?void 0:Fp[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!se(t)&&(i&&o.includes(r)||cF.includes(r))||n&&y0.includes(r)},ae=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(j.isValidElement(t)&&(i=t.props),!vs(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;gF((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},wm=function e(t,r){if(t===r)return!0;var n=j.Children.count(t);if(n!==j.Children.count(r))return!1;if(n===0)return!0;if(n===1)return _1(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 OF(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 Om(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=SF(e,wF),f=i||{width:r,height:n,x:0,y:0},c=ue("recharts-surface",a);return k.createElement("svg",Sm({},ae(u,!0,"svg"),{className:c,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),k.createElement("title",null,s),k.createElement("desc",null,l),t)}var _F=["children","className"];function _m(){return _m=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 AF(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 xe=k.forwardRef(function(e,t){var r=e.children,n=e.className,i=PF(e,_F),a=ue("recharts-layer",n);return k.createElement("g",_m({className:a},ae(i,!0),{ref:t}),r)}),Kr=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:EF(e,t,r)}var TF=$F,CF="\\ud800-\\udfff",NF="\\u0300-\\u036f",MF="\\ufe20-\\ufe2f",IF="\\u20d0-\\u20ff",DF=NF+MF+IF,RF="\\ufe0e\\ufe0f",LF="\\u200d",FF=RegExp("["+LF+CF+DF+RF+"]");function BF(e){return FF.test(e)}var tj=BF;function zF(e){return e.split("")}var UF=zF,rj="\\ud800-\\udfff",VF="\\u0300-\\u036f",WF="\\ufe20-\\ufe2f",HF="\\u20d0-\\u20ff",qF=VF+WF+HF,KF="\\ufe0e\\ufe0f",GF="["+rj+"]",Pm="["+qF+"]",Am="\\ud83c[\\udffb-\\udfff]",XF="(?:"+Pm+"|"+Am+")",nj="[^"+rj+"]",ij="(?:\\ud83c[\\udde6-\\uddff]){2}",aj="[\\ud800-\\udbff][\\udc00-\\udfff]",YF="\\u200d",oj=XF+"?",sj="["+KF+"]?",QF="(?:"+YF+"(?:"+[nj,ij,aj].join("|")+")"+sj+oj+")*",ZF=sj+oj+QF,JF="(?:"+[nj+Pm+"?",Pm,ij,aj,GF].join("|")+")",e6=RegExp(Am+"(?="+Am+")|"+JF+ZF,"g");function t6(e){return e.match(e6)||[]}var r6=t6,n6=UF,i6=tj,a6=r6;function o6(e){return i6(e)?a6(e):n6(e)}var s6=o6,l6=TF,u6=tj,c6=s6,f6=Xk;function d6(e){return function(t){t=f6(t);var r=u6(t)?c6(t):void 0,n=r?r[0]:t.charAt(0),i=r?l6(r,1).join(""):t.slice(1);return n[e]()+i}}var h6=d6,p6=h6,y6=p6("toUpperCase"),m6=y6;const bh=Se(m6);function Ne(e){return function(){return e}}const lj=Math.cos,Cf=Math.sin,Xr=Math.sqrt,Nf=Math.PI,wh=2*Nf,km=Math.PI,jm=2*km,Ki=1e-6,v6=jm-Ki;function uj(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return uj;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iKi)if(!(Math.abs(c*l-u*f)>Ki)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,y=i-s,p=l*l+u*u,b=h*h+y*y,x=Math.sqrt(p),m=Math.sqrt(d),v=a*Math.tan((km-Math.acos((p+d-b)/(2*x*m)))/2),O=v/m,w=v/x;Math.abs(O-1)>Ki&&this._append`L${t+O*f},${r+O*c}`,this._append`A${a},${a},0,0,${+(c*h>f*y)},${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)>Ki||Math.abs(this._y1-f)>Ki)&&this._append`L${u},${f}`,n&&(d<0&&(d=d%jm+jm),d>v6?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>Ki&&this._append`A${n},${n},0,${+(d>=km)},${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 v0(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 x6(t)}function g0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function cj(e){this._context=e}cj.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 Sh(e){return new cj(e)}function fj(e){return e[0]}function dj(e){return e[1]}function hj(e,t){var r=Ne(!0),n=null,i=Sh,a=null,o=v0(s);e=typeof e=="function"?e:e===void 0?fj:Ne(e),t=typeof t=="function"?t:t===void 0?dj:Ne(t);function s(l){var u,f=(l=g0(l)).length,c,d=!1,h;for(n==null&&(a=i(h=o())),u=0;u<=f;++u)!(u=h;--y)s.point(v[y],O[y]);s.lineEnd(),s.areaEnd()}x&&(v[d]=+e(b,d,c),O[d]=+t(b,d,c),s.point(n?+n(b,d,c):v[d],r?+r(b,d,c):O[d]))}if(m)return s=null,m+""||null}function f(){return hj().defined(i).curve(o).context(a)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ne(+c),n=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:Ne(+c),u):e},u.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Ne(+c),u):n},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ne(+c),r=null,u):t},u.y0=function(c){return arguments.length?(t=typeof c=="function"?c:Ne(+c),u):t},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Ne(+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:Ne(!!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 pj{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 b6(e){return new pj(e,!0)}function w6(e){return new pj(e,!1)}const x0={draw(e,t){const r=Xr(t/Nf);e.moveTo(r,0),e.arc(0,0,r,0,wh)}},S6={draw(e,t){const r=Xr(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()}},yj=Xr(1/3),O6=yj*2,_6={draw(e,t){const r=Xr(t/O6),n=r*yj;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},P6={draw(e,t){const r=Xr(t),n=-r/2;e.rect(n,n,r,r)}},A6=.8908130915292852,mj=Cf(Nf/10)/Cf(7*Nf/10),k6=Cf(wh/10)*mj,j6=-lj(wh/10)*mj,E6={draw(e,t){const r=Xr(t*A6),n=k6*r,i=j6*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=wh*a/5,s=lj(o),l=Cf(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},zp=Xr(3),$6={draw(e,t){const r=-Xr(t/(zp*3));e.moveTo(0,r*2),e.lineTo(-zp*r,-r),e.lineTo(zp*r,-r),e.closePath()}},yr=-.5,mr=Xr(3)/2,Em=1/Xr(12),T6=(Em/2+1)*3,C6={draw(e,t){const r=Xr(t/T6),n=r/2,i=r*Em,a=n,o=r*Em+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(yr*n-mr*i,mr*n+yr*i),e.lineTo(yr*a-mr*o,mr*a+yr*o),e.lineTo(yr*s-mr*l,mr*s+yr*l),e.lineTo(yr*n+mr*i,yr*i-mr*n),e.lineTo(yr*a+mr*o,yr*o-mr*a),e.lineTo(yr*s+mr*l,yr*l-mr*s),e.closePath()}};function N6(e,t){let r=null,n=v0(i);e=typeof e=="function"?e:Ne(e||x0),t=typeof t=="function"?t:Ne(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:Ne(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ne(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Mf(){}function If(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 vj(e){this._context=e}vj.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:If(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:If(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function M6(e){return new vj(e)}function gj(e){this._context=e}gj.prototype={areaStart:Mf,areaEnd:Mf,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:If(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function I6(e){return new gj(e)}function xj(e){this._context=e}xj.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:If(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function D6(e){return new xj(e)}function bj(e){this._context=e}bj.prototype={areaStart:Mf,areaEnd:Mf,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 R6(e){return new bj(e)}function A1(e){return e<0?-1:1}function k1(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(A1(a)+A1(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function j1(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Up(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 Df(e){this._context=e}Df.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:Up(this,this._t0,j1(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,Up(this,j1(this,r=k1(this,e,t)),r);break;default:Up(this,this._t0,r=k1(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function wj(e){this._context=new Sj(e)}(wj.prototype=Object.create(Df.prototype)).point=function(e,t){Df.prototype.point.call(this,t,e)};function Sj(e){this._context=e}Sj.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 L6(e){return new Df(e)}function F6(e){return new wj(e)}function Oj(e){this._context=e}Oj.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=E1(e),i=E1(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 z6(e){return new Oh(e,.5)}function U6(e){return new Oh(e,0)}function V6(e){return new Oh(e,1)}function Fo(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 W6(e,t){return e[t]}function H6(e){const t=[];return t.key=e,t}function q6(){var e=Ne([]),t=$m,r=Fo,n=W6;function i(a){var o=Array.from(e.apply(this,arguments),H6),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 t5(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 _j={symbolCircle:x0,symbolCross:S6,symbolDiamond:_6,symbolSquare:P6,symbolStar:E6,symbolTriangle:$6,symbolWye:C6},r5=Math.PI/180,n5=function(t){var r="symbol".concat(bh(t));return _j[r]||x0},i5=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*r5;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}},a5=function(t,r){_j["symbol".concat(bh(t))]=r},b0=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=e5(t,Y6),u=T1(T1({},l),{},{type:n,size:a,sizeType:s}),f=function(){var b=n5(n),x=N6().type(b).size(i5(a,s,n));return x()},c=u.className,d=u.cx,h=u.cy,y=ae(u,!0);return d===+d&&h===+h&&a===+a?k.createElement("path",Tm({},y,{className:ue("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};b0.registerSymbol=a5;function Bo(e){"@babel/helpers - typeof";return Bo=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},Bo(e)}function Cm(){return Cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var m=h.inactive?u:h.color;return k.createElement("li",Cm({className:b,style:c,key:"legend-item-".concat(y)},Oa(n.props,h,y)),k.createElement(Om,{width:o,height:o,viewBox:f,style:d},n.renderIcon(h)),k.createElement("span",{className:"recharts-legend-item-text",style:{color:m}},p?p(x,h,y):x))})}},{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 k.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(j.PureComponent);ql(w0,"displayName","Legend");ql(w0,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var p5=sh;function y5(){this.__data__=new p5,this.size=0}var m5=y5;function v5(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var g5=v5;function x5(e){return this.__data__.get(e)}var b5=x5;function w5(e){return this.__data__.has(e)}var S5=w5,O5=sh,_5=l0,P5=u0,A5=200;function k5(e,t){var r=this.__data__;if(r instanceof O5){var n=r.__data__;if(!_5||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&X5?new H5:void 0;for(a.set(e,t),a.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=J8}var P0=eB,tB=Gn,rB=P0,nB=Xn,iB="[object Arguments]",aB="[object Array]",oB="[object Boolean]",sB="[object Date]",lB="[object Error]",uB="[object Function]",cB="[object Map]",fB="[object Number]",dB="[object Object]",hB="[object RegExp]",pB="[object Set]",yB="[object String]",mB="[object WeakMap]",vB="[object ArrayBuffer]",gB="[object DataView]",xB="[object Float32Array]",bB="[object Float64Array]",wB="[object Int8Array]",SB="[object Int16Array]",OB="[object Int32Array]",_B="[object Uint8Array]",PB="[object Uint8ClampedArray]",AB="[object Uint16Array]",kB="[object Uint32Array]",Re={};Re[xB]=Re[bB]=Re[wB]=Re[SB]=Re[OB]=Re[_B]=Re[PB]=Re[AB]=Re[kB]=!0;Re[iB]=Re[aB]=Re[vB]=Re[oB]=Re[gB]=Re[sB]=Re[lB]=Re[uB]=Re[cB]=Re[fB]=Re[dB]=Re[hB]=Re[pB]=Re[yB]=Re[mB]=!1;function jB(e){return nB(e)&&rB(e.length)&&!!Re[tB(e)]}var EB=jB;function $B(e){return function(t){return e(t)}}var Ij=$B,Bf={exports:{}};Bf.exports;(function(e,t){var r=Vk,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})(Bf,Bf.exports);var TB=Bf.exports,CB=EB,NB=Ij,F1=TB,B1=F1&&F1.isTypedArray,MB=B1?NB(B1):CB,Dj=MB,IB=L8,DB=O0,RB=er,LB=Mj,FB=_0,BB=Dj,zB=Object.prototype,UB=zB.hasOwnProperty;function VB(e,t){var r=RB(e),n=!r&&DB(e),i=!r&&!n&&LB(e),a=!r&&!n&&!i&&BB(e),o=r||n||i||a,s=o?IB(e.length,String):[],l=s.length;for(var u in e)(t||UB.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||FB(u,l)))&&s.push(u);return s}var WB=VB,HB=Object.prototype;function qB(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||HB;return e===r}var KB=qB;function GB(e,t){return function(r){return e(t(r))}}var Rj=GB,XB=Rj,YB=XB(Object.keys,Object),QB=YB,ZB=KB,JB=QB,ez=Object.prototype,tz=ez.hasOwnProperty;function rz(e){if(!ZB(e))return JB(e);var t=[];for(var r in Object(e))tz.call(e,r)&&r!="constructor"&&t.push(r);return t}var nz=rz,iz=o0,az=P0;function oz(e){return e!=null&&az(e.length)&&!iz(e)}var Lu=oz,sz=WB,lz=nz,uz=Lu;function cz(e){return uz(e)?sz(e):lz(e)}var _h=cz,fz=A8,dz=D8,hz=_h;function pz(e){return fz(e,hz,dz)}var yz=pz,z1=yz,mz=1,vz=Object.prototype,gz=vz.hasOwnProperty;function xz(e,t,r,n,i,a){var o=r&mz,s=z1(e),l=s.length,u=z1(t),f=u.length;if(l!=f&&!o)return!1;for(var c=l;c--;){var d=s[c];if(!(o?d in t:gz.call(t,d)))return!1}var h=a.get(e),y=a.get(t);if(h&&y)return h==t&&y==e;var p=!0;a.set(e,t),a.set(t,e);for(var b=o;++c-1}var v9=m9;function g9(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=N9){var u=t?null:T9(e);if(u)return C9(u);o=!1,i=$9,l=new k9}else l=t?[]:s;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X9(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 Y9(e){return e.value}function Q9(e,t){if(k.isValidElement(e))return k.cloneElement(e,t);if(typeof e=="function")return k.createElement(e,t);t.ref;var r=G9(t,B9);return k.createElement(w0,r)}var nw=1,xo=function(e){function t(){var r;z9(this,t);for(var n=arguments.length,i=new Array(n),a=0;anw||Math.abs(i.height-this.lastBoundingBox.height)>nw)&&(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?wn({},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 y=this.getBBoxSnapshot();d={top:((f||0)-y.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return wn(wn({},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=wn(wn({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return k.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(h){n.wrapperNode=h}},Q9(a,wn(wn({},this.props),{},{payload:Wj(f,u,Y9)})))}}],[{key:"getWithHeight",value:function(n,i){var a=wn(wn({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&X(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(j.PureComponent);Ph(xo,"displayName","Legend");Ph(xo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var iw=Du,Z9=O0,J9=er,aw=iw?iw.isConcatSpreadable:void 0;function e7(e){return J9(e)||Z9(e)||!!(aw&&e&&e[aw])}var t7=e7,r7=Cj,n7=t7;function Kj(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=n7),i||(i=[]);++a0&&r(s)?t>1?Kj(s,t-1,r,n,i):r7(i,s):n||(i[i.length]=s)}return i}var Gj=Kj;function i7(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 a7=i7,o7=a7,s7=o7(),l7=s7,u7=l7,c7=_h;function f7(e,t){return e&&u7(e,t,c7)}var Xj=f7,d7=Lu;function h7(e,t){return function(r,n){if(r==null)return r;if(!d7(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 k7=A7,qp=f0,j7=d0,E7=yn,$7=Yj,T7=S7,C7=Ij,N7=k7,M7=_s,I7=er;function D7(e,t,r){t.length?t=qp(t,function(a){return I7(a)?function(o){return j7(o,a.length===1?a[0]:a)}:a}):t=[M7];var n=-1;t=qp(t,C7(E7));var i=$7(e,function(a,o,s){var l=qp(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return T7(i,function(a,o){return N7(a,o,r)})}var R7=D7;function L7(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 F7=L7,B7=F7,sw=Math.max;function z7(e,t,r){return t=sw(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=sw(n.length-t,0),o=Array(a);++i0){if(++t>=Q7)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var tV=eV,rV=Y7,nV=tV,iV=nV(rV),aV=iV,oV=_s,sV=U7,lV=aV;function uV(e,t){return lV(sV(e,t,oV),e+"")}var cV=uV,fV=s0,dV=Lu,hV=_0,pV=Li;function yV(e,t,r){if(!pV(r))return!1;var n=typeof t;return(n=="number"?dV(r)&&hV(t,r.length):n=="string"&&t in r)?fV(r[t],e):!1}var Ah=yV,mV=Gj,vV=R7,gV=cV,uw=Ah,xV=gV(function(e,t){if(e==null)return[];var r=t.length;return r>1&&uw(e,t[0],t[1])?t=[]:r>2&&uw(t[0],t[1],t[2])&&(t=[t[0]]),vV(e,mV(t,1),[])}),bV=xV;const j0=Se(bV);function Kl(e){"@babel/helpers - typeof";return Kl=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},Kl(e)}function Bm(){return Bm=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(Us,"-left"),X(r)&&t&&X(t.x)&&r=t.y),"".concat(Us,"-top"),X(n)&&t&&X(t.y)&&np?Math.max(f,l[n]):Math.max(c,l[n])}function IV(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 DV(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=dw({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),c=dw({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=IV({translateX:f,translateY:c,useTranslate3d:s})):u=NV,{cssProperties:u,cssClasses:MV({translateX:f,translateY:c,coordinate:r})}}function Uo(e){"@babel/helpers - typeof";return Uo=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},Uo(e)}function hw(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 pw(e){for(var t=1;tmw||Math.abs(n.height-this.state.lastBoundingBox.height)>mw)&&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,y=i.position,p=i.reverseDirection,b=i.useTranslate3d,x=i.viewBox,m=i.wrapperStyle,v=DV({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:y,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:x}),O=v.cssClasses,w=v.cssProperties,S=pw(pw({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},m);return k.createElement("div",{tabIndex:-1,className:O,style:S,ref:function(P){n.wrapperNode=P}},u)}}])}(j.PureComponent),HV=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},un={isSsr:HV(),get:function(t){return un[t]},set:function(t,r){if(typeof t=="string")un[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(i){un[i]=t[i]})}}};function Vo(e){"@babel/helpers - typeof";return Vo=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},Vo(e)}function vw(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 gw(e){for(var t=1;t0;return k.createElement(WV,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:a,coordinate:f,hasPayload:S,offset:h,position:b,reverseDirection:x,useTranslate3d:m,viewBox:v,wrapperStyle:O},eW(u,gw(gw({},this.props),{},{payload:w})))}}])}(j.PureComponent);E0(xr,"displayName","Tooltip");E0(xr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!un.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 tW=pn,rW=function(){return tW.Date.now()},nW=rW,iW=/\s/;function aW(e){for(var t=e.length;t--&&iW.test(e.charAt(t)););return t}var oW=aW,sW=oW,lW=/^\s+/;function uW(e){return e&&e.slice(0,sW(e)+1).replace(lW,"")}var cW=uW,fW=cW,bw=Li,dW=ms,ww=0/0,hW=/^[-+]0x[0-9a-f]+$/i,pW=/^0b[01]+$/i,yW=/^0o[0-7]+$/i,mW=parseInt;function vW(e){if(typeof e=="number")return e;if(dW(e))return ww;if(bw(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=bw(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=fW(e);var r=pW.test(e);return r||yW.test(e)?mW(e.slice(2),r?2:8):hW.test(e)?ww:+e}var rE=vW,gW=Li,Gp=nW,Sw=rE,xW="Expected a function",bW=Math.max,wW=Math.min;function SW(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(xW);t=Sw(t)||0,gW(r)&&(f=!!r.leading,c="maxWait"in r,a=c?bW(Sw(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d);function h(S){var _=n,P=i;return n=i=void 0,u=S,o=e.apply(P,_),o}function y(S){return u=S,s=setTimeout(x,t),f?h(S):o}function p(S){var _=S-l,P=S-u,A=t-_;return c?wW(A,a-P):A}function b(S){var _=S-l,P=S-u;return l===void 0||_>=t||_<0||c&&P>=a}function x(){var S=Gp();if(b(S))return m(S);s=setTimeout(x,p(S))}function m(S){return s=void 0,d&&n?h(S):(n=i=void 0,o)}function v(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function O(){return s===void 0?o:m(Gp())}function w(){var S=Gp(),_=b(S);if(n=arguments,i=this,l=S,_){if(s===void 0)return y(l);if(c)return clearTimeout(s),s=setTimeout(x,t),h(l)}return s===void 0&&(s=setTimeout(x,t)),o}return w.cancel=v,w.flush=O,w}var OW=SW,_W=OW,PW=Li,AW="Expected a function";function kW(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(AW);return PW(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),_W(e,t,{leading:n,maxWait:t,trailing:i})}var jW=kW;const nE=Se(jW);function Xl(e){"@babel/helpers - typeof";return Xl=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},Xl(e)}function Ow(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 xc(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(N=nE(N,p,{trailing:!0,leading:!1}));var D=new ResizeObserver(N),R=w.current.getBoundingClientRect(),L=R.width,V=R.height;return E(L,V),D.observe(w.current),function(){D.disconnect()}},[E,p]);var T=j.useMemo(function(){var N=A.containerWidth,D=A.containerHeight;if(N<0||D<0)return null;Kr(na(o)||na(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,l),Kr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var R=na(o)?N:o,L=na(l)?D:l;r&&r>0&&(R?L=R/r:L&&(R=L*r),d&&L>d&&(L=d)),Kr(R>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,R,L,o,l,f,c,r);var V=!Array.isArray(h)&&Mn(h.type).endsWith("Chart");return k.Children.map(h,function(I){return k.isValidElement(I)?j.cloneElement(I,xc({width:R,height:L},V?{style:xc({height:"100%",width:"100%",maxHeight:L,maxWidth:R},I.props.style)}:{})):I})},[r,h,l,d,c,f,A,o]);return k.createElement("div",{id:b?"".concat(b):void 0,className:ue("recharts-responsive-container",x),style:xc(xc({},O),{},{width:o,height:l,minWidth:f,minHeight:c,maxHeight:d}),ref:w},T)}),kh=function(t){return null};kh.displayName="Cell";function Yl(e){"@babel/helpers - typeof";return Yl=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},Yl(e)}function Pw(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 Wm(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||un.isSsr)return{width:0,height:0};var n=UW(r),i=JSON.stringify({text:t,copyStyle:n});if(Ua.widthCache[i])return Ua.widthCache[i];try{var a=document.getElementById(Aw);a||(a=document.createElement("span"),a.setAttribute("id",Aw),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Wm(Wm({},zW),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return Ua.widthCache[i]=l,++Ua.cacheCount>BW&&(Ua.cacheCount=0,Ua.widthCache={}),l}catch{return{width:0,height:0}}},VW=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Ql(e){"@babel/helpers - typeof";return Ql=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},Ql(e)}function Wf(e,t){return KW(e)||qW(e,t)||HW(e,t)||WW()}function WW(){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 HW(e,t){if(e){if(typeof e=="string")return kw(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 kw(e,t)}}function kw(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 sH(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 Nw(e,t){return fH(e)||cH(e,t)||uH(e,t)||lH()}function lH(){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 uH(e,t){if(e){if(typeof e=="string")return Mw(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 Mw(e,t)}}function Mw(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 R.reduce(function(L,V){var I=V.word,F=V.width,H=L[L.length-1];if(H&&(i==null||a||H.width+F+nV.width?L:V})};if(!f)return h;for(var p="…",b=function(R){var L=c.slice(0,R),V=sE({breakAll:u,style:l,children:L+p}).wordsWithComputedWidth,I=d(V),F=I.length>o||y(I).width>Number(i);return[F,I]},x=0,m=c.length-1,v=0,O;x<=m&&v<=c.length-1;){var w=Math.floor((x+m)/2),S=w-1,_=b(S),P=Nw(_,2),A=P[0],C=P[1],E=b(w),T=Nw(E,1),N=T[0];if(!A&&!N&&(x=w+1),A&&N&&(m=w-1),!A&&N){O=C;break}v++}return O||h},Iw=function(t){var r=ce(t)?[]:t.toString().split(oE);return[{words:r}]},hH=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!un.isSsr){var l,u,f=sE({breakAll:o,children:i,style:a});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;l=c,u=d}else return Iw(i);return dH({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return Iw(i)},Dw="#808080",_a=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,y=t.verticalAnchor,p=y===void 0?"end":y,b=t.fill,x=b===void 0?Dw:b,m=Cw(t,aH),v=j.useMemo(function(){return hH({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:c,style:m.style,width:m.width})},[m.breakAll,m.children,m.maxLines,c,m.style,m.width]),O=m.dx,w=m.dy,S=m.angle,_=m.className,P=m.breakAll,A=Cw(m,oH);if(!ct(n)||!ct(a))return null;var C=n+(X(O)?O:0),E=a+(X(w)?w:0),T;switch(p){case"start":T=Xp("calc(".concat(u,")"));break;case"middle":T=Xp("calc(".concat((v.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:T=Xp("calc(".concat(v.length-1," * -").concat(s,")"));break}var N=[];if(c){var D=v[0].width,R=m.width;N.push("scale(".concat((X(R)?R/D:1)/D,")"))}return S&&N.push("rotate(".concat(S,", ").concat(C,", ").concat(E,")")),N.length&&(A.transform=N.join(" ")),k.createElement("text",Hm({},ae(A,!0),{x:C,y:E,className:ue("recharts-text",_),textAnchor:h,fill:x.includes("url")?Dw:x}),v.map(function(L,V){var I=L.words.join(P?"":" ");return k.createElement("tspan",{x:C,dy:V===0?T:s,key:"".concat(I,"-").concat(V)},I)}))};function $i(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function pH(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function T0(e){let t,r,n;e.length!==2?(t=$i,r=(s,l)=>$i(e(s),l),n=(s,l)=>e(s)-l):(t=e===$i||e===pH?e:yH,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 yH(){return 0}function lE(e){return e===null?NaN:+e}function*mH(e,t){if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&(yield r);else{let r=-1;for(let n of e)(n=t(n,++r,e))!=null&&(n=+n)>=n&&(yield n)}}const vH=T0($i),gH=vH.right;T0(lE).center;const Fu=gH;class Rw extends Map{constructor(t,r=wH){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(Lw(this,t))}has(t){return super.has(Lw(this,t))}set(t,r){return super.set(xH(this,t),r)}delete(t){return super.delete(bH(this,t))}}function Lw({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function xH({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function bH({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function wH(e){return e!==null&&typeof e=="object"?e.valueOf():e}function SH(e=$i){if(e===$i)return uE;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 uE(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const OH=Math.sqrt(50),_H=Math.sqrt(10),PH=Math.sqrt(2);function Hf(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>=OH?10:a>=_H?5:a>=PH?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);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}function Bw(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function cE(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?uE:SH(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)),y=Math.min(n,Math.floor(t+(l-u)*c/l+d));cE(e,t,h,y,i)}const a=e[t];let o=r,s=n;for(Vs(e,r,t),i(e[n],a)>0&&Vs(e,r,n);o0;)--s}i(e[r],a)===0?Vs(e,r,s):(++s,Vs(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Vs(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function AH(e,t,r){if(e=Float64Array.from(mH(e,r)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Bw(e);if(t>=1)return Fw(e);var n,i=(n-1)*t,a=Math.floor(i),o=Fw(cE(e,a).subarray(0,a+1)),s=Bw(e.subarray(a+1));return o+(s-o)*(i-a)}}function kH(e,t,r=lE){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 jH(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?wc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?wc(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=$H.exec(e))?new Yt(t[1],t[2],t[3],1):(t=TH.exec(e))?new Yt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=CH.exec(e))?wc(t[1],t[2],t[3],t[4]):(t=NH.exec(e))?wc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=MH.exec(e))?Kw(t[1],t[2]/100,t[3]/100,1):(t=IH.exec(e))?Kw(t[1],t[2]/100,t[3]/100,t[4]):zw.hasOwnProperty(e)?Ww(zw[e]):e==="transparent"?new Yt(NaN,NaN,NaN,0):null}function Ww(e){return new Yt(e>>16&255,e>>8&255,e&255,1)}function wc(e,t,r,n){return n<=0&&(e=t=r=NaN),new Yt(e,t,r,n)}function LH(e){return e instanceof Bu||(e=tu(e)),e?(e=e.rgb(),new Yt(e.r,e.g,e.b,e.opacity)):new Yt}function Ym(e,t,r,n){return arguments.length===1?LH(e):new Yt(e,t,r,n??1)}function Yt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}N0(Yt,Ym,dE(Bu,{brighter(e){return e=e==null?qf:Math.pow(qf,e),new Yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Jl:Math.pow(Jl,e),new Yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yt(ya(this.r),ya(this.g),ya(this.b),Kf(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:Hw,formatHex:Hw,formatHex8:FH,formatRgb:qw,toString:qw}));function Hw(){return`#${ia(this.r)}${ia(this.g)}${ia(this.b)}`}function FH(){return`#${ia(this.r)}${ia(this.g)}${ia(this.b)}${ia((isNaN(this.opacity)?1:this.opacity)*255)}`}function qw(){const e=Kf(this.opacity);return`${e===1?"rgb(":"rgba("}${ya(this.r)}, ${ya(this.g)}, ${ya(this.b)}${e===1?")":`, ${e})`}`}function Kf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ya(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ia(e){return e=ya(e),(e<16?"0":"")+e.toString(16)}function Kw(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Wr(e,t,r,n)}function hE(e){if(e instanceof Wr)return new Wr(e.h,e.s,e.l,e.opacity);if(e instanceof Bu||(e=tu(e)),!e)return new Wr;if(e instanceof Wr)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 Wr(o,s,l,e.opacity)}function BH(e,t,r,n){return arguments.length===1?hE(e):new Wr(e,t,r,n??1)}function Wr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}N0(Wr,BH,dE(Bu,{brighter(e){return e=e==null?qf:Math.pow(qf,e),new Wr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Jl:Math.pow(Jl,e),new Wr(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 Yt(Yp(e>=240?e-240:e+120,i,n),Yp(e,i,n),Yp(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Wr(Gw(this.h),Sc(this.s),Sc(this.l),Kf(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=Kf(this.opacity);return`${e===1?"hsl(":"hsla("}${Gw(this.h)}, ${Sc(this.s)*100}%, ${Sc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Gw(e){return e=(e||0)%360,e<0?e+360:e}function Sc(e){return Math.max(0,Math.min(1,e||0))}function Yp(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 M0=e=>()=>e;function zH(e,t){return function(r){return e+r*t}}function UH(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 VH(e){return(e=+e)==1?pE:function(t,r){return r-t?UH(t,r,e):M0(isNaN(t)?r:t)}}function pE(e,t){var r=t-e;return r?zH(e,r):M0(isNaN(e)?t:e)}const Xw=function e(t){var r=VH(t);function n(i,a){var o=r((i=Ym(i)).r,(a=Ym(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=pE(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 WH(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:Gf(n,i)})),r=Qp.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function tq(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?rq:tq,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),Gf)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,Xf),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=I0,f()},c.clamp=function(d){return arguments.length?(o=d?!0:zt,f()):o!==zt},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 D0(){return jh()(zt,zt)}function nq(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Yf(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Wo(e){return e=Yf(Math.abs(e)),e?e[1]:NaN}function iq(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 aq(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var oq=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ru(e){if(!(t=oq.exec(e)))throw new Error("invalid format: "+e);var t;return new R0({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]})}ru.prototype=R0.prototype;function R0(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+""}R0.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 sq(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 yE;function lq(e,t){var r=Yf(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(yE=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")+Yf(e,Math.max(0,t+a-1))[0]}function Qw(e,t){var r=Yf(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 Zw={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:nq,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)=>Qw(e*100,t),r:Qw,s:lq,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Jw(e){return e}var eS=Array.prototype.map,tS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function uq(e){var t=e.grouping===void 0||e.thousands===void 0?Jw:iq(eS.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?Jw:aq(eS.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){c=ru(c);var d=c.fill,h=c.align,y=c.sign,p=c.symbol,b=c.zero,x=c.width,m=c.comma,v=c.precision,O=c.trim,w=c.type;w==="n"?(m=!0,w="g"):Zw[w]||(v===void 0&&(v=12),O=!0,w="g"),(b||d==="0"&&h==="=")&&(b=!0,d="0",h="=");var S=p==="$"?r:p==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",_=p==="$"?n:/[%p]/.test(w)?o:"",P=Zw[w],A=/[defgprs%]/.test(w);v=v===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function C(E){var T=S,N=_,D,R,L;if(w==="c")N=P(E)+N,E="";else{E=+E;var V=E<0||1/E<0;if(E=isNaN(E)?l:P(Math.abs(E),v),O&&(E=sq(E)),V&&+E==0&&y!=="+"&&(V=!1),T=(V?y==="("?y:s:y==="-"||y==="("?"":y)+T,N=(w==="s"?tS[8+yE/3]:"")+N+(V&&y==="("?")":""),A){for(D=-1,R=E.length;++DL||L>57){N=(L===46?i+E.slice(D+1):E.slice(D))+N,E=E.slice(0,D);break}}}m&&!b&&(E=t(E,1/0));var I=T.length+E.length+N.length,F=I>1)+T+E+N+F.slice(I);break;default:E=F+T+E+N;break}return a(E)}return C.toString=function(){return c+""},C}function f(c,d){var h=u((c=ru(c),c.type="f",c)),y=Math.max(-8,Math.min(8,Math.floor(Wo(d)/3)))*3,p=Math.pow(10,-y),b=tS[8+y/3];return function(x){return h(p*x)+b}}return{format:u,formatPrefix:f}}var Oc,L0,mE;cq({thousands:",",grouping:[3],currency:["$",""]});function cq(e){return Oc=uq(e),L0=Oc.format,mE=Oc.formatPrefix,Oc}function fq(e){return Math.max(0,-Wo(Math.abs(e)))}function dq(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Wo(t)/3)))*3-Wo(Math.abs(e)))}function hq(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Wo(t)-Wo(e))+1}function vE(e,t,r,n){var i=Gm(e,t,r),a;switch(n=ru(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=dq(i,o))&&(n.precision=a),mE(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=hq(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=fq(i))&&(n.precision=a-(n.type==="%")*2);break}}return L0(n)}function Fi(e){var t=e.domain;return e.ticks=function(r){var n=t();return qm(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return vE(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=Km(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 Qf(){var e=D0();return e.copy=function(){return zu(e,Qf())},Tr.apply(e,arguments),Fi(e)}function gE(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,Xf),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return gE(e).unknown(t)},e=arguments.length?Array.from(e,Xf):[0,1],Fi(r)}function xE(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 gq(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 iS(e){return(t,r)=>-e(-t,r)}function F0(e){const t=e(rS,nS),r=t.domain;let n=10,i,a;function o(){return i=gq(n),a=vq(n),r()[0]<0?(i=iS(i),a=iS(a),e(pq,yq)):e(rS,nS),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(y=1;yf)break;x.push(p)}}else for(;d<=h;++d)for(y=n-1;y>=1;--y)if(p=d>0?y/a(-d):y*a(d),!(pf)break;x.push(p)}x.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=ru(l)).precision==null&&(l.trim=!0),l=L0(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(xE(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function bE(){const e=F0(jh()).domain([1,10]);return e.copy=()=>zu(e,bE()).base(e.base()),Tr.apply(e,arguments),e}function aS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function oS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function B0(e){var t=1,r=e(aS(t),oS(t));return r.constant=function(n){return arguments.length?e(aS(t=+n),oS(t)):t},Fi(r)}function wE(){var e=B0(jh());return e.copy=function(){return zu(e,wE()).constant(e.constant())},Tr.apply(e,arguments)}function sS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function xq(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function bq(e){return e<0?-e*e:e*e}function z0(e){var t=e(zt,zt),r=1;function n(){return r===1?e(zt,zt):r===.5?e(xq,bq):e(sS(r),sS(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Fi(t)}function U0(){var e=z0(jh());return e.copy=function(){return zu(e,U0()).exponent(e.exponent())},Tr.apply(e,arguments),e}function wq(){return U0.apply(null,arguments).exponent(.5)}function lS(e){return Math.sign(e)*e*e}function Sq(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function SE(){var e=D0(),t=[0,1],r=!1,n;function i(a){var o=Sq(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(lS(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,Xf)).map(lS)),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 SE(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Tr.apply(i,arguments),Fi(i)}function OE(){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 _E().domain([e,t]).range(i).unknown(a)},Tr.apply(Fi(o),arguments)}function PE(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Fu(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 PE().domain(e).range(t).unknown(r)},Tr.apply(i,arguments)}const Zp=new Date,Jp=new Date;function ft(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(uft(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)=>(Zp.setTime(+a),Jp.setTime(+o),e(Zp),e(Jp),Math.floor(r(Zp,Jp))),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 Zf=ft(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Zf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ft(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Zf);Zf.range;const $n=1e3,Pr=$n*60,Tn=Pr*60,Un=Tn*24,V0=Un*7,uS=Un*30,ey=Un*365,aa=ft(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*$n)},(e,t)=>(t-e)/$n,e=>e.getUTCSeconds());aa.range;const W0=ft(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*$n)},(e,t)=>{e.setTime(+e+t*Pr)},(e,t)=>(t-e)/Pr,e=>e.getMinutes());W0.range;const H0=ft(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pr)},(e,t)=>(t-e)/Pr,e=>e.getUTCMinutes());H0.range;const q0=ft(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*$n-e.getMinutes()*Pr)},(e,t)=>{e.setTime(+e+t*Tn)},(e,t)=>(t-e)/Tn,e=>e.getHours());q0.range;const K0=ft(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Tn)},(e,t)=>(t-e)/Tn,e=>e.getUTCHours());K0.range;const Uu=ft(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Pr)/Un,e=>e.getDate()-1);Uu.range;const Eh=ft(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Un,e=>e.getUTCDate()-1);Eh.range;const AE=ft(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Un,e=>Math.floor(e/Un));AE.range;function Ia(e){return ft(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())*Pr)/V0)}const $h=Ia(0),Jf=Ia(1),Oq=Ia(2),_q=Ia(3),Ho=Ia(4),Pq=Ia(5),Aq=Ia(6);$h.range;Jf.range;Oq.range;_q.range;Ho.range;Pq.range;Aq.range;function Da(e){return ft(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)/V0)}const Th=Da(0),ed=Da(1),kq=Da(2),jq=Da(3),qo=Da(4),Eq=Da(5),$q=Da(6);Th.range;ed.range;kq.range;jq.range;qo.range;Eq.range;$q.range;const G0=ft(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());G0.range;const X0=ft(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());X0.range;const Vn=ft(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());Vn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft(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)});Vn.range;const Wn=ft(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());Wn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft(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)});Wn.range;function kE(e,t,r,n,i,a){const o=[[aa,1,$n],[aa,5,5*$n],[aa,15,15*$n],[aa,30,30*$n],[a,1,Pr],[a,5,5*Pr],[a,15,15*Pr],[a,30,30*Pr],[i,1,Tn],[i,3,3*Tn],[i,6,6*Tn],[i,12,12*Tn],[n,1,Un],[n,2,2*Un],[r,1,V0],[t,1,uS],[t,3,3*uS],[e,1,ey]];function s(u,f,c){const d=fb).right(o,d);if(h===o.length)return e.every(Gm(u/ey,f/ey,c));if(h===0)return Zf.every(Math.max(Gm(u,f,c),1));const[y,p]=o[d/o[h-1][2]53)return null;"w"in W||(W.w=1),"Z"in W?(ye=ry(Ws(W.y,0,1)),Ge=ye.getUTCDay(),ye=Ge>4||Ge===0?ed.ceil(ye):ed(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=ty(Ws(W.y,0,1)),Ge=ye.getDay(),ye=Ge>4||Ge===0?Jf.ceil(ye):Jf(ye),ye=Uu.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),Ge="Z"in W?ry(Ws(W.y,0,1)).getUTCDay():ty(Ws(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(Ge+5)%7:W.w+W.U*7-(Ge+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,ry(W)):ty(W)}}function P(Z,le,de,W){for(var Be=0,ye=le.length,Ge=de.length,Ze,Ot;Be=Ge)return-1;if(Ze=le.charCodeAt(Be++),Ze===37){if(Ze=le.charAt(Be++),Ot=w[Ze in cS?le.charAt(Be++):Ze],!Ot||(W=Ot(Z,de,W))<0)return-1}else if(Ze!=de.charCodeAt(W++))return-1}return W}function A(Z,le,de){var W=u.exec(le.slice(de));return W?(Z.p=f.get(W[0].toLowerCase()),de+W[0].length):-1}function C(Z,le,de){var W=h.exec(le.slice(de));return W?(Z.w=y.get(W[0].toLowerCase()),de+W[0].length):-1}function E(Z,le,de){var W=c.exec(le.slice(de));return W?(Z.w=d.get(W[0].toLowerCase()),de+W[0].length):-1}function T(Z,le,de){var W=x.exec(le.slice(de));return W?(Z.m=m.get(W[0].toLowerCase()),de+W[0].length):-1}function N(Z,le,de){var W=p.exec(le.slice(de));return W?(Z.m=b.get(W[0].toLowerCase()),de+W[0].length):-1}function D(Z,le,de){return P(Z,t,le,de)}function R(Z,le,de){return P(Z,r,le,de)}function L(Z,le,de){return P(Z,n,le,de)}function V(Z){return o[Z.getDay()]}function I(Z){return a[Z.getDay()]}function F(Z){return l[Z.getMonth()]}function H(Z){return s[Z.getMonth()]}function Q(Z){return i[+(Z.getHours()>=12)]}function K(Z){return 1+~~(Z.getMonth()/3)}function ne(Z){return o[Z.getUTCDay()]}function me(Z){return a[Z.getUTCDay()]}function Ee(Z){return l[Z.getUTCMonth()]}function Ve(Z){return s[Z.getUTCMonth()]}function St(Z){return i[+(Z.getUTCHours()>=12)]}function vt(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var le=S(Z+="",v);return le.toString=function(){return Z},le},parse:function(Z){var le=_(Z+="",!1);return le.toString=function(){return Z},le},utcFormat:function(Z){var le=S(Z+="",O);return le.toString=function(){return Z},le},utcParse:function(Z){var le=_(Z+="",!0);return le.toString=function(){return Z},le}}}var cS={"-":"",_:" ",0:"0"},mt=/^\s*\d+/,Dq=/^%/,Rq=/[\\^$*+?|[\]().{}]/g;function be(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function Fq(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Bq(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function zq(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Uq(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Vq(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function fS(e,t,r){var n=mt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function dS(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Wq(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 Hq(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function qq(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function hS(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Kq(e,t,r){var n=mt.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=mt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Gq(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Xq(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Yq(e,t,r){var n=mt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Qq(e,t,r){var n=mt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Zq(e,t,r){var n=Dq.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Jq(e,t,r){var n=mt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function eK(e,t,r){var n=mt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function yS(e,t){return be(e.getDate(),t,2)}function tK(e,t){return be(e.getHours(),t,2)}function rK(e,t){return be(e.getHours()%12||12,t,2)}function nK(e,t){return be(1+Uu.count(Vn(e),e),t,3)}function jE(e,t){return be(e.getMilliseconds(),t,3)}function iK(e,t){return jE(e,t)+"000"}function aK(e,t){return be(e.getMonth()+1,t,2)}function oK(e,t){return be(e.getMinutes(),t,2)}function sK(e,t){return be(e.getSeconds(),t,2)}function lK(e){var t=e.getDay();return t===0?7:t}function uK(e,t){return be($h.count(Vn(e)-1,e),t,2)}function EE(e){var t=e.getDay();return t>=4||t===0?Ho(e):Ho.ceil(e)}function cK(e,t){return e=EE(e),be(Ho.count(Vn(e),e)+(Vn(e).getDay()===4),t,2)}function fK(e){return e.getDay()}function dK(e,t){return be(Jf.count(Vn(e)-1,e),t,2)}function hK(e,t){return be(e.getFullYear()%100,t,2)}function pK(e,t){return e=EE(e),be(e.getFullYear()%100,t,2)}function yK(e,t){return be(e.getFullYear()%1e4,t,4)}function mK(e,t){var r=e.getDay();return e=r>=4||r===0?Ho(e):Ho.ceil(e),be(e.getFullYear()%1e4,t,4)}function vK(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function mS(e,t){return be(e.getUTCDate(),t,2)}function gK(e,t){return be(e.getUTCHours(),t,2)}function xK(e,t){return be(e.getUTCHours()%12||12,t,2)}function bK(e,t){return be(1+Eh.count(Wn(e),e),t,3)}function $E(e,t){return be(e.getUTCMilliseconds(),t,3)}function wK(e,t){return $E(e,t)+"000"}function SK(e,t){return be(e.getUTCMonth()+1,t,2)}function OK(e,t){return be(e.getUTCMinutes(),t,2)}function _K(e,t){return be(e.getUTCSeconds(),t,2)}function PK(e){var t=e.getUTCDay();return t===0?7:t}function AK(e,t){return be(Th.count(Wn(e)-1,e),t,2)}function TE(e){var t=e.getUTCDay();return t>=4||t===0?qo(e):qo.ceil(e)}function kK(e,t){return e=TE(e),be(qo.count(Wn(e),e)+(Wn(e).getUTCDay()===4),t,2)}function jK(e){return e.getUTCDay()}function EK(e,t){return be(ed.count(Wn(e)-1,e),t,2)}function $K(e,t){return be(e.getUTCFullYear()%100,t,2)}function TK(e,t){return e=TE(e),be(e.getUTCFullYear()%100,t,2)}function CK(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function NK(e,t){var r=e.getUTCDay();return e=r>=4||r===0?qo(e):qo.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function MK(){return"+0000"}function vS(){return"%"}function gS(e){return+e}function xS(e){return Math.floor(+e/1e3)}var Va,CE,NE;IK({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 IK(e){return Va=Iq(e),CE=Va.format,Va.parse,NE=Va.utcFormat,Va.utcParse,Va}function DK(e){return new Date(e)}function RK(e){return e instanceof Date?+e:+new Date(+e)}function Y0(e,t,r,n,i,a,o,s,l,u){var f=D0(),c=f.invert,d=f.domain,h=u(".%L"),y=u(":%S"),p=u("%I:%M"),b=u("%I %p"),x=u("%a %d"),m=u("%b %d"),v=u("%B"),O=u("%Y");function w(S){return(l(S)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>AH(e,a/n))},r.copy=function(){return RE(t).domain(e)},Yn.apply(r,arguments)}function Nh(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=zt,f,c=!1,d;function h(p){return isNaN(p=+p)?d:(p=.5+((p=+f(p))-a)*(n*pt}var zE=WK,HK=Mh,qK=zE,KK=_s;function GK(e){return e&&e.length?HK(e,KK,qK):void 0}var XK=GK;const Ih=Se(XK);function YK(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};te.decimalPlaces=te.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Le;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};te.dividedBy=te.div=function(e){return In(this,new this.constructor(e))};te.dividedToIntegerBy=te.idiv=function(e){var t=this,r=t.constructor;return $e(In(t,new r(e),0,1),r.precision)};te.equals=te.eq=function(e){return!this.cmp(e)};te.exponent=function(){return it(this)};te.greaterThan=te.gt=function(e){return this.cmp(e)>0};te.greaterThanOrEqualTo=te.gte=function(e){return this.cmp(e)>=0};te.isInteger=te.isint=function(){return this.e>this.d.length-2};te.isNegative=te.isneg=function(){return this.s<0};te.isPositive=te.ispos=function(){return this.s>0};te.isZero=function(){return this.s===0};te.lessThan=te.lt=function(e){return this.cmp(e)<0};te.lessThanOrEqualTo=te.lte=function(e){return this.cmp(e)<1};te.logarithm=te.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(or))throw Error(Er+"NaN");if(r.s<1)throw Error(Er+(r.s?"NaN":"-Infinity"));return r.eq(or)?new n(0):(Ue=!1,t=In(nu(r,a),nu(e,a),a),Ue=!0,$e(t,i))};te.minus=te.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?qE(t,e):WE(t,(e.s=-e.s,e))};te.modulo=te.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Er+"NaN");return r.s?(Ue=!1,t=In(r,e,0,1).times(e),Ue=!0,r.minus(t)):$e(new n(r),i)};te.naturalExponential=te.exp=function(){return HE(this)};te.naturalLogarithm=te.ln=function(){return nu(this)};te.negated=te.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};te.plus=te.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?WE(t,e):qE(t,(e.s=-e.s,e))};te.precision=te.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ma+e);if(t=it(i)+1,n=i.d.length-1,r=n*Le+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};te.squareRoot=te.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(Er+"NaN")}for(e=it(s),Ue=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=on(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ks((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(In(s,a,o+2)).times(.5),on(a.d).slice(0,o)===(t=on(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if($e(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Ue=!0,$e(n,r)};te.times=te.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,Ue?$e(e,c.precision):e};te.toDecimalPlaces=te.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(hn(e,0,As),t===void 0?t=n.rounding:hn(t,0,8),$e(r,e+it(r)+1,t))};te.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Pa(n,!0):(hn(e,0,As),t===void 0?t=i.rounding:hn(t,0,8),n=$e(new i(n),e+1,t),r=Pa(n,!0,e+1)),r};te.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Pa(i):(hn(e,0,As),t===void 0?t=a.rounding:hn(t,0,8),n=$e(new a(i),e+it(i)+1,t),r=Pa(n.abs(),!1,e+it(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};te.toInteger=te.toint=function(){var e=this,t=e.constructor;return $e(new t(e),it(e)+1,t.rounding)};te.toNumber=function(){return+this};te.toPower=te.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(or);if(s=new l(s),!s.s){if(e.s<1)throw Error(Er+"Infinity");return s}if(s.eq(or))return s;if(n=l.precision,e.eq(or))return $e(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=f<0?-f:f)<=VE){for(i=new l(or),t=Math.ceil(n/Le+4),Ue=!1;r%2&&(i=i.times(s),SS(i.d,t)),r=ks(r/2),r!==0;)s=s.times(s),SS(s.d,t);return Ue=!0,e.s<0?new l(or).div(i):$e(i,n)}}else if(a<0)throw Error(Er+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ue=!1,i=e.times(nu(s,n+u)),Ue=!0,i=HE(i),i.s=a,i};te.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=it(i),n=Pa(i,r<=a.toExpNeg||r>=a.toExpPos)):(hn(e,1,As),t===void 0?t=a.rounding:hn(t,0,8),i=$e(new a(i),e,t),r=it(i),n=Pa(i,e<=r||r<=a.toExpNeg,e)),n};te.toSignificantDigits=te.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(hn(e,1,As),t===void 0?t=n.rounding:hn(t,0,8)),$e(new n(r),e,t)};te.toString=te.valueOf=te.val=te.toJSON=te[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=it(e),r=e.constructor;return Pa(e,t<=r.toExpNeg||t>=r.toExpPos)};function WE(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)),Ue?$e(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/Le),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,Ue?$e(t,c):t}function hn(e,t,r){if(e!==~~e||er)throw Error(ma+e)}function on(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,y,p,b,x,m,v,O,w,S,_,P,A=n.constructor,C=n.s==i.s?1:-1,E=n.d,T=i.d;if(!n.s)return new A(n);if(!i.s)throw Error(Er+"Division by zero");for(l=n.e-i.e,_=T.length,w=E.length,h=new A(C),y=h.d=[],u=0;T[u]==(E[u]||0);)++u;if(T[u]>(E[u]||0)&&--l,a==null?m=a=A.precision:o?m=a+(it(n)-it(i))+1:m=a,m<0)return new A(0);if(m=m/Le+2|0,u=0,_==1)for(f=0,T=T[0],m++;(u1&&(T=e(T,f),E=e(E,f),_=T.length,w=E.length),O=_,p=E.slice(0,_),b=p.length;b<_;)p[b++]=0;P=T.slice(),P.unshift(0),S=T[0],T[1]>=dt/2&&++S;do f=0,s=t(T,p,_,b),s<0?(x=p[0],_!=b&&(x=x*dt+(p[1]||0)),f=x/S|0,f>1?(f>=dt&&(f=dt-1),c=e(T,f),d=c.length,b=p.length,s=t(c,p,d,b),s==1&&(f--,r(c,_16)throw Error(J0+it(e));if(!e.s)return new f(or);for(t==null?(Ue=!1,s=c):s=t,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Xi(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new f(or),f.precision=s;;){if(i=$e(i.times(e),s),r=r.times(++l),o=a.plus(In(i,r,s)),on(o.d).slice(0,s)===on(a.d).slice(0,s)){for(;u--;)a=$e(a.times(a),s);return f.precision=c,t==null?(Ue=!0,$e(a,c)):a}a=o}}function it(e){for(var t=e.e*Le,r=e.d[0];r>=10;r/=10)t++;return t}function ny(e,t,r){if(t>e.LN10.sd())throw Ue=!0,r&&(e.precision=r),Error(Er+"LN10 precision limit exceeded");return $e(new e(e.LN10),t)}function ai(e){for(var t="";e--;)t+="0";return t}function nu(e,t){var r,n,i,a,o,s,l,u,f,c=1,d=10,h=e,y=h.d,p=h.constructor,b=p.precision;if(h.s<1)throw Error(Er+(h.s?"NaN":"-Infinity"));if(h.eq(or))return new p(0);if(t==null?(Ue=!1,u=b):u=t,h.eq(10))return t==null&&(Ue=!0),ny(p,u);if(u+=d,p.precision=u,r=on(y),n=r.charAt(0),a=it(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=on(h.d),n=r.charAt(0),c++;a=it(h),n>1?(h=new p("0."+r),a++):h=new p(n+"."+r.slice(1))}else return l=ny(p,u+2,b).times(a+""),h=nu(new p(n+"."+r.slice(1)),u-d).plus(l),p.precision=b,t==null?(Ue=!0,$e(h,b)):h;for(s=o=h=In(h.minus(or),h.plus(or),u),f=$e(h.times(h),u),i=3;;){if(o=$e(o.times(f),u),l=s.plus(In(o,new p(i),u)),on(l.d).slice(0,u)===on(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(ny(p,u+2,b).times(a+""))),s=In(s,new p(c),u),p.precision=b,t==null?(Ue=!0,$e(s,b)):s;s=l,i+=2}}function wS(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=ks(r/Le),e.d=[],n=(r+1)%Le,r<0&&(n+=Le),ntd||e.e<-td))throw Error(J0+r)}else e.s=0,e.e=0,e.d=[0];return e}function $e(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+=Le,i=t,u=c[f=0];else{if(f=Math.ceil((n+1)/Le),a=c.length,f>=a)return e;for(u=a=c[f],o=1;a>=10;a/=10)o++;n%=Le,i=n-Le+o}if(r!==void 0&&(a=Xi(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/Xi(10,o-i):0:c[f-1])%10&1||r==(e.s<0?8:7))),t<1||!c[0])return l?(a=it(e),c.length=1,t=t-a-1,c[0]=Xi(10,(Le-t%Le)%Le),e.e=ks(-t/Le)||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=Xi(10,Le-n),c[f]=i>0?(u/Xi(10,o-i)%Xi(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(Ue&&(e.e>td||e.e<-td))throw Error(J0+it(e));return e}function qE(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),Ue?$e(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/Le),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)+ai(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+ai(-i-1)+a,r&&(n=r-o)>0&&(a+=ai(n))):i>=o?(a+=ai(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+ai(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=ai(n))),e.s<0?"-"+a:a}function SS(e,t){if(e.length>t)return e.length=t,!0}function KE(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(ma+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 wS(o,a.toString())}else if(typeof a!="string")throw Error(ma+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,vG.test(a))wS(o,a);else throw Error(ma+a)}if(i.prototype=te,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=KE,i.config=i.set=gG,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(ma+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ma+r+": "+n);return this}var ex=KE(mG);or=new ex(1);const ke=ex;function xG(e){return OG(e)||SG(e)||wG(e)||bG()}function bG(){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 wG(e,t){if(e){if(typeof e=="string")return Jm(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 Jm(e,t)}}function SG(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function OG(e){if(Array.isArray(e))return Jm(e)}function Jm(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,OS(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 LG(e){if(Array.isArray(e))return e}function ZE(e){var t=iu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function JE(e,t,r){if(e.lte(0))return new ke(0);var n=Lh.getDigitCount(e.toNumber()),i=new ke(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new ke(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new ke(Math.ceil(l))}function FG(e,t,r){var n=1,i=new ke(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ke(10).pow(Lh.getDigitCount(e)-1),i=new ke(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ke(Math.floor(e)))}else e===0?i=new ke(Math.floor((t-1)/2)):r||(i=new ke(Math.floor(e)));var o=Math.floor((t-1)/2),s=kG(AG(function(l){return i.add(new ke(l-o).mul(n)).toNumber()}),ev);return s(0,t)}function e2(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 ke(0),tickMin:new ke(0),tickMax:new ke(0)};var a=JE(new ke(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new ke(0):(o=new ke(e).add(t).div(2),o=o.sub(new ke(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new ke(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?e2(e,t,r,n,i+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new ke(s).mul(a)),tickMax:o.add(new ke(l).mul(a))})}function BG(e){var t=iu(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=ZE([r,n]),l=iu(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var c=f===1/0?[u].concat(rv(ev(0,i-1).map(function(){return 1/0}))):[].concat(rv(ev(0,i-1).map(function(){return-1/0})),[f]);return r>n?tv(c):c}if(u===f)return FG(u,i,a);var d=e2(u,f,o,a),h=d.step,y=d.tickMin,p=d.tickMax,b=Lh.rangeStep(y,p.add(new ke(.1).mul(h)),h);return r>n?tv(b):b}function zG(e,t){var r=iu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=ZE([n,i]),s=iu(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=JE(new ke(u).sub(l).div(f-1),a,0),d=[].concat(rv(Lh.rangeStep(new ke(l),new ke(u).sub(new ke(.99).mul(c)),c)),[u]);return n>i?tv(d):d}var UG=YE(BG),VG=YE(zG),WG=!0,iy="Invariant failed";function Aa(e,t){if(!e){if(WG)throw new Error(iy);var r=typeof t=="function"?t():t,n=r?"".concat(iy,": ").concat(r):iy;throw new Error(n)}}var HG=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Ko(e){"@babel/helpers - typeof";return Ko=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},Ko(e)}function rd(){return rd=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 ZG(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 JG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PS(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(Ft(c-f)!==Ft(d-c)){var y=[];if(Ft(d-c)===Ft(l[1]-l[0])){h=d;var p=c+l[1]-l[0];y[0]=Math.min(p,(p+f)/2),y[1]=Math.max(p,(p+f)/2)}else{h=f;var b=d+l[1]-l[0];y[0]=Math.min(c,(b+c)/2),y[1]=Math.max(c,(b+c)/2)}var x=[Math.min(c,(h+c)/2),Math.max(c,(h+c)/2)];if(t>x[0]&&t<=x[1]||t>=y[0]&&t<=y[1]){o=i[u].index;break}}else{var m=Math.min(f,d),v=Math.max(f,d);if(t>(m+c)/2&&t<=(v+c)/2){o=i[u].index;break}}}else for(var O=0;O0&&O(n[O].coordinate+n[O-1].coordinate)/2&&t<=(n[O].coordinate+n[O+1].coordinate)/2||O===s-1&&t>(n[O].coordinate+n[O-1].coordinate)/2){o=n[O].index;break}return o},tx=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},mX=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(x&&x.length){var m=x[0].type.defaultProps,v=m!==void 0?Qe(Qe({},m),x[0].props):x[0].props,O=v.barSize,w=v[b];o[w]||(o[w]=[]);var S=ce(O)?r:O;o[w].push({item:x[0],stackList:x.slice(1),barSize:ce(S)?void 0:Bt(S,n,0)})}}return o},vX=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=Bt(r,i,0,!0),f,c=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/l,y=o.reduce(function(O,w){return O+w.barSize||0},0);y+=(l-1)*u,y>=i&&(y-=(l-1)*u,u=0),y>=i&&h>0&&(d=!0,h*=.9,y=l*h);var p=(i-y)/2>>0,b={offset:p-u,size:0};f=o.reduce(function(O,w){var S={item:w.item,position:{offset:b.offset+b.size+u,size:d?h:w.barSize}},_=[].concat(kS(O),[S]);return b=_[_.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(P){_.push({item:P,position:b})}),_},c)}else{var x=Bt(n,i,0,!0);i-2*x-(l-1)*u<=0&&(u=0);var m=(i-2*x-(l-1)*u)/l;m>1&&(m>>=0);var v=s===+s?Math.min(m,s):m;f=o.reduce(function(O,w,S){var _=[].concat(kS(O),[{item:w.item,position:{offset:x+(m+u)*S+(m-v)/2,size:v}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(P){_.push({item:P,position:_[_.length-1].position})}),_},c)}return f},gX=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=i2({children:a,legendWidth:l});if(u){var f=i||{},c=f.width,d=f.height,h=u.align,y=u.verticalAlign,p=u.layout;if((p==="vertical"||p==="horizontal"&&y==="middle")&&h!=="center"&&X(t[h]))return Qe(Qe({},t),{},wo({},h,t[h]+(c||0)));if((p==="horizontal"||p==="vertical"&&h==="center")&&y!=="middle"&&X(t[y]))return Qe(Qe({},t),{},wo({},y,t[y]+(d||0)))}return t},xX=function(t,r,n){return ce(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},a2=function(t,r,n,i,a){var o=r.props.children,s=cr(o,Wu).filter(function(u){return xX(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=lt(f,n);if(ce(c))return u;var d=Array.isArray(c)?[Dh(c),Ih(c)]:[c,c],h=l.reduce(function(y,p){var b=lt(f,p,0),x=d[0]-Math.abs(Array.isArray(b)?b[0]:b),m=d[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(x,y[0]),Math.max(m,y[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},bX=function(t,r,n,i,a){var o=r.map(function(s){return a2(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},o2=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&a2(t,l,u,i)||gl(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?Ft(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!Ru(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}})},ay=new WeakMap,_c=function(t,r){if(typeof r!="function")return t;ay.has(t)||ay.set(t,new WeakMap);var n=ay.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},u2=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:Zl(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Qf(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:vl(),realScaleType:"point"}:a==="category"?{scale:Zl(),realScaleType:"band"}:{scale:Qf(),realScaleType:"linear"};if(Sa(i)){var l="scale".concat(bh(i));return{scale:(bS[l]||vl)(),realScaleType:bS[l]?l:"point"}}return se(i)?{scale:i}:{scale:vl(),realScaleType:"point"}},ES=1e-4,c2=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])-ES,o=Math.max(i[0],i[1])+ES,s=t(r[0]),l=t(r[n-1]);(so||lo)&&t.domain([r[0],r[n-1]])}},wX=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])}},_X=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)}},PX={sign:OX,expand:K6,none:Fo,silhouette:G6,wiggle:X6,positive:_X},AX=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=PX[n],o=q6().keys(i).value(function(s,l){return+lt(s,l,0)}).order($m).offset(a);return o(t)},kX=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,y=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Qe(Qe({},d.type.defaultProps),d.props):d.props,p=y.stackId,b=y.hide;if(b)return c;var x=y[n],m=c[x]||{hasStack:!1,stackGroups:{}};if(ct(p)){var v=m.stackGroups[p]||{numericAxisId:n,cateAxisId:i,items:[]};v.items.push(d),m.hasStack=!0,m.stackGroups[p]=v}else m.stackGroups[ws("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return Qe(Qe({},c),{},wo({},x,m))},l),f={};return Object.keys(u).reduce(function(c,d){var h=u[d];if(h.hasStack){var y={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(p,b){var x=h.stackGroups[b];return Qe(Qe({},p),{},wo({},b,{numericAxisId:n,cateAxisId:i,items:x.items,stackedData:AX(t,x.items,a)}))},y)}return Qe(Qe({},c),{},wo({},d,h))},f)},f2=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=UG(u,a,s);return t.domain([Dh(f),Ih(f)]),{niceTicks:f}}if(a&&i==="number"){var c=t.domain(),d=VG(c,a,s);return{niceTicks:d}}return null};function $S(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=$f(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=lt(i,ce(o)?t.dataKey:o);return ce(l)?null:t.scale(l)}var TS=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=lt(o,r.dataKey,r.domain[s]);return ce(l)?null:r.scale(l)-a/2+i},jX=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]},EX=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(ct(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},$X=function(t){return t.reduce(function(r,n){return[Dh(n.concat([r[0]]).filter(X)),Ih(n.concat([r[1]]).filter(X))]},[1/0,-1/0])},d2=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=$X(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})},CS=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,NS=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ov=function(t,r,n){if(se(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(X(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(CS.test(t[0])){var a=+CS.exec(t[0])[1];i[0]=r[0]-a}else se(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(X(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(NS.test(t[1])){var o=+NS.exec(t[1])[1];i[1]=r[1]+o}else se(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},id=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=j0(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},FX=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,f=Bt(t.cx,o,o/2),c=Bt(t.cy,s,s/2),d=y2(o,s,n),h=Bt(t.innerRadius,d,0),y=Bt(t.outerRadius,d,d*.8),p=Object.keys(r);return p.reduce(function(b,x){var m=r[x],v=m.domain,O=m.reversed,w;if(ce(m.range))i==="angleAxis"?w=[l,u]:i==="radiusAxis"&&(w=[h,y]),O&&(w=[w[1],w[0]]);else{w=m.range;var S=w,_=NX(S,2);l=_[0],u=_[1]}var P=u2(m,a),A=P.realScaleType,C=P.scale;C.domain(v).range(w),c2(C);var E=f2(C,Pn(Pn({},m),{},{realScaleType:A})),T=Pn(Pn(Pn({},m),E),{},{range:w,radius:y,realScaleType:A,scale:C,cx:f,cy:c,innerRadius:h,outerRadius:y,startAngle:l,endAngle:u});return Pn(Pn({},b),{},p2({},x,T))},{})},BX=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))},zX=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=BX({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:LX(u),angleInRadian:u}},UX=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}},VX=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},RS=function(t,r){var n=t.x,i=t.y,a=zX({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=UX(r),c=f.startAngle,d=f.endAngle,h=s,y;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 y?Pn(Pn({},r),{},{radius:o,angle:VX(h,r)}):null},m2=function(t){return!j.isValidElement(t)&&!se(t)&&typeof t!="boolean"?t.className:""};function lu(e){"@babel/helpers - typeof";return lu=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},lu(e)}var WX=["offset"];function HX(e){return XX(e)||GX(e)||KX(e)||qX()}function qX(){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 KX(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 GX(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XX(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=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QX(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 LS(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 at(e){for(var t=1;t=0?1:-1,v,O;i==="insideStart"?(v=h+m*o,O=p):i==="insideEnd"?(v=y-m*o,O=!p):i==="end"&&(v=y+m*o,O=p),O=x<=0?O:!O;var w=Ie(u,f,b,v),S=Ie(u,f,b,v+(O?1:-1)*359),_="M".concat(w.x,",").concat(w.y,` - A`).concat(b,",").concat(b,",0,1,").concat(O?0:1,`, - `).concat(S.x,",").concat(S.y),P=ce(t.id)?ws("recharts-radial-line-"):t.id;return k.createElement("text",uu({},n,{dominantBaseline:"central",className:ue("recharts-radial-bar-label",s)}),k.createElement("defs",null,k.createElement("path",{id:P,d:_})),k.createElement("textPath",{xlinkHref:"#".concat(P)},r))},iY=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=Ie(o,s,u+n,d),y=h.x,p=h.y;return{x:y,y:p,textAnchor:y>=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 b=(l+u)/2,x=Ie(o,s,b,d),m=x.x,v=x.y;return{x:m,y:v,textAnchor:"middle",verticalAnchor:"middle"}},aY=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",y=c>0?"start":"end",p=u>=0?1:-1,b=p*i,x=p>0?"end":"start",m=p>0?"start":"end";if(a==="top"){var v={x:s+u/2,y:l-c*i,textAnchor:"middle",verticalAnchor:h};return at(at({},v),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var O={x:s+u/2,y:l+f+d,textAnchor:"middle",verticalAnchor:y};return at(at({},O),n?{height:Math.max(n.y+n.height-(l+f),0),width:u}:{})}if(a==="left"){var w={x:s-b,y:l+f/2,textAnchor:x,verticalAnchor:"middle"};return at(at({},w),n?{width:Math.max(w.x-n.x,0),height:f}:{})}if(a==="right"){var S={x:s+u+b,y:l+f/2,textAnchor:m,verticalAnchor:"middle"};return at(at({},S),n?{width:Math.max(n.x+n.width-S.x,0),height:f}:{})}var _=n?{width:u,height:f}:{};return a==="insideLeft"?at({x:s+b,y:l+f/2,textAnchor:m,verticalAnchor:"middle"},_):a==="insideRight"?at({x:s+u-b,y:l+f/2,textAnchor:x,verticalAnchor:"middle"},_):a==="insideTop"?at({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:y},_):a==="insideBottom"?at({x:s+u/2,y:l+f-d,textAnchor:"middle",verticalAnchor:h},_):a==="insideTopLeft"?at({x:s+b,y:l+d,textAnchor:m,verticalAnchor:y},_):a==="insideTopRight"?at({x:s+u-b,y:l+d,textAnchor:x,verticalAnchor:y},_):a==="insideBottomLeft"?at({x:s+b,y:l+f-d,textAnchor:m,verticalAnchor:h},_):a==="insideBottomRight"?at({x:s+u-b,y:l+f-d,textAnchor:x,verticalAnchor:h},_):vs(a)&&(X(a.x)||na(a.x))&&(X(a.y)||na(a.y))?at({x:s+Bt(a.x,u),y:l+Bt(a.y,f),textAnchor:"end",verticalAnchor:"end"},_):at({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},_)},oY=function(t){return"cx"in t&&X(t.cx)};function pt(e){var t=e.offset,r=t===void 0?5:t,n=YX(e,WX),i=at({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)&&!j.isValidElement(u)&&!se(u))return null;if(j.isValidElement(u))return j.cloneElement(u,i);var h;if(se(u)){if(h=j.createElement(u,i),j.isValidElement(h))return h}else h=tY(i);var y=oY(a),p=ae(i,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return nY(i,h,p);var b=y?iY(i):aY(i);return k.createElement(_a,uu({className:ue("recharts-label",c)},p,b,{breakAll:d}),h)}pt.displayName="Label";var v2=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,y=t.left,p=t.width,b=t.height,x=t.clockWise,m=t.labelViewBox;if(m)return m;if(X(p)&&X(b)){if(X(c)&&X(d))return{x:c,y:d,width:p,height:b};if(X(h)&&X(y))return{x:h,y,width:p,height:b}}return X(c)&&X(d)?{x:c,y:d,width:0,height:0}:X(r)&&X(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},sY=function(t,r){return t?t===!0?k.createElement(pt,{key:"label-implicit",viewBox:r}):ct(t)?k.createElement(pt,{key:"label-implicit",viewBox:r,value:t}):j.isValidElement(t)?t.type===pt?j.cloneElement(t,{key:"label-implicit",viewBox:r}):k.createElement(pt,{key:"label-implicit",content:t,viewBox:r}):se(t)?k.createElement(pt,{key:"label-implicit",content:t,viewBox:r}):vs(t)?k.createElement(pt,uu({viewBox:r},t,{key:"label-implicit"})):null:null},lY=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=v2(t),o=cr(i,pt).map(function(l,u){return j.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=sY(t.label,r||a);return[s].concat(HX(o))};pt.parseViewBox=v2;pt.renderCallByParent=lY;function uY(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var cY=uY;const fY=Se(cY);function cu(e){"@babel/helpers - typeof";return cu=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},cu(e)}var dY=["valueAccessor"],hY=["data","dataKey","clockWise","id","textBreakAll"];function pY(e){return gY(e)||vY(e)||mY(e)||yY()}function yY(){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 mY(e,t){if(e){if(typeof e=="string")return lv(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 lv(e,t)}}function vY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gY(e){if(Array.isArray(e))return lv(e)}function lv(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 SY(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 OY=function(t){return Array.isArray(t.value)?fY(t.value):t.value};function Dn(e){var t=e.valueAccessor,r=t===void 0?OY:t,n=zS(e,dY),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=zS(n,hY);return!i||!i.length?null:k.createElement(xe,{className:"recharts-label-list"},i.map(function(f,c){var d=ce(a)?r(f,c):lt(f&&f.payload,a),h=ce(s)?{}:{id:"".concat(s,"-").concat(c)};return k.createElement(pt,od({},ae(f,!0),u,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:l,viewBox:pt.parseViewBox(ce(o)?f:BS(BS({},f),{},{clockWise:o})),key:"label-".concat(c),index:c}))}))}Dn.displayName="LabelList";function _Y(e,t){return e?e===!0?k.createElement(Dn,{key:"labelList-implicit",data:t}):k.isValidElement(e)||se(e)?k.createElement(Dn,{key:"labelList-implicit",data:t,content:e}):vs(e)?k.createElement(Dn,od({data:t},e,{key:"labelList-implicit"})):null:null}function PY(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=cr(n,Dn).map(function(o,s){return j.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=_Y(e.label,t);return[a].concat(pY(i))}Dn.renderCallByParent=PY;function fu(e){"@babel/helpers - typeof";return fu=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},fu(e)}function uv(){return uv=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=Ie(r,n,i,o),y=Ie(r,n,i,u);d+="L ".concat(y.x,",").concat(y.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},$Y=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=Ft(f-u),d=Pc({cx:r,cy:n,radius:a,angle:u,sign:c,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,y=d.lineTangency,p=d.theta,b=Pc({cx:r,cy:n,radius:a,angle:f,sign:-c,cornerRadius:o,cornerIsExternal:l}),x=b.circleTangency,m=b.lineTangency,v=b.theta,O=l?Math.abs(u-f):Math.abs(u-f)-p-v;if(O<0)return s?"M ".concat(y.x,",").concat(y.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 - `):g2({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var w="M ".concat(y.x,",").concat(y.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(h.x,",").concat(h.y,` - A`).concat(a,",").concat(a,",0,").concat(+(O>180),",").concat(+(c<0),",").concat(x.x,",").concat(x.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(m.x,",").concat(m.y,` - `);if(i>0){var S=Pc({cx:r,cy:n,radius:i,angle:u,sign:c,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=S.circleTangency,P=S.lineTangency,A=S.theta,C=Pc({cx:r,cy:n,radius:i,angle:f,sign:-c,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),E=C.circleTangency,T=C.lineTangency,N=C.theta,D=l?Math.abs(u-f):Math.abs(u-f)-A-N;if(D<0&&o===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(T.x,",").concat(T.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(E.x,",").concat(E.y,` - A`).concat(i,",").concat(i,",0,").concat(+(D>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},TY={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},x2=function(t){var r=VS(VS({},TY),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?b=$Y({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(p,y/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:c}):b=g2({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:c}),k.createElement("path",uv({},ae(r,!0),{className:h,d:b,role:"img"}))};function du(e){"@babel/helpers - typeof";return du=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},du(e)}function cv(){return cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function YY(e,t){return Ra(e.getTime(),t.getTime())}function QY(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function ZY(e,t){return e===t}function QS(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,s,l=0;(o=a.next())&&!o.done;){for(var u=t.entries(),f=!1,c=0;(s=u.next())&&!s.done;){if(i[c]){c++;continue}var 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}var JY=Ra;function eQ(e,t,r){var n=YS(e),i=n.length;if(YS(t).length!==i)return!1;for(;i-- >0;)if(!O2(e,t,r,n[i]))return!1;return!0}function Xs(e,t,r){var n=GS(e),i=n.length;if(GS(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=n[i],!O2(e,t,r,a)||(o=XS(e,a),s=XS(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function tQ(e,t){return Ra(e.valueOf(),t.valueOf())}function rQ(e,t){return e.source===t.source&&e.flags===t.flags}function ZS(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,s;(o=a.next())&&!o.done;){for(var l=t.values(),u=!1,f=0;(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 nQ(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function iQ(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 O2(e,t,r,n){return(n===GY||n===KY||n===qY)&&(e.$$typeof||t.$$typeof)?!0:HY(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var aQ="[object Arguments]",oQ="[object Boolean]",sQ="[object Date]",lQ="[object Error]",uQ="[object Map]",cQ="[object Number]",fQ="[object Object]",dQ="[object RegExp]",hQ="[object Set]",pQ="[object String]",yQ="[object URL]",mQ=Array.isArray,JS=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,eO=Object.assign,vQ=Object.prototype.toString.call.bind(Object.prototype.toString);function gQ(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,f=e.areSetsEqual,c=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(y,p,b){if(y===p)return!0;if(y==null||p==null)return!1;var x=typeof y;if(x!==typeof p)return!1;if(x!=="object")return x==="number"?o(y,p,b):x==="function"?i(y,p,b):!1;var m=y.constructor;if(m!==p.constructor)return!1;if(m===Object)return s(y,p,b);if(mQ(y))return t(y,p,b);if(JS!=null&&JS(y))return c(y,p,b);if(m===Date)return r(y,p,b);if(m===RegExp)return u(y,p,b);if(m===Map)return a(y,p,b);if(m===Set)return f(y,p,b);var v=vQ(y);return v===sQ?r(y,p,b):v===dQ?u(y,p,b):v===uQ?a(y,p,b):v===hQ?f(y,p,b):v===fQ?typeof y.then!="function"&&typeof p.then!="function"&&s(y,p,b):v===yQ?d(y,p,b):v===lQ?n(y,p,b):v===aQ?s(y,p,b):v===oQ||v===cQ||v===pQ?l(y,p,b):!1}}function xQ(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Xs:XY,areDatesEqual:YY,areErrorsEqual:QY,areFunctionsEqual:ZY,areMapsEqual:n?KS(QS,Xs):QS,areNumbersEqual:JY,areObjectsEqual:n?Xs:eQ,arePrimitiveWrappersEqual:tQ,areRegExpsEqual:rQ,areSetsEqual:n?KS(ZS,Xs):ZS,areTypedArraysEqual:n?Xs:nQ,areUrlsEqual:iQ};if(r&&(i=eO({},i,r(i))),t){var a=kc(i.areArraysEqual),o=kc(i.areMapsEqual),s=kc(i.areObjectsEqual),l=kc(i.areSetsEqual);i=eO({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function bQ(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function wQ(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(l,u){var f=n(),c=f.cache,d=c===void 0?t?new WeakMap:void 0:c,h=f.meta;return r(l,u,{cache:d,equals:i,meta:h,strict:a})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,u){return r(l,u,o)}}var SQ=zi();zi({strict:!0});zi({circular:!0});zi({circular:!0,strict:!0});zi({createInternalComparator:function(){return Ra}});zi({strict:!0,createInternalComparator:function(){return Ra}});zi({circular:!0,createInternalComparator:function(){return Ra}});zi({circular:!0,createInternalComparator:function(){return Ra},strict:!0});function zi(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=xQ(e),l=gQ(s),u=n?n(l):bQ(l);return wQ({circular:r,comparator:l,createState:i,equals:u,strict:o})}function OQ(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function tO(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):OQ(i)};requestAnimationFrame(n)}function fv(e){"@babel/helpers - typeof";return fv=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},fv(e)}function _Q(e){return jQ(e)||kQ(e)||AQ(e)||PQ()}function PQ(){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 AQ(e,t){if(e){if(typeof e=="string")return rO(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 rO(e,t)}}function rO(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:x<0?0:x},p=function(x){for(var m=x>1?1:x,v=m,O=0;O<8;++O){var w=c(v)-m,S=h(v);if(Math.abs(w-m)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,y=d*a,p=d+(h-y)*s/1e3,b=d*s/1e3+f;return Math.abs(b-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 aZ(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 oy(e){return uZ(e)||lZ(e)||sZ(e)||oZ()}function oZ(){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 sZ(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 lZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uZ(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"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 cd(e){return cd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cd(e)}var Fh=function(e){hZ(r,e);var t=pZ(r);function r(n,i){var a;cZ(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(xv(a)),a.changeStyle=a.changeStyle.bind(xv(a)),!s||h<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:f}),gv(a);if(c&&c.length)a.state={style:c[0].style};else if(u){if(typeof d=="function")return a.state={style:u},gv(a);a.state={style:l?rl({},l,u):u}}else a.state={style:{}};return a}return fZ(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?rl({},l,f):f};this.state&&d&&(l&&d[l]!==f||!l&&d!==f)&&this.setState(h);return}if(!(SQ(i.to,f)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=y||u?c:i.to;if(this.state&&d){var b={style:l?rl({},l,p):p};(l&&d[l]!==p||!l&&d!==p)&&this.setState(b)}this.runAnimation(Nr(Nr({},this.props),{},{from:p,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=rZ(o,s,HQ(u),l,this.changeStyle),y=function(){a.stopJSAnimation=h()};this.manager.start([d,f,y,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(p,b,x){if(x===0)return p;var m=b.duration,v=b.easing,O=v===void 0?"ease":v,w=b.style,S=b.properties,_=b.onAnimationEnd,P=x>0?o[x-1]:b,A=S||Object.keys(w);if(typeof O=="function"||O==="spring")return[].concat(oy(p),[a.runJSAnimation.bind(a,{from:P.style,to:w,duration:m,easing:O}),m]);var C=aO(A,m,O),E=Nr(Nr(Nr({},P.style),w),{},{transition:C});return[].concat(oy(p),[E,m,_]).filter(NQ)};return this.manager.start([l].concat(oy(o.reduce(h,[f,Math.max(d,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=EQ());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,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var p=s?rl({},s,l):l,b=aO(Object.keys(p),o,u);y.start([f,a,Nr(Nr({},p),{},{transition:b}),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=iZ(i,nZ),u=j.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 y=h.props,p=y.style,b=p===void 0?{}:p,x=y.className,m=j.cloneElement(h,Nr(Nr({},l),{},{style:Nr(Nr({},b),f),className:x}));return m};return u===1?c(j.Children.only(a)):k.createElement("div",null,j.Children.map(a,function(d){return c(d)}))}}]),r}(j.PureComponent);Fh.displayName="Animate";Fh.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Fh.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};const ka=Fh;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 fd(){return fd=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 y=Math.min(o,a);f="M ".concat(t,",").concat(r+s*y,` - A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+l*y,",").concat(r,` - L `).concat(t+n-l*y,",").concat(r,` - A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*y,` - L `).concat(t+n,",").concat(r+i-s*y,` - A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+n-l*y,",").concat(r+i,` - L `).concat(t+l*y,",").concat(r+i,` - A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*y," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},_Z=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},PZ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},rx=function(t){var r=pO(pO({},PZ),t),n=j.useRef(),i=j.useState(-1),a=mZ(i,2),o=a[0],s=a[1];j.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var O=n.current.getTotalLength();O&&s(O)}catch{}},[]);var l=r.x,u=r.y,f=r.width,c=r.height,d=r.radius,h=r.className,y=r.animationEasing,p=r.animationDuration,b=r.animationBegin,x=r.isAnimationActive,m=r.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||c!==+c||f===0||c===0)return null;var v=ue("recharts-rectangle",h);return m?k.createElement(ka,{canBegin:o>0,from:{width:f,height:c,x:l,y:u},to:{width:f,height:c,x:l,y:u},duration:p,animationEasing:y,isActive:m},function(O){var w=O.width,S=O.height,_=O.x,P=O.y;return k.createElement(ka,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:p,isActive:x,easing:y},k.createElement("path",fd({},ae(r,!0),{className:v,d:yO(_,P,w,S,d),ref:n})))}):k.createElement("path",fd({},ae(r,!0),{className:v,d:yO(l,u,f,c,d)}))},AZ=["points","className","baseLinePoints","connectNulls"];function so(){return so=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 jZ(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 mO(e){return CZ(e)||TZ(e)||$Z(e)||EZ()}function EZ(){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 $Z(e,t){if(e){if(typeof e=="string")return bv(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 bv(e,t)}}function TZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CZ(e){if(Array.isArray(e))return bv(e)}function bv(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){vO(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),vO(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},bl=function(t,r){var n=NZ(t);r&&(n=[n.reduce(function(a,o){return[].concat(mO(a),mO(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},MZ=function(t,r,n){var i=bl(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(bl(r.reverse(),n).slice(1))},IZ=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=kZ(t,AZ);if(!r||!r.length)return null;var s=ue("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=MZ(r,i,a);return k.createElement("g",{className:s},k.createElement("path",so({},ae(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?k.createElement("path",so({},ae(o,!0),{fill:"none",d:bl(r,a)})):null,l?k.createElement("path",so({},ae(o,!0),{fill:"none",d:bl(i,a)})):null)}var f=bl(r,a);return k.createElement("path",so({},ae(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:s,d:f}))};function wv(){return wv=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 UZ(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 VZ=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},WZ=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,y=t.className,p=zZ(t,DZ),b=RZ({x:n,y:a,top:s,left:u,width:c,height:h},p);return!X(n)||!X(a)||!X(c)||!X(h)||!X(s)||!X(u)?null:k.createElement("path",Sv({},ae(b,!0),{className:ue("recharts-cross",y),d:VZ(n,a,c,h,s,u)}))},HZ=Mh,qZ=zE,KZ=yn;function GZ(e,t){return e&&e.length?HZ(e,KZ(t),qZ):void 0}var XZ=GZ;const YZ=Se(XZ);var QZ=Mh,ZZ=yn,JZ=UE;function eJ(e,t){return e&&e.length?QZ(e,ZZ(t),JZ):void 0}var tJ=eJ;const rJ=Se(tJ);var nJ=["cx","cy","angle","ticks","axisLine"],iJ=["ticks","tick","angle","tickFormatter","stroke"];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 wl(){return wl=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 aJ(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 oJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wO(e,t){for(var r=0;r_O?o=i==="outer"?"start":"end":a<-_O?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=Wi(Wi({},ae(this.props,!1)),{},{fill:"none"},ae(s,!1));if(l==="circle")return k.createElement(Bh,Yi({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var f=this.props.ticks,c=f.map(function(d){return Ie(i,a,o,d.coordinate)});return k.createElement(IZ,Yi({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=ae(this.props,!1),c=ae(o,!1),d=Wi(Wi({},f),{},{fill:"none"},ae(s,!1)),h=a.map(function(y,p){var b=n.getTickLineCoord(y),x=n.getTickTextAnchor(y),m=Wi(Wi(Wi({textAnchor:x},f),{},{stroke:"none",fill:u},c),{},{index:p,payload:y,x:b.x2,y:b.y2});return k.createElement(xe,Yi({className:ue("recharts-polar-angle-axis-tick",m2(o)),key:"tick-".concat(y.coordinate)},Oa(n.props,y,p)),s&&k.createElement("line",Yi({className:"recharts-polar-angle-axis-tick-line"},d,b)),o&&t.renderTickItem(o,m,l?l(y.value,p):y.value))});return k.createElement(xe,{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:k.createElement(xe,{className:ue("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return k.isValidElement(n)?o=k.cloneElement(n,i):se(n)?o=n(i):o=k.createElement(_a,Yi({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(j.PureComponent);Vh(Wh,"displayName","PolarAngleAxis");Vh(Wh,"axisType","angleAxis");Vh(Wh,"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 wJ=Rj,SJ=wJ(Object.getPrototypeOf,Object),OJ=SJ,_J=Gn,PJ=OJ,AJ=Xn,kJ="[object Object]",jJ=Function.prototype,EJ=Object.prototype,M2=jJ.toString,$J=EJ.hasOwnProperty,TJ=M2.call(Object);function CJ(e){if(!AJ(e)||_J(e)!=kJ)return!1;var t=PJ(e);if(t===null)return!0;var r=$J.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&M2.call(r)==TJ}var NJ=CJ;const MJ=Se(NJ);var IJ=Gn,DJ=Xn,RJ="[object Boolean]";function LJ(e){return e===!0||e===!1||DJ(e)&&IJ(e)==RJ}var FJ=LJ;const BJ=Se(FJ);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 pd(){return pd=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:p,animationEasing:y,isActive:x},function(v){var O=v.upperWidth,w=v.lowerWidth,S=v.height,_=v.x,P=v.y;return k.createElement(ka,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:p,easing:y},k.createElement("path",pd({},ae(r,!0),{className:m,d:jO(_,P,O,w,S),ref:n})))}):k.createElement("g",null,k.createElement("path",pd({},ae(r,!0),{className:m,d:jO(l,u,f,c,d)})))},QJ=["option","shapeType","propTransformer","activeClassName","isActive"];function gu(e){"@babel/helpers - typeof";return gu=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},gu(e)}function ZJ(e,t){if(e==null)return{};var r=JJ(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 JJ(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 EO(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 yd(e){for(var t=1;t0?ur(v,"paddingAngle",0):0;if(w){var _=ar(w.endAngle-w.startAngle,v.endAngle-v.startAngle),P=Ce(Ce({},v),{},{startAngle:m+S,endAngle:m+_(p)+S});b.push(P),m=P.endAngle}else{var A=v.endAngle,C=v.startAngle,E=ar(0,A-C),T=E(p),N=Ce(Ce({},v),{},{startAngle:m+S,endAngle:m+T+S});b.push(N),m=N.endAngle}}),k.createElement(xe,null,n.renderSectorsStatically(b))})}},{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||!Vu(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,y=this.state.isAnimationFinished;if(a||!o||!o.length||!X(u)||!X(f)||!X(c)||!X(d))return null;var p=ue("recharts-pie",s);return k.createElement(xe,{tabIndex:this.props.rootTabIndex,className:p,ref:function(x){n.pieRef=x}},this.renderSectors(),l&&this.renderLabels(o),pt.renderCallByParent(this.props,null,!1),(!h||y)&&Dn.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?m:m-1)*l,O=b-m*h-v,w=i.reduce(function(P,A){var C=lt(A,x,0);return P+(X(C)?C:0)},0),S;if(w>0){var _;S=i.map(function(P,A){var C=lt(P,x,0),E=lt(P,f,A),T=(X(C)?C:0)/w,N;A?N=_.endAngle+Ft(p)*l*(C!==0?1:0):N=o;var D=N+Ft(p)*((C!==0?h:0)+T*O),R=(N+D)/2,L=(y.innerRadius+y.outerRadius)/2,V=[{name:E,value:C,payload:P,dataKey:x,type:d}],I=Ie(y.cx,y.cy,L,R);return _=Ce(Ce(Ce({percent:T,cornerRadius:a,name:E,tooltipPayload:V,midAngle:R,middleRadius:L,tooltipPosition:I},P),y),{},{value:lt(P,x),startAngle:N,endAngle:D,payload:P,paddingAngle:Ft(p)*l}),_})}return Ce(Ce({},y),{},{sectors:S,data:i})});var bee=Math.ceil,wee=Math.max;function See(e,t,r,n){for(var i=-1,a=wee(bee((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var Oee=See,_ee=rE,NO=1/0,Pee=17976931348623157e292;function Aee(e){if(!e)return e===0?e:0;if(e=_ee(e),e===NO||e===-NO){var t=e<0?-1:1;return t*Pee}return e===e?e:0}var L2=Aee,kee=Oee,jee=Ah,sy=L2;function Eee(e){return function(t,r,n){return n&&typeof n!="number"&&jee(t,r,n)&&(r=n=void 0),t=sy(t),r===void 0?(r=t,t=0):r=sy(r),n=n===void 0?t0&&n.handleDrag(i.changedTouches[0])}),rr(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()}),rr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),rr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),rr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),rr(n,"handleSlideDragStart",function(i){var a=LO(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 Vee(t,e),Fee(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),y=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:y===f?f:y-y%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=lt(a[n],s,n);return se(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,y=l.onChange,p=n.pageX-a;p>0?p=Math.min(p,u+f-c-s,u+f-c-o):p<0&&(p=Math.max(p,u-o,u-s));var b=this.getIndex({startX:o+p,endX:s+p});(b.startIndex!==d||b.endIndex!==h)&&y&&y(b),this.setState({startX:o+p,endX:s+p,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=LO(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,y=f.onChange,p=f.gap,b=f.data,x={startX:this.state.startX,endX:this.state.endX},m=n.pageX-a;m>0?m=Math.min(m,c+d-h-u):m<0&&(m=Math.max(m,c-u)),x[o]=u+m;var v=this.getIndex(x),O=v.startIndex,w=v.endIndex,S=function(){var P=b.length-1;return o==="startX"&&(s>l?O%p===0:w%p===0)||sl?w%p===0:O%p===0)||s>l&&w===P};this.setState(rr(rr({},o,u+m),"brushMoveStartX",n.pageX),function(){y&&S()&&y(v)})}},{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(rr({},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 k.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=j.Children.only(u);return c?k.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,y=l.data,p=l.startIndex,b=l.endIndex,x=Math.max(n,this.props.x),m=ly(ly({},ae(this.props,!1)),{},{x,y:u,width:f,height:c}),v=h||"Min value: ".concat((a=y[p])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[b])===null||o===void 0?void 0:o.name);return k.createElement(xe,{tabIndex:0,role:"slider","aria-label":v,"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,m))}},{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 k.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,y={pointerEvents:"none",fill:u};return k.createElement(xe,{className:"recharts-brush-texts"},k.createElement(_a,gd({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-h,y:o+s/2},y),this.getTextOfTick(i)),k.createElement(_a,gd({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+l+h,y:o+s/2},y),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,y=d.endX,p=d.isTextActive,b=d.isSlideMoving,x=d.isTravellerMoving,m=d.isTravellerFocused;if(!i||!i.length||!X(s)||!X(l)||!X(u)||!X(f)||u<=0||f<=0)return null;var v=ue("recharts-brush",a),O=k.Children.count(o)===1,w=Ree("userSelect","none");return k.createElement(xe,{className:v,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(h,y),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(y,"endX"),(p||b||x||m||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 k.createElement(k.Fragment,null,k.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),k.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),k.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 k.isValidElement(n)?a=k.cloneElement(n,i):se(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 ly({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?Hee({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}}])}(j.PureComponent);rr(Jo,"displayName","Brush");rr(Jo,"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 qee=k0;function Kee(e,t){var r;return qee(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Gee=Kee,Xee=Ej,Yee=yn,Qee=Gee,Zee=er,Jee=Ah;function ete(e,t,r){var n=Zee(e)?Xee:Qee;return r&&Jee(e,t,r)&&(t=void 0),n(e,Yee(t))}var tte=ete;const rte=Se(tte);var fn=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},FO=Qj;function nte(e,t,r){t=="__proto__"&&FO?FO(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ite=nte,ate=ite,ote=Xj,ste=yn;function lte(e,t){var r={};return t=ste(t),ote(e,function(n,i,a){ate(r,i,t(n,i,a))}),r}var ute=lte;const cte=Se(ute);function fte(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 jte(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 Ete(e,t){var r=e.x,n=e.y,i=kte(e,Ote),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 Ys(Ys(Ys(Ys(Ys({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function zO(e){return k.createElement(I2,kv({shapeType:"rectangle",propTransformer:Ete,activeClassName:"recharts-active-bar"},e))}var $te=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=typeof n=="number";return a?t(n,i):(a||Aa(!1),r)}},Tte=["value","background"],V2;function es(e){"@babel/helpers - typeof";return es=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},es(e)}function Cte(e,t){if(e==null)return{};var r=Nte(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 Nte(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 bd(){return bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(R)0&&Math.abs(D)0&&(N=Math.min((me||0)-(D[Ee-1]||0),N))}),Number.isFinite(N)){var R=N/T,L=p.layout==="vertical"?n.height:n.width;if(p.padding==="gap"&&(_=R*L/2),p.padding==="no-gap"){var V=Bt(t.barCategoryGap,R*L),I=R*L/2;_=I-V-(I-V)/L*V}}}i==="xAxis"?P=[n.left+(v.left||0)+(_||0),n.left+n.width-(v.right||0)-(_||0)]:i==="yAxis"?P=l==="horizontal"?[n.top+n.height-(v.bottom||0),n.top+(v.top||0)]:[n.top+(v.top||0)+(_||0),n.top+n.height-(v.bottom||0)-(_||0)]:P=p.range,w&&(P=[P[1],P[0]]);var F=u2(p,a,d),H=F.scale,Q=F.realScaleType;H.domain(x).range(P),c2(H);var K=f2(H,Fr(Fr({},p),{},{realScaleType:Q}));i==="xAxis"?(E=b==="top"&&!O||b==="bottom"&&O,A=n.left,C=c[S]-E*p.height):i==="yAxis"&&(E=b==="left"&&!O||b==="right"&&O,A=c[S]-E*p.width,C=n.top);var ne=Fr(Fr(Fr({},p),K),{},{realScaleType:Q,x:A,y:C,scale:H,width:i==="xAxis"?n.width:p.width,height:i==="yAxis"?n.height:p.height});return ne.bandSize=id(ne,K),!p.hide&&i==="xAxis"?c[S]+=(E?-1:1)*ne.height:p.hide||(c[S]+=(E?-1:1)*ne.width),Fr(Fr({},h),{},Kh({},y,ne))},{})},G2=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)}},Wte=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return G2({x:r,y:n},{x:i,y:a})},X2=function(){function e(t){zte(this,e),this.scale=t}return Ute(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(X2,"EPS",1e-4);var nx=function(t){var r=Object.keys(t).reduce(function(n,i){return Fr(Fr({},n),{},Kh({},i,X2.create(t[i])))},{});return Fr(Fr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return cte(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return U2(i,function(a,o){return r[o].isInRange(a)})}})};function Hte(e){return(e%180+180)%180}var qte=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Hte(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o-1?i[a?t[o]:o]:void 0}}var Qte=Yte,Zte=L2;function Jte(e){var t=Zte(e),r=t%1;return t===t?r?t-r:t:0}var ere=Jte,tre=Vj,rre=yn,nre=ere,ire=Math.max;function are(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:nre(r);return i<0&&(i=ire(n+i,0)),tre(e,rre(t),i)}var ore=are,sre=Qte,lre=ore,ure=sre(lre),cre=ure;const fre=Se(cre);var dre=c4(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("")}),ix=j.createContext(void 0),ax=j.createContext(void 0),Y2=j.createContext(void 0),Q2=j.createContext({}),Z2=j.createContext(void 0),J2=j.createContext(0),e$=j.createContext(0),qO=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=dre(a);return k.createElement(ix.Provider,{value:n},k.createElement(ax.Provider,{value:i},k.createElement(Q2.Provider,{value:a},k.createElement(Y2.Provider,{value:f},k.createElement(Z2.Provider,{value:o},k.createElement(J2.Provider,{value:u},k.createElement(e$.Provider,{value:l},s)))))))},hre=function(){return j.useContext(Z2)},t$=function(t){var r=j.useContext(ix);r==null&&Aa(!1);var n=r[t];return n==null&&Aa(!1),n},pre=function(){var t=j.useContext(ix);return ci(t)},yre=function(){var t=j.useContext(ax),r=fre(t,function(n){return U2(n.domain,Number.isFinite)});return r||ci(t)},r$=function(t){var r=j.useContext(ax);r==null&&Aa(!1);var n=r[t];return n==null&&Aa(!1),n},mre=function(){var t=j.useContext(Y2);return t},vre=function(){return j.useContext(Q2)},ox=function(){return j.useContext(e$)},sx=function(){return j.useContext(J2)};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 gre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KO(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 Qre(e,t){return u$(e,t+1)}function Zre(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 y=n==null?void 0:n[l];if(y===void 0)return{v:u$(n,u)};var p=l,b,x=function(){return b===void 0&&(b=r(y,p)),b},m=y.coordinate,v=l===0||Pd(e,m,x,f,s);v||(l=0,f=o,u+=1),v&&(f=m+e*(x()/2+i),l+=u)},d;u<=a.length;)if(d=c(),d)return d.v;return[]}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 n_(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;t0?h.coordinate-b*e:h.coordinate})}else a[d]=h=Et(Et({},h),{},{tickCoord:h.coordinate});var x=Pd(e,h.tickCoord,p,s,l);x&&(l=h.tickCoord-e*(p()/2+i),a[d]=Et(Et({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function nne(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=Et(Et({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var h=Pd(e,f.tickCoord,function(){return c},l,u);h&&(u=f.tickCoord-e*(c/2+i),o[s-1]=Et(Et({},f),{},{isShow:!0}))}for(var y=a?s-1:s,p=function(m){var v=o[m],O,w=function(){return O===void 0&&(O=r(v,m)),O};if(m===0){var S=e*(v.coordinate-e*w()/2-l);o[m]=v=Et(Et({},v),{},{tickCoord:S<0?v.coordinate-S*e:v.coordinate})}else o[m]=v=Et(Et({},v),{},{tickCoord:v.coordinate});var _=Pd(e,v.tickCoord,w,l,u);_&&(l=v.tickCoord+e*(w()/2+i),o[m]=Et(Et({},v),{},{isShow:!0}))},b=0;b=2?Ft(i[1].coordinate-i[0].coordinate):1,x=Yre(a,b,h);return l==="equidistantPreserveStart"?Zre(b,x,p,i,o):(l==="preserveStart"||l==="preserveStartEnd"?d=nne(b,x,p,i,o,l==="preserveStartEnd"):d=rne(b,x,p,i,o),d.filter(function(m){return m.isShow}))}var ine=["viewBox"],ane=["viewBox"],one=["ticks"];function is(e){"@babel/helpers - typeof";return is=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},is(e)}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 sne(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 lne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a_(e,t){for(var r=0;r0?l(this.props):l(h)),o<=0||s<=0||!y||!y.length?null:k.createElement(xe,{className:ue("recharts-cartesian-axis",u),ref:function(b){n.layerReference=b}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),pt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return k.isValidElement(n)?o=k.cloneElement(n,i):se(n)?o=n(i):o=k.createElement(_a,uo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(j.Component);fx(js,"displayName","CartesianAxis");fx(js,"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 yne=["x1","y1","x2","y2","key"],mne=["offset"];function ja(e){"@babel/helpers - typeof";return ja=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},ja(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 Tt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bne(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 wne=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 k.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function d$(e,t){var r;if(k.isValidElement(e))r=k.cloneElement(e,t);else if(se(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=s_(t,yne),u=ae(l,!1);u.offset;var f=s_(u,mne);r=k.createElement("line",oa({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function Sne(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=Tt(Tt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return d$(i,u)});return k.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function One(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=Tt(Tt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return d$(i,u)});return k.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function _ne(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 y=!f[h+1],p=y?i+o-d:f[h+1]-d;if(p<=0)return null;var b=h%t.length;return k.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:p,width:a,stroke:"none",fill:t[b],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function Pne(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 y=!f[h+1],p=y?a+s-d:f[h+1]-d;if(p<=0)return null;var b=h%n.length;return k.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:p,height:l,stroke:"none",fill:n[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var Ane=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return l2(cx(Tt(Tt(Tt({},js.defaultProps),n),{},{ticks:Cn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},kne=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return l2(cx(Tt(Tt(Tt({},js.defaultProps),n),{},{ticks:Cn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Wa={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function dx(e){var t,r,n,i,a,o,s=ox(),l=sx(),u=vre(),f=Tt(Tt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Wa.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Wa.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Wa.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Wa.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Wa.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Wa.verticalFill,x:X(e.x)?e.x:u.left,y:X(e.y)?e.y:u.top,width:X(e.width)?e.width:u.width,height:X(e.height)?e.height:u.height}),c=f.x,d=f.y,h=f.width,y=f.height,p=f.syncWithTicks,b=f.horizontalValues,x=f.verticalValues,m=pre(),v=yre();if(!X(h)||h<=0||!X(y)||y<=0||!X(c)||c!==+c||!X(d)||d!==+d)return null;var O=f.verticalCoordinatesGenerator||Ane,w=f.horizontalCoordinatesGenerator||kne,S=f.horizontalPoints,_=f.verticalPoints;if((!S||!S.length)&&se(w)){var P=b&&b.length,A=w({yAxis:v?Tt(Tt({},v),{},{ticks:P?b:v.ticks}):void 0,width:s,height:l,offset:u},P?!0:p);Kr(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(ja(A),"]")),Array.isArray(A)&&(S=A)}if((!_||!_.length)&&se(O)){var C=x&&x.length,E=O({xAxis:m?Tt(Tt({},m),{},{ticks:C?x:m.ticks}):void 0,width:s,height:l,offset:u},C?!0:p);Kr(Array.isArray(E),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(ja(E),"]")),Array.isArray(E)&&(_=E)}return k.createElement("g",{className:"recharts-cartesian-grid"},k.createElement(wne,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),k.createElement(Sne,oa({},f,{offset:u,horizontalPoints:S,xAxis:m,yAxis:v})),k.createElement(One,oa({},f,{offset:u,verticalPoints:_,xAxis:m,yAxis:v})),k.createElement(_ne,oa({},f,{horizontalPoints:S})),k.createElement(Pne,oa({},f,{verticalPoints:_})))}dx.displayName="CartesianGrid";var jne=["type","layout","connectNulls","ref"],Ene=["key"];function as(e){"@babel/helpers - typeof";return as=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},as(e)}function l_(e,t){if(e==null)return{};var r=$ne(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 $ne(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 Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rc){h=[].concat(Ha(l.slice(0,y)),[c-p]);break}var b=h.length%2===0?[0,d]:[d];return[].concat(Ha(t.repeat(l,f)),Ha(h),b).map(function(x){return"".concat(x,"px")}).join(", ")}),Br(r,"id",ws("recharts-line-")),Br(r,"pathRef",function(o){r.mainCurve=o}),Br(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Br(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Bne(t,e),Dne(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,f=a.children,c=cr(f,Wu);if(!c)return null;var d=function(p,b){return{x:p.x,y:p.y,value:p.value,errorVal:lt(p.payload,b)}},h={clipPath:n?"url(#clipPath-".concat(i,")"):null};return k.createElement(xe,h,c.map(function(y){return k.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,f=s.dataKey,c=ae(this.props,!1),d=ae(l,!0),h=u.map(function(p,b){var x=tr(tr(tr({key:"dot-".concat(b),r:3},c),d),{},{index:b,cx:p.x,cy:p.y,value:p.value,dataKey:f,payload:p.payload,points:u});return t.renderDotItem(l,x)}),y={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return k.createElement(xe,Sl({className:"recharts-line-dots",key:"dots"},y),h)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,f=s.connectNulls;s.ref;var c=l_(s,jne),d=tr(tr(tr({},ae(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:f});return k.createElement(sd,Sl({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,d=o.animationEasing,h=o.animationId,y=o.animateNewValues,p=o.width,b=o.height,x=this.state,m=x.prevPoints,v=x.totalLength;return k.createElement(ka,{begin:f,duration:c,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var w=O.t;if(m){var S=m.length/s.length,_=s.map(function(T,N){var D=Math.floor(N*S);if(m[D]){var R=m[D],L=ar(R.x,T.x),V=ar(R.y,T.y);return tr(tr({},T),{},{x:L(w),y:V(w)})}if(y){var I=ar(p*2,T.x),F=ar(b/2,T.y);return tr(tr({},T),{},{x:I(w),y:F(w)})}return tr(tr({},T),{},{x:T.x,y:T.y})});return a.renderCurveStatically(_,n,i)}var P=ar(0,v),A=P(w),C;if(l){var E="".concat(l).split(/[,\s]+/gim).map(function(T){return parseFloat(T)});C=a.getStrokeDasharray(A,v,E)}else C=a.generateSimpleStrokeDasharray(v,A);return a.renderCurveStatically(s,n,i,{strokeDasharray:C})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,f=l.totalLength;return s&&o&&o.length&&(!u&&f>0||!Vu(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,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.xAxis,f=i.yAxis,c=i.top,d=i.left,h=i.width,y=i.height,p=i.isAnimationActive,b=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,m=s.length===1,v=ue("recharts-line",l),O=u&&u.allowDataOverflow,w=f&&f.allowDataOverflow,S=O||w,_=ce(b)?this.id:b,P=(n=ae(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=P.r,C=A===void 0?3:A,E=P.strokeWidth,T=E===void 0?2:E,N=vF(o)?o:{},D=N.clipDot,R=D===void 0?!0:D,L=C*2+T;return k.createElement(xe,{className:v},O||w?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(_)},k.createElement("rect",{x:O?d:d-h/2,y:w?c:c-y/2,width:O?h:h*2,height:w?y:y*2})),!R&&k.createElement("clipPath",{id:"clipPath-dots-".concat(_)},k.createElement("rect",{x:d-L/2,y:c-L/2,width:h+L,height:y+L}))):null,!m&&this.renderCurve(S,_),this.renderErrorBar(S,_),(m||o)&&this.renderDots(S,R,_),(!p||x)&&Dn.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Ha(n),[0]):n,o=[],s=0;se.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 Aie(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 kie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g_(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&X(i)&&X(a)?t.slice(i,a+1):[]};function j$(e){return e==="number"?[0,"auto"]:void 0}var qv=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Zh(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=$f(h,o.dataKey,i)}else d=c&&c[n]||s[n];return d?[].concat(us(l),[h2(u,d)]):l},[])},b_=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=Fie(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=yX(o,s,u,l);if(f>=0&&u){var c=u[f]&&u[f].value,d=qv(t,r,f,c),h=Bie(n,s,f,a);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:h}}return null},zie=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=s2(f,a);return n.reduce(function(y,p){var b,x=p.type.defaultProps!==void 0?z(z({},p.type.defaultProps),p.props):p.props,m=x.type,v=x.dataKey,O=x.allowDataOverflow,w=x.allowDuplicatedCategory,S=x.scale,_=x.ticks,P=x.includeHidden,A=x[o];if(y[A])return y;var C=Zh(t.data,{graphicalItems:i.filter(function(K){var ne,me=o in K.props?K.props[o]:(ne=K.type.defaultProps)===null||ne===void 0?void 0:ne[o];return me===A}),dataStartIndex:l,dataEndIndex:u}),E=C.length,T,N,D;pie(x.domain,O,m)&&(T=ov(x.domain,null,O),h&&(m==="number"||S!=="auto")&&(D=gl(C,v,"category")));var R=j$(m);if(!T||T.length===0){var L,V=(L=x.domain)!==null&&L!==void 0?L:R;if(v){if(T=gl(C,v,m),m==="category"&&h){var I=sF(T);w&&I?(N=T,T=vd(0,E)):w||(T=MS(V,T,p).reduce(function(K,ne){return K.indexOf(ne)>=0?K:[].concat(us(K),[ne])},[]))}else if(m==="category")w?T=T.filter(function(K){return K!==""&&!ce(K)}):T=MS(V,T,p).reduce(function(K,ne){return K.indexOf(ne)>=0||ne===""||ce(ne)?K:[].concat(us(K),[ne])},[]);else if(m==="number"){var F=bX(C,i.filter(function(K){var ne,me,Ee=o in K.props?K.props[o]:(ne=K.type.defaultProps)===null||ne===void 0?void 0:ne[o],Ve="hide"in K.props?K.props.hide:(me=K.type.defaultProps)===null||me===void 0?void 0:me.hide;return Ee===A&&(P||!Ve)}),v,a,f);F&&(T=F)}h&&(m==="number"||S!=="auto")&&(D=gl(C,v,"category"))}else h?T=vd(0,E):s&&s[A]&&s[A].hasStack&&m==="number"?T=d==="expand"?[0,1]:d2(s[A].stackGroups,l,u):T=o2(C,i.filter(function(K){var ne=o in K.props?K.props[o]:K.type.defaultProps[o],me="hide"in K.props?K.props.hide:K.type.defaultProps.hide;return ne===A&&(P||!me)}),m,f,!0);if(m==="number")T=Vv(c,T,A,a,_),V&&(T=ov(V,T,O));else if(m==="category"&&V){var H=V,Q=T.every(function(K){return H.indexOf(K)>=0});Q&&(T=H)}}return z(z({},y),{},oe({},A,z(z({},x),{},{axisType:a,domain:T,categoricalDomain:D,duplicateDomain:N,originalDomain:(b=x.domain)!==null&&b!==void 0?b:R,isCategorical:h,layout:f})))},{})},Uie=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=Zh(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),h=d.length,y=s2(f,a),p=-1;return n.reduce(function(b,x){var m=x.type.defaultProps!==void 0?z(z({},x.type.defaultProps),x.props):x.props,v=m[o],O=j$("number");if(!b[v]){p++;var w;return y?w=vd(0,h):s&&s[v]&&s[v].hasStack?(w=d2(s[v].stackGroups,l,u),w=Vv(c,w,v,a)):(w=ov(O,o2(d,n.filter(function(S){var _,P,A=o in S.props?S.props[o]:(_=S.type.defaultProps)===null||_===void 0?void 0:_[o],C="hide"in S.props?S.props.hide:(P=S.type.defaultProps)===null||P===void 0?void 0:P.hide;return A===v&&!C}),"number",f),i.defaultProps.allowDataOverflow),w=Vv(c,w,v,a)),z(z({},b),{},oe({},v,z(z({axisType:a},i.defaultProps),{},{hide:!0,orientation:ur(Rie,"".concat(a,".").concat(p%2),null),domain:w,originalDomain:O,isCategorical:y,layout:f})))}return b},{})},Vie=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=cr(f,a),h={};return d&&d.length?h=zie(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=Uie(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},Wie=function(t){var r=ci(t),n=Cn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:j0(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:id(r,n)}},w_=function(t){var r=t.children,n=t.defaultShowTooltip,i=ir(r,Jo),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}},Hie=function(t){return!t||!t.length?!1:t.some(function(r){var n=Mn(r&&r.type);return n&&n.indexOf("Bar")>=0})},S_=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"}},qie=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=ir(c,Jo),y=ir(c,xo),p=Object.keys(l).reduce(function(w,S){var _=l[S],P=_.orientation;return!_.mirror&&!_.hide?z(z({},w),{},oe({},P,w[P]+_.width)):w},{left:d.left||0,right:d.right||0}),b=Object.keys(o).reduce(function(w,S){var _=o[S],P=_.orientation;return!_.mirror&&!_.hide?z(z({},w),{},oe({},P,ur(w,"".concat(P))+_.height)):w},{top:d.top||0,bottom:d.bottom||0}),x=z(z({},b),p),m=x.bottom;h&&(x.bottom+=h.props.height||Jo.defaultProps.height),y&&r&&(x=gX(x,i,n,r));var v=u-x.left-x.right,O=f-x.top-x.bottom;return z(z({brushBottom:m},x),{},{width:Math.max(v,0),height:Math.max(O,0)})},Kie=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},hx=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(x,m){var v=m.graphicalItems,O=m.stackGroups,w=m.offset,S=m.updateId,_=m.dataStartIndex,P=m.dataEndIndex,A=x.barSize,C=x.layout,E=x.barGap,T=x.barCategoryGap,N=x.maxBarSize,D=S_(C),R=D.numericAxisName,L=D.cateAxisName,V=Hie(v),I=[];return v.forEach(function(F,H){var Q=Zh(x.data,{graphicalItems:[F],dataStartIndex:_,dataEndIndex:P}),K=F.type.defaultProps!==void 0?z(z({},F.type.defaultProps),F.props):F.props,ne=K.dataKey,me=K.maxBarSize,Ee=K["".concat(R,"Id")],Ve=K["".concat(L,"Id")],St={},vt=l.reduce(function(M,B){var J=m["".concat(B.axisType,"Map")],Y=K["".concat(B.axisType,"Id")];J&&J[Y]||B.axisType==="zAxis"||Aa(!1);var G=J[Y];return z(z({},M),{},oe(oe({},B.axisType,G),"".concat(B.axisType,"Ticks"),Cn(G)))},St),Z=vt[L],le=vt["".concat(L,"Ticks")],de=O&&O[Ee]&&O[Ee].hasStack&&EX(F,O[Ee].stackGroups),W=Mn(F.type).indexOf("Bar")>=0,Be=id(Z,le),ye=[],Ge=V&&mX({barSize:A,stackGroups:O,totalSize:Kie(vt,L)});if(W){var Ze,Ot,mn=ce(me)?N:me,vn=(Ze=(Ot=id(Z,le,!0))!==null&&Ot!==void 0?Ot:mn)!==null&&Ze!==void 0?Ze:0;ye=vX({barGap:E,barCategoryGap:T,bandSize:vn!==Be?vn:Be,sizeList:Ge[Ve],maxBarSize:mn}),vn!==Be&&(ye=ye.map(function(M){return z(z({},M),{},{position:z(z({},M.position),{},{offset:M.position.offset-vn/2})})}))}var $=F&&F.type&&F.type.getComposedData;$&&I.push({props:z(z({},$(z(z({},vt),{},{displayedData:Q,props:x,dataKey:ne,item:F,bandSize:Be,barPosition:ye,offset:w,stackedData:de,layout:C,dataStartIndex:_,dataEndIndex:P}))),{},oe(oe(oe({key:F.key||"item-".concat(H)},R,vt[R]),L,vt[L]),"animationId",S)),childIndex:bF(F,x.children),item:F})}),I},h=function(x,m){var v=x.props,O=x.dataStartIndex,w=x.dataEndIndex,S=x.updateId;if(!O1({props:v}))return null;var _=v.children,P=v.layout,A=v.stackOffset,C=v.data,E=v.reverseStackOrder,T=S_(P),N=T.numericAxisName,D=T.cateAxisName,R=cr(_,n),L=kX(C,R,"".concat(N,"Id"),"".concat(D,"Id"),A,E),V=l.reduce(function(K,ne){var me="".concat(ne.axisType,"Map");return z(z({},K),{},oe({},me,Vie(v,z(z({},ne),{},{graphicalItems:R,stackGroups:ne.axisType===N&&L,dataStartIndex:O,dataEndIndex:w}))))},{}),I=qie(z(z({},V),{},{props:v,graphicalItems:R}),m==null?void 0:m.legendBBox);Object.keys(V).forEach(function(K){V[K]=f(v,V[K],I,K.replace("Map",""),r)});var F=V["".concat(D,"Map")],H=Wie(F),Q=d(v,z(z({},V),{},{dataStartIndex:O,dataEndIndex:w,updateId:S,graphicalItems:R,stackGroups:L,offset:I}));return z(z({formattedGraphicalItems:Q,graphicalItems:R,offset:I,stackGroups:L},H),V)},y=function(b){function x(m){var v,O,w;return kie(this,x),w=Eie(this,x,[m]),oe(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),oe(w,"accessibilityManager",new hie),oe(w,"handleLegendBBoxUpdate",function(S){if(S){var _=w.state,P=_.dataStartIndex,A=_.dataEndIndex,C=_.updateId;w.setState(z({legendBBox:S},h({props:w.props,dataStartIndex:P,dataEndIndex:A,updateId:C},z(z({},w.state),{},{legendBBox:S}))))}}),oe(w,"handleReceiveSyncEvent",function(S,_,P){if(w.props.syncId===S){if(P===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(_)}}),oe(w,"handleBrushChange",function(S){var _=S.startIndex,P=S.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})}}),oe(w,"handleMouseEnter",function(S){var _=w.getMouseInfo(S);if(_){var P=z(z({},_),{},{isTooltipActive:!0});w.setState(P),w.triggerSyncEvent(P);var A=w.props.onMouseEnter;se(A)&&A(P,S)}}),oe(w,"triggeredAfterMouseMove",function(S){var _=w.getMouseInfo(S),P=_?z(z({},_),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(P),w.triggerSyncEvent(P);var A=w.props.onMouseMove;se(A)&&A(P,S)}),oe(w,"handleItemMouseEnter",function(S){w.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),oe(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),oe(w,"handleMouseMove",function(S){S.persist(),w.throttleTriggeredAfterMouseMove(S)}),oe(w,"handleMouseLeave",function(S){w.throttleTriggeredAfterMouseMove.cancel();var _={isTooltipActive:!1};w.setState(_),w.triggerSyncEvent(_);var P=w.props.onMouseLeave;se(P)&&P(_,S)}),oe(w,"handleOuterEvent",function(S){var _=xF(S),P=ur(w.props,"".concat(_));if(_&&se(P)){var A,C;/.*touch.*/i.test(_)?C=w.getMouseInfo(S.changedTouches[0]):C=w.getMouseInfo(S),P((A=C)!==null&&A!==void 0?A:{},S)}}),oe(w,"handleClick",function(S){var _=w.getMouseInfo(S);if(_){var P=z(z({},_),{},{isTooltipActive:!0});w.setState(P),w.triggerSyncEvent(P);var A=w.props.onClick;se(A)&&A(P,S)}}),oe(w,"handleMouseDown",function(S){var _=w.props.onMouseDown;if(se(_)){var P=w.getMouseInfo(S);_(P,S)}}),oe(w,"handleMouseUp",function(S){var _=w.props.onMouseUp;if(se(_)){var P=w.getMouseInfo(S);_(P,S)}}),oe(w,"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),oe(w,"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseDown(S.changedTouches[0])}),oe(w,"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseUp(S.changedTouches[0])}),oe(w,"handleDoubleClick",function(S){var _=w.props.onDoubleClick;if(se(_)){var P=w.getMouseInfo(S);_(P,S)}}),oe(w,"handleContextMenu",function(S){var _=w.props.onContextMenu;if(se(_)){var P=w.getMouseInfo(S);_(P,S)}}),oe(w,"triggerSyncEvent",function(S){w.props.syncId!==void 0&&cy.emit(fy,w.props.syncId,S,w.eventEmitterSymbol)}),oe(w,"applySyncEvent",function(S){var _=w.props,P=_.layout,A=_.syncMethod,C=w.state.updateId,E=S.dataStartIndex,T=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)w.setState(z({dataStartIndex:E,dataEndIndex:T},h({props:w.props,dataStartIndex:E,dataEndIndex:T,updateId:C},w.state)));else if(S.activeTooltipIndex!==void 0){var N=S.chartX,D=S.chartY,R=S.activeTooltipIndex,L=w.state,V=L.offset,I=L.tooltipTicks;if(!V)return;if(typeof A=="function")R=A(I,S);else if(A==="value"){R=-1;for(var F=0;F=0){var de,W;if(N.dataKey&&!N.allowDuplicatedCategory){var Be=typeof N.dataKey=="function"?le:"payload.".concat(N.dataKey.toString());de=$f(F,Be,R),W=H&&Q&&$f(Q,Be,R)}else de=F==null?void 0:F[D],W=H&&Q&&Q[D];if(Ve||Ee){var ye=S.props.activeIndex!==void 0?S.props.activeIndex:D;return[j.cloneElement(S,z(z(z({},A.props),vt),{},{activeIndex:ye})),null,null]}if(!ce(de))return[Z].concat(us(w.renderActivePoints({item:A,activePoint:de,basePoint:W,childIndex:D,isRange:H})))}else{var Ge,Ze=(Ge=w.getItemByXY(w.state.activeCoordinate))!==null&&Ge!==void 0?Ge:{graphicalItem:Z},Ot=Ze.graphicalItem,mn=Ot.item,vn=mn===void 0?S:mn,$=Ot.childIndex,M=z(z(z({},A.props),vt),{},{activeIndex:$});return[j.cloneElement(vn,M),null,null]}return H?[Z,null,null]:[Z,null]}),oe(w,"renderCustomized",function(S,_,P){return j.cloneElement(S,z(z({key:"recharts-customized-".concat(P)},w.props),w.state))}),oe(w,"renderMap",{CartesianGrid:{handler:Ec,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:Ec},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:Ec},YAxis:{handler:Ec},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((v=m.id)!==null&&v!==void 0?v:ws("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=nE(w.triggeredAfterMouseMove,(O=m.throttleDelay)!==null&&O!==void 0?O:1e3/60),w.state={},w}return Cie(x,b),jie(x,[{key:"componentDidMount",value:function(){var v,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(v=this.props.margin.left)!==null&&v!==void 0?v:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var v=this.props,O=v.children,w=v.data,S=v.height,_=v.layout,P=ir(O,xr);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,E=qv(this.state,w,A,C),T=this.state.tooltipTicks[A].coordinate,N=(this.state.offset.top+S)/2,D=_==="horizontal",R=D?{x:T,y:N}:{y:T,x:N},L=this.state.formattedGraphicalItems.find(function(I){var F=I.item;return F.type.name==="Scatter"});L&&(R=z(z({},R),L.props.points[A].tooltipPosition),E=L.props.points[A].tooltipPayload);var V={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:C,activePayload:E,activeCoordinate:R};this.setState(V),this.renderCursor(P),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(v,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==v.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==v.margin){var w,S;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(v){wm([ir(v.children,xr)],[ir(this.props.children,xr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var v=ir(this.props.children,xr);if(v&&typeof v.props.shared=="boolean"){var O=v.props.shared?"axis":"item";return s.indexOf(O)>=0?O:a}return a}},{key:"getMouseInfo",value:function(v){if(!this.container)return null;var O=this.container,w=O.getBoundingClientRect(),S=VW(w),_={chartX:Math.round(v.pageX-S.left),chartY:Math.round(v.pageY-S.top)},P=w.width/O.offsetWidth||1,A=this.inRange(_.chartX,_.chartY,P);if(!A)return null;var C=this.state,E=C.xAxisMap,T=C.yAxisMap,N=this.getTooltipEventType(),D=b_(this.state,this.props.data,this.props.layout,A);if(N!=="axis"&&E&&T){var R=ci(E).scale,L=ci(T).scale,V=R&&R.invert?R.invert(_.chartX):null,I=L&&L.invert?L.invert(_.chartY):null;return z(z({},_),{},{xValue:V,yValue:I},D)}return D?z(z({},_),D):null}},{key:"inRange",value:function(v,O){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,_=v/w,P=O/w;if(S==="horizontal"||S==="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 E=this.state,T=E.angleAxisMap,N=E.radiusAxisMap;if(T&&N){var D=ci(T);return RS({x:_,y:P},D)}return null}},{key:"parseEventsOfWrapper",value:function(){var v=this.props.children,O=this.getTooltipEventType(),w=ir(v,xr),S={};w&&O==="axis"&&(w.props.trigger==="click"?S={onClick:this.handleClick}:S={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 _=Tf(this.props,this.handleOuterEvent);return z(z({},_),S)}},{key:"addListener",value:function(){cy.on(fy,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){cy.removeListener(fy,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(v,O,w){for(var S=this.state.formattedGraphicalItems,_=0,P=S.length;_g.jsxs("div",{className:"card p-6",children:[t&&g.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:t}),g.jsx($0,{width:"100%",height:300,children:g.jsxs(Xie,{data:e,children:[g.jsx(dx,{strokeDasharray:"3 3",className:"stroke-gray-300 dark:stroke-gray-600"}),g.jsx(Es,{dataKey:"name",className:"text-gray-600 dark:text-gray-400",tick:{fontSize:12}}),g.jsx($s,{className:"text-gray-600 dark:text-gray-400",tick:{fontSize:12}}),g.jsx(xr,{contentStyle:{backgroundColor:"var(--tooltip-bg)",border:"none",borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"},labelStyle:{color:"var(--tooltip-text)"}}),g.jsx(La,{dataKey:"value",fill:r,radius:[4,4,0,0]})]})})]}),$$=({data:e,title:t,color:r="#10b981"})=>g.jsxs("div",{className:"card p-6",children:[t&&g.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:t}),g.jsx($0,{width:"100%",height:300,children:g.jsxs(Gie,{data:e,children:[g.jsx(dx,{strokeDasharray:"3 3",className:"stroke-gray-300 dark:stroke-gray-600"}),g.jsx(Es,{dataKey:"name",className:"text-gray-600 dark:text-gray-400",tick:{fontSize:12}}),g.jsx($s,{className:"text-gray-600 dark:text-gray-400",tick:{fontSize:12}}),g.jsx(xr,{contentStyle:{backgroundColor:"var(--tooltip-bg)",border:"none",borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"},labelStyle:{color:"var(--tooltip-text)"}}),g.jsx(Hu,{type:"monotone",dataKey:"value",stroke:r,strokeWidth:3,dot:{r:6}})]})})]}),Qie=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],Zie=({data:e,title:t,colors:r=Qie})=>g.jsxs("div",{className:"card p-6",children:[t&&g.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:t}),g.jsx($0,{width:"100%",height:300,children:g.jsxs(Yie,{children:[g.jsx(Qn,{data:e,cx:"50%",cy:"50%",labelLine:!1,label:({name:n,percent:i})=>`${n} ${(i*100).toFixed(0)}%`,outerRadius:80,fill:"#8884d8",dataKey:"value",children:e.map((n,i)=>g.jsx(kh,{fill:r[i%r.length]},`cell-${i}`))}),g.jsx(xr,{contentStyle:{backgroundColor:"var(--tooltip-bg)",border:"none",borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"},labelStyle:{color:"var(--tooltip-text)"}})]})})]}),Jh=({columns:e,data:t,loading:r=!1})=>{const[n,i]=j.useState(""),[a,o]=j.useState("asc"),s=u=>{n===u?o(a==="asc"?"desc":"asc"):(i(u),o("asc"))},l=[...t].sort((u,f)=>{if(!n)return 0;const c=u[n],d=f[n];return cd?a==="asc"?1:-1:0});return r?g.jsxs("div",{className:"animate-pulse",children:[g.jsx("div",{className:"hidden md:block",children:g.jsxs("div",{className:"card overflow-hidden",children:[g.jsx("div",{className:"bg-gray-50 dark:bg-gray-700 px-6 py-3",children:g.jsx("div",{className:"flex space-x-4",children:e.map((u,f)=>g.jsx("div",{className:"h-4 bg-gray-300 dark:bg-gray-600 rounded flex-1"},f))})}),[...Array(5)].map((u,f)=>g.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:g.jsx("div",{className:"flex space-x-4",children:e.map((c,d)=>g.jsx("div",{className:"h-4 bg-gray-300 dark:bg-gray-600 rounded flex-1"},d))})},f))]})}),g.jsx("div",{className:"md:hidden space-y-4",children:[...Array(3)].map((u,f)=>g.jsx("div",{className:"card p-4 space-y-3",children:e.map((c,d)=>g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"h-3 bg-gray-300 dark:bg-gray-600 rounded w-1/3"}),g.jsx("div",{className:"h-4 bg-gray-300 dark:bg-gray-600 rounded w-2/3"})]},d))},f))})]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"hidden md:block card overflow-hidden",children:g.jsxs("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",children:[g.jsx("thead",{className:"bg-gray-50 dark:bg-gray-700",children:g.jsx("tr",{children:e.map(u=>g.jsx("th",{className:ue("px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider",u.sortable&&"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-600"),onClick:()=>u.sortable&&s(u.key),children:g.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[g.jsx("span",{children:u.label}),u.sortable&&g.jsxs("div",{className:"flex flex-col",children:[g.jsx(qI,{className:ue("h-3 w-3",n===u.key&&a==="asc"?"text-primary-600":"text-gray-400")}),g.jsx(yk,{className:ue("h-3 w-3 -mt-1",n===u.key&&a==="desc"?"text-primary-600":"text-gray-400")})]})]})},u.key))})}),g.jsx("tbody",{className:"bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700",children:l.map((u,f)=>g.jsx("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-700",children:e.map(c=>g.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-gray-100 text-right",children:c.render?c.render(u[c.key],u):u[c.key]},c.key))},f))})]})}),g.jsx("div",{className:"md:hidden space-y-4",children:l.map((u,f)=>g.jsx("div",{className:"card p-4 space-y-3",children:e.map(c=>g.jsxs("div",{className:"flex justify-between items-start",children:[g.jsxs("span",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:[c.label,":"]}),g.jsx("span",{className:"text-sm text-gray-900 dark:text-gray-100 text-right",children:c.render?c.render(u[c.key],u):u[c.key]})]},c.key))},f))})]})},Ni=({permission:e,children:t,fallback:r=null})=>{const{hasPermission:n}=Nu();return n(e)?t:r},Jie=[{title:"کل کاربران",value:1247,change:12,icon:Gg,color:"blue"},{title:"فروش ماهانه",value:"۲۴,۵۶۷,۰۰۰",change:8.5,icon:mk,color:"green"},{title:"کل سفارشات",value:356,change:-2.3,icon:Kg,color:"yellow"},{title:"رشد فروش",value:"۲۳.۵%",change:15.2,icon:Wl,color:"purple"}],O_=[{name:"فروردین",value:4e3},{name:"اردیبهشت",value:3e3},{name:"خرداد",value:5e3},{name:"تیر",value:4500},{name:"مرداد",value:6e3},{name:"شهریور",value:5500}],eae=[{name:"دسکتاپ",value:45},{name:"موبایل",value:35},{name:"تبلت",value:20}],tae=[{id:1,name:"علی احمدی",email:"ali@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۵"},{id:2,name:"فاطمه حسینی",email:"fateme@example.com",role:"مدیر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۴"},{id:3,name:"محمد رضایی",email:"mohammad@example.com",role:"کاربر",status:"غیرفعال",createdAt:"۱۴۰۲/۰۸/۱۳"},{id:4,name:"زهرا کریمی",email:"zahra@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۲"}],rae=[{key:"name",label:"نام",sortable:!0},{key:"email",label:"ایمیل"},{key:"role",label:"نقش"},{key:"status",label:"وضعیت",render:e=>g.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${e==="فعال"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}`,children:e})},{key:"createdAt",label:"تاریخ عضویت"},{key:"actions",label:"عملیات",render:()=>g.jsxs("div",{className:"flex space-x-2",children:[g.jsx(je,{size:"sm",variant:"secondary",children:"ویرایش"}),g.jsx(Ni,{permission:22,children:g.jsx(je,{size:"sm",variant:"danger",children:"حذف"})})]})}],nae=()=>g.jsxs("div",{className:"p-6 space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"داشبورد"}),g.jsxs("div",{className:"flex space-x-4",children:[g.jsx(je,{variant:"secondary",children:"گزارش‌گیری"}),g.jsx(Ni,{permission:25,children:g.jsx(je,{children:"اضافه کردن"})})]})]}),g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:Jie.map((e,t)=>g.jsx(kR,{...e},t))}),g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[g.jsx(E$,{data:O_,title:"فروش ماهانه",color:"#3b82f6"}),g.jsx($$,{data:O_,title:"روند رشد",color:"#10b981"})]}),g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[g.jsx("div",{className:"lg:col-span-2",children:g.jsxs("div",{className:"card p-6",children:[g.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"کاربران اخیر"}),g.jsx(Jh,{columns:rae,data:tae})]})}),g.jsx("div",{children:g.jsx(Zie,{data:eae,title:"دستگاه‌های کاربری",colors:["#3b82f6","#10b981","#f59e0b"]})})]})]}),iae=({isOpen:e,onClose:t,title:r,children:n,size:i="md"})=>{if(j.useEffect(()=>{const o=s=>{s.key==="Escape"&&t()};return e&&(document.addEventListener("keydown",o),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",o),document.body.style.overflow="unset"}},[e,t]),!e)return null;const a={sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl"};return g.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:g.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[g.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:t}),g.jsxs("div",{className:` - relative bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full - ${a[i]} transform transition-all - `,children:[r&&g.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700",children:[g.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:r}),g.jsx("button",{onClick:t,className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:g.jsx(Xg,{className:"h-5 w-5 text-gray-500 dark:text-gray-400"})})]}),g.jsx("div",{className:"p-6",children:n})]})]})})},ep=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:n,totalItems:i})=>{const a=(e-1)*n+1,o=Math.min(e*n,i),s=()=>{const l=[];if(t<=5)for(let f=1;f<=t;f++)l.push(f);else{const f=Math.max(1,e-2),c=Math.min(t,f+5-1);for(let d=f;d<=c;d++)l.push(d);f>1&&(l.unshift("..."),l.unshift(1)),cr(e-1),disabled:e===1,children:"قبلی"}),g.jsx(je,{variant:"secondary",size:"sm",onClick:()=>r(e+1),disabled:e===t,children:"بعدی"})]}),g.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[g.jsx("div",{children:g.jsxs("p",{className:"text-sm text-gray-700 dark:text-gray-300",children:["نمایش ",g.jsx("span",{className:"font-medium",children:a})," تا"," ",g.jsx("span",{className:"font-medium",children:o})," از"," ",g.jsx("span",{className:"font-medium",children:i})," نتیجه"]})}),g.jsx("div",{children:g.jsxs("nav",{className:"relative z-0 inline-flex rounded-md shadow-sm -space-x-px",children:[g.jsx("button",{onClick:()=>r(e-1),disabled:e===1,className:"relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-sm font-medium text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:g.jsx(HI,{className:"h-5 w-5"})}),s().map((l,u)=>g.jsx("button",{onClick:()=>typeof l=="number"&&r(l),disabled:l==="...",className:`relative inline-flex items-center px-4 py-2 border text-sm font-medium ${l===e?"z-10 bg-primary-50 dark:bg-primary-900 border-primary-500 text-primary-600 dark:text-primary-400":l==="..."?"border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 cursor-default":"border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-600"}`,children:l},u)),g.jsx("button",{onClick:()=>r(e+1),disabled:e===t,className:"relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-sm font-medium text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:g.jsx(WI,{className:"h-5 w-5"})})]})})]})]})},aae=({initialData:e,onSubmit:t,onCancel:r,loading:n=!1,isEdit:i=!1})=>{var u,f,c,d;const{register:a,handleSubmit:o,formState:{errors:s,isValid:l}}=$k({resolver:Ck(PR),mode:"onChange",defaultValues:e});return g.jsxs("div",{className:"card p-6",children:[g.jsxs("div",{className:"mb-6",children:[g.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-gray-100",children:i?"ویرایش کاربر":"افزودن کاربر جدید"}),g.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"اطلاعات کاربر را وارد کنید"})]}),g.jsxs("form",{onSubmit:o(t),className:"space-y-6",children:[g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[g.jsx(io,{label:"نام و نام خانوادگی",placeholder:"علی احمدی",icon:xk,error:(u=s.name)==null?void 0:u.message,...a("name")}),g.jsx(io,{label:"ایمیل",type:"email",placeholder:"ali@example.com",icon:gk,error:(f=s.email)==null?void 0:f.message,...a("email")}),g.jsx(io,{label:"شماره تلفن",type:"tel",placeholder:"09123456789",icon:tD,error:(c=s.phone)==null?void 0:c.message,...a("phone")}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"نقش"}),g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:g.jsx(aD,{className:"h-5 w-5 text-gray-400"})}),g.jsxs("select",{className:`input pr-10 ${s.role?"border-red-500 dark:border-red-500 focus:ring-red-500":""}`,...a("role"),children:[g.jsx("option",{value:"",children:"انتخاب کنید"}),g.jsx("option",{value:"کاربر",children:"کاربر"}),g.jsx("option",{value:"مدیر",children:"مدیر"}),g.jsx("option",{value:"ادمین",children:"ادمین"})]})]}),s.role&&g.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:s.role.message})]})]}),!i&&g.jsx(io,{label:"رمز عبور",type:"password",placeholder:"حداقل ۶ کاراکتر",error:(d=s.password)==null?void 0:d.message,...a("password")}),g.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 border-t border-gray-200 dark:border-gray-700",children:[g.jsx(je,{type:"button",variant:"secondary",onClick:r,disabled:n,children:"انصراف"}),g.jsx(je,{type:"submit",loading:n,disabled:!l,children:i?"ویرایش":"افزودن"})]})]})]})},oae=[{id:1,name:"علی احمدی",email:"ali@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۵",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:2,name:"فاطمه حسینی",email:"fateme@example.com",role:"مدیر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۴",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:3,name:"محمد رضایی",email:"mohammad@example.com",role:"کاربر",status:"غیرفعال",createdAt:"۱۴۰۲/۰۸/۱۳",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:4,name:"زهرا کریمی",email:"zahra@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۲",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:5,name:"حسن نوری",email:"hassan@example.com",role:"مدیر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۱",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:6,name:"مریم صادقی",email:"maryam@example.com",role:"کاربر",status:"غیرفعال",createdAt:"۱۴۰۲/۰۸/۱۰",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:7,name:"احمد قاسمی",email:"ahmad@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۰۹",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:8,name:"سارا محمدی",email:"sara@example.com",role:"مدیر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۰۸",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:9,name:"رضا کریمی",email:"reza@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۰۷",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:10,name:"نرگس احمدی",email:"narges@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۰۶",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:11,name:"امیر حسینی",email:"amir@example.com",role:"مدیر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۰۵",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:12,name:"مینا رضایی",email:"mina@example.com",role:"کاربر",status:"غیرفعال",createdAt:"۱۴۰۲/۰۸/۰۴",phone:"۰۹۱۲۳۴۵۶۷۸۹"}],sae=()=>{const[e,t]=j.useState(""),[r,n]=j.useState(!1),[i,a]=j.useState(null),[o,s]=j.useState(1),l=5,u=[{key:"name",label:"نام",sortable:!0},{key:"email",label:"ایمیل",sortable:!0},{key:"phone",label:"تلفن"},{key:"role",label:"نقش"},{key:"status",label:"وضعیت",render:v=>g.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${v==="فعال"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}`,children:v})},{key:"createdAt",label:"تاریخ عضویت",sortable:!0},{key:"actions",label:"عملیات",render:(v,O)=>g.jsxs("div",{className:"flex space-x-2",children:[g.jsx(je,{size:"sm",variant:"secondary",onClick:()=>p(O),children:"ویرایش"}),g.jsx(Ni,{permission:22,children:g.jsx(je,{size:"sm",variant:"danger",onClick:()=>b(O.id),children:"حذف"})})]})}],f=oae.filter(v=>v.name.toLowerCase().includes(e.toLowerCase())||v.email.toLowerCase().includes(e.toLowerCase())),c=Math.ceil(f.length/l),d=(o-1)*l,h=f.slice(d,d+l),y=()=>{a(null),n(!0)},p=v=>{a(v),n(!0)},b=v=>{confirm("آیا از حذف این کاربر اطمینان دارید؟")&&console.log("Deleting user:",v)},x=v=>{console.log("User data:",v),n(!1)},m=()=>{n(!1),a(null)};return g.jsxs("div",{className:"p-6 space-y-6",children:[g.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"مدیریت کاربران"}),g.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:[f.length," کاربر یافت شد"]})]}),g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsxs(je,{variant:"secondary",children:[g.jsx(Hg,{className:"h-4 w-4 ml-2"}),"فیلتر"]}),g.jsx(Ni,{permission:25,children:g.jsxs(je,{onClick:y,children:[g.jsx(qg,{className:"h-4 w-4 ml-2"}),"افزودن کاربر"]})})]})]}),g.jsxs("div",{className:"card p-6",children:[g.jsx("div",{className:"mb-6",children:g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:g.jsx(Jd,{className:"h-5 w-5 text-gray-400"})}),g.jsx("input",{type:"text",placeholder:"جستجو در کاربران...",value:e,onChange:v=>t(v.target.value),className:"input pr-10 max-w-md"})]})}),g.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg overflow-hidden",children:[g.jsx(Jh,{columns:u,data:h,loading:!1}),g.jsx(ep,{currentPage:o,totalPages:c,onPageChange:s,itemsPerPage:l,totalItems:f.length})]})]}),g.jsx(iae,{isOpen:r,onClose:m,size:"lg",children:g.jsx(aae,{initialData:i,onSubmit:x,onCancel:m,loading:!1,isEdit:!!i})})]})},$c=[{id:1,name:"لپ‌تاپ ایسوس",category:"کامپیوتر",price:"۲۵,۰۰۰,۰۰۰",stock:15,status:"موجود",createdAt:"۱۴۰۲/۰۸/۱۵"},{id:2,name:"گوشی سامسونگ گلکسی",category:"موبایل",price:"۱۸,۰۰۰,۰۰۰",stock:8,status:"موجود",createdAt:"۱۴۰۲/۰۸/۱۴"},{id:3,name:"هدفون بی‌سیم",category:"لوازم جانبی",price:"۲,۵۰۰,۰۰۰",stock:0,status:"ناموجود",createdAt:"۱۴۰۲/۰۸/۱۳"},{id:4,name:"کیبورد گیمینگ",category:"لوازم جانبی",price:"۳,۲۰۰,۰۰۰",stock:25,status:"موجود",createdAt:"۱۴۰۲/۰۸/۱۲"},{id:5,name:"مانیتور ۲۴ اینچ",category:"نمایشگر",price:"۱۲,۰۰۰,۰۰۰",stock:5,status:"کم موجود",createdAt:"۱۴۰۲/۰۸/۱۱"},{id:6,name:"ماوس بی‌سیم",category:"لوازم جانبی",price:"۱,۸۰۰,۰۰۰",stock:30,status:"موجود",createdAt:"۱۴۰۲/۰۸/۱۰"},{id:7,name:"تبلت آیپد",category:"تبلت",price:"۳۵,۰۰۰,۰۰۰",stock:3,status:"کم موجود",createdAt:"۱۴۰۲/۰۸/۰۹"},{id:8,name:"هارد اکسترنال",category:"ذخیره‌سازی",price:"۴,۵۰۰,۰۰۰",stock:12,status:"موجود",createdAt:"۱۴۰۲/۰۸/۰۸"}],lae=()=>{const[e,t]=j.useState(""),[r,n]=j.useState(1),i=6,a=[{key:"name",label:"نام محصول",sortable:!0},{key:"category",label:"دسته‌بندی",sortable:!0},{key:"price",label:"قیمت",sortable:!0},{key:"stock",label:"موجودی",render:h=>g.jsx("span",{className:`font-medium ${h===0?"text-red-600 dark:text-red-400":h<10?"text-yellow-600 dark:text-yellow-400":"text-green-600 dark:text-green-400"}`,children:h})},{key:"status",label:"وضعیت",render:h=>g.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${h==="موجود"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":h==="کم موجود"?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}`,children:h})},{key:"createdAt",label:"تاریخ افزودن",sortable:!0},{key:"actions",label:"عملیات",render:(h,y)=>g.jsxs("div",{className:"flex space-x-2",children:[g.jsx(je,{size:"sm",variant:"secondary",onClick:()=>c(y),children:"ویرایش"}),g.jsx(Ni,{permission:22,children:g.jsx(je,{size:"sm",variant:"danger",onClick:()=>d(y.id),children:"حذف"})})]})}],o=$c.filter(h=>h.name.toLowerCase().includes(e.toLowerCase())||h.category.toLowerCase().includes(e.toLowerCase())),s=Math.ceil(o.length/i),l=(r-1)*i,u=o.slice(l,l+i),f=()=>{console.log("Adding new product")},c=h=>{console.log("Editing product:",h)},d=h=>{confirm("آیا از حذف این محصول اطمینان دارید؟")&&console.log("Deleting product:",h)};return g.jsxs("div",{className:"p-6 space-y-6",children:[g.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"مدیریت محصولات"}),g.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:[o.length," محصول یافت شد"]})]}),g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsxs(je,{variant:"secondary",children:[g.jsx(Hg,{className:"h-4 w-4 ml-2"}),"فیلتر"]}),g.jsx(Ni,{permission:25,children:g.jsxs(je,{onClick:f,children:[g.jsx(qg,{className:"h-4 w-4 ml-2"}),"افزودن محصول"]})})]})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(Mp,{className:"h-8 w-8 text-blue-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل محصولات"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:$c.length})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(Mp,{className:"h-8 w-8 text-green-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"محصولات موجود"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:$c.filter(h=>h.status==="موجود").length})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(Mp,{className:"h-8 w-8 text-red-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"محصولات ناموجود"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:$c.filter(h=>h.status==="ناموجود").length})]})]})})]}),g.jsxs("div",{className:"card p-6",children:[g.jsx("div",{className:"mb-6",children:g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:g.jsx(Jd,{className:"h-5 w-5 text-gray-400"})}),g.jsx("input",{type:"text",placeholder:"جستجو در محصولات...",value:e,onChange:h=>t(h.target.value),className:"input pr-10 max-w-md"})]})}),g.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg overflow-hidden",children:[g.jsx(Jh,{columns:a,data:u,loading:!1}),g.jsx(ep,{currentPage:r,totalPages:s,onPageChange:n,itemsPerPage:i,totalItems:o.length})]})]})]})},Qs=[{id:1001,customer:"علی احمدی",products:"۳ محصول",amount:"۴۵,۰۰۰,۰۰۰",status:"تحویل شده",date:"۱۴۰۲/۰۸/۱۵"},{id:1002,customer:"فاطمه حسینی",products:"۱ محصول",amount:"۲۵,۰۰۰,۰۰۰",status:"در حال پردازش",date:"۱۴۰۲/۰۸/۱۴"},{id:1003,customer:"محمد رضایی",products:"۲ محصول",amount:"۳۲,۰۰۰,۰۰۰",status:"ارسال شده",date:"۱۴۰۲/۰۸/۱۳"},{id:1004,customer:"زهرا کریمی",products:"۵ محصول",amount:"۱۲۰,۰۰۰,۰۰۰",status:"تحویل شده",date:"۱۴۰۲/۰۸/۱۲"},{id:1005,customer:"حسن نوری",products:"۱ محصول",amount:"۱۸,۰۰۰,۰۰۰",status:"لغو شده",date:"۱۴۰۲/۰۸/۱۱"},{id:1006,customer:"مریم صادقی",products:"۴ محصول",amount:"۸۵,۰۰۰,۰۰۰",status:"در حال پردازش",date:"۱۴۰۲/۰۸/۱۰"},{id:1007,customer:"احمد قاسمی",products:"۲ محصول",amount:"۳۸,۰۰۰,۰۰۰",status:"ارسال شده",date:"۱۴۰۲/۰۸/۰۹"},{id:1008,customer:"سارا محمدی",products:"۳ محصول",amount:"۶۲,۰۰۰,۰۰۰",status:"تحویل شده",date:"۱۴۰۲/۰۸/۰۸"},{id:1009,customer:"رضا کریمی",products:"۱ محصول",amount:"۱۵,۰۰۰,۰۰۰",status:"در حال پردازش",date:"۱۴۰۲/۰۸/۰۷"},{id:1010,customer:"نرگس احمدی",products:"۶ محصول",amount:"۱۴۵,۰۰۰,۰۰۰",status:"تحویل شده",date:"۱۴۰۲/۰۸/۰۶"}],uae=()=>{const[e,t]=j.useState(""),[r,n]=j.useState(1),i=6,a=[{key:"id",label:"شماره سفارش",sortable:!0},{key:"customer",label:"مشتری",sortable:!0},{key:"products",label:"محصولات"},{key:"amount",label:"مبلغ",render:h=>g.jsxs("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:[h," تومان"]})},{key:"status",label:"وضعیت",render:h=>g.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${h==="تحویل شده"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":h==="ارسال شده"?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":h==="در حال پردازش"?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}`,children:h})},{key:"date",label:"تاریخ سفارش",sortable:!0},{key:"actions",label:"عملیات",render:(h,y)=>g.jsxs("div",{className:"flex space-x-2",children:[g.jsx(je,{size:"sm",variant:"secondary",onClick:()=>f(y),children:"مشاهده"}),g.jsx(je,{size:"sm",variant:"primary",onClick:()=>c(y),children:"ویرایش"})]})}],o=Qs.filter(h=>h.customer.toLowerCase().includes(e.toLowerCase())||h.id.toString().includes(e)),s=Math.ceil(o.length/i),l=(r-1)*i,u=o.slice(l,l+i),f=h=>{console.log("Viewing order:",h)},c=h=>{console.log("Editing order:",h)},d=Qs.reduce((h,y)=>{const p=parseInt(y.amount.replace(/[,]/g,""));return h+p},0);return g.jsxs("div",{className:"p-6 space-y-6",children:[g.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"مدیریت سفارشات"}),g.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:[o.length," سفارش یافت شد"]})]}),g.jsx("div",{className:"flex items-center space-x-4",children:g.jsxs(je,{variant:"secondary",children:[g.jsx(Hg,{className:"h-4 w-4 ml-2"}),"فیلتر"]})})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6 mb-6",children:[g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(pm,{className:"h-8 w-8 text-blue-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل سفارشات"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:Qs.length})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(Wl,{className:"h-8 w-8 text-green-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"تحویل شده"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:Qs.filter(h=>h.status==="تحویل شده").length})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(pm,{className:"h-8 w-8 text-yellow-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"در انتظار"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:Qs.filter(h=>h.status==="در حال پردازش").length})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(Wl,{className:"h-8 w-8 text-purple-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل فروش"}),g.jsxs("p",{className:"text-xl font-bold text-gray-900 dark:text-gray-100",children:[d.toLocaleString()," تومان"]})]})]})})]}),g.jsxs("div",{className:"card p-6",children:[g.jsx("div",{className:"mb-6",children:g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:g.jsx(Jd,{className:"h-5 w-5 text-gray-400"})}),g.jsx("input",{type:"text",placeholder:"جستجو در سفارشات...",value:e,onChange:h=>t(h.target.value),className:"input pr-10 max-w-md"})]})}),g.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg overflow-hidden",children:[g.jsx(Jh,{columns:a,data:u,loading:!1}),g.jsx(ep,{currentPage:r,totalPages:s,onPageChange:n,itemsPerPage:i,totalItems:o.length})]})]})]})},cae=()=>{const[e,t]=j.useState("month"),r=[{name:"فروردین",value:12e6},{name:"اردیبهشت",value:19e6},{name:"خرداد",value:15e6},{name:"تیر",value:22e6},{name:"مرداد",value:18e6},{name:"شهریور",value:25e6}],n=[{name:"فروردین",value:150},{name:"اردیبهشت",value:230},{name:"خرداد",value:180},{name:"تیر",value:280},{name:"مرداد",value:200},{name:"شهریور",value:320}],i=[{id:1,title:"گزارش فروش ماهانه",description:"گزارش کامل فروش محصولات در ماه گذشته",type:"فروش",date:"۱۴۰۲/۰۸/۳۰",format:"PDF"},{id:2,title:"گزارش کاربران جدید",description:"آمار کاربران جدید عضو شده در سیستم",type:"کاربران",date:"۱۴۰۲/۰۸/۲۹",format:"Excel"},{id:3,title:"گزارش موجودی انبار",description:"وضعیت موجودی محصولات در انبار",type:"انبار",date:"۱۴۰۲/۰۸/۲۸",format:"PDF"},{id:4,title:"گزارش درآمد روزانه",description:"جزئیات درآمد حاصل از فروش در ۳۰ روز گذشته",type:"مالی",date:"۱۴۰۲/۰۸/۲۷",format:"Excel"}],a=s=>{console.log("Downloading report:",s)},o=()=>{console.log("Generating new report")};return g.jsxs("div",{className:"p-6 space-y-6",children:[g.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"گزارش‌ها و آمار"}),g.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"مشاهده و دانلود گزارش‌های مختلف سیستم"})]}),g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsxs("select",{value:e,onChange:s=>t(s.target.value),className:"input max-w-xs",children:[g.jsx("option",{value:"week",children:"هفته گذشته"}),g.jsx("option",{value:"month",children:"ماه گذشته"}),g.jsx("option",{value:"quarter",children:"سه ماه گذشته"}),g.jsx("option",{value:"year",children:"سال گذشته"})]}),g.jsxs(je,{onClick:o,children:[g.jsx(hm,{className:"h-4 w-4 ml-2"}),"تولید گزارش جدید"]})]})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[g.jsx("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"p-3 rounded-full bg-blue-100 dark:bg-blue-900",children:g.jsx(mk,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"})}),g.jsxs("div",{className:"mr-4",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل فروش"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"۱۱۱ میلیون"}),g.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"+۱۲% از ماه قبل"})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"p-3 rounded-full bg-green-100 dark:bg-green-900",children:g.jsx(Gg,{className:"h-6 w-6 text-green-600 dark:text-green-400"})}),g.jsxs("div",{className:"mr-4",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کاربران جدید"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"۳۲۰"}),g.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"+۸% از ماه قبل"})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"p-3 rounded-full bg-purple-100 dark:bg-purple-900",children:g.jsx(Kg,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),g.jsxs("div",{className:"mr-4",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل سفارشات"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"۱,۲۵۴"}),g.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"+۱۵% از ماه قبل"})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"p-3 rounded-full bg-yellow-100 dark:bg-yellow-900",children:g.jsx(Wl,{className:"h-6 w-6 text-yellow-600 dark:text-yellow-400"})}),g.jsxs("div",{className:"mr-4",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"نرخ رشد"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"+۲۳%"}),g.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"بهبود یافته"})]})]})})]}),g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[g.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:[g.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"روند فروش"}),g.jsx(E$,{data:r})]}),g.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:[g.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"رشد کاربران"}),g.jsx($$,{data:n})]})]}),g.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow",children:[g.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:g.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:"گزارش‌های اخیر"})}),g.jsx("div",{className:"p-6",children:g.jsx("div",{className:"space-y-4",children:i.map(s=>g.jsxs("div",{className:"flex items-center justify-between p-4 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"p-2 bg-blue-100 dark:bg-blue-900 rounded-lg ml-4",children:g.jsx(hm,{className:"h-5 w-5 text-blue-600 dark:text-blue-400"})}),g.jsxs("div",{children:[g.jsx("h4",{className:"font-medium text-gray-900 dark:text-gray-100",children:s.title}),g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description}),g.jsxs("div",{className:"flex items-center mt-1 space-x-4",children:[g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["نوع: ",s.type]}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["تاریخ: ",s.date]}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["فرمت: ",s.format]})]})]})]}),g.jsxs(je,{size:"sm",variant:"secondary",onClick:()=>a(s.id),children:[g.jsx(KI,{className:"h-4 w-4 ml-2"}),"دانلود"]})]},s.id))})})]})]})},fae=[{id:1,title:"سفارش جدید دریافت شد",message:"سفارش شماره ۱۰۰۱ از طرف علی احمدی ثبت شد",type:"order",priority:"high",isRead:!1,date:"۱۴۰۲/۰۸/۱۵ - ۱۴:۳۰",sender:"سیستم فروش"},{id:2,title:"محصول در حال اتمام",message:"موجودی لپ‌تاپ ایسوس به کمتر از ۵ عدد رسیده است",type:"warning",priority:"medium",isRead:!1,date:"۱۴۰۲/۰۸/۱۵ - ۱۲:۱۵",sender:"سیستم انبار"},{id:3,title:"کاربر جدید عضو شد",message:"فاطمه حسینی با موفقیت در سیستم ثبت نام کرد",type:"info",priority:"low",isRead:!0,date:"۱۴۰۲/۰۸/۱۴ - ۱۶:۴۵",sender:"سیستم کاربری"},{id:4,title:"پرداخت انجام شد",message:"پرداخت سفارش ۱۰۰۲ با موفقیت تایید شد",type:"success",priority:"medium",isRead:!0,date:"۱۴۰۲/۰۸/۱۴ - ۱۰:۲۰",sender:"سیستم پرداخت"},{id:5,title:"خطا در سیستم",message:"خطا در اتصال به درگاه پرداخت - نیاز به بررسی فوری",type:"error",priority:"high",isRead:!1,date:"۱۴۰۲/۰۸/۱۴ - ۰۹:۱۰",sender:"سیستم مانیتورینگ"},{id:6,title:"بک‌آپ تکمیل شد",message:"بک‌آپ روزانه اطلاعات با موفقیت انجام شد",type:"success",priority:"low",isRead:!0,date:"۱۴۰۲/۰۸/۱۳ - ۲۳:۰۰",sender:"سیستم بک‌آپ"},{id:7,title:"بروزرسانی سیستم",message:"نسخه جدید سیستم منتشر شد - بروزرسانی در دسترس است",type:"info",priority:"medium",isRead:!1,date:"۱۴۰۲/۰۸/۱۳ - ۱۱:۳۰",sender:"تیم توسعه"},{id:8,title:"گزارش فروش آماده شد",message:"گزارش فروش ماهانه تولید و آماده دانلود است",type:"info",priority:"low",isRead:!0,date:"۱۴۰۲/۰۸/۱۲ - ۰۸:۰۰",sender:"سیستم گزارش‌گیری"}],dae=()=>{const[e,t]=j.useState(fae),[r,n]=j.useState(""),[i,a]=j.useState("all"),[o,s]=j.useState(1),l=6,u=v=>{switch(v){case"error":return g.jsx(zb,{className:"h-5 w-5 text-red-600"});case"warning":return g.jsx(Np,{className:"h-5 w-5 text-yellow-600"});case"success":return g.jsx(VI,{className:"h-5 w-5 text-green-600"});case"info":return g.jsx(QI,{className:"h-5 w-5 text-blue-600"});default:return g.jsx(hl,{className:"h-5 w-5 text-gray-600"})}},f=v=>{switch(v){case"high":return"border-r-red-500";case"medium":return"border-r-yellow-500";case"low":return"border-r-green-500";default:return"border-r-gray-300"}},c=e.filter(v=>{const O=v.title.toLowerCase().includes(r.toLowerCase())||v.message.toLowerCase().includes(r.toLowerCase()),w=i==="all"||i==="unread"&&!v.isRead||i==="read"&&v.isRead||v.type===i;return O&&w}),d=Math.ceil(c.length/l),h=(o-1)*l,y=c.slice(h,h+l),p=v=>{t(O=>O.map(w=>w.id===v?{...w,isRead:!0}:w))},b=()=>{t(v=>v.map(O=>({...O,isRead:!0})))},x=v=>{t(O=>O.filter(w=>w.id!==v))},m=e.filter(v=>!v.isRead).length;return g.jsxs("div",{className:"p-6 space-y-6",children:[g.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"اعلانات"}),g.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:[m," اعلان خوانده نشده از ",e.length," اعلان"]})]}),g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsxs(je,{variant:"secondary",onClick:b,disabled:m===0,children:[g.jsx(Fb,{className:"h-4 w-4 ml-2"}),"همه را خوانده شده علامت بزن"]}),g.jsxs(je,{children:[g.jsx(qg,{className:"h-4 w-4 ml-2"}),"اعلان جدید"]})]})]}),g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(hl,{className:"h-8 w-8 text-blue-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل اعلانات"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e.length})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(Np,{className:"h-8 w-8 text-red-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"خوانده نشده"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:m})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(zb,{className:"h-8 w-8 text-red-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"خطا"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e.filter(v=>v.type==="error").length})]})]})}),g.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx(Np,{className:"h-8 w-8 text-yellow-600"}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"هشدار"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e.filter(v=>v.type==="warning").length})]})]})})]}),g.jsxs("div",{className:"card p-6",children:[g.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 mb-6",children:[g.jsxs("div",{className:"relative flex-1",children:[g.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:g.jsx(Jd,{className:"h-5 w-5 text-gray-400"})}),g.jsx("input",{type:"text",placeholder:"جستجو در اعلانات...",value:r,onChange:v=>n(v.target.value),className:"input pr-10"})]}),g.jsxs("select",{value:i,onChange:v=>a(v.target.value),className:"input min-w-[150px]",children:[g.jsx("option",{value:"all",children:"همه اعلانات"}),g.jsx("option",{value:"unread",children:"خوانده نشده"}),g.jsx("option",{value:"read",children:"خوانده شده"}),g.jsx("option",{value:"error",children:"خطا"}),g.jsx("option",{value:"warning",children:"هشدار"}),g.jsx("option",{value:"success",children:"موفق"}),g.jsx("option",{value:"info",children:"اطلاعات"})]})]}),g.jsx("div",{className:"space-y-4",children:y.map(v=>g.jsx("div",{className:`p-4 border-r-4 ${f(v.priority)} ${v.isRead?"bg-gray-50 dark:bg-gray-700":"bg-white dark:bg-gray-800"} border border-gray-200 dark:border-gray-600 rounded-lg shadow-sm hover:shadow-md transition-shadow`,children:g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{className:"flex items-start space-x-3",children:[g.jsx("div",{className:"flex-shrink-0 mt-1",children:u(v.type)}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("h3",{className:`text-sm font-medium ${v.isRead?"text-gray-600 dark:text-gray-400":"text-gray-900 dark:text-gray-100"}`,children:v.title}),!v.isRead&&g.jsx("div",{className:"w-2 h-2 bg-blue-600 rounded-full"})]}),g.jsx("p",{className:`mt-1 text-sm ${v.isRead?"text-gray-500 dark:text-gray-500":"text-gray-700 dark:text-gray-300"}`,children:v.message}),g.jsxs("div",{className:"mt-2 flex items-center text-xs text-gray-500 dark:text-gray-500 space-x-4",children:[g.jsx("span",{children:v.date}),g.jsxs("span",{children:["از: ",v.sender]})]})]})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[!v.isRead&&g.jsx(je,{size:"sm",variant:"secondary",onClick:()=>p(v.id),children:g.jsx(Fb,{className:"h-4 w-4"})}),g.jsx(je,{size:"sm",variant:"danger",onClick:()=>x(v.id),children:g.jsx(Xg,{className:"h-4 w-4"})})]})]})},v.id))}),y.length===0&&g.jsxs("div",{className:"text-center py-12",children:[g.jsx(hl,{className:"h-12 w-12 text-gray-400 mx-auto mb-4"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"هیچ اعلانی یافت نشد"})]}),g.jsx(ep,{currentPage:o,totalPages:d,onPageChange:s,itemsPerPage:l,totalItems:c.length})]})]})},hae=[{id:"dashboard",label:"داشبورد",icon:vk,path:"/"},{id:"users",label:"کاربران",icon:Gg,path:"/users",permission:10},{id:"products",label:"محصولات",icon:Kg,path:"/products",permission:15},{id:"orders",label:"سفارشات",icon:pm,path:"/orders",permission:20},{id:"reports",label:"گزارش‌ها",icon:hm,path:"/reports",permission:25},{id:"notifications",label:"اعلانات",icon:hl,path:"/notifications",permission:30}],pae=({isOpen:e,onClose:t})=>{var s;const{user:r}=Nu(),[n,i]=j.useState([]),a=l=>{i(u=>u.includes(l)?u.filter(f=>f!==l):[...u,l])},o=l=>{var d;const u=l.children&&l.children.length>0,f=n.includes(l.id),c=g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:`flex items-center justify-between px-4 py-3 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors ${u?"cursor-pointer":""}`,onClick:u?()=>a(l.id):void 0,children:[g.jsxs("div",{className:"flex items-center",children:[g.jsx(l.icon,{className:"h-5 w-5 ml-3"}),g.jsx("span",{className:"font-medium",children:l.label})]}),u&&g.jsx(yk,{className:`h-4 w-4 transition-transform ${f?"rotate-180":""}`})]}),u&&f&&g.jsx("div",{className:"mr-8 mt-1 space-y-1",children:(d=l.children)==null?void 0:d.map(h=>g.jsx("div",{children:h.permission?g.jsx(Ni,{permission:h.permission,children:g.jsx(Tp,{to:h.path,className:({isActive:y})=>`block px-4 py-2 text-sm text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors ${y?"bg-primary-100 dark:bg-primary-900 text-primary-700 dark:text-primary-300":""}`,onClick:t,children:h.label})}):g.jsx(Tp,{to:h.path,className:({isActive:y})=>`block px-4 py-2 text-sm text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors ${y?"bg-primary-100 dark:bg-primary-900 text-primary-700 dark:text-primary-300":""}`,onClick:t,children:h.label})},h.id))})]});return u?g.jsx("div",{children:c}):g.jsxs(Tp,{to:l.path,className:({isActive:h})=>`flex items-center px-4 py-3 rounded-lg transition-colors ${h?"text-primary-700 dark:text-primary-300 bg-primary-100 dark:bg-primary-900":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,onClick:t,children:[g.jsx(l.icon,{className:"h-5 w-5 ml-3"}),g.jsx("span",{className:"font-medium",children:l.label})]})};return g.jsxs(g.Fragment,{children:[e&&g.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-40 lg:hidden",onClick:t}),g.jsxs("div",{className:` - fixed top-0 right-0 h-full w-64 bg-white dark:bg-gray-800 shadow-lg z-50 transform transition-transform duration-300 ease-in-out - ${e?"translate-x-0":"translate-x-full"} - lg:relative lg:translate-x-0 - `,children:[g.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center",children:g.jsx(vk,{className:"h-5 w-5 text-white"})}),g.jsx("span",{className:"mr-3 text-xl font-bold text-gray-900 dark:text-gray-100",children:"پنل مدیریت"})]}),g.jsx("button",{onClick:t,className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 lg:hidden",children:g.jsx(Xg,{className:"h-5 w-5"})})]}),g.jsxs("div",{className:"p-4",children:[g.jsxs("div",{className:"flex items-center mb-6 p-3 bg-gray-50 dark:bg-gray-700 rounded-lg",children:[g.jsx("div",{className:"w-10 h-10 bg-primary-600 rounded-full flex items-center justify-center",children:g.jsx("span",{className:"text-white font-medium",children:((s=r==null?void 0:r.name)==null?void 0:s.charAt(0))||"A"})}),g.jsxs("div",{className:"mr-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:(r==null?void 0:r.name)||"کاربر"}),g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:(r==null?void 0:r.role)||"مدیر"})]})]}),g.jsx("nav",{className:"space-y-2",children:hae.map(l=>g.jsx("div",{children:l.permission?g.jsx(Ni,{permission:l.permission,children:o(l)}):o(l)},l.id))})]})]})]})},yae=({onMenuClick:e})=>{var s;const{user:t,logout:r}=Nu(),{mode:n,toggleTheme:i}=qM(),[a,o]=j.useState(!1);return g.jsx("header",{className:"bg-white dark:bg-gray-800 shadow-sm border-b border-gray-200 dark:border-gray-700",children:g.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[g.jsxs("div",{className:"flex items-center",children:[g.jsx("button",{onClick:e,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 lg:hidden",children:g.jsx(JI,{className:"h-5 w-5 text-gray-600 dark:text-gray-400"})}),g.jsx("h1",{className:"mr-4 text-lg font-semibold text-gray-900 dark:text-gray-100",children:"خوش آمدید"})]}),g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsx("button",{onClick:i,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:n==="dark"?g.jsx(nD,{className:"h-5 w-5 text-gray-600 dark:text-gray-400"}):g.jsx(eD,{className:"h-5 w-5 text-gray-600 dark:text-gray-400"})}),g.jsxs("button",{className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors relative",children:[g.jsx(hl,{className:"h-5 w-5 text-gray-600 dark:text-gray-400"}),g.jsx("span",{className:"absolute top-0 left-0 w-2 h-2 bg-red-500 rounded-full"})]}),g.jsxs("div",{className:"relative",children:[g.jsxs("button",{onClick:()=>o(!a),className:"flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:[g.jsx("div",{className:"w-8 h-8 bg-primary-600 rounded-full flex items-center justify-center",children:g.jsx("span",{className:"text-white text-sm font-medium",children:((s=t==null?void 0:t.name)==null?void 0:s.charAt(0))||"A"})}),g.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 hidden md:block",children:(t==null?void 0:t.name)||"کاربر"})]}),a&&g.jsx("div",{className:"absolute left-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 z-50",children:g.jsxs("div",{className:"py-1",children:[g.jsxs("div",{className:"px-4 py-2 border-b border-gray-200 dark:border-gray-700",children:[g.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:t==null?void 0:t.name}),g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t==null?void 0:t.email})]}),g.jsxs("button",{className:"w-full text-right px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center",children:[g.jsx(xk,{className:"h-4 w-4 ml-2"}),"پروفایل"]}),g.jsxs("button",{onClick:()=>{r(),o(!1)},className:"w-full text-right px-4 py-2 text-sm text-red-600 dark:text-red-400 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center",children:[g.jsx(ZI,{className:"h-4 w-4 ml-2"}),"خروج"]})]})})]})]})]})})},mae=()=>{const[e,t]=j.useState(!1);return g.jsxs("div",{className:"flex h-screen bg-gray-50 dark:bg-gray-900",children:[g.jsx(pae,{isOpen:e,onClose:()=>t(!1)}),g.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[g.jsx(yae,{onMenuClick:()=>t(!0)}),g.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-50 dark:bg-gray-900",children:g.jsx(JN,{})})]})]})},vae=({children:e})=>{const{user:t}=Nu();return t?e:g.jsx(ek,{to:"/login",replace:!0})},gae=()=>g.jsxs(tM,{children:[g.jsx(Sn,{path:"/login",element:g.jsx(AR,{})}),g.jsxs(Sn,{path:"/",element:g.jsx(vae,{children:g.jsx(mae,{})}),children:[g.jsx(Sn,{index:!0,element:g.jsx(nae,{})}),g.jsx(Sn,{path:"users",element:g.jsx(sae,{})}),g.jsx(Sn,{path:"products",element:g.jsx(lae,{})}),g.jsx(Sn,{path:"orders",element:g.jsx(uae,{})}),g.jsx(Sn,{path:"reports",element:g.jsx(cae,{})}),g.jsx(Sn,{path:"notifications",element:g.jsx(dae,{})})]})]});function xae(){return g.jsx(oD,{children:g.jsxs(BM,{client:sD,children:[g.jsx(HM,{children:g.jsx(LI,{children:g.jsx(WM,{children:g.jsx(uM,{children:g.jsx(gae,{})})})})}),g.jsx(zM,{initialIsOpen:!1})]})})}hy.createRoot(document.getElementById("root")).render(g.jsx(k.StrictMode,{children:g.jsx(xae,{})})); diff --git a/dist/assets/index-3e6ed4d8.css b/dist/assets/index-3e6ed4d8.css new file mode 100644 index 0000000..0d751cb --- /dev/null +++ b/dist/assets/index-3e6ed4d8.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{margin:0;padding:0;box-sizing:border-box}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{background-color:#f9fafb;transition:background-color .2s ease}.dark body{background-color:#111827}.card{border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.card:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.input{width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:.5rem .75rem;--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.input:focus{border-color:transparent;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.input:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-0{z-index:0}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.-ml-1{margin-left:-.25rem}.-mt-1{margin-top:-.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\/3{width:66.666667%}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[150px\]{min-width:150px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fadeIn .5s ease-in-out}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity, 1))}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-r-4{border-right-width:4px}.border-t{border-top-width:1px}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-primary-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-r-gray-300{--tw-border-opacity: 1;border-right-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-r-green-500{--tw-border-opacity: 1;border-right-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-r-red-500{--tw-border-opacity: 1;border-right-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-r-yellow-500{--tw-border-opacity: 1;border-right-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-primary-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-primary-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.stroke-gray-300{stroke:#d1d5db}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pl-10{padding-left:2.5rem}.pl-3{padding-left:.75rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-wider{letter-spacing:.05em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-primary-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-primary-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}:root{--toast-bg: #ffffff;--toast-color: #374151}[data-theme=dark]{--toast-bg: #1f2937;--toast-color: #f3f4f6}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:border:after{content:var(--tw-content);border-width:1px}.after\:border-gray-300:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.hover\:bg-primary-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-primary-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-gray-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity, 1))}.focus\:ring-green-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity, 1))}.focus\:ring-primary-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.peer:checked~.peer-checked\:bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.peer:checked~.peer-checked\:after\:translate-x-full:after{content:var(--tw-content);--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:after\:border-white:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.peer:focus~.peer-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.peer:focus~.peer-focus\:ring-blue-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity, 1))}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity, 1))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.dark\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.dark\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-900\/20:is(.dark *){background-color:#1e3a8a33}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.dark\:bg-green-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(20 83 45 / var(--tw-bg-opacity, 1))}.dark\:bg-green-900\/20:is(.dark *){background-color:#14532d33}.dark\:bg-purple-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(88 28 135 / var(--tw-bg-opacity, 1))}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:bg-red-900\/20:is(.dark *){background-color:#7f1d1d33}.dark\:bg-yellow-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(113 63 18 / var(--tw-bg-opacity, 1))}.dark\:stroke-gray-600:is(.dark *){stroke:#4b5563}.dark\:text-blue-100:is(.dark *){--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:text-green-100:is(.dark *){--tw-text-opacity: 1;color:rgb(220 252 231 / var(--tw-text-opacity, 1))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.peer:focus~.dark\:peer-focus\:ring-blue-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 64 175 / var(--tw-ring-opacity, 1))}@media (min-width: 640px){.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:flex-1{flex:1 1 0%}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 768px){.md\:block{display:block}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:relative{position:relative}.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:hidden{display:none}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}} diff --git a/dist/assets/index-53835730.css b/dist/assets/index-53835730.css deleted file mode 100644 index 25534fd..0000000 --- a/dist/assets/index-53835730.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{margin:0;padding:0;box-sizing:border-box}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{background-color:#f9fafb;transition:background-color .2s ease}.dark body{background-color:#111827}.card{border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.card:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.input{width:100%;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:.5rem .75rem;--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.input:focus{border-color:transparent;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.input:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-0{z-index:0}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.-ml-1{margin-left:-.25rem}.-mt-1{margin-top:-.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\/3{width:66.666667%}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[150px\]{min-width:150px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fadeIn .5s ease-in-out}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity, 1))}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-r-4{border-right-width:4px}.border-t{border-top-width:1px}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-primary-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-r-gray-300{--tw-border-opacity: 1;border-right-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-r-green-500{--tw-border-opacity: 1;border-right-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-r-red-500{--tw-border-opacity: 1;border-right-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-r-yellow-500{--tw-border-opacity: 1;border-right-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-primary-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-primary-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-opacity-50{--tw-bg-opacity: .5}.stroke-gray-300{stroke:#d1d5db}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-3{padding-left:.75rem}.pr-10{padding-right:2.5rem}.pr-3{padding-right:.75rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-wider{letter-spacing:.05em}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-primary-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-primary-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}:root{--toast-bg: #ffffff;--toast-color: #374151}[data-theme=dark]{--toast-bg: #1f2937;--toast-color: #f3f4f6}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:border:after{content:var(--tw-content);border-width:1px}.after\:border-gray-300:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.hover\:bg-primary-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-gray-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity, 1))}.focus\:ring-green-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity, 1))}.focus\:ring-primary-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.peer:checked~.peer-checked\:bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.peer:checked~.peer-checked\:after\:translate-x-full:after{content:var(--tw-content);--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:after\:border-white:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.peer:focus~.peer-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.peer:focus~.peer-focus\:ring-blue-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity, 1))}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity, 1))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:border-green-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.dark\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.dark\:border-red-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-900\/20:is(.dark *){background-color:#1e3a8a33}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.dark\:bg-green-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(20 83 45 / var(--tw-bg-opacity, 1))}.dark\:bg-green-900\/20:is(.dark *){background-color:#14532d33}.dark\:bg-purple-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(88 28 135 / var(--tw-bg-opacity, 1))}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.dark\:bg-red-900\/20:is(.dark *){background-color:#7f1d1d33}.dark\:bg-yellow-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(113 63 18 / var(--tw-bg-opacity, 1))}.dark\:stroke-gray-600:is(.dark *){stroke:#4b5563}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-yellow-200:is(.dark *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.peer:focus~.dark\:peer-focus\:ring-blue-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 64 175 / var(--tw-ring-opacity, 1))}@media (min-width: 640px){.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:flex-1{flex:1 1 0%}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 768px){.md\:block{display:block}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:relative{position:relative}.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:hidden{display:none}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}} diff --git a/dist/assets/index-f7f2c4d5.js b/dist/assets/index-f7f2c4d5.js new file mode 100644 index 0000000..11eb327 --- /dev/null +++ b/dist/assets/index-f7f2c4d5.js @@ -0,0 +1,330 @@ +var IC=Object.defineProperty;var RC=(e,t,r)=>t in e?IC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Jc=(e,t,r)=>(RC(e,typeof t!="symbol"?t+"":t,r),r),Tm=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var T=(e,t,r)=>(Tm(e,t,"read from private field"),r?r.call(e):t.get(e)),ae=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},te=(e,t,r,n)=>(Tm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var ef=(e,t,r,n)=>({set _(i){te(e,t,i,r)},get _(){return T(e,t,n)}}),ge=(e,t,r)=>(Tm(e,t,"access private method"),r);function DC(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 tf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nk={exports:{}},Qh={},ik={exports:{}},xe={};/** + * @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 Nc=Symbol.for("react.element"),LC=Symbol.for("react.portal"),FC=Symbol.for("react.fragment"),BC=Symbol.for("react.strict_mode"),zC=Symbol.for("react.profiler"),UC=Symbol.for("react.provider"),VC=Symbol.for("react.context"),WC=Symbol.for("react.forward_ref"),qC=Symbol.for("react.suspense"),HC=Symbol.for("react.memo"),KC=Symbol.for("react.lazy"),O1=Symbol.iterator;function GC(e){return e===null||typeof e!="object"?null:(e=O1&&e[O1]||e["@@iterator"],typeof e=="function"?e:null)}var ak={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ok=Object.assign,sk={};function Ys(e,t,r){this.props=e,this.context=t,this.refs=sk,this.updater=r||ak}Ys.prototype.isReactComponent={};Ys.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")};Ys.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lk(){}lk.prototype=Ys.prototype;function z0(e,t,r){this.props=e,this.context=t,this.refs=sk,this.updater=r||ak}var U0=z0.prototype=new lk;U0.constructor=z0;ok(U0,Ys.prototype);U0.isPureReactComponent=!0;var _1=Array.isArray,uk=Object.prototype.hasOwnProperty,V0={current:null},ck={key:!0,ref:!0,__self:!0,__source:!0};function fk(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)uk.call(t,n)&&!ck.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,G=R[Z];if(0>>1;Zi(Ce,H))Kei(At,Ce)?(R[Z]=At,R[Ke]=H,Z=Ke):(R[Z]=Ce,R[we]=H,Z=we);else if(Kei(At,H))R[Z]=At,R[Ke]=H,Z=Ke;else break e}}return z}function i(R,z){var H=R.sortIndex-z.sortIndex;return H!==0?H:R.id-z.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,m=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,v=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(R){for(var z=r(u);z!==null;){if(z.callback===null)n(u);else if(z.startTime<=R)n(u),z.sortIndex=z.expirationTime,t(l,z);else break;z=r(u)}}function O(R){if(y=!1,x(R),!m)if(r(l)!==null)m=!0,B(w);else{var z=r(u);z!==null&&W(O,z.startTime-R)}}function w(R,z){m=!1,y&&(y=!1,b(E),E=-1),h=!0;var H=d;try{for(x(z),c=r(l);c!==null&&(!(c.expirationTime>z)||R&&!A());){var Z=c.callback;if(typeof Z=="function"){c.callback=null,d=c.priorityLevel;var G=Z(c.expirationTime<=z);z=e.unstable_now(),typeof G=="function"?c.callback=G:c===r(l)&&n(l),x(z)}else n(l);c=r(l)}if(c!==null)var oe=!0;else{var we=r(u);we!==null&&W(O,we.startTime-z),oe=!1}return oe}finally{c=null,d=H,h=!1}}var S=!1,_=null,E=-1,j=5,N=-1;function A(){return!(e.unstable_now()-NR||125Z?(R.sortIndex=H,t(u,R),r(l)===null&&R===r(u)&&(y?(b(E),E=-1):y=!0,W(O,H-Z))):(R.sortIndex=G,t(l,R),m||h||(m=!0,B(w))),R},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(R){var z=d;return function(){var H=d;d=z;try{return R.apply(this,arguments)}finally{d=H}}}})(yk);mk.exports=yk;var oM=mk.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 sM=k,_r=oM;function K(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"),Wy=Object.prototype.hasOwnProperty,lM=/^[: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]*$/,j1={},k1={};function uM(e){return Wy.call(k1,e)?!0:Wy.call(j1,e)?!1:lM.test(e)?k1[e]=!0:(j1[e]=!0,!1)}function cM(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 fM(e,t,r,n){if(t===null||typeof t>"u"||cM(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 Pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pt[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];Pt[t]=new Zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pt[e]=new Zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pt[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){Pt[e]=new Zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pt[e]=new Zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pt[e]=new Zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pt[e]=new Zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pt[e]=new Zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var q0=/[\-:]([a-z])/g;function H0(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(q0,H0);Pt[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(q0,H0);Pt[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(q0,H0);Pt[t]=new Zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pt[e]=new Zt(e,1,!1,e.toLowerCase(),null,!1,!1)});Pt.xlinkHref=new Zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pt[e]=new Zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function K0(e,t,r,n){var i=Pt.hasOwnProperty(t)?Pt[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{Cm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ql(e):""}function dM(e){switch(e.tag){case 5:return ql(e.type);case 16:return ql("Lazy");case 13:return ql("Suspense");case 19:return ql("SuspenseList");case 0:case 2:case 15:return e=Mm(e.type,!1),e;case 11:return e=Mm(e.type.render,!1),e;case 1:return e=Mm(e.type,!0),e;default:return""}}function Gy(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 Po:return"Fragment";case ko:return"Portal";case qy:return"Profiler";case G0:return"StrictMode";case Hy:return"Suspense";case Ky:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xk:return(e.displayName||"Context")+".Consumer";case gk:return(e._context.displayName||"Context")+".Provider";case X0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q0:return t=e.displayName||null,t!==null?t:Gy(e.type)||"Memo";case bi:t=e._payload,e=e._init;try{return Gy(e(t))}catch{}}return null}function hM(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 Gy(t);case 8:return t===G0?"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 ea(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pM(e){var t=wk(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 af(e){e._valueTracker||(e._valueTracker=pM(e))}function Sk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=wk(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function sd(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 Xy(e,t){var r=t.checked;return Ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function A1(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ea(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 Ok(e,t){t=t.checked,t!=null&&K0(e,"checked",t,!1)}function Qy(e,t){Ok(e,t);var r=ea(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")?Yy(e,t.type,r):t.hasOwnProperty("defaultValue")&&Yy(e,t.type,ea(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function T1(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 Yy(e,t,r){(t!=="number"||sd(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Hl=Array.isArray;function qo(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=of.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Yl={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},mM=["Webkit","ms","Moz","O"];Object.keys(Yl).forEach(function(e){mM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yl[t]=Yl[e]})});function kk(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Yl.hasOwnProperty(e)&&Yl[e]?(""+t).trim():t+"px"}function Pk(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=kk(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var yM=Ye({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 ev(e,t){if(t){if(yM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function tv(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 rv=null;function Y0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nv=null,Ho=null,Ko=null;function C1(e){if(e=Ic(e)){if(typeof nv!="function")throw Error(K(280));var t=e.stateNode;t&&(t=tp(t),nv(e.stateNode,e.type,t))}}function Ak(e){Ho?Ko?Ko.push(e):Ko=[e]:Ho=e}function Tk(){if(Ho){var e=Ho,t=Ko;if(Ko=Ho=null,C1(e),t)for(e=0;e>>=0,e===0?32:31-(kM(e)/PM|0)|0}var sf=64,lf=4194304;function Kl(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 fd(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=Kl(s):(a&=o,a!==0&&(n=Kl(a)))}else o=r&~i,o!==0?n=Kl(o):a!==0&&(n=Kl(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 Cc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-an(t),e[t]=r}function NM(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=Jl),U1=String.fromCharCode(32),V1=!1;function Qk(e,t){switch(e){case"keyup":return oI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ao=!1;function lI(e,t){switch(e){case"compositionend":return Yk(t);case"keypress":return t.which!==32?null:(V1=!0,U1);case"textInput":return e=t.data,e===U1&&V1?null:e;default:return null}}function uI(e,t){if(Ao)return e==="compositionend"||!ax&&Qk(e,t)?(e=Gk(),Uf=rx=Li=null,Ao=!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=K1(r)}}function tP(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tP(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rP(){for(var e=window,t=sd();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=sd(e.document)}return t}function ox(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 gI(e){var t=rP(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&tP(r.ownerDocument.documentElement,r)){if(n!==null&&ox(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=G1(r,a);var o=G1(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,To=null,uv=null,tu=null,cv=!1;function X1(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;cv||To==null||To!==sd(n)||(n=To,"selectionStart"in n&&ox(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}),tu&&_u(tu,n)||(tu=n,n=pd(uv,"onSelect"),0Co||(e.current=yv[Co],yv[Co]=null,Co--)}function Le(e,t){Co++,yv[Co]=e.current,e.current=t}var ta={},Ft=ia(ta),ur=ia(!1),Ha=ta;function vs(e,t){var r=e.type.contextTypes;if(!r)return ta;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 cr(e){return e=e.childContextTypes,e!=null}function yd(){Ve(ur),Ve(Ft)}function rw(e,t,r){if(Ft.current!==ta)throw Error(K(168));Le(Ft,t),Le(ur,r)}function fP(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(K(108,hM(e)||"Unknown",i));return Ye({},r,n)}function vd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ta,Ha=Ft.current,Le(Ft,e),Le(ur,ur.current),!0}function nw(e,t,r){var n=e.stateNode;if(!n)throw Error(K(169));r?(e=fP(e,t,Ha),n.__reactInternalMemoizedMergedChildContext=e,Ve(ur),Ve(Ft),Le(Ft,e)):Ve(ur),Le(ur,r)}var Wn=null,rp=!1,Gm=!1;function dP(e){Wn===null?Wn=[e]:Wn.push(e)}function TI(e){rp=!0,dP(e)}function aa(){if(!Gm&&Wn!==null){Gm=!0;var e=0,t=Ae;try{var r=Wn;for(Ae=1;e>=o,i-=o,Kn=1<<32-an(t)+i|r<E?(j=_,_=null):j=_.sibling;var N=d(b,_,x[E],O);if(N===null){_===null&&(_=j);break}e&&_&&N.alternate===null&&t(b,_),v=a(N,v,E),S===null?w=N:S.sibling=N,S=N,_=j}if(E===x.length)return r(b,_),qe&&pa(b,E),w;if(_===null){for(;EE?(j=_,_=null):j=_.sibling;var A=d(b,_,N.value,O);if(A===null){_===null&&(_=j);break}e&&_&&A.alternate===null&&t(b,_),v=a(A,v,E),S===null?w=A:S.sibling=A,S=A,_=j}if(N.done)return r(b,_),qe&&pa(b,E),w;if(_===null){for(;!N.done;E++,N=x.next())N=c(b,N.value,O),N!==null&&(v=a(N,v,E),S===null?w=N:S.sibling=N,S=N);return qe&&pa(b,E),w}for(_=n(b,_);!N.done;E++,N=x.next())N=h(_,b,E,N.value,O),N!==null&&(e&&N.alternate!==null&&_.delete(N.key===null?E:N.key),v=a(N,v,E),S===null?w=N:S.sibling=N,S=N);return e&&_.forEach(function(C){return t(b,C)}),qe&&pa(b,E),w}function g(b,v,x,O){if(typeof x=="object"&&x!==null&&x.type===Po&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case nf:e:{for(var w=x.key,S=v;S!==null;){if(S.key===w){if(w=x.type,w===Po){if(S.tag===7){r(b,S.sibling),v=i(S,x.props.children),v.return=b,b=v;break e}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===bi&&ow(w)===S.type){r(b,S.sibling),v=i(S,x.props),v.ref=Pl(b,S,x),v.return=b,b=v;break e}r(b,S);break}else t(b,S);S=S.sibling}x.type===Po?(v=Ua(x.props.children,b.mode,O,x.key),v.return=b,b=v):(O=Qf(x.type,x.key,x.props,null,b.mode,O),O.ref=Pl(b,v,x),O.return=b,b=O)}return o(b);case ko:e:{for(S=x.key;v!==null;){if(v.key===S)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){r(b,v.sibling),v=i(v,x.children||[]),v.return=b,b=v;break e}else{r(b,v);break}else t(b,v);v=v.sibling}v=ry(x,b.mode,O),v.return=b,b=v}return o(b);case bi:return S=x._init,g(b,v,S(x._payload),O)}if(Hl(x))return m(b,v,x,O);if(Ol(x))return y(b,v,x,O);mf(b,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(r(b,v.sibling),v=i(v,x),v.return=b,b=v):(r(b,v),v=ty(x,b.mode,O),v.return=b,b=v),o(b)):r(b,v)}return g}var xs=yP(!0),vP=yP(!1),bd=ia(null),wd=null,Ro=null,cx=null;function fx(){cx=Ro=wd=null}function dx(e){var t=bd.current;Ve(bd),e._currentValue=t}function xv(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 Xo(e,t){wd=e,cx=Ro=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(sr=!0),e.firstContext=null)}function Br(e){var t=e._currentValue;if(cx!==e)if(e={context:e,memoizedValue:t,next:null},Ro===null){if(wd===null)throw Error(K(308));Ro=e,wd.dependencies={lanes:0,firstContext:e}}else Ro=Ro.next=e;return t}var wa=null;function hx(e){wa===null?wa=[e]:wa.push(e)}function gP(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,hx(t)):(r.next=i.next,i.next=r),t.interleaved=r,ii(e,n)}function ii(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 wi=!1;function px(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xP(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 Zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Hi(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Oe&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,ii(e,r)}return i=n.interleaved,i===null?(t.next=t,hx(n)):(t.next=i.next,i.next=t),n.interleaved=t,ii(e,r)}function Wf(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,J0(e,r)}}function sw(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 Sd(e,t,r,n){var i=e.updateQueue;wi=!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 m=e,y=s;switch(d=t,h=r,y.tag){case 1:if(m=y.payload,typeof m=="function"){c=m.call(h,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,d=typeof m=="function"?m.call(h,c,d):m,d==null)break e;c=Ye({},c,d);break e;case 2:wi=!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(1);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);Xa|=o,e.lanes=o,e.memoizedState=c}}function lw(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Qm.transition;Qm.transition={};try{e(!1),t()}finally{Ae=r,Qm.transition=n}}function RP(){return zr().memoizedState}function MI(e,t,r){var n=Gi(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},DP(e))LP(t,r);else if(r=gP(e,t,r,n),r!==null){var i=Qt();on(r,e,n,i),FP(r,t,n)}}function II(e,t,r){var n=Gi(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(DP(e))LP(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,un(s,o)){var l=t.interleaved;l===null?(i.next=i,hx(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=gP(e,t,i,n),r!==null&&(i=Qt(),on(r,e,n,i),FP(r,t,n))}}function DP(e){var t=e.alternate;return e===Xe||t!==null&&t===Xe}function LP(e,t){ru=_d=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function FP(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,J0(e,r)}}var Ed={readContext:Br,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useInsertionEffect:$t,useLayoutEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useMutableSource:$t,useSyncExternalStore:$t,useId:$t,unstable_isNewReconciler:!1},RI={readContext:Br,useCallback:function(e,t){return pn().memoizedState=[e,t===void 0?null:t],e},useContext:Br,useEffect:cw,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Hf(4194308,4,$P.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Hf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hf(4,2,e,t)},useMemo:function(e,t){var r=pn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=pn();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=MI.bind(null,Xe,e),[n.memoizedState,e]},useRef:function(e){var t=pn();return e={current:e},t.memoizedState=e},useState:uw,useDebugValue:Sx,useDeferredValue:function(e){return pn().memoizedState=e},useTransition:function(){var e=uw(!1),t=e[0];return e=CI.bind(null,e[1]),pn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Xe,i=pn();if(qe){if(r===void 0)throw Error(K(407));r=r()}else{if(r=t(),St===null)throw Error(K(349));Ga&30||OP(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,cw(EP.bind(null,n,a,e),[e]),n.flags|=2048,Nu(9,_P.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=pn(),t=St.identifierPrefix;if(qe){var r=Gn,n=Kn;r=(n&~(1<<32-an(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Tu++,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[bn]=t,e[ku]=n,XP(e,t,!1,!1),t.stateNode=e;e:{switch(o=tv(r,n),r){case"dialog":Be("cancel",e),Be("close",e),i=n;break;case"iframe":case"object":case"embed":Be("load",e),i=n;break;case"video":case"audio":for(i=0;iSs&&(t.flags|=128,n=!0,Al(a,!1),t.lanes=4194304)}else{if(!n)if(e=Od(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Al(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!qe)return Nt(t),null}else 2*it()-a.renderingStartTime>Ss&&r!==1073741824&&(t.flags|=128,n=!0,Al(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=it(),t.sibling=null,r=Ge.current,Le(Ge,n?r&1|2:r&1),t):(Nt(t),null);case 22:case 23:return Px(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?yr&1073741824&&(Nt(t),t.subtreeFlags&6&&(t.flags|=8192)):Nt(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function WI(e,t){switch(lx(t),t.tag){case 1:return cr(t.type)&&yd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bs(),Ve(ur),Ve(Ft),vx(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return yx(t),null;case 13:if(Ve(Ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));gs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ve(Ge),null;case 4:return bs(),null;case 10:return dx(t.type._context),null;case 22:case 23:return Px(),null;case 24:return null;default:return null}}var vf=!1,Rt=!1,qI=typeof WeakSet=="function"?WeakSet:Set,re=null;function Do(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){et(e,t,n)}else r.current=null}function Pv(e,t,r){try{r()}catch(n){et(e,t,n)}}var ww=!1;function HI(e,t){if(fv=dd,e=rP(),ox(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(dv={focusedElem:e,selectionRange:r},dd=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,g=m.memoizedState,b=t.stateNode,v=b.getSnapshotBeforeUpdate(t.elementType===t.type?y:Kr(t.type,y),g);b.__reactInternalSnapshotBeforeUpdate=v}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(K(163))}}catch(O){et(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return m=ww,ww=!1,m}function nu(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&&Pv(t,r,a)}i=i.next}while(i!==n)}}function ap(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 Av(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 ZP(e){var t=e.alternate;t!==null&&(e.alternate=null,ZP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bn],delete t[ku],delete t[mv],delete t[PI],delete t[AI])),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 JP(e){return e.tag===5||e.tag===3||e.tag===4}function Sw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||JP(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 Tv(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=md));else if(n!==4&&(e=e.child,e!==null))for(Tv(e,t,r),e=e.sibling;e!==null;)Tv(e,t,r),e=e.sibling}function $v(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($v(e,t,r),e=e.sibling;e!==null;)$v(e,t,r),e=e.sibling}var jt=null,Qr=!1;function vi(e,t,r){for(r=r.child;r!==null;)eA(e,t,r),r=r.sibling}function eA(e,t,r){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(Yh,r)}catch{}switch(r.tag){case 5:Rt||Do(r,t);case 6:var n=jt,i=Qr;jt=null,vi(e,t,r),jt=n,Qr=i,jt!==null&&(Qr?(e=jt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):jt.removeChild(r.stateNode));break;case 18:jt!==null&&(Qr?(e=jt,r=r.stateNode,e.nodeType===8?Km(e.parentNode,r):e.nodeType===1&&Km(e,r),Su(e)):Km(jt,r.stateNode));break;case 4:n=jt,i=Qr,jt=r.stateNode.containerInfo,Qr=!0,vi(e,t,r),jt=n,Qr=i;break;case 0:case 11:case 14:case 15:if(!Rt&&(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)&&Pv(r,t,o),i=i.next}while(i!==n)}vi(e,t,r);break;case 1:if(!Rt&&(Do(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){et(r,t,s)}vi(e,t,r);break;case 21:vi(e,t,r);break;case 22:r.mode&1?(Rt=(n=Rt)||r.memoizedState!==null,vi(e,t,r),Rt=n):vi(e,t,r);break;default:vi(e,t,r)}}function Ow(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new qI),t.forEach(function(n){var i=tR.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function qr(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=it()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*GI(n/1960))-n,10e?16:e,Fi===null)var n=!1;else{if(e=Fi,Fi=null,Pd=0,Oe&6)throw Error(K(331));var i=Oe;for(Oe|=4,re=e.current;re!==null;){var a=re,o=a.child;if(re.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lit()-jx?za(e,0):Ex|=r),fr(e,t)}function lA(e,t){t===0&&(e.mode&1?(t=lf,lf<<=1,!(lf&130023424)&&(lf=4194304)):t=1);var r=Qt();e=ii(e,t),e!==null&&(Cc(e,t,r),fr(e,r))}function eR(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),lA(e,r)}function tR(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(K(314))}n!==null&&n.delete(t),lA(e,r)}var uA;uA=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ur.current)sr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return sr=!1,UI(e,t,r);sr=!!(e.flags&131072)}else sr=!1,qe&&t.flags&1048576&&hP(t,xd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Kf(e,t),e=t.pendingProps;var i=vs(t,Ft.current);Xo(t,r),i=xx(null,t,n,e,i,r);var a=bx();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,cr(n)?(a=!0,vd(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,px(t),i.updater=ip,t.stateNode=i,i._reactInternals=t,wv(t,n,e,r),t=_v(null,t,n,!0,a,r)):(t.tag=0,qe&&a&&sx(t),Vt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Kf(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=nR(n),e=Kr(n,e),i){case 0:t=Ov(null,t,n,e,r);break e;case 1:t=gw(null,t,n,e,r);break e;case 11:t=yw(null,t,n,e,r);break e;case 14:t=vw(null,t,n,Kr(n.type,e),r);break e}throw Error(K(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Kr(n,i),Ov(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Kr(n,i),gw(e,t,n,i,r);case 3:e:{if(HP(t),e===null)throw Error(K(387));n=t.pendingProps,a=t.memoizedState,i=a.element,xP(e,t),Sd(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=ws(Error(K(423)),t),t=xw(e,t,n,r,i);break e}else if(n!==i){i=ws(Error(K(424)),t),t=xw(e,t,n,r,i);break e}else for(br=qi(t.stateNode.containerInfo.firstChild),wr=t,qe=!0,Jr=null,r=vP(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(gs(),n===i){t=ai(e,t,r);break e}Vt(e,t,n,r)}t=t.child}return t;case 5:return bP(t),e===null&&gv(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,hv(n,i)?o=null:a!==null&&hv(n,a)&&(t.flags|=32),qP(e,t),Vt(e,t,o,r),t.child;case 6:return e===null&&gv(t),null;case 13:return KP(e,t,r);case 4:return mx(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=xs(t,null,n,r):Vt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Kr(n,i),yw(e,t,n,i,r);case 7:return Vt(e,t,t.pendingProps,r),t.child;case 8:return Vt(e,t,t.pendingProps.children,r),t.child;case 12:return Vt(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,Le(bd,n._currentValue),n._currentValue=o,a!==null)if(un(a.value,o)){if(a.children===i.children&&!ur.current){t=ai(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=Zn(-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),xv(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(K(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),xv(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}Vt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Xo(t,r),i=Br(i),n=n(i),t.flags|=1,Vt(e,t,n,r),t.child;case 14:return n=t.type,i=Kr(n,t.pendingProps),i=Kr(n.type,i),vw(e,t,n,i,r);case 15:return VP(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Kr(n,i),Kf(e,t),t.tag=1,cr(n)?(e=!0,vd(t)):e=!1,Xo(t,r),BP(t,n,i),wv(t,n,i,r),_v(null,t,n,!0,e,r);case 19:return GP(e,t,r);case 22:return WP(e,t,r)}throw Error(K(156,t.tag))};function cA(e,t){return Dk(e,t)}function rR(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 Dr(e,t,r,n){return new rR(e,t,r,n)}function Tx(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nR(e){if(typeof e=="function")return Tx(e)?1:0;if(e!=null){if(e=e.$$typeof,e===X0)return 11;if(e===Q0)return 14}return 2}function Xi(e,t){var r=e.alternate;return r===null?(r=Dr(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 Qf(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")Tx(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Po:return Ua(r.children,i,a,t);case G0:o=8,i|=8;break;case qy:return e=Dr(12,r,t,i|2),e.elementType=qy,e.lanes=a,e;case Hy:return e=Dr(13,r,t,i),e.elementType=Hy,e.lanes=a,e;case Ky:return e=Dr(19,r,t,i),e.elementType=Ky,e.lanes=a,e;case bk:return sp(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gk:o=10;break e;case xk:o=9;break e;case X0:o=11;break e;case Q0:o=14;break e;case bi:o=16,n=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=Dr(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Ua(e,t,r,n){return e=Dr(7,e,n,t),e.lanes=r,e}function sp(e,t,r,n){return e=Dr(22,e,n,t),e.elementType=bk,e.lanes=r,e.stateNode={isHidden:!1},e}function ty(e,t,r){return e=Dr(6,e,null,t),e.lanes=r,e}function ry(e,t,r){return t=Dr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function iR(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=Rm(0),this.expirationTimes=Rm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rm(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $x(e,t,r,n,i,a,o,s,l){return e=new iR(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Dr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},px(a),e}function aR(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pA)}catch(e){console.error(e)}}pA(),pk.exports=jr;var cR=pk.exports,$w=cR;Vy.createRoot=$w.createRoot,Vy.hydrateRoot=$w.hydrateRoot;/** + * @remix-run/router v1.23.0 + * + * 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 Mu(){return Mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function mA(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function dR(){return Math.random().toString(36).substr(2,8)}function Cw(e,t){return{usr:e.state,key:e.key,idx:t}}function Rv(e,t,r,n){return r===void 0&&(r=null),Mu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?el(t):t,{state:r,key:t&&t.key||n||dR()})}function $d(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 el(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 hR(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Bi.Pop,l=null,u=f();u==null&&(u=0,o.replaceState(Mu({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function c(){s=Bi.Pop;let g=f(),b=g==null?null:g-u;u=g,l&&l({action:s,location:y.location,delta:b})}function d(g,b){s=Bi.Push;let v=Rv(y.location,g,b);r&&r(v,g),u=f()+1;let x=Cw(v,u),O=y.createHref(v);try{o.pushState(x,"",O)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(O)}a&&l&&l({action:s,location:y.location,delta:1})}function h(g,b){s=Bi.Replace;let v=Rv(y.location,g,b);r&&r(v,g),u=f();let x=Cw(v,u),O=y.createHref(v);o.replaceState(x,"",O),a&&l&&l({action:s,location:y.location,delta:0})}function m(g){let b=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof g=="string"?g:$d(g);return v=v.replace(/ $/,"%20"),Qe(b,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,b)}let y={get action(){return s},get location(){return e(i,o)},listen(g){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Nw,c),l=g,()=>{i.removeEventListener(Nw,c),l=null}},createHref(g){return t(i,g)},createURL:m,encodeLocation(g){let b=m(g);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:d,replace:h,go(g){return o.go(g)}};return y}var Mw;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Mw||(Mw={}));function pR(e,t,r){return r===void 0&&(r="/"),mR(e,t,r,!1)}function mR(e,t,r,n){let i=typeof t=="string"?el(t):t,a=Os(i.pathname||"/",r);if(a==null)return null;let o=yA(e);yR(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("/")&&(Qe(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=Qi([n,l.relativePath]),f=r.concat(l);a.children&&a.children.length>0&&(Qe(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),yA(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:OR(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 vA(a.path))i(a,o,l)}),t}function vA(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=vA(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 yR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:_R(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const vR=/^:[\w-]+$/,gR=3,xR=2,bR=1,wR=10,SR=-2,Iw=e=>e==="*";function OR(e,t){let r=e.split("/"),n=r.length;return r.some(Iw)&&(n+=SR),t&&(n+=xR),r.filter(i=>!Iw(i)).reduce((i,a)=>i+(vR.test(a)?gR:a===""?bR:wR),n)}function _R(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 ER(e,t,r){r===void 0&&(r=!1);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 m=s[c];return h&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function jR(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),mA(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 kR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return mA(!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 Os(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)||"/"}function PR(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?el(e):e;return{pathname:r?r.startsWith("/")?r:AR(r,t):t,search:NR(n),hash:CR(i)}}function AR(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 ny(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 TR(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ix(e,t){let r=TR(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Rx(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=el(e):(i=Mu({},e),Qe(!i.pathname||!i.pathname.includes("?"),ny("?","pathname","search",i)),Qe(!i.pathname||!i.pathname.includes("#"),ny("#","pathname","hash",i)),Qe(!i.search||!i.search.includes("#"),ny("#","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=PR(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Qi=e=>e.join("/").replace(/\/\/+/g,"/"),$R=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),NR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,CR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function MR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const gA=["post","put","patch","delete"];new Set(gA);const IR=["get",...gA];new Set(IR);/** + * React Router v6.30.1 + * + * 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 Iu(){return Iu=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=Rx(u,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Qi([t,c.pathname])),(f.replace?n.replace:n.push)(c,f.state,f)},[t,n,o,a,e])}const LR=k.createContext(null);function FR(e){let t=k.useContext(Tn).outlet;return t&&k.createElement(LR.Provider,{value:e},t)}function Dx(){let{matches:e}=k.useContext(Tn),t=e[e.length-1];return t?t.params:{}}function pp(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=k.useContext(fi),{matches:i}=k.useContext(Tn),{pathname:a}=rl(),o=JSON.stringify(Ix(i,n.v7_relativeSplatPath));return k.useMemo(()=>Rx(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function BR(e,t){return zR(e,t)}function zR(e,t,r,n){tl()||Qe(!1);let{navigator:i}=k.useContext(fi),{matches:a}=k.useContext(Tn),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=rl(),f;if(t){var c;let g=typeof t=="string"?el(t):t;l==="/"||(c=g.pathname)!=null&&c.startsWith(l)||Qe(!1),f=g}else f=u;let d=f.pathname||"/",h=d;if(l!=="/"){let g=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let m=pR(e,{pathname:h}),y=HR(m&&m.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:Qi([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Qi([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),a,r,n);return t&&y?k.createElement(hp.Provider,{value:{location:Iu({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Bi.Pop}},y):y}function UR(){let e=QR(),t=MR(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)"},a=null;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,a)}const VR=k.createElement(UR,null);class WR 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(Tn.Provider,{value:this.props.routeContext},k.createElement(bA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function qR(e){let{routeContext:t,match:r,children:n}=e,i=k.useContext(dp);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),k.createElement(Tn.Provider,{value:t},n)}function HR(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||Qe(!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,m=!1,y=null,g=null;r&&(h=s&&c.route.id?s[c.route.id]:void 0,y=c.route.errorElement||VR,l&&(u<0&&d===0?(ZR("route-fallback",!1),m=!0,g=null):u===d&&(m=!0,g=c.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,d+1)),v=()=>{let x;return h?x=y:m?x=g:c.route.Component?x=k.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=f,k.createElement(qR,{match:c,routeContext:{outlet:f,matches:b,isDataRoute:r!=null},children:x})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?k.createElement(WR,{location:r.location,revalidation:r.revalidation,component:y,error:h,children:v(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):v()},null)}var SA=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(SA||{}),Cd=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}(Cd||{});function KR(e){let t=k.useContext(dp);return t||Qe(!1),t}function GR(e){let t=k.useContext(xA);return t||Qe(!1),t}function XR(e){let t=k.useContext(Tn);return t||Qe(!1),t}function OA(e){let t=XR(),r=t.matches[t.matches.length-1];return r.route.id||Qe(!1),r.route.id}function QR(){var e;let t=k.useContext(bA),r=GR(Cd.UseRouteError),n=OA(Cd.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function YR(){let{router:e}=KR(SA.UseNavigateStable),t=OA(Cd.UseNavigateStable),r=k.useRef(!1);return wA(()=>{r.current=!0}),k.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Iu({fromRouteId:t},a)))},[e,t])}const Rw={};function ZR(e,t,r){!t&&!Rw[e]&&(Rw[e]=!0)}function JR(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function _A(e){let{to:t,replace:r,state:n,relative:i}=e;tl()||Qe(!1);let{future:a,static:o}=k.useContext(fi),{matches:s}=k.useContext(Tn),{pathname:l}=rl(),u=uo(),f=Rx(t,Ix(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 eD(e){return FR(e.context)}function Jt(e){Qe(!1)}function tD(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Bi.Pop,navigator:a,static:o=!1,future:s}=e;tl()&&Qe(!1);let l=t.replace(/^\/*/,"/"),u=k.useMemo(()=>({basename:l,navigator:a,static:o,future:Iu({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=el(n));let{pathname:f="/",search:c="",hash:d="",state:h=null,key:m="default"}=n,y=k.useMemo(()=>{let g=Os(f,l);return g==null?null:{location:{pathname:g,search:c,hash:d,state:h,key:m},navigationType:i}},[l,f,c,d,h,m,i]);return y==null?null:k.createElement(fi.Provider,{value:u},k.createElement(hp.Provider,{children:r,value:y}))}function rD(e){let{children:t,location:r}=e;return BR(Dv(t),r)}new Promise(()=>{});function Dv(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,Dv(n.props.children,a));return}n.type!==Jt&&Qe(!1),!n.props.index||!n.props.children||Qe(!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=Dv(n.props.children,a)),r.push(o)}),r}/** + * React Router DOM v6.30.1 + * + * 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 Md(){return Md=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function nD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iD(e,t){return e.button===0&&(!t||t==="_self")&&!nD(e)}const aD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],oD=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],sD="6";try{window.__reactRouterVersion=sD}catch{}const lD=k.createContext({isTransitioning:!1}),uD="startTransition",Dw=JC[uD];function cD(e){let{basename:t,children:r,future:n,window:i}=e,a=k.useRef();a.current==null&&(a.current=fR({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&&Dw?Dw(()=>l(c)):l(c)},[l,u]);return k.useLayoutEffect(()=>o.listen(f),[o,f]),k.useEffect(()=>JR(n),[n]),k.createElement(tD,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const fD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hD=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=EA(t,aD),{basename:h}=k.useContext(fi),m,y=!1;if(typeof u=="string"&&dD.test(u)&&(m=u,fD))try{let x=new URL(window.location.href),O=u.startsWith("//")?new URL(x.protocol+u):new URL(u),w=Os(O.pathname,h);O.origin===x.origin&&w!=null?u=w+O.search+O.hash:y=!0}catch{}let g=RR(u,{relative:i}),b=mD(u,{replace:o,state:s,target:l,preventScrollReset:f,relative:i,viewTransition:c});function v(x){n&&n(x),x.defaultPrevented||b(x)}return k.createElement("a",Md({},d,{href:m||g,onClick:y||a?n:v,ref:r,target:l}))}),iy=k.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:i=!1,className:a="",end:o=!1,style:s,to:l,viewTransition:u,children:f}=t,c=EA(t,oD),d=pp(l,{relative:c.relative}),h=rl(),m=k.useContext(xA),{navigator:y,basename:g}=k.useContext(fi),b=m!=null&&yD(d)&&u===!0,v=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,x=h.pathname,O=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(x=x.toLowerCase(),O=O?O.toLowerCase():null,v=v.toLowerCase()),O&&g&&(O=Os(O,g)||O);const w=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let S=x===v||!o&&x.startsWith(v)&&x.charAt(w)==="/",_=O!=null&&(O===v||!o&&O.startsWith(v)&&O.charAt(v.length)==="/"),E={isActive:S,isPending:_,isTransitioning:b},j=S?n:void 0,N;typeof a=="function"?N=a(E):N=[a,S?"active":null,_?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let A=typeof s=="function"?s(E):s;return k.createElement(hD,Md({},c,{"aria-current":j,className:N,ref:r,style:A,to:l,viewTransition:u}),typeof f=="function"?f(E):f)});var Lv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Lv||(Lv={}));var Lw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Lw||(Lw={}));function pD(e){let t=k.useContext(dp);return t||Qe(!1),t}function mD(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=uo(),u=rl(),f=pp(e,{relative:o});return k.useCallback(c=>{if(iD(c,r)){c.preventDefault();let d=n!==void 0?n:$d(u)===$d(f);l(e,{replace:d,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,f,n,i,r,e,a,o,s])}function yD(e,t){t===void 0&&(t={});let r=k.useContext(lD);r==null&&Qe(!1);let{basename:n}=pD(Lv.useViewTransitionState),i=pp(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=Os(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=Os(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Nd(i.pathname,o)!=null||Nd(i.pathname,a)!=null}var nl=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(){}},Ya=typeof window>"u"||"Deno"in globalThis;function Wt(){}function vD(e,t){return typeof e=="function"?e(t):e}function Fv(e){return typeof e=="number"&&e>=0&&e!==1/0}function jA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yi(e,t){return typeof e=="function"?e(t):e}function en(e,t){return typeof e=="function"?e(t):e}function Fw(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==Lx(o,t.options))return!1}else if(!Ru(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 Bw(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Za(t.options.mutationKey)!==Za(a))return!1}else if(!Ru(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Lx(e,t){return((t==null?void 0:t.queryKeyHashFn)||Za)(e)}function Za(e){return JSON.stringify(e,(t,r)=>Bv(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Ru(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ru(e[r],t[r])):!1}function kA(e,t){if(e===t)return e;const r=zw(e)&&zw(t);if(r||Bv(e)&&Bv(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{},l=new Set(n);let u=0;for(let f=0;f{setTimeout(t,e)})}function zv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?kA(e,t):t}function xD(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function bD(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Fx=Symbol();function PA(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Fx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function AA(e,t){return typeof e=="function"?e(...t):!!e}var Na,Pi,rs,Kj,wD=(Kj=class extends nl{constructor(){super();ae(this,Na,void 0);ae(this,Pi,void 0);ae(this,rs,void 0);te(this,rs,t=>{if(!Ya&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){T(this,Pi)||this.setEventListener(T(this,rs))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Pi))==null||t.call(this),te(this,Pi,void 0))}setEventListener(t){var r;te(this,rs,t),(r=T(this,Pi))==null||r.call(this),te(this,Pi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){T(this,Na)!==t&&(te(this,Na,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof T(this,Na)=="boolean"?T(this,Na):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Na=new WeakMap,Pi=new WeakMap,rs=new WeakMap,Kj),Bx=new wD,ns,Ai,is,Gj,SD=(Gj=class extends nl{constructor(){super();ae(this,ns,!0);ae(this,Ai,void 0);ae(this,is,void 0);te(this,is,t=>{if(!Ya&&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(){T(this,Ai)||this.setEventListener(T(this,is))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Ai))==null||t.call(this),te(this,Ai,void 0))}setEventListener(t){var r;te(this,is,t),(r=T(this,Ai))==null||r.call(this),te(this,Ai,t(this.setOnline.bind(this)))}setOnline(t){T(this,ns)!==t&&(te(this,ns,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return T(this,ns)}},ns=new WeakMap,Ai=new WeakMap,is=new WeakMap,Gj),Rd=new SD;function Uv(){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}function OD(e){return Math.min(1e3*2**e,3e4)}function TA(e){return(e??"online")==="online"?Rd.isOnline():!0}var $A=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ay(e){return e instanceof $A}function NA(e){let t=!1,r=0,n=!1,i;const a=Uv(),o=y=>{var g;n||(d(new $A(y)),(g=e.abort)==null||g.call(e))},s=()=>{t=!0},l=()=>{t=!1},u=()=>Bx.isFocused()&&(e.networkMode==="always"||Rd.isOnline())&&e.canRun(),f=()=>TA(e.networkMode)&&e.canRun(),c=y=>{var g;n||(n=!0,(g=e.onSuccess)==null||g.call(e,y),i==null||i(),a.resolve(y))},d=y=>{var g;n||(n=!0,(g=e.onError)==null||g.call(e,y),i==null||i(),a.reject(y))},h=()=>new Promise(y=>{var g;i=b=>{(n||u())&&y(b)},(g=e.onPause)==null||g.call(e)}).then(()=>{var y;i=void 0,n||(y=e.onContinue)==null||y.call(e)}),m=()=>{if(n)return;let y;const g=r===0?e.initialPromise:void 0;try{y=g??e.fn()}catch(b){y=Promise.reject(b)}Promise.resolve(y).then(c).catch(b=>{var S;if(n)return;const v=e.retry??(Ya?0:3),x=e.retryDelay??OD,O=typeof x=="function"?x(r,b):x,w=v===!0||typeof v=="number"&&ru()?void 0:h()).then(()=>{t?d(b):m()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:l,canStart:f,start:()=>(f()?m():h().then(m),a)}}var _D=e=>setTimeout(e,0);function ED(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=_D;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 pt=ED(),Ca,Xj,CA=(Xj=class{constructor(){ae(this,Ca,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fv(this.gcTime)&&te(this,Ca,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ya?1/0:5*60*1e3))}clearGcTimeout(){T(this,Ca)&&(clearTimeout(T(this,Ca)),te(this,Ca,void 0))}},Ca=new WeakMap,Xj),as,os,Nr,Ma,Mt,bc,Ia,Gr,zn,Qj,jD=(Qj=class extends CA{constructor(t){super();ae(this,Gr);ae(this,as,void 0);ae(this,os,void 0);ae(this,Nr,void 0);ae(this,Ma,void 0);ae(this,Mt,void 0);ae(this,bc,void 0);ae(this,Ia,void 0);te(this,Ia,!1),te(this,bc,t.defaultOptions),this.setOptions(t.options),this.observers=[],te(this,Ma,t.client),te(this,Nr,T(this,Ma).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,te(this,as,kD(this.options)),this.state=t.state??T(this,as),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,Mt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,bc),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Nr).remove(this)}setData(t,r){const n=zv(this.state.data,t,this.options);return ge(this,Gr,zn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ge(this,Gr,zn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=T(this,Mt))==null?void 0:n.promise;return(i=T(this,Mt))==null||i.cancel(t),r?r.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,as))}isActive(){return this.observers.some(t=>en(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Fx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Yi(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:!jA(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,Mt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,Mt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,Nr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(T(this,Mt)&&(T(this,Ia)?T(this,Mt).cancel({revert:!0}):T(this,Mt).cancelRetry()),this.scheduleGc()),T(this,Nr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ge(this,Gr,zn).call(this,{type:"invalidate"})}fetch(t,r){var u,f,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(T(this,Mt))return T(this,Mt).continueRetry(),T(this,Mt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(te(this,Ia,!0),n.signal)})},a=()=>{const d=PA(this.options,r),m=(()=>{const y={client:T(this,Ma),queryKey:this.queryKey,meta:this.meta};return i(y),y})();return te(this,Ia,!1),this.options.persister?this.options.persister(d,m,this):d(m)},s=(()=>{const d={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:T(this,Ma),state:this.state,fetchFn:a};return i(d),d})();(u=this.options.behavior)==null||u.onFetch(s,this),te(this,os,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=s.fetchOptions)==null?void 0:f.meta))&&ge(this,Gr,zn).call(this,{type:"fetch",meta:(c=s.fetchOptions)==null?void 0:c.meta});const l=d=>{var h,m,y,g;ay(d)&&d.silent||ge(this,Gr,zn).call(this,{type:"error",error:d}),ay(d)||((m=(h=T(this,Nr).config).onError)==null||m.call(h,d,this),(g=(y=T(this,Nr).config).onSettled)==null||g.call(y,this.state.data,d,this)),this.scheduleGc()};return te(this,Mt,NA({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:d=>{var h,m,y,g;if(d===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(b){l(b);return}(m=(h=T(this,Nr).config).onSuccess)==null||m.call(h,d,this),(g=(y=T(this,Nr).config).onSettled)==null||g.call(y,d,this.state.error,this),this.scheduleGc()},onError:l,onFail:(d,h)=>{ge(this,Gr,zn).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{ge(this,Gr,zn).call(this,{type:"pause"})},onContinue:()=>{ge(this,Gr,zn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),T(this,Mt).start()}},as=new WeakMap,os=new WeakMap,Nr=new WeakMap,Ma=new WeakMap,Mt=new WeakMap,bc=new WeakMap,Ia=new WeakMap,Gr=new WeakSet,zn=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,...MA(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return ay(i)&&i.revert&&T(this,os)?{...T(this,os),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),pt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),T(this,Nr).notify({query:this,type:"updated",action:t})})},Qj);function MA(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:TA(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kD(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 vn,Yj,PD=(Yj=class extends nl{constructor(t={}){super();ae(this,vn,void 0);this.config=t,te(this,vn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Lx(i,r);let o=this.get(a);return o||(o=new jD({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,vn).has(t.queryHash)||(T(this,vn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=T(this,vn).get(t.queryHash);r&&(t.destroy(),r===t&&T(this,vn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){pt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,vn).get(t)}getAll(){return[...T(this,vn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Fw(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Fw(t,n)):r}notify(t){pt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){pt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){pt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vn=new WeakMap,Yj),gn,zt,Ra,xn,xi,Zj,AD=(Zj=class extends CA{constructor(t){super();ae(this,xn);ae(this,gn,void 0);ae(this,zt,void 0);ae(this,Ra,void 0);this.mutationId=t.mutationId,te(this,zt,t.mutationCache),te(this,gn,[]),this.state=t.state||IA(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,gn).includes(t)||(T(this,gn).push(t),this.clearGcTimeout(),T(this,zt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){te(this,gn,T(this,gn).filter(r=>r!==t)),this.scheduleGc(),T(this,zt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,gn).length||(this.state.status==="pending"?this.scheduleGc():T(this,zt).remove(this))}continue(){var t;return((t=T(this,Ra))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,s,l,u,f,c,d,h,m,y,g,b,v,x,O,w,S,_,E;const r=()=>{ge(this,xn,xi).call(this,{type:"continue"})};te(this,Ra,NA({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,N)=>{ge(this,xn,xi).call(this,{type:"failed",failureCount:j,error:N})},onPause:()=>{ge(this,xn,xi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,zt).canRun(this)}));const n=this.state.status==="pending",i=!T(this,Ra).canStart();try{if(n)r();else{ge(this,xn,xi).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=T(this,zt).config).onMutate)==null?void 0:o.call(a,t,this));const N=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));N!==this.state.context&&ge(this,xn,xi).call(this,{type:"pending",context:N,variables:t,isPaused:i})}const j=await T(this,Ra).start();return await((f=(u=T(this,zt).config).onSuccess)==null?void 0:f.call(u,j,t,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,j,t,this.state.context)),await((m=(h=T(this,zt).config).onSettled)==null?void 0:m.call(h,j,null,this.state.variables,this.state.context,this)),await((g=(y=this.options).onSettled)==null?void 0:g.call(y,j,null,t,this.state.context)),ge(this,xn,xi).call(this,{type:"success",data:j}),j}catch(j){try{throw await((v=(b=T(this,zt).config).onError)==null?void 0:v.call(b,j,t,this.state.context,this)),await((O=(x=this.options).onError)==null?void 0:O.call(x,j,t,this.state.context)),await((S=(w=T(this,zt).config).onSettled)==null?void 0:S.call(w,void 0,j,this.state.variables,this.state.context,this)),await((E=(_=this.options).onSettled)==null?void 0:E.call(_,void 0,j,t,this.state.context)),j}finally{ge(this,xn,xi).call(this,{type:"error",error:j})}}finally{T(this,zt).runNext(this)}}},gn=new WeakMap,zt=new WeakMap,Ra=new WeakMap,xn=new WeakSet,xi=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),pt.batch(()=>{T(this,gn).forEach(n=>{n.onMutationUpdate(t)}),T(this,zt).notify({mutation:this,type:"updated",action:t})})},Zj);function IA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qn,Xr,wc,Jj,TD=(Jj=class extends nl{constructor(t={}){super();ae(this,qn,void 0);ae(this,Xr,void 0);ae(this,wc,void 0);this.config=t,te(this,qn,new Set),te(this,Xr,new Map),te(this,wc,0)}build(t,r,n){const i=new AD({mutationCache:this,mutationId:++ef(this,wc)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){T(this,qn).add(t);const r=bf(t);if(typeof r=="string"){const n=T(this,Xr).get(r);n?n.push(t):T(this,Xr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,qn).delete(t)){const r=bf(t);if(typeof r=="string"){const n=T(this,Xr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&T(this,Xr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=bf(t);if(typeof r=="string"){const n=T(this,Xr).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=bf(t);if(typeof r=="string"){const i=(n=T(this,Xr).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(){pt.batch(()=>{T(this,qn).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,qn).clear(),T(this,Xr).clear()})}getAll(){return Array.from(T(this,qn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Bw(r,n))}findAll(t={}){return this.getAll().filter(r=>Bw(t,r))}notify(t){pt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return pt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Wt))))}},qn=new WeakMap,Xr=new WeakMap,wc=new WeakMap,Jj);function bf(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Vw(e){return{onFetch:(t,r)=>{var f,c,d,h,m;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=((m=t.state.data)==null?void 0:m.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let y=!1;const g=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},b=PA(t.options,t.fetchOptions),v=async(x,O,w)=>{if(y)return Promise.reject();if(O==null&&x.pages.length)return Promise.resolve(x);const _=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:O,direction:w?"backward":"forward",meta:t.options.meta};return g(A),A})(),E=await b(_),{maxPages:j}=t.options,N=w?bD:xD;return{pages:N(x.pages,E,j),pageParams:N(x.pageParams,O,j)}};if(i&&a.length){const x=i==="backward",O=x?$D:Ww,w={pages:a,pageParams:o},S=O(n,w);s=await v(w,S,x)}else{const x=e??a.length;do{const O=l===0?o[0]??n.initialPageParam:Ww(n,s);if(l>0&&O==null)break;s=await v(s,O),l++}while(l{var y,g;return(g=(y=t.options).persister)==null?void 0:g.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function Ww(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 $D(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 Je,Ti,$i,ss,ls,Ni,us,cs,ek,ND=(ek=class{constructor(e={}){ae(this,Je,void 0);ae(this,Ti,void 0);ae(this,$i,void 0);ae(this,ss,void 0);ae(this,ls,void 0);ae(this,Ni,void 0);ae(this,us,void 0);ae(this,cs,void 0);te(this,Je,e.queryCache||new PD),te(this,Ti,e.mutationCache||new TD),te(this,$i,e.defaultOptions||{}),te(this,ss,new Map),te(this,ls,new Map),te(this,Ni,0)}mount(){ef(this,Ni)._++,T(this,Ni)===1&&(te(this,us,Bx.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Je).onFocus())})),te(this,cs,Rd.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Je).onOnline())})))}unmount(){var e,t;ef(this,Ni)._--,T(this,Ni)===0&&((e=T(this,us))==null||e.call(this),te(this,us,void 0),(t=T(this,cs))==null||t.call(this),te(this,cs,void 0))}isFetching(e){return T(this,Je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,Ti).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,Je).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=T(this,Je).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Yi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return T(this,Je).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=T(this,Je).get(n.queryHash),a=i==null?void 0:i.state.data,o=vD(t,a);if(o!==void 0)return T(this,Je).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return pt.batch(()=>T(this,Je).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,Je).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=T(this,Je);pt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=T(this,Je);return pt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=pt.batch(()=>T(this,Je).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Wt).catch(Wt)}invalidateQueries(e,t={}){return pt.batch(()=>(T(this,Je).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=pt.batch(()=>T(this,Je).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Wt)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=T(this,Je).build(this,t);return r.isStaleByTime(Yi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wt).catch(Wt)}fetchInfiniteQuery(e){return e.behavior=Vw(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wt).catch(Wt)}ensureInfiniteQueryData(e){return e.behavior=Vw(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Rd.isOnline()?T(this,Ti).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Je)}getMutationCache(){return T(this,Ti)}getDefaultOptions(){return T(this,$i)}setDefaultOptions(e){te(this,$i,e)}setQueryDefaults(e,t){T(this,ss).set(Za(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,ss).values()],r={};return t.forEach(n=>{Ru(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){T(this,ls).set(Za(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,ls).values()],r={};return t.forEach(n=>{Ru(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,$i).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Lx(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===Fx&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,$i).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Je).clear(),T(this,Ti).clear()}},Je=new WeakMap,Ti=new WeakMap,$i=new WeakMap,ss=new WeakMap,ls=new WeakMap,Ni=new WeakMap,us=new WeakMap,cs=new WeakMap,ek),tr,Se,Sc,Ut,Da,fs,Ci,Mi,Oc,ds,hs,La,Fa,Ii,ps,Ba,Xl,_c,Vv,Ec,Wv,jc,qv,kc,Hv,Pc,Kv,Ac,Gv,Tc,Xv,Xh,RA,tk,CD=(tk=class extends nl{constructor(t,r){super();ae(this,Ba);ae(this,_c);ae(this,Ec);ae(this,jc);ae(this,kc);ae(this,Pc);ae(this,Ac);ae(this,Tc);ae(this,Xh);ae(this,tr,void 0);ae(this,Se,void 0);ae(this,Sc,void 0);ae(this,Ut,void 0);ae(this,Da,void 0);ae(this,fs,void 0);ae(this,Ci,void 0);ae(this,Mi,void 0);ae(this,Oc,void 0);ae(this,ds,void 0);ae(this,hs,void 0);ae(this,La,void 0);ae(this,Fa,void 0);ae(this,Ii,void 0);ae(this,ps,new Set);this.options=r,te(this,tr,t),te(this,Mi,null),te(this,Ci,Uv()),this.options.experimental_prefetchInRender||T(this,Ci).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,Se).addObserver(this),qw(T(this,Se),this.options)?ge(this,Ba,Xl).call(this):this.updateResult(),ge(this,kc,Hv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qv(T(this,Se),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qv(T(this,Se),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ge(this,Pc,Kv).call(this),ge(this,Ac,Gv).call(this),T(this,Se).removeObserver(this)}setOptions(t){const r=this.options,n=T(this,Se);if(this.options=T(this,tr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof en(this.options.enabled,T(this,Se))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ge(this,Tc,Xv).call(this),T(this,Se).setOptions(this.options),r._defaulted&&!Id(this.options,r)&&T(this,tr).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,Se),observer:this});const i=this.hasListeners();i&&Hw(T(this,Se),n,this.options,r)&&ge(this,Ba,Xl).call(this),this.updateResult(),i&&(T(this,Se)!==n||en(this.options.enabled,T(this,Se))!==en(r.enabled,T(this,Se))||Yi(this.options.staleTime,T(this,Se))!==Yi(r.staleTime,T(this,Se)))&&ge(this,_c,Vv).call(this);const a=ge(this,Ec,Wv).call(this);i&&(T(this,Se)!==n||en(this.options.enabled,T(this,Se))!==en(r.enabled,T(this,Se))||a!==T(this,Ii))&&ge(this,jc,qv).call(this,a)}getOptimisticResult(t){const r=T(this,tr).getQueryCache().build(T(this,tr),t),n=this.createResult(r,t);return ID(this,n)&&(te(this,Ut,n),te(this,fs,this.options),te(this,Da,T(this,Se).state)),n}getCurrentResult(){return T(this,Ut)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){T(this,ps).add(t)}getCurrentQuery(){return T(this,Se)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=T(this,tr).defaultQueryOptions(t),n=T(this,tr).getQueryCache().build(T(this,tr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ge(this,Ba,Xl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,Ut)))}createResult(t,r){var j;const n=T(this,Se),i=this.options,a=T(this,Ut),o=T(this,Da),s=T(this,fs),u=t!==n?t.state:T(this,Sc),{state:f}=t;let c={...f},d=!1,h;if(r._optimisticResults){const N=this.hasListeners(),A=!N&&qw(t,r),C=N&&Hw(t,n,r,i);(A||C)&&(c={...c,...MA(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:m,errorUpdatedAt:y,status:g}=c;h=c.data;let b=!1;if(r.placeholderData!==void 0&&h===void 0&&g==="pending"){let N;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(N=a.data,b=!0):N=typeof r.placeholderData=="function"?r.placeholderData((j=T(this,hs))==null?void 0:j.state.data,T(this,hs)):r.placeholderData,N!==void 0&&(g="success",h=zv(a==null?void 0:a.data,N,r),d=!0)}if(r.select&&h!==void 0&&!b)if(a&&h===(o==null?void 0:o.data)&&r.select===T(this,Oc))h=T(this,ds);else try{te(this,Oc,r.select),h=r.select(h),h=zv(a==null?void 0:a.data,h,r),te(this,ds,h),te(this,Mi,null)}catch(N){te(this,Mi,N)}T(this,Mi)&&(m=T(this,Mi),h=T(this,ds),y=Date.now(),g="error");const v=c.fetchStatus==="fetching",x=g==="pending",O=g==="error",w=x&&v,S=h!==void 0,E={status:g,fetchStatus:c.fetchStatus,isPending:x,isSuccess:g==="success",isError:O,isInitialLoading:w,isLoading:w,data:h,dataUpdatedAt:c.dataUpdatedAt,error:m,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:v,isRefetching:v&&!x,isLoadingError:O&&!S,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:O&&S,isStale:zx(t,r),refetch:this.refetch,promise:T(this,Ci)};if(this.options.experimental_prefetchInRender){const N=M=>{E.status==="error"?M.reject(E.error):E.data!==void 0&&M.resolve(E.data)},A=()=>{const M=te(this,Ci,E.promise=Uv());N(M)},C=T(this,Ci);switch(C.status){case"pending":t.queryHash===n.queryHash&&N(C);break;case"fulfilled":(E.status==="error"||E.data!==C.value)&&A();break;case"rejected":(E.status!=="error"||E.error!==C.reason)&&A();break}}return E}updateResult(){const t=T(this,Ut),r=this.createResult(T(this,Se),this.options);if(te(this,Da,T(this,Se).state),te(this,fs,this.options),T(this,Da).data!==void 0&&te(this,hs,T(this,Se)),Id(r,t))return;te(this,Ut,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!T(this,ps).size)return!0;const o=new Set(a??T(this,ps));return this.options.throwOnError&&o.add("error"),Object.keys(T(this,Ut)).some(s=>{const l=s;return T(this,Ut)[l]!==t[l]&&o.has(l)})};ge(this,Xh,RA).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ge(this,kc,Hv).call(this)}},tr=new WeakMap,Se=new WeakMap,Sc=new WeakMap,Ut=new WeakMap,Da=new WeakMap,fs=new WeakMap,Ci=new WeakMap,Mi=new WeakMap,Oc=new WeakMap,ds=new WeakMap,hs=new WeakMap,La=new WeakMap,Fa=new WeakMap,Ii=new WeakMap,ps=new WeakMap,Ba=new WeakSet,Xl=function(t){ge(this,Tc,Xv).call(this);let r=T(this,Se).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Wt)),r},_c=new WeakSet,Vv=function(){ge(this,Pc,Kv).call(this);const t=Yi(this.options.staleTime,T(this,Se));if(Ya||T(this,Ut).isStale||!Fv(t))return;const n=jA(T(this,Ut).dataUpdatedAt,t)+1;te(this,La,setTimeout(()=>{T(this,Ut).isStale||this.updateResult()},n))},Ec=new WeakSet,Wv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,Se)):this.options.refetchInterval)??!1},jc=new WeakSet,qv=function(t){ge(this,Ac,Gv).call(this),te(this,Ii,t),!(Ya||en(this.options.enabled,T(this,Se))===!1||!Fv(T(this,Ii))||T(this,Ii)===0)&&te(this,Fa,setInterval(()=>{(this.options.refetchIntervalInBackground||Bx.isFocused())&&ge(this,Ba,Xl).call(this)},T(this,Ii)))},kc=new WeakSet,Hv=function(){ge(this,_c,Vv).call(this),ge(this,jc,qv).call(this,ge(this,Ec,Wv).call(this))},Pc=new WeakSet,Kv=function(){T(this,La)&&(clearTimeout(T(this,La)),te(this,La,void 0))},Ac=new WeakSet,Gv=function(){T(this,Fa)&&(clearInterval(T(this,Fa)),te(this,Fa,void 0))},Tc=new WeakSet,Xv=function(){const t=T(this,tr).getQueryCache().build(T(this,tr),this.options);if(t===T(this,Se))return;const r=T(this,Se);te(this,Se,t),te(this,Sc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Xh=new WeakSet,RA=function(t){pt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(T(this,Ut))}),T(this,tr).getQueryCache().notify({query:T(this,Se),type:"observerResultsUpdated"})})},tk);function MD(e,t){return en(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function qw(e,t){return MD(e,t)||e.state.data!==void 0&&Qv(e,t,t.refetchOnMount)}function Qv(e,t,r){if(en(t.enabled,e)!==!1&&Yi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&zx(e,t)}return!1}function Hw(e,t,r,n){return(e!==t||en(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&zx(e,r)}function zx(e,t){return en(t.enabled,e)!==!1&&e.isStaleByTime(Yi(t.staleTime,e))}function ID(e,t){return!Id(e.getCurrentResult(),t)}var Ri,Di,rr,Hn,ms,Yf,$c,Yv,rk,RD=(rk=class extends nl{constructor(r,n){super();ae(this,ms);ae(this,$c);ae(this,Ri,void 0);ae(this,Di,void 0);ae(this,rr,void 0);ae(this,Hn,void 0);te(this,Ri,r),this.setOptions(n),this.bindMethods(),ge(this,ms,Yf).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=T(this,Ri).defaultMutationOptions(r),Id(this.options,n)||T(this,Ri).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,rr),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Za(n.mutationKey)!==Za(this.options.mutationKey)?this.reset():((i=T(this,rr))==null?void 0:i.state.status)==="pending"&&T(this,rr).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=T(this,rr))==null||r.removeObserver(this)}onMutationUpdate(r){ge(this,ms,Yf).call(this),ge(this,$c,Yv).call(this,r)}getCurrentResult(){return T(this,Di)}reset(){var r;(r=T(this,rr))==null||r.removeObserver(this),te(this,rr,void 0),ge(this,ms,Yf).call(this),ge(this,$c,Yv).call(this)}mutate(r,n){var i;return te(this,Hn,n),(i=T(this,rr))==null||i.removeObserver(this),te(this,rr,T(this,Ri).getMutationCache().build(T(this,Ri),this.options)),T(this,rr).addObserver(this),T(this,rr).execute(r)}},Ri=new WeakMap,Di=new WeakMap,rr=new WeakMap,Hn=new WeakMap,ms=new WeakSet,Yf=function(){var n;const r=((n=T(this,rr))==null?void 0:n.state)??IA();te(this,Di,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},$c=new WeakSet,Yv=function(r){pt.batch(()=>{var n,i,a,o,s,l,u,f;if(T(this,Hn)&&this.hasListeners()){const c=T(this,Di).variables,d=T(this,Di).context;(r==null?void 0:r.type)==="success"?((i=(n=T(this,Hn)).onSuccess)==null||i.call(n,r.data,c,d),(o=(a=T(this,Hn)).onSettled)==null||o.call(a,r.data,null,c,d)):(r==null?void 0:r.type)==="error"&&((l=(s=T(this,Hn)).onError)==null||l.call(s,r.error,c,d),(f=(u=T(this,Hn)).onSettled)==null||f.call(u,void 0,r.error,c,d))}this.listeners.forEach(c=>{c(T(this,Di))})})},rk),DA=k.createContext(void 0),co=e=>{const t=k.useContext(DA);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},DD=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(DA.Provider,{value:e,children:t})),LA=k.createContext(!1),LD=()=>k.useContext(LA);LA.Provider;function FD(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var BD=k.createContext(FD()),zD=()=>k.useContext(BD),UD=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},VD=e=>{k.useEffect(()=>{e.clearReset()},[e])},WD=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||AA(r,[e.error,n])),qD=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},HD=(e,t)=>e.isLoading&&e.isFetching&&!t,KD=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Kw=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function GD(e,t,r){var c,d,h,m,y;const n=LD(),i=zD(),a=co(r),o=a.defaultQueryOptions(e);(d=(c=a.getDefaultOptions().queries)==null?void 0:c._experimental_beforeQuery)==null||d.call(c,o),o._optimisticResults=n?"isRestoring":"optimistic",qD(o),UD(o,i),VD(i);const s=!a.getQueryCache().get(o.queryHash),[l]=k.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),f=!n&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(g=>{const b=f?l.subscribe(pt.batchCalls(g)):Wt;return l.updateResult(),b},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),k.useEffect(()=>{l.setOptions(o)},[o,l]),KD(o,u))throw Kw(o,l,i);if(WD({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((m=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||m.call(h,o,u),o.experimental_prefetchInRender&&!Ya&&HD(u,n)){const g=s?Kw(o,l,i):(y=a.getQueryCache().get(o.queryHash))==null?void 0:y.promise;g==null||g.catch(Wt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function mp(e,t){return GD(e,CD,t)}function il(e,t){const r=co(t),[n]=k.useState(()=>new RD(r,e));k.useEffect(()=>{n.setOptions(e)},[n,e]);const i=k.useSyncExternalStore(k.useCallback(o=>n.subscribe(pt.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),a=k.useCallback((o,s)=>{n.mutate(o,s).catch(Wt)},[n]);if(i.error&&AA(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var XD=function(){return null};let QD={data:""},YD=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||QD,ZD=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,JD=/\/\*[^]*?\*\/| +/g,Gw=/\n+/g,Ei=(e,t)=>{let r="",n="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?r=a+" "+o+";":n+=a[1]=="f"?Ei(o,a):a+"{"+Ei(o,a[1]=="k"?"":t)+"}":typeof o=="object"?n+=Ei(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Ei.p?Ei.p(a,o):a+":"+o+";")}return r+(t&&i?t+"{"+i+"}":i)+n},Dn={},FA=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+FA(e[r]);return t}return e},eL=(e,t,r,n,i)=>{let a=FA(e),o=Dn[a]||(Dn[a]=(l=>{let u=0,f=11;for(;u>>0;return"go"+f})(a));if(!Dn[o]){let l=a!==e?e:(u=>{let f,c,d=[{}];for(;f=ZD.exec(u.replace(JD,""));)f[4]?d.shift():f[3]?(c=f[3].replace(Gw," ").trim(),d.unshift(d[0][c]=d[0][c]||{})):d[0][f[1]]=f[2].replace(Gw," ").trim();return d[0]})(e);Dn[o]=Ei(i?{["@keyframes "+o]:l}:l,r?"":"."+o)}let s=r&&Dn.g?Dn.g:null;return r&&(Dn.g=Dn[o]),((l,u,f,c)=>{c?u.data=u.data.replace(c,l):u.data.indexOf(l)===-1&&(u.data=f?l+u.data:u.data+l)})(Dn[o],t,n,s),o},tL=(e,t,r)=>e.reduce((n,i,a)=>{let o=t[a];if(o&&o.call){let s=o(r),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":Ei(s,""):s===!1?"":s}return n+i+(o??"")},"");function yp(e){let t=this||{},r=e.call?e(t.p):e;return eL(r.unshift?r.raw?tL(r,[].slice.call(arguments,1),t.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(t.p):i),{}):r,YD(t.target),t.g,t.o,t.k)}let BA,Zv,Jv;yp.bind({g:1});let oi=yp.bind({k:1});function rL(e,t,r,n){Ei.p=t,BA=e,Zv=r,Jv=n}function oa(e,t){let r=this||{};return function(){let n=arguments;function i(a,o){let s=Object.assign({},a),l=s.className||i.className;r.p=Object.assign({theme:Zv&&Zv()},s),r.o=/ *go\d+/.test(l),s.className=yp.apply(r,n)+(l?" "+l:""),t&&(s.ref=o);let u=e;return e[0]&&(u=s.as||e,delete s.as),Jv&&u[0]&&Jv(s),BA(u,s)}return t?t(i):i}}var nL=e=>typeof e=="function",Dd=(e,t)=>nL(e)?e(t):e,iL=(()=>{let e=0;return()=>(++e).toString()})(),zA=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),aL=20,UA=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,aL)};case 1:return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:r}=t;return UA(e,{type:e.toasts.find(a=>a.id===r.id)?1:0,toast:r});case 3:let{toastId:n}=t;return{...e,toasts:e.toasts.map(a=>a.id===n||n===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Zf=[],Oa={toasts:[],pausedAt:void 0},fo=e=>{Oa=UA(Oa,e),Zf.forEach(t=>{t(Oa)})},oL={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},sL=(e={})=>{let[t,r]=k.useState(Oa),n=k.useRef(Oa);k.useEffect(()=>(n.current!==Oa&&r(Oa),Zf.push(r),()=>{let a=Zf.indexOf(r);a>-1&&Zf.splice(a,1)}),[]);let i=t.toasts.map(a=>{var o,s,l;return{...e,...e[a.type],...a,removeDelay:a.removeDelay||((o=e[a.type])==null?void 0:o.removeDelay)||(e==null?void 0:e.removeDelay),duration:a.duration||((s=e[a.type])==null?void 0:s.duration)||(e==null?void 0:e.duration)||oL[a.type],style:{...e.style,...(l=e[a.type])==null?void 0:l.style,...a.style}}});return{...t,toasts:i}},lL=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||iL()}),Dc=e=>(t,r)=>{let n=lL(t,e,r);return fo({type:2,toast:n}),n.id},Ht=(e,t)=>Dc("blank")(e,t);Ht.error=Dc("error");Ht.success=Dc("success");Ht.loading=Dc("loading");Ht.custom=Dc("custom");Ht.dismiss=e=>{fo({type:3,toastId:e})};Ht.remove=e=>fo({type:4,toastId:e});Ht.promise=(e,t,r)=>{let n=Ht.loading(t.loading,{...r,...r==null?void 0:r.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let a=t.success?Dd(t.success,i):void 0;return a?Ht.success(a,{id:n,...r,...r==null?void 0:r.success}):Ht.dismiss(n),i}).catch(i=>{let a=t.error?Dd(t.error,i):void 0;a?Ht.error(a,{id:n,...r,...r==null?void 0:r.error}):Ht.dismiss(n)}),e};var uL=(e,t)=>{fo({type:1,toast:{id:e,height:t}})},cL=()=>{fo({type:5,time:Date.now()})},ou=new Map,fL=1e3,dL=(e,t=fL)=>{if(ou.has(e))return;let r=setTimeout(()=>{ou.delete(e),fo({type:4,toastId:e})},t);ou.set(e,r)},hL=e=>{let{toasts:t,pausedAt:r}=sL(e);k.useEffect(()=>{if(r)return;let a=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(l<0){s.visible&&Ht.dismiss(s.id);return}return setTimeout(()=>Ht.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,r]);let n=k.useCallback(()=>{r&&fo({type:6,time:Date.now()})},[r]),i=k.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:u}=o||{},f=t.filter(h=>(h.position||u)===(a.position||u)&&h.height),c=f.findIndex(h=>h.id===a.id),d=f.filter((h,m)=>mh.visible).slice(...s?[d+1]:[0,d]).reduce((h,m)=>h+(m.height||0)+l,0)},[t]);return k.useEffect(()=>{t.forEach(a=>{if(a.dismissed)dL(a.id,a.removeDelay);else{let o=ou.get(a.id);o&&(clearTimeout(o),ou.delete(a.id))}})},[t]),{toasts:t,handlers:{updateHeight:uL,startPause:cL,endPause:n,calculateOffset:i}}},pL=oi` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,mL=oi` +from { + transform: scale(0); + opacity: 0; +} +to { + transform: scale(1); + opacity: 1; +}`,yL=oi` +from { + transform: scale(0) rotate(90deg); + opacity: 0; +} +to { + transform: scale(1) rotate(90deg); + opacity: 1; +}`,vL=oa("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#ff4b4b"}; + position: relative; + transform: rotate(45deg); + + animation: ${pL} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + + &:after, + &:before { + content: ''; + animation: ${mL} 0.15s ease-out forwards; + animation-delay: 150ms; + position: absolute; + border-radius: 3px; + opacity: 0; + background: ${e=>e.secondary||"#fff"}; + bottom: 9px; + left: 4px; + height: 2px; + width: 12px; + } + + &:before { + animation: ${yL} 0.15s ease-out forwards; + animation-delay: 180ms; + transform: rotate(90deg); + } +`,gL=oi` + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +`,xL=oa("div")` + width: 12px; + height: 12px; + box-sizing: border-box; + border: 2px solid; + border-radius: 100%; + border-color: ${e=>e.secondary||"#e0e0e0"}; + border-right-color: ${e=>e.primary||"#616161"}; + animation: ${gL} 1s linear infinite; +`,bL=oi` +from { + transform: scale(0) rotate(45deg); + opacity: 0; +} +to { + transform: scale(1) rotate(45deg); + opacity: 1; +}`,wL=oi` +0% { + height: 0; + width: 0; + opacity: 0; +} +40% { + height: 0; + width: 6px; + opacity: 1; +} +100% { + opacity: 1; + height: 10px; +}`,SL=oa("div")` + width: 20px; + opacity: 0; + height: 20px; + border-radius: 10px; + background: ${e=>e.primary||"#61d345"}; + position: relative; + transform: rotate(45deg); + + animation: ${bL} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; + animation-delay: 100ms; + &:after { + content: ''; + box-sizing: border-box; + animation: ${wL} 0.2s ease-out forwards; + opacity: 0; + animation-delay: 200ms; + position: absolute; + border-right: 2px solid; + border-bottom: 2px solid; + border-color: ${e=>e.secondary||"#fff"}; + bottom: 6px; + left: 6px; + height: 10px; + width: 6px; + } +`,OL=oa("div")` + position: absolute; +`,_L=oa("div")` + position: relative; + display: flex; + justify-content: center; + align-items: center; + min-width: 20px; + min-height: 20px; +`,EL=oi` +from { + transform: scale(0.6); + opacity: 0.4; +} +to { + transform: scale(1); + opacity: 1; +}`,jL=oa("div")` + position: relative; + transform: scale(0.6); + opacity: 0.4; + min-width: 20px; + animation: ${EL} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) + forwards; +`,kL=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?k.createElement(jL,null,t):t:r==="blank"?null:k.createElement(_L,null,k.createElement(xL,{...n}),r!=="loading"&&k.createElement(OL,null,r==="error"?k.createElement(vL,{...n}):k.createElement(SL,{...n})))},PL=e=>` +0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} +100% {transform: translate3d(0,0,0) scale(1); opacity:1;} +`,AL=e=>` +0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} +100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} +`,TL="0%{opacity:0;} 100%{opacity:1;}",$L="0%{opacity:1;} 100%{opacity:0;}",NL=oa("div")` + display: flex; + align-items: center; + background: #fff; + color: #363636; + line-height: 1.3; + will-change: transform; + box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); + max-width: 350px; + pointer-events: auto; + padding: 8px 10px; + border-radius: 8px; +`,CL=oa("div")` + display: flex; + justify-content: center; + margin: 4px 10px; + color: inherit; + flex: 1 1 auto; + white-space: pre-line; +`,ML=(e,t)=>{let r=e.includes("top")?1:-1,[n,i]=zA()?[TL,$L]:[PL(r),AL(r)];return{animation:t?`${oi(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${oi(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},IL=k.memo(({toast:e,position:t,style:r,children:n})=>{let i=e.height?ML(e.position||t||"top-center",e.visible):{opacity:0},a=k.createElement(kL,{toast:e}),o=k.createElement(CL,{...e.ariaProps},Dd(e.message,e));return k.createElement(NL,{className:e.className,style:{...i,...r,...e.style}},typeof n=="function"?n({icon:a,message:o}):k.createElement(k.Fragment,null,a,o))});rL(k.createElement);var RL=({id:e,className:t,style:r,onHeightUpdate:n,children:i})=>{let a=k.useCallback(o=>{if(o){let s=()=>{let l=o.getBoundingClientRect().height;n(e,l)};s(),new MutationObserver(s).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return k.createElement("div",{ref:a,className:t,style:r},i)},DL=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:zA()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...i}},LL=yp` + z-index: 9999; + > * { + pointer-events: auto; + } +`,wf=16,FL=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:l}=hL(r);return k.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:wf,left:wf,right:wf,bottom:wf,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(u=>{let f=u.position||t,c=l.calculateOffset(u,{reverseOrder:e,gutter:n,defaultPosition:t}),d=DL(f,c);return k.createElement(RL,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?LL:"",style:d},u.type==="custom"?Dd(u.message,u):i?i(u):k.createElement(IL,{toast:u,position:f}))}))},nt=Ht;const VA=k.createContext(void 0),BL=(e,t)=>{switch(t.type){case"LOGIN_SUCCESS":return{isAuthenticated:!0,user:t.payload.user,permissions:t.payload.permissions,allPermissions:t.payload.allPermissions,token:t.payload.token,refreshToken:t.payload.refreshToken};case"LOGOUT":return{isAuthenticated:!1,user:null,permissions:[],allPermissions:[],token:null,refreshToken:null};case"RESTORE_SESSION":return{isAuthenticated:!0,user:t.payload.user,permissions:t.payload.permissions,allPermissions:t.payload.allPermissions,token:t.payload.token,refreshToken:t.payload.refreshToken};default:return e}},zL={isAuthenticated:!1,user:null,permissions:[],allPermissions:[],token:null,refreshToken:null},UL=({children:e})=>{const[t,r]=k.useReducer(BL,zL),n=()=>{const s=localStorage.getItem("admin_token"),l=localStorage.getItem("admin_refresh_token"),u=localStorage.getItem("admin_user"),f=localStorage.getItem("admin_permissions"),c=localStorage.getItem("admin_all_permissions");if(s&&u&&f)try{const d=JSON.parse(u),h=JSON.parse(f),m=c?JSON.parse(c):[];r({type:"RESTORE_SESSION",payload:{user:d,permissions:h,allPermissions:m,token:s,refreshToken:l||""}})}catch{localStorage.removeItem("admin_token"),localStorage.removeItem("admin_refresh_token"),localStorage.removeItem("admin_user"),localStorage.removeItem("admin_permissions"),localStorage.removeItem("admin_all_permissions")}};k.useEffect(()=>{n()},[]);const i=()=>{localStorage.removeItem("admin_token"),localStorage.removeItem("admin_refresh_token"),localStorage.removeItem("admin_user"),localStorage.removeItem("admin_permissions"),localStorage.removeItem("admin_all_permissions"),r({type:"LOGOUT"}),nt.success("خروج موفقیت‌آمیز بود")},a=s=>t.permissions.some(l=>l.id===s),o=s=>t.permissions.some(l=>l.title===s);return p.jsx(VA.Provider,{value:{...t,logout:i,hasPermission:a,hasPermissionByTitle:o,restoreSession:n},children:e})},Lc=()=>{const e=k.useContext(VA);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e},WA=k.createContext(void 0),VL=({children:e})=>{const[t,r]=k.useState("light");k.useEffect(()=>{const i=localStorage.getItem("admin_theme"),a=window.matchMedia("(prefers-color-scheme: dark)").matches,o=i||(a?"dark":"light");r(o),o==="dark"&&document.documentElement.classList.add("dark")},[]);const n=()=>{const i=t==="light"?"dark":"light";r(i),localStorage.setItem("admin_theme",i),i==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")};return p.jsx(WA.Provider,{value:{mode:t,toggleTheme:n},children:e})},WL=()=>{const e=k.useContext(WA);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},qL=k.createContext(void 0),gi={duration:4e3,position:"top-center",style:{fontFamily:"inherit",direction:"rtl"}},HL=({children:e})=>{const t=(l,u)=>{nt.success(l,{...gi,...u})},r=(l,u)=>{nt.error(l,{...gi,...u})},n=(l,u)=>{nt(l,{...gi,icon:"⚠️",style:{...gi.style,backgroundColor:"#fef3c7",color:"#92400e"},...u})},i=(l,u)=>{nt(l,{...gi,icon:"ℹ️",style:{...gi.style,backgroundColor:"#dbeafe",color:"#1e40af"},...u})},a=(l,u)=>nt.loading(l,{...gi,...u}),o=l=>{nt.dismiss(l)},s=(l,u,f)=>nt.promise(l,u,{...gi,...f});return p.jsxs(qL.Provider,{value:{success:t,error:r,warning:n,info:i,loading:a,dismiss:o,promise:s},children:[e,p.jsx(FL,{position:"top-center",reverseOrder:!1,gutter:8,containerStyle:{direction:"rtl"},toastOptions:{duration:4e3,style:{background:"var(--toast-bg)",color:"var(--toast-color)",fontFamily:"inherit",direction:"rtl"},success:{iconTheme:{primary:"#10b981",secondary:"#ffffff"}},error:{iconTheme:{primary:"#ef4444",secondary:"#ffffff"}}}})]})};var KL={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"};const GL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),XL=(e,t)=>{const r=k.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:o,children:s,...l},u)=>k.createElement("svg",{ref:u,...KL,width:i,height:i,stroke:n,strokeWidth:o?Number(a)*24/Number(i):a,className:`lucide lucide-${GL(e)}`,...l},[...t.map(([f,c])=>k.createElement(f,c)),...(Array.isArray(s)?s:[s])||[]]));return r.displayName=`${e}`,r};var pe=XL;const oy=pe("AlertCircle",[["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"}]]),QL=pe("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Ux=pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),su=pe("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]),YL=pe("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]),ZL=pe("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["polyline",{points:"22 4 12 14.01 9 11.01",key:"6xbx8j"}]]),eg=pe("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),qA=pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),JL=pe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),e3=pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),t3=pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),HA=pe("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]),r3=pe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),n3=pe("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]),KA=pe("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Ld=pe("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]),Vx=pe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),i3=pe("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]),a3=pe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),GA=pe("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),o3=pe("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Xw=pe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),s3=pe("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),l3=pe("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),u3=pe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),c3=pe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),sy=pe("Package",[["path",{d:"M16.5 9.4 7.55 4.24",key:"10qotr"}],["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]),XA=pe("PenSquare",[["path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1qinfi"}],["path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z",key:"w2jsv5"}]]),f3=pe("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]),_s=pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),d3=pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),vp=pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),h3=pe("Shield",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",key:"3xmgem"}]]),Wx=pe("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]),tg=pe("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]),p3=pe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),QA=pe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),m3=pe("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]),Du=pe("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),y3=pe("UserCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]),qx=pe("User",[["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"}]]),Es=pe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),Qw=pe("XCircle",[["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"}]]),Hx=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function YA(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 l="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",u={primary:"bg-primary-600 hover:bg-primary-700 text-white focus:ring-primary-500",secondary:"bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-gray-100 focus:ring-gray-500",danger:"bg-red-600 hover:bg-red-700 text-white focus:ring-red-500",success:"bg-green-600 hover:bg-green-700 text-white focus:ring-green-500"},f={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},c=n||i?"opacity-50 cursor-not-allowed pointer-events-none":"";return p.jsxs("button",{type:o,onClick:a,disabled:n||i,className:he(l,u[t],f[r],c,s),children:[i&&p.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[p.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),p.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e]})};class v3 extends k.Component{constructor(r){super(r);Jc(this,"logErrorToService",(r,n)=>{console.log("Error logged to service:",{error:r,errorInfo:n})});Jc(this,"handleRetry",()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})});Jc(this,"handleGoHome",()=>{window.location.href="/"});this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0}}componentDidCatch(r,n){this.setState({error:r,errorInfo:n}),console.error("ErrorBoundary caught an error:",r,n),this.logErrorToService(r,n)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:p.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center p-4",children:p.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 text-center",children:[p.jsx("div",{className:"mb-4",children:p.jsx(QL,{className:"h-16 w-16 text-red-500 mx-auto"})}),p.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-gray-100 mb-2",children:"خطایی رخ داده است"}),p.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:"متأسفانه مشکلی در برنامه رخ داده است. لطفاً دوباره تلاش کنید یا با پشتیبانی تماس بگیرید."}),!1,p.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[p.jsxs(ce,{onClick:this.handleRetry,className:"flex-1",variant:"primary",children:[p.jsx(d3,{className:"h-4 w-4 ml-2"}),"تلاش دوباره"]}),p.jsxs(ce,{onClick:this.handleGoHome,className:"flex-1",variant:"secondary",children:[p.jsx(i3,{className:"h-4 w-4 ml-2"}),"بازگشت به خانه"]})]})]})}):this.props.children}}const g3=new ND({defaultOptions:{queries:{retry:(e,t)=>{var r,n,i;return((r=t==null?void 0:t.response)==null?void 0:r.status)===404||((n=t==null?void 0:t.response)==null?void 0:n.status)===403||((i=t==null?void 0:t.response)==null?void 0:i.status)===401?!1:e<2},staleTime:5*60*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!0},mutations:{onError:e=>{var r,n;const t=((n=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:n.message)||(e==null?void 0:e.message)||"خطایی رخ داده است";nt.error(t)}}}});var Fc=e=>e.type==="checkbox",_a=e=>e instanceof Date,qt=e=>e==null;const ZA=e=>typeof e=="object";var at=e=>!qt(e)&&!Array.isArray(e)&&ZA(e)&&!_a(e),x3=e=>at(e)&&e.target?Fc(e.target)?e.target.checked:e.target.value:e,b3=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,w3=(e,t)=>e.has(b3(t)),S3=e=>{const t=e.constructor&&e.constructor.prototype;return at(t)&&t.hasOwnProperty("isPrototypeOf")},Kx=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ct(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Kx&&(e instanceof Blob||n))&&(r||at(e)))if(t=r?[]:{},!r&&!S3(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Ct(e[i]));else return e;return t}var gp=e=>Array.isArray(e)?e.filter(Boolean):[],st=e=>e===void 0,ie=(e,t,r)=>{if(!t||!at(e))return r;const n=gp(t.split(/[,[\].]+?/)).reduce((i,a)=>qt(i)?i:i[a],e);return st(n)||n===e?st(e[t])?r:e[t]:n},mn=e=>typeof e=="boolean",Gx=e=>/^\w*$/.test(e),JA=e=>gp(e.replace(/["|']|\]/g,"").split(/\.|\[/)),$e=(e,t,r)=>{let n=-1;const i=Gx(t)?[t]:JA(t),a=i.length,o=a-1;for(;++n{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==tn.all&&(t._proxyFormState[o]=!n||tn.all),r&&(r[o]=!0),e[o]}});return i};const _3=typeof window<"u"?k.useLayoutEffect:k.useEffect;var wn=e=>typeof e=="string",E3=(e,t,r,n,i)=>wn(e)?(n&&t.watch.add(e),ie(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),ie(r,a))):(n&&(t.watchAll=!0),r),e2=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},lu=e=>Array.isArray(e)?e:[e],Zw=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},rg=e=>qt(e)||!ZA(e);function ji(e,t){if(rg(e)||rg(t))return e===t;if(_a(e)&&_a(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const o=t[i];if(_a(a)&&_a(o)||at(a)&&at(o)||Array.isArray(a)&&Array.isArray(o)?!ji(a,o):a!==o)return!1}}return!0}var nr=e=>at(e)&&!Object.keys(e).length,Xx=e=>e.type==="file",rn=e=>typeof e=="function",Fd=e=>{if(!Kx)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},t2=e=>e.type==="select-multiple",Qx=e=>e.type==="radio",j3=e=>Qx(e)||Fc(e),ly=e=>Fd(e)&&e.isConnected;function k3(e,t){const r=t.slice(0,-1).length;let n=0;for(;n{for(const t in e)if(rn(e[t]))return!0;return!1};function Bd(e,t={}){const r=Array.isArray(e);if(at(e)||r)for(const n in e)Array.isArray(e[n])||at(e[n])&&!r2(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Bd(e[n],t[n])):qt(e[n])||(t[n]=!0);return t}function n2(e,t,r){const n=Array.isArray(e);if(at(e)||n)for(const i in e)Array.isArray(e[i])||at(e[i])&&!r2(e[i])?st(t)||rg(r[i])?r[i]=Array.isArray(e[i])?Bd(e[i],[]):{...Bd(e[i])}:n2(e[i],qt(t)?{}:t[i],r[i]):r[i]=!ji(e[i],t[i]);return r}var $l=(e,t)=>n2(e,t,Bd(t));const Jw={value:!1,isValid:!1},eS={value:!0,isValid:!0};var i2=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!st(e[0].attributes.value)?st(e[0].value)||e[0].value===""?eS:{value:e[0].value,isValid:!0}:eS:Jw}return Jw},a2=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>st(e)?e:t?e===""?NaN:e&&+e:r&&wn(e)?new Date(e):n?n(e):e;const tS={isValid:!1,value:null};var o2=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,tS):tS;function rS(e){const t=e.ref;return Xx(t)?t.files:Qx(t)?o2(e.refs).value:t2(t)?[...t.selectedOptions].map(({value:r})=>r):Fc(t)?i2(e.refs).value:a2(st(t.value)?e.ref.value:t.value,e)}var A3=(e,t,r,n)=>{const i={};for(const a of e){const o=ie(t,a);o&&$e(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},zd=e=>e instanceof RegExp,Nl=e=>st(e)?e:zd(e)?e.source:at(e)?zd(e.value)?e.value.source:e.value:e,nS=e=>({isOnSubmit:!e||e===tn.onSubmit,isOnBlur:e===tn.onBlur,isOnChange:e===tn.onChange,isOnAll:e===tn.all,isOnTouch:e===tn.onTouched});const iS="AsyncFunction";var T3=e=>!!e&&!!e.validate&&!!(rn(e.validate)&&e.validate.constructor.name===iS||at(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===iS)),$3=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),aS=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const uu=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=ie(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(uu(s,t))break}else if(at(s)&&uu(s,t))break}}};function oS(e,t,r){const n=ie(e,r);if(n||Gx(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=ie(t,a),s=ie(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var N3=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return nr(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||tn.all))},C3=(e,t,r)=>!e||!t||e===t||lu(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),M3=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,I3=(e,t)=>!gp(ie(e,t)).length&&dt(e,t),R3=(e,t,r)=>{const n=lu(ie(e,r));return $e(n,"root",t[r]),$e(e,r,n),e},Jf=e=>wn(e);function sS(e,t,r="validate"){if(Jf(e)||Array.isArray(e)&&e.every(Jf)||mn(e)&&!e)return{type:r,message:Jf(e)?e:"",ref:t}}var wo=e=>at(e)&&!zd(e)?e:{value:e,message:""},lS=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:l,maxLength:u,minLength:f,min:c,max:d,pattern:h,validate:m,name:y,valueAsNumber:g,mount:b}=e._f,v=ie(r,y);if(!b||t.has(y))return{};const x=s?s[0]:o,O=C=>{i&&x.reportValidity&&(x.setCustomValidity(mn(C)?"":C||""),x.reportValidity())},w={},S=Qx(o),_=Fc(o),E=S||_,j=(g||Xx(o))&&st(o.value)&&st(v)||Fd(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,N=e2.bind(null,y,n,w),A=(C,M,D,L=Ln.maxLength,B=Ln.minLength)=>{const W=C?M:D;w[y]={type:C?L:B,message:W,ref:o,...N(C?L:B,W)}};if(a?!Array.isArray(v)||!v.length:l&&(!E&&(j||qt(v))||mn(v)&&!v||_&&!i2(s).isValid||S&&!o2(s).isValid)){const{value:C,message:M}=Jf(l)?{value:!!l,message:l}:wo(l);if(C&&(w[y]={type:Ln.required,message:M,ref:x,...N(Ln.required,M)},!n))return O(M),w}if(!j&&(!qt(c)||!qt(d))){let C,M;const D=wo(d),L=wo(c);if(!qt(v)&&!isNaN(v)){const B=o.valueAsNumber||v&&+v;qt(D.value)||(C=B>D.value),qt(L.value)||(M=Bnew Date(new Date().toDateString()+" "+H),R=o.type=="time",z=o.type=="week";wn(D.value)&&v&&(C=R?W(v)>W(D.value):z?v>D.value:B>new Date(D.value)),wn(L.value)&&v&&(M=R?W(v)+C.value,L=!qt(M.value)&&v.length<+M.value;if((D||L)&&(A(D,C.message,M.message),!n))return O(w[y].message),w}if(h&&!j&&wn(v)){const{value:C,message:M}=wo(h);if(zd(C)&&!v.match(C)&&(w[y]={type:Ln.pattern,message:M,ref:o,...N(Ln.pattern,M)},!n))return O(M),w}if(m){if(rn(m)){const C=await m(v,r),M=sS(C,x);if(M&&(w[y]={...M,...N(Ln.validate,M.message)},!n))return O(M.message),w}else if(at(m)){let C={};for(const M in m){if(!nr(C)&&!n)break;const D=sS(await m[M](v,r),x,M);D&&(C={...D,...N(M,D.message)},O(D.message),n&&(w[y]=C))}if(!nr(C)&&(w[y]={ref:x,...C},!n))return w}}return O(!0),w};const D3={mode:tn.onSubmit,reValidateMode:tn.onChange,shouldFocusError:!0};function L3(e={}){let t={...D3,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:rn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const n={};let i=at(t.defaultValues)||at(t.values)?Ct(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Ct(i),o={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let c={...f};const d={array:Zw(),state:Zw()},h=t.criteriaMode===tn.all,m=$=>I=>{clearTimeout(u),u=setTimeout($,I)},y=async $=>{if(!t.disabled&&(f.isValid||c.isValid||$)){const I=t.resolver?nr((await _()).errors):await j(n,!0);I!==r.isValid&&d.state.next({isValid:I})}},g=($,I)=>{!t.disabled&&(f.isValidating||f.validatingFields||c.isValidating||c.validatingFields)&&(($||Array.from(s.mount)).forEach(U=>{U&&(I?$e(r.validatingFields,U,I):dt(r.validatingFields,U))}),d.state.next({validatingFields:r.validatingFields,isValidating:!nr(r.validatingFields)}))},b=($,I=[],U,ee,Y=!0,X=!0)=>{if(ee&&U&&!t.disabled){if(o.action=!0,X&&Array.isArray(ie(n,$))){const se=U(ie(n,$),ee.argA,ee.argB);Y&&$e(n,$,se)}if(X&&Array.isArray(ie(r.errors,$))){const se=U(ie(r.errors,$),ee.argA,ee.argB);Y&&$e(r.errors,$,se),I3(r.errors,$)}if((f.touchedFields||c.touchedFields)&&X&&Array.isArray(ie(r.touchedFields,$))){const se=U(ie(r.touchedFields,$),ee.argA,ee.argB);Y&&$e(r.touchedFields,$,se)}(f.dirtyFields||c.dirtyFields)&&(r.dirtyFields=$l(i,a)),d.state.next({name:$,isDirty:A($,I),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else $e(a,$,I)},v=($,I)=>{$e(r.errors,$,I),d.state.next({errors:r.errors})},x=$=>{r.errors=$,d.state.next({errors:r.errors,isValid:!1})},O=($,I,U,ee)=>{const Y=ie(n,$);if(Y){const X=ie(a,$,st(U)?ie(i,$):U);st(X)||ee&&ee.defaultChecked||I?$e(a,$,I?X:rS(Y._f)):D($,X),o.mount&&y()}},w=($,I,U,ee,Y)=>{let X=!1,se=!1;const Pe={name:$};if(!t.disabled){if(!U||ee){(f.isDirty||c.isDirty)&&(se=r.isDirty,r.isDirty=Pe.isDirty=A(),X=se!==Pe.isDirty);const Ie=ji(ie(i,$),I);se=!!ie(r.dirtyFields,$),Ie?dt(r.dirtyFields,$):$e(r.dirtyFields,$,!0),Pe.dirtyFields=r.dirtyFields,X=X||(f.dirtyFields||c.dirtyFields)&&se!==!Ie}if(U){const Ie=ie(r.touchedFields,$);Ie||($e(r.touchedFields,$,U),Pe.touchedFields=r.touchedFields,X=X||(f.touchedFields||c.touchedFields)&&Ie!==U)}X&&Y&&d.state.next(Pe)}return X?Pe:{}},S=($,I,U,ee)=>{const Y=ie(r.errors,$),X=(f.isValid||c.isValid)&&mn(I)&&r.isValid!==I;if(t.delayError&&U?(l=m(()=>v($,U)),l(t.delayError)):(clearTimeout(u),l=null,U?$e(r.errors,$,U):dt(r.errors,$)),(U?!ji(Y,U):Y)||!nr(ee)||X){const se={...ee,...X&&mn(I)?{isValid:I}:{},errors:r.errors,name:$};r={...r,...se},d.state.next(se)}},_=async $=>{g($,!0);const I=await t.resolver(a,t.context,A3($||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return g($),I},E=async $=>{const{errors:I}=await _($);if($)for(const U of $){const ee=ie(I,U);ee?$e(r.errors,U,ee):dt(r.errors,U)}else r.errors=I;return I},j=async($,I,U={valid:!0})=>{for(const ee in $){const Y=$[ee];if(Y){const{_f:X,...se}=Y;if(X){const Pe=s.array.has(X.name),Ie=Y._f&&T3(Y._f);Ie&&f.validatingFields&&g([ee],!0);const Pr=await lS(Y,s.disabled,a,h,t.shouldUseNativeValidation&&!I,Pe);if(Ie&&f.validatingFields&&g([ee]),Pr[X.name]&&(U.valid=!1,I))break;!I&&(ie(Pr,X.name)?Pe?R3(r.errors,Pr,X.name):$e(r.errors,X.name,Pr[X.name]):dt(r.errors,X.name))}!nr(se)&&await j(se,I,U)}}return U.valid},N=()=>{for(const $ of s.unMount){const I=ie(n,$);I&&(I._f.refs?I._f.refs.every(U=>!ly(U)):!ly(I._f.ref))&&At($)}s.unMount=new Set},A=($,I)=>!t.disabled&&($&&I&&$e(a,$,I),!ji(H(),i)),C=($,I,U)=>E3($,s,{...o.mount?a:st(I)?i:wn($)?{[$]:I}:I},U,I),M=$=>gp(ie(o.mount?a:i,$,t.shouldUnregister?ie(i,$,[]):[])),D=($,I,U={})=>{const ee=ie(n,$);let Y=I;if(ee){const X=ee._f;X&&(!X.disabled&&$e(a,$,a2(I,X)),Y=Fd(X.ref)&&qt(I)?"":I,t2(X.ref)?[...X.ref.options].forEach(se=>se.selected=Y.includes(se.value)):X.refs?Fc(X.ref)?X.refs.forEach(se=>{(!se.defaultChecked||!se.disabled)&&(Array.isArray(Y)?se.checked=!!Y.find(Pe=>Pe===se.value):se.checked=Y===se.value||!!Y)}):X.refs.forEach(se=>se.checked=se.value===Y):Xx(X.ref)?X.ref.value="":(X.ref.value=Y,X.ref.type||d.state.next({name:$,values:Ct(a)})))}(U.shouldDirty||U.shouldTouch)&&w($,Y,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&z($)},L=($,I,U)=>{for(const ee in I){if(!I.hasOwnProperty(ee))return;const Y=I[ee],X=$+"."+ee,se=ie(n,X);(s.array.has($)||at(Y)||se&&!se._f)&&!_a(Y)?L(X,Y,U):D(X,Y,U)}},B=($,I,U={})=>{const ee=ie(n,$),Y=s.array.has($),X=Ct(I);$e(a,$,X),Y?(d.array.next({name:$,values:Ct(a)}),(f.isDirty||f.dirtyFields||c.isDirty||c.dirtyFields)&&U.shouldDirty&&d.state.next({name:$,dirtyFields:$l(i,a),isDirty:A($,X)})):ee&&!ee._f&&!qt(X)?L($,X,U):D($,X,U),aS($,s)&&d.state.next({...r}),d.state.next({name:o.mount?$:void 0,values:Ct(a)})},W=async $=>{o.mount=!0;const I=$.target;let U=I.name,ee=!0;const Y=ie(n,U),X=Ie=>{ee=Number.isNaN(Ie)||_a(Ie)&&isNaN(Ie.getTime())||ji(Ie,ie(a,U,Ie))},se=nS(t.mode),Pe=nS(t.reValidateMode);if(Y){let Ie,Pr;const Zc=I.type?rS(Y._f):x3($),yi=$.type===Yw.BLUR||$.type===Yw.FOCUS_OUT,NC=!$3(Y._f)&&!t.resolver&&!ie(r.errors,U)&&!Y._f.deps||M3(yi,ie(r.touchedFields,U),r.isSubmitted,Pe,se),Pm=aS(U,s,yi);$e(a,U,Zc),yi?(Y._f.onBlur&&Y._f.onBlur($),l&&l(0)):Y._f.onChange&&Y._f.onChange($);const Am=w(U,Zc,yi),CC=!nr(Am)||Pm;if(!yi&&d.state.next({name:U,type:$.type,values:Ct(a)}),NC)return(f.isValid||c.isValid)&&(t.mode==="onBlur"?yi&&y():yi||y()),CC&&d.state.next({name:U,...Pm?{}:Am});if(!yi&&Pm&&d.state.next({...r}),t.resolver){const{errors:w1}=await _([U]);if(X(Zc),ee){const MC=oS(r.errors,n,U),S1=oS(w1,n,MC.name||U);Ie=S1.error,U=S1.name,Pr=nr(w1)}}else g([U],!0),Ie=(await lS(Y,s.disabled,a,h,t.shouldUseNativeValidation))[U],g([U]),X(Zc),ee&&(Ie?Pr=!1:(f.isValid||c.isValid)&&(Pr=await j(n,!0)));ee&&(Y._f.deps&&z(Y._f.deps),S(U,Pr,Ie,Am))}},R=($,I)=>{if(ie(r.errors,I)&&$.focus)return $.focus(),1},z=async($,I={})=>{let U,ee;const Y=lu($);if(t.resolver){const X=await E(st($)?$:Y);U=nr(X),ee=$?!Y.some(se=>ie(X,se)):U}else $?(ee=(await Promise.all(Y.map(async X=>{const se=ie(n,X);return await j(se&&se._f?{[X]:se}:se)}))).every(Boolean),!(!ee&&!r.isValid)&&y()):ee=U=await j(n);return d.state.next({...!wn($)||(f.isValid||c.isValid)&&U!==r.isValid?{}:{name:$},...t.resolver||!$?{isValid:U}:{},errors:r.errors}),I.shouldFocus&&!ee&&uu(n,R,$?Y:s.mount),ee},H=$=>{const I={...o.mount?a:i};return st($)?I:wn($)?ie(I,$):$.map(U=>ie(I,U))},Z=($,I)=>({invalid:!!ie((I||r).errors,$),isDirty:!!ie((I||r).dirtyFields,$),error:ie((I||r).errors,$),isValidating:!!ie(r.validatingFields,$),isTouched:!!ie((I||r).touchedFields,$)}),G=$=>{$&&lu($).forEach(I=>dt(r.errors,I)),d.state.next({errors:$?r.errors:{}})},oe=($,I,U)=>{const ee=(ie(n,$,{_f:{}})._f||{}).ref,Y=ie(r.errors,$)||{},{ref:X,message:se,type:Pe,...Ie}=Y;$e(r.errors,$,{...Ie,...I,ref:ee}),d.state.next({name:$,errors:r.errors,isValid:!1}),U&&U.shouldFocus&&ee&&ee.focus&&ee.focus()},we=($,I)=>rn($)?d.state.subscribe({next:U=>$(C(void 0,I),U)}):C($,I,!0),Ce=$=>d.state.subscribe({next:I=>{C3($.name,I.name,$.exact)&&N3(I,$.formState||f,Tt,$.reRenderRoot)&&$.callback({values:{...a},...r,...I})}}).unsubscribe,Ke=$=>(o.mount=!0,c={...c,...$.formState},Ce({...$,formState:c})),At=($,I={})=>{for(const U of $?lu($):s.mount)s.mount.delete(U),s.array.delete(U),I.keepValue||(dt(n,U),dt(a,U)),!I.keepError&&dt(r.errors,U),!I.keepDirty&&dt(r.dirtyFields,U),!I.keepTouched&&dt(r.touchedFields,U),!I.keepIsValidating&&dt(r.validatingFields,U),!t.shouldUnregister&&!I.keepDefaultValue&&dt(i,U);d.state.next({values:Ct(a)}),d.state.next({...r,...I.keepDirty?{isDirty:A()}:{}}),!I.keepIsValid&&y()},_t=({disabled:$,name:I})=>{(mn($)&&o.mount||$||s.disabled.has(I))&&($?s.disabled.add(I):s.disabled.delete(I))},J=($,I={})=>{let U=ie(n,$);const ee=mn(I.disabled)||mn(t.disabled);return $e(n,$,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:$}},name:$,mount:!0,...I}}),s.mount.add($),U?_t({disabled:mn(I.disabled)?I.disabled:t.disabled,name:$}):O($,!0,I.value),{...ee?{disabled:I.disabled||t.disabled}:{},...t.progressive?{required:!!I.required,min:Nl(I.min),max:Nl(I.max),minLength:Nl(I.minLength),maxLength:Nl(I.maxLength),pattern:Nl(I.pattern)}:{},name:$,onChange:W,onBlur:W,ref:Y=>{if(Y){J($,I),U=ie(n,$);const X=st(Y.value)&&Y.querySelectorAll&&Y.querySelectorAll("input,select,textarea")[0]||Y,se=j3(X),Pe=U._f.refs||[];if(se?Pe.find(Ie=>Ie===X):X===U._f.ref)return;$e(n,$,{_f:{...U._f,...se?{refs:[...Pe.filter(ly),X,...Array.isArray(ie(i,$))?[{}]:[]],ref:{type:X.type,name:$}}:{ref:X}}}),O($,!1,void 0,X)}else U=ie(n,$,{}),U._f&&(U._f.mount=!1),(t.shouldUnregister||I.shouldUnregister)&&!(w3(s.array,$)&&o.action)&&s.unMount.add($)}}},de=()=>t.shouldFocusError&&uu(n,R,s.mount),ve=$=>{mn($)&&(d.state.next({disabled:$}),uu(n,(I,U)=>{const ee=ie(n,U);ee&&(I.disabled=ee._f.disabled||$,Array.isArray(ee._f.refs)&&ee._f.refs.forEach(Y=>{Y.disabled=ee._f.disabled||$}))},0,!1))},q=($,I)=>async U=>{let ee;U&&(U.preventDefault&&U.preventDefault(),U.persist&&U.persist());let Y=Ct(a);if(d.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:se}=await _();r.errors=X,Y=se}else await j(n);if(s.disabled.size)for(const X of s.disabled)$e(Y,X,void 0);if(dt(r.errors,"root"),nr(r.errors)){d.state.next({errors:{}});try{await $(Y,U)}catch(X){ee=X}}else I&&await I({...r.errors},U),de(),setTimeout(de);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:nr(r.errors)&&!ee,submitCount:r.submitCount+1,errors:r.errors}),ee)throw ee},We=($,I={})=>{ie(n,$)&&(st(I.defaultValue)?B($,Ct(ie(i,$))):(B($,I.defaultValue),$e(i,$,Ct(I.defaultValue))),I.keepTouched||dt(r.touchedFields,$),I.keepDirty||(dt(r.dirtyFields,$),r.isDirty=I.defaultValue?A($,Ct(ie(i,$))):A()),I.keepError||(dt(r.errors,$),f.isValid&&y()),d.state.next({...r}))},be=($,I={})=>{const U=$?Ct($):i,ee=Ct(U),Y=nr($),X=Y?i:ee;if(I.keepDefaultValues||(i=U),!I.keepValues){if(I.keepDirtyValues){const se=new Set([...s.mount,...Object.keys($l(i,a))]);for(const Pe of Array.from(se))ie(r.dirtyFields,Pe)?$e(X,Pe,ie(a,Pe)):B(Pe,ie(X,Pe))}else{if(Kx&&st($))for(const se of s.mount){const Pe=ie(n,se);if(Pe&&Pe._f){const Ie=Array.isArray(Pe._f.refs)?Pe._f.refs[0]:Pe._f.ref;if(Fd(Ie)){const Pr=Ie.closest("form");if(Pr){Pr.reset();break}}}}for(const se of s.mount)B(se,ie(X,se))}a=Ct(X),d.array.next({values:{...X}}),d.state.next({values:{...X}})}s={mount:I.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!I.keepIsValid||!!I.keepDirtyValues,o.watch=!!t.shouldUnregister,d.state.next({submitCount:I.keepSubmitCount?r.submitCount:0,isDirty:Y?!1:I.keepDirty?r.isDirty:!!(I.keepDefaultValues&&!ji($,i)),isSubmitted:I.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:Y?{}:I.keepDirtyValues?I.keepDefaultValues&&a?$l(i,a):r.dirtyFields:I.keepDefaultValues&&$?$l(i,$):I.keepDirty?r.dirtyFields:{},touchedFields:I.keepTouched?r.touchedFields:{},errors:I.keepErrors?r.errors:{},isSubmitSuccessful:I.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ze=($,I)=>be(rn($)?$(a):$,I),rt=($,I={})=>{const U=ie(n,$),ee=U&&U._f;if(ee){const Y=ee.refs?ee.refs[0]:ee.ref;Y.focus&&(Y.focus(),I.shouldSelect&&rn(Y.select)&&Y.select())}},Tt=$=>{r={...r,...$}},Rn={control:{register:J,unregister:At,getFieldState:Z,handleSubmit:q,setError:oe,_subscribe:Ce,_runSchema:_,_focusError:de,_getWatch:C,_getDirty:A,_setValid:y,_setFieldArray:b,_setDisabledField:_t,_setErrors:x,_getFieldArray:M,_reset:be,_resetDefaultValues:()=>rn(t.defaultValues)&&t.defaultValues().then($=>{Ze($,t.resetOptions),d.state.next({isLoading:!1})}),_removeUnmounted:N,_disableForm:ve,_subjects:d,_proxyFormState:f,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state($){o=$},get _defaultValues(){return i},get _names(){return s},set _names($){s=$},get _formState(){return r},get _options(){return t},set _options($){t={...t,...$}}},subscribe:Ke,trigger:z,register:J,handleSubmit:q,watch:we,setValue:B,getValues:H,reset:Ze,resetField:We,clearErrors:G,unregister:At,setError:oe,setFocus:rt,getFieldState:Z};return{...Rn,formControl:Rn}}function Yx(e={}){const t=P.useRef(void 0),r=P.useRef(void 0),[n,i]=P.useState({isDirty:!1,isValidating:!1,isLoading:rn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:rn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...e.formControl?e.formControl:L3(e),formState:n},e.formControl&&e.defaultValues&&!rn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const a=t.current.control;return a._options=e,_3(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(s=>({...s,isReady:!0})),a._formState.isReady=!0,o},[a]),P.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),P.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),P.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),P.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),P.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),P.useEffect(()=>{e.values&&!ji(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(o=>({...o}))):a._resetDefaultValues()},[a,e.values]),P.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=O3(n,a),t.current}const uS=(e,t,r)=>{if(e&&"reportValidity"in e){const n=ie(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},s2=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?uS(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>uS(i,r,e))}},F3=(e,t)=>{t.shouldUseNativeValidation&&s2(e,t);const r={};for(const n in e){const i=ie(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(B3(t.names||Object.keys(e),n)){const o=Object.assign({},ie(r,n));$e(o,"root",a),$e(r,n,o)}else $e(r,n,a)}return r},B3=(e,t)=>{const r=cS(t);return e.some(n=>cS(n).match(`^${r}\\.\\d+`))};function cS(e){return e.replace(/\]|\[/g,"")}function Zx(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(o,s){try{var l=(t!=null&&t.context,Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:i}))).then(function(u){return a.shouldUseNativeValidation&&s2({},a),{values:r.raw?Object.assign({},n):u,errors:{}}}))}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l}(0,function(o){if(!o.inner)throw o;return{values:{},errors:F3((s=o,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(s.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),l){var c=u[f.path].types,d=c&&c[f.type];u[f.path]=e2(f.path,l,u,f.type,d?[].concat(d,f.message):f.message)}return u},{})),a)};var s,l}))}catch(o){return Promise.reject(o)}}}const Ea=k.forwardRef(({label:e,error:t,type:r="text",placeholder:n,className:i,icon:a,disabled:o,...s},l)=>p.jsxs("div",{className:"space-y-1",children:[e&&p.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:e}),p.jsxs("div",{className:"relative",children:[a&&p.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:p.jsx(a,{className:"h-5 w-5 text-gray-400"})}),p.jsx("input",{ref:l,type:r,placeholder:n,disabled:o,className:he("input",a&&"pr-10",t&&"border-red-500 dark:border-red-500 focus:ring-red-500",o&&"opacity-50 cursor-not-allowed",i),...s})]}),t&&p.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:t})]}));Ea.displayName="Input";function ho(e){this._maxSize=e,this.clear()}ho.prototype.clear=function(){this._size=0,this._values=Object.create(null)};ho.prototype.get=function(e){return this._values[e]};ho.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var z3=/[^.^\]^[]+|(?=\[\]|\.\.)/g,l2=/^\d+$/,U3=/^\d/,V3=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,W3=/^\s*(['"]?)(.*?)(\1)\s*$/,Jx=512,fS=new ho(Jx),dS=new ho(Jx),hS=new ho(Jx),Va={Cache:ho,split:ng,normalizePath:uy,setter:function(e){var t=uy(e);return dS.get(e)||dS.set(e,function(n,i){for(var a=0,o=t.length,s=n;ae.match(X3)||[],bp=e=>e[0].toUpperCase()+e.slice(1),tb=(e,t)=>xp(e).join(t).toLowerCase(),u2=e=>xp(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),Q3=e=>bp(u2(e)),Y3=e=>tb(e,"_"),Z3=e=>tb(e,"-"),J3=e=>bp(tb(e," ")),e4=e=>xp(e).map(bp).join(" ");var cy={words:xp,upperFirst:bp,camelCase:u2,pascalCase:Q3,snakeCase:Y3,kebabCase:Z3,sentenceCase:J3,titleCase:e4},rb={exports:{}};rb.exports=function(e){return c2(t4(e),e)};rb.exports.array=c2;function c2(e,t){var r=e.length,n=new Array(r),i={},a=r,o=r4(t),s=n4(e);for(t.forEach(function(u){if(!s.has(u[0])||!s.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});a--;)i[a]||l(e[a],a,new Set);return n;function l(u,f,c){if(c.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!s.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[f]){i[f]=!0;var h=o.get(u)||new Set;if(h=Array.from(h),f=h.length){c.add(u);do{var m=h[--f];l(m,s.get(m),c)}while(f);c.delete(u)}n[--r]=u}}}function t4(e){for(var t=new Set,r=0,n=e.length;r"",c4=/^Symbol\((.*)\)(.*)$/;function f4(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function pS(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return f4(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return u4.call(e).replace(c4,"Symbol($1)");const n=o4.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+s4.call(e)+"]":n==="RegExp"?l4.call(e):null}function Zi(e,t){let r=pS(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=pS(this[n],t);return a!==null?a:i},2)}function f2(e){return e==null?[]:[].concat(e)}let d2,h2,p2,d4=/\$\{\s*(\w+)\s*\}/g;d2=Symbol.toStringTag;class mS{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[d2]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],f2(t).forEach(a=>{if(ar.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}h2=Symbol.hasInstance;p2=Symbol.toStringTag;class ar extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(d4,(i,a)=>Zi(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const o=new mS(t,r,n,i);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[p2]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ar)}static[h2](t){return mS[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let yn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${Zi(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Zi(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${Zi(r,!0)}\``+i}},er={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},h4={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},ig={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},p4={isValue:"${path} field must be ${value}"},ed={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},m4={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},y4={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.lengthi)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${Zi(r,!0)}\``}return ar.formatError(yn.notType,e)}};Object.assign(Object.create(null),{mixed:yn,string:er,number:h4,date:ig,object:ed,array:m4,boolean:p4,tuple:y4});const nb=e=>e&&e.__isYupSchema__;class Ud{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new Ud(t,(s,l)=>{var u;let f=o(...s)?i:a;return(u=f==null?void 0:f(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(a=>a.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!nb(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const Sf={context:"$",value:"."};class po{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Sf.context,this.isValue=this.key[0]===Sf.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Sf.context:this.isValue?Sf.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Va.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}po.prototype.__isYupRef=!0;const ja=e=>e==null;function So(e){function t({value:r,path:n="",options:i,originalValue:a,schema:o},s,l){const{name:u,test:f,params:c,message:d,skipAbsent:h}=e;let{parent:m,context:y,abortEarly:g=o.spec.abortEarly,disableStackTrace:b=o.spec.disableStackTrace}=i;function v(A){return po.isRef(A)?A.getValue(r,m,y):A}function x(A={}){const C=Object.assign({value:r,originalValue:a,label:o.spec.label,path:A.path||n,spec:o.spec,disableStackTrace:A.disableStackTrace||b},c,A.params);for(const D of Object.keys(C))C[D]=v(C[D]);const M=new ar(ar.formatError(A.message||d,C),r,C.path,A.type||u,C.disableStackTrace);return M.params=C,M}const O=g?s:l;let w={path:n,parent:m,type:u,from:i.from,createError:x,resolve:v,options:i,originalValue:a,schema:o};const S=A=>{ar.isError(A)?O(A):A?l(null):O(x())},_=A=>{ar.isError(A)?O(A):s(A)};if(h&&ja(r))return S(!0);let j;try{var N;if(j=f.call(w,r,w),typeof((N=j)==null?void 0:N.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${w.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(j).then(S,_)}}catch(A){_(A);return}S(j)}return t.OPTIONS=e,t}function v4(e,t,r,n=r){let i,a,o;return t?(Va.forEach(t,(s,l,u)=>{let f=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:i,value:r});let c=e.type==="tuple",d=u?parseInt(f,10):0;if(e.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&d>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[d],e=c?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);i=r,r=r&&r[f],e=e.fields[f]}a=f,o=l?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class Vd extends Set{describe(){const t=[];for(const r of this.values())t.push(po.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Vd(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Fo(e,t=new Map){if(nb(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n{this.typeError(yn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Fo(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&ja(a))return a;let o=Zi(t),s=Zi(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". + +attempted value: ${o} +`+(s!==o?`result of cast: ${s}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:a,value:l,originalValue:o,options:r,tests:u},n,f=>{if(f.length)return i(f,l);this.runTests({path:a,value:l,originalValue:o,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:o,originalValue:s,path:l,options:u}=t,f=y=>{i||(i=!0,r(y,o))},c=y=>{i||(i=!0,n(y,o))},d=a.length,h=[];if(!d)return c([]);let m={value:o,originalValue:s,path:l,options:u,schema:this};for(let y=0;ythis.resolve(f)._validate(u,f,d,h)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((o,s)=>i._validate(t,r,(l,u)=>{ar.isError(l)&&(l.value=u),s(l)},(l,u)=>{l.length?s(new ar(l,u,void 0,void 0,a)):o(u)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw ar.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new ar(s,t,void 0,void 0,o);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(ar.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(ar.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Fo(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=So({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=So({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=yn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=yn.notNull){return this.nullability(!1,t)}required(t=yn.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=yn.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=So(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(a||o.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=f2(t).map(a=>new po(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new Ud(i,r):Ud.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=So({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=yn.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=So({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),n}notOneOf(t,r=yn.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=So({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:o}=r.spec;return{meta:i,label:n,optional:a,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,f)=>f.findIndex(c=>c.name===l.name)===u)}}}Pn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Pn.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:o}=v4(this,t,r,n.context);return o[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])Pn.prototype[e]=Pn.prototype.oneOf;for(const e of["not","nope"])Pn.prototype[e]=Pn.prototype.notOneOf;const g4=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function x4(e){const t=ag(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function ag(e){var t,r;const n=g4.exec(e);return n?{year:Fn(n[1]),month:Fn(n[2],1)-1,day:Fn(n[3],1),hour:Fn(n[4]),minute:Fn(n[5]),second:Fn(n[6]),millisecond:n[7]?Fn(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Fn(n[10]),minuteOffset:Fn(n[11])}:null}function Fn(e,t=0){return Number(e)||t}let b4=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,w4=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,S4=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,O4="^\\d{4}-\\d{2}-\\d{2}",_4="\\d{2}:\\d{2}:\\d{2}",E4="(([+-]\\d{2}(:?\\d{2})?)|Z)",j4=new RegExp(`${O4}T${_4}(\\.\\d+)?${E4}$`),k4=e=>ja(e)||e===e.trim(),P4={}.toString();function or(){return new m2}class m2 extends Pn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===P4?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||yn.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=er.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=er.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=er.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||er.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=er.email){return this.matches(b4,{name:"email",message:t,excludeEmptyString:!0})}url(t=er.url){return this.matches(w4,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=er.uuid){return this.matches(S4,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(j4,{name:"datetime",message:r||er.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||er.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const o=ag(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:r||er.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const o=ag(a);return o?o.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=er.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:k4})}lowercase(t=er.lowercase){return this.transform(r=>ja(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ja(r)||r===r.toLowerCase()})}uppercase(t=er.uppercase){return this.transform(r=>ja(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>ja(r)||r===r.toUpperCase()})}}or.prototype=m2.prototype;let A4=new Date(""),T4=e=>Object.prototype.toString.call(e)==="[object Date]";class wp extends Pn{constructor(){super({type:"date",check(t){return T4(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=x4(t),isNaN(t)?wp.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(po.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=ig.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=ig.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}wp.INVALID_DATE=A4;wp.prototype;function $4(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([o,s])=>`${o}-${s}`));function a(o,s){let l=Va.split(o)[0];n.add(l),i.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),po.isRef(s)&&s.isSibling?a(s.path,o):nb(s)&&"deps"in s&&s.deps.forEach(l=>a(l,o))}return a4.array(Array.from(n),r).reverse()}function yS(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function y2(e){return(t,r)=>yS(e,t)-yS(e,r)}const N4=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function td(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=td(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=td(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(td)}):"optional"in e?e.optional():e}const C4=(e,t)=>{const r=[...Va.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Va.getter(Va.join(r),!0)(e);return!!(i&&n in i)};let vS=e=>Object.prototype.toString.call(e)==="[object Object]";function gS(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const M4=y2([]);function Bc(e){return new v2(e)}class v2 extends Pn{constructor(t){super({type:"object",check(r){return vS(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=M4,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(c=>!this._nodes.includes(c))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),f=!1;for(const c of s){let d=a[c],h=c in i;if(d){let m,y=i[c];u.path=(r.path?`${r.path}.`:"")+c,d=d.resolve({value:y,context:r.context,parent:l});let g=d instanceof Pn?d.spec:void 0,b=g==null?void 0:g.strict;if(g!=null&&g.strip){f=f||c in i;continue}m=!r.__validating||!b?d.cast(i[c],u):i[c],m!==void 0&&(l[c]=m)}else h&&!o&&(l[c]=i[c]);(h!==c in l||l[c]!==i[c])&&(f=!0)}return f?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...a],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,u)=>{if(!s||!vS(u)){i(l,u);return}o=o||u;let f=[];for(let c of this._nodes){let d=this.fields[c];!d||po.isRef(d)||f.push(d.asNestedTest({options:r,key:c,parent:u,parentPath:r.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:r},n,c=>{i(c.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const o=n[i];n[i]=o===void 0?a:o}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=$4(t,r),n._sortErrors=y2(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return td(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=Va.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return C4(a,t)&&(o=Object.assign({},a),n||delete o[t],o[r]=i(a)),o})}json(){return this.transform(N4)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||ed.exact,test(r){if(r==null)return!0;const n=gS(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=ed.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=gS(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=ed.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(cy.camelCase)}snakeCase(){return this.transformKeys(cy.snakeCase)}constantCase(){return this.transformKeys(t=>cy.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,o]of Object.entries(r.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[a]})),n.fields[a]=o.describe(s)}return n}}Bc.prototype=v2.prototype;const I4=Bc({username:or().required("نام کاربری الزامی است").min(3,"نام کاربری باید حداقل ۳ کاراکتر باشد"),password:or().required("رمز عبور الزامی است").min(6,"رمز عبور باید حداقل ۶ کاراکتر باشد")}),R4=Bc({name:or().required("نام الزامی است").min(2,"نام باید حداقل ۲ کاراکتر باشد"),email:or().required("ایمیل الزامی است").email("فرمت ایمیل صحیح نیست"),phone:or().required("شماره تلفن الزامی است").matches(/^09\d{9}$/,"شماره تلفن صحیح نیست"),role:or().required("نقش الزامی است"),password:or().optional().min(6,"رمز عبور باید حداقل ۶ کاراکتر باشد")});Bc({siteName:or().required("نام سایت الزامی است"),siteDescription:or().required("توضیحات سایت الزامی است"),adminEmail:or().required("ایمیل مدیر الزامی است").email("فرمت ایمیل صحیح نیست"),language:or().required("زبان الزامی است")});const Er={GET_DISCOUNT_DETAIL:"get-discount-detail",GET_DRAFT_DETAIL:"get-draft-detail",ADMIN_LOGIN:"admin-login",GET_ROLES:"get-roles",GET_ROLE:"get-role",GET_ROLE_PERMISSIONS:"get-role-permissions",GET_PERMISSIONS:"get-permissions"};function g2(e,t){return function(){return e.apply(t,arguments)}}const{toString:D4}=Object.prototype,{getPrototypeOf:ib}=Object,{iterator:Sp,toStringTag:x2}=Symbol,Op=(e=>t=>{const r=D4.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),cn=e=>(e=e.toLowerCase(),t=>Op(t)===e),_p=e=>t=>typeof t===e,{isArray:al}=Array,Lu=_p("undefined");function L4(e){return e!==null&&!Lu(e)&&e.constructor!==null&&!Lu(e.constructor)&&dr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const b2=cn("ArrayBuffer");function F4(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&b2(e.buffer),t}const B4=_p("string"),dr=_p("function"),w2=_p("number"),Ep=e=>e!==null&&typeof e=="object",z4=e=>e===!0||e===!1,rd=e=>{if(Op(e)!=="object")return!1;const t=ib(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(x2 in e)&&!(Sp in e)},U4=cn("Date"),V4=cn("File"),W4=cn("Blob"),q4=cn("FileList"),H4=e=>Ep(e)&&dr(e.pipe),K4=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||dr(e.append)&&((t=Op(e))==="formdata"||t==="object"&&dr(e.toString)&&e.toString()==="[object FormData]"))},G4=cn("URLSearchParams"),[X4,Q4,Y4,Z4]=["ReadableStream","Request","Response","Headers"].map(cn),J4=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),al(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const ka=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),O2=e=>!Lu(e)&&e!==ka;function og(){const{caseless:e}=O2(this)&&this||{},t={},r=(n,i)=>{const a=e&&S2(t,i)||i;rd(t[a])&&rd(n)?t[a]=og(t[a],n):rd(n)?t[a]=og({},n):al(n)?t[a]=n.slice():t[a]=n};for(let n=0,i=arguments.length;n(zc(t,(i,a)=>{r&&dr(i)?e[a]=g2(i,r):e[a]=i},{allOwnKeys:n}),e),tF=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),rF=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},nF=(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&&ib(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},iF=(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},aF=e=>{if(!e)return null;if(al(e))return e;let t=e.length;if(!w2(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},oF=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ib(Uint8Array)),sF=(e,t)=>{const n=(e&&e[Sp]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},lF=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},uF=cn("HTMLFormElement"),cF=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),xS=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),fF=cn("RegExp"),_2=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};zc(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},dF=e=>{_2(e,(t,r)=>{if(dr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(dr(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+"'")})}})},hF=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return al(e)?n(e):n(String(e).split(t)),r},pF=()=>{},mF=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yF(e){return!!(e&&dr(e.append)&&e[x2]==="FormData"&&e[Sp])}const vF=e=>{const t=new Array(10),r=(n,i)=>{if(Ep(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const a=al(n)?[]:{};return zc(n,(o,s)=>{const l=r(o,i+1);!Lu(l)&&(a[s]=l)}),t[i]=void 0,a}}return n};return r(e,0)},gF=cn("AsyncFunction"),xF=e=>e&&(Ep(e)||dr(e))&&dr(e.then)&&dr(e.catch),E2=((e,t)=>e?setImmediate:t?((r,n)=>(ka.addEventListener("message",({source:i,data:a})=>{i===ka&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),ka.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",dr(ka.postMessage)),bF=typeof queueMicrotask<"u"?queueMicrotask.bind(ka):typeof process<"u"&&process.nextTick||E2,wF=e=>e!=null&&dr(e[Sp]),F={isArray:al,isArrayBuffer:b2,isBuffer:L4,isFormData:K4,isArrayBufferView:F4,isString:B4,isNumber:w2,isBoolean:z4,isObject:Ep,isPlainObject:rd,isReadableStream:X4,isRequest:Q4,isResponse:Y4,isHeaders:Z4,isUndefined:Lu,isDate:U4,isFile:V4,isBlob:W4,isRegExp:fF,isFunction:dr,isStream:H4,isURLSearchParams:G4,isTypedArray:oF,isFileList:q4,forEach:zc,merge:og,extend:eF,trim:J4,stripBOM:tF,inherits:rF,toFlatObject:nF,kindOf:Op,kindOfTest:cn,endsWith:iF,toArray:aF,forEachEntry:sF,matchAll:lF,isHTMLForm:uF,hasOwnProperty:xS,hasOwnProp:xS,reduceDescriptors:_2,freezeMethods:dF,toObjectSet:hF,toCamelCase:cF,noop:pF,toFiniteNumber:mF,findKey:S2,global:ka,isContextDefined:O2,isSpecCompliantForm:yF,toJSONObject:vF,isAsyncFn:gF,isThenable:xF,setImmediate:E2,asap:bF,isIterable:wF};function ye(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}F.inherits(ye,Error,{toJSON:function(){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:F.toJSONObject(this.config),code:this.code,status:this.status}}});const j2=ye.prototype,k2={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{k2[e]={value:e}});Object.defineProperties(ye,k2);Object.defineProperty(j2,"isAxiosError",{value:!0});ye.from=(e,t,r,n,i,a)=>{const o=Object.create(j2);return F.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),ye.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const SF=null;function sg(e){return F.isPlainObject(e)||F.isArray(e)}function P2(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function bS(e,t,r){return e?e.concat(t).map(function(i,a){return i=P2(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function OF(e){return F.isArray(e)&&!e.some(sg)}const _F=F.toFlatObject(F,{},null,function(t){return/^is[A-Z]/.test(t)});function jp(e,t,r){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=F.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,g){return!F.isUndefined(g[y])});const n=r.metaTokens,i=r.visitor||f,a=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(F.isDate(m))return m.toISOString();if(!l&&F.isBlob(m))throw new ye("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(m)||F.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,y,g){let b=m;if(m&&!g&&typeof m=="object"){if(F.endsWith(y,"{}"))y=n?y:y.slice(0,-2),m=JSON.stringify(m);else if(F.isArray(m)&&OF(m)||(F.isFileList(m)||F.endsWith(y,"[]"))&&(b=F.toArray(m)))return y=P2(y),b.forEach(function(x,O){!(F.isUndefined(x)||x===null)&&t.append(o===!0?bS([y],O,a):o===null?y:y+"[]",u(x))}),!1}return sg(m)?!0:(t.append(bS(g,y,a),u(m)),!1)}const c=[],d=Object.assign(_F,{defaultVisitor:f,convertValue:u,isVisitable:sg});function h(m,y){if(!F.isUndefined(m)){if(c.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));c.push(m),F.forEach(m,function(b,v){(!(F.isUndefined(b)||b===null)&&i.call(t,b,F.isString(v)?v.trim():v,y,d))===!0&&h(b,y?y.concat(v):[v])}),c.pop()}}if(!F.isObject(e))throw new TypeError("data must be an object");return h(e),t}function wS(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function ab(e,t){this._pairs=[],e&&jp(e,this,t)}const A2=ab.prototype;A2.append=function(t,r){this._pairs.push([t,r])};A2.toString=function(t){const r=t?function(n){return t.call(this,n,wS)}:wS;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function EF(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function T2(e,t,r){if(!t)return e;const n=r&&r.encode||EF;F.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(t,r):a=F.isURLSearchParams(t)?t.toString():new ab(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class jF{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){F.forEach(this.handlers,function(n){n!==null&&t(n)})}}const SS=jF,$2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kF=typeof URLSearchParams<"u"?URLSearchParams:ab,PF=typeof FormData<"u"?FormData:null,AF=typeof Blob<"u"?Blob:null,TF={isBrowser:!0,classes:{URLSearchParams:kF,FormData:PF,Blob:AF},protocols:["http","https","file","blob","url","data"]},ob=typeof window<"u"&&typeof document<"u",lg=typeof navigator=="object"&&navigator||void 0,$F=ob&&(!lg||["ReactNative","NativeScript","NS"].indexOf(lg.product)<0),NF=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),CF=ob&&window.location.href||"http://localhost",MF=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ob,hasStandardBrowserEnv:$F,hasStandardBrowserWebWorkerEnv:NF,navigator:lg,origin:CF},Symbol.toStringTag,{value:"Module"})),Lt={...MF,...TF};function IF(e,t){return jp(e,new Lt.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,a){return Lt.isNode&&F.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function RF(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function DF(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n=r.length;return o=!o&&F.isArray(i)?i.length:o,l?(F.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!F.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&F.isArray(i[o])&&(i[o]=DF(i[o])),!s)}if(F.isFormData(e)&&F.isFunction(e.entries)){const r={};return F.forEachEntry(e,(n,i)=>{t(RF(n),i,r,0)}),r}return null}function LF(e,t,r){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const sb={transitional:$2,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=F.isObject(t);if(a&&F.isHTMLForm(t)&&(t=new FormData(t)),F.isFormData(t))return i?JSON.stringify(N2(t)):t;if(F.isArrayBuffer(t)||F.isBuffer(t)||F.isStream(t)||F.isFile(t)||F.isBlob(t)||F.isReadableStream(t))return t;if(F.isArrayBufferView(t))return t.buffer;if(F.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 IF(t,this.formSerializer).toString();if((s=F.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return jp(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),LF(t)):t}],transformResponse:[function(t){const r=this.transitional||sb.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(F.isResponse(t)||F.isReadableStream(t))return t;if(t&&F.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?ye.from(s,ye.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:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],e=>{sb.headers[e]={}});const lb=sb,FF=F.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"]),BF=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]&&FF[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},OS=Symbol("internals");function Cl(e){return e&&String(e).trim().toLowerCase()}function nd(e){return e===!1||e==null?e:F.isArray(e)?e.map(nd):String(e)}function zF(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 UF=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function fy(e,t,r,n,i){if(F.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!F.isString(t)){if(F.isString(n))return t.indexOf(n)!==-1;if(F.isRegExp(n))return n.test(t)}}function VF(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function WF(e,t){const r=F.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})})}class kp{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,l,u){const f=Cl(l);if(!f)throw new Error("header name must be a non-empty string");const c=F.findKey(i,f);(!c||i[c]===void 0||u===!0||u===void 0&&i[c]!==!1)&&(i[c||l]=nd(s))}const o=(s,l)=>F.forEach(s,(u,f)=>a(u,f,l));if(F.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(F.isString(t)&&(t=t.trim())&&!UF(t))o(BF(t),r);else if(F.isObject(t)&&F.isIterable(t)){let s={},l,u;for(const f of t){if(!F.isArray(f))throw TypeError("Object iterator must return a key-value pair");s[u=f[0]]=(l=s[u])?F.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=Cl(t),t){const n=F.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return zF(i);if(F.isFunction(r))return r.call(this,i,n);if(F.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Cl(t),t){const n=F.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||fy(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=Cl(o),o){const s=F.findKey(n,o);s&&(!r||fy(n,n[s],s,r))&&(delete n[s],i=!0)}}return F.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||fy(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return F.forEach(this,(i,a)=>{const o=F.findKey(n,a);if(o){r[o]=nd(i),delete r[a];return}const s=t?VF(a):String(a).trim();s!==a&&delete r[a],r[s]=nd(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return F.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&F.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[OS]=this[OS]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Cl(o);n[s]||(WF(i,o),n[s]=!0)}return F.isArray(t)?t.forEach(a):a(t),this}}kp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);F.reduceDescriptors(kp.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});F.freezeMethods(kp);const sn=kp;function dy(e,t){const r=this||lb,n=t||r,i=sn.from(n.headers);let a=n.data;return F.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function C2(e){return!!(e&&e.__CANCEL__)}function ol(e,t,r){ye.call(this,e??"canceled",ye.ERR_CANCELED,t,r),this.name="CanceledError"}F.inherits(ol,ye,{__CANCEL__:!0});function M2(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ye("Request failed with status code "+r.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function qF(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function HF(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.apply(null,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 Wd=(e,t,r=3)=>{let n=0;const i=HF(50,250);return KF(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)},_S=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},ES=e=>(...t)=>F.asap(()=>e(...t)),GF=Lt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Lt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Lt.origin),Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent)):()=>!0,XF=Lt.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];F.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),F.isString(n)&&o.push("path="+n),F.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function QF(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function YF(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function I2(e,t,r){let n=!QF(t);return e&&(n||r==!1)?YF(e,t):t}const jS=e=>e instanceof sn?{...e}:e;function Ja(e,t){t=t||{};const r={};function n(u,f,c,d){return F.isPlainObject(u)&&F.isPlainObject(f)?F.merge.call({caseless:d},u,f):F.isPlainObject(f)?F.merge({},f):F.isArray(f)?f.slice():f}function i(u,f,c,d){if(F.isUndefined(f)){if(!F.isUndefined(u))return n(void 0,u,c,d)}else return n(u,f,c,d)}function a(u,f){if(!F.isUndefined(f))return n(void 0,f)}function o(u,f){if(F.isUndefined(f)){if(!F.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(jS(u),jS(f),c,!0)};return F.forEach(Object.keys(Object.assign({},e,t)),function(f){const c=l[f]||i,d=c(e[f],t[f],f);F.isUndefined(d)&&c!==s||(r[f]=d)}),r}const R2=e=>{const t=Ja({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;t.headers=o=sn.from(o),t.url=T2(I2(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(F.isFormData(r)){if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...f]=l?l.split(";").map(c=>c.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...f].join("; "))}}if(Lt.hasStandardBrowserEnv&&(n&&F.isFunction(n)&&(n=n(t)),n||n!==!1&&GF(t.url))){const u=i&&a&&XF.read(a);u&&o.set(i,u)}return t},ZF=typeof XMLHttpRequest<"u",JF=ZF&&function(e){return new Promise(function(r,n){const i=R2(e);let a=i.data;const o=sn.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,f,c,d,h,m;function y(){h&&h(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function b(){if(!g)return;const x=sn.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:x,config:e,request:g};M2(function(_){r(_),y()},function(_){n(_),y()},w),g=null}"onloadend"in g?g.onloadend=b:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(b)},g.onabort=function(){g&&(n(new ye("Request aborted",ye.ECONNABORTED,e,g)),g=null)},g.onerror=function(){n(new ye("Network Error",ye.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||$2;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),n(new ye(O,w.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,e,g)),g=null},a===void 0&&o.setContentType(null),"setRequestHeader"in g&&F.forEach(o.toJSON(),function(O,w){g.setRequestHeader(w,O)}),F.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),u&&([d,m]=Wd(u,!0),g.addEventListener("progress",d)),l&&g.upload&&([c,h]=Wd(l),g.upload.addEventListener("progress",c),g.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(f=x=>{g&&(n(!x||x.type?new ol(null,e,g):x),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const v=qF(i.url);if(v&&Lt.protocols.indexOf(v)===-1){n(new ye("Unsupported protocol "+v+":",ye.ERR_BAD_REQUEST,e));return}g.send(a||null)})},e6=(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 ye?f:new ol(f instanceof Error?f.message:f))}};let o=t&&setTimeout(()=>{o=null,a(new ye(`timeout ${t} of ms exceeded`,ye.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=()=>F.asap(s),l}},t6=e6,r6=function*(e,t){let r=e.byteLength;if(!t||r{const i=n6(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})},Pp=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",D2=Pp&&typeof ReadableStream=="function",a6=Pp&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),L2=(e,...t)=>{try{return!!e(...t)}catch{return!1}},o6=D2&&L2(()=>{let e=!1;const t=new Request(Lt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),PS=64*1024,ug=D2&&L2(()=>F.isReadableStream(new Response("").body)),qd={stream:ug&&(e=>e.body)};Pp&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!qd[t]&&(qd[t]=F.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ye(`Response type '${t}' is not supported`,ye.ERR_NOT_SUPPORT,n)})})})(new Response);const s6=async e=>{if(e==null)return 0;if(F.isBlob(e))return e.size;if(F.isSpecCompliantForm(e))return(await new Request(Lt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(F.isArrayBufferView(e)||F.isArrayBuffer(e))return e.byteLength;if(F.isURLSearchParams(e)&&(e=e+""),F.isString(e))return(await a6(e)).byteLength},l6=async(e,t)=>{const r=F.toFiniteNumber(e.getContentLength());return r??s6(t)},u6=Pp&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:f,withCredentials:c="same-origin",fetchOptions:d}=R2(e);u=u?(u+"").toLowerCase():"text";let h=t6([i,a&&a.toAbortSignal()],o),m;const y=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&o6&&r!=="get"&&r!=="head"&&(g=await l6(f,n))!==0){let w=new Request(t,{method:"POST",body:n,duplex:"half"}),S;if(F.isFormData(n)&&(S=w.headers.get("content-type"))&&f.setContentType(S),w.body){const[_,E]=_S(g,Wd(ES(l)));n=kS(w.body,PS,_,E)}}F.isString(c)||(c=c?"include":"omit");const b="credentials"in Request.prototype;m=new Request(t,{...d,signal:h,method:r.toUpperCase(),headers:f.normalize().toJSON(),body:n,duplex:"half",credentials:b?c:void 0});let v=await fetch(m);const x=ug&&(u==="stream"||u==="response");if(ug&&(s||x&&y)){const w={};["status","statusText","headers"].forEach(j=>{w[j]=v[j]});const S=F.toFiniteNumber(v.headers.get("content-length")),[_,E]=s&&_S(S,Wd(ES(s),!0))||[];v=new Response(kS(v.body,PS,_,()=>{E&&E(),y&&y()}),w)}u=u||"text";let O=await qd[F.findKey(qd,u)||"text"](v,e);return!x&&y&&y(),await new Promise((w,S)=>{M2(w,S,{data:O,headers:sn.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:m})})}catch(b){throw y&&y(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,e,m),{cause:b.cause||b}):ye.from(b,b&&b.code,e,m)}}),cg={http:SF,xhr:JF,fetch:u6};F.forEach(cg,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const AS=e=>`- ${e}`,c6=e=>F.isFunction(e)||e===null||e===!1,F2={getAdapter:e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let a=0;a`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since : +`+a.map(AS).join(` +`):" "+AS(a[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:cg};function hy(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ol(null,e)}function TS(e){return hy(e),e.headers=sn.from(e.headers),e.data=dy.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),F2.getAdapter(e.adapter||lb.adapter)(e).then(function(n){return hy(e),n.data=dy.call(e,e.transformResponse,n),n.headers=sn.from(n.headers),n},function(n){return C2(n)||(hy(e),n&&n.response&&(n.response.data=dy.call(e,e.transformResponse,n.response),n.response.headers=sn.from(n.response.headers))),Promise.reject(n)})}const B2="1.9.0",Ap={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ap[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const $S={};Ap.transitional=function(t,r,n){function i(a,o){return"[Axios v"+B2+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new ye(i(o," has been removed"+(r?" in "+r:"")),ye.ERR_DEPRECATED);return r&&!$S[o]&&($S[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}};Ap.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function f6(e,t,r){if(typeof e!="object")throw new ye("options must be an object",ye.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 ye("option "+a+" must be "+l,ye.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ye("Unknown option "+a,ye.ERR_BAD_OPTION)}}const id={assertOptions:f6,validators:Ap},hn=id.validators;class Hd{constructor(t){this.defaults=t||{},this.interceptors={request:new SS,response:new SS}}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=Ja(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&id.assertOptions(n,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean)},!1),i!=null&&(F.isFunction(i)?r.paramsSerializer={serialize:i}:id.assertOptions(i,{encode:hn.function,serialize:hn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),id.assertOptions(r,{baseUrl:hn.spelling("baseURL"),withXsrfToken:hn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&F.merge(a.common,a[r.method]);a&&F.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),r.headers=sn.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(l=l&&y.synchronous,s.unshift(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 m=[TS.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,u),d=m.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 ol(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 ub(function(i){t=i}),cancel:t}}}const d6=ub;function h6(e){return function(r){return e.apply(null,r)}}function p6(e){return F.isObject(e)&&e.isAxiosError===!0}const fg={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};Object.entries(fg).forEach(([e,t])=>{fg[t]=e});const m6=fg;function z2(e){const t=new ad(e),r=g2(ad.prototype.request,t);return F.extend(r,ad.prototype,t,{allOwnKeys:!0}),F.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return z2(Ja(e,i))},r}const ct=z2(lb);ct.Axios=ad;ct.CanceledError=ol;ct.CancelToken=d6;ct.isCancel=C2;ct.VERSION=B2;ct.toFormData=jp;ct.AxiosError=ye;ct.Cancel=ct.CanceledError;ct.all=function(t){return Promise.all(t)};ct.spread=h6;ct.isAxiosError=p6;ct.mergeConfig=Ja;ct.AxiosHeaders=sn;ct.formToJSON=e=>N2(F.isHTMLForm(e)?new FormData(e):e);ct.getAdapter=F2.getAdapter;ct.HttpStatusCode=m6;ct.default=ct;const Tp=ct,U2="http://185.208.175.150:8090",y6=3e4,$n={ADMIN_LOGIN:"api/v1/admin/auth/login",GET_DISCOUNT_DETAIL:e=>`api/v1/discount-drafts/${e}`,GET_DRAFT_DETAIL:e=>`api/v1/drafts/${e}`,GET_ROLES:"api/v1/admin/roles",GET_ROLE:e=>`api/v1/admin/roles/${e}`,CREATE_ROLE:"api/v1/admin/roles",UPDATE_ROLE:e=>`api/v1/admin/roles/${e}`,DELETE_ROLE:e=>`api/v1/admin/roles/${e}`,GET_ROLE_PERMISSIONS:e=>`api/v1/admin/roles/${e}/permissions`,ASSIGN_ROLE_PERMISSION:(e,t)=>`api/v1/admin/roles/${e}/permissions/${t}`,REMOVE_ROLE_PERMISSION:(e,t)=>`api/v1/admin/roles/${e}/permissions/${t}`,GET_PERMISSIONS:"api/v1/admin/permissions"},v6=async()=>{const e=localStorage.getItem("admin_token"),t=localStorage.getItem("admin_user");if(e&&t)try{const r=JSON.parse(t);return{token:e,user:r}}catch{return localStorage.removeItem("admin_token"),localStorage.removeItem("admin_refresh_token"),localStorage.removeItem("admin_user"),localStorage.removeItem("admin_permissions"),localStorage.removeItem("admin_all_permissions"),null}return null};/*! js-cookie v3.0.5 | MIT */function Of(e){for(var t=1;t"u")){o=Of({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var l in o)o[l]&&(s+="; "+l,o[l]!==!0&&(s+="="+o[l].split(";")[0]));return document.cookie=i+"="+e.write(a,i)+s}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},s=0;ssl({method:"get",url:e,...t}),cb=(e,t,r)=>sl({method:"post",url:e,data:t,...r}),w6=(e,t,r)=>sl({method:"put",url:e,data:t,...r}),V2=(e,t)=>sl({method:"delete",url:e,...t});sl.interceptors.request.use(async e=>{const t=await v6();return t!=null&&t.token&&(e.headers.Authorization=`Bearer ${t.token}`),e});sl.interceptors.response.use(e=>e,e=>{const t=e.response.status;if(console.log("object"),x6.remove("jwtToken"),(t===401||t===403)&&location.pathname!=="/auth")O6(),window.location.replace({}.VITE_APP_BASE_URL+"auth");else throw{...e,message:e.response.data.title}});function Nn(e,t,r){const n=t||{},i=Object.keys(n);let a=`${r||{}.VITE_APP_BACKEND_BASE_URL}/${e}`;return i.forEach((o,s)=>{s===0&&(a+="?"),n[o]!==null&&n[o]!==void 0&&n[o]!==""&&(a+=`${o}=${n[o]}${s(await cb(Nn($n.ADMIN_LOGIN),e)).data,O6=()=>{localStorage.removeItem("admin_token"),localStorage.removeItem("admin_refresh_token"),localStorage.removeItem("admin_user"),localStorage.removeItem("admin_permissions"),localStorage.removeItem("admin_all_permissions")},_6=()=>il({mutationKey:[Er.ADMIN_LOGIN],mutationFn:e=>S6(e),onSuccess:e=>{localStorage.setItem("admin_token",e.tokens.access_token),localStorage.setItem("admin_refresh_token",e.tokens.refresh_token),localStorage.setItem("admin_user",JSON.stringify(e.admin_user)),localStorage.setItem("admin_permissions",JSON.stringify(e.admin_user.permissions)),localStorage.setItem("admin_all_permissions",JSON.stringify(e.permissions)),nt.success("ورود موفقیت‌آمیز بود")},onError:e=>{console.error("Login error:",e),nt.error((e==null?void 0:e.message)||"خطا در ورود")}}),E6=()=>{var m;const{isAuthenticated:e,restoreSession:t}=Lc(),r=uo(),[n,i]=k.useState(!1),[a,o]=k.useState(""),{mutate:s,isPending:l}=_6(),{register:u,handleSubmit:f,formState:{errors:c,isValid:d}}=Yx({resolver:Zx(I4),mode:"onChange"});if(e)return p.jsx(_A,{to:"/",replace:!0});const h=async y=>{o(""),s(y,{onSuccess:()=>{t(),r("/")},onError:()=>{o("نام کاربری یا رمز عبور اشتباه است")}})};return p.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8",children:p.jsxs("div",{className:"max-w-md w-full space-y-8",children:[p.jsxs("div",{children:[p.jsx("div",{className:"mx-auto h-12 w-12 bg-primary-600 rounded-lg flex items-center justify-center",children:p.jsx(Xw,{className:"h-6 w-6 text-white"})}),p.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-gray-100",children:"ورود به پنل مدیریت"}),p.jsx("p",{className:"mt-2 text-center text-sm text-gray-600 dark:text-gray-400",children:"لطفا اطلاعات خود را وارد کنید"})]}),p.jsxs("form",{className:"mt-8 space-y-6",onSubmit:f(h),children:[p.jsxs("div",{className:"space-y-4",children:[p.jsx(Ea,{label:"نام کاربری",type:"text",placeholder:"نام کاربری خود را وارد کنید",icon:qx,error:(m=c.username)==null?void 0:m.message,...u("username")}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"رمز عبور"}),p.jsxs("div",{className:"relative",children:[p.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:p.jsx(Xw,{className:"h-5 w-5 text-gray-400"})}),p.jsx("input",{type:n?"text":"password",placeholder:"رمز عبور خود را وارد کنید",className:`input pr-10 pl-10 ${c.password?"border-red-500 dark:border-red-500 focus:ring-red-500":""}`,...u("password")}),p.jsx("button",{type:"button",className:"absolute inset-y-0 left-0 pl-3 flex items-center",onClick:()=>i(!n),children:n?p.jsx(n3,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"}):p.jsx(KA,{className:"h-5 w-5 text-gray-400 hover:text-gray-600"})})]}),c.password&&p.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:c.password.message})]})]}),a&&p.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 px-4 py-3 rounded-lg text-sm",children:a}),p.jsx(ce,{type:"submit",loading:l,disabled:!d,className:"w-full",children:"ورود"})]})]})})},j6=({title:e,value:t,change:r,icon:n,color:i="blue"})=>{const a={blue:"bg-blue-500",green:"bg-green-500",yellow:"bg-yellow-500",red:"bg-red-500",purple:"bg-purple-500"},o=r&&r>0,s=r&&r<0;return p.jsx("div",{className:"card p-6 animate-fade-in",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx("div",{className:`p-3 rounded-lg ${a[i]||a.blue}`,children:p.jsx(n,{className:"h-6 w-6 text-white"})})}),p.jsx("div",{className:"mr-5 w-0 flex-1",children:p.jsxs("dl",{children:[p.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate",children:e}),p.jsxs("dd",{className:"flex items-baseline",children:[p.jsx("div",{className:"text-2xl font-semibold text-gray-900 dark:text-gray-100",children:typeof t=="number"?t.toLocaleString():t}),r!==void 0&&p.jsxs("div",{className:`mr-2 flex items-baseline text-sm font-semibold ${o?"text-green-600":s?"text-red-600":"text-gray-500"}`,children:[o&&p.jsx(Du,{className:"h-4 w-4 flex-shrink-0 self-center ml-1"}),s&&p.jsx(m3,{className:"h-4 w-4 flex-shrink-0 self-center ml-1"}),p.jsx("span",{className:"sr-only",children:o?"افزایش":"کاهش"}),Math.abs(r),"%"]})]})]})})]})})};var k6=Array.isArray,hr=k6,P6=typeof tf=="object"&&tf&&tf.Object===Object&&tf,W2=P6,A6=W2,T6=typeof self=="object"&&self&&self.Object===Object&&self,$6=A6||T6||Function("return this")(),Cn=$6,N6=Cn,C6=N6.Symbol,Uc=C6,NS=Uc,q2=Object.prototype,M6=q2.hasOwnProperty,I6=q2.toString,Ml=NS?NS.toStringTag:void 0;function R6(e){var t=M6.call(e,Ml),r=e[Ml];try{e[Ml]=void 0;var n=!0}catch{}var i=I6.call(e);return n&&(t?e[Ml]=r:delete e[Ml]),i}var D6=R6,L6=Object.prototype,F6=L6.toString;function B6(e){return F6.call(e)}var z6=B6,CS=Uc,U6=D6,V6=z6,W6="[object Null]",q6="[object Undefined]",MS=CS?CS.toStringTag:void 0;function H6(e){return e==null?e===void 0?q6:W6:MS&&MS in Object(e)?U6(e):V6(e)}var di=H6;function K6(e){return e!=null&&typeof e=="object"}var hi=K6,G6=di,X6=hi,Q6="[object Symbol]";function Y6(e){return typeof e=="symbol"||X6(e)&&G6(e)==Q6}var ll=Y6,Z6=hr,J6=ll,e5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,t5=/^\w*$/;function r5(e,t){if(Z6(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||J6(e)?!0:t5.test(e)||!e5.test(e)||t!=null&&e in Object(t)}var fb=r5;function n5(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var sa=n5;const ul=ke(sa);var i5=di,a5=sa,o5="[object AsyncFunction]",s5="[object Function]",l5="[object GeneratorFunction]",u5="[object Proxy]";function c5(e){if(!a5(e))return!1;var t=i5(e);return t==s5||t==l5||t==o5||t==u5}var db=c5;const fe=ke(db);var f5=Cn,d5=f5["__core-js_shared__"],h5=d5,py=h5,IS=function(){var e=/[^.]+$/.exec(py&&py.keys&&py.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function p5(e){return!!IS&&IS in e}var m5=p5,y5=Function.prototype,v5=y5.toString;function g5(e){if(e!=null){try{return v5.call(e)}catch{}try{return e+""}catch{}}return""}var H2=g5,x5=db,b5=m5,w5=sa,S5=H2,O5=/[\\^$.*+?()[\]{}|]/g,_5=/^\[object .+?Constructor\]$/,E5=Function.prototype,j5=Object.prototype,k5=E5.toString,P5=j5.hasOwnProperty,A5=RegExp("^"+k5.call(P5).replace(O5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function T5(e){if(!w5(e)||b5(e))return!1;var t=x5(e)?A5:_5;return t.test(S5(e))}var $5=T5;function N5(e,t){return e==null?void 0:e[t]}var C5=N5,M5=$5,I5=C5;function R5(e,t){var r=I5(e,t);return M5(r)?r:void 0}var mo=R5,D5=mo,L5=D5(Object,"create"),Np=L5,RS=Np;function F5(){this.__data__=RS?RS(null):{},this.size=0}var B5=F5;function z5(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var U5=z5,V5=Np,W5="__lodash_hash_undefined__",q5=Object.prototype,H5=q5.hasOwnProperty;function K5(e){var t=this.__data__;if(V5){var r=t[e];return r===W5?void 0:r}return H5.call(t,e)?t[e]:void 0}var G5=K5,X5=Np,Q5=Object.prototype,Y5=Q5.hasOwnProperty;function Z5(e){var t=this.__data__;return X5?t[e]!==void 0:Y5.call(t,e)}var J5=Z5,eB=Np,tB="__lodash_hash_undefined__";function rB(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=eB&&t===void 0?tB:t,this}var nB=rB,iB=B5,aB=U5,oB=G5,sB=J5,lB=nB;function cl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var EB=_B,jB=Cp;function kB(e,t){var r=this.__data__,n=jB(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var PB=kB,AB=fB,TB=xB,$B=SB,NB=EB,CB=PB;function fl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},Pa=function(t){return eo(t)&&t.indexOf("%")===t.length-1},Q=function(t){return tz(t)&&!Vc(t)},vt=function(t){return Q(t)||eo(t)},az=0,hl=function(t){var r=++az;return"".concat(t||"").concat(r)},Gt=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(!Q(t)&&!eo(t))return n;var a;if(Pa(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Vc(a)&&(a=n),i&&a>r&&(a=r),a},ki=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},oz=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 hz(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 pg(e){"@babel/helpers - typeof";return pg=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},pg(e)}var VS={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"},Jn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},WS=null,yy=null,Sb=function e(t){if(t===WS&&Array.isArray(yy))return yy;var r=[];return k.Children.forEach(t,function(n){me(n)||(Q8.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),yy=r,WS=t,r};function Or(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Jn(i)}):n=[Jn(t)],Sb(e).forEach(function(i){var a=Sr(i,"type.displayName")||Sr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function vr(e,t){var r=Or(e,t);return r&&r[0]}var qS=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!Q(n)||n<=0||!Q(i)||i<=0)},pz=["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"],mz=function(t){return t&&t.type&&eo(t.type)&&pz.indexOf(t.type)>=0},yz=function(t){return t&&pg(t)==="object"&&"clipDot"in t},vz=function(t,r,n,i){var a,o=(a=my==null?void 0:my[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!fe(t)&&(i&&o.includes(r)||uz.includes(r))||n&&wb.includes(r)},le=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(k.isValidElement(t)&&(i=t.props),!ul(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;vz((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},mg=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 HS(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 Sz(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 vg(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=wz(e,bz),f=i||{width:r,height:n,x:0,y:0},c=he("recharts-surface",a);return P.createElement("svg",yg({},le(u,!0,"svg"),{className:c,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),P.createElement("title",null,s),P.createElement("desc",null,l),t)}var Oz=["children","className"];function gg(){return gg=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 Ez(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 _e=P.forwardRef(function(e,t){var r=e.children,n=e.className,i=_z(e,Oz),a=he("recharts-layer",n);return P.createElement("g",gg({className:a},le(i,!0),{ref:t}),r)}),ln=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:Pz(e,t,r)}var Tz=Az,$z="\\ud800-\\udfff",Nz="\\u0300-\\u036f",Cz="\\ufe20-\\ufe2f",Mz="\\u20d0-\\u20ff",Iz=Nz+Cz+Mz,Rz="\\ufe0e\\ufe0f",Dz="\\u200d",Lz=RegExp("["+Dz+$z+Iz+Rz+"]");function Fz(e){return Lz.test(e)}var rT=Fz;function Bz(e){return e.split("")}var zz=Bz,nT="\\ud800-\\udfff",Uz="\\u0300-\\u036f",Vz="\\ufe20-\\ufe2f",Wz="\\u20d0-\\u20ff",qz=Uz+Vz+Wz,Hz="\\ufe0e\\ufe0f",Kz="["+nT+"]",xg="["+qz+"]",bg="\\ud83c[\\udffb-\\udfff]",Gz="(?:"+xg+"|"+bg+")",iT="[^"+nT+"]",aT="(?:\\ud83c[\\udde6-\\uddff]){2}",oT="[\\ud800-\\udbff][\\udc00-\\udfff]",Xz="\\u200d",sT=Gz+"?",lT="["+Hz+"]?",Qz="(?:"+Xz+"(?:"+[iT,aT,oT].join("|")+")"+lT+sT+")*",Yz=lT+sT+Qz,Zz="(?:"+[iT+xg+"?",xg,aT,oT,Kz].join("|")+")",Jz=RegExp(bg+"(?="+bg+")|"+Zz+Yz,"g");function eU(e){return e.match(Jz)||[]}var tU=eU,rU=zz,nU=rT,iU=tU;function aU(e){return nU(e)?iU(e):rU(e)}var oU=aU,sU=Tz,lU=rT,uU=oU,cU=Q2;function fU(e){return function(t){t=cU(t);var r=lU(t)?uU(t):void 0,n=r?r[0]:t.charAt(0),i=r?sU(r,1).join(""):t.slice(1);return n[e]()+i}}var dU=fU,hU=dU,pU=hU("toUpperCase"),mU=pU;const Kp=ke(mU);function De(e){return function(){return e}}const uT=Math.cos,Xd=Math.sin,fn=Math.sqrt,Qd=Math.PI,Gp=2*Qd,wg=Math.PI,Sg=2*wg,ya=1e-6,yU=Sg-ya;function cT(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return cT;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iya)if(!(Math.abs(c*l-u*f)>ya)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,m=i-s,y=l*l+u*u,g=h*h+m*m,b=Math.sqrt(y),v=Math.sqrt(d),x=a*Math.tan((wg-Math.acos((y+d-g)/(2*b*v)))/2),O=x/v,w=x/b;Math.abs(O-1)>ya&&this._append`L${t+O*f},${r+O*c}`,this._append`A${a},${a},0,0,${+(c*h>f*m)},${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)>ya||Math.abs(this._y1-f)>ya)&&this._append`L${u},${f}`,n&&(d<0&&(d=d%Sg+Sg),d>yU?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>ya&&this._append`A${n},${n},0,${+(d>=wg)},${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 Ob(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 gU(t)}function _b(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fT(e){this._context=e}fT.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 Xp(e){return new fT(e)}function dT(e){return e[0]}function hT(e){return e[1]}function pT(e,t){var r=De(!0),n=null,i=Xp,a=null,o=Ob(s);e=typeof e=="function"?e:e===void 0?dT:De(e),t=typeof t=="function"?t:t===void 0?hT:De(t);function s(l){var u,f=(l=_b(l)).length,c,d=!1,h;for(n==null&&(a=i(h=o())),u=0;u<=f;++u)!(u=h;--m)s.point(x[m],O[m]);s.lineEnd(),s.areaEnd()}b&&(x[d]=+e(g,d,c),O[d]=+t(g,d,c),s.point(n?+n(g,d,c):x[d],r?+r(g,d,c):O[d]))}if(v)return s=null,v+""||null}function f(){return pT().defined(i).curve(o).context(a)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:De(+c),n=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:De(+c),u):e},u.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:De(+c),u):n},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:De(+c),r=null,u):t},u.y0=function(c){return arguments.length?(t=typeof c=="function"?c:De(+c),u):t},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:De(+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:De(!!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 mT{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 xU(e){return new mT(e,!0)}function bU(e){return new mT(e,!1)}const Eb={draw(e,t){const r=fn(t/Qd);e.moveTo(r,0),e.arc(0,0,r,0,Gp)}},wU={draw(e,t){const r=fn(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()}},yT=fn(1/3),SU=yT*2,OU={draw(e,t){const r=fn(t/SU),n=r*yT;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},_U={draw(e,t){const r=fn(t),n=-r/2;e.rect(n,n,r,r)}},EU=.8908130915292852,vT=Xd(Qd/10)/Xd(7*Qd/10),jU=Xd(Gp/10)*vT,kU=-uT(Gp/10)*vT,PU={draw(e,t){const r=fn(t*EU),n=jU*r,i=kU*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Gp*a/5,s=uT(o),l=Xd(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},vy=fn(3),AU={draw(e,t){const r=-fn(t/(vy*3));e.moveTo(0,r*2),e.lineTo(-vy*r,-r),e.lineTo(vy*r,-r),e.closePath()}},Ar=-.5,Tr=fn(3)/2,Og=1/fn(12),TU=(Og/2+1)*3,$U={draw(e,t){const r=fn(t/TU),n=r/2,i=r*Og,a=n,o=r*Og+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Ar*n-Tr*i,Tr*n+Ar*i),e.lineTo(Ar*a-Tr*o,Tr*a+Ar*o),e.lineTo(Ar*s-Tr*l,Tr*s+Ar*l),e.lineTo(Ar*n+Tr*i,Ar*i-Tr*n),e.lineTo(Ar*a+Tr*o,Ar*o-Tr*a),e.lineTo(Ar*s+Tr*l,Ar*l-Tr*s),e.closePath()}};function NU(e,t){let r=null,n=Ob(i);e=typeof e=="function"?e:De(e||Eb),t=typeof t=="function"?t:De(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:De(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:De(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Yd(){}function Zd(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 gT(e){this._context=e}gT.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:Zd(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:Zd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function CU(e){return new gT(e)}function xT(e){this._context=e}xT.prototype={areaStart:Yd,areaEnd:Yd,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:Zd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MU(e){return new xT(e)}function bT(e){this._context=e}bT.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:Zd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function IU(e){return new bT(e)}function wT(e){this._context=e}wT.prototype={areaStart:Yd,areaEnd:Yd,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 RU(e){return new wT(e)}function GS(e){return e<0?-1:1}function XS(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(GS(a)+GS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function QS(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function gy(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 Jd(e){this._context=e}Jd.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:gy(this,this._t0,QS(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,gy(this,QS(this,r=XS(this,e,t)),r);break;default:gy(this,this._t0,r=XS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ST(e){this._context=new OT(e)}(ST.prototype=Object.create(Jd.prototype)).point=function(e,t){Jd.prototype.point.call(this,t,e)};function OT(e){this._context=e}OT.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 DU(e){return new Jd(e)}function LU(e){return new ST(e)}function _T(e){this._context=e}_T.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=YS(e),i=YS(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 BU(e){return new Qp(e,.5)}function zU(e){return new Qp(e,0)}function UU(e){return new Qp(e,1)}function js(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 VU(e,t){return e[t]}function WU(e){const t=[];return t.key=e,t}function qU(){var e=De([]),t=_g,r=js,n=VU;function i(a){var o=Array.from(e.apply(this,arguments),WU),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 e9(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 ET={symbolCircle:Eb,symbolCross:wU,symbolDiamond:OU,symbolSquare:_U,symbolStar:PU,symbolTriangle:AU,symbolWye:$U},t9=Math.PI/180,r9=function(t){var r="symbol".concat(Kp(t));return ET[r]||Eb},n9=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*t9;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}},i9=function(t,r){ET["symbol".concat(Kp(t))]=r},jb=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=JU(t,XU),u=JS(JS({},l),{},{type:n,size:a,sizeType:s}),f=function(){var g=r9(n),b=NU().type(g).size(n9(a,s,n));return b()},c=u.className,d=u.cx,h=u.cy,m=le(u,!0);return d===+d&&h===+h&&a===+a?P.createElement("path",Eg({},m,{className:he("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};jb.registerSymbol=i9;function ks(e){"@babel/helpers - typeof";return ks=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},ks(e)}function jg(){return jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var v=h.inactive?u:h.color;return P.createElement("li",jg({className:g,style:c,key:"legend-item-".concat(m)},to(n.props,h,m)),P.createElement(vg,{width:o,height:o,viewBox:f,style:d},n.renderIcon(h)),P.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},y?y(b,h,m):b))})}},{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 P.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(k.PureComponent);Bu(kb,"displayName","Legend");Bu(kb,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var h9=Mp;function p9(){this.__data__=new h9,this.size=0}var m9=p9;function y9(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var v9=y9;function g9(e){return this.__data__.get(e)}var x9=g9;function b9(e){return this.__data__.has(e)}var w9=b9,S9=Mp,O9=pb,_9=mb,E9=200;function j9(e,t){var r=this.__data__;if(r instanceof S9){var n=r.__data__;if(!O9||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&G9?new W9:void 0;for(a.set(e,t),a.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=Z7}var $b=J7,eV=di,tV=$b,rV=hi,nV="[object Arguments]",iV="[object Array]",aV="[object Boolean]",oV="[object Date]",sV="[object Error]",lV="[object Function]",uV="[object Map]",cV="[object Number]",fV="[object Object]",dV="[object RegExp]",hV="[object Set]",pV="[object String]",mV="[object WeakMap]",yV="[object ArrayBuffer]",vV="[object DataView]",gV="[object Float32Array]",xV="[object Float64Array]",bV="[object Int8Array]",wV="[object Int16Array]",SV="[object Int32Array]",OV="[object Uint8Array]",_V="[object Uint8ClampedArray]",EV="[object Uint16Array]",jV="[object Uint32Array]",ze={};ze[gV]=ze[xV]=ze[bV]=ze[wV]=ze[SV]=ze[OV]=ze[_V]=ze[EV]=ze[jV]=!0;ze[nV]=ze[iV]=ze[yV]=ze[aV]=ze[vV]=ze[oV]=ze[sV]=ze[lV]=ze[uV]=ze[cV]=ze[fV]=ze[dV]=ze[hV]=ze[pV]=ze[mV]=!1;function kV(e){return rV(e)&&tV(e.length)&&!!ze[eV(e)]}var PV=kV;function AV(e){return function(t){return e(t)}}var RT=AV,nh={exports:{}};nh.exports;(function(e,t){var r=W2,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})(nh,nh.exports);var TV=nh.exports,$V=PV,NV=RT,sO=TV,lO=sO&&sO.isTypedArray,CV=lO?NV(lO):$V,DT=CV,MV=D7,IV=Ab,RV=hr,DV=IT,LV=Tb,FV=DT,BV=Object.prototype,zV=BV.hasOwnProperty;function UV(e,t){var r=RV(e),n=!r&&IV(e),i=!r&&!n&&DV(e),a=!r&&!n&&!i&&FV(e),o=r||n||i||a,s=o?MV(e.length,String):[],l=s.length;for(var u in e)(t||zV.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||LV(u,l)))&&s.push(u);return s}var VV=UV,WV=Object.prototype;function qV(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||WV;return e===r}var HV=qV;function KV(e,t){return function(r){return e(t(r))}}var LT=KV,GV=LT,XV=GV(Object.keys,Object),QV=XV,YV=HV,ZV=QV,JV=Object.prototype,eW=JV.hasOwnProperty;function tW(e){if(!YV(e))return ZV(e);var t=[];for(var r in Object(e))eW.call(e,r)&&r!="constructor"&&t.push(r);return t}var rW=tW,nW=db,iW=$b;function aW(e){return e!=null&&iW(e.length)&&!nW(e)}var Wc=aW,oW=VV,sW=rW,lW=Wc;function uW(e){return lW(e)?oW(e):sW(e)}var Yp=uW,cW=E7,fW=I7,dW=Yp;function hW(e){return cW(e,dW,fW)}var pW=hW,uO=pW,mW=1,yW=Object.prototype,vW=yW.hasOwnProperty;function gW(e,t,r,n,i,a){var o=r&mW,s=uO(e),l=s.length,u=uO(t),f=u.length;if(l!=f&&!o)return!1;for(var c=l;c--;){var d=s[c];if(!(o?d in t:vW.call(t,d)))return!1}var h=a.get(e),m=a.get(t);if(h&&m)return h==t&&m==e;var y=!0;a.set(e,t),a.set(t,e);for(var g=o;++c-1}var yH=mH;function vH(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=NH){var u=t?null:TH(e);if(u)return $H(u);o=!1,i=AH,l=new jH}else l=t?[]:s;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function GH(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 XH(e){return e.value}function QH(e,t){if(P.isValidElement(e))return P.cloneElement(e,t);if(typeof e=="function")return P.createElement(e,t);t.ref;var r=KH(t,FH);return P.createElement(kb,r)}var EO=1,Zo=function(e){function t(){var r;BH(this,t);for(var n=arguments.length,i=new Array(n),a=0;aEO||Math.abs(i.height-this.lastBoundingBox.height)>EO)&&(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?Bn({},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 m=this.getBBoxSnapshot();d={top:((f||0)-m.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Bn(Bn({},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=Bn(Bn({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return P.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(h){n.wrapperNode=h}},QH(a,Bn(Bn({},this.props),{},{payload:qT(f,u,XH)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Bn(Bn({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&Q(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(k.PureComponent);Zp(Zo,"displayName","Legend");Zp(Zo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var jO=Uc,YH=Ab,ZH=hr,kO=jO?jO.isConcatSpreadable:void 0;function JH(e){return ZH(e)||YH(e)||!!(kO&&e&&e[kO])}var eK=JH,tK=CT,rK=eK;function GT(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=rK),i||(i=[]);++a0&&r(s)?t>1?GT(s,t-1,r,n,i):tK(i,s):n||(i[i.length]=s)}return i}var XT=GT;function nK(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 iK=nK,aK=iK,oK=aK(),sK=oK,lK=sK,uK=Yp;function cK(e,t){return e&&lK(e,t,uK)}var QT=cK,fK=Wc;function dK(e,t){return function(r,n){if(r==null)return r;if(!fK(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 jK=EK,Sy=vb,kK=gb,PK=Mn,AK=YT,TK=wK,$K=RT,NK=jK,CK=yl,MK=hr;function IK(e,t,r){t.length?t=Sy(t,function(a){return MK(a)?function(o){return kK(o,a.length===1?a[0]:a)}:a}):t=[CK];var n=-1;t=Sy(t,$K(PK));var i=AK(e,function(a,o,s){var l=Sy(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return TK(i,function(a,o){return NK(a,o,r)})}var RK=IK;function DK(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 LK=DK,FK=LK,AO=Math.max;function BK(e,t,r){return t=AO(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=AO(n.length-t,0),o=Array(a);++i0){if(++t>=QK)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var eG=JK,tG=XK,rG=eG,nG=rG(tG),iG=nG,aG=yl,oG=zK,sG=iG;function lG(e,t){return sG(oG(e,t,aG),e+"")}var uG=lG,cG=hb,fG=Wc,dG=Tb,hG=sa;function pG(e,t,r){if(!hG(r))return!1;var n=typeof t;return(n=="number"?fG(r)&&dG(t,r.length):n=="string"&&t in r)?cG(r[t],e):!1}var Jp=pG,mG=XT,yG=RK,vG=uG,$O=Jp,gG=vG(function(e,t){if(e==null)return[];var r=t.length;return r>1&&$O(e,t[0],t[1])?t=[]:r>2&&$O(t[0],t[1],t[2])&&(t=[t[0]]),yG(e,mG(t,1),[])}),xG=gG;const Mb=ke(xG);function zu(e){"@babel/helpers - typeof";return zu=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},zu(e)}function Mg(){return Mg=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(Il,"-left"),Q(r)&&t&&Q(t.x)&&r=t.y),"".concat(Il,"-top"),Q(n)&&t&&Q(t.y)&&ny?Math.max(f,l[n]):Math.max(c,l[n])}function MG(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 IG(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=MO({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),c=MO({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=MG({translateX:f,translateY:c,useTranslate3d:s})):u=NG,{cssProperties:u,cssClasses:CG({translateX:f,translateY:c,coordinate:r})}}function As(e){"@babel/helpers - typeof";return As=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},As(e)}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 RO(e){for(var t=1;tLO||Math.abs(n.height-this.state.lastBoundingBox.height)>LO)&&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,m=i.position,y=i.reverseDirection,g=i.useTranslate3d,b=i.viewBox,v=i.wrapperStyle,x=IG({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:m,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:b}),O=x.cssClasses,w=x.cssProperties,S=RO(RO({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},v);return P.createElement("div",{tabIndex:-1,className:O,style:S,ref:function(E){n.wrapperNode=E}},u)}}])}(k.PureComponent),WG=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},En={isSsr:WG(),get:function(t){return En[t]},set:function(t,r){if(typeof t=="string")En[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(i){En[i]=t[i]})}}};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 FO(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 BO(e){for(var t=1;t0;return P.createElement(VG,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:a,coordinate:f,hasPayload:S,offset:h,position:g,reverseDirection:b,useTranslate3d:v,viewBox:x,wrapperStyle:O},JG(u,BO(BO({},this.props),{},{payload:w})))}}])}(k.PureComponent);Ib(Cr,"displayName","Tooltip");Ib(Cr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!En.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 eX=Cn,tX=function(){return eX.Date.now()},rX=tX,nX=/\s/;function iX(e){for(var t=e.length;t--&&nX.test(e.charAt(t)););return t}var aX=iX,oX=aX,sX=/^\s+/;function lX(e){return e&&e.slice(0,oX(e)+1).replace(sX,"")}var uX=lX,cX=uX,UO=sa,fX=ll,VO=0/0,dX=/^[-+]0x[0-9a-f]+$/i,hX=/^0b[01]+$/i,pX=/^0o[0-7]+$/i,mX=parseInt;function yX(e){if(typeof e=="number")return e;if(fX(e))return VO;if(UO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=UO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=cX(e);var r=hX.test(e);return r||pX.test(e)?mX(e.slice(2),r?2:8):dX.test(e)?VO:+e}var n$=yX,vX=sa,_y=rX,WO=n$,gX="Expected a function",xX=Math.max,bX=Math.min;function wX(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(gX);t=WO(t)||0,vX(r)&&(f=!!r.leading,c="maxWait"in r,a=c?xX(WO(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d);function h(S){var _=n,E=i;return n=i=void 0,u=S,o=e.apply(E,_),o}function m(S){return u=S,s=setTimeout(b,t),f?h(S):o}function y(S){var _=S-l,E=S-u,j=t-_;return c?bX(j,a-E):j}function g(S){var _=S-l,E=S-u;return l===void 0||_>=t||_<0||c&&E>=a}function b(){var S=_y();if(g(S))return v(S);s=setTimeout(b,y(S))}function v(S){return s=void 0,d&&n?h(S):(n=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function O(){return s===void 0?o:v(_y())}function w(){var S=_y(),_=g(S);if(n=arguments,i=this,l=S,_){if(s===void 0)return m(l);if(c)return clearTimeout(s),s=setTimeout(b,t),h(l)}return s===void 0&&(s=setTimeout(b,t)),o}return w.cancel=x,w.flush=O,w}var SX=wX,OX=SX,_X=sa,EX="Expected a function";function jX(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(EX);return _X(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),OX(e,t,{leading:n,maxWait:t,trailing:i})}var kX=jX;const i$=ke(kX);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 qO(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 kf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(M=i$(M,y,{trailing:!0,leading:!1}));var D=new ResizeObserver(M),L=w.current.getBoundingClientRect(),B=L.width,W=L.height;return A(B,W),D.observe(w.current),function(){D.disconnect()}},[A,y]);var C=k.useMemo(function(){var M=j.containerWidth,D=j.containerHeight;if(M<0||D<0)return null;ln(Pa(o)||Pa(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,l),ln(!r||r>0,"The aspect(%s) must be greater than zero.",r);var L=Pa(o)?M:o,B=Pa(l)?D:l;r&&r>0&&(L?B=L/r:B&&(L=B*r),d&&B>d&&(B=d)),ln(L>0||B>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.`,L,B,o,l,f,c,r);var W=!Array.isArray(h)&&Jn(h.type).endsWith("Chart");return P.Children.map(h,function(R){return P.isValidElement(R)?k.cloneElement(R,kf({width:L,height:B},W?{style:kf({height:"100%",width:"100%",maxHeight:B,maxWidth:L},R.props.style)}:{})):R})},[r,h,l,d,c,f,j,o]);return P.createElement("div",{id:g?"".concat(g):void 0,className:he("recharts-responsive-container",b),style:kf(kf({},O),{},{width:o,height:l,minWidth:f,minHeight:c,maxHeight:d}),ref:w},C)}),em=function(t){return null};em.displayName="Cell";function Wu(e){"@babel/helpers - typeof";return Wu=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},Wu(e)}function KO(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 Lg(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||En.isSsr)return{width:0,height:0};var n=zX(r),i=JSON.stringify({text:t,copyStyle:n});if(Oo.widthCache[i])return Oo.widthCache[i];try{var a=document.getElementById(GO);a||(a=document.createElement("span"),a.setAttribute("id",GO),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Lg(Lg({},BX),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return Oo.widthCache[i]=l,++Oo.cacheCount>FX&&(Oo.cacheCount=0,Oo.widthCache={}),l}catch{return{width:0,height:0}}},UX=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function qu(e){"@babel/helpers - typeof";return qu=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},qu(e)}function sh(e,t){return HX(e)||qX(e,t)||WX(e,t)||VX()}function VX(){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 WX(e,t){if(e){if(typeof e=="string")return XO(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 XO(e,t)}}function XO(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 oQ(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 t_(e,t){return cQ(e)||uQ(e,t)||lQ(e,t)||sQ()}function sQ(){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 lQ(e,t){if(e){if(typeof e=="string")return r_(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 r_(e,t)}}function r_(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 L.reduce(function(B,W){var R=W.word,z=W.width,H=B[B.length-1];if(H&&(i==null||a||H.width+z+nW.width?B:W})};if(!f)return h;for(var y="…",g=function(L){var B=c.slice(0,L),W=l$({breakAll:u,style:l,children:B+y}).wordsWithComputedWidth,R=d(W),z=R.length>o||m(R).width>Number(i);return[z,R]},b=0,v=c.length-1,x=0,O;b<=v&&x<=c.length-1;){var w=Math.floor((b+v)/2),S=w-1,_=g(S),E=t_(_,2),j=E[0],N=E[1],A=g(w),C=t_(A,1),M=C[0];if(!j&&!M&&(b=w+1),j&&M&&(v=w-1),!j&&M){O=N;break}x++}return O||h},n_=function(t){var r=me(t)?[]:t.toString().split(s$);return[{words:r}]},dQ=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!En.isSsr){var l,u,f=l$({breakAll:o,children:i,style:a});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;l=c,u=d}else return n_(i);return fQ({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return n_(i)},i_="#808080",ro=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,m=t.verticalAnchor,y=m===void 0?"end":m,g=t.fill,b=g===void 0?i_:g,v=e_(t,iQ),x=k.useMemo(function(){return dQ({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:c,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,c,v.style,v.width]),O=v.dx,w=v.dy,S=v.angle,_=v.className,E=v.breakAll,j=e_(v,aQ);if(!vt(n)||!vt(a))return null;var N=n+(Q(O)?O:0),A=a+(Q(w)?w:0),C;switch(y){case"start":C=Ey("calc(".concat(u,")"));break;case"middle":C=Ey("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:C=Ey("calc(".concat(x.length-1," * -").concat(s,")"));break}var M=[];if(c){var D=x[0].width,L=v.width;M.push("scale(".concat((Q(L)?L/D:1)/D,")"))}return S&&M.push("rotate(".concat(S,", ").concat(N,", ").concat(A,")")),M.length&&(j.transform=M.join(" ")),P.createElement("text",Fg({},le(j,!0),{x:N,y:A,className:he("recharts-text",_),textAnchor:h,fill:b.includes("url")?i_:b}),x.map(function(B,W){var R=B.words.join(E?"":" ");return P.createElement("tspan",{x:N,dy:W===0?C:s,key:"".concat(R,"-").concat(W)},R)}))};function Ji(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function hQ(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Db(e){let t,r,n;e.length!==2?(t=Ji,r=(s,l)=>Ji(e(s),l),n=(s,l)=>e(s)-l):(t=e===Ji||e===hQ?e:pQ,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 pQ(){return 0}function u$(e){return e===null?NaN:+e}function*mQ(e,t){if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&(yield r);else{let r=-1;for(let n of e)(n=t(n,++r,e))!=null&&(n=+n)>=n&&(yield n)}}const yQ=Db(Ji),vQ=yQ.right;Db(u$).center;const qc=vQ;class a_ extends Map{constructor(t,r=bQ){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(o_(this,t))}has(t){return super.has(o_(this,t))}set(t,r){return super.set(gQ(this,t),r)}delete(t){return super.delete(xQ(this,t))}}function o_({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function gQ({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function xQ({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function bQ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function wQ(e=Ji){if(e===Ji)return c$;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 c$(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const SQ=Math.sqrt(50),OQ=Math.sqrt(10),_Q=Math.sqrt(2);function lh(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>=SQ?10:a>=OQ?5:a>=_Q?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);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}function l_(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function f$(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?c$:wQ(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)),m=Math.min(n,Math.floor(t+(l-u)*c/l+d));f$(e,t,h,m,i)}const a=e[t];let o=r,s=n;for(Rl(e,r,t),i(e[n],a)>0&&Rl(e,r,n);o0;)--s}i(e[r],a)===0?Rl(e,r,s):(++s,Rl(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Rl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function EQ(e,t,r){if(e=Float64Array.from(mQ(e,r)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return l_(e);if(t>=1)return s_(e);var n,i=(n-1)*t,a=Math.floor(i),o=s_(f$(e,a).subarray(0,a+1)),s=l_(e.subarray(a+1));return o+(s-o)*(i-a)}}function jQ(e,t,r=u$){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 kQ(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?Af(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Af(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=AQ.exec(e))?new lr(t[1],t[2],t[3],1):(t=TQ.exec(e))?new lr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$Q.exec(e))?Af(t[1],t[2],t[3],t[4]):(t=NQ.exec(e))?Af(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=CQ.exec(e))?m_(t[1],t[2]/100,t[3]/100,1):(t=MQ.exec(e))?m_(t[1],t[2]/100,t[3]/100,t[4]):u_.hasOwnProperty(e)?d_(u_[e]):e==="transparent"?new lr(NaN,NaN,NaN,0):null}function d_(e){return new lr(e>>16&255,e>>8&255,e&255,1)}function Af(e,t,r,n){return n<=0&&(e=t=r=NaN),new lr(e,t,r,n)}function DQ(e){return e instanceof Hc||(e=Xu(e)),e?(e=e.rgb(),new lr(e.r,e.g,e.b,e.opacity)):new lr}function Wg(e,t,r,n){return arguments.length===1?DQ(e):new lr(e,t,r,n??1)}function lr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Fb(lr,Wg,h$(Hc,{brighter(e){return e=e==null?uh:Math.pow(uh,e),new lr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ku:Math.pow(Ku,e),new lr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new lr(Wa(this.r),Wa(this.g),Wa(this.b),ch(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:h_,formatHex:h_,formatHex8:LQ,formatRgb:p_,toString:p_}));function h_(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}`}function LQ(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}${Aa((isNaN(this.opacity)?1:this.opacity)*255)}`}function p_(){const e=ch(this.opacity);return`${e===1?"rgb(":"rgba("}${Wa(this.r)}, ${Wa(this.g)}, ${Wa(this.b)}${e===1?")":`, ${e})`}`}function ch(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Aa(e){return e=Wa(e),(e<16?"0":"")+e.toString(16)}function m_(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new nn(e,t,r,n)}function p$(e){if(e instanceof nn)return new nn(e.h,e.s,e.l,e.opacity);if(e instanceof Hc||(e=Xu(e)),!e)return new nn;if(e instanceof nn)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 nn(o,s,l,e.opacity)}function FQ(e,t,r,n){return arguments.length===1?p$(e):new nn(e,t,r,n??1)}function nn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Fb(nn,FQ,h$(Hc,{brighter(e){return e=e==null?uh:Math.pow(uh,e),new nn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ku:Math.pow(Ku,e),new nn(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 lr(jy(e>=240?e-240:e+120,i,n),jy(e,i,n),jy(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new nn(y_(this.h),Tf(this.s),Tf(this.l),ch(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=ch(this.opacity);return`${e===1?"hsl(":"hsla("}${y_(this.h)}, ${Tf(this.s)*100}%, ${Tf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function y_(e){return e=(e||0)%360,e<0?e+360:e}function Tf(e){return Math.max(0,Math.min(1,e||0))}function jy(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 Bb=e=>()=>e;function BQ(e,t){return function(r){return e+r*t}}function zQ(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 UQ(e){return(e=+e)==1?m$:function(t,r){return r-t?zQ(t,r,e):Bb(isNaN(t)?r:t)}}function m$(e,t){var r=t-e;return r?BQ(e,r):Bb(isNaN(e)?t:e)}const v_=function e(t){var r=UQ(t);function n(i,a){var o=r((i=Wg(i)).r,(a=Wg(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=m$(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 VQ(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:fh(n,i)})),r=ky.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function eY(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?tY:eY,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),fh)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,dh),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=zb,f()},c.clamp=function(d){return arguments.length?(o=d?!0:Xt,f()):o!==Xt},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 Ub(){return tm()(Xt,Xt)}function rY(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function hh(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function $s(e){return e=hh(Math.abs(e)),e?e[1]:NaN}function nY(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 iY(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var aY=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qu(e){if(!(t=aY.exec(e)))throw new Error("invalid format: "+e);var t;return new Vb({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]})}Qu.prototype=Vb.prototype;function Vb(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+""}Vb.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 oY(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 y$;function sY(e,t){var r=hh(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(y$=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")+hh(e,Math.max(0,t+a-1))[0]}function x_(e,t){var r=hh(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 b_={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:rY,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)=>x_(e*100,t),r:x_,s:sY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function w_(e){return e}var S_=Array.prototype.map,O_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lY(e){var t=e.grouping===void 0||e.thousands===void 0?w_:nY(S_.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?w_:iY(S_.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){c=Qu(c);var d=c.fill,h=c.align,m=c.sign,y=c.symbol,g=c.zero,b=c.width,v=c.comma,x=c.precision,O=c.trim,w=c.type;w==="n"?(v=!0,w="g"):b_[w]||(x===void 0&&(x=12),O=!0,w="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var S=y==="$"?r:y==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",_=y==="$"?n:/[%p]/.test(w)?o:"",E=b_[w],j=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function N(A){var C=S,M=_,D,L,B;if(w==="c")M=E(A)+M,A="";else{A=+A;var W=A<0||1/A<0;if(A=isNaN(A)?l:E(Math.abs(A),x),O&&(A=oY(A)),W&&+A==0&&m!=="+"&&(W=!1),C=(W?m==="("?m:s:m==="-"||m==="("?"":m)+C,M=(w==="s"?O_[8+y$/3]:"")+M+(W&&m==="("?")":""),j){for(D=-1,L=A.length;++DB||B>57){M=(B===46?i+A.slice(D+1):A.slice(D))+M,A=A.slice(0,D);break}}}v&&!g&&(A=t(A,1/0));var R=C.length+A.length+M.length,z=R>1)+C+A+M+z.slice(R);break;default:A=z+C+A+M;break}return a(A)}return N.toString=function(){return c+""},N}function f(c,d){var h=u((c=Qu(c),c.type="f",c)),m=Math.max(-8,Math.min(8,Math.floor($s(d)/3)))*3,y=Math.pow(10,-m),g=O_[8+m/3];return function(b){return h(y*b)+g}}return{format:u,formatPrefix:f}}var $f,Wb,v$;uY({thousands:",",grouping:[3],currency:["$",""]});function uY(e){return $f=lY(e),Wb=$f.format,v$=$f.formatPrefix,$f}function cY(e){return Math.max(0,-$s(Math.abs(e)))}function fY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($s(t)/3)))*3-$s(Math.abs(e)))}function dY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$s(t)-$s(e))+1}function g$(e,t,r,n){var i=Ug(e,t,r),a;switch(n=Qu(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=fY(i,o))&&(n.precision=a),v$(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=dY(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=cY(i))&&(n.precision=a-(n.type==="%")*2);break}}return Wb(n)}function la(e){var t=e.domain;return e.ticks=function(r){var n=t();return Bg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return g$(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=zg(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 ph(){var e=Ub();return e.copy=function(){return Kc(e,ph())},Wr.apply(e,arguments),la(e)}function x$(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,dh),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return x$(e).unknown(t)},e=arguments.length?Array.from(e,dh):[0,1],la(r)}function b$(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 vY(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 j_(e){return(t,r)=>-e(-t,r)}function qb(e){const t=e(__,E_),r=t.domain;let n=10,i,a;function o(){return i=vY(n),a=yY(n),r()[0]<0?(i=j_(i),a=j_(a),e(hY,pY)):e(__,E_),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(m=1;mf)break;b.push(y)}}else for(;d<=h;++d)for(m=n-1;m>=1;--m)if(y=d>0?m/a(-d):m*a(d),!(yf)break;b.push(y)}b.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Qu(l)).precision==null&&(l.trim=!0),l=Wb(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(b$(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function w$(){const e=qb(tm()).domain([1,10]);return e.copy=()=>Kc(e,w$()).base(e.base()),Wr.apply(e,arguments),e}function k_(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function P_(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Hb(e){var t=1,r=e(k_(t),P_(t));return r.constant=function(n){return arguments.length?e(k_(t=+n),P_(t)):t},la(r)}function S$(){var e=Hb(tm());return e.copy=function(){return Kc(e,S$()).constant(e.constant())},Wr.apply(e,arguments)}function A_(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function gY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function xY(e){return e<0?-e*e:e*e}function Kb(e){var t=e(Xt,Xt),r=1;function n(){return r===1?e(Xt,Xt):r===.5?e(gY,xY):e(A_(r),A_(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},la(t)}function Gb(){var e=Kb(tm());return e.copy=function(){return Kc(e,Gb()).exponent(e.exponent())},Wr.apply(e,arguments),e}function bY(){return Gb.apply(null,arguments).exponent(.5)}function T_(e){return Math.sign(e)*e*e}function wY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function O$(){var e=Ub(),t=[0,1],r=!1,n;function i(a){var o=wY(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(T_(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,dh)).map(T_)),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 O$(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Wr.apply(i,arguments),la(i)}function _$(){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 E$().domain([e,t]).range(i).unknown(a)},Wr.apply(la(o),arguments)}function j$(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[qc(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 j$().domain(e).range(t).unknown(r)},Wr.apply(i,arguments)}const Py=new Date,Ay=new Date;function gt(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(ugt(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)=>(Py.setTime(+a),Ay.setTime(+o),e(Py),e(Ay),Math.floor(r(Py,Ay))),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 mh=gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);mh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):mh);mh.range;const Xn=1e3,Lr=Xn*60,Qn=Lr*60,si=Qn*24,Xb=si*7,$_=si*30,Ty=si*365,Ta=gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Xn)},(e,t)=>(t-e)/Xn,e=>e.getUTCSeconds());Ta.range;const Qb=gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xn)},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getMinutes());Qb.range;const Yb=gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getUTCMinutes());Yb.range;const Zb=gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xn-e.getMinutes()*Lr)},(e,t)=>{e.setTime(+e+t*Qn)},(e,t)=>(t-e)/Qn,e=>e.getHours());Zb.range;const Jb=gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Qn)},(e,t)=>(t-e)/Qn,e=>e.getUTCHours());Jb.range;const Gc=gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Lr)/si,e=>e.getDate()-1);Gc.range;const rm=gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/si,e=>e.getUTCDate()-1);rm.range;const k$=gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/si,e=>Math.floor(e/si));k$.range;function yo(e){return gt(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())*Lr)/Xb)}const nm=yo(0),yh=yo(1),SY=yo(2),OY=yo(3),Ns=yo(4),_Y=yo(5),EY=yo(6);nm.range;yh.range;SY.range;OY.range;Ns.range;_Y.range;EY.range;function vo(e){return gt(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)/Xb)}const im=vo(0),vh=vo(1),jY=vo(2),kY=vo(3),Cs=vo(4),PY=vo(5),AY=vo(6);im.range;vh.range;jY.range;kY.range;Cs.range;PY.range;AY.range;const e1=gt(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());e1.range;const t1=gt(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());t1.range;const li=gt(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());li.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:gt(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)});li.range;const ui=gt(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());ui.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:gt(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)});ui.range;function P$(e,t,r,n,i,a){const o=[[Ta,1,Xn],[Ta,5,5*Xn],[Ta,15,15*Xn],[Ta,30,30*Xn],[a,1,Lr],[a,5,5*Lr],[a,15,15*Lr],[a,30,30*Lr],[i,1,Qn],[i,3,3*Qn],[i,6,6*Qn],[i,12,12*Qn],[n,1,si],[n,2,2*si],[r,1,Xb],[t,1,$_],[t,3,3*$_],[e,1,Ty]];function s(u,f,c){const d=fg).right(o,d);if(h===o.length)return e.every(Ug(u/Ty,f/Ty,c));if(h===0)return mh.every(Math.max(Ug(u,f,c),1));const[m,y]=o[d/o[h-1][2]53)return null;"w"in q||(q.w=1),"Z"in q?(be=Ny(Dl(q.y,0,1)),Ze=be.getUTCDay(),be=Ze>4||Ze===0?vh.ceil(be):vh(be),be=rm.offset(be,(q.V-1)*7),q.y=be.getUTCFullYear(),q.m=be.getUTCMonth(),q.d=be.getUTCDate()+(q.w+6)%7):(be=$y(Dl(q.y,0,1)),Ze=be.getDay(),be=Ze>4||Ze===0?yh.ceil(be):yh(be),be=Gc.offset(be,(q.V-1)*7),q.y=be.getFullYear(),q.m=be.getMonth(),q.d=be.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),Ze="Z"in q?Ny(Dl(q.y,0,1)).getUTCDay():$y(Dl(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(Ze+5)%7:q.w+q.U*7-(Ze+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,Ny(q)):$y(q)}}function E(J,de,ve,q){for(var We=0,be=de.length,Ze=ve.length,rt,Tt;We=Ze)return-1;if(rt=de.charCodeAt(We++),rt===37){if(rt=de.charAt(We++),Tt=w[rt in N_?de.charAt(We++):rt],!Tt||(q=Tt(J,ve,q))<0)return-1}else if(rt!=ve.charCodeAt(q++))return-1}return q}function j(J,de,ve){var q=u.exec(de.slice(ve));return q?(J.p=f.get(q[0].toLowerCase()),ve+q[0].length):-1}function N(J,de,ve){var q=h.exec(de.slice(ve));return q?(J.w=m.get(q[0].toLowerCase()),ve+q[0].length):-1}function A(J,de,ve){var q=c.exec(de.slice(ve));return q?(J.w=d.get(q[0].toLowerCase()),ve+q[0].length):-1}function C(J,de,ve){var q=b.exec(de.slice(ve));return q?(J.m=v.get(q[0].toLowerCase()),ve+q[0].length):-1}function M(J,de,ve){var q=y.exec(de.slice(ve));return q?(J.m=g.get(q[0].toLowerCase()),ve+q[0].length):-1}function D(J,de,ve){return E(J,t,de,ve)}function L(J,de,ve){return E(J,r,de,ve)}function B(J,de,ve){return E(J,n,de,ve)}function W(J){return o[J.getDay()]}function R(J){return a[J.getDay()]}function z(J){return l[J.getMonth()]}function H(J){return s[J.getMonth()]}function Z(J){return i[+(J.getHours()>=12)]}function G(J){return 1+~~(J.getMonth()/3)}function oe(J){return o[J.getUTCDay()]}function we(J){return a[J.getUTCDay()]}function Ce(J){return l[J.getUTCMonth()]}function Ke(J){return s[J.getUTCMonth()]}function At(J){return i[+(J.getUTCHours()>=12)]}function _t(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var de=S(J+="",x);return de.toString=function(){return J},de},parse:function(J){var de=_(J+="",!1);return de.toString=function(){return J},de},utcFormat:function(J){var de=S(J+="",O);return de.toString=function(){return J},de},utcParse:function(J){var de=_(J+="",!0);return de.toString=function(){return J},de}}}var N_={"-":"",_:" ",0:"0"},Ot=/^\s*\d+/,IY=/^%/,RY=/[\\^$*+?|[\]().{}]/g;function Ee(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function LY(e,t,r){var n=Ot.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function FY(e,t,r){var n=Ot.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function BY(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function zY(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function UY(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function C_(e,t,r){var n=Ot.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function M_(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function VY(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 WY(e,t,r){var n=Ot.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function qY(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function I_(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function HY(e,t,r){var n=Ot.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function R_(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function KY(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function GY(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function XY(e,t,r){var n=Ot.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function QY(e,t,r){var n=Ot.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function YY(e,t,r){var n=IY.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function ZY(e,t,r){var n=Ot.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function JY(e,t,r){var n=Ot.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function D_(e,t){return Ee(e.getDate(),t,2)}function eZ(e,t){return Ee(e.getHours(),t,2)}function tZ(e,t){return Ee(e.getHours()%12||12,t,2)}function rZ(e,t){return Ee(1+Gc.count(li(e),e),t,3)}function A$(e,t){return Ee(e.getMilliseconds(),t,3)}function nZ(e,t){return A$(e,t)+"000"}function iZ(e,t){return Ee(e.getMonth()+1,t,2)}function aZ(e,t){return Ee(e.getMinutes(),t,2)}function oZ(e,t){return Ee(e.getSeconds(),t,2)}function sZ(e){var t=e.getDay();return t===0?7:t}function lZ(e,t){return Ee(nm.count(li(e)-1,e),t,2)}function T$(e){var t=e.getDay();return t>=4||t===0?Ns(e):Ns.ceil(e)}function uZ(e,t){return e=T$(e),Ee(Ns.count(li(e),e)+(li(e).getDay()===4),t,2)}function cZ(e){return e.getDay()}function fZ(e,t){return Ee(yh.count(li(e)-1,e),t,2)}function dZ(e,t){return Ee(e.getFullYear()%100,t,2)}function hZ(e,t){return e=T$(e),Ee(e.getFullYear()%100,t,2)}function pZ(e,t){return Ee(e.getFullYear()%1e4,t,4)}function mZ(e,t){var r=e.getDay();return e=r>=4||r===0?Ns(e):Ns.ceil(e),Ee(e.getFullYear()%1e4,t,4)}function yZ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ee(t/60|0,"0",2)+Ee(t%60,"0",2)}function L_(e,t){return Ee(e.getUTCDate(),t,2)}function vZ(e,t){return Ee(e.getUTCHours(),t,2)}function gZ(e,t){return Ee(e.getUTCHours()%12||12,t,2)}function xZ(e,t){return Ee(1+rm.count(ui(e),e),t,3)}function $$(e,t){return Ee(e.getUTCMilliseconds(),t,3)}function bZ(e,t){return $$(e,t)+"000"}function wZ(e,t){return Ee(e.getUTCMonth()+1,t,2)}function SZ(e,t){return Ee(e.getUTCMinutes(),t,2)}function OZ(e,t){return Ee(e.getUTCSeconds(),t,2)}function _Z(e){var t=e.getUTCDay();return t===0?7:t}function EZ(e,t){return Ee(im.count(ui(e)-1,e),t,2)}function N$(e){var t=e.getUTCDay();return t>=4||t===0?Cs(e):Cs.ceil(e)}function jZ(e,t){return e=N$(e),Ee(Cs.count(ui(e),e)+(ui(e).getUTCDay()===4),t,2)}function kZ(e){return e.getUTCDay()}function PZ(e,t){return Ee(vh.count(ui(e)-1,e),t,2)}function AZ(e,t){return Ee(e.getUTCFullYear()%100,t,2)}function TZ(e,t){return e=N$(e),Ee(e.getUTCFullYear()%100,t,2)}function $Z(e,t){return Ee(e.getUTCFullYear()%1e4,t,4)}function NZ(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Cs(e):Cs.ceil(e),Ee(e.getUTCFullYear()%1e4,t,4)}function CZ(){return"+0000"}function F_(){return"%"}function B_(e){return+e}function z_(e){return Math.floor(+e/1e3)}var _o,C$,M$;MZ({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 MZ(e){return _o=MY(e),C$=_o.format,_o.parse,M$=_o.utcFormat,_o.utcParse,_o}function IZ(e){return new Date(e)}function RZ(e){return e instanceof Date?+e:+new Date(+e)}function r1(e,t,r,n,i,a,o,s,l,u){var f=Ub(),c=f.invert,d=f.domain,h=u(".%L"),m=u(":%S"),y=u("%I:%M"),g=u("%I %p"),b=u("%a %d"),v=u("%b %d"),x=u("%B"),O=u("%Y");function w(S){return(l(S)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>EQ(e,a/n))},r.copy=function(){return L$(t).domain(e)},pi.apply(r,arguments)}function om(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=Xt,f,c=!1,d;function h(y){return isNaN(y=+y)?d:(y=.5+((y=+f(y))-a)*(n*yt}var U$=VZ,WZ=sm,qZ=U$,HZ=yl;function KZ(e){return e&&e.length?WZ(e,HZ,qZ):void 0}var GZ=KZ;const lm=ke(GZ);function XZ(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};ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ue;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ne.dividedBy=ne.div=function(e){return ei(this,new this.constructor(e))};ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return Me(ei(t,new r(e),0,1),r.precision)};ne.equals=ne.eq=function(e){return!this.cmp(e)};ne.exponent=function(){return ut(this)};ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0};ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0};ne.isInteger=ne.isint=function(){return this.e>this.d.length-2};ne.isNegative=ne.isneg=function(){return this.s<0};ne.isPositive=ne.ispos=function(){return this.s>0};ne.isZero=function(){return this.s===0};ne.lessThan=ne.lt=function(e){return this.cmp(e)<0};ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1};ne.logarithm=ne.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(xr))throw Error(Ur+"NaN");if(r.s<1)throw Error(Ur+(r.s?"NaN":"-Infinity"));return r.eq(xr)?new n(0):(He=!1,t=ei(Yu(r,a),Yu(e,a),a),He=!0,Me(t,i))};ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?K$(t,e):q$(t,(e.s=-e.s,e))};ne.modulo=ne.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Ur+"NaN");return r.s?(He=!1,t=ei(r,e,0,1).times(e),He=!0,r.minus(t)):Me(new n(r),i)};ne.naturalExponential=ne.exp=function(){return H$(this)};ne.naturalLogarithm=ne.ln=function(){return Yu(this)};ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?q$(t,e):K$(t,(e.s=-e.s,e))};ne.precision=ne.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(qa+e);if(t=ut(i)+1,n=i.d.length-1,r=n*Ue+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};ne.squareRoot=ne.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(Ur+"NaN")}for(e=ut(s),He=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Sn(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=xl((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(ei(s,a,o+2)).times(.5),Sn(a.d).slice(0,o)===(t=Sn(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Me(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return He=!0,Me(n,r)};ne.times=ne.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%xt|0,t=s/xt|0;a[i]=(a[i]+t)%xt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,He?Me(e,c.precision):e};ne.toDecimalPlaces=ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(An(e,0,gl),t===void 0?t=n.rounding:An(t,0,8),Me(r,e+ut(r)+1,t))};ne.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=no(n,!0):(An(e,0,gl),t===void 0?t=i.rounding:An(t,0,8),n=Me(new i(n),e+1,t),r=no(n,!0,e+1)),r};ne.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?no(i):(An(e,0,gl),t===void 0?t=a.rounding:An(t,0,8),n=Me(new a(i),e+ut(i)+1,t),r=no(n.abs(),!1,e+ut(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return Me(new t(e),ut(e)+1,t.rounding)};ne.toNumber=function(){return+this};ne.toPower=ne.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(xr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ur+"Infinity");return s}if(s.eq(xr))return s;if(n=l.precision,e.eq(xr))return Me(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=f<0?-f:f)<=W$){for(i=new l(xr),t=Math.ceil(n/Ue+4),He=!1;r%2&&(i=i.times(s),W_(i.d,t)),r=xl(r/2),r!==0;)s=s.times(s),W_(s.d,t);return He=!0,e.s<0?new l(xr).div(i):Me(i,n)}}else if(a<0)throw Error(Ur+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,He=!1,i=e.times(Yu(s,n+u)),He=!0,i=H$(i),i.s=a,i};ne.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ut(i),n=no(i,r<=a.toExpNeg||r>=a.toExpPos)):(An(e,1,gl),t===void 0?t=a.rounding:An(t,0,8),i=Me(new a(i),e,t),r=ut(i),n=no(i,e<=r||r<=a.toExpNeg,e)),n};ne.toSignificantDigits=ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(An(e,1,gl),t===void 0?t=n.rounding:An(t,0,8)),Me(new n(r),e,t)};ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ut(e),r=e.constructor;return no(e,t<=r.toExpNeg||t>=r.toExpPos)};function q$(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)),He?Me(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/Ue),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)/xt|0,l[a]%=xt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,He?Me(t,c):t}function An(e,t,r){if(e!==~~e||er)throw Error(qa+e)}function Sn(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,m,y,g,b,v,x,O,w,S,_,E,j=n.constructor,N=n.s==i.s?1:-1,A=n.d,C=i.d;if(!n.s)return new j(n);if(!i.s)throw Error(Ur+"Division by zero");for(l=n.e-i.e,_=C.length,w=A.length,h=new j(N),m=h.d=[],u=0;C[u]==(A[u]||0);)++u;if(C[u]>(A[u]||0)&&--l,a==null?v=a=j.precision:o?v=a+(ut(n)-ut(i))+1:v=a,v<0)return new j(0);if(v=v/Ue+2|0,u=0,_==1)for(f=0,C=C[0],v++;(u1&&(C=e(C,f),A=e(A,f),_=C.length,w=A.length),O=_,y=A.slice(0,_),g=y.length;g<_;)y[g++]=0;E=C.slice(),E.unshift(0),S=C[0],C[1]>=xt/2&&++S;do f=0,s=t(C,y,_,g),s<0?(b=y[0],_!=g&&(b=b*xt+(y[1]||0)),f=b/S|0,f>1?(f>=xt&&(f=xt-1),c=e(C,f),d=c.length,g=y.length,s=t(c,y,d,g),s==1&&(f--,r(c,_16)throw Error(a1+ut(e));if(!e.s)return new f(xr);for(t==null?(He=!1,s=c):s=t,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(ga(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new f(xr),f.precision=s;;){if(i=Me(i.times(e),s),r=r.times(++l),o=a.plus(ei(i,r,s)),Sn(o.d).slice(0,s)===Sn(a.d).slice(0,s)){for(;u--;)a=Me(a.times(a),s);return f.precision=c,t==null?(He=!0,Me(a,c)):a}a=o}}function ut(e){for(var t=e.e*Ue,r=e.d[0];r>=10;r/=10)t++;return t}function Cy(e,t,r){if(t>e.LN10.sd())throw He=!0,r&&(e.precision=r),Error(Ur+"LN10 precision limit exceeded");return Me(new e(e.LN10),t)}function Si(e){for(var t="";e--;)t+="0";return t}function Yu(e,t){var r,n,i,a,o,s,l,u,f,c=1,d=10,h=e,m=h.d,y=h.constructor,g=y.precision;if(h.s<1)throw Error(Ur+(h.s?"NaN":"-Infinity"));if(h.eq(xr))return new y(0);if(t==null?(He=!1,u=g):u=t,h.eq(10))return t==null&&(He=!0),Cy(y,u);if(u+=d,y.precision=u,r=Sn(m),n=r.charAt(0),a=ut(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Sn(h.d),n=r.charAt(0),c++;a=ut(h),n>1?(h=new y("0."+r),a++):h=new y(n+"."+r.slice(1))}else return l=Cy(y,u+2,g).times(a+""),h=Yu(new y(n+"."+r.slice(1)),u-d).plus(l),y.precision=g,t==null?(He=!0,Me(h,g)):h;for(s=o=h=ei(h.minus(xr),h.plus(xr),u),f=Me(h.times(h),u),i=3;;){if(o=Me(o.times(f),u),l=s.plus(ei(o,new y(i),u)),Sn(l.d).slice(0,u)===Sn(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(Cy(y,u+2,g).times(a+""))),s=ei(s,new y(c),u),y.precision=g,t==null?(He=!0,Me(s,g)):s;s=l,i+=2}}function V_(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=xl(r/Ue),e.d=[],n=(r+1)%Ue,r<0&&(n+=Ue),ngh||e.e<-gh))throw Error(a1+r)}else e.s=0,e.e=0,e.d=[0];return e}function Me(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+=Ue,i=t,u=c[f=0];else{if(f=Math.ceil((n+1)/Ue),a=c.length,f>=a)return e;for(u=a=c[f],o=1;a>=10;a/=10)o++;n%=Ue,i=n-Ue+o}if(r!==void 0&&(a=ga(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/ga(10,o-i):0:c[f-1])%10&1||r==(e.s<0?8:7))),t<1||!c[0])return l?(a=ut(e),c.length=1,t=t-a-1,c[0]=ga(10,(Ue-t%Ue)%Ue),e.e=xl(-t/Ue)||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=ga(10,Ue-n),c[f]=i>0?(u/ga(10,o-i)%ga(10,i)|0)*a:0),l)for(;;)if(f==0){(c[0]+=a)==xt&&(c[0]=1,++e.e);break}else{if(c[f]+=a,c[f]!=xt)break;c[f--]=0,a=1}for(n=c.length;c[--n]===0;)c.pop();if(He&&(e.e>gh||e.e<-gh))throw Error(a1+ut(e));return e}function K$(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),He?Me(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/Ue),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)+Si(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Si(-i-1)+a,r&&(n=r-o)>0&&(a+=Si(n))):i>=o?(a+=Si(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Si(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=Si(n))),e.s<0?"-"+a:a}function W_(e,t){if(e.length>t)return e.length=t,!0}function G$(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(qa+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 V_(o,a.toString())}else if(typeof a!="string")throw Error(qa+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,yJ.test(a))V_(o,a);else throw Error(qa+a)}if(i.prototype=ne,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=G$,i.config=i.set=vJ,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(qa+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(qa+r+": "+n);return this}var o1=G$(mJ);xr=new o1(1);const Ne=o1;function gJ(e){return SJ(e)||wJ(e)||bJ(e)||xJ()}function xJ(){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 bJ(e,t){if(e){if(typeof e=="string")return Kg(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 Kg(e,t)}}function wJ(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function SJ(e){if(Array.isArray(e))return Kg(e)}function Kg(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,q_(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 DJ(e){if(Array.isArray(e))return e}function J$(e){var t=Zu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function eN(e,t,r){if(e.lte(0))return new Ne(0);var n=fm.getDigitCount(e.toNumber()),i=new Ne(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Ne(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new Ne(Math.ceil(l))}function LJ(e,t,r){var n=1,i=new Ne(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Ne(10).pow(fm.getDigitCount(e)-1),i=new Ne(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ne(Math.floor(e)))}else e===0?i=new Ne(Math.floor((t-1)/2)):r||(i=new Ne(Math.floor(e)));var o=Math.floor((t-1)/2),s=jJ(EJ(function(l){return i.add(new Ne(l-o).mul(n)).toNumber()}),Gg);return s(0,t)}function tN(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 Ne(0),tickMin:new Ne(0),tickMax:new Ne(0)};var a=eN(new Ne(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new Ne(0):(o=new Ne(e).add(t).div(2),o=o.sub(new Ne(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Ne(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?tN(e,t,r,n,i+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new Ne(s).mul(a)),tickMax:o.add(new Ne(l).mul(a))})}function FJ(e){var t=Zu(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=J$([r,n]),l=Zu(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var c=f===1/0?[u].concat(Qg(Gg(0,i-1).map(function(){return 1/0}))):[].concat(Qg(Gg(0,i-1).map(function(){return-1/0})),[f]);return r>n?Xg(c):c}if(u===f)return LJ(u,i,a);var d=tN(u,f,o,a),h=d.step,m=d.tickMin,y=d.tickMax,g=fm.rangeStep(m,y.add(new Ne(.1).mul(h)),h);return r>n?Xg(g):g}function BJ(e,t){var r=Zu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=J$([n,i]),s=Zu(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=eN(new Ne(u).sub(l).div(f-1),a,0),d=[].concat(Qg(fm.rangeStep(new Ne(l),new Ne(u).sub(new Ne(.99).mul(c)),c)),[u]);return n>i?Xg(d):d}var zJ=Y$(FJ),UJ=Y$(BJ),VJ=!0,My="Invariant failed";function io(e,t){if(!e){if(VJ)throw new Error(My);var r=typeof t=="function"?t():t,n=r?"".concat(My,": ").concat(r):My;throw new Error(n)}}var WJ=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Ms(e){"@babel/helpers - typeof";return Ms=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},Ms(e)}function xh(){return xh=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 YJ(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 ZJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K_(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(Kt(c-f)!==Kt(d-c)){var m=[];if(Kt(d-c)===Kt(l[1]-l[0])){h=d;var y=c+l[1]-l[0];m[0]=Math.min(y,(y+f)/2),m[1]=Math.max(y,(y+f)/2)}else{h=f;var g=d+l[1]-l[0];m[0]=Math.min(c,(g+c)/2),m[1]=Math.max(c,(g+c)/2)}var b=[Math.min(c,(h+c)/2),Math.max(c,(h+c)/2)];if(t>b[0]&&t<=b[1]||t>=m[0]&&t<=m[1]){o=i[u].index;break}}else{var v=Math.min(f,d),x=Math.max(f,d);if(t>(v+c)/2&&t<=(x+c)/2){o=i[u].index;break}}}else for(var O=0;O0&&O(n[O].coordinate+n[O-1].coordinate)/2&&t<=(n[O].coordinate+n[O+1].coordinate)/2||O===s-1&&t>(n[O].coordinate+n[O-1].coordinate)/2){o=n[O].index;break}return o},s1=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?tt(tt({},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},mee=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(b&&b.length){var v=b[0].type.defaultProps,x=v!==void 0?tt(tt({},v),b[0].props):b[0].props,O=x.barSize,w=x[g];o[w]||(o[w]=[]);var S=me(O)?r:O;o[w].push({item:b[0],stackList:b.slice(1),barSize:me(S)?void 0:Gt(S,n,0)})}}return o},yee=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=Gt(r,i,0,!0),f,c=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/l,m=o.reduce(function(O,w){return O+w.barSize||0},0);m+=(l-1)*u,m>=i&&(m-=(l-1)*u,u=0),m>=i&&h>0&&(d=!0,h*=.9,m=l*h);var y=(i-m)/2>>0,g={offset:y-u,size:0};f=o.reduce(function(O,w){var S={item:w.item,position:{offset:g.offset+g.size+u,size:d?h:w.barSize}},_=[].concat(X_(O),[S]);return g=_[_.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){_.push({item:E,position:g})}),_},c)}else{var b=Gt(n,i,0,!0);i-2*b-(l-1)*u<=0&&(u=0);var v=(i-2*b-(l-1)*u)/l;v>1&&(v>>=0);var x=s===+s?Math.min(v,s):v;f=o.reduce(function(O,w,S){var _=[].concat(X_(O),[{item:w.item,position:{offset:b+(v+u)*S+(v-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){_.push({item:E,position:_[_.length-1].position})}),_},c)}return f},vee=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=aN({children:a,legendWidth:l});if(u){var f=i||{},c=f.width,d=f.height,h=u.align,m=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&m==="middle")&&h!=="center"&&Q(t[h]))return tt(tt({},t),{},es({},h,t[h]+(c||0)));if((y==="horizontal"||y==="vertical"&&h==="center")&&m!=="middle"&&Q(t[m]))return tt(tt({},t),{},es({},m,t[m]+(d||0)))}return t},gee=function(t,r,n){return me(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},oN=function(t,r,n,i,a){var o=r.props.children,s=Or(o,Qc).filter(function(u){return gee(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=mt(f,n);if(me(c))return u;var d=Array.isArray(c)?[um(c),lm(c)]:[c,c],h=l.reduce(function(m,y){var g=mt(f,y,0),b=d[0]-Math.abs(Array.isArray(g)?g[0]:g),v=d[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(b,m[0]),Math.max(v,m[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},xee=function(t,r,n,i,a){var o=r.map(function(s){return oN(t,s,n,a,i)}).filter(function(s){return!me(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},sN=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&oN(t,l,u,i)||du(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?Kt(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!Vc(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}})},Iy=new WeakMap,Nf=function(t,r){if(typeof r!="function")return t;Iy.has(t)||Iy.set(t,new WeakMap);var n=Iy.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},cN=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:Hu(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:ph(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:fu(),realScaleType:"point"}:a==="category"?{scale:Hu(),realScaleType:"band"}:{scale:ph(),realScaleType:"linear"};if(eo(i)){var l="scale".concat(Kp(i));return{scale:(U_[l]||fu)(),realScaleType:U_[l]?l:"point"}}return fe(i)?{scale:i}:{scale:fu(),realScaleType:"point"}},Y_=1e-4,fN=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])-Y_,o=Math.max(i[0],i[1])+Y_,s=t(r[0]),l=t(r[n-1]);(so||lo)&&t.domain([r[0],r[n-1]])}},bee=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])}},Oee=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)}},_ee={sign:See,expand:HU,none:js,silhouette:KU,wiggle:GU,positive:Oee},Eee=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=_ee[n],o=qU().keys(i).value(function(s,l){return+mt(s,l,0)}).order(_g).offset(a);return o(t)},jee=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,m=(h=d.type)!==null&&h!==void 0&&h.defaultProps?tt(tt({},d.type.defaultProps),d.props):d.props,y=m.stackId,g=m.hide;if(g)return c;var b=m[n],v=c[b]||{hasStack:!1,stackGroups:{}};if(vt(y)){var x=v.stackGroups[y]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(d),v.hasStack=!0,v.stackGroups[y]=x}else v.stackGroups[hl("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return tt(tt({},c),{},es({},b,v))},l),f={};return Object.keys(u).reduce(function(c,d){var h=u[d];if(h.hasStack){var m={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(y,g){var b=h.stackGroups[g];return tt(tt({},y),{},es({},g,{numericAxisId:n,cateAxisId:i,items:b.items,stackedData:Eee(t,b.items,a)}))},m)}return tt(tt({},c),{},es({},d,h))},f)},dN=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=zJ(u,a,s);return t.domain([um(f),lm(f)]),{niceTicks:f}}if(a&&i==="number"){var c=t.domain(),d=UJ(c,a,s);return{niceTicks:d}}return null};function Z_(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&&!me(i[t.dataKey])){var s=Kd(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=mt(i,me(o)?t.dataKey:o);return me(l)?null:t.scale(l)}var J_=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=mt(o,r.dataKey,r.domain[s]);return me(l)?null:r.scale(l)-a/2+i},kee=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]},Pee=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?tt(tt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(vt(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},Aee=function(t){return t.reduce(function(r,n){return[um(n.concat([r[0]]).filter(Q)),lm(n.concat([r[1]]).filter(Q))]},[1/0,-1/0])},hN=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=Aee(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})},eE=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,tE=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,e0=function(t,r,n){if(fe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(Q(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(eE.test(t[0])){var a=+eE.exec(t[0])[1];i[0]=r[0]-a}else fe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(Q(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(tE.test(t[1])){var o=+tE.exec(t[1])[1];i[1]=r[1]+o}else fe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},wh=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=Mb(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},Lee=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,f=Gt(t.cx,o,o/2),c=Gt(t.cy,s,s/2),d=yN(o,s,n),h=Gt(t.innerRadius,d,0),m=Gt(t.outerRadius,d,d*.8),y=Object.keys(r);return y.reduce(function(g,b){var v=r[b],x=v.domain,O=v.reversed,w;if(me(v.range))i==="angleAxis"?w=[l,u]:i==="radiusAxis"&&(w=[h,m]),O&&(w=[w[1],w[0]]);else{w=v.range;var S=w,_=Nee(S,2);l=_[0],u=_[1]}var E=cN(v,a),j=E.realScaleType,N=E.scale;N.domain(x).range(w),fN(N);var A=dN(N,Vn(Vn({},v),{},{realScaleType:j})),C=Vn(Vn(Vn({},v),A),{},{range:w,radius:m,realScaleType:j,scale:N,cx:f,cy:c,innerRadius:h,outerRadius:m,startAngle:l,endAngle:u});return Vn(Vn({},g),{},mN({},b,C))},{})},Fee=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))},Bee=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=Fee({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:Dee(u),angleInRadian:u}},zee=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}},Uee=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},aE=function(t,r){var n=t.x,i=t.y,a=Bee({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=zee(r),c=f.startAngle,d=f.endAngle,h=s,m;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 m?Vn(Vn({},r),{},{radius:o,angle:Uee(h,r)}):null},vN=function(t){return!k.isValidElement(t)&&!fe(t)&&typeof t!="boolean"?t.className:""};function rc(e){"@babel/helpers - typeof";return rc=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},rc(e)}var Vee=["offset"];function Wee(e){return Gee(e)||Kee(e)||Hee(e)||qee()}function qee(){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 Hee(e,t){if(e){if(typeof e=="string")return t0(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 t0(e,t)}}function Kee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gee(e){if(Array.isArray(e))return t0(e)}function t0(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 Qee(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 oE(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 ft(e){for(var t=1;t=0?1:-1,x,O;i==="insideStart"?(x=h+v*o,O=y):i==="insideEnd"?(x=m-v*o,O=!y):i==="end"&&(x=m+v*o,O=y),O=b<=0?O:!O;var w=Fe(u,f,g,x),S=Fe(u,f,g,x+(O?1:-1)*359),_="M".concat(w.x,",").concat(w.y,` + A`).concat(g,",").concat(g,",0,1,").concat(O?0:1,`, + `).concat(S.x,",").concat(S.y),E=me(t.id)?hl("recharts-radial-line-"):t.id;return P.createElement("text",nc({},n,{dominantBaseline:"central",className:he("recharts-radial-bar-label",s)}),P.createElement("defs",null,P.createElement("path",{id:E,d:_})),P.createElement("textPath",{xlinkHref:"#".concat(E)},r))},nte=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=Fe(o,s,u+n,d),m=h.x,y=h.y;return{x:m,y,textAnchor:m>=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 g=(l+u)/2,b=Fe(o,s,g,d),v=b.x,x=b.y;return{x:v,y:x,textAnchor:"middle",verticalAnchor:"middle"}},ite=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",m=c>0?"start":"end",y=u>=0?1:-1,g=y*i,b=y>0?"end":"start",v=y>0?"start":"end";if(a==="top"){var x={x:s+u/2,y:l-c*i,textAnchor:"middle",verticalAnchor:h};return ft(ft({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var O={x:s+u/2,y:l+f+d,textAnchor:"middle",verticalAnchor:m};return ft(ft({},O),n?{height:Math.max(n.y+n.height-(l+f),0),width:u}:{})}if(a==="left"){var w={x:s-g,y:l+f/2,textAnchor:b,verticalAnchor:"middle"};return ft(ft({},w),n?{width:Math.max(w.x-n.x,0),height:f}:{})}if(a==="right"){var S={x:s+u+g,y:l+f/2,textAnchor:v,verticalAnchor:"middle"};return ft(ft({},S),n?{width:Math.max(n.x+n.width-S.x,0),height:f}:{})}var _=n?{width:u,height:f}:{};return a==="insideLeft"?ft({x:s+g,y:l+f/2,textAnchor:v,verticalAnchor:"middle"},_):a==="insideRight"?ft({x:s+u-g,y:l+f/2,textAnchor:b,verticalAnchor:"middle"},_):a==="insideTop"?ft({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:m},_):a==="insideBottom"?ft({x:s+u/2,y:l+f-d,textAnchor:"middle",verticalAnchor:h},_):a==="insideTopLeft"?ft({x:s+g,y:l+d,textAnchor:v,verticalAnchor:m},_):a==="insideTopRight"?ft({x:s+u-g,y:l+d,textAnchor:b,verticalAnchor:m},_):a==="insideBottomLeft"?ft({x:s+g,y:l+f-d,textAnchor:v,verticalAnchor:h},_):a==="insideBottomRight"?ft({x:s+u-g,y:l+f-d,textAnchor:b,verticalAnchor:h},_):ul(a)&&(Q(a.x)||Pa(a.x))&&(Q(a.y)||Pa(a.y))?ft({x:s+Gt(a.x,u),y:l+Gt(a.y,f),textAnchor:"end",verticalAnchor:"end"},_):ft({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},_)},ate=function(t){return"cx"in t&&Q(t.cx)};function wt(e){var t=e.offset,r=t===void 0?5:t,n=Xee(e,Vee),i=ft({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||me(s)&&me(l)&&!k.isValidElement(u)&&!fe(u))return null;if(k.isValidElement(u))return k.cloneElement(u,i);var h;if(fe(u)){if(h=k.createElement(u,i),k.isValidElement(h))return h}else h=ete(i);var m=ate(a),y=le(i,!0);if(m&&(o==="insideStart"||o==="insideEnd"||o==="end"))return rte(i,h,y);var g=m?nte(i):ite(i);return P.createElement(ro,nc({className:he("recharts-label",c)},y,g,{breakAll:d}),h)}wt.displayName="Label";var gN=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,m=t.left,y=t.width,g=t.height,b=t.clockWise,v=t.labelViewBox;if(v)return v;if(Q(y)&&Q(g)){if(Q(c)&&Q(d))return{x:c,y:d,width:y,height:g};if(Q(h)&&Q(m))return{x:h,y:m,width:y,height:g}}return Q(c)&&Q(d)?{x:c,y:d,width:0,height:0}:Q(r)&&Q(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:b}:t.viewBox?t.viewBox:{}},ote=function(t,r){return t?t===!0?P.createElement(wt,{key:"label-implicit",viewBox:r}):vt(t)?P.createElement(wt,{key:"label-implicit",viewBox:r,value:t}):k.isValidElement(t)?t.type===wt?k.cloneElement(t,{key:"label-implicit",viewBox:r}):P.createElement(wt,{key:"label-implicit",content:t,viewBox:r}):fe(t)?P.createElement(wt,{key:"label-implicit",content:t,viewBox:r}):ul(t)?P.createElement(wt,nc({viewBox:r},t,{key:"label-implicit"})):null:null},ste=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=gN(t),o=Or(i,wt).map(function(l,u){return k.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=ote(t.label,r||a);return[s].concat(Wee(o))};wt.parseViewBox=gN;wt.renderCallByParent=ste;function lte(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ute=lte;const cte=ke(ute);function ic(e){"@babel/helpers - typeof";return ic=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},ic(e)}var fte=["valueAccessor"],dte=["data","dataKey","clockWise","id","textBreakAll"];function hte(e){return vte(e)||yte(e)||mte(e)||pte()}function pte(){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 mte(e,t){if(e){if(typeof e=="string")return r0(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 r0(e,t)}}function yte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vte(e){if(Array.isArray(e))return r0(e)}function r0(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 wte(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 Ste=function(t){return Array.isArray(t.value)?cte(t.value):t.value};function ti(e){var t=e.valueAccessor,r=t===void 0?Ste:t,n=uE(e,fte),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=uE(n,dte);return!i||!i.length?null:P.createElement(_e,{className:"recharts-label-list"},i.map(function(f,c){var d=me(a)?r(f,c):mt(f&&f.payload,a),h=me(s)?{}:{id:"".concat(s,"-").concat(c)};return P.createElement(wt,Oh({},le(f,!0),u,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:l,viewBox:wt.parseViewBox(me(o)?f:lE(lE({},f),{},{clockWise:o})),key:"label-".concat(c),index:c}))}))}ti.displayName="LabelList";function Ote(e,t){return e?e===!0?P.createElement(ti,{key:"labelList-implicit",data:t}):P.isValidElement(e)||fe(e)?P.createElement(ti,{key:"labelList-implicit",data:t,content:e}):ul(e)?P.createElement(ti,Oh({data:t},e,{key:"labelList-implicit"})):null:null}function _te(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=Or(n,ti).map(function(o,s){return k.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=Ote(e.label,t);return[a].concat(hte(i))}ti.renderCallByParent=_te;function ac(e){"@babel/helpers - typeof";return ac=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},ac(e)}function n0(){return n0=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=Fe(r,n,i,o),m=Fe(r,n,i,u);d+="L ".concat(m.x,",").concat(m.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},Ate=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=Kt(f-u),d=Cf({cx:r,cy:n,radius:a,angle:u,sign:c,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,m=d.lineTangency,y=d.theta,g=Cf({cx:r,cy:n,radius:a,angle:f,sign:-c,cornerRadius:o,cornerIsExternal:l}),b=g.circleTangency,v=g.lineTangency,x=g.theta,O=l?Math.abs(u-f):Math.abs(u-f)-y-x;if(O<0)return s?"M ".concat(m.x,",").concat(m.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 + `):xN({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var w="M ".concat(m.x,",").concat(m.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(h.x,",").concat(h.y,` + A`).concat(a,",").concat(a,",0,").concat(+(O>180),",").concat(+(c<0),",").concat(b.x,",").concat(b.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(v.x,",").concat(v.y,` + `);if(i>0){var S=Cf({cx:r,cy:n,radius:i,angle:u,sign:c,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=S.circleTangency,E=S.lineTangency,j=S.theta,N=Cf({cx:r,cy:n,radius:i,angle:f,sign:-c,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),A=N.circleTangency,C=N.lineTangency,M=N.theta,D=l?Math.abs(u-f):Math.abs(u-f)-j-M;if(D<0&&o===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(C.x,",").concat(C.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(A.x,",").concat(A.y,` + A`).concat(i,",").concat(i,",0,").concat(+(D>180),",").concat(+(c>0),",").concat(_.x,",").concat(_.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(E.x,",").concat(E.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},Tte={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},bN=function(t){var r=fE(fE({},Tte),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?g=Ate({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(y,m/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:c}):g=xN({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:c}),P.createElement("path",n0({},le(r,!0),{className:h,d:g,role:"img"}))};function oc(e){"@babel/helpers - typeof";return oc=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},oc(e)}function i0(){return i0=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Xte(e,t){return go(e.getTime(),t.getTime())}function Qte(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Yte(e,t){return e===t}function xE(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,s,l=0;(o=a.next())&&!o.done;){for(var u=t.entries(),f=!1,c=0;(s=u.next())&&!s.done;){if(i[c]){c++;continue}var 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}var Zte=go;function Jte(e,t,r){var n=gE(e),i=n.length;if(gE(t).length!==i)return!1;for(;i-- >0;)if(!_N(e,t,r,n[i]))return!1;return!0}function Ul(e,t,r){var n=yE(e),i=n.length;if(yE(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=n[i],!_N(e,t,r,a)||(o=vE(e,a),s=vE(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function ere(e,t){return go(e.valueOf(),t.valueOf())}function tre(e,t){return e.source===t.source&&e.flags===t.flags}function bE(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,s;(o=a.next())&&!o.done;){for(var l=t.values(),u=!1,f=0;(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 rre(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function nre(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 _N(e,t,r,n){return(n===Kte||n===Hte||n===qte)&&(e.$$typeof||t.$$typeof)?!0:Wte(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var ire="[object Arguments]",are="[object Boolean]",ore="[object Date]",sre="[object Error]",lre="[object Map]",ure="[object Number]",cre="[object Object]",fre="[object RegExp]",dre="[object Set]",hre="[object String]",pre="[object URL]",mre=Array.isArray,wE=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,SE=Object.assign,yre=Object.prototype.toString.call.bind(Object.prototype.toString);function vre(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,f=e.areSetsEqual,c=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(m,y,g){if(m===y)return!0;if(m==null||y==null)return!1;var b=typeof m;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?o(m,y,g):b==="function"?i(m,y,g):!1;var v=m.constructor;if(v!==y.constructor)return!1;if(v===Object)return s(m,y,g);if(mre(m))return t(m,y,g);if(wE!=null&&wE(m))return c(m,y,g);if(v===Date)return r(m,y,g);if(v===RegExp)return u(m,y,g);if(v===Map)return a(m,y,g);if(v===Set)return f(m,y,g);var x=yre(m);return x===ore?r(m,y,g):x===fre?u(m,y,g):x===lre?a(m,y,g):x===dre?f(m,y,g):x===cre?typeof m.then!="function"&&typeof y.then!="function"&&s(m,y,g):x===pre?d(m,y,g):x===sre?n(m,y,g):x===ire?s(m,y,g):x===are||x===ure||x===hre?l(m,y,g):!1}}function gre(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Ul:Gte,areDatesEqual:Xte,areErrorsEqual:Qte,areFunctionsEqual:Yte,areMapsEqual:n?mE(xE,Ul):xE,areNumbersEqual:Zte,areObjectsEqual:n?Ul:Jte,arePrimitiveWrappersEqual:ere,areRegExpsEqual:tre,areSetsEqual:n?mE(bE,Ul):bE,areTypedArraysEqual:n?Ul:rre,areUrlsEqual:nre};if(r&&(i=SE({},i,r(i))),t){var a=If(i.areArraysEqual),o=If(i.areMapsEqual),s=If(i.areObjectsEqual),l=If(i.areSetsEqual);i=SE({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function xre(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function bre(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(l,u){var f=n(),c=f.cache,d=c===void 0?t?new WeakMap:void 0:c,h=f.meta;return r(l,u,{cache:d,equals:i,meta:h,strict:a})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,u){return r(l,u,o)}}var wre=ca();ca({strict:!0});ca({circular:!0});ca({circular:!0,strict:!0});ca({createInternalComparator:function(){return go}});ca({strict:!0,createInternalComparator:function(){return go}});ca({circular:!0,createInternalComparator:function(){return go}});ca({circular:!0,createInternalComparator:function(){return go},strict:!0});function ca(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=gre(e),l=vre(s),u=n?n(l):xre(l);return bre({circular:r,comparator:l,createState:i,equals:u,strict:o})}function Sre(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function OE(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):Sre(i)};requestAnimationFrame(n)}function a0(e){"@babel/helpers - typeof";return a0=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},a0(e)}function Ore(e){return kre(e)||jre(e)||Ere(e)||_re()}function _re(){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 Ere(e,t){if(e){if(typeof e=="string")return _E(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 _E(e,t)}}function _E(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:b<0?0:b},y=function(b){for(var v=b>1?1:b,x=v,O=0;O<8;++O){var w=c(x)-v,S=h(x);if(Math.abs(w-v)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,m=d*a,y=d+(h-m)*s/1e3,g=d*s/1e3+f;return Math.abs(g-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 ine(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 Ry(e){return lne(e)||sne(e)||one(e)||ane()}function ane(){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 one(e,t){if(e){if(typeof e=="string")return c0(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 c0(e,t)}}function sne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lne(e){if(Array.isArray(e))return c0(e)}function c0(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 kh(e){return kh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kh(e)}var dm=function(e){dne(r,e);var t=hne(r);function r(n,i){var a;une(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(h0(a)),a.changeStyle=a.changeStyle.bind(h0(a)),!s||h<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:f}),d0(a);if(c&&c.length)a.state={style:c[0].style};else if(u){if(typeof d=="function")return a.state={style:u},d0(a);a.state={style:l?Ql({},l,u):u}}else a.state={style:{}};return a}return cne(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?Ql({},l,f):f};this.state&&d&&(l&&d[l]!==f||!l&&d!==f)&&this.setState(h);return}if(!(wre(i.to,f)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=m||u?c:i.to;if(this.state&&d){var g={style:l?Ql({},l,y):y};(l&&d[l]!==y||!l&&d!==y)&&this.setState(g)}this.runAnimation(Hr(Hr({},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=tne(o,s,Wre(u),l,this.changeStyle),m=function(){a.stopJSAnimation=h()};this.manager.start([d,f,m,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,g,b){if(b===0)return y;var v=g.duration,x=g.easing,O=x===void 0?"ease":x,w=g.style,S=g.properties,_=g.onAnimationEnd,E=b>0?o[b-1]:g,j=S||Object.keys(w);if(typeof O=="function"||O==="spring")return[].concat(Ry(y),[a.runJSAnimation.bind(a,{from:E.style,to:w,duration:v,easing:O}),v]);var N=kE(j,v,O),A=Hr(Hr(Hr({},E.style),w),{},{transition:N});return[].concat(Ry(y),[A,v,_]).filter(Nre)};return this.manager.start([l].concat(Ry(o.reduce(h,[f,Math.max(d,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Pre());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,m=this.manager;if(this.unSubscribe=m.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?Ql({},s,l):l,g=kE(Object.keys(y),o,u);m.start([f,a,Hr(Hr({},y),{},{transition:g}),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=nne(i,rne),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 m=h.props,y=m.style,g=y===void 0?{}:y,b=m.className,v=k.cloneElement(h,Hr(Hr({},l),{},{style:Hr(Hr({},g),f),className:b}));return v};return u===1?c(k.Children.only(a)):P.createElement("div",null,k.Children.map(a,function(d){return c(d)}))}}]),r}(k.PureComponent);dm.displayName="Animate";dm.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};dm.propTypes={from:je.oneOfType([je.object,je.string]),to:je.oneOfType([je.object,je.string]),attributeName:je.string,duration:je.number,begin:je.number,easing:je.oneOfType([je.string,je.func]),steps:je.arrayOf(je.shape({duration:je.number.isRequired,style:je.object.isRequired,easing:je.oneOfType([je.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),je.func]),properties:je.arrayOf("string"),onAnimationEnd:je.func})),children:je.oneOfType([je.node,je.func]),isActive:je.bool,canBegin:je.bool,onAnimationEnd:je.func,shouldReAnimate:je.bool,onAnimationStart:je.func,onAnimationReStart:je.func};const ao=dm;function uc(e){"@babel/helpers - typeof";return uc=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},uc(e)}function Ph(){return Ph=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 m=Math.min(o,a);f="M ".concat(t,",").concat(r+s*m,` + A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+l*m,",").concat(r,` + L `).concat(t+n-l*m,",").concat(r,` + A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*m,` + L `).concat(t+n,",").concat(r+i-s*m,` + A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n-l*m,",").concat(r+i,` + L `).concat(t+l*m,",").concat(r+i,` + A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*m," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},One=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},_ne={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},l1=function(t){var r=RE(RE({},_ne),t),n=k.useRef(),i=k.useState(-1),a=mne(i,2),o=a[0],s=a[1];k.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var O=n.current.getTotalLength();O&&s(O)}catch{}},[]);var l=r.x,u=r.y,f=r.width,c=r.height,d=r.radius,h=r.className,m=r.animationEasing,y=r.animationDuration,g=r.animationBegin,b=r.isAnimationActive,v=r.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||c!==+c||f===0||c===0)return null;var x=he("recharts-rectangle",h);return v?P.createElement(ao,{canBegin:o>0,from:{width:f,height:c,x:l,y:u},to:{width:f,height:c,x:l,y:u},duration:y,animationEasing:m,isActive:v},function(O){var w=O.width,S=O.height,_=O.x,E=O.y;return P.createElement(ao,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:y,isActive:b,easing:m},P.createElement("path",Ph({},le(r,!0),{className:x,d:DE(_,E,w,S,d),ref:n})))}):P.createElement("path",Ph({},le(r,!0),{className:x,d:DE(l,u,f,c,d)}))},Ene=["points","className","baseLinePoints","connectNulls"];function zo(){return zo=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 kne(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 LE(e){return $ne(e)||Tne(e)||Ane(e)||Pne()}function Pne(){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 Ane(e,t){if(e){if(typeof e=="string")return p0(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 p0(e,t)}}function Tne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $ne(e){if(Array.isArray(e))return p0(e)}function p0(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){FE(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),FE(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},pu=function(t,r){var n=Nne(t);r&&(n=[n.reduce(function(a,o){return[].concat(LE(a),LE(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},Cne=function(t,r,n){var i=pu(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(pu(r.reverse(),n).slice(1))},Mne=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=jne(t,Ene);if(!r||!r.length)return null;var s=he("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=Cne(r,i,a);return P.createElement("g",{className:s},P.createElement("path",zo({},le(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?P.createElement("path",zo({},le(o,!0),{fill:"none",d:pu(r,a)})):null,l?P.createElement("path",zo({},le(o,!0),{fill:"none",d:pu(i,a)})):null)}var f=pu(r,a);return P.createElement("path",zo({},le(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:s,d:f}))};function m0(){return m0=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 zne(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 Une=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},Vne=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,m=t.className,y=Bne(t,Ine),g=Rne({x:n,y:a,top:s,left:u,width:c,height:h},y);return!Q(n)||!Q(a)||!Q(c)||!Q(h)||!Q(s)||!Q(u)?null:P.createElement("path",y0({},le(g,!0),{className:he("recharts-cross",m),d:Une(n,a,c,h,s,u)}))},Wne=sm,qne=U$,Hne=Mn;function Kne(e,t){return e&&e.length?Wne(e,Hne(t),qne):void 0}var Gne=Kne;const Xne=ke(Gne);var Qne=sm,Yne=Mn,Zne=V$;function Jne(e,t){return e&&e.length?Qne(e,Yne(t),Zne):void 0}var eie=Jne;const tie=ke(eie);var rie=["cx","cy","angle","ticks","axisLine"],nie=["ticks","tick","angle","tickFormatter","stroke"];function Rs(e){"@babel/helpers - typeof";return Rs=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},Rs(e)}function mu(){return mu=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 iie(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 aie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VE(e,t){for(var r=0;rHE?o=i==="outer"?"start":"end":a<-HE?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=ha(ha({},le(this.props,!1)),{},{fill:"none"},le(s,!1));if(l==="circle")return P.createElement(hm,xa({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var f=this.props.ticks,c=f.map(function(d){return Fe(i,a,o,d.coordinate)});return P.createElement(Mne,xa({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=le(this.props,!1),c=le(o,!1),d=ha(ha({},f),{},{fill:"none"},le(s,!1)),h=a.map(function(m,y){var g=n.getTickLineCoord(m),b=n.getTickTextAnchor(m),v=ha(ha(ha({textAnchor:b},f),{},{stroke:"none",fill:u},c),{},{index:y,payload:m,x:g.x2,y:g.y2});return P.createElement(_e,xa({className:he("recharts-polar-angle-axis-tick",vN(o)),key:"tick-".concat(m.coordinate)},to(n.props,m,y)),s&&P.createElement("line",xa({className:"recharts-polar-angle-axis-tick-line"},d,g)),o&&t.renderTickItem(o,v,l?l(m.value,y):m.value))});return P.createElement(_e,{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:P.createElement(_e,{className:he("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return P.isValidElement(n)?o=P.cloneElement(n,i):fe(n)?o=n(i):o=P.createElement(ro,xa({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(k.PureComponent);ym(vm,"displayName","PolarAngleAxis");ym(vm,"axisType","angleAxis");ym(vm,"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 bie=LT,wie=bie(Object.getPrototypeOf,Object),Sie=wie,Oie=di,_ie=Sie,Eie=hi,jie="[object Object]",kie=Function.prototype,Pie=Object.prototype,IN=kie.toString,Aie=Pie.hasOwnProperty,Tie=IN.call(Object);function $ie(e){if(!Eie(e)||Oie(e)!=jie)return!1;var t=_ie(e);if(t===null)return!0;var r=Aie.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&IN.call(r)==Tie}var Nie=$ie;const Cie=ke(Nie);var Mie=di,Iie=hi,Rie="[object Boolean]";function Die(e){return e===!0||e===!1||Iie(e)&&Mie(e)==Rie}var Lie=Die;const Fie=ke(Lie);function fc(e){"@babel/helpers - typeof";return fc=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},fc(e)}function $h(){return $h=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:m,isActive:b},function(x){var O=x.upperWidth,w=x.lowerWidth,S=x.height,_=x.x,E=x.y;return P.createElement(ao,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:y,easing:m},P.createElement("path",$h({},le(r,!0),{className:v,d:QE(_,E,O,w,S),ref:n})))}):P.createElement("g",null,P.createElement("path",$h({},le(r,!0),{className:v,d:QE(l,u,f,c,d)})))},Qie=["option","shapeType","propTransformer","activeClassName","isActive"];function dc(e){"@babel/helpers - typeof";return dc=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},dc(e)}function Yie(e,t){if(e==null)return{};var r=Zie(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 Zie(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 YE(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 Nh(e){for(var t=1;t0?Sr(x,"paddingAngle",0):0;if(w){var _=gr(w.endAngle-w.startAngle,x.endAngle-x.startAngle),E=Re(Re({},x),{},{startAngle:v+S,endAngle:v+_(y)+S});g.push(E),v=E.endAngle}else{var j=x.endAngle,N=x.startAngle,A=gr(0,j-N),C=A(y),M=Re(Re({},x),{},{startAngle:v+S,endAngle:v+C+S});g.push(M),v=M.endAngle}}),P.createElement(_e,null,n.renderSectorsStatically(g))})}},{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||!Xc(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,m=this.state.isAnimationFinished;if(a||!o||!o.length||!Q(u)||!Q(f)||!Q(c)||!Q(d))return null;var y=he("recharts-pie",s);return P.createElement(_e,{tabIndex:this.props.rootTabIndex,className:y,ref:function(b){n.pieRef=b}},this.renderSectors(),l&&this.renderLabels(o),wt.renderCallByParent(this.props,null,!1),(!h||m)&&ti.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?v:v-1)*l,O=g-v*h-x,w=i.reduce(function(E,j){var N=mt(j,b,0);return E+(Q(N)?N:0)},0),S;if(w>0){var _;S=i.map(function(E,j){var N=mt(E,b,0),A=mt(E,f,j),C=(Q(N)?N:0)/w,M;j?M=_.endAngle+Kt(y)*l*(N!==0?1:0):M=o;var D=M+Kt(y)*((N!==0?h:0)+C*O),L=(M+D)/2,B=(m.innerRadius+m.outerRadius)/2,W=[{name:A,value:N,payload:E,dataKey:b,type:d}],R=Fe(m.cx,m.cy,B,L);return _=Re(Re(Re({percent:C,cornerRadius:a,name:A,tooltipPayload:W,midAngle:L,middleRadius:B,tooltipPosition:R},E),m),{},{value:mt(E,b),startAngle:M,endAngle:D,payload:E,paddingAngle:Kt(y)*l}),_})}return Re(Re({},m),{},{sectors:S,data:i})});var xae=Math.ceil,bae=Math.max;function wae(e,t,r,n){for(var i=-1,a=bae(xae((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var Sae=wae,Oae=n$,tj=1/0,_ae=17976931348623157e292;function Eae(e){if(!e)return e===0?e:0;if(e=Oae(e),e===tj||e===-tj){var t=e<0?-1:1;return t*_ae}return e===e?e:0}var FN=Eae,jae=Sae,kae=Jp,Dy=FN;function Pae(e){return function(t,r,n){return n&&typeof n!="number"&&kae(t,r,n)&&(r=n=void 0),t=Dy(t),r===void 0?(r=t,t=0):r=Dy(r),n=n===void 0?t0&&n.handleDrag(i.changedTouches[0])}),mr(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()}),mr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),mr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),mr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),mr(n,"handleSlideDragStart",function(i){var a=oj(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 Uae(t,e),Lae(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),m=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:m===f?f:m-m%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=mt(a[n],s,n);return fe(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,m=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 g=this.getIndex({startX:o+y,endX:s+y});(g.startIndex!==d||g.endIndex!==h)&&m&&m(g),this.setState({startX:o+y,endX:s+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=oj(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,m=f.onChange,y=f.gap,g=f.data,b={startX:this.state.startX,endX:this.state.endX},v=n.pageX-a;v>0?v=Math.min(v,c+d-h-u):v<0&&(v=Math.max(v,c-u)),b[o]=u+v;var x=this.getIndex(b),O=x.startIndex,w=x.endIndex,S=function(){var E=g.length-1;return o==="startX"&&(s>l?O%y===0:w%y===0)||sl?w%y===0:O%y===0)||s>l&&w===E};this.setState(mr(mr({},o,u+v),"brushMoveStartX",n.pageX),function(){m&&S()&&m(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(mr({},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 P.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?P.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,m=l.data,y=l.startIndex,g=l.endIndex,b=Math.max(n,this.props.x),v=Ly(Ly({},le(this.props,!1)),{},{x:b,y:u,width:f,height:c}),x=h||"Min value: ".concat((a=m[y])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=m[g])===null||o===void 0?void 0:o.name);return P.createElement(_e,{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,v))}},{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 P.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,m={pointerEvents:"none",fill:u};return P.createElement(_e,{className:"recharts-brush-texts"},P.createElement(ro,Ih({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-h,y:o+s/2},m),this.getTextOfTick(i)),P.createElement(ro,Ih({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+l+h,y:o+s/2},m),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,m=d.endX,y=d.isTextActive,g=d.isSlideMoving,b=d.isTravellerMoving,v=d.isTravellerFocused;if(!i||!i.length||!Q(s)||!Q(l)||!Q(u)||!Q(f)||u<=0||f<=0)return null;var x=he("recharts-brush",a),O=P.Children.count(o)===1,w=Rae("userSelect","none");return P.createElement(_e,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(h,m),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(m,"endX"),(y||g||b||v||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 P.createElement(P.Fragment,null,P.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),P.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),P.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 P.isValidElement(n)?a=P.cloneElement(n,i):fe(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 Ly({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?Wae({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);mr(Bs,"displayName","Brush");mr(Bs,"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 qae=Cb;function Hae(e,t){var r;return qae(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Kae=Hae,Gae=TT,Xae=Mn,Qae=Kae,Yae=hr,Zae=Jp;function Jae(e,t,r){var n=Yae(e)?Gae:Qae;return r&&Zae(e,t,r)&&(t=void 0),n(e,Xae(t))}var eoe=Jae;const toe=ke(eoe);var kn=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},sj=ZT;function roe(e,t,r){t=="__proto__"&&sj?sj(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var noe=roe,ioe=noe,aoe=QT,ooe=Mn;function soe(e,t){var r={};return t=ooe(t),aoe(e,function(n,i,a){ioe(r,i,t(n,i,a))}),r}var loe=soe;const uoe=ke(loe);function coe(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 koe(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 Poe(e,t){var r=e.x,n=e.y,i=joe(e,Soe),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 Vl(Vl(Vl(Vl(Vl({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function uj(e){return P.createElement(RN,w0({shapeType:"rectangle",propTransformer:Poe,activeClassName:"recharts-active-bar"},e))}var Aoe=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=typeof n=="number";return a?t(n,i):(a||io(!1),r)}},Toe=["value","background"],WN;function zs(e){"@babel/helpers - typeof";return zs=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},zs(e)}function $oe(e,t){if(e==null)return{};var r=Noe(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 Noe(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 Dh(){return Dh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(L)0&&Math.abs(D)0&&(M=Math.min((we||0)-(D[Ce-1]||0),M))}),Number.isFinite(M)){var L=M/C,B=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(_=L*B/2),y.padding==="no-gap"){var W=Gt(t.barCategoryGap,L*B),R=L*B/2;_=R-W-(R-W)/B*W}}}i==="xAxis"?E=[n.left+(x.left||0)+(_||0),n.left+n.width-(x.right||0)-(_||0)]:i==="yAxis"?E=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)]:E=y.range,w&&(E=[E[1],E[0]]);var z=cN(y,a,d),H=z.scale,Z=z.realScaleType;H.domain(b).range(E),fN(H);var G=dN(H,Yr(Yr({},y),{},{realScaleType:Z}));i==="xAxis"?(A=g==="top"&&!O||g==="bottom"&&O,j=n.left,N=c[S]-A*y.height):i==="yAxis"&&(A=g==="left"&&!O||g==="right"&&O,j=c[S]-A*y.width,N=n.top);var oe=Yr(Yr(Yr({},y),G),{},{realScaleType:Z,x:j,y:N,scale:H,width:i==="xAxis"?n.width:y.width,height:i==="yAxis"?n.height:y.height});return oe.bandSize=wh(oe,G),!y.hide&&i==="xAxis"?c[S]+=(A?-1:1)*oe.height:y.hide||(c[S]+=(A?-1:1)*oe.width),Yr(Yr({},h),{},bm({},m,oe))},{})},XN=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)}},Voe=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return XN({x:r,y:n},{x:i,y:a})},QN=function(){function e(t){Boe(this,e),this.scale=t}return zoe(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)}}])}();bm(QN,"EPS",1e-4);var u1=function(t){var r=Object.keys(t).reduce(function(n,i){return Yr(Yr({},n),{},bm({},i,QN.create(t[i])))},{});return Yr(Yr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return uoe(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return VN(i,function(a,o){return r[o].isInRange(a)})}})};function Woe(e){return(e%180+180)%180}var qoe=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Woe(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o-1?i[a?t[o]:o]:void 0}}var Qoe=Xoe,Yoe=FN;function Zoe(e){var t=Yoe(e),r=t%1;return t===t?r?t-r:t:0}var Joe=Zoe,ese=WT,tse=Mn,rse=Joe,nse=Math.max;function ise(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:rse(r);return i<0&&(i=nse(n+i,0)),ese(e,tse(t),i)}var ase=ise,ose=Qoe,sse=ase,lse=ose(sse),use=lse;const cse=ke(use);var fse=u8(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("")}),c1=k.createContext(void 0),f1=k.createContext(void 0),YN=k.createContext(void 0),ZN=k.createContext({}),JN=k.createContext(void 0),eC=k.createContext(0),tC=k.createContext(0),pj=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=fse(a);return P.createElement(c1.Provider,{value:n},P.createElement(f1.Provider,{value:i},P.createElement(ZN.Provider,{value:a},P.createElement(YN.Provider,{value:f},P.createElement(JN.Provider,{value:o},P.createElement(eC.Provider,{value:u},P.createElement(tC.Provider,{value:l},s)))))))},dse=function(){return k.useContext(JN)},rC=function(t){var r=k.useContext(c1);r==null&&io(!1);var n=r[t];return n==null&&io(!1),n},hse=function(){var t=k.useContext(c1);return ki(t)},pse=function(){var t=k.useContext(f1),r=cse(t,function(n){return VN(n.domain,Number.isFinite)});return r||ki(t)},nC=function(t){var r=k.useContext(f1);r==null&&io(!1);var n=r[t];return n==null&&io(!1),n},mse=function(){var t=k.useContext(YN);return t},yse=function(){return k.useContext(ZN)},d1=function(){return k.useContext(tC)},h1=function(){return k.useContext(eC)};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 vse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mj(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 Qse(e,t){return cC(e,t+1)}function Yse(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 m=n==null?void 0:n[l];if(m===void 0)return{v:cC(n,u)};var y=l,g,b=function(){return g===void 0&&(g=r(m,y)),g},v=m.coordinate,x=l===0||Uh(e,v,b,f,s);x||(l=0,f=o,u+=1),x&&(f=v+e*(b()/2+i),l+=u)},d;u<=a.length;)if(d=c(),d)return d.v;return[]}function vc(e){"@babel/helpers - typeof";return vc=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},vc(e)}function Ej(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;t0?h.coordinate-g*e:h.coordinate})}else a[d]=h=It(It({},h),{},{tickCoord:h.coordinate});var b=Uh(e,h.tickCoord,y,s,l);b&&(l=h.tickCoord-e*(y()/2+i),a[d]=It(It({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function rle(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=It(It({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var h=Uh(e,f.tickCoord,function(){return c},l,u);h&&(u=f.tickCoord-e*(c/2+i),o[s-1]=It(It({},f),{},{isShow:!0}))}for(var m=a?s-1:s,y=function(v){var x=o[v],O,w=function(){return O===void 0&&(O=r(x,v)),O};if(v===0){var S=e*(x.coordinate-e*w()/2-l);o[v]=x=It(It({},x),{},{tickCoord:S<0?x.coordinate-S*e:x.coordinate})}else o[v]=x=It(It({},x),{},{tickCoord:x.coordinate});var _=Uh(e,x.tickCoord,w,l,u);_&&(l=x.tickCoord+e*(w()/2+i),o[v]=It(It({},x),{},{isShow:!0}))},g=0;g=2?Kt(i[1].coordinate-i[0].coordinate):1,b=Xse(a,g,h);return l==="equidistantPreserveStart"?Yse(g,b,y,i,o):(l==="preserveStart"||l==="preserveStartEnd"?d=rle(g,b,y,i,o,l==="preserveStartEnd"):d=tle(g,b,y,i,o),d.filter(function(v){return v.isShow}))}var nle=["viewBox"],ile=["viewBox"],ale=["ticks"];function qs(e){"@babel/helpers - typeof";return qs=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},qs(e)}function Vo(){return Vo=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 ole(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 sle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kj(e,t){for(var r=0;r0?l(this.props):l(h)),o<=0||s<=0||!m||!m.length?null:P.createElement(_e,{className:he("recharts-cartesian-axis",u),ref:function(g){n.layerReference=g}},a&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),wt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return P.isValidElement(n)?o=P.cloneElement(n,i):fe(n)?o=n(i):o=P.createElement(ro,Vo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(k.Component);v1(bl,"displayName","CartesianAxis");v1(bl,"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 ple=["x1","y1","x2","y2","key"],mle=["offset"];function oo(e){"@babel/helpers - typeof";return oo=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},oo(e)}function Pj(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 Dt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xle(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 ble=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 P.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function hC(e,t){var r;if(P.isValidElement(e))r=P.cloneElement(e,t);else if(fe(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=Aj(t,ple),u=le(l,!1);u.offset;var f=Aj(u,mle);r=P.createElement("line",$a({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function wle(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=Dt(Dt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return hC(i,u)});return P.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function Sle(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=Dt(Dt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return hC(i,u)});return P.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function Ole(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 m=!f[h+1],y=m?i+o-d:f[h+1]-d;if(y<=0)return null;var g=h%t.length;return P.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:y,width:a,stroke:"none",fill:t[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function _le(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 m=!f[h+1],y=m?a+s-d:f[h+1]-d;if(y<=0)return null;var g=h%n.length;return P.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:y,height:l,stroke:"none",fill:n[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return P.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var Ele=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return uN(y1(Dt(Dt(Dt({},bl.defaultProps),n),{},{ticks:Yn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},jle=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return uN(y1(Dt(Dt(Dt({},bl.defaultProps),n),{},{ticks:Yn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Eo={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function g1(e){var t,r,n,i,a,o,s=d1(),l=h1(),u=yse(),f=Dt(Dt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Eo.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Eo.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Eo.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Eo.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Eo.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Eo.verticalFill,x:Q(e.x)?e.x:u.left,y:Q(e.y)?e.y:u.top,width:Q(e.width)?e.width:u.width,height:Q(e.height)?e.height:u.height}),c=f.x,d=f.y,h=f.width,m=f.height,y=f.syncWithTicks,g=f.horizontalValues,b=f.verticalValues,v=hse(),x=pse();if(!Q(h)||h<=0||!Q(m)||m<=0||!Q(c)||c!==+c||!Q(d)||d!==+d)return null;var O=f.verticalCoordinatesGenerator||Ele,w=f.horizontalCoordinatesGenerator||jle,S=f.horizontalPoints,_=f.verticalPoints;if((!S||!S.length)&&fe(w)){var E=g&&g.length,j=w({yAxis:x?Dt(Dt({},x),{},{ticks:E?g:x.ticks}):void 0,width:s,height:l,offset:u},E?!0:y);ln(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(oo(j),"]")),Array.isArray(j)&&(S=j)}if((!_||!_.length)&&fe(O)){var N=b&&b.length,A=O({xAxis:v?Dt(Dt({},v),{},{ticks:N?b:v.ticks}):void 0,width:s,height:l,offset:u},N?!0:y);ln(Array.isArray(A),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(oo(A),"]")),Array.isArray(A)&&(_=A)}return P.createElement("g",{className:"recharts-cartesian-grid"},P.createElement(ble,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),P.createElement(wle,$a({},f,{offset:u,horizontalPoints:S,xAxis:v,yAxis:x})),P.createElement(Sle,$a({},f,{offset:u,verticalPoints:_,xAxis:v,yAxis:x})),P.createElement(Ole,$a({},f,{horizontalPoints:S})),P.createElement(_le,$a({},f,{verticalPoints:_})))}g1.displayName="CartesianGrid";var kle=["type","layout","connectNulls","ref"],Ple=["key"];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 Tj(e,t){if(e==null)return{};var r=Ale(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 Ale(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 yu(){return yu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rc){h=[].concat(jo(l.slice(0,m)),[c-y]);break}var g=h.length%2===0?[0,d]:[d];return[].concat(jo(t.repeat(l,f)),jo(h),g).map(function(b){return"".concat(b,"px")}).join(", ")}),Zr(r,"id",hl("recharts-line-")),Zr(r,"pathRef",function(o){r.mainCurve=o}),Zr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Zr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Fle(t,e),Ile(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,f=a.children,c=Or(f,Qc);if(!c)return null;var d=function(y,g){return{x:y.x,y:y.y,value:y.value,errorVal:mt(y.payload,g)}},h={clipPath:n?"url(#clipPath-".concat(i,")"):null};return P.createElement(_e,h,c.map(function(m){return P.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,f=s.dataKey,c=le(this.props,!1),d=le(l,!0),h=u.map(function(y,g){var b=pr(pr(pr({key:"dot-".concat(g),r:3},c),d),{},{index:g,cx:y.x,cy:y.y,value:y.value,dataKey:f,payload:y.payload,points:u});return t.renderDotItem(l,b)}),m={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return P.createElement(_e,yu({className:"recharts-line-dots",key:"dots"},m),h)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,f=s.connectNulls;s.ref;var c=Tj(s,kle),d=pr(pr(pr({},le(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:f});return P.createElement(_h,yu({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,d=o.animationEasing,h=o.animationId,m=o.animateNewValues,y=o.width,g=o.height,b=this.state,v=b.prevPoints,x=b.totalLength;return P.createElement(ao,{begin:f,duration:c,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var w=O.t;if(v){var S=v.length/s.length,_=s.map(function(C,M){var D=Math.floor(M*S);if(v[D]){var L=v[D],B=gr(L.x,C.x),W=gr(L.y,C.y);return pr(pr({},C),{},{x:B(w),y:W(w)})}if(m){var R=gr(y*2,C.x),z=gr(g/2,C.y);return pr(pr({},C),{},{x:R(w),y:z(w)})}return pr(pr({},C),{},{x:C.x,y:C.y})});return a.renderCurveStatically(_,n,i)}var E=gr(0,x),j=E(w),N;if(l){var A="".concat(l).split(/[,\s]+/gim).map(function(C){return parseFloat(C)});N=a.getStrokeDasharray(j,x,A)}else N=a.generateSimpleStrokeDasharray(x,j);return a.renderCurveStatically(s,n,i,{strokeDasharray:N})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,f=l.totalLength;return s&&o&&o.length&&(!u&&f>0||!Xc(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,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.xAxis,f=i.yAxis,c=i.top,d=i.left,h=i.width,m=i.height,y=i.isAnimationActive,g=i.id;if(a||!s||!s.length)return null;var b=this.state.isAnimationFinished,v=s.length===1,x=he("recharts-line",l),O=u&&u.allowDataOverflow,w=f&&f.allowDataOverflow,S=O||w,_=me(g)?this.id:g,E=(n=le(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},j=E.r,N=j===void 0?3:j,A=E.strokeWidth,C=A===void 0?2:A,M=yz(o)?o:{},D=M.clipDot,L=D===void 0?!0:D,B=N*2+C;return P.createElement(_e,{className:x},O||w?P.createElement("defs",null,P.createElement("clipPath",{id:"clipPath-".concat(_)},P.createElement("rect",{x:O?d:d-h/2,y:w?c:c-m/2,width:O?h:h*2,height:w?m:m*2})),!L&&P.createElement("clipPath",{id:"clipPath-dots-".concat(_)},P.createElement("rect",{x:d-B/2,y:c-B/2,width:h+B,height:m+B}))):null,!v&&this.renderCurve(S,_),this.renderErrorBar(S,_),(v||o)&&this.renderDots(S,L,_),(!y||b)&&ti.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(jo(n),[0]):n,o=[],s=0;se.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 Eue(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 jue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bj(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&Q(i)&&Q(a)?t.slice(i,a+1):[]};function AC(e){return e==="number"?[0,"auto"]:void 0}var B0=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Em(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=Kd(h,o.dataKey,i)}else d=c&&c[n]||s[n];return d?[].concat(Qs(l),[pN(u,d)]):l},[])},Uj=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=Lue(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=pee(o,s,u,l);if(f>=0&&u){var c=u[f]&&u[f].value,d=B0(t,r,f,c),h=Fue(n,s,f,a);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:h}}return null},Bue=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=lN(f,a);return n.reduce(function(m,y){var g,b=y.type.defaultProps!==void 0?V(V({},y.type.defaultProps),y.props):y.props,v=b.type,x=b.dataKey,O=b.allowDataOverflow,w=b.allowDuplicatedCategory,S=b.scale,_=b.ticks,E=b.includeHidden,j=b[o];if(m[j])return m;var N=Em(t.data,{graphicalItems:i.filter(function(G){var oe,we=o in G.props?G.props[o]:(oe=G.type.defaultProps)===null||oe===void 0?void 0:oe[o];return we===j}),dataStartIndex:l,dataEndIndex:u}),A=N.length,C,M,D;hue(b.domain,O,v)&&(C=e0(b.domain,null,O),h&&(v==="number"||S!=="auto")&&(D=du(N,x,"category")));var L=AC(v);if(!C||C.length===0){var B,W=(B=b.domain)!==null&&B!==void 0?B:L;if(x){if(C=du(N,x,v),v==="category"&&h){var R=oz(C);w&&R?(M=C,C=Mh(0,A)):w||(C=rE(W,C,y).reduce(function(G,oe){return G.indexOf(oe)>=0?G:[].concat(Qs(G),[oe])},[]))}else if(v==="category")w?C=C.filter(function(G){return G!==""&&!me(G)}):C=rE(W,C,y).reduce(function(G,oe){return G.indexOf(oe)>=0||oe===""||me(oe)?G:[].concat(Qs(G),[oe])},[]);else if(v==="number"){var z=xee(N,i.filter(function(G){var oe,we,Ce=o in G.props?G.props[o]:(oe=G.type.defaultProps)===null||oe===void 0?void 0:oe[o],Ke="hide"in G.props?G.props.hide:(we=G.type.defaultProps)===null||we===void 0?void 0:we.hide;return Ce===j&&(E||!Ke)}),x,a,f);z&&(C=z)}h&&(v==="number"||S!=="auto")&&(D=du(N,x,"category"))}else h?C=Mh(0,A):s&&s[j]&&s[j].hasStack&&v==="number"?C=d==="expand"?[0,1]:hN(s[j].stackGroups,l,u):C=sN(N,i.filter(function(G){var oe=o in G.props?G.props[o]:G.type.defaultProps[o],we="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return oe===j&&(E||!we)}),v,f,!0);if(v==="number")C=D0(c,C,j,a,_),W&&(C=e0(W,C,O));else if(v==="category"&&W){var H=W,Z=C.every(function(G){return H.indexOf(G)>=0});Z&&(C=H)}}return V(V({},m),{},ue({},j,V(V({},b),{},{axisType:a,domain:C,categoricalDomain:D,duplicateDomain:M,originalDomain:(g=b.domain)!==null&&g!==void 0?g:L,isCategorical:h,layout:f})))},{})},zue=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=Em(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),h=d.length,m=lN(f,a),y=-1;return n.reduce(function(g,b){var v=b.type.defaultProps!==void 0?V(V({},b.type.defaultProps),b.props):b.props,x=v[o],O=AC("number");if(!g[x]){y++;var w;return m?w=Mh(0,h):s&&s[x]&&s[x].hasStack?(w=hN(s[x].stackGroups,l,u),w=D0(c,w,x,a)):(w=e0(O,sN(d,n.filter(function(S){var _,E,j=o in S.props?S.props[o]:(_=S.type.defaultProps)===null||_===void 0?void 0:_[o],N="hide"in S.props?S.props.hide:(E=S.type.defaultProps)===null||E===void 0?void 0:E.hide;return j===x&&!N}),"number",f),i.defaultProps.allowDataOverflow),w=D0(c,w,x,a)),V(V({},g),{},ue({},x,V(V({axisType:a},i.defaultProps),{},{hide:!0,orientation:Sr(Rue,"".concat(a,".").concat(y%2),null),domain:w,originalDomain:O,isCategorical:m,layout:f})))}return g},{})},Uue=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=Or(f,a),h={};return d&&d.length?h=Bue(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=zue(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},Vue=function(t){var r=ki(t),n=Yn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Mb(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:wh(r,n)}},Vj=function(t){var r=t.children,n=t.defaultShowTooltip,i=vr(r,Bs),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}},Wue=function(t){return!t||!t.length?!1:t.some(function(r){var n=Jn(r&&r.type);return n&&n.indexOf("Bar")>=0})},Wj=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"}},que=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=vr(c,Bs),m=vr(c,Zo),y=Object.keys(l).reduce(function(w,S){var _=l[S],E=_.orientation;return!_.mirror&&!_.hide?V(V({},w),{},ue({},E,w[E]+_.width)):w},{left:d.left||0,right:d.right||0}),g=Object.keys(o).reduce(function(w,S){var _=o[S],E=_.orientation;return!_.mirror&&!_.hide?V(V({},w),{},ue({},E,Sr(w,"".concat(E))+_.height)):w},{top:d.top||0,bottom:d.bottom||0}),b=V(V({},g),y),v=b.bottom;h&&(b.bottom+=h.props.height||Bs.defaultProps.height),m&&r&&(b=vee(b,i,n,r));var x=u-b.left-b.right,O=f-b.top-b.bottom;return V(V({brushBottom:v},b),{},{width:Math.max(x,0),height:Math.max(O,0)})},Hue=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},x1=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(b,v){var x=v.graphicalItems,O=v.stackGroups,w=v.offset,S=v.updateId,_=v.dataStartIndex,E=v.dataEndIndex,j=b.barSize,N=b.layout,A=b.barGap,C=b.barCategoryGap,M=b.maxBarSize,D=Wj(N),L=D.numericAxisName,B=D.cateAxisName,W=Wue(x),R=[];return x.forEach(function(z,H){var Z=Em(b.data,{graphicalItems:[z],dataStartIndex:_,dataEndIndex:E}),G=z.type.defaultProps!==void 0?V(V({},z.type.defaultProps),z.props):z.props,oe=G.dataKey,we=G.maxBarSize,Ce=G["".concat(L,"Id")],Ke=G["".concat(B,"Id")],At={},_t=l.reduce(function(I,U){var ee=v["".concat(U.axisType,"Map")],Y=G["".concat(U.axisType,"Id")];ee&&ee[Y]||U.axisType==="zAxis"||io(!1);var X=ee[Y];return V(V({},I),{},ue(ue({},U.axisType,X),"".concat(U.axisType,"Ticks"),Yn(X)))},At),J=_t[B],de=_t["".concat(B,"Ticks")],ve=O&&O[Ce]&&O[Ce].hasStack&&Pee(z,O[Ce].stackGroups),q=Jn(z.type).indexOf("Bar")>=0,We=wh(J,de),be=[],Ze=W&&mee({barSize:j,stackGroups:O,totalSize:Hue(_t,B)});if(q){var rt,Tt,In=me(we)?M:we,Rn=(rt=(Tt=wh(J,de,!0))!==null&&Tt!==void 0?Tt:In)!==null&&rt!==void 0?rt:0;be=yee({barGap:A,barCategoryGap:C,bandSize:Rn!==We?Rn:We,sizeList:Ze[Ke],maxBarSize:In}),Rn!==We&&(be=be.map(function(I){return V(V({},I),{},{position:V(V({},I.position),{},{offset:I.position.offset-Rn/2})})}))}var $=z&&z.type&&z.type.getComposedData;$&&R.push({props:V(V({},$(V(V({},_t),{},{displayedData:Z,props:b,dataKey:oe,item:z,bandSize:We,barPosition:be,offset:w,stackedData:ve,layout:N,dataStartIndex:_,dataEndIndex:E}))),{},ue(ue(ue({key:z.key||"item-".concat(H)},L,_t[L]),B,_t[B]),"animationId",S)),childIndex:xz(z,b.children),item:z})}),R},h=function(b,v){var x=b.props,O=b.dataStartIndex,w=b.dataEndIndex,S=b.updateId;if(!qS({props:x}))return null;var _=x.children,E=x.layout,j=x.stackOffset,N=x.data,A=x.reverseStackOrder,C=Wj(E),M=C.numericAxisName,D=C.cateAxisName,L=Or(_,n),B=jee(N,L,"".concat(M,"Id"),"".concat(D,"Id"),j,A),W=l.reduce(function(G,oe){var we="".concat(oe.axisType,"Map");return V(V({},G),{},ue({},we,Uue(x,V(V({},oe),{},{graphicalItems:L,stackGroups:oe.axisType===M&&B,dataStartIndex:O,dataEndIndex:w}))))},{}),R=que(V(V({},W),{},{props:x,graphicalItems:L}),v==null?void 0:v.legendBBox);Object.keys(W).forEach(function(G){W[G]=f(x,W[G],R,G.replace("Map",""),r)});var z=W["".concat(D,"Map")],H=Vue(z),Z=d(x,V(V({},W),{},{dataStartIndex:O,dataEndIndex:w,updateId:S,graphicalItems:L,stackGroups:B,offset:R}));return V(V({formattedGraphicalItems:Z,graphicalItems:L,offset:R,stackGroups:B},H),W)},m=function(g){function b(v){var x,O,w;return jue(this,b),w=Pue(this,b,[v]),ue(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ue(w,"accessibilityManager",new due),ue(w,"handleLegendBBoxUpdate",function(S){if(S){var _=w.state,E=_.dataStartIndex,j=_.dataEndIndex,N=_.updateId;w.setState(V({legendBBox:S},h({props:w.props,dataStartIndex:E,dataEndIndex:j,updateId:N},V(V({},w.state),{},{legendBBox:S}))))}}),ue(w,"handleReceiveSyncEvent",function(S,_,E){if(w.props.syncId===S){if(E===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(_)}}),ue(w,"handleBrushChange",function(S){var _=S.startIndex,E=S.endIndex;if(_!==w.state.dataStartIndex||E!==w.state.dataEndIndex){var j=w.state.updateId;w.setState(function(){return V({dataStartIndex:_,dataEndIndex:E},h({props:w.props,dataStartIndex:_,dataEndIndex:E,updateId:j},w.state))}),w.triggerSyncEvent({dataStartIndex:_,dataEndIndex:E})}}),ue(w,"handleMouseEnter",function(S){var _=w.getMouseInfo(S);if(_){var E=V(V({},_),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var j=w.props.onMouseEnter;fe(j)&&j(E,S)}}),ue(w,"triggeredAfterMouseMove",function(S){var _=w.getMouseInfo(S),E=_?V(V({},_),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(E),w.triggerSyncEvent(E);var j=w.props.onMouseMove;fe(j)&&j(E,S)}),ue(w,"handleItemMouseEnter",function(S){w.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),ue(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),ue(w,"handleMouseMove",function(S){S.persist(),w.throttleTriggeredAfterMouseMove(S)}),ue(w,"handleMouseLeave",function(S){w.throttleTriggeredAfterMouseMove.cancel();var _={isTooltipActive:!1};w.setState(_),w.triggerSyncEvent(_);var E=w.props.onMouseLeave;fe(E)&&E(_,S)}),ue(w,"handleOuterEvent",function(S){var _=gz(S),E=Sr(w.props,"".concat(_));if(_&&fe(E)){var j,N;/.*touch.*/i.test(_)?N=w.getMouseInfo(S.changedTouches[0]):N=w.getMouseInfo(S),E((j=N)!==null&&j!==void 0?j:{},S)}}),ue(w,"handleClick",function(S){var _=w.getMouseInfo(S);if(_){var E=V(V({},_),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var j=w.props.onClick;fe(j)&&j(E,S)}}),ue(w,"handleMouseDown",function(S){var _=w.props.onMouseDown;if(fe(_)){var E=w.getMouseInfo(S);_(E,S)}}),ue(w,"handleMouseUp",function(S){var _=w.props.onMouseUp;if(fe(_)){var E=w.getMouseInfo(S);_(E,S)}}),ue(w,"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),ue(w,"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseDown(S.changedTouches[0])}),ue(w,"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseUp(S.changedTouches[0])}),ue(w,"handleDoubleClick",function(S){var _=w.props.onDoubleClick;if(fe(_)){var E=w.getMouseInfo(S);_(E,S)}}),ue(w,"handleContextMenu",function(S){var _=w.props.onContextMenu;if(fe(_)){var E=w.getMouseInfo(S);_(E,S)}}),ue(w,"triggerSyncEvent",function(S){w.props.syncId!==void 0&&By.emit(zy,w.props.syncId,S,w.eventEmitterSymbol)}),ue(w,"applySyncEvent",function(S){var _=w.props,E=_.layout,j=_.syncMethod,N=w.state.updateId,A=S.dataStartIndex,C=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)w.setState(V({dataStartIndex:A,dataEndIndex:C},h({props:w.props,dataStartIndex:A,dataEndIndex:C,updateId:N},w.state)));else if(S.activeTooltipIndex!==void 0){var M=S.chartX,D=S.chartY,L=S.activeTooltipIndex,B=w.state,W=B.offset,R=B.tooltipTicks;if(!W)return;if(typeof j=="function")L=j(R,S);else if(j==="value"){L=-1;for(var z=0;z=0){var ve,q;if(M.dataKey&&!M.allowDuplicatedCategory){var We=typeof M.dataKey=="function"?de:"payload.".concat(M.dataKey.toString());ve=Kd(z,We,L),q=H&&Z&&Kd(Z,We,L)}else ve=z==null?void 0:z[D],q=H&&Z&&Z[D];if(Ke||Ce){var be=S.props.activeIndex!==void 0?S.props.activeIndex:D;return[k.cloneElement(S,V(V(V({},j.props),_t),{},{activeIndex:be})),null,null]}if(!me(ve))return[J].concat(Qs(w.renderActivePoints({item:j,activePoint:ve,basePoint:q,childIndex:D,isRange:H})))}else{var Ze,rt=(Ze=w.getItemByXY(w.state.activeCoordinate))!==null&&Ze!==void 0?Ze:{graphicalItem:J},Tt=rt.graphicalItem,In=Tt.item,Rn=In===void 0?S:In,$=Tt.childIndex,I=V(V(V({},j.props),_t),{},{activeIndex:$});return[k.cloneElement(Rn,I),null,null]}return H?[J,null,null]:[J,null]}),ue(w,"renderCustomized",function(S,_,E){return k.cloneElement(S,V(V({key:"recharts-customized-".concat(E)},w.props),w.state))}),ue(w,"renderMap",{CartesianGrid:{handler:Df,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:Df},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:Df},YAxis:{handler:Df},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=v.id)!==null&&x!==void 0?x:hl("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=i$(w.triggeredAfterMouseMove,(O=v.throttleDelay)!==null&&O!==void 0?O:1e3/60),w.state={},w}return $ue(b,g),kue(b,[{key:"componentDidMount",value:function(){var x,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,O=x.children,w=x.data,S=x.height,_=x.layout,E=vr(O,Cr);if(E){var j=E.props.defaultIndex;if(!(typeof j!="number"||j<0||j>this.state.tooltipTicks.length-1)){var N=this.state.tooltipTicks[j]&&this.state.tooltipTicks[j].value,A=B0(this.state,w,j,N),C=this.state.tooltipTicks[j].coordinate,M=(this.state.offset.top+S)/2,D=_==="horizontal",L=D?{x:C,y:M}:{y:C,x:M},B=this.state.formattedGraphicalItems.find(function(R){var z=R.item;return z.type.name==="Scatter"});B&&(L=V(V({},L),B.props.points[j].tooltipPosition),A=B.props.points[j].tooltipPayload);var W={activeTooltipIndex:j,isTooltipActive:!0,activeLabel:N,activePayload:A,activeCoordinate:L};this.setState(W),this.renderCursor(E),this.accessibilityManager.setIndex(j)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.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,S;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(x){mg([vr(x.children,Cr)],[vr(this.props.children,Cr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=vr(this.props.children,Cr);if(x&&typeof x.props.shared=="boolean"){var O=x.props.shared?"axis":"item";return s.indexOf(O)>=0?O:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var O=this.container,w=O.getBoundingClientRect(),S=UX(w),_={chartX:Math.round(x.pageX-S.left),chartY:Math.round(x.pageY-S.top)},E=w.width/O.offsetWidth||1,j=this.inRange(_.chartX,_.chartY,E);if(!j)return null;var N=this.state,A=N.xAxisMap,C=N.yAxisMap,M=this.getTooltipEventType(),D=Uj(this.state,this.props.data,this.props.layout,j);if(M!=="axis"&&A&&C){var L=ki(A).scale,B=ki(C).scale,W=L&&L.invert?L.invert(_.chartX):null,R=B&&B.invert?B.invert(_.chartY):null;return V(V({},_),{},{xValue:W,yValue:R},D)}return D?V(V({},_),D):null}},{key:"inRange",value:function(x,O){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,_=x/w,E=O/w;if(S==="horizontal"||S==="vertical"){var j=this.state.offset,N=_>=j.left&&_<=j.left+j.width&&E>=j.top&&E<=j.top+j.height;return N?{x:_,y:E}:null}var A=this.state,C=A.angleAxisMap,M=A.radiusAxisMap;if(C&&M){var D=ki(C);return aE({x:_,y:E},D)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,O=this.getTooltipEventType(),w=vr(x,Cr),S={};w&&O==="axis"&&(w.props.trigger==="click"?S={onClick:this.handleClick}:S={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 _=Gd(this.props,this.handleOuterEvent);return V(V({},_),S)}},{key:"addListener",value:function(){By.on(zy,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){By.removeListener(zy,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,O,w){for(var S=this.state.formattedGraphicalItems,_=0,E=S.length;_p.jsxs("div",{className:"card p-6",children:[t&&p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:t}),p.jsx(Rb,{width:"100%",height:300,children:p.jsxs(Gue,{data:e,children:[p.jsx(g1,{strokeDasharray:"3 3",className:"stroke-gray-300 dark:stroke-gray-600"}),p.jsx(wl,{dataKey:"name",className:"text-gray-600 dark:text-gray-400",tick:{fontSize:12}}),p.jsx(Sl,{className:"text-gray-600 dark:text-gray-400",tick:{fontSize:12}}),p.jsx(Cr,{contentStyle:{backgroundColor:"var(--tooltip-bg)",border:"none",borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"},labelStyle:{color:"var(--tooltip-text)"}}),p.jsx(xo,{dataKey:"value",fill:r,radius:[4,4,0,0]})]})})]}),$C=({data:e,title:t,color:r="#10b981"})=>p.jsxs("div",{className:"card p-6",children:[t&&p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:t}),p.jsx(Rb,{width:"100%",height:300,children:p.jsxs(Kue,{data:e,children:[p.jsx(g1,{strokeDasharray:"3 3",className:"stroke-gray-300 dark:stroke-gray-600"}),p.jsx(wl,{dataKey:"name",className:"text-gray-600 dark:text-gray-400",tick:{fontSize:12}}),p.jsx(Sl,{className:"text-gray-600 dark:text-gray-400",tick:{fontSize:12}}),p.jsx(Cr,{contentStyle:{backgroundColor:"var(--tooltip-bg)",border:"none",borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"},labelStyle:{color:"var(--tooltip-text)"}}),p.jsx(Yc,{type:"monotone",dataKey:"value",stroke:r,strokeWidth:3,dot:{r:6}})]})})]}),Que=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],Yue=({data:e,title:t,colors:r=Que})=>p.jsxs("div",{className:"card p-6",children:[t&&p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:t}),p.jsx(Rb,{width:"100%",height:300,children:p.jsxs(Xue,{children:[p.jsx(mi,{data:e,cx:"50%",cy:"50%",labelLine:!1,label:({name:n,percent:i})=>`${n} ${(i*100).toFixed(0)}%`,outerRadius:80,fill:"#8884d8",dataKey:"value",children:e.map((n,i)=>p.jsx(em,{fill:r[i%r.length]},`cell-${i}`))}),p.jsx(Cr,{contentStyle:{backgroundColor:"var(--tooltip-bg)",border:"none",borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"},labelStyle:{color:"var(--tooltip-text)"}})]})})]}),jm=({columns:e,data:t,loading:r=!1})=>{const[n,i]=k.useState(""),[a,o]=k.useState("asc"),s=u=>{n===u?o(a==="asc"?"desc":"asc"):(i(u),o("asc"))},l=[...t].sort((u,f)=>{if(!n)return 0;const c=u[n],d=f[n];return cd?a==="asc"?1:-1:0});return r?p.jsxs("div",{className:"animate-pulse",children:[p.jsx("div",{className:"hidden md:block",children:p.jsxs("div",{className:"card overflow-hidden",children:[p.jsx("div",{className:"bg-gray-50 dark:bg-gray-700 px-6 py-3",children:p.jsx("div",{className:"flex space-x-4",children:e.map((u,f)=>p.jsx("div",{className:"h-4 bg-gray-300 dark:bg-gray-600 rounded flex-1"},f))})}),[...Array(5)].map((u,f)=>p.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:p.jsx("div",{className:"flex space-x-4",children:e.map((c,d)=>p.jsx("div",{className:"h-4 bg-gray-300 dark:bg-gray-600 rounded flex-1"},d))})},f))]})}),p.jsx("div",{className:"md:hidden space-y-4",children:[...Array(3)].map((u,f)=>p.jsx("div",{className:"card p-4 space-y-3",children:e.map((c,d)=>p.jsxs("div",{className:"space-y-1",children:[p.jsx("div",{className:"h-3 bg-gray-300 dark:bg-gray-600 rounded w-1/3"}),p.jsx("div",{className:"h-4 bg-gray-300 dark:bg-gray-600 rounded w-2/3"})]},d))},f))})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"hidden md:block card overflow-hidden",children:p.jsxs("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",children:[p.jsx("thead",{className:"bg-gray-50 dark:bg-gray-700",children:p.jsx("tr",{children:e.map(u=>p.jsx("th",{className:he("px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider",u.sortable&&"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-600"),onClick:()=>u.sortable&&s(u.key),children:p.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[p.jsx("span",{children:u.label}),u.sortable&&p.jsxs("div",{className:"flex flex-col",children:[p.jsx(t3,{className:he("h-3 w-3",n===u.key&&a==="asc"?"text-primary-600":"text-gray-400")}),p.jsx(qA,{className:he("h-3 w-3 -mt-1",n===u.key&&a==="desc"?"text-primary-600":"text-gray-400")})]})]})},u.key))})}),p.jsx("tbody",{className:"bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700",children:l.map((u,f)=>p.jsx("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-700",children:e.map(c=>p.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-gray-100 text-right",children:c.render?c.render(u[c.key],u):u[c.key]},c.key))},f))})]})}),p.jsx("div",{className:"md:hidden space-y-4",children:l.map((u,f)=>p.jsx("div",{className:"card p-4 space-y-3",children:e.map(c=>p.jsxs("div",{className:"flex justify-between items-start",children:[p.jsxs("span",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:[c.label,":"]}),p.jsx("span",{className:"text-sm text-gray-900 dark:text-gray-100 text-right",children:c.render?c.render(u[c.key],u):u[c.key]})]},c.key))},f))})]})},ra=({permission:e,children:t,fallback:r=null})=>{const{hasPermission:n}=Lc();return n(e)?t:r},Zue=[{title:"کل کاربران",value:1247,change:12,icon:Es,color:"blue"},{title:"فروش ماهانه",value:"۲۴,۵۶۷,۰۰۰",change:8.5,icon:HA,color:"green"},{title:"کل سفارشات",value:356,change:-2.3,icon:Wx,color:"yellow"},{title:"رشد فروش",value:"۲۳.۵%",change:15.2,icon:Du,color:"purple"}],qj=[{name:"فروردین",value:4e3},{name:"اردیبهشت",value:3e3},{name:"خرداد",value:5e3},{name:"تیر",value:4500},{name:"مرداد",value:6e3},{name:"شهریور",value:5500}],Jue=[{name:"دسکتاپ",value:45},{name:"موبایل",value:35},{name:"تبلت",value:20}],ece=[{id:1,name:"علی احمدی",email:"ali@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۵"},{id:2,name:"فاطمه حسینی",email:"fateme@example.com",role:"مدیر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۴"},{id:3,name:"محمد رضایی",email:"mohammad@example.com",role:"کاربر",status:"غیرفعال",createdAt:"۱۴۰۲/۰۸/۱۳"},{id:4,name:"زهرا کریمی",email:"zahra@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۲"}],tce=[{key:"name",label:"نام",sortable:!0},{key:"email",label:"ایمیل"},{key:"role",label:"نقش"},{key:"status",label:"وضعیت",render:e=>p.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${e==="فعال"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}`,children:e})},{key:"createdAt",label:"تاریخ عضویت"},{key:"actions",label:"عملیات",render:()=>p.jsxs("div",{className:"flex space-x-2",children:[p.jsx(ce,{size:"sm",variant:"secondary",children:"ویرایش"}),p.jsx(ra,{permission:22,children:p.jsx(ce,{size:"sm",variant:"danger",children:"حذف"})})]})}],rce=()=>p.jsxs("div",{className:"p-6 space-y-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"داشبورد"}),p.jsxs("div",{className:"flex space-x-4",children:[p.jsx(ce,{variant:"secondary",children:"گزارش‌گیری"}),p.jsx(ra,{permission:25,children:p.jsx(ce,{children:"اضافه کردن"})})]})]}),p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:Zue.map((e,t)=>p.jsx(j6,{...e},t))}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[p.jsx(TC,{data:qj,title:"فروش ماهانه",color:"#3b82f6"}),p.jsx($C,{data:qj,title:"روند رشد",color:"#10b981"})]}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[p.jsx("div",{className:"lg:col-span-2",children:p.jsxs("div",{className:"card p-6",children:[p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"کاربران اخیر"}),p.jsx(jm,{columns:tce,data:ece})]})}),p.jsx("div",{children:p.jsx(Yue,{data:Jue,title:"دستگاه‌های کاربری",colors:["#3b82f6","#10b981","#f59e0b"]})})]})]}),Gh=({isOpen:e,onClose:t,title:r,children:n,size:i="md"})=>{if(k.useEffect(()=>{const o=s=>{s.key==="Escape"&&t()};return e&&(document.addEventListener("keydown",o),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",o),document.body.style.overflow="unset"}},[e,t]),!e)return null;const a={sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl"};return p.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:p.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[p.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 transition-opacity",onClick:t}),p.jsxs("div",{className:` + relative bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full + ${a[i]} transform transition-all + `,children:[r&&p.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700",children:[p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:r}),p.jsx("button",{onClick:t,className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:p.jsx(Hx,{className:"h-5 w-5 text-gray-500 dark:text-gray-400"})})]}),p.jsx("div",{className:"p-6",children:n})]})]})})},km=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:n,totalItems:i})=>{const a=(e-1)*n+1,o=Math.min(e*n,i),s=()=>{const l=[];if(t<=5)for(let f=1;f<=t;f++)l.push(f);else{const f=Math.max(1,e-2),c=Math.min(t,f+5-1);for(let d=f;d<=c;d++)l.push(d);f>1&&(l.unshift("..."),l.unshift(1)),cr(e-1),disabled:e===1,children:"قبلی"}),p.jsx(ce,{variant:"secondary",size:"sm",onClick:()=>r(e+1),disabled:e===t,children:"بعدی"})]}),p.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[p.jsx("div",{children:p.jsxs("p",{className:"text-sm text-gray-700 dark:text-gray-300",children:["نمایش ",p.jsx("span",{className:"font-medium",children:a})," تا"," ",p.jsx("span",{className:"font-medium",children:o})," از"," ",p.jsx("span",{className:"font-medium",children:i})," نتیجه"]})}),p.jsx("div",{children:p.jsxs("nav",{className:"relative z-0 inline-flex rounded-md shadow-sm -space-x-px",children:[p.jsx("button",{onClick:()=>r(e-1),disabled:e===1,className:"relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-sm font-medium text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:p.jsx(e3,{className:"h-5 w-5"})}),s().map((l,u)=>p.jsx("button",{onClick:()=>typeof l=="number"&&r(l),disabled:l==="...",className:`relative inline-flex items-center px-4 py-2 border text-sm font-medium ${l===e?"z-10 bg-primary-50 dark:bg-primary-900 border-primary-500 text-primary-600 dark:text-primary-400":l==="..."?"border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 cursor-default":"border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-600"}`,children:l},u)),p.jsx("button",{onClick:()=>r(e+1),disabled:e===t,className:"relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-sm font-medium text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed",children:p.jsx(JL,{className:"h-5 w-5"})})]})})]})]})},nce=({initialData:e,onSubmit:t,onCancel:r,loading:n=!1,isEdit:i=!1})=>{var u,f,c,d;const{register:a,handleSubmit:o,formState:{errors:s,isValid:l}}=Yx({resolver:Zx(R4),mode:"onChange",defaultValues:e});return p.jsxs("div",{className:"card p-6",children:[p.jsxs("div",{className:"mb-6",children:[p.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-gray-100",children:i?"ویرایش کاربر":"افزودن کاربر جدید"}),p.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"اطلاعات کاربر را وارد کنید"})]}),p.jsxs("form",{onSubmit:o(t),className:"space-y-6",children:[p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[p.jsx(Ea,{label:"نام و نام خانوادگی",placeholder:"علی احمدی",icon:qx,error:(u=s.name)==null?void 0:u.message,...a("name")}),p.jsx(Ea,{label:"ایمیل",type:"email",placeholder:"ali@example.com",icon:l3,error:(f=s.email)==null?void 0:f.message,...a("email")}),p.jsx(Ea,{label:"شماره تلفن",type:"tel",placeholder:"09123456789",icon:f3,error:(c=s.phone)==null?void 0:c.message,...a("phone")}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"نقش"}),p.jsxs("div",{className:"relative",children:[p.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:p.jsx(y3,{className:"h-5 w-5 text-gray-400"})}),p.jsxs("select",{className:`input pr-10 ${s.role?"border-red-500 dark:border-red-500 focus:ring-red-500":""}`,...a("role"),children:[p.jsx("option",{value:"",children:"انتخاب کنید"}),p.jsx("option",{value:"کاربر",children:"کاربر"}),p.jsx("option",{value:"مدیر",children:"مدیر"}),p.jsx("option",{value:"ادمین",children:"ادمین"})]})]}),s.role&&p.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:s.role.message})]})]}),!i&&p.jsx(Ea,{label:"رمز عبور",type:"password",placeholder:"حداقل ۶ کاراکتر",error:(d=s.password)==null?void 0:d.message,...a("password")}),p.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 border-t border-gray-200 dark:border-gray-700",children:[p.jsx(ce,{type:"button",variant:"secondary",onClick:r,disabled:n,children:"انصراف"}),p.jsx(ce,{type:"submit",loading:n,disabled:!l,children:i?"ویرایش":"افزودن"})]})]})]})},ice=[{id:1,name:"علی احمدی",email:"ali@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۵",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:2,name:"فاطمه حسینی",email:"fateme@example.com",role:"مدیر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۴",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:3,name:"محمد رضایی",email:"mohammad@example.com",role:"کاربر",status:"غیرفعال",createdAt:"۱۴۰۲/۰۸/۱۳",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:4,name:"زهرا کریمی",email:"zahra@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۲",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:5,name:"حسن نوری",email:"hassan@example.com",role:"مدیر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۱۱",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:6,name:"مریم صادقی",email:"maryam@example.com",role:"کاربر",status:"غیرفعال",createdAt:"۱۴۰۲/۰۸/۱۰",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:7,name:"احمد قاسمی",email:"ahmad@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۰۹",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:8,name:"سارا محمدی",email:"sara@example.com",role:"مدیر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۰۸",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:9,name:"رضا کریمی",email:"reza@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۰۷",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:10,name:"نرگس احمدی",email:"narges@example.com",role:"کاربر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۰۶",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:11,name:"امیر حسینی",email:"amir@example.com",role:"مدیر",status:"فعال",createdAt:"۱۴۰۲/۰۸/۰۵",phone:"۰۹۱۲۳۴۵۶۷۸۹"},{id:12,name:"مینا رضایی",email:"mina@example.com",role:"کاربر",status:"غیرفعال",createdAt:"۱۴۰۲/۰۸/۰۴",phone:"۰۹۱۲۳۴۵۶۷۸۹"}],ace=()=>{const[e,t]=k.useState(""),[r,n]=k.useState(!1),[i,a]=k.useState(null),[o,s]=k.useState(1),l=5,u=[{key:"name",label:"نام",sortable:!0},{key:"email",label:"ایمیل",sortable:!0},{key:"phone",label:"تلفن"},{key:"role",label:"نقش"},{key:"status",label:"وضعیت",render:x=>p.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${x==="فعال"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}`,children:x})},{key:"createdAt",label:"تاریخ عضویت",sortable:!0},{key:"actions",label:"عملیات",render:(x,O)=>p.jsxs("div",{className:"flex space-x-2",children:[p.jsx(ce,{size:"sm",variant:"secondary",onClick:()=>y(O),children:"ویرایش"}),p.jsx(ra,{permission:22,children:p.jsx(ce,{size:"sm",variant:"danger",onClick:()=>g(O.id),children:"حذف"})})]})}],f=ice.filter(x=>x.name.toLowerCase().includes(e.toLowerCase())||x.email.toLowerCase().includes(e.toLowerCase())),c=Math.ceil(f.length/l),d=(o-1)*l,h=f.slice(d,d+l),m=()=>{a(null),n(!0)},y=x=>{a(x),n(!0)},g=x=>{confirm("آیا از حذف این کاربر اطمینان دارید؟")&&console.log("Deleting user:",x)},b=x=>{console.log("User data:",x),n(!1)},v=()=>{n(!1),a(null)};return p.jsxs("div",{className:"p-6 space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"مدیریت کاربران"}),p.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:[f.length," کاربر یافت شد"]})]}),p.jsxs("div",{className:"flex items-center space-x-4",children:[p.jsxs(ce,{variant:"secondary",children:[p.jsx(Vx,{className:"h-4 w-4 ml-2"}),"فیلتر"]}),p.jsx(ra,{permission:25,children:p.jsxs(ce,{onClick:m,children:[p.jsx(_s,{className:"h-4 w-4 ml-2"}),"افزودن کاربر"]})})]})]}),p.jsxs("div",{className:"card p-6",children:[p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:"relative",children:[p.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:p.jsx(vp,{className:"h-5 w-5 text-gray-400"})}),p.jsx("input",{type:"text",placeholder:"جستجو در کاربران...",value:e,onChange:x=>t(x.target.value),className:"input pr-10 max-w-md"})]})}),p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg overflow-hidden",children:[p.jsx(jm,{columns:u,data:h,loading:!1}),p.jsx(km,{currentPage:o,totalPages:c,onPageChange:s,itemsPerPage:l,totalItems:f.length})]})]}),p.jsx(Gh,{isOpen:r,onClose:v,size:"lg",children:p.jsx(nce,{initialData:i,onSubmit:b,onCancel:v,loading:!1,isEdit:!!i})})]})},Lf=[{id:1,name:"لپ‌تاپ ایسوس",category:"کامپیوتر",price:"۲۵,۰۰۰,۰۰۰",stock:15,status:"موجود",createdAt:"۱۴۰۲/۰۸/۱۵"},{id:2,name:"گوشی سامسونگ گلکسی",category:"موبایل",price:"۱۸,۰۰۰,۰۰۰",stock:8,status:"موجود",createdAt:"۱۴۰۲/۰۸/۱۴"},{id:3,name:"هدفون بی‌سیم",category:"لوازم جانبی",price:"۲,۵۰۰,۰۰۰",stock:0,status:"ناموجود",createdAt:"۱۴۰۲/۰۸/۱۳"},{id:4,name:"کیبورد گیمینگ",category:"لوازم جانبی",price:"۳,۲۰۰,۰۰۰",stock:25,status:"موجود",createdAt:"۱۴۰۲/۰۸/۱۲"},{id:5,name:"مانیتور ۲۴ اینچ",category:"نمایشگر",price:"۱۲,۰۰۰,۰۰۰",stock:5,status:"کم موجود",createdAt:"۱۴۰۲/۰۸/۱۱"},{id:6,name:"ماوس بی‌سیم",category:"لوازم جانبی",price:"۱,۸۰۰,۰۰۰",stock:30,status:"موجود",createdAt:"۱۴۰۲/۰۸/۱۰"},{id:7,name:"تبلت آیپد",category:"تبلت",price:"۳۵,۰۰۰,۰۰۰",stock:3,status:"کم موجود",createdAt:"۱۴۰۲/۰۸/۰۹"},{id:8,name:"هارد اکسترنال",category:"ذخیره‌سازی",price:"۴,۵۰۰,۰۰۰",stock:12,status:"موجود",createdAt:"۱۴۰۲/۰۸/۰۸"}],oce=()=>{const[e,t]=k.useState(""),[r,n]=k.useState(1),i=6,a=[{key:"name",label:"نام محصول",sortable:!0},{key:"category",label:"دسته‌بندی",sortable:!0},{key:"price",label:"قیمت",sortable:!0},{key:"stock",label:"موجودی",render:h=>p.jsx("span",{className:`font-medium ${h===0?"text-red-600 dark:text-red-400":h<10?"text-yellow-600 dark:text-yellow-400":"text-green-600 dark:text-green-400"}`,children:h})},{key:"status",label:"وضعیت",render:h=>p.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${h==="موجود"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":h==="کم موجود"?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}`,children:h})},{key:"createdAt",label:"تاریخ افزودن",sortable:!0},{key:"actions",label:"عملیات",render:(h,m)=>p.jsxs("div",{className:"flex space-x-2",children:[p.jsx(ce,{size:"sm",variant:"secondary",onClick:()=>c(m),children:"ویرایش"}),p.jsx(ra,{permission:22,children:p.jsx(ce,{size:"sm",variant:"danger",onClick:()=>d(m.id),children:"حذف"})})]})}],o=Lf.filter(h=>h.name.toLowerCase().includes(e.toLowerCase())||h.category.toLowerCase().includes(e.toLowerCase())),s=Math.ceil(o.length/i),l=(r-1)*i,u=o.slice(l,l+i),f=()=>{console.log("Adding new product")},c=h=>{console.log("Editing product:",h)},d=h=>{confirm("آیا از حذف این محصول اطمینان دارید؟")&&console.log("Deleting product:",h)};return p.jsxs("div",{className:"p-6 space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"مدیریت محصولات"}),p.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:[o.length," محصول یافت شد"]})]}),p.jsxs("div",{className:"flex items-center space-x-4",children:[p.jsxs(ce,{variant:"secondary",children:[p.jsx(Vx,{className:"h-4 w-4 ml-2"}),"فیلتر"]}),p.jsx(ra,{permission:25,children:p.jsxs(ce,{onClick:f,children:[p.jsx(_s,{className:"h-4 w-4 ml-2"}),"افزودن محصول"]})})]})]}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(sy,{className:"h-8 w-8 text-blue-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل محصولات"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:Lf.length})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(sy,{className:"h-8 w-8 text-green-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"محصولات موجود"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:Lf.filter(h=>h.status==="موجود").length})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(sy,{className:"h-8 w-8 text-red-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"محصولات ناموجود"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:Lf.filter(h=>h.status==="ناموجود").length})]})]})})]}),p.jsxs("div",{className:"card p-6",children:[p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:"relative",children:[p.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:p.jsx(vp,{className:"h-5 w-5 text-gray-400"})}),p.jsx("input",{type:"text",placeholder:"جستجو در محصولات...",value:e,onChange:h=>t(h.target.value),className:"input pr-10 max-w-md"})]})}),p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg overflow-hidden",children:[p.jsx(jm,{columns:a,data:u,loading:!1}),p.jsx(km,{currentPage:r,totalPages:s,onPageChange:n,itemsPerPage:i,totalItems:o.length})]})]})]})},Wl=[{id:1001,customer:"علی احمدی",products:"۳ محصول",amount:"۴۵,۰۰۰,۰۰۰",status:"تحویل شده",date:"۱۴۰۲/۰۸/۱۵"},{id:1002,customer:"فاطمه حسینی",products:"۱ محصول",amount:"۲۵,۰۰۰,۰۰۰",status:"در حال پردازش",date:"۱۴۰۲/۰۸/۱۴"},{id:1003,customer:"محمد رضایی",products:"۲ محصول",amount:"۳۲,۰۰۰,۰۰۰",status:"ارسال شده",date:"۱۴۰۲/۰۸/۱۳"},{id:1004,customer:"زهرا کریمی",products:"۵ محصول",amount:"۱۲۰,۰۰۰,۰۰۰",status:"تحویل شده",date:"۱۴۰۲/۰۸/۱۲"},{id:1005,customer:"حسن نوری",products:"۱ محصول",amount:"۱۸,۰۰۰,۰۰۰",status:"لغو شده",date:"۱۴۰۲/۰۸/۱۱"},{id:1006,customer:"مریم صادقی",products:"۴ محصول",amount:"۸۵,۰۰۰,۰۰۰",status:"در حال پردازش",date:"۱۴۰۲/۰۸/۱۰"},{id:1007,customer:"احمد قاسمی",products:"۲ محصول",amount:"۳۸,۰۰۰,۰۰۰",status:"ارسال شده",date:"۱۴۰۲/۰۸/۰۹"},{id:1008,customer:"سارا محمدی",products:"۳ محصول",amount:"۶۲,۰۰۰,۰۰۰",status:"تحویل شده",date:"۱۴۰۲/۰۸/۰۸"},{id:1009,customer:"رضا کریمی",products:"۱ محصول",amount:"۱۵,۰۰۰,۰۰۰",status:"در حال پردازش",date:"۱۴۰۲/۰۸/۰۷"},{id:1010,customer:"نرگس احمدی",products:"۶ محصول",amount:"۱۴۵,۰۰۰,۰۰۰",status:"تحویل شده",date:"۱۴۰۲/۰۸/۰۶"}],sce=()=>{const[e,t]=k.useState(""),[r,n]=k.useState(1),i=6,a=[{key:"id",label:"شماره سفارش",sortable:!0},{key:"customer",label:"مشتری",sortable:!0},{key:"products",label:"محصولات"},{key:"amount",label:"مبلغ",render:h=>p.jsxs("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:[h," تومان"]})},{key:"status",label:"وضعیت",render:h=>p.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${h==="تحویل شده"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":h==="ارسال شده"?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":h==="در حال پردازش"?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200":"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}`,children:h})},{key:"date",label:"تاریخ سفارش",sortable:!0},{key:"actions",label:"عملیات",render:(h,m)=>p.jsxs("div",{className:"flex space-x-2",children:[p.jsx(ce,{size:"sm",variant:"secondary",onClick:()=>f(m),children:"مشاهده"}),p.jsx(ce,{size:"sm",variant:"primary",onClick:()=>c(m),children:"ویرایش"})]})}],o=Wl.filter(h=>h.customer.toLowerCase().includes(e.toLowerCase())||h.id.toString().includes(e)),s=Math.ceil(o.length/i),l=(r-1)*i,u=o.slice(l,l+i),f=h=>{console.log("Viewing order:",h)},c=h=>{console.log("Editing order:",h)},d=Wl.reduce((h,m)=>{const y=parseInt(m.amount.replace(/[,]/g,""));return h+y},0);return p.jsxs("div",{className:"p-6 space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"مدیریت سفارشات"}),p.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:[o.length," سفارش یافت شد"]})]}),p.jsx("div",{className:"flex items-center space-x-4",children:p.jsxs(ce,{variant:"secondary",children:[p.jsx(Vx,{className:"h-4 w-4 ml-2"}),"فیلتر"]})})]}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6 mb-6",children:[p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(tg,{className:"h-8 w-8 text-blue-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل سفارشات"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:Wl.length})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(Du,{className:"h-8 w-8 text-green-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"تحویل شده"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:Wl.filter(h=>h.status==="تحویل شده").length})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(tg,{className:"h-8 w-8 text-yellow-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"در انتظار"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:Wl.filter(h=>h.status==="در حال پردازش").length})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(Du,{className:"h-8 w-8 text-purple-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل فروش"}),p.jsxs("p",{className:"text-xl font-bold text-gray-900 dark:text-gray-100",children:[d.toLocaleString()," تومان"]})]})]})})]}),p.jsxs("div",{className:"card p-6",children:[p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:"relative",children:[p.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:p.jsx(vp,{className:"h-5 w-5 text-gray-400"})}),p.jsx("input",{type:"text",placeholder:"جستجو در سفارشات...",value:e,onChange:h=>t(h.target.value),className:"input pr-10 max-w-md"})]})}),p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg overflow-hidden",children:[p.jsx(jm,{columns:a,data:u,loading:!1}),p.jsx(km,{currentPage:r,totalPages:s,onPageChange:n,itemsPerPage:i,totalItems:o.length})]})]})]})},lce=()=>{const[e,t]=k.useState("month"),r=[{name:"فروردین",value:12e6},{name:"اردیبهشت",value:19e6},{name:"خرداد",value:15e6},{name:"تیر",value:22e6},{name:"مرداد",value:18e6},{name:"شهریور",value:25e6}],n=[{name:"فروردین",value:150},{name:"اردیبهشت",value:230},{name:"خرداد",value:180},{name:"تیر",value:280},{name:"مرداد",value:200},{name:"شهریور",value:320}],i=[{id:1,title:"گزارش فروش ماهانه",description:"گزارش کامل فروش محصولات در ماه گذشته",type:"فروش",date:"۱۴۰۲/۰۸/۳۰",format:"PDF"},{id:2,title:"گزارش کاربران جدید",description:"آمار کاربران جدید عضو شده در سیستم",type:"کاربران",date:"۱۴۰۲/۰۸/۲۹",format:"Excel"},{id:3,title:"گزارش موجودی انبار",description:"وضعیت موجودی محصولات در انبار",type:"انبار",date:"۱۴۰۲/۰۸/۲۸",format:"PDF"},{id:4,title:"گزارش درآمد روزانه",description:"جزئیات درآمد حاصل از فروش در ۳۰ روز گذشته",type:"مالی",date:"۱۴۰۲/۰۸/۲۷",format:"Excel"}],a=s=>{console.log("Downloading report:",s)},o=()=>{console.log("Generating new report")};return p.jsxs("div",{className:"p-6 space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"گزارش‌ها و آمار"}),p.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"مشاهده و دانلود گزارش‌های مختلف سیستم"})]}),p.jsxs("div",{className:"flex items-center space-x-4",children:[p.jsxs("select",{value:e,onChange:s=>t(s.target.value),className:"input max-w-xs",children:[p.jsx("option",{value:"week",children:"هفته گذشته"}),p.jsx("option",{value:"month",children:"ماه گذشته"}),p.jsx("option",{value:"quarter",children:"سه ماه گذشته"}),p.jsx("option",{value:"year",children:"سال گذشته"})]}),p.jsxs(ce,{onClick:o,children:[p.jsx(Ld,{className:"h-4 w-4 ml-2"}),"تولید گزارش جدید"]})]})]}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[p.jsx("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx("div",{className:"p-3 rounded-full bg-blue-100 dark:bg-blue-900",children:p.jsx(HA,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"})}),p.jsxs("div",{className:"mr-4",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل فروش"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"۱۱۱ میلیون"}),p.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"+۱۲% از ماه قبل"})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx("div",{className:"p-3 rounded-full bg-green-100 dark:bg-green-900",children:p.jsx(Es,{className:"h-6 w-6 text-green-600 dark:text-green-400"})}),p.jsxs("div",{className:"mr-4",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کاربران جدید"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"۳۲۰"}),p.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"+۸% از ماه قبل"})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx("div",{className:"p-3 rounded-full bg-purple-100 dark:bg-purple-900",children:p.jsx(Wx,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),p.jsxs("div",{className:"mr-4",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل سفارشات"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"۱,۲۵۴"}),p.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"+۱۵% از ماه قبل"})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx("div",{className:"p-3 rounded-full bg-yellow-100 dark:bg-yellow-900",children:p.jsx(Du,{className:"h-6 w-6 text-yellow-600 dark:text-yellow-400"})}),p.jsxs("div",{className:"mr-4",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"نرخ رشد"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"+۲۳%"}),p.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"بهبود یافته"})]})]})})]}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[p.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:[p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"روند فروش"}),p.jsx(TC,{data:r})]}),p.jsxs("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow",children:[p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"رشد کاربران"}),p.jsx($C,{data:n})]})]}),p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow",children:[p.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:"گزارش‌های اخیر"})}),p.jsx("div",{className:"p-6",children:p.jsx("div",{className:"space-y-4",children:i.map(s=>p.jsxs("div",{className:"flex items-center justify-between p-4 border border-gray-200 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[p.jsxs("div",{className:"flex items-center",children:[p.jsx("div",{className:"p-2 bg-blue-100 dark:bg-blue-900 rounded-lg ml-4",children:p.jsx(Ld,{className:"h-5 w-5 text-blue-600 dark:text-blue-400"})}),p.jsxs("div",{children:[p.jsx("h4",{className:"font-medium text-gray-900 dark:text-gray-100",children:s.title}),p.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description}),p.jsxs("div",{className:"flex items-center mt-1 space-x-4",children:[p.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["نوع: ",s.type]}),p.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["تاریخ: ",s.date]}),p.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["فرمت: ",s.format]})]})]})]}),p.jsxs(ce,{size:"sm",variant:"secondary",onClick:()=>a(s.id),children:[p.jsx(r3,{className:"h-4 w-4 ml-2"}),"دانلود"]})]},s.id))})})]})]})},uce=[{id:1,title:"سفارش جدید دریافت شد",message:"سفارش شماره ۱۰۰۱ از طرف علی احمدی ثبت شد",type:"order",priority:"high",isRead:!1,date:"۱۴۰۲/۰۸/۱۵ - ۱۴:۳۰",sender:"سیستم فروش"},{id:2,title:"محصول در حال اتمام",message:"موجودی لپ‌تاپ ایسوس به کمتر از ۵ عدد رسیده است",type:"warning",priority:"medium",isRead:!1,date:"۱۴۰۲/۰۸/۱۵ - ۱۲:۱۵",sender:"سیستم انبار"},{id:3,title:"کاربر جدید عضو شد",message:"فاطمه حسینی با موفقیت در سیستم ثبت نام کرد",type:"info",priority:"low",isRead:!0,date:"۱۴۰۲/۰۸/۱۴ - ۱۶:۴۵",sender:"سیستم کاربری"},{id:4,title:"پرداخت انجام شد",message:"پرداخت سفارش ۱۰۰۲ با موفقیت تایید شد",type:"success",priority:"medium",isRead:!0,date:"۱۴۰۲/۰۸/۱۴ - ۱۰:۲۰",sender:"سیستم پرداخت"},{id:5,title:"خطا در سیستم",message:"خطا در اتصال به درگاه پرداخت - نیاز به بررسی فوری",type:"error",priority:"high",isRead:!1,date:"۱۴۰۲/۰۸/۱۴ - ۰۹:۱۰",sender:"سیستم مانیتورینگ"},{id:6,title:"بک‌آپ تکمیل شد",message:"بک‌آپ روزانه اطلاعات با موفقیت انجام شد",type:"success",priority:"low",isRead:!0,date:"۱۴۰۲/۰۸/۱۳ - ۲۳:۰۰",sender:"سیستم بک‌آپ"},{id:7,title:"بروزرسانی سیستم",message:"نسخه جدید سیستم منتشر شد - بروزرسانی در دسترس است",type:"info",priority:"medium",isRead:!1,date:"۱۴۰۲/۰۸/۱۳ - ۱۱:۳۰",sender:"تیم توسعه"},{id:8,title:"گزارش فروش آماده شد",message:"گزارش فروش ماهانه تولید و آماده دانلود است",type:"info",priority:"low",isRead:!0,date:"۱۴۰۲/۰۸/۱۲ - ۰۸:۰۰",sender:"سیستم گزارش‌گیری"}],cce=()=>{const[e,t]=k.useState(uce),[r,n]=k.useState(""),[i,a]=k.useState("all"),[o,s]=k.useState(1),l=6,u=x=>{switch(x){case"error":return p.jsx(Qw,{className:"h-5 w-5 text-red-600"});case"warning":return p.jsx(oy,{className:"h-5 w-5 text-yellow-600"});case"success":return p.jsx(ZL,{className:"h-5 w-5 text-green-600"});case"info":return p.jsx(a3,{className:"h-5 w-5 text-blue-600"});default:return p.jsx(su,{className:"h-5 w-5 text-gray-600"})}},f=x=>{switch(x){case"high":return"border-r-red-500";case"medium":return"border-r-yellow-500";case"low":return"border-r-green-500";default:return"border-r-gray-300"}},c=e.filter(x=>{const O=x.title.toLowerCase().includes(r.toLowerCase())||x.message.toLowerCase().includes(r.toLowerCase()),w=i==="all"||i==="unread"&&!x.isRead||i==="read"&&x.isRead||x.type===i;return O&&w}),d=Math.ceil(c.length/l),h=(o-1)*l,m=c.slice(h,h+l),y=x=>{t(O=>O.map(w=>w.id===x?{...w,isRead:!0}:w))},g=()=>{t(x=>x.map(O=>({...O,isRead:!0})))},b=x=>{t(O=>O.filter(w=>w.id!==x))},v=e.filter(x=>!x.isRead).length;return p.jsxs("div",{className:"p-6 space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"اعلانات"}),p.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:[v," اعلان خوانده نشده از ",e.length," اعلان"]})]}),p.jsxs("div",{className:"flex items-center space-x-4",children:[p.jsxs(ce,{variant:"secondary",onClick:g,disabled:v===0,children:[p.jsx(eg,{className:"h-4 w-4 ml-2"}),"همه را خوانده شده علامت بزن"]}),p.jsxs(ce,{children:[p.jsx(_s,{className:"h-4 w-4 ml-2"}),"اعلان جدید"]})]})]}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(su,{className:"h-8 w-8 text-blue-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"کل اعلانات"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e.length})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(oy,{className:"h-8 w-8 text-red-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"خوانده نشده"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:v})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(Qw,{className:"h-8 w-8 text-red-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"خطا"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e.filter(x=>x.type==="error").length})]})]})}),p.jsx("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg shadow",children:p.jsxs("div",{className:"flex items-center",children:[p.jsx(oy,{className:"h-8 w-8 text-yellow-600"}),p.jsxs("div",{className:"mr-3",children:[p.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"هشدار"}),p.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:e.filter(x=>x.type==="warning").length})]})]})})]}),p.jsxs("div",{className:"card p-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 mb-6",children:[p.jsxs("div",{className:"relative flex-1",children:[p.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:p.jsx(vp,{className:"h-5 w-5 text-gray-400"})}),p.jsx("input",{type:"text",placeholder:"جستجو در اعلانات...",value:r,onChange:x=>n(x.target.value),className:"input pr-10"})]}),p.jsxs("select",{value:i,onChange:x=>a(x.target.value),className:"input min-w-[150px]",children:[p.jsx("option",{value:"all",children:"همه اعلانات"}),p.jsx("option",{value:"unread",children:"خوانده نشده"}),p.jsx("option",{value:"read",children:"خوانده شده"}),p.jsx("option",{value:"error",children:"خطا"}),p.jsx("option",{value:"warning",children:"هشدار"}),p.jsx("option",{value:"success",children:"موفق"}),p.jsx("option",{value:"info",children:"اطلاعات"})]})]}),p.jsx("div",{className:"space-y-4",children:m.map(x=>p.jsx("div",{className:`p-4 border-r-4 ${f(x.priority)} ${x.isRead?"bg-gray-50 dark:bg-gray-700":"bg-white dark:bg-gray-800"} border border-gray-200 dark:border-gray-600 rounded-lg shadow-sm hover:shadow-md transition-shadow`,children:p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{className:"flex items-start space-x-3",children:[p.jsx("div",{className:"flex-shrink-0 mt-1",children:u(x.type)}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("h3",{className:`text-sm font-medium ${x.isRead?"text-gray-600 dark:text-gray-400":"text-gray-900 dark:text-gray-100"}`,children:x.title}),!x.isRead&&p.jsx("div",{className:"w-2 h-2 bg-blue-600 rounded-full"})]}),p.jsx("p",{className:`mt-1 text-sm ${x.isRead?"text-gray-500 dark:text-gray-500":"text-gray-700 dark:text-gray-300"}`,children:x.message}),p.jsxs("div",{className:"mt-2 flex items-center text-xs text-gray-500 dark:text-gray-500 space-x-4",children:[p.jsx("span",{children:x.date}),p.jsxs("span",{children:["از: ",x.sender]})]})]})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[!x.isRead&&p.jsx(ce,{size:"sm",variant:"secondary",onClick:()=>y(x.id),children:p.jsx(eg,{className:"h-4 w-4"})}),p.jsx(ce,{size:"sm",variant:"danger",onClick:()=>b(x.id),children:p.jsx(Hx,{className:"h-4 w-4"})})]})]})},x.id))}),m.length===0&&p.jsxs("div",{className:"text-center py-12",children:[p.jsx(su,{className:"h-12 w-12 text-gray-400 mx-auto mb-4"}),p.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"هیچ اعلانی یافت نشد"})]}),p.jsx(km,{currentPage:o,totalPages:d,onPageChange:s,itemsPerPage:l,totalItems:c.length})]})]})},fce=[{id:"dashboard",label:"داشبورد",icon:GA,path:"/"},{id:"users",label:"کاربران",icon:Es,path:"/users",permission:10},{id:"roles",label:"نقش‌ها",icon:h3,path:"/roles",permission:5},{id:"products",label:"محصولات",icon:Wx,path:"/products",permission:15},{id:"orders",label:"سفارشات",icon:tg,path:"/orders",permission:20},{id:"reports",label:"گزارش‌ها",icon:Ld,path:"/reports",permission:25},{id:"notifications",label:"اعلانات",icon:su,path:"/notifications",permission:30}],dce=({isOpen:e,onClose:t})=>{var s;const{user:r}=Lc(),[n,i]=k.useState([]),a=l=>{i(u=>u.includes(l)?u.filter(f=>f!==l):[...u,l])},o=l=>{var d;const u=l.children&&l.children.length>0,f=n.includes(l.id),c=p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:`flex items-center justify-between px-4 py-3 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors ${u?"cursor-pointer":""}`,onClick:u?()=>a(l.id):void 0,children:[p.jsxs("div",{className:"flex items-center",children:[p.jsx(l.icon,{className:"h-5 w-5 ml-3"}),p.jsx("span",{className:"font-medium",children:l.label})]}),u&&p.jsx(qA,{className:`h-4 w-4 transition-transform ${f?"rotate-180":""}`})]}),u&&f&&p.jsx("div",{className:"mr-8 mt-1 space-y-1",children:(d=l.children)==null?void 0:d.map(h=>p.jsx("div",{children:h.permission?p.jsx(ra,{permission:h.permission,children:p.jsx(iy,{to:h.path,className:({isActive:m})=>`block px-4 py-2 text-sm text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors ${m?"bg-primary-100 dark:bg-primary-900 text-primary-700 dark:text-primary-300":""}`,onClick:t,children:h.label})}):p.jsx(iy,{to:h.path,className:({isActive:m})=>`block px-4 py-2 text-sm text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors ${m?"bg-primary-100 dark:bg-primary-900 text-primary-700 dark:text-primary-300":""}`,onClick:t,children:h.label})},h.id))})]});return u?p.jsx("div",{children:c}):p.jsxs(iy,{to:l.path,className:({isActive:h})=>`flex items-center px-4 py-3 rounded-lg transition-colors ${h?"text-primary-700 dark:text-primary-300 bg-primary-100 dark:bg-primary-900":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,onClick:t,children:[p.jsx(l.icon,{className:"h-5 w-5 ml-3"}),p.jsx("span",{className:"font-medium",children:l.label})]})};return p.jsxs(p.Fragment,{children:[e&&p.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-40 lg:hidden",onClick:t}),p.jsxs("div",{className:` + fixed top-0 right-0 h-full w-64 bg-white dark:bg-gray-800 shadow-lg z-50 transform transition-transform duration-300 ease-in-out + ${e?"translate-x-0":"translate-x-full"} + lg:relative lg:translate-x-0 + `,children:[p.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[p.jsxs("div",{className:"flex items-center",children:[p.jsx("div",{className:"w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center",children:p.jsx(GA,{className:"h-5 w-5 text-white"})}),p.jsx("span",{className:"mr-3 text-xl font-bold text-gray-900 dark:text-gray-100",children:"پنل مدیریت"})]}),p.jsx("button",{onClick:t,className:"p-1 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 lg:hidden",children:p.jsx(Hx,{className:"h-5 w-5"})})]}),p.jsxs("div",{className:"p-4",children:[p.jsxs("div",{className:"flex items-center mb-6 p-3 bg-gray-50 dark:bg-gray-700 rounded-lg",children:[p.jsx("div",{className:"w-10 h-10 bg-primary-600 rounded-full flex items-center justify-center",children:p.jsx("span",{className:"text-white font-medium",children:((s=r==null?void 0:r.first_name)==null?void 0:s.charAt(0))||"A"})}),p.jsxs("div",{className:"mr-3",children:[p.jsxs("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:[r==null?void 0:r.first_name," ",r==null?void 0:r.last_name]}),p.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:r==null?void 0:r.username})]})]}),p.jsx("nav",{className:"space-y-2",children:fce.map(l=>p.jsx("div",{children:l.permission?p.jsx(ra,{permission:l.permission,children:o(l)}):o(l)},l.id))})]})]})]})},hce=({onMenuClick:e})=>{var s;const{user:t,logout:r}=Lc(),{mode:n,toggleTheme:i}=WL(),[a,o]=k.useState(!1);return p.jsx("header",{className:"bg-white dark:bg-gray-800 shadow-sm border-b border-gray-200 dark:border-gray-700",children:p.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[p.jsxs("div",{className:"flex items-center",children:[p.jsx("button",{onClick:e,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 lg:hidden",children:p.jsx(u3,{className:"h-5 w-5 text-gray-600 dark:text-gray-400"})}),p.jsx("h1",{className:"mr-4 text-lg font-semibold text-gray-900 dark:text-gray-100",children:"خوش آمدید"})]}),p.jsxs("div",{className:"flex items-center space-x-4",children:[p.jsx("button",{onClick:i,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:n==="dark"?p.jsx(p3,{className:"h-5 w-5 text-gray-600 dark:text-gray-400"}):p.jsx(c3,{className:"h-5 w-5 text-gray-600 dark:text-gray-400"})}),p.jsxs("button",{className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors relative",children:[p.jsx(su,{className:"h-5 w-5 text-gray-600 dark:text-gray-400"}),p.jsx("span",{className:"absolute top-0 left-0 w-2 h-2 bg-red-500 rounded-full"})]}),p.jsxs("div",{className:"relative",children:[p.jsxs("button",{onClick:()=>o(!a),className:"flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",children:[p.jsx("div",{className:"w-8 h-8 bg-primary-600 rounded-full flex items-center justify-center",children:p.jsx("span",{className:"text-white text-sm font-medium",children:((s=t==null?void 0:t.first_name)==null?void 0:s.charAt(0))||"A"})}),p.jsxs("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 hidden md:block",children:[t==null?void 0:t.first_name," ",t==null?void 0:t.last_name]})]}),a&&p.jsx("div",{className:"absolute left-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 z-50",children:p.jsxs("div",{className:"py-1",children:[p.jsxs("div",{className:"px-4 py-2 border-b border-gray-200 dark:border-gray-700",children:[p.jsxs("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:[t==null?void 0:t.first_name," ",t==null?void 0:t.last_name]}),p.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t==null?void 0:t.username})]}),p.jsxs("button",{className:"w-full text-right px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center",children:[p.jsx(qx,{className:"h-4 w-4 ml-2"}),"پروفایل"]}),p.jsxs("button",{onClick:()=>{r(),o(!1)},className:"w-full text-right px-4 py-2 text-sm text-red-600 dark:text-red-400 hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center",children:[p.jsx(s3,{className:"h-4 w-4 ml-2"}),"خروج"]})]})})]})]})]})})},pce=()=>{const[e,t]=k.useState(!1);return p.jsxs("div",{className:"flex h-screen bg-gray-50 dark:bg-gray-900",children:[p.jsx(dce,{isOpen:e,onClose:()=>t(!1)}),p.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[p.jsx(hce,{onMenuClick:()=>t(!0)}),p.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-50 dark:bg-gray-900",children:p.jsx(eD,{})})]})]})},mce=async()=>(await $p(Nn($n.GET_ROLES))).data,yce=async e=>(await $p(Nn($n.GET_ROLE(e)))).data,vce=async e=>(await cb(Nn($n.CREATE_ROLE),e)).data,gce=async(e,t)=>(await w6(Nn($n.UPDATE_ROLE(e)),t)).data,xce=async e=>(await V2(Nn($n.DELETE_ROLE(e)))).data,bce=async e=>(await $p(Nn($n.GET_ROLE_PERMISSIONS(e)))).data,wce=async(e,t)=>(await cb(Nn($n.ASSIGN_ROLE_PERMISSION(e,t)),{})).data,Sce=async(e,t)=>(await V2(Nn($n.REMOVE_ROLE_PERMISSION(e,t)))).data,Oce=async()=>(await $p(Nn($n.GET_PERMISSIONS))).data,_ce=()=>mp({queryKey:[Er.GET_ROLES],queryFn:()=>mce()}),b1=e=>mp({queryKey:[Er.GET_ROLE,e],queryFn:()=>yce(e),enabled:!!e}),Ece=()=>{const e=co();return il({mutationFn:t=>vce(t),onSuccess:()=>{e.invalidateQueries({queryKey:[Er.GET_ROLES]}),nt.success("نقش با موفقیت ایجاد شد")},onError:t=>{nt.error((t==null?void 0:t.message)||"خطا در ایجاد نقش")}})},jce=()=>{const e=co();return il({mutationFn:t=>gce(t.id.toString(),t),onSuccess:t=>{e.invalidateQueries({queryKey:[Er.GET_ROLES]}),e.invalidateQueries({queryKey:[Er.GET_ROLE,t.id.toString()]}),nt.success("نقش با موفقیت به‌روزرسانی شد")},onError:t=>{nt.error((t==null?void 0:t.message)||"خطا در به‌روزرسانی نقش")}})},kce=()=>{const e=co();return il({mutationFn:t=>xce(t),onSuccess:()=>{e.invalidateQueries({queryKey:[Er.GET_ROLES]}),nt.success("نقش با موفقیت حذف شد")},onError:t=>{nt.error((t==null?void 0:t.message)||"خطا در حذف نقش")}})},Pce=e=>mp({queryKey:[Er.GET_ROLE_PERMISSIONS,e],queryFn:()=>bce(e),enabled:!!e}),Ace=()=>{const e=co();return il({mutationFn:({roleId:t,permissionId:r})=>wce(t,r),onSuccess:(t,r)=>{e.invalidateQueries({queryKey:[Er.GET_ROLE_PERMISSIONS,r.roleId]}),e.invalidateQueries({queryKey:[Er.GET_ROLE,r.roleId]}),nt.success("دسترسی با موفقیت اختصاص داده شد")},onError:t=>{nt.error((t==null?void 0:t.message)||"خطا در اختصاص دسترسی")}})},Tce=()=>{const e=co();return il({mutationFn:({roleId:t,permissionId:r})=>Sce(t,r),onSuccess:(t,r)=>{e.invalidateQueries({queryKey:[Er.GET_ROLE_PERMISSIONS,r.roleId]}),e.invalidateQueries({queryKey:[Er.GET_ROLE,r.roleId]}),nt.success("دسترسی با موفقیت حذف شد")},onError:t=>{nt.error((t==null?void 0:t.message)||"خطا در حذف دسترسی")}})},$ce=()=>mp({queryKey:[Er.GET_PERMISSIONS],queryFn:()=>Oce()}),ts=({size:e="md",text:t="در حال بارگذاری...",fullScreen:r=!1})=>{const n={sm:"h-4 w-4",md:"h-8 w-8",lg:"h-12 w-12"},i=p.jsxs("div",{className:`flex flex-col items-center justify-center ${r?"min-h-screen":"p-8"}`,children:[p.jsx(o3,{className:`${n[e]} animate-spin text-primary-600 dark:text-primary-400`}),t&&p.jsx("p",{className:"mt-2 text-sm text-gray-600 dark:text-gray-400",children:t})]});return r?p.jsx("div",{className:"fixed inset-0 bg-white dark:bg-gray-900 z-50",children:i}):i},Nce=()=>{const e=uo(),[t,r]=k.useState(null),{data:n,isLoading:i,error:a}=_ce(),{mutate:o,isPending:s}=kce(),l=m=>{e(`/roles/${m}/edit`)},u=m=>{e(`/roles/${m}`)},f=m=>{e(`/roles/${m}/permissions`)},c=m=>{r(m.toString())},d=()=>{t&&o(t,{onSuccess:()=>{r(null)}})},h=()=>{r(null)};return i?p.jsx(ts,{}):a?p.jsx("div",{className:"text-red-600",children:"خطا در بارگذاری نقش‌ها"}):p.jsxs("div",{className:"p-6",children:[p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:"flex justify-between items-center mb-4",children:[p.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"مدیریت نقش‌ها"}),p.jsxs(ce,{variant:"primary",onClick:()=>e("/roles/create"),className:"flex items-center gap-2",children:[p.jsx(_s,{className:"h-4 w-4"}),"افزودن نقش جدید"]})]})}),p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden",children:[p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",children:[p.jsx("thead",{className:"bg-gray-50 dark:bg-gray-700",children:p.jsxs("tr",{children:[p.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider",children:"نام نقش"}),p.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider",children:"توضیحات"}),p.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider",children:"تعداد دسترسی‌ها"}),p.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider",children:"تاریخ ایجاد"}),p.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider",children:"عملیات"})]})}),p.jsx("tbody",{className:"bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700",children:n==null?void 0:n.map(m=>{var y;return p.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-700",children:[p.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:p.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:m.title})}),p.jsx("td",{className:"px-6 py-4",children:p.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-300 max-w-xs truncate",children:m.description})}),p.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:p.jsxs("span",{className:"px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 rounded-full",children:[((y=m.permissions)==null?void 0:y.length)||0," دسترسی"]})}),p.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-600 dark:text-gray-300",children:new Date(m.created_at).toLocaleDateString("fa-IR")}),p.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(ce,{size:"sm",variant:"secondary",onClick:()=>u(m.id),className:"flex items-center gap-1",children:[p.jsx(KA,{className:"h-3 w-3"}),"مشاهده"]}),p.jsxs(ce,{size:"sm",variant:"primary",onClick:()=>f(m.id),className:"flex items-center gap-1",children:[p.jsx(Es,{className:"h-3 w-3"}),"دسترسی‌ها"]}),p.jsxs(ce,{size:"sm",variant:"secondary",onClick:()=>l(m.id),className:"flex items-center gap-1",children:[p.jsx(XA,{className:"h-3 w-3"}),"ویرایش"]}),p.jsxs(ce,{size:"sm",variant:"danger",onClick:()=>c(m.id),className:"flex items-center gap-1",children:[p.jsx(QA,{className:"h-3 w-3"}),"حذف"]})]})})]},m.id)})})]})}),(n==null?void 0:n.length)===0&&p.jsx("div",{className:"text-center py-12",children:p.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"هیچ نقشی یافت نشد"})})]}),p.jsx(Gh,{isOpen:!!t,onClose:h,title:"تأیید حذف",size:"sm",children:p.jsxs("div",{className:"space-y-4",children:[p.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"آیا از حذف این نقش اطمینان دارید؟ این عمل قابل بازگشت نیست."}),p.jsxs("div",{className:"flex justify-end gap-3",children:[p.jsx(ce,{variant:"secondary",onClick:h,children:"انصراف"}),p.jsx(ce,{variant:"danger",onClick:d,loading:s,children:"حذف"})]})]})})]})},Cce=Bc({title:or().required("نام نقش الزامی است").min(2,"نام نقش باید حداقل ۲ کاراکتر باشد"),description:or().required("توضیحات الزامی است").min(5,"توضیحات باید حداقل ۵ کاراکتر باشد")}),Hj=()=>{var g;const e=uo(),{id:t}=Dx(),r=!!t,{data:n,isLoading:i}=b1(t||""),{mutate:a,isPending:o}=Ece(),{mutate:s,isPending:l}=jce(),{register:u,handleSubmit:f,formState:{errors:c,isValid:d},reset:h}=Yx({resolver:Zx(Cce),mode:"onChange"});k.useEffect(()=>{r&&n&&h({title:n.title,description:n.description})},[r,n,h]);const m=b=>{r&&t?s({id:parseInt(t),...b},{onSuccess:()=>{e("/roles")}}):a(b,{onSuccess:()=>{e("/roles")}})};if(r&&i)return p.jsx(ts,{});const y=o||l;return p.jsxs("div",{className:"p-6",children:[p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[p.jsxs(ce,{variant:"secondary",onClick:()=>e("/roles"),className:"flex items-center gap-2",children:[p.jsx(Ux,{className:"h-4 w-4"}),"بازگشت"]}),p.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:r?"ویرایش نقش":"ایجاد نقش جدید"})]})}),p.jsx("div",{className:"max-w-2xl",children:p.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-md p-6",children:p.jsxs("form",{onSubmit:f(m),className:"space-y-6",children:[p.jsx(Ea,{label:"نام نقش",type:"text",placeholder:"نام نقش را وارد کنید",error:(g=c.title)==null?void 0:g.message,...u("title")}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"توضیحات"}),p.jsx("textarea",{placeholder:"توضیحات نقش را وارد کنید",className:`w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 resize-none h-24 ${c.description?"border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"} dark:bg-gray-700 dark:text-gray-100`,...u("description")}),c.description&&p.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:c.description.message})]}),p.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[p.jsx(ce,{type:"button",variant:"secondary",onClick:()=>e("/roles"),children:"انصراف"}),p.jsx(ce,{type:"submit",variant:"primary",loading:y,disabled:!d,children:r?"به‌روزرسانی":"ایجاد"})]})]})})})]})},Mce=()=>{var a;const e=uo(),{id:t=""}=Dx(),{data:r,isLoading:n,error:i}=b1(t);return n?p.jsx(ts,{}):i?p.jsx("div",{className:"text-red-600",children:"خطا در بارگذاری اطلاعات نقش"}):r?p.jsxs("div",{className:"p-6",children:[p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:"flex items-center justify-between mb-4",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs(ce,{variant:"secondary",onClick:()=>e("/roles"),className:"flex items-center gap-2",children:[p.jsx(Ux,{className:"h-4 w-4"}),"بازگشت"]}),p.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"جزئیات نقش"})]}),p.jsxs("div",{className:"flex gap-3",children:[p.jsxs(ce,{variant:"primary",onClick:()=>e(`/roles/${t}/permissions`),className:"flex items-center gap-2",children:[p.jsx(Es,{className:"h-4 w-4"}),"مدیریت دسترسی‌ها"]}),p.jsxs(ce,{variant:"secondary",onClick:()=>e(`/roles/${t}/edit`),className:"flex items-center gap-2",children:[p.jsx(XA,{className:"h-4 w-4"}),"ویرایش"]})]})]})}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[p.jsx("div",{className:"lg:col-span-2",children:p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-md p-6",children:[p.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-6",children:"اطلاعات نقش"}),p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"نام نقش"}),p.jsx("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-lg",children:p.jsx("p",{className:"text-gray-900 dark:text-gray-100 font-medium",children:r.title})})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"توضیحات"}),p.jsx("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-lg",children:p.jsx("p",{className:"text-gray-900 dark:text-gray-100",children:r.description})})]})]})]})}),p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-md p-6",children:[p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"آمار"}),p.jsx("div",{className:"space-y-4",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Es,{className:"h-4 w-4 text-blue-500"}),p.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"تعداد دسترسی‌ها"})]}),p.jsx("span",{className:"font-semibold text-gray-900 dark:text-gray-100",children:((a=r.permissions)==null?void 0:a.length)||0})]})})]}),p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-md p-6",children:[p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"اطلاعات زمانی"}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx(YL,{className:"h-4 w-4 text-green-500"}),p.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"تاریخ ایجاد"})]}),p.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:new Date(r.created_at).toLocaleDateString("fa-IR")})]}),p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx(Ld,{className:"h-4 w-4 text-orange-500"}),p.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"آخرین به‌روزرسانی"})]}),p.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:new Date(r.updated_at).toLocaleDateString("fa-IR")})]})]})]})]})]}),r.permissions&&r.permissions.length>0&&p.jsx("div",{className:"mt-6",children:p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-md p-6",children:[p.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"دسترسی‌های تخصیص یافته"}),p.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.permissions.map(o=>p.jsxs("div",{className:"p-3 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg",children:[p.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-100 mb-1",children:o.title}),p.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:o.description})]},o.id))})]})})]}):p.jsx("div",{children:"نقش یافت نشد"})},Ice=()=>{const e=uo(),{id:t=""}=Dx(),[r,n]=k.useState(!1),[i,a]=k.useState(null),{data:o,isLoading:s}=b1(t),{data:l,isLoading:u}=Pce(t),{data:f,isLoading:c}=$ce(),{mutate:d,isPending:h}=Ace(),{mutate:m,isPending:y}=Tce(),g=_=>{d({roleId:t,permissionId:_.toString()})},b=_=>{a(_.toString())},v=()=>{i&&m({roleId:t,permissionId:i},{onSuccess:()=>{a(null)}})},x=()=>{a(null)};if(s||u)return p.jsx(ts,{});if(!o)return p.jsx("div",{className:"text-red-600",children:"نقش یافت نشد"});const w=(l==null?void 0:l.map(_=>_.id))||[],S=(f==null?void 0:f.filter(_=>!w.includes(_.id)))||[];return p.jsxs("div",{className:"p-6",children:[p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:"flex items-center justify-between mb-4",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs(ce,{variant:"secondary",onClick:()=>e("/roles"),className:"flex items-center gap-2",children:[p.jsx(Ux,{className:"h-4 w-4"}),"بازگشت"]}),p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:"مدیریت دسترسی‌های نقش"}),p.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:o.title})]})]}),p.jsxs(ce,{variant:"primary",onClick:()=>n(!0),className:"flex items-center gap-2",disabled:S.length===0,children:[p.jsx(_s,{className:"h-4 w-4"}),"اختصاص دسترسی جدید"]})]})}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-md",children:[p.jsx("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700",children:p.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:["دسترسی‌های تخصیص یافته (",w.length,")"]})}),p.jsx("div",{className:"p-6",children:u?p.jsx("div",{className:"flex justify-center",children:p.jsx(ts,{})}):p.jsx("div",{className:"space-y-3",children:l&&l.length>0?l.map(_=>p.jsxs("div",{className:"flex items-center justify-between p-3 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg",children:[p.jsxs("div",{className:"flex-1",children:[p.jsx("h4",{className:"font-medium text-green-900 dark:text-green-100",children:_.title}),p.jsx("p",{className:"text-sm text-green-700 dark:text-green-300",children:_.description})]}),p.jsxs(ce,{size:"sm",variant:"danger",onClick:()=>b(_.id),className:"flex items-center gap-1 ml-3",children:[p.jsx(QA,{className:"h-3 w-3"}),"حذف"]})]},_.id)):p.jsx("p",{className:"text-center text-gray-500 dark:text-gray-400 py-8",children:"هیچ دسترسی تخصیص داده نشده است"})})})]}),p.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-md",children:[p.jsx("div",{className:"p-6 border-b border-gray-200 dark:border-gray-700",children:p.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:["دسترسی‌های قابل تخصیص (",S.length,")"]})}),p.jsx("div",{className:"p-6",children:c?p.jsx("div",{className:"flex justify-center",children:p.jsx(ts,{})}):p.jsx("div",{className:"space-y-3",children:S.length>0?S.map(_=>p.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg",children:[p.jsxs("div",{className:"flex-1",children:[p.jsx("h4",{className:"font-medium text-gray-900 dark:text-gray-100",children:_.title}),p.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:_.description})]}),p.jsxs(ce,{size:"sm",variant:"primary",onClick:()=>g(_.id),className:"flex items-center gap-1 ml-3",loading:h,children:[p.jsx(_s,{className:"h-3 w-3"}),"اختصاص"]})]},_.id)):p.jsx("p",{className:"text-center text-gray-500 dark:text-gray-400 py-8",children:"تمام دسترسی‌ها به این نقش تخصیص داده شده است"})})})]})]}),p.jsx(Gh,{isOpen:r,onClose:()=>n(!1),title:"اختصاص دسترسی جدید",size:"lg",children:p.jsxs("div",{className:"space-y-4",children:[p.jsxs("p",{className:"text-gray-600 dark:text-gray-300",children:['دسترسی مورد نظر را برای تخصیص به نقش "',o.title,'" انتخاب کنید:']}),p.jsx("div",{className:"max-h-96 overflow-y-auto space-y-3",children:S.map(_=>p.jsxs("div",{className:"flex items-center justify-between p-3 border border-gray-200 dark:border-gray-600 rounded-lg",children:[p.jsxs("div",{className:"flex-1",children:[p.jsx("h4",{className:"font-medium text-gray-900 dark:text-gray-100",children:_.title}),p.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:_.description})]}),p.jsxs(ce,{size:"sm",variant:"primary",onClick:()=>{g(_.id),n(!1)},className:"flex items-center gap-1",children:[p.jsx(eg,{className:"h-3 w-3"}),"انتخاب"]})]},_.id))}),p.jsx("div",{className:"flex justify-end gap-3 pt-4",children:p.jsx(ce,{variant:"secondary",onClick:()=>n(!1),children:"انصراف"})})]})}),p.jsx(Gh,{isOpen:!!i,onClose:x,title:"تأیید حذف دسترسی",size:"sm",children:p.jsxs("div",{className:"space-y-4",children:[p.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"آیا از حذف این دسترسی از نقش اطمینان دارید؟"}),p.jsxs("div",{className:"flex justify-end gap-3",children:[p.jsx(ce,{variant:"secondary",onClick:x,children:"انصراف"}),p.jsx(ce,{variant:"danger",onClick:v,loading:y,children:"حذف دسترسی"})]})]})})]})},Rce=({children:e})=>{const{user:t}=Lc();return t?e:p.jsx(_A,{to:"/login",replace:!0})},Dce=()=>p.jsxs(rD,{children:[p.jsx(Jt,{path:"/login",element:p.jsx(E6,{})}),p.jsxs(Jt,{path:"/",element:p.jsx(Rce,{children:p.jsx(pce,{})}),children:[p.jsx(Jt,{index:!0,element:p.jsx(rce,{})}),p.jsx(Jt,{path:"users",element:p.jsx(ace,{})}),p.jsx(Jt,{path:"products",element:p.jsx(oce,{})}),p.jsx(Jt,{path:"orders",element:p.jsx(sce,{})}),p.jsx(Jt,{path:"reports",element:p.jsx(lce,{})}),p.jsx(Jt,{path:"notifications",element:p.jsx(cce,{})}),p.jsx(Jt,{path:"roles",element:p.jsx(Nce,{})}),p.jsx(Jt,{path:"roles/create",element:p.jsx(Hj,{})}),p.jsx(Jt,{path:"roles/:id",element:p.jsx(Mce,{})}),p.jsx(Jt,{path:"roles/:id/edit",element:p.jsx(Hj,{})}),p.jsx(Jt,{path:"roles/:id/permissions",element:p.jsx(Ice,{})})]})]});function Lce(){return p.jsx(v3,{children:p.jsxs(DD,{client:g3,children:[p.jsx(VL,{children:p.jsx(HL,{children:p.jsx(UL,{children:p.jsx(cD,{children:p.jsx(Dce,{})})})})}),p.jsx(XD,{initialIsOpen:!1})]})})}Vy.createRoot(document.getElementById("root")).render(p.jsx(P.StrictMode,{children:p.jsx(Lce,{})})); diff --git a/dist/index.html b/dist/index.html index f26e526..88a6131 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,8 +5,8 @@ پنل مدیریت - - + +
diff --git a/swagger-ui.html b/swagger-ui.html new file mode 100644 index 0000000..ebc7432 --- /dev/null +++ b/swagger-ui.html @@ -0,0 +1,46 @@ + + + + + + Mazane API Documentation + + + + +
+ + + + +