(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const y of m.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&c(y)}).observe(document,{childList:!0,subtree:!0});function u(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(f){if(f.ep)return;f.ep=!0;const m=u(f);fetch(f.href,m)}})();var ri={exports:{}},Ar={},li={exports:{}},ee={};/** * @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 hc;function ap(){if(hc)return ee;hc=1;var s=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),y=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),A=Symbol.iterator;function U(v){return v===null||typeof v!="object"?null:(v=A&&v[A]||v["@@iterator"],typeof v=="function"?v:null)}var G={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,C={};function P(v,O,Z){this.props=v,this.context=O,this.refs=C,this.updater=Z||G}P.prototype.isReactComponent={},P.prototype.setState=function(v,O){if(typeof v!="object"&&typeof v!="function"&&v!=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,v,O,"setState")},P.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function Q(){}Q.prototype=P.prototype;function ne(v,O,Z){this.props=v,this.context=O,this.refs=C,this.updater=Z||G}var oe=ne.prototype=new Q;oe.constructor=ne,R(oe,P.prototype),oe.isPureReactComponent=!0;var fe=Array.isArray,pe=Object.prototype.hasOwnProperty,ae={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function J(v,O,Z){var te,se={},ie=null,ye=null;if(O!=null)for(te in O.ref!==void 0&&(ye=O.ref),O.key!==void 0&&(ie=""+O.key),O)pe.call(O,te)&&!H.hasOwnProperty(te)&&(se[te]=O[te]);var ce=arguments.length-2;if(ce===1)se.children=Z;else if(1>>1,O=D[v];if(0>>1;vf(se,B))ief(ye,se)?(D[v]=ye,D[ie]=B,v=ie):(D[v]=se,D[te]=B,v=te);else if(ief(ye,B))D[v]=ye,D[ie]=B,v=ie;else break e}}return K}function f(D,K){var B=D.sortIndex-K.sortIndex;return B!==0?B:D.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var m=performance;s.unstable_now=function(){return m.now()}}else{var y=Date,w=y.now();s.unstable_now=function(){return y.now()-w}}var E=[],_=[],j=1,A=null,U=3,G=!1,R=!1,C=!1,P=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function oe(D){for(var K=u(_);K!==null;){if(K.callback===null)c(_);else if(K.startTime<=D)c(_),K.sortIndex=K.expirationTime,i(E,K);else break;K=u(_)}}function fe(D){if(C=!1,oe(D),!R)if(u(E)!==null)R=!0,We(pe);else{var K=u(_);K!==null&&Ee(fe,K.startTime-D)}}function pe(D,K){R=!1,C&&(C=!1,Q(J),J=-1),G=!0;var B=U;try{for(oe(K),A=u(E);A!==null&&(!(A.expirationTime>K)||D&&!St());){var v=A.callback;if(typeof v=="function"){A.callback=null,U=A.priorityLevel;var O=v(A.expirationTime<=K);K=s.unstable_now(),typeof O=="function"?A.callback=O:A===u(E)&&c(E),oe(K)}else c(E);A=u(E)}if(A!==null)var Z=!0;else{var te=u(_);te!==null&&Ee(fe,te.startTime-K),Z=!1}return Z}finally{A=null,U=B,G=!1}}var ae=!1,H=null,J=-1,me=5,he=-1;function St(){return!(s.unstable_now()-heD||125v?(D.sortIndex=B,i(_,D),u(E)===null&&D===u(_)&&(C?(Q(J),J=-1):C=!0,Ee(fe,B-v))):(D.sortIndex=O,i(E,D),R||G||(R=!0,We(pe))),D},s.unstable_shouldYield=St,s.unstable_wrapCallback=function(D){var K=U;return function(){var B=U;U=K;try{return D.apply(this,arguments)}finally{U=B}}}}(ii)),ii}var wc;function pp(){return wc||(wc=1,si.exports=fp()),si.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 Sc;function mp(){if(Sc)return Ye;Sc=1;var s=gi(),i=pp();function u(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),E=Object.prototype.hasOwnProperty,_=/^[: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]*$/,j={},A={};function U(e){return E.call(A,e)?!0:E.call(j,e)?!1:_.test(e)?A[e]=!0:(j[e]=!0,!1)}function G(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function R(e,t,n,r){if(t===null||typeof t>"u"||G(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 C(e,t,n,r,l,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){P[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];P[t]=new C(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){P[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){P[e]=new C(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){P[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){P[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){P[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){P[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){P[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var Q=/[\-:]([a-z])/g;function ne(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(Q,ne);P[t]=new C(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(Q,ne);P[t]=new C(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(Q,ne);P[t]=new C(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){P[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),P.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){P[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function oe(e,t,n,r){var l=P.hasOwnProperty(t)?P[t]:null;(l!==null?l.type!==0:r||!(2p||l[a]!==o[p]){var h=` `+l[a].replace(" at new "," at ");return e.displayName&&h.includes("")&&(h=h.replace("",e.displayName)),h}while(1<=a&&0<=p);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?O(e):""}function se(e){switch(e.tag){case 5:return O(e.type);case 16:return O("Lazy");case 13:return O("Suspense");case 19:return O("SuspenseList");case 0:case 2:case 15:return e=te(e.type,!1),e;case 11:return e=te(e.type.render,!1),e;case 1:return e=te(e.type,!0),e;default:return""}}function ie(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 H:return"Fragment";case ae:return"Portal";case me:return"Profiler";case J:return"StrictMode";case et:return"Suspense";case ft:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case St:return(e.displayName||"Context")+".Consumer";case he:return(e._context.displayName||"Context")+".Provider";case kt:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nt:return t=e.displayName||null,t!==null?t:ie(e.type)||"Memo";case We:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}function ye(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 ie(t);case 8:return t===J?"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 ce(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function we(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tt(e){var t=we(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function br(e){e._valueTracker||(e._valueTracker=tt(e))}function Si(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=we(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hr(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 ao(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ki(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ce(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ni(e,t){t=t.checked,t!=null&&oe(e,"checked",t,!1)}function co(e,t){Ni(e,t);var n=ce(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?fo(e,t.type,n):t.hasOwnProperty("defaultValue")&&fo(e,t.type,ce(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ei(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function fo(e,t,n){(t!=="number"||Hr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xn=Array.isArray;function kn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=$r.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yn={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},fd=["Webkit","ms","Moz","O"];Object.keys(Yn).forEach(function(e){fd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yn[t]=Yn[e]})});function Ti(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Yn.hasOwnProperty(e)&&Yn[e]?(""+t).trim():t+"px"}function Oi(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Ti(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var pd=B({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 ho(e,t){if(t){if(pd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function yo(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 go=null;function vo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xo=null,Nn=null,En=null;function Li(e){if(e=xr(e)){if(typeof xo!="function")throw Error(u(280));var t=e.stateNode;t&&(t=fl(t),xo(e.stateNode,e.type,t))}}function zi(e){Nn?En?En.push(e):En=[e]:Nn=e}function Ai(){if(Nn){var e=Nn,t=En;if(En=Nn=null,Li(e),t)for(e=0;e>>=0,e===0?32:31-(Ed(e)/jd|0)|0}var Kr=64,Xr=4194304;function tr(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 Jr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var p=a&~l;p!==0?r=tr(p):(o&=a,o!==0&&(r=tr(o)))}else a=n&~l,a!==0?r=tr(a):o!==0&&(r=tr(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function nr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pt(t),e[t]=n}function Rd(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=cr),uu=" ",au=!1;function cu(e,t){switch(e){case"keyup":return rf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function du(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _n=!1;function of(e,t){switch(e){case"compositionend":return du(t);case"keypress":return t.which!==32?null:(au=!0,uu);case"textInput":return e=t.data,e===uu&&au?null:e;default:return null}}function sf(e,t){if(_n)return e==="compositionend"||!Mo&&cu(e,t)?(e=nu(),tl=Oo=$t=null,_n=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=vu(n)}}function wu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Su(){for(var e=window,t=Hr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hr(e.document)}return t}function Bo(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 yf(e){var t=Su(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&wu(n.ownerDocument.documentElement,n)){if(r!==null&&Bo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=xu(n,o);var a=xu(n,r);l&&a&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Pn=null,bo=null,mr=null,Ho=!1;function ku(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ho||Pn==null||Pn!==Hr(r)||(r=Pn,"selectionStart"in r&&Bo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),mr&&pr(mr,r)||(mr=r,r=al(bo,"onSelect"),0zn||(e.current=es[zn],es[zn]=null,zn--)}function ge(e,t){zn++,es[zn]=e.current,e.current=t}var Qt={},Ie=qt(Qt),qe=qt(!1),un=Qt;function An(e,t){var n=e.type.contextTypes;if(!n)return Qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Qe(e){return e=e.childContextTypes,e!=null}function pl(){xe(qe),xe(Ie)}function Mu(e,t,n){if(Ie.current!==Qt)throw Error(u(168));ge(Ie,t),ge(qe,n)}function Iu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(u(108,ye(e)||"Unknown",l));return B({},n,r)}function ml(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qt,un=Ie.current,ge(Ie,e),ge(qe,qe.current),!0}function Uu(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=Iu(e,t,un),r.__reactInternalMemoizedMergedChildContext=e,xe(qe),xe(Ie),ge(Ie,e)):xe(qe),ge(qe,n)}var Ot=null,hl=!1,ts=!1;function Bu(e){Ot===null?Ot=[e]:Ot.push(e)}function Pf(e){hl=!0,Bu(e)}function Kt(){if(!ts&&Ot!==null){ts=!0;var e=0,t=de;try{var n=Ot;for(de=1;e>=a,l-=a,Lt=1<<32-pt(t)+l|n<X?(Fe=q,q=null):Fe=q.sibling;var ue=T(x,q,S[X],F);if(ue===null){q===null&&(q=Fe);break}e&&q&&ue.alternate===null&&t(x,q),g=o(ue,g,X),W===null?V=ue:W.sibling=ue,W=ue,q=Fe}if(X===S.length)return n(x,q),Se&&cn(x,X),V;if(q===null){for(;XX?(Fe=q,q=null):Fe=q.sibling;var rn=T(x,q,ue.value,F);if(rn===null){q===null&&(q=Fe);break}e&&q&&rn.alternate===null&&t(x,q),g=o(rn,g,X),W===null?V=rn:W.sibling=rn,W=rn,q=Fe}if(ue.done)return n(x,q),Se&&cn(x,X),V;if(q===null){for(;!ue.done;X++,ue=S.next())ue=z(x,ue.value,F),ue!==null&&(g=o(ue,g,X),W===null?V=ue:W.sibling=ue,W=ue);return Se&&cn(x,X),V}for(q=r(x,q);!ue.done;X++,ue=S.next())ue=M(q,x,X,ue.value,F),ue!==null&&(e&&ue.alternate!==null&&q.delete(ue.key===null?X:ue.key),g=o(ue,g,X),W===null?V=ue:W.sibling=ue,W=ue);return e&&q.forEach(function(up){return t(x,up)}),Se&&cn(x,X),V}function _e(x,g,S,F){if(typeof S=="object"&&S!==null&&S.type===H&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case pe:e:{for(var V=S.key,W=g;W!==null;){if(W.key===V){if(V=S.type,V===H){if(W.tag===7){n(x,W.sibling),g=l(W,S.props.children),g.return=x,x=g;break e}}else if(W.elementType===V||typeof V=="object"&&V!==null&&V.$$typeof===We&&qu(V)===W.type){n(x,W.sibling),g=l(W,S.props),g.ref=wr(x,W,S),g.return=x,x=g;break e}n(x,W);break}else t(x,W);W=W.sibling}S.type===H?(g=vn(S.props.children,x.mode,F,S.key),g.return=x,x=g):(F=$l(S.type,S.key,S.props,null,x.mode,F),F.ref=wr(x,g,S),F.return=x,x=F)}return a(x);case ae:e:{for(W=S.key;g!==null;){if(g.key===W)if(g.tag===4&&g.stateNode.containerInfo===S.containerInfo&&g.stateNode.implementation===S.implementation){n(x,g.sibling),g=l(g,S.children||[]),g.return=x,x=g;break e}else{n(x,g);break}else t(x,g);g=g.sibling}g=Gs(S,x.mode,F),g.return=x,x=g}return a(x);case We:return W=S._init,_e(x,g,W(S._payload),F)}if(Xn(S))return b(x,g,S,F);if(K(S))return $(x,g,S,F);xl(x,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,g!==null&&g.tag===6?(n(x,g.sibling),g=l(g,S),g.return=x,x=g):(n(x,g),g=Ys(S,x.mode,F),g.return=x,x=g),a(x)):n(x,g)}return _e}var In=Qu(!0),Ku=Qu(!1),wl=qt(null),Sl=null,Un=null,is=null;function us(){is=Un=Sl=null}function as(e){var t=wl.current;xe(wl),e._currentValue=t}function cs(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Bn(e,t){Sl=e,is=Un=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ke=!0),e.firstContext=null)}function ut(e){var t=e._currentValue;if(is!==e)if(e={context:e,memoizedValue:t,next:null},Un===null){if(Sl===null)throw Error(u(308));Un=e,Sl.dependencies={lanes:0,firstContext:e}}else Un=Un.next=e;return t}var dn=null;function ds(e){dn===null?dn=[e]:dn.push(e)}function Xu(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,ds(t)):(n.next=l.next,l.next=n),t.interleaved=n,At(e,r)}function At(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Xt=!1;function fs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ju(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 Ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(le&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,At(e,n)}return l=r.interleaved,l===null?(t.next=t,ds(r)):(t.next=l.next,l.next=t),r.interleaved=t,At(e,n)}function kl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Co(e,n)}}function Yu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Nl(e,t,n,r){var l=e.updateQueue;Xt=!1;var o=l.firstBaseUpdate,a=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var h=p,k=h.next;h.next=null,a===null?o=k:a.next=k,a=h;var L=e.alternate;L!==null&&(L=L.updateQueue,p=L.lastBaseUpdate,p!==a&&(p===null?L.firstBaseUpdate=k:p.next=k,L.lastBaseUpdate=h))}if(o!==null){var z=l.baseState;a=0,L=k=h=null,p=o;do{var T=p.lane,M=p.eventTime;if((r&T)===T){L!==null&&(L=L.next={eventTime:M,lane:0,tag:p.tag,payload:p.payload,callback:p.callback,next:null});e:{var b=e,$=p;switch(T=t,M=n,$.tag){case 1:if(b=$.payload,typeof b=="function"){z=b.call(M,z,T);break e}z=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=$.payload,T=typeof b=="function"?b.call(M,z,T):b,T==null)break e;z=B({},z,T);break e;case 2:Xt=!0}}p.callback!==null&&p.lane!==0&&(e.flags|=64,T=l.effects,T===null?l.effects=[p]:T.push(p))}else M={eventTime:M,lane:T,tag:p.tag,payload:p.payload,callback:p.callback,next:null},L===null?(k=L=M,h=z):L=L.next=M,a|=T;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;T=p,p=T.next,T.next=null,l.lastBaseUpdate=T,l.shared.pending=null}}while(!0);if(L===null&&(h=z),l.baseState=h,l.firstBaseUpdate=k,l.lastBaseUpdate=L,t=l.shared.interleaved,t!==null){l=t;do a|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);mn|=a,e.lanes=a,e.memoizedState=z}}function Gu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=gs.transition;gs.transition={};try{e(!1),t()}finally{de=n,gs.transition=r}}function ga(){return at().memoizedState}function Lf(e,t,n){var r=en(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},va(e))xa(t,n);else if(n=Xu(e,t,n,r),n!==null){var l=Ve();xt(n,e,r,l),wa(n,t,r)}}function zf(e,t,n){var r=en(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(va(e))xa(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,p=o(a,n);if(l.hasEagerState=!0,l.eagerState=p,mt(p,a)){var h=t.interleaved;h===null?(l.next=l,ds(t)):(l.next=h.next,h.next=l),t.interleaved=l;return}}catch{}finally{}n=Xu(e,t,l,r),n!==null&&(l=Ve(),xt(n,e,r,l),wa(n,t,r))}}function va(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function xa(e,t){Er=Cl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wa(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Co(e,n)}}var Rl={readContext:ut,useCallback:Ue,useContext:Ue,useEffect:Ue,useImperativeHandle:Ue,useInsertionEffect:Ue,useLayoutEffect:Ue,useMemo:Ue,useReducer:Ue,useRef:Ue,useState:Ue,useDebugValue:Ue,useDeferredValue:Ue,useTransition:Ue,useMutableSource:Ue,useSyncExternalStore:Ue,useId:Ue,unstable_isNewReconciler:!1},Af={readContext:ut,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:aa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_l(4194308,4,fa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _l(4194308,4,e,t)},useInsertionEffect:function(e,t){return _l(4,2,e,t)},useMemo:function(e,t){var n=_t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Lf.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:ia,useDebugValue:Es,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=ia(!1),t=e[0];return e=Of.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ne,l=_t();if(Se){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),Ae===null)throw Error(u(349));(pn&30)!==0||na(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,aa(la.bind(null,r,o,e),[e]),r.flags|=2048,_r(9,ra.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=_t(),t=Ae.identifierPrefix;if(Se){var n=zt,r=Lt;n=(r&~(1<<32-pt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[jt]=t,e[vr]=r,Ba(e,t,!1,!1),t.stateNode=e;e:{switch(a=yo(n,r),n){case"dialog":ve("cancel",e),ve("close",e),l=r;break;case"iframe":case"object":case"embed":ve("load",e),l=r;break;case"video":case"audio":for(l=0;lWn&&(t.flags|=128,r=!0,Pr(o,!1),t.lanes=4194304)}else{if(!r)if(e=El(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Pr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Se)return Be(t),null}else 2*Ce()-o.renderingStartTime>Wn&&n!==1073741824&&(t.flags|=128,r=!0,Pr(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ce(),t.sibling=null,n=ke.current,ge(ke,r?n&1|2:n&1),t):(Be(t),null);case 22:case 23:return Ks(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ot&1073741824)!==0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function Hf(e,t){switch(rs(t),t.tag){case 1:return Qe(t.type)&&pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bn(),xe(qe),xe(Ie),ys(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ms(t),null;case 13:if(xe(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xe(ke),null;case 4:return bn(),null;case 10:return as(t.type._context),null;case 22:case 23:return Ks(),null;case 24:return null;default:return null}}var zl=!1,be=!1,$f=typeof WeakSet=="function"?WeakSet:Set,I=null;function $n(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Ds(e,t,n){try{n()}catch(r){je(e,t,r)}}var $a=!1;function Vf(e,t){if(Ko=Zr,e=Su(),Bo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,p=-1,h=-1,k=0,L=0,z=e,T=null;t:for(;;){for(var M;z!==n||l!==0&&z.nodeType!==3||(p=a+l),z!==o||r!==0&&z.nodeType!==3||(h=a+r),z.nodeType===3&&(a+=z.nodeValue.length),(M=z.firstChild)!==null;)T=z,z=M;for(;;){if(z===e)break t;if(T===n&&++k===l&&(p=a),T===o&&++L===r&&(h=a),(M=z.nextSibling)!==null)break;z=T,T=z.parentNode}z=M}n=p===-1||h===-1?null:{start:p,end:h}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xo={focusedElem:e,selectionRange:n},Zr=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;try{var b=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var $=b.memoizedProps,_e=b.memoizedState,x=t.stateNode,g=x.getSnapshotBeforeUpdate(t.elementType===t.type?$:yt(t.type,$),_e);x.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(F){je(t,t.return,F)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return b=$a,$a=!1,b}function Rr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Ds(t,n,o)}l=l.next}while(l!==r)}}function Al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ms(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Va(e){var t=e.alternate;t!==null&&(e.alternate=null,Va(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jt],delete t[vr],delete t[Zo],delete t[Cf],delete t[_f])),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 Wa(e){return e.tag===5||e.tag===3||e.tag===4}function qa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wa(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 Is(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dl));else if(r!==4&&(e=e.child,e!==null))for(Is(e,t,n),e=e.sibling;e!==null;)Is(e,t,n),e=e.sibling}function Us(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Us(e,t,n),e=e.sibling;e!==null;)Us(e,t,n),e=e.sibling}var De=null,gt=!1;function Yt(e,t,n){for(n=n.child;n!==null;)Qa(e,t,n),n=n.sibling}function Qa(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(Qr,n)}catch{}switch(n.tag){case 5:be||$n(n,t);case 6:var r=De,l=gt;De=null,Yt(e,t,n),De=r,gt=l,De!==null&&(gt?(e=De,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):De.removeChild(n.stateNode));break;case 18:De!==null&&(gt?(e=De,n=n.stateNode,e.nodeType===8?Go(e.parentNode,n):e.nodeType===1&&Go(e,n),ir(e)):Go(De,n.stateNode));break;case 4:r=De,l=gt,De=n.stateNode.containerInfo,gt=!0,Yt(e,t,n),De=r,gt=l;break;case 0:case 11:case 14:case 15:if(!be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&Ds(n,t,a),l=l.next}while(l!==r)}Yt(e,t,n);break;case 1:if(!be&&($n(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(p){je(n,t,p)}Yt(e,t,n);break;case 21:Yt(e,t,n);break;case 22:n.mode&1?(be=(r=be)||n.memoizedState!==null,Yt(e,t,n),be=r):Yt(e,t,n);break;default:Yt(e,t,n)}}function Ka(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new $f),t.forEach(function(r){var l=Zf.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=a),r&=~o}if(r=l,r=Ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*qf(r/1960))-r,10e?16:e,Zt===null)var r=!1;else{if(e=Zt,Zt=null,Ul=0,(le&6)!==0)throw Error(u(331));var l=le;for(le|=4,I=e.current;I!==null;){var o=I,a=o.child;if((I.flags&16)!==0){var p=o.deletions;if(p!==null){for(var h=0;hCe()-Hs?yn(e,0):bs|=n),Je(e,t)}function ic(e,t){t===0&&((e.mode&1)===0?t=1:(t=Xr,Xr<<=1,(Xr&130023424)===0&&(Xr=4194304)));var n=Ve();e=At(e,t),e!==null&&(nr(e,t,n),Je(e,n))}function Gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ic(e,n)}function Zf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),ic(e,n)}var uc;uc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Ke=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ke=!1,Bf(e,t,n);Ke=(e.flags&131072)!==0}else Ke=!1,Se&&(t.flags&1048576)!==0&&bu(t,gl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ll(e,t),e=t.pendingProps;var l=An(t,Ie.current);Bn(t,n),l=xs(null,t,r,e,l,n);var o=ws();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qe(r)?(o=!0,ml(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,fs(t),l.updater=Tl,t.stateNode=l,l._reactInternals=t,Cs(t,r,e,n),t=Ts(null,t,r,!0,o,n)):(t.tag=0,Se&&o&&ns(t),$e(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ll(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=tp(r),e=yt(r,e),l){case 0:t=Rs(null,t,r,e,n);break e;case 1:t=Aa(null,t,r,e,n);break e;case 11:t=Ra(null,t,r,e,n);break e;case 14:t=Ta(null,t,r,yt(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),Rs(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),Aa(e,t,r,l,n);case 3:e:{if(Fa(t),e===null)throw Error(u(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Ju(e,t),Nl(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=Hn(Error(u(423)),t),t=Da(e,t,r,n,l);break e}else if(r!==l){l=Hn(Error(u(424)),t),t=Da(e,t,r,n,l);break e}else for(lt=Wt(t.stateNode.containerInfo.firstChild),rt=t,Se=!0,ht=null,n=Ku(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mn(),r===l){t=Dt(e,t,n);break e}$e(e,t,r,n)}t=t.child}return t;case 5:return Zu(t),e===null&&os(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,a=l.children,Jo(r,l)?a=null:o!==null&&Jo(r,o)&&(t.flags|=32),za(e,t),$e(e,t,a,n),t.child;case 6:return e===null&&os(t),null;case 13:return Ma(e,t,n);case 4:return ps(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=In(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),Ra(e,t,r,l,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,a=l.value,ge(wl,r._currentValue),r._currentValue=a,o!==null)if(mt(o.value,a)){if(o.children===l.children&&!qe.current){t=Dt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var p=o.dependencies;if(p!==null){a=o.child;for(var h=p.firstContext;h!==null;){if(h.context===r){if(o.tag===1){h=Ft(-1,n&-n),h.tag=2;var k=o.updateQueue;if(k!==null){k=k.shared;var L=k.pending;L===null?h.next=h:(h.next=L.next,L.next=h),k.pending=h}}o.lanes|=n,h=o.alternate,h!==null&&(h.lanes|=n),cs(o.return,n,t),p.lanes|=n;break}h=h.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(u(341));a.lanes|=n,p=a.alternate,p!==null&&(p.lanes|=n),cs(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}$e(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Bn(t,n),l=ut(l),r=r(l),t.flags|=1,$e(e,t,r,n),t.child;case 14:return r=t.type,l=yt(r,t.pendingProps),l=yt(r.type,l),Ta(e,t,r,l,n);case 15:return Oa(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:yt(r,l),Ll(e,t),t.tag=1,Qe(r)?(e=!0,ml(t)):e=!1,Bn(t,n),ka(t,r,l),Cs(t,r,l,n),Ts(null,t,r,!0,e,n);case 19:return Ua(e,t,n);case 22:return La(e,t,n)}throw Error(u(156,t.tag))};function ac(e,t){return Hi(e,t)}function ep(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dt(e,t,n,r){return new ep(e,t,n,r)}function Js(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tp(e){if(typeof e=="function")return Js(e)?1:0;if(e!=null){if(e=e.$$typeof,e===kt)return 11;if(e===Nt)return 14}return 2}function nn(e,t){var n=e.alternate;return n===null?(n=dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $l(e,t,n,r,l,o){var a=2;if(r=e,typeof e=="function")Js(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case H:return vn(n.children,l,o,t);case J:a=8,l|=8;break;case me:return e=dt(12,n,t,l|2),e.elementType=me,e.lanes=o,e;case et:return e=dt(13,n,t,l),e.elementType=et,e.lanes=o,e;case ft:return e=dt(19,n,t,l),e.elementType=ft,e.lanes=o,e;case Ee:return Vl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case he:a=10;break e;case St:a=9;break e;case kt:a=11;break e;case Nt:a=14;break e;case We:a=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=dt(a,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function vn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function Vl(e,t,n,r){return e=dt(22,e,r,t),e.elementType=Ee,e.lanes=n,e.stateNode={isHidden:!1},e}function Ys(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function Gs(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function np(e,t,n,r,l){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=jo(0),this.expirationTimes=jo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Zs(e,t,n,r,l,o,a,p,h){return e=new np(e,t,n,p,h),t===1?(t=1,o===!0&&(t|=8)):t=0,o=dt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fs(o),e}function rp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(i){console.error(i)}}return s(),oi.exports=mp(),oi.exports}var Nc;function yp(){if(Nc)return Yl;Nc=1;var s=hp();return Yl.createRoot=s.createRoot,Yl.hydrateRoot=s.hydrateRoot,Yl}var gp=yp();/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var vp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xp=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Re=(s,i)=>{const u=re.forwardRef(({color:c="currentColor",size:f=24,strokeWidth:m=2,absoluteStrokeWidth:y,className:w="",children:E,..._},j)=>re.createElement("svg",{ref:j,...vp,width:f,height:f,stroke:c,strokeWidth:y?Number(m)*24/Number(f):m,className:["lucide",`lucide-${xp(s)}`,w].join(" "),..._},[...i.map(([A,U])=>re.createElement(A,U)),...Array.isArray(E)?E:[E]]));return u.displayName=`${s}`,u};/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wp=Re("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sp=Re("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kp=Re("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"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Np=Re("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"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ep=Re("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jp=Re("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"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cp=Re("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"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _p=Re("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"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ln=Re("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pp=Re("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rp=Re("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tp=Re("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Uc=Re("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Op=Re("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bc=Re("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"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lp=Re("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"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zp=Re("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ap=Re("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fp=Re("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"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ec=Re("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"}]]);/** * @license lucide-react v0.344.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dp=Re("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function bc(s,i){return function(){return s.apply(i,arguments)}}const{toString:Mp}=Object.prototype,{getPrototypeOf:vi}=Object,{iterator:ro,toStringTag:Hc}=Symbol,lo=(s=>i=>{const u=Mp.call(i);return s[u]||(s[u]=u.slice(8,-1).toLowerCase())})(Object.create(null)),wt=s=>(s=s.toLowerCase(),i=>lo(i)===s),oo=s=>i=>typeof i===s,{isArray:Qn}=Array,Dr=oo("undefined");function Mr(s){return s!==null&&!Dr(s)&&s.constructor!==null&&!Dr(s.constructor)&&Ge(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const $c=wt("ArrayBuffer");function Ip(s){let i;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?i=ArrayBuffer.isView(s):i=s&&s.buffer&&$c(s.buffer),i}const Up=oo("string"),Ge=oo("function"),Vc=oo("number"),Ir=s=>s!==null&&typeof s=="object",Bp=s=>s===!0||s===!1,Gl=s=>{if(lo(s)!=="object")return!1;const i=vi(s);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Hc in s)&&!(ro in s)},bp=s=>{if(!Ir(s)||Mr(s))return!1;try{return Object.keys(s).length===0&&Object.getPrototypeOf(s)===Object.prototype}catch{return!1}},Hp=wt("Date"),$p=wt("File"),Vp=wt("Blob"),Wp=wt("FileList"),qp=s=>Ir(s)&&Ge(s.pipe),Qp=s=>{let i;return s&&(typeof FormData=="function"&&s instanceof FormData||Ge(s.append)&&((i=lo(s))==="formdata"||i==="object"&&Ge(s.toString)&&s.toString()==="[object FormData]"))},Kp=wt("URLSearchParams"),[Xp,Jp,Yp,Gp]=["ReadableStream","Request","Response","Headers"].map(wt),Zp=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ur(s,i,{allOwnKeys:u=!1}={}){if(s===null||typeof s>"u")return;let c,f;if(typeof s!="object"&&(s=[s]),Qn(s))for(c=0,f=s.length;c0;)if(f=u[c],i===f.toLowerCase())return f;return null}const xn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qc=s=>!Dr(s)&&s!==xn;function di(){const{caseless:s}=qc(this)&&this||{},i={},u=(c,f)=>{const m=s&&Wc(i,f)||f;Gl(i[m])&&Gl(c)?i[m]=di(i[m],c):Gl(c)?i[m]=di({},c):Qn(c)?i[m]=c.slice():i[m]=c};for(let c=0,f=arguments.length;c(Ur(i,(f,m)=>{u&&Ge(f)?s[m]=bc(f,u):s[m]=f},{allOwnKeys:c}),s),tm=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),nm=(s,i,u,c)=>{s.prototype=Object.create(i.prototype,c),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:i.prototype}),u&&Object.assign(s.prototype,u)},rm=(s,i,u,c)=>{let f,m,y;const w={};if(i=i||{},s==null)return i;do{for(f=Object.getOwnPropertyNames(s),m=f.length;m-- >0;)y=f[m],(!c||c(y,s,i))&&!w[y]&&(i[y]=s[y],w[y]=!0);s=u!==!1&&vi(s)}while(s&&(!u||u(s,i))&&s!==Object.prototype);return i},lm=(s,i,u)=>{s=String(s),(u===void 0||u>s.length)&&(u=s.length),u-=i.length;const c=s.indexOf(i,u);return c!==-1&&c===u},om=s=>{if(!s)return null;if(Qn(s))return s;let i=s.length;if(!Vc(i))return null;const u=new Array(i);for(;i-- >0;)u[i]=s[i];return u},sm=(s=>i=>s&&i instanceof s)(typeof Uint8Array<"u"&&vi(Uint8Array)),im=(s,i)=>{const c=(s&&s[ro]).call(s);let f;for(;(f=c.next())&&!f.done;){const m=f.value;i.call(s,m[0],m[1])}},um=(s,i)=>{let u;const c=[];for(;(u=s.exec(i))!==null;)c.push(u);return c},am=wt("HTMLFormElement"),cm=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(u,c,f){return c.toUpperCase()+f}),jc=(({hasOwnProperty:s})=>(i,u)=>s.call(i,u))(Object.prototype),dm=wt("RegExp"),Qc=(s,i)=>{const u=Object.getOwnPropertyDescriptors(s),c={};Ur(u,(f,m)=>{let y;(y=i(f,m,s))!==!1&&(c[m]=y||f)}),Object.defineProperties(s,c)},fm=s=>{Qc(s,(i,u)=>{if(Ge(s)&&["arguments","caller","callee"].indexOf(u)!==-1)return!1;const c=s[u];if(Ge(c)){if(i.enumerable=!1,"writable"in i){i.writable=!1;return}i.set||(i.set=()=>{throw Error("Can not rewrite read-only method '"+u+"'")})}})},pm=(s,i)=>{const u={},c=f=>{f.forEach(m=>{u[m]=!0})};return Qn(s)?c(s):c(String(s).split(i)),u},mm=()=>{},hm=(s,i)=>s!=null&&Number.isFinite(s=+s)?s:i;function ym(s){return!!(s&&Ge(s.append)&&s[Hc]==="FormData"&&s[ro])}const gm=s=>{const i=new Array(10),u=(c,f)=>{if(Ir(c)){if(i.indexOf(c)>=0)return;if(Mr(c))return c;if(!("toJSON"in c)){i[f]=c;const m=Qn(c)?[]:{};return Ur(c,(y,w)=>{const E=u(y,f+1);!Dr(E)&&(m[w]=E)}),i[f]=void 0,m}}return c};return u(s,0)},vm=wt("AsyncFunction"),xm=s=>s&&(Ir(s)||Ge(s))&&Ge(s.then)&&Ge(s.catch),Kc=((s,i)=>s?setImmediate:i?((u,c)=>(xn.addEventListener("message",({source:f,data:m})=>{f===xn&&m===u&&c.length&&c.shift()()},!1),f=>{c.push(f),xn.postMessage(u,"*")}))(`axios@${Math.random()}`,[]):u=>setTimeout(u))(typeof setImmediate=="function",Ge(xn.postMessage)),wm=typeof queueMicrotask<"u"?queueMicrotask.bind(xn):typeof process<"u"&&process.nextTick||Kc,Sm=s=>s!=null&&Ge(s[ro]),N={isArray:Qn,isArrayBuffer:$c,isBuffer:Mr,isFormData:Qp,isArrayBufferView:Ip,isString:Up,isNumber:Vc,isBoolean:Bp,isObject:Ir,isPlainObject:Gl,isEmptyObject:bp,isReadableStream:Xp,isRequest:Jp,isResponse:Yp,isHeaders:Gp,isUndefined:Dr,isDate:Hp,isFile:$p,isBlob:Vp,isRegExp:dm,isFunction:Ge,isStream:qp,isURLSearchParams:Kp,isTypedArray:sm,isFileList:Wp,forEach:Ur,merge:di,extend:em,trim:Zp,stripBOM:tm,inherits:nm,toFlatObject:rm,kindOf:lo,kindOfTest:wt,endsWith:lm,toArray:om,forEachEntry:im,matchAll:um,isHTMLForm:am,hasOwnProperty:jc,hasOwnProp:jc,reduceDescriptors:Qc,freezeMethods:fm,toObjectSet:pm,toCamelCase:cm,noop:mm,toFiniteNumber:hm,findKey:Wc,global:xn,isContextDefined:qc,isSpecCompliantForm:ym,toJSONObject:gm,isAsyncFn:vm,isThenable:xm,setImmediate:Kc,asap:wm,isIterable:Sm};function Y(s,i,u,c,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",i&&(this.code=i),u&&(this.config=u),c&&(this.request=c),f&&(this.response=f,this.status=f.status?f.status:null)}N.inherits(Y,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:N.toJSONObject(this.config),code:this.code,status:this.status}}});const Xc=Y.prototype,Jc={};["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(s=>{Jc[s]={value:s}});Object.defineProperties(Y,Jc);Object.defineProperty(Xc,"isAxiosError",{value:!0});Y.from=(s,i,u,c,f,m)=>{const y=Object.create(Xc);return N.toFlatObject(s,y,function(E){return E!==Error.prototype},w=>w!=="isAxiosError"),Y.call(y,s.message,i,u,c,f),y.cause=s,y.name=s.name,m&&Object.assign(y,m),y};const km=null;function fi(s){return N.isPlainObject(s)||N.isArray(s)}function Yc(s){return N.endsWith(s,"[]")?s.slice(0,-2):s}function Cc(s,i,u){return s?s.concat(i).map(function(f,m){return f=Yc(f),!u&&m?"["+f+"]":f}).join(u?".":""):i}function Nm(s){return N.isArray(s)&&!s.some(fi)}const Em=N.toFlatObject(N,{},null,function(i){return/^is[A-Z]/.test(i)});function so(s,i,u){if(!N.isObject(s))throw new TypeError("target must be an object");i=i||new FormData,u=N.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,P){return!N.isUndefined(P[C])});const c=u.metaTokens,f=u.visitor||j,m=u.dots,y=u.indexes,E=(u.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(i);if(!N.isFunction(f))throw new TypeError("visitor must be a function");function _(R){if(R===null)return"";if(N.isDate(R))return R.toISOString();if(N.isBoolean(R))return R.toString();if(!E&&N.isBlob(R))throw new Y("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(R)||N.isTypedArray(R)?E&&typeof Blob=="function"?new Blob([R]):Buffer.from(R):R}function j(R,C,P){let Q=R;if(R&&!P&&typeof R=="object"){if(N.endsWith(C,"{}"))C=c?C:C.slice(0,-2),R=JSON.stringify(R);else if(N.isArray(R)&&Nm(R)||(N.isFileList(R)||N.endsWith(C,"[]"))&&(Q=N.toArray(R)))return C=Yc(C),Q.forEach(function(oe,fe){!(N.isUndefined(oe)||oe===null)&&i.append(y===!0?Cc([C],fe,m):y===null?C:C+"[]",_(oe))}),!1}return fi(R)?!0:(i.append(Cc(P,C,m),_(R)),!1)}const A=[],U=Object.assign(Em,{defaultVisitor:j,convertValue:_,isVisitable:fi});function G(R,C){if(!N.isUndefined(R)){if(A.indexOf(R)!==-1)throw Error("Circular reference detected in "+C.join("."));A.push(R),N.forEach(R,function(Q,ne){(!(N.isUndefined(Q)||Q===null)&&f.call(i,Q,N.isString(ne)?ne.trim():ne,C,U))===!0&&G(Q,C?C.concat(ne):[ne])}),A.pop()}}if(!N.isObject(s))throw new TypeError("data must be an object");return G(s),i}function _c(s){const i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(c){return i[c]})}function xi(s,i){this._pairs=[],s&&so(s,this,i)}const Gc=xi.prototype;Gc.append=function(i,u){this._pairs.push([i,u])};Gc.toString=function(i){const u=i?function(c){return i.call(this,c,_c)}:_c;return this._pairs.map(function(f){return u(f[0])+"="+u(f[1])},"").join("&")};function jm(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zc(s,i,u){if(!i)return s;const c=u&&u.encode||jm;N.isFunction(u)&&(u={serialize:u});const f=u&&u.serialize;let m;if(f?m=f(i,u):m=N.isURLSearchParams(i)?i.toString():new xi(i,u).toString(c),m){const y=s.indexOf("#");y!==-1&&(s=s.slice(0,y)),s+=(s.indexOf("?")===-1?"?":"&")+m}return s}class Pc{constructor(){this.handlers=[]}use(i,u,c){return this.handlers.push({fulfilled:i,rejected:u,synchronous:c?c.synchronous:!1,runWhen:c?c.runWhen:null}),this.handlers.length-1}eject(i){this.handlers[i]&&(this.handlers[i]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(i){N.forEach(this.handlers,function(c){c!==null&&i(c)})}}const ed={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cm=typeof URLSearchParams<"u"?URLSearchParams:xi,_m=typeof FormData<"u"?FormData:null,Pm=typeof Blob<"u"?Blob:null,Rm={isBrowser:!0,classes:{URLSearchParams:Cm,FormData:_m,Blob:Pm},protocols:["http","https","file","blob","url","data"]},wi=typeof window<"u"&&typeof document<"u",pi=typeof navigator=="object"&&navigator||void 0,Tm=wi&&(!pi||["ReactNative","NativeScript","NS"].indexOf(pi.product)<0),Om=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lm=wi&&window.location.href||"http://localhost",zm=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wi,hasStandardBrowserEnv:Tm,hasStandardBrowserWebWorkerEnv:Om,navigator:pi,origin:Lm},Symbol.toStringTag,{value:"Module"})),He={...zm,...Rm};function Am(s,i){return so(s,new He.classes.URLSearchParams,{visitor:function(u,c,f,m){return He.isNode&&N.isBuffer(u)?(this.append(c,u.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)},...i})}function Fm(s){return N.matchAll(/\w+|\[(\w*)]/g,s).map(i=>i[0]==="[]"?"":i[1]||i[0])}function Dm(s){const i={},u=Object.keys(s);let c;const f=u.length;let m;for(c=0;c=u.length;return y=!y&&N.isArray(f)?f.length:y,E?(N.hasOwnProp(f,y)?f[y]=[f[y],c]:f[y]=c,!w):((!f[y]||!N.isObject(f[y]))&&(f[y]=[]),i(u,c,f[y],m)&&N.isArray(f[y])&&(f[y]=Dm(f[y])),!w)}if(N.isFormData(s)&&N.isFunction(s.entries)){const u={};return N.forEachEntry(s,(c,f)=>{i(Fm(c),f,u,0)}),u}return null}function Mm(s,i,u){if(N.isString(s))try{return(i||JSON.parse)(s),N.trim(s)}catch(c){if(c.name!=="SyntaxError")throw c}return(u||JSON.stringify)(s)}const Br={transitional:ed,adapter:["xhr","http","fetch"],transformRequest:[function(i,u){const c=u.getContentType()||"",f=c.indexOf("application/json")>-1,m=N.isObject(i);if(m&&N.isHTMLForm(i)&&(i=new FormData(i)),N.isFormData(i))return f?JSON.stringify(td(i)):i;if(N.isArrayBuffer(i)||N.isBuffer(i)||N.isStream(i)||N.isFile(i)||N.isBlob(i)||N.isReadableStream(i))return i;if(N.isArrayBufferView(i))return i.buffer;if(N.isURLSearchParams(i))return u.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),i.toString();let w;if(m){if(c.indexOf("application/x-www-form-urlencoded")>-1)return Am(i,this.formSerializer).toString();if((w=N.isFileList(i))||c.indexOf("multipart/form-data")>-1){const E=this.env&&this.env.FormData;return so(w?{"files[]":i}:i,E&&new E,this.formSerializer)}}return m||f?(u.setContentType("application/json",!1),Mm(i)):i}],transformResponse:[function(i){const u=this.transitional||Br.transitional,c=u&&u.forcedJSONParsing,f=this.responseType==="json";if(N.isResponse(i)||N.isReadableStream(i))return i;if(i&&N.isString(i)&&(c&&!this.responseType||f)){const y=!(u&&u.silentJSONParsing)&&f;try{return JSON.parse(i)}catch(w){if(y)throw w.name==="SyntaxError"?Y.from(w,Y.ERR_BAD_RESPONSE,this,null,this.response):w}}return i}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(i){return i>=200&&i<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],s=>{Br.headers[s]={}});const Im=N.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"]),Um=s=>{const i={};let u,c,f;return s&&s.split(` `).forEach(function(y){f=y.indexOf(":"),u=y.substring(0,f).trim().toLowerCase(),c=y.substring(f+1).trim(),!(!u||i[u]&&Im[u])&&(u==="set-cookie"?i[u]?i[u].push(c):i[u]=[c]:i[u]=i[u]?i[u]+", "+c:c)}),i},Rc=Symbol("internals");function Fr(s){return s&&String(s).trim().toLowerCase()}function Zl(s){return s===!1||s==null?s:N.isArray(s)?s.map(Zl):String(s)}function Bm(s){const i=Object.create(null),u=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let c;for(;c=u.exec(s);)i[c[1]]=c[2];return i}const bm=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function ui(s,i,u,c,f){if(N.isFunction(c))return c.call(this,i,u);if(f&&(i=u),!!N.isString(i)){if(N.isString(c))return i.indexOf(c)!==-1;if(N.isRegExp(c))return c.test(i)}}function Hm(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(i,u,c)=>u.toUpperCase()+c)}function $m(s,i){const u=N.toCamelCase(" "+i);["get","set","has"].forEach(c=>{Object.defineProperty(s,c+u,{value:function(f,m,y){return this[c].call(this,i,f,m,y)},configurable:!0})})}let Ze=class{constructor(i){i&&this.set(i)}set(i,u,c){const f=this;function m(w,E,_){const j=Fr(E);if(!j)throw new Error("header name must be a non-empty string");const A=N.findKey(f,j);(!A||f[A]===void 0||_===!0||_===void 0&&f[A]!==!1)&&(f[A||E]=Zl(w))}const y=(w,E)=>N.forEach(w,(_,j)=>m(_,j,E));if(N.isPlainObject(i)||i instanceof this.constructor)y(i,u);else if(N.isString(i)&&(i=i.trim())&&!bm(i))y(Um(i),u);else if(N.isObject(i)&&N.isIterable(i)){let w={},E,_;for(const j of i){if(!N.isArray(j))throw TypeError("Object iterator must return a key-value pair");w[_=j[0]]=(E=w[_])?N.isArray(E)?[...E,j[1]]:[E,j[1]]:j[1]}y(w,u)}else i!=null&&m(u,i,c);return this}get(i,u){if(i=Fr(i),i){const c=N.findKey(this,i);if(c){const f=this[c];if(!u)return f;if(u===!0)return Bm(f);if(N.isFunction(u))return u.call(this,f,c);if(N.isRegExp(u))return u.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(i,u){if(i=Fr(i),i){const c=N.findKey(this,i);return!!(c&&this[c]!==void 0&&(!u||ui(this,this[c],c,u)))}return!1}delete(i,u){const c=this;let f=!1;function m(y){if(y=Fr(y),y){const w=N.findKey(c,y);w&&(!u||ui(c,c[w],w,u))&&(delete c[w],f=!0)}}return N.isArray(i)?i.forEach(m):m(i),f}clear(i){const u=Object.keys(this);let c=u.length,f=!1;for(;c--;){const m=u[c];(!i||ui(this,this[m],m,i,!0))&&(delete this[m],f=!0)}return f}normalize(i){const u=this,c={};return N.forEach(this,(f,m)=>{const y=N.findKey(c,m);if(y){u[y]=Zl(f),delete u[m];return}const w=i?Hm(m):String(m).trim();w!==m&&delete u[m],u[w]=Zl(f),c[w]=!0}),this}concat(...i){return this.constructor.concat(this,...i)}toJSON(i){const u=Object.create(null);return N.forEach(this,(c,f)=>{c!=null&&c!==!1&&(u[f]=i&&N.isArray(c)?c.join(", "):c)}),u}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([i,u])=>i+": "+u).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(i){return i instanceof this?i:new this(i)}static concat(i,...u){const c=new this(i);return u.forEach(f=>c.set(f)),c}static accessor(i){const c=(this[Rc]=this[Rc]={accessors:{}}).accessors,f=this.prototype;function m(y){const w=Fr(y);c[w]||($m(f,y),c[w]=!0)}return N.isArray(i)?i.forEach(m):m(i),this}};Ze.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors(Ze.prototype,({value:s},i)=>{let u=i[0].toUpperCase()+i.slice(1);return{get:()=>s,set(c){this[u]=c}}});N.freezeMethods(Ze);function ai(s,i){const u=this||Br,c=i||u,f=Ze.from(c.headers);let m=c.data;return N.forEach(s,function(w){m=w.call(u,m,f.normalize(),i?i.status:void 0)}),f.normalize(),m}function nd(s){return!!(s&&s.__CANCEL__)}function Kn(s,i,u){Y.call(this,s??"canceled",Y.ERR_CANCELED,i,u),this.name="CanceledError"}N.inherits(Kn,Y,{__CANCEL__:!0});function rd(s,i,u){const c=u.config.validateStatus;!u.status||!c||c(u.status)?s(u):i(new Y("Request failed with status code "+u.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(u.status/100)-4],u.config,u.request,u))}function Vm(s){const i=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return i&&i[1]||""}function Wm(s,i){s=s||10;const u=new Array(s),c=new Array(s);let f=0,m=0,y;return i=i!==void 0?i:1e3,function(E){const _=Date.now(),j=c[m];y||(y=_),u[f]=E,c[f]=_;let A=m,U=0;for(;A!==f;)U+=u[A++],A=A%s;if(f=(f+1)%s,f===m&&(m=(m+1)%s),_-y{u=j,f=null,m&&(clearTimeout(m),m=null),s(..._)};return[(..._)=>{const j=Date.now(),A=j-u;A>=c?y(_,j):(f=_,m||(m=setTimeout(()=>{m=null,y(f)},c-A)))},()=>f&&y(f)]}const to=(s,i,u=3)=>{let c=0;const f=Wm(50,250);return qm(m=>{const y=m.loaded,w=m.lengthComputable?m.total:void 0,E=y-c,_=f(E),j=y<=w;c=y;const A={loaded:y,total:w,progress:w?y/w:void 0,bytes:E,rate:_||void 0,estimated:_&&w&&j?(w-y)/_:void 0,event:m,lengthComputable:w!=null,[i?"download":"upload"]:!0};s(A)},u)},Tc=(s,i)=>{const u=s!=null;return[c=>i[0]({lengthComputable:u,total:s,loaded:c}),i[1]]},Oc=s=>(...i)=>N.asap(()=>s(...i)),Qm=He.hasStandardBrowserEnv?((s,i)=>u=>(u=new URL(u,He.origin),s.protocol===u.protocol&&s.host===u.host&&(i||s.port===u.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,Km=He.hasStandardBrowserEnv?{write(s,i,u,c,f,m){const y=[s+"="+encodeURIComponent(i)];N.isNumber(u)&&y.push("expires="+new Date(u).toGMTString()),N.isString(c)&&y.push("path="+c),N.isString(f)&&y.push("domain="+f),m===!0&&y.push("secure"),document.cookie=y.join("; ")},read(s){const i=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Xm(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Jm(s,i){return i?s.replace(/\/?\/$/,"")+"/"+i.replace(/^\/+/,""):s}function ld(s,i,u){let c=!Xm(i);return s&&(c||u==!1)?Jm(s,i):i}const Lc=s=>s instanceof Ze?{...s}:s;function Sn(s,i){i=i||{};const u={};function c(_,j,A,U){return N.isPlainObject(_)&&N.isPlainObject(j)?N.merge.call({caseless:U},_,j):N.isPlainObject(j)?N.merge({},j):N.isArray(j)?j.slice():j}function f(_,j,A,U){if(N.isUndefined(j)){if(!N.isUndefined(_))return c(void 0,_,A,U)}else return c(_,j,A,U)}function m(_,j){if(!N.isUndefined(j))return c(void 0,j)}function y(_,j){if(N.isUndefined(j)){if(!N.isUndefined(_))return c(void 0,_)}else return c(void 0,j)}function w(_,j,A){if(A in i)return c(_,j);if(A in s)return c(void 0,_)}const E={url:m,method:m,data:m,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:w,headers:(_,j,A)=>f(Lc(_),Lc(j),A,!0)};return N.forEach(Object.keys({...s,...i}),function(j){const A=E[j]||f,U=A(s[j],i[j],j);N.isUndefined(U)&&A!==w||(u[j]=U)}),u}const od=s=>{const i=Sn({},s);let{data:u,withXSRFToken:c,xsrfHeaderName:f,xsrfCookieName:m,headers:y,auth:w}=i;i.headers=y=Ze.from(y),i.url=Zc(ld(i.baseURL,i.url,i.allowAbsoluteUrls),s.params,s.paramsSerializer),w&&y.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let E;if(N.isFormData(u)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((E=y.getContentType())!==!1){const[_,...j]=E?E.split(";").map(A=>A.trim()).filter(Boolean):[];y.setContentType([_||"multipart/form-data",...j].join("; "))}}if(He.hasStandardBrowserEnv&&(c&&N.isFunction(c)&&(c=c(i)),c||c!==!1&&Qm(i.url))){const _=f&&m&&Km.read(m);_&&y.set(f,_)}return i},Ym=typeof XMLHttpRequest<"u",Gm=Ym&&function(s){return new Promise(function(u,c){const f=od(s);let m=f.data;const y=Ze.from(f.headers).normalize();let{responseType:w,onUploadProgress:E,onDownloadProgress:_}=f,j,A,U,G,R;function C(){G&&G(),R&&R(),f.cancelToken&&f.cancelToken.unsubscribe(j),f.signal&&f.signal.removeEventListener("abort",j)}let P=new XMLHttpRequest;P.open(f.method.toUpperCase(),f.url,!0),P.timeout=f.timeout;function Q(){if(!P)return;const oe=Ze.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),pe={data:!w||w==="text"||w==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:oe,config:s,request:P};rd(function(H){u(H),C()},function(H){c(H),C()},pe),P=null}"onloadend"in P?P.onloadend=Q:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(Q)},P.onabort=function(){P&&(c(new Y("Request aborted",Y.ECONNABORTED,s,P)),P=null)},P.onerror=function(){c(new Y("Network Error",Y.ERR_NETWORK,s,P)),P=null},P.ontimeout=function(){let fe=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded";const pe=f.transitional||ed;f.timeoutErrorMessage&&(fe=f.timeoutErrorMessage),c(new Y(fe,pe.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,s,P)),P=null},m===void 0&&y.setContentType(null),"setRequestHeader"in P&&N.forEach(y.toJSON(),function(fe,pe){P.setRequestHeader(pe,fe)}),N.isUndefined(f.withCredentials)||(P.withCredentials=!!f.withCredentials),w&&w!=="json"&&(P.responseType=f.responseType),_&&([U,R]=to(_,!0),P.addEventListener("progress",U)),E&&P.upload&&([A,G]=to(E),P.upload.addEventListener("progress",A),P.upload.addEventListener("loadend",G)),(f.cancelToken||f.signal)&&(j=oe=>{P&&(c(!oe||oe.type?new Kn(null,s,P):oe),P.abort(),P=null)},f.cancelToken&&f.cancelToken.subscribe(j),f.signal&&(f.signal.aborted?j():f.signal.addEventListener("abort",j)));const ne=Vm(f.url);if(ne&&He.protocols.indexOf(ne)===-1){c(new Y("Unsupported protocol "+ne+":",Y.ERR_BAD_REQUEST,s));return}P.send(m||null)})},Zm=(s,i)=>{const{length:u}=s=s?s.filter(Boolean):[];if(i||u){let c=new AbortController,f;const m=function(_){if(!f){f=!0,w();const j=_ instanceof Error?_:this.reason;c.abort(j instanceof Y?j:new Kn(j instanceof Error?j.message:j))}};let y=i&&setTimeout(()=>{y=null,m(new Y(`timeout ${i} of ms exceeded`,Y.ETIMEDOUT))},i);const w=()=>{s&&(y&&clearTimeout(y),y=null,s.forEach(_=>{_.unsubscribe?_.unsubscribe(m):_.removeEventListener("abort",m)}),s=null)};s.forEach(_=>_.addEventListener("abort",m));const{signal:E}=c;return E.unsubscribe=()=>N.asap(w),E}},eh=function*(s,i){let u=s.byteLength;if(u{const f=th(s,i);let m=0,y,w=E=>{y||(y=!0,c&&c(E))};return new ReadableStream({async pull(E){try{const{done:_,value:j}=await f.next();if(_){w(),E.close();return}let A=j.byteLength;if(u){let U=m+=A;u(U)}E.enqueue(new Uint8Array(j))}catch(_){throw w(_),_}},cancel(E){return w(E),f.return()}},{highWaterMark:2})},io=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",sd=io&&typeof ReadableStream=="function",rh=io&&(typeof TextEncoder=="function"?(s=>i=>s.encode(i))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),id=(s,...i)=>{try{return!!s(...i)}catch{return!1}},lh=sd&&id(()=>{let s=!1;const i=new Request(He.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!i}),Ac=64*1024,mi=sd&&id(()=>N.isReadableStream(new Response("").body)),no={stream:mi&&(s=>s.body)};io&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!no[i]&&(no[i]=N.isFunction(s[i])?u=>u[i]():(u,c)=>{throw new Y(`Response type '${i}' is not supported`,Y.ERR_NOT_SUPPORT,c)})})})(new Response);const oh=async s=>{if(s==null)return 0;if(N.isBlob(s))return s.size;if(N.isSpecCompliantForm(s))return(await new Request(He.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(N.isArrayBufferView(s)||N.isArrayBuffer(s))return s.byteLength;if(N.isURLSearchParams(s)&&(s=s+""),N.isString(s))return(await rh(s)).byteLength},sh=async(s,i)=>{const u=N.toFiniteNumber(s.getContentLength());return u??oh(i)},ih=io&&(async s=>{let{url:i,method:u,data:c,signal:f,cancelToken:m,timeout:y,onDownloadProgress:w,onUploadProgress:E,responseType:_,headers:j,withCredentials:A="same-origin",fetchOptions:U}=od(s);_=_?(_+"").toLowerCase():"text";let G=Zm([f,m&&m.toAbortSignal()],y),R;const C=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let P;try{if(E&&lh&&u!=="get"&&u!=="head"&&(P=await sh(j,c))!==0){let pe=new Request(i,{method:"POST",body:c,duplex:"half"}),ae;if(N.isFormData(c)&&(ae=pe.headers.get("content-type"))&&j.setContentType(ae),pe.body){const[H,J]=Tc(P,to(Oc(E)));c=zc(pe.body,Ac,H,J)}}N.isString(A)||(A=A?"include":"omit");const Q="credentials"in Request.prototype;R=new Request(i,{...U,signal:G,method:u.toUpperCase(),headers:j.normalize().toJSON(),body:c,duplex:"half",credentials:Q?A:void 0});let ne=await fetch(R,U);const oe=mi&&(_==="stream"||_==="response");if(mi&&(w||oe&&C)){const pe={};["status","statusText","headers"].forEach(me=>{pe[me]=ne[me]});const ae=N.toFiniteNumber(ne.headers.get("content-length")),[H,J]=w&&Tc(ae,to(Oc(w),!0))||[];ne=new Response(zc(ne.body,Ac,H,()=>{J&&J(),C&&C()}),pe)}_=_||"text";let fe=await no[N.findKey(no,_)||"text"](ne,s);return!oe&&C&&C(),await new Promise((pe,ae)=>{rd(pe,ae,{data:fe,headers:Ze.from(ne.headers),status:ne.status,statusText:ne.statusText,config:s,request:R})})}catch(Q){throw C&&C(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,s,R),{cause:Q.cause||Q}):Y.from(Q,Q&&Q.code,s,R)}}),hi={http:km,xhr:Gm,fetch:ih};N.forEach(hi,(s,i)=>{if(s){try{Object.defineProperty(s,"name",{value:i})}catch{}Object.defineProperty(s,"adapterName",{value:i})}});const Fc=s=>`- ${s}`,uh=s=>N.isFunction(s)||s===null||s===!1,ud={getAdapter:s=>{s=N.isArray(s)?s:[s];const{length:i}=s;let u,c;const f={};for(let m=0;m`adapter ${w} `+(E===!1?"is not supported by the environment":"is not available in the build"));let y=i?m.length>1?`since : `+m.map(Fc).join(` `):" "+Fc(m[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return c},adapters:hi};function ci(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Kn(null,s)}function Dc(s){return ci(s),s.headers=Ze.from(s.headers),s.data=ai.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),ud.getAdapter(s.adapter||Br.adapter)(s).then(function(c){return ci(s),c.data=ai.call(s,s.transformResponse,c),c.headers=Ze.from(c.headers),c},function(c){return nd(c)||(ci(s),c&&c.response&&(c.response.data=ai.call(s,s.transformResponse,c.response),c.response.headers=Ze.from(c.response.headers))),Promise.reject(c)})}const ad="1.11.0",uo={};["object","boolean","number","function","string","symbol"].forEach((s,i)=>{uo[s]=function(c){return typeof c===s||"a"+(i<1?"n ":" ")+s}});const Mc={};uo.transitional=function(i,u,c){function f(m,y){return"[Axios v"+ad+"] Transitional option '"+m+"'"+y+(c?". "+c:"")}return(m,y,w)=>{if(i===!1)throw new Y(f(y," has been removed"+(u?" in "+u:"")),Y.ERR_DEPRECATED);return u&&!Mc[y]&&(Mc[y]=!0,console.warn(f(y," has been deprecated since v"+u+" and will be removed in the near future"))),i?i(m,y,w):!0}};uo.spelling=function(i){return(u,c)=>(console.warn(`${c} is likely a misspelling of ${i}`),!0)};function ah(s,i,u){if(typeof s!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const c=Object.keys(s);let f=c.length;for(;f-- >0;){const m=c[f],y=i[m];if(y){const w=s[m],E=w===void 0||y(w,m,s);if(E!==!0)throw new Y("option "+m+" must be "+E,Y.ERR_BAD_OPTION_VALUE);continue}if(u!==!0)throw new Y("Unknown option "+m,Y.ERR_BAD_OPTION)}}const eo={assertOptions:ah,validators:uo},Rt=eo.validators;let wn=class{constructor(i){this.defaults=i||{},this.interceptors={request:new Pc,response:new Pc}}async request(i,u){try{return await this._request(i,u)}catch(c){if(c instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const m=f.stack?f.stack.replace(/^.+\n/,""):"";try{c.stack?m&&!String(c.stack).endsWith(m.replace(/^.+\n.+\n/,""))&&(c.stack+=` `+m):c.stack=m}catch{}}throw c}}_request(i,u){typeof i=="string"?(u=u||{},u.url=i):u=i||{},u=Sn(this.defaults,u);const{transitional:c,paramsSerializer:f,headers:m}=u;c!==void 0&&eo.assertOptions(c,{silentJSONParsing:Rt.transitional(Rt.boolean),forcedJSONParsing:Rt.transitional(Rt.boolean),clarifyTimeoutError:Rt.transitional(Rt.boolean)},!1),f!=null&&(N.isFunction(f)?u.paramsSerializer={serialize:f}:eo.assertOptions(f,{encode:Rt.function,serialize:Rt.function},!0)),u.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?u.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:u.allowAbsoluteUrls=!0),eo.assertOptions(u,{baseUrl:Rt.spelling("baseURL"),withXsrfToken:Rt.spelling("withXSRFToken")},!0),u.method=(u.method||this.defaults.method||"get").toLowerCase();let y=m&&N.merge(m.common,m[u.method]);m&&N.forEach(["delete","get","head","post","put","patch","common"],R=>{delete m[R]}),u.headers=Ze.concat(y,m);const w=[];let E=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(u)===!1||(E=E&&C.synchronous,w.unshift(C.fulfilled,C.rejected))});const _=[];this.interceptors.response.forEach(function(C){_.push(C.fulfilled,C.rejected)});let j,A=0,U;if(!E){const R=[Dc.bind(this),void 0];for(R.unshift(...w),R.push(..._),U=R.length,j=Promise.resolve(u);A{if(!c._listeners)return;let m=c._listeners.length;for(;m-- >0;)c._listeners[m](f);c._listeners=null}),this.promise.then=f=>{let m;const y=new Promise(w=>{c.subscribe(w),m=w}).then(f);return y.cancel=function(){c.unsubscribe(m)},y},i(function(m,y,w){c.reason||(c.reason=new Kn(m,y,w),u(c.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(i){if(this.reason){i(this.reason);return}this._listeners?this._listeners.push(i):this._listeners=[i]}unsubscribe(i){if(!this._listeners)return;const u=this._listeners.indexOf(i);u!==-1&&this._listeners.splice(u,1)}toAbortSignal(){const i=new AbortController,u=c=>{i.abort(c)};return this.subscribe(u),i.signal.unsubscribe=()=>this.unsubscribe(u),i.signal}static source(){let i;return{token:new cd(function(f){i=f}),cancel:i}}};function dh(s){return function(u){return s.apply(null,u)}}function fh(s){return N.isObject(s)&&s.isAxiosError===!0}const yi={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(yi).forEach(([s,i])=>{yi[i]=s});function dd(s){const i=new wn(s),u=bc(wn.prototype.request,i);return N.extend(u,wn.prototype,i,{allOwnKeys:!0}),N.extend(u,i,null,{allOwnKeys:!0}),u.create=function(f){return dd(Sn(s,f))},u}const Pe=dd(Br);Pe.Axios=wn;Pe.CanceledError=Kn;Pe.CancelToken=ch;Pe.isCancel=nd;Pe.VERSION=ad;Pe.toFormData=so;Pe.AxiosError=Y;Pe.Cancel=Pe.CanceledError;Pe.all=function(i){return Promise.all(i)};Pe.spread=dh;Pe.isAxiosError=fh;Pe.mergeConfig=Sn;Pe.AxiosHeaders=Ze;Pe.formToJSON=s=>td(N.isHTMLForm(s)?new FormData(s):s);Pe.getAdapter=ud.getAdapter;Pe.HttpStatusCode=yi;Pe.default=Pe;const{Axios:Sh,AxiosError:kh,CanceledError:Nh,isCancel:Eh,CancelToken:jh,VERSION:Ch,all:_h,Cancel:Ph,isAxiosError:Rh,spread:Th,toFormData:Oh,AxiosHeaders:Lh,HttpStatusCode:zh,formToJSON:Ah,getAdapter:Fh,mergeConfig:Dh}=Pe,It=Pe.create({baseURL:"http://localhost:8080/api",withCredentials:!0}),ph=({onLogin:s})=>{const[i,u]=re.useState(""),[c,f]=re.useState(""),[m,y]=re.useState(""),[w,E]=re.useState(!1),_=async j=>{j.preventDefault(),E(!0),y("");try{const A=await It.post("/admin/login",{email:i,password:c});A.data.success?(localStorage.setItem("adminAuth","true"),s(!0)):(y(A.data.message||"Login failed"),s(!1))}catch(A){const U=A.response?.data?.message||"Login failed. Please try again.";y(U),s(!1)}finally{E(!1)}};return d.jsx("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 flex items-center justify-center px-4",children:d.jsx("div",{className:"max-w-md w-full",children:d.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-8",children:[d.jsxs("div",{className:"text-center mb-8",children:[d.jsx("div",{className:"mx-auto w-16 h-16 bg-blue-600 rounded-full flex items-center justify-center mb-4",children:d.jsx(Op,{className:"w-8 h-8 text-white"})}),d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Admin Dashboard"}),d.jsx("p",{className:"text-gray-600",children:"Sign in to manage your e-commerce store"})]}),d.jsxs("form",{onSubmit:_,className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email Address"}),d.jsxs("div",{className:"relative",children:[d.jsx(_p,{className:"absolute left-3 top-3 w-5 h-5 text-gray-400"}),d.jsx("input",{id:"email",type:"email",value:i,onChange:j=>u(j.target.value),className:"w-full pl-12 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200",placeholder:"Enter your email",required:!0})]})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-2",children:"Password"}),d.jsxs("div",{className:"relative",children:[d.jsx(jp,{className:"absolute left-3 top-3 w-5 h-5 text-gray-400"}),d.jsx("input",{id:"password",type:"password",value:c,onChange:j=>f(j.target.value),className:"w-full pl-12 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200",placeholder:"Enter your password",required:!0})]})]}),m&&d.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:d.jsx("p",{className:"text-red-700 text-sm",children:m})}),d.jsx("button",{type:"submit",disabled:w,className:"w-full bg-blue-600 text-white py-3 px-4 rounded-lg hover:bg-blue-700 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all duration-200 font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:w?"Signing in...":"Sign In"})]}),d.jsx("div",{className:"mt-6 text-center",children:d.jsx("p",{className:"text-xs text-gray-500",children:"Demo credentials: sahilchahal126@gmail.com / 123456789"})})]})})})},mh=({activeSection:s,setActiveSection:i,onLogout:u})=>{const c=[{id:"dashboard",label:"Dashboard",icon:wp},{id:"add-product",label:"Add Product",icon:Rp},{id:"products",label:"All Products",icon:ln},{id:"orders",label:"Orders",icon:Bc}];return d.jsxs("div",{className:"w-64 bg-white h-screen shadow-lg flex flex-col",children:[d.jsxs("div",{className:"p-6 border-b border-gray-200",children:[d.jsx("h1",{className:"text-xl font-bold text-gray-800",children:"Admin Panel"}),d.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"E-commerce Management"})]}),d.jsx("nav",{className:"flex-1 p-4 space-y-2",children:c.map(f=>{const m=f.icon;return d.jsxs("button",{onClick:()=>i(f.id),className:`w-full flex items-center space-x-3 px-4 py-3 rounded-lg text-left transition-all duration-200 ${s===f.id?"bg-blue-50 text-blue-700 border-l-4 border-blue-700":"text-gray-700 hover:bg-gray-50 hover:text-gray-900"}`,children:[d.jsx(m,{className:"w-5 h-5"}),d.jsx("span",{className:"font-medium",children:f.label})]},f.id)})}),d.jsx("div",{className:"p-4 border-t border-gray-200",children:d.jsxs("button",{onClick:u,className:"w-full flex items-center space-x-3 px-4 py-3 text-red-600 hover:bg-red-50 rounded-lg transition-all duration-200",children:[d.jsx(Cp,{className:"w-5 h-5"}),d.jsx("span",{className:"font-medium",children:"Logout"})]})})]})},Ic=()=>{const[s,i]=re.useState({products:{total:0,lowStock:0},orders:{total:0,pending:0,processing:0,shipped:0,delivered:0,cancelled:0},revenue:{total:0}}),[u,c]=re.useState(!0),[f,m]=re.useState(null);re.useEffect(()=>{(async()=>{try{c(!0),m(null);const E=await It.get("/admin/dashboard/stats");E.data.success?i(E.data.stats):m("Failed to fetch dashboard stats")}catch(E){console.error("Error fetching dashboard stats:",E),m(E.response?.data?.message||"Failed to fetch dashboard stats")}finally{c(!1)}})()},[]);const y=[{label:"Total Products",value:s.products.total,icon:ln,color:"bg-blue-500",bgColor:"bg-blue-50"},{label:"Total Orders",value:s.orders.total,icon:Bc,color:"bg-green-500",bgColor:"bg-green-50"},{label:"Revenue",value:`$${s.revenue.total.toFixed(2)}`,icon:kp,color:"bg-yellow-500",bgColor:"bg-yellow-50"},{label:"Pending Orders",value:s.orders.pending,icon:Fp,color:"bg-orange-500",bgColor:"bg-orange-50"}];return u?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Dashboard Overview"}),d.jsx("p",{className:"text-gray-600",children:"Loading dashboard data..."})]}),d.jsx("div",{className:"flex items-center justify-center py-12",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})})]}):f?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Dashboard Overview"}),d.jsx("p",{className:"text-gray-600",children:"Error loading dashboard data"})]}),d.jsxs("div",{className:"text-center py-12",children:[d.jsx("p",{className:"text-red-600 mb-4",children:f}),d.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors duration-200",children:"Try Again"})]})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Dashboard Overview"}),d.jsx("p",{className:"text-gray-600",children:"Welcome back! Here's what's happening with your store."})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:y.map((w,E)=>{const _=w.icon;return d.jsx("div",{className:`${w.bgColor} rounded-xl p-6 border border-gray-100`,children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-600 mb-1",children:w.label}),d.jsx("p",{className:"text-2xl font-bold text-gray-900",children:w.value})]}),d.jsx("div",{className:`${w.color} p-3 rounded-lg`,children:d.jsx(_,{className:"w-6 h-6 text-white"})})]})},E)})}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Order Status Overview"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex justify-between items-center p-3 bg-yellow-50 rounded-lg",children:[d.jsx("span",{className:"text-sm font-medium text-yellow-800",children:"Pending"}),d.jsx("span",{className:"text-lg font-bold text-yellow-900",children:s.orders.pending})]}),d.jsxs("div",{className:"flex justify-between items-center p-3 bg-blue-50 rounded-lg",children:[d.jsx("span",{className:"text-sm font-medium text-blue-800",children:"Processing"}),d.jsx("span",{className:"text-lg font-bold text-blue-900",children:s.orders.processing})]}),d.jsxs("div",{className:"flex justify-between items-center p-3 bg-purple-50 rounded-lg",children:[d.jsx("span",{className:"text-sm font-medium text-purple-800",children:"Shipped"}),d.jsx("span",{className:"text-lg font-bold text-purple-900",children:s.orders.shipped})]}),d.jsxs("div",{className:"flex justify-between items-center p-3 bg-green-50 rounded-lg",children:[d.jsx("span",{className:"text-sm font-medium text-green-800",children:"Delivered"}),d.jsx("span",{className:"text-lg font-bold text-green-900",children:s.orders.delivered})]})]})]}),d.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quick Actions"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("button",{className:"w-full text-left p-3 bg-blue-50 hover:bg-blue-100 rounded-lg transition-colors duration-200",children:[d.jsx("p",{className:"font-medium text-blue-700",children:"Add New Product"}),d.jsx("p",{className:"text-sm text-blue-600",children:"Expand your inventory"})]}),d.jsxs("button",{className:"w-full text-left p-3 bg-green-50 hover:bg-green-100 rounded-lg transition-colors duration-200",children:[d.jsx("p",{className:"font-medium text-green-700",children:"View Orders"}),d.jsx("p",{className:"text-sm text-green-600",children:"Manage customer orders"})]})]})]})]})]})},hh=({onAddProduct:s})=>{const[i,u]=re.useState({name:"",category:"",price:"",description:"",quantity:"",size:"500g",sizeOption:"500g",sizeCustom:""}),[c,f]=re.useState(null),[m,y]=re.useState(""),[w,E]=re.useState({}),[_,j]=re.useState(!1),[A,U]=re.useState(!1),[G,R]=re.useState(!1),C=[{label:"Electronics",value:"electronics"},{label:"Clothing",value:"clothing"},{label:"Home & Garden",value:"home and garden"},{label:"Sports",value:"sports"},{label:"Books",value:"books"},{label:"Beauty",value:"beauty"},{label:"Automotive",value:"automotive"},{label:"Toys",value:"toys"},{label:"Health",value:"health"},{label:"Other",value:"other"}],P=["250g","500g","1kg","small","medium","large","other"],Q=()=>{const H={};return i.name.trim()||(H.name="Product name is required"),i.category||(H.category="Category is required"),(!i.price||parseFloat(i.price)<=0)&&(H.price="Valid price is required"),i.description.trim()||(H.description="Description is required"),(!i.quantity||parseInt(i.quantity)<0)&&(H.quantity="Valid quantity is required"),c||(H.image="Product image is required"),E(H),Object.keys(H).length===0},ne=H=>{const J=H.target.files?.[0];if(J){if(J.size>5*1024*1024){E(he=>({...he,image:"Image size must be less than 5MB"}));return}if(!J.type.startsWith("image/")){E(he=>({...he,image:"Please select a valid image file"}));return}f(J),E(he=>({...he,image:""}));const me=new FileReader;me.onload=he=>{y(he.target?.result)},me.readAsDataURL(J)}},oe=()=>{f(null),y("");const H=document.getElementById("image-upload");H&&(H.value="")},fe=async H=>{try{const J=await It.post("/admin/upload/product-image",{fileName:H.name,contentType:H.type}),{url:me,key:he}=J.data;return new FormData().append("file",H),await fetch(me,{method:"PUT",body:H,headers:{"Content-Type":H.type}}),he}catch(J){throw console.error("Image upload error:",J),new Error("Failed to upload image")}},pe=async H=>{if(H.preventDefault(),!!Q()){R(!0),U(!0);try{let J="";c&&(J=await fe(c),U(!1));const me={name:i.name,category:i.category,price:parseFloat(i.price),description:i.description,quantity:parseInt(i.quantity),size:i.sizeOption==="other"?i.sizeCustom:i.sizeOption,imageKey:J},he=await It.post("/admin/products",me);if(he.data.success){const St={...me,imageUrl:`/${J}`,productId:he.data.product.productId};s(St),u({name:"",category:"",price:"",description:"",quantity:""}),f(null),y(""),E({}),j(!0),setTimeout(()=>j(!1),3e3)}}catch(J){console.error("Product creation error:",J);const me=J.response?.data?.message||"Failed to create product";E({submit:me})}finally{R(!1),U(!1)}}},ae=H=>{const{name:J,value:me}=H.target;u(he=>({...he,[J]:me})),w[J]&&E(he=>({...he,[J]:""}))};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Add New Product"}),d.jsx("p",{className:"text-gray-600",children:"Fill in the details below to add a new product to your store."})]}),_&&d.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:d.jsx("p",{className:"text-green-700 font-medium",children:"Product added successfully!"})}),w.submit&&d.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:d.jsx("p",{className:"text-red-700 font-medium",children:w.submit})}),A&&d.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:d.jsx("p",{className:"text-blue-700 font-medium",children:"Uploading image..."})}),d.jsx("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:d.jsxs("form",{onSubmit:pe,className:"space-y-6",children:[d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Product Name *"}),d.jsx("input",{id:"name",name:"name",type:"text",value:i.name,onChange:ae,className:`w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 ${w.name?"border-red-300":"border-gray-300"}`,placeholder:"Enter product name"}),w.name&&d.jsx("p",{className:"mt-1 text-sm text-red-600",children:w.name})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 mb-2",children:"Category *"}),d.jsxs("select",{id:"category",name:"category",value:i.category,onChange:ae,className:`w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 ${w.category?"border-red-300":"border-gray-300"}`,children:[d.jsx("option",{value:"",children:"Select a category"}),C.map(H=>d.jsx("option",{value:H.value,children:H.label},H.value))]}),w.category&&d.jsx("p",{className:"mt-1 text-sm text-red-600",children:w.category})]})]}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"price",className:"block text-sm font-medium text-gray-700 mb-2",children:"Price ($) *"}),d.jsx("input",{id:"price",name:"price",type:"number",step:"0.01",min:"0",value:i.price,onChange:ae,className:`w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 ${w.price?"border-red-300":"border-gray-300"}`,placeholder:"0.00"}),w.price&&d.jsx("p",{className:"mt-1 text-sm text-red-600",children:w.price})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"quantity",className:"block text-sm font-medium text-gray-700 mb-2",children:"Quantity *"}),d.jsx("input",{id:"quantity",name:"quantity",type:"number",min:"0",value:i.quantity,onChange:ae,className:`w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 ${w.quantity?"border-red-300":"border-gray-300"}`,placeholder:"0"}),w.quantity&&d.jsx("p",{className:"mt-1 text-sm text-red-600",children:w.quantity})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"size",className:"block text-sm font-medium text-gray-700 mb-2",children:"Size"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("select",{id:"size",name:"sizeOption",value:i.sizeOption,onChange:H=>{const J=H.target.value;u(me=>({...me,sizeOption:J,size:J==="other"?me.sizeCustom||"":J}))},className:"w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 border-gray-300",children:P.map(H=>d.jsx("option",{value:H,children:H},H))}),i.sizeOption==="other"&&d.jsx("input",{type:"text",placeholder:"Enter custom size (e.g., 750g, small, etc.)",value:i.sizeCustom,onChange:H=>u(J=>({...J,sizeCustom:H.target.value,size:H.target.value})),className:"w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 border-gray-300"})]})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Product Image *"}),c?d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"w-full h-32 border border-gray-300 rounded-lg overflow-hidden bg-gray-50 flex items-center justify-center",children:m?d.jsx("img",{src:m,alt:"Preview",className:"max-w-full max-h-full object-contain"}):d.jsx(Ep,{className:"w-8 h-8 text-gray-400"})}),d.jsx("button",{type:"button",onClick:oe,className:"absolute -top-2 -right-2 w-6 h-6 bg-red-500 text-white rounded-full flex items-center justify-center hover:bg-red-600 transition-colors duration-200",children:d.jsx(Dp,{className:"w-4 h-4"})}),d.jsx("p",{className:"text-sm text-gray-600 mt-2",children:c?.name})]}):d.jsxs("div",{className:"relative",children:[d.jsx("input",{id:"image-upload",type:"file",accept:"image/*",onChange:ne,className:"hidden"}),d.jsxs("label",{htmlFor:"image-upload",className:`w-full h-32 border-2 border-dashed rounded-lg flex flex-col items-center justify-center cursor-pointer transition-all duration-200 hover:bg-gray-50 ${w.image?"border-red-300 bg-red-50":"border-gray-300"}`,children:[d.jsx(Ap,{className:"w-8 h-8 text-gray-400 mb-2"}),d.jsxs("p",{className:"text-sm text-gray-600 text-center",children:[d.jsx("span",{className:"font-medium text-blue-600",children:"Click to upload"})," ","or drag and drop"]}),d.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"PNG, JPG, GIF up to 5MB"})]})]}),w.image&&d.jsx("p",{className:"mt-1 text-sm text-red-600",children:w.image})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-2",children:"Description *"}),d.jsx("textarea",{id:"description",name:"description",rows:4,value:i.description,onChange:ae,className:`w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 resize-none ${w.description?"border-red-300":"border-gray-300"}`,placeholder:"Enter product description"}),w.description&&d.jsx("p",{className:"mt-1 text-sm text-red-600",children:w.description})]}),d.jsxs("div",{className:"flex space-x-4",children:[d.jsxs("button",{type:"submit",disabled:G||A,className:"flex items-center space-x-2 bg-blue-600 text-white px-6 py-3 rounded-lg hover:bg-blue-700 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all duration-200 font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:[d.jsx(Tp,{className:"w-5 h-5"}),d.jsx("span",{children:G?A?"Uploading Image...":"Creating Product...":"Save Product"})]}),d.jsx("button",{type:"button",disabled:G||A,onClick:()=>{u({name:"",category:"",price:"",description:"",quantity:"",size:"500g",sizeOption:"500g",sizeCustom:""}),f(null),y(""),E({});const H=document.getElementById("image-upload");H&&(H.value="")},className:"px-6 py-3 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 transition-all duration-200 font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:"Clear Form"})]})]})})]})},yh=()=>{const[s,i]=re.useState([]),[u,c]=re.useState(!0),[f,m]=re.useState(null),[y,w]=re.useState(""),[E,_]=re.useState(""),j=async()=>{try{c(!0),m(null);const C=await It.get("/admin/products");if(C.data.success){const P=C.data.products.map(Q=>({productId:Q.productId,name:Q.name,category:Q.category,price:Q.price,description:Q.description,quantity:Q.quantity,imageUrl:Q.imageUrl}));i(P)}else m("Failed to fetch products")}catch(C){console.error("Error fetching products:",C),m(C.response?.data?.message||"Failed to fetch products")}finally{c(!1)}},A=async C=>{try{(await It.delete(`/admin/products/${C}`)).data.success?i(Q=>Q.filter(ne=>ne.productId!==C)):m("Failed to delete product")}catch(P){console.error("Error deleting product:",P),m(P.response?.data?.message||"Failed to delete product")}};re.useEffect(()=>{j()},[]);const U=s.filter(C=>{const P=C.name.toLowerCase().includes(y.toLowerCase())||C.description.toLowerCase().includes(y.toLowerCase()),Q=!E||C.category===E;return P&&Q}),G=Array.from(new Set(s.map(C=>C.category))),R=(C,P)=>{window.confirm(`Are you sure you want to delete "${P}"?`)&&A(C)};return u?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"All Products"}),d.jsx("p",{className:"text-gray-600",children:"Loading products..."})]}),d.jsx("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:d.jsx("div",{className:"flex items-center justify-center py-12",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})})})]}):f?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"All Products"}),d.jsx("p",{className:"text-gray-600",children:"Error loading products"})]}),d.jsx("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:d.jsxs("div",{className:"text-center py-12",children:[d.jsx(ln,{className:"w-16 h-16 text-red-300 mx-auto mb-4"}),d.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Error loading products"}),d.jsx("p",{className:"text-gray-600 mb-4",children:f}),d.jsx("button",{onClick:j,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors duration-200",children:"Try Again"})]})})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"All Products"}),d.jsxs("p",{className:"text-gray-600",children:["Manage your product inventory (",s.length," total products)"]})]}),d.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[d.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between space-y-4 lg:space-y-0 lg:space-x-4 mb-6",children:[d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(Uc,{className:"absolute left-3 top-3 w-5 h-5 text-gray-400"}),d.jsx("input",{type:"text",placeholder:"Search products...",value:y,onChange:C=>w(C.target.value),className:"w-full pl-12 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200"})]}),d.jsxs("select",{value:E,onChange:C=>_(C.target.value),className:"px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200",children:[d.jsx("option",{value:"",children:"All Categories"}),G.map(C=>d.jsx("option",{value:C,children:C},C))]})]}),U.length===0?d.jsxs("div",{className:"text-center py-12",children:[d.jsx(ln,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),d.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No products found"}),d.jsx("p",{className:"text-gray-600",children:s.length===0?"Add your first product to get started.":"Try adjusting your search or filter."})]}):d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-gray-200",children:[d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Product"}),d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Category"}),d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Price"}),d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Quantity"}),d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Actions"})]})}),d.jsx("tbody",{children:U.map(C=>d.jsxs("tr",{className:"border-b border-gray-100 hover:bg-gray-50 transition-colors duration-200",children:[d.jsx("td",{className:"py-4 px-4",children:d.jsxs("div",{className:"flex items-center space-x-3",children:[d.jsx("img",{src:C.imageUrl,alt:C.name,className:"w-12 h-12 object-cover rounded-lg",onError:P=>{P.target.src="https://images.pexels.com/photos/3561339/pexels-photo-3561339.jpeg?auto=compress&cs=tinysrgb&w=400"}}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-medium text-gray-900",children:C.name}),d.jsx("p",{className:"text-sm text-gray-600 truncate max-w-xs",children:C.description})]})]})}),d.jsx("td",{className:"py-4 px-4",children:d.jsx("span",{className:"inline-block bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full font-medium",children:C.category})}),d.jsxs("td",{className:"py-4 px-4 font-semibold text-gray-900",children:["$",C.price.toFixed(2)]}),d.jsx("td",{className:"py-4 px-4",children:d.jsxs("span",{className:`inline-block px-2 py-1 rounded-full text-xs font-medium ${C.quantity>10?"bg-green-100 text-green-800":C.quantity>0?"bg-yellow-100 text-yellow-800":"bg-red-100 text-red-800"}`,children:[C.quantity," in stock"]})}),d.jsx("td",{className:"py-4 px-4",children:d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx("button",{className:"p-2 text-blue-600 hover:bg-blue-50 rounded-lg transition-colors duration-200",children:d.jsx(Pp,{className:"w-4 h-4"})}),d.jsx("button",{onClick:()=>R(C.productId,C.name),className:"p-2 text-red-600 hover:bg-red-50 rounded-lg transition-colors duration-200",children:d.jsx(Lp,{className:"w-4 h-4"})})]})})]},C.productId))})]})})]})]})},gh=()=>{const[s,i]=re.useState([]),[u,c]=re.useState(!0),[f,m]=re.useState(null),[y,w]=re.useState(""),[E,_]=re.useState(""),j=async()=>{try{c(!0),m(null);const R=await It.get("/admin/orders");if(R.data.success){const C=R.data.orders.map(P=>({orderId:P.orderId,customerName:P.customerName,customerEmail:P.customerEmail,products:P.products.map(Q=>({productId:Q.productId||"",name:Q.name,quantity:Q.quantity,price:Q.price})),totalAmount:P.totalCost,status:P.status,orderDate:P.orderDate,shippingAddress:P.shippingAddress}));i(C)}else m("Failed to fetch orders")}catch(R){console.error("Error fetching orders:",R),m(R.response?.data?.message||"Failed to fetch orders")}finally{c(!1)}};re.useEffect(()=>{j()},[]);const A=s.filter(R=>{const C=R.orderId.toLowerCase().includes(y.toLowerCase())||R.customerName.toLowerCase().includes(y.toLowerCase())||R.customerEmail.toLowerCase().includes(y.toLowerCase()),P=!E||R.status===E;return C&&P}),U=R=>{switch(R){case"pending":return d.jsx(ln,{className:"w-4 h-4 text-yellow-600"});case"processing":return d.jsx(ln,{className:"w-4 h-4 text-blue-600"});case"shipped":return d.jsx(zp,{className:"w-4 h-4 text-purple-600"});case"delivered":return d.jsx(Sp,{className:"w-4 h-4 text-green-600"});case"cancelled":return d.jsx(Ec,{className:"w-4 h-4 text-red-600"});default:return d.jsx(ln,{className:"w-4 h-4 text-gray-600"})}},G=R=>{switch(R){case"pending":return"bg-yellow-100 text-yellow-800";case"processing":return"bg-blue-100 text-blue-800";case"shipped":return"bg-purple-100 text-purple-800";case"delivered":return"bg-green-100 text-green-800";case"cancelled":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};return u?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Orders Management"}),d.jsx("p",{className:"text-gray-600",children:"Loading orders..."})]}),d.jsx("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:d.jsx("div",{className:"flex items-center justify-center py-12",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})})})]}):f?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Orders Management"}),d.jsx("p",{className:"text-gray-600",children:"Error loading orders"})]}),d.jsx("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:d.jsxs("div",{className:"text-center py-12",children:[d.jsx(Ec,{className:"w-16 h-16 text-red-300 mx-auto mb-4"}),d.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Error loading orders"}),d.jsx("p",{className:"text-gray-600 mb-4",children:f}),d.jsx("button",{onClick:j,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors duration-200",children:"Try Again"})]})})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Orders Management"}),d.jsxs("p",{className:"text-gray-600",children:["Track and manage customer orders (",s.length," total orders)"]})]}),d.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[d.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between space-y-4 lg:space-y-0 lg:space-x-4 mb-6",children:[d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(Uc,{className:"absolute left-3 top-3 w-5 h-5 text-gray-400"}),d.jsx("input",{type:"text",placeholder:"Search orders...",value:y,onChange:R=>w(R.target.value),className:"w-full pl-12 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200"})]}),d.jsxs("select",{value:E,onChange:R=>_(R.target.value),className:"px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200",children:[d.jsx("option",{value:"",children:"All Statuses"}),d.jsx("option",{value:"pending",children:"Pending"}),d.jsx("option",{value:"processing",children:"Processing"}),d.jsx("option",{value:"shipped",children:"Shipped"}),d.jsx("option",{value:"delivered",children:"Delivered"}),d.jsx("option",{value:"cancelled",children:"Cancelled"})]})]}),A.length===0?d.jsxs("div",{className:"text-center py-12",children:[d.jsx(ln,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),d.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No orders found"}),d.jsx("p",{className:"text-gray-600",children:s.length===0?"Orders will appear here when customers make purchases.":"Try adjusting your search or filter."})]}):d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-gray-200",children:[d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Order ID"}),d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Customer"}),d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Products"}),d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Total"}),d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Status"}),d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Date"}),d.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Actions"})]})}),d.jsx("tbody",{children:A.map(R=>d.jsxs("tr",{className:"border-b border-gray-100 hover:bg-gray-50 transition-colors duration-200",children:[d.jsx("td",{className:"py-4 px-4",children:d.jsx("span",{className:"font-mono text-sm text-blue-600",children:R.orderId})}),d.jsx("td",{className:"py-4 px-4",children:d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-gray-900",children:R.customerName}),d.jsx("p",{className:"text-sm text-gray-600",children:R.customerEmail})]})}),d.jsx("td",{className:"py-4 px-4",children:d.jsxs("div",{className:"text-sm",children:[R.products.slice(0,2).map((C,P)=>d.jsxs("div",{className:"text-gray-700",children:[C.name," (x",C.quantity,")"]},P)),R.products.length>2&&d.jsxs("div",{className:"text-gray-500",children:["+",R.products.length-2," more"]})]})}),d.jsxs("td",{className:"py-4 px-4 font-semibold text-gray-900",children:["$",R.totalAmount.toFixed(2)]}),d.jsx("td",{className:"py-4 px-4",children:d.jsxs("div",{className:"flex items-center space-x-2",children:[U(R.status),d.jsx("span",{className:`inline-block px-2 py-1 rounded-full text-xs font-medium capitalize ${G(R.status)}`,children:R.status})]})}),d.jsx("td",{className:"py-4 px-4 text-sm text-gray-600",children:new Date(R.orderDate).toLocaleDateString()}),d.jsx("td",{className:"py-4 px-4",children:d.jsx("button",{className:"p-2 text-blue-600 hover:bg-blue-50 rounded-lg transition-colors duration-200",children:d.jsx(Np,{className:"w-4 h-4"})})})]},R.orderId))})]})})]})]})};function vh(){const[s,i]=re.useState(!1),[u,c]=re.useState("dashboard");re.useEffect(()=>{(async()=>{if(localStorage.getItem("adminAuth")==="true")try{await It.get("/admin/profile"),i(!0)}catch{localStorage.removeItem("adminAuth"),i(!1)}else i(!1)})()},[]);const f=E=>{i(E)},m=async()=>{try{await It.post("/admin/logout")}catch(E){console.error("Logout error:",E)}finally{localStorage.removeItem("adminAuth"),i(!1),c("dashboard")}},y=E=>{console.log("Product added:",E)},w=()=>{switch(u){case"dashboard":return d.jsx(Ic,{});case"add-product":return d.jsx(hh,{onAddProduct:y});case"products":return d.jsx(yh,{});case"orders":return d.jsx(gh,{});default:return d.jsx(Ic,{})}};return s?d.jsxs("div",{className:"flex h-screen bg-gray-50",children:[d.jsx(mh,{activeSection:u,setActiveSection:c,onLogout:m}),d.jsx("main",{className:"flex-1 overflow-auto",children:d.jsx("div",{className:"p-8",children:w()})})]}):d.jsx(ph,{onLogin:f})}gp.createRoot(document.getElementById("root")).render(d.jsx(re.StrictMode,{children:d.jsx(vh,{})}));