xianyu-backend-java/static/assets/index-BF-GL3W8.js
2025-12-23 23:02:24 +08:00

489 lines
580 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var af=e=>{throw TypeError(e)};var Go=(e,t,s)=>t.has(e)||af("Cannot "+s);var M=(e,t,s)=>(Go(e,t,"read from private field"),s?s.call(e):t.get(e)),ae=(e,t,s)=>t.has(e)?af("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Y=(e,t,s,n)=>(Go(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),Ze=(e,t,s)=>(Go(e,t,"access private method"),s);var Di=(e,t,s,n)=>({set _(a){Y(e,t,a,s)},get _(){return M(e,t,n)}});function Fb(e,t){for(var s=0;s<t.length;s++){const n=t[s];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=s(a);fetch(a.href,i)}})();function S0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C0={exports:{}},ho={},E0={exports:{}},re={};/**
* @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 gi=Symbol.for("react.element"),Vb=Symbol.for("react.portal"),zb=Symbol.for("react.fragment"),Ub=Symbol.for("react.strict_mode"),Bb=Symbol.for("react.profiler"),$b=Symbol.for("react.provider"),Hb=Symbol.for("react.context"),Wb=Symbol.for("react.forward_ref"),qb=Symbol.for("react.suspense"),Kb=Symbol.for("react.memo"),Qb=Symbol.for("react.lazy"),lf=Symbol.iterator;function Gb(e){return e===null||typeof e!="object"?null:(e=lf&&e[lf]||e["@@iterator"],typeof e=="function"?e:null)}var P0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T0=Object.assign,_0={};function Qr(e,t,s){this.props=e,this.context=t,this.refs=_0,this.updater=s||P0}Qr.prototype.isReactComponent={};Qr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Qr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function A0(){}A0.prototype=Qr.prototype;function vd(e,t,s){this.props=e,this.context=t,this.refs=_0,this.updater=s||P0}var bd=vd.prototype=new A0;bd.constructor=vd;T0(bd,Qr.prototype);bd.isPureReactComponent=!0;var of=Array.isArray,R0=Object.prototype.hasOwnProperty,jd={current:null},M0={key:!0,ref:!0,__self:!0,__source:!0};function L0(e,t,s){var n,a={},i=null,l=null;if(t!=null)for(n in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)R0.call(t,n)&&!M0.hasOwnProperty(n)&&(a[n]=t[n]);var o=arguments.length-2;if(o===1)a.children=s;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)a[n]===void 0&&(a[n]=o[n]);return{$$typeof:gi,type:e,key:i,ref:l,props:a,_owner:jd.current}}function Xb(e,t){return{$$typeof:gi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function wd(e){return typeof e=="object"&&e!==null&&e.$$typeof===gi}function Jb(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(s){return t[s]})}var cf=/\/+/g;function Xo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Jb(""+e.key):t.toString(36)}function il(e,t,s,n,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case gi:case Vb:l=!0}}if(l)return l=e,a=a(l),e=n===""?"."+Xo(l,0):n,of(a)?(s="",e!=null&&(s=e.replace(cf,"$&/")+"/"),il(a,t,s,"",function(u){return u})):a!=null&&(wd(a)&&(a=Xb(a,s+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(cf,"$&/")+"/")+e)),t.push(a)),1;if(l=0,n=n===""?".":n+":",of(e))for(var o=0;o<e.length;o++){i=e[o];var c=n+Xo(i,o);l+=il(i,t,s,c,a)}else if(c=Gb(e),typeof c=="function")for(e=c.call(e),o=0;!(i=e.next()).done;)i=i.value,c=n+Xo(i,o++),l+=il(i,t,s,c,a);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function Oi(e,t,s){if(e==null)return e;var n=[],a=0;return il(e,n,"","",function(i){return t.call(s,i,a++)}),n}function Yb(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(s){(e._status===0||e._status===-1)&&(e._status=1,e._result=s)},function(s){(e._status===0||e._status===-1)&&(e._status=2,e._result=s)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ht={current:null},ll={transition:null},Zb={ReactCurrentDispatcher:ht,ReactCurrentBatchConfig:ll,ReactCurrentOwner:jd};function D0(){throw Error("act(...) is not supported in production builds of React.")}re.Children={map:Oi,forEach:function(e,t,s){Oi(e,function(){t.apply(this,arguments)},s)},count:function(e){var t=0;return Oi(e,function(){t++}),t},toArray:function(e){return Oi(e,function(t){return t})||[]},only:function(e){if(!wd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=Qr;re.Fragment=zb;re.Profiler=Bb;re.PureComponent=vd;re.StrictMode=Ub;re.Suspense=qb;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zb;re.act=D0;re.cloneElement=function(e,t,s){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=T0({},e.props),a=e.key,i=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,l=jd.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(c in t)R0.call(t,c)&&!M0.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&o!==void 0?o[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=s;else if(1<c){o=Array(c);for(var u=0;u<c;u++)o[u]=arguments[u+2];n.children=o}return{$$typeof:gi,type:e.type,key:a,ref:i,props:n,_owner:l}};re.createContext=function(e){return e={$$typeof:Hb,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:$b,_context:e},e.Consumer=e};re.createElement=L0;re.createFactory=function(e){var t=L0.bind(null,e);return t.type=e,t};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:Wb,render:e}};re.isValidElement=wd;re.lazy=function(e){return{$$typeof:Qb,_payload:{_status:-1,_result:e},_init:Yb}};re.memo=function(e,t){return{$$typeof:Kb,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=ll.transition;ll.transition={};try{e()}finally{ll.transition=t}};re.unstable_act=D0;re.useCallback=function(e,t){return ht.current.useCallback(e,t)};re.useContext=function(e){return ht.current.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e){return ht.current.useDeferredValue(e)};re.useEffect=function(e,t){return ht.current.useEffect(e,t)};re.useId=function(){return ht.current.useId()};re.useImperativeHandle=function(e,t,s){return ht.current.useImperativeHandle(e,t,s)};re.useInsertionEffect=function(e,t){return ht.current.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return ht.current.useLayoutEffect(e,t)};re.useMemo=function(e,t){return ht.current.useMemo(e,t)};re.useReducer=function(e,t,s){return ht.current.useReducer(e,t,s)};re.useRef=function(e){return ht.current.useRef(e)};re.useState=function(e){return ht.current.useState(e)};re.useSyncExternalStore=function(e,t,s){return ht.current.useSyncExternalStore(e,t,s)};re.useTransition=function(){return ht.current.useTransition()};re.version="18.3.1";E0.exports=re;var y=E0.exports;const xi=S0(y),e1=Fb({__proto__:null,default:xi},[y]);/**
* @license React
* react-jsx-runtime.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 t1=y,s1=Symbol.for("react.element"),n1=Symbol.for("react.fragment"),r1=Object.prototype.hasOwnProperty,a1=t1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i1={key:!0,ref:!0,__self:!0,__source:!0};function O0(e,t,s){var n,a={},i=null,l=null;s!==void 0&&(i=""+s),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(n in t)r1.call(t,n)&&!i1.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:s1,type:e,key:i,ref:l,props:a,_owner:a1.current}}ho.Fragment=n1;ho.jsx=O0;ho.jsxs=O0;C0.exports=ho;var r=C0.exports,Wc={},I0={exports:{}},_t={},F0={exports:{}},V0={};/**
* @license React
* scheduler.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.
*/(function(e){function t(C,_){var B=C.length;C.push(_);e:for(;0<B;){var U=B-1>>>1,A=C[U];if(0<a(A,_))C[U]=_,C[B]=A,B=U;else break e}}function s(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var _=C[0],B=C.pop();if(B!==_){C[0]=B;e:for(var U=0,A=C.length,Z=A>>>1;U<Z;){var se=2*(U+1)-1,ce=C[se],F=se+1,X=C[F];if(0>a(ce,B))F<A&&0>a(X,ce)?(C[U]=X,C[F]=B,U=F):(C[U]=ce,C[se]=B,U=se);else if(F<A&&0>a(X,B))C[U]=X,C[F]=B,U=F;else break e}}return _}function a(C,_){var B=C.sortIndex-_.sortIndex;return B!==0?B:C.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var c=[],u=[],d=1,h=null,f=3,b=!1,g=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(C){for(var _=s(u);_!==null;){if(_.callback===null)n(u);else if(_.startTime<=C)n(u),_.sortIndex=_.expirationTime,t(c,_);else break;_=s(u)}}function j(C){if(v=!1,p(C),!g)if(s(c)!==null)g=!0,H(k);else{var _=s(u);_!==null&&O(j,_.startTime-C)}}function k(C,_){g=!1,v&&(v=!1,x(N),N=-1),b=!0;var B=f;try{for(p(_),h=s(c);h!==null&&(!(h.expirationTime>_)||C&&!W());){var U=h.callback;if(typeof U=="function"){h.callback=null,f=h.priorityLevel;var A=U(h.expirationTime<=_);_=e.unstable_now(),typeof A=="function"?h.callback=A:h===s(c)&&n(c),p(_)}else n(c);h=s(c)}if(h!==null)var Z=!0;else{var se=s(u);se!==null&&O(j,se.startTime-_),Z=!1}return Z}finally{h=null,f=B,b=!1}}var S=!1,E=null,N=-1,L=5,R=-1;function W(){return!(e.unstable_now()-R<L)}function $(){if(E!==null){var C=e.unstable_now();R=C;var _=!0;try{_=E(!0,C)}finally{_?P():(S=!1,E=null)}}else S=!1}var P;if(typeof m=="function")P=function(){m($)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,z=D.port2;D.port1.onmessage=$,P=function(){z.postMessage(null)}}else P=function(){w($,0)};function H(C){E=C,S||(S=!0,P())}function O(C,_){N=w(function(){C(e.unstable_now())},_)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){g||b||(g=!0,H(k))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return s(c)},e.unstable_next=function(C){switch(f){case 1:case 2:case 3:var _=3;break;default:_=f}var B=f;f=_;try{return C()}finally{f=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,_){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var B=f;f=C;try{return _()}finally{f=B}},e.unstable_scheduleCallback=function(C,_,B){var U=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?U+B:U):B=U,C){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=B+A,C={id:d++,callback:_,priorityLevel:C,startTime:B,expirationTime:A,sortIndex:-1},B>U?(C.sortIndex=B,t(u,C),s(c)===null&&C===s(u)&&(v?(x(N),N=-1):v=!0,O(j,B-U))):(C.sortIndex=A,t(c,C),g||b||(g=!0,H(k))),C},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(C){var _=f;return function(){var B=f;f=_;try{return C.apply(this,arguments)}finally{f=B}}}})(V0);F0.exports=V0;var l1=F0.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 o1=y,Et=l1;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var z0=new Set,Ia={};function Gn(e,t){Dr(e,t),Dr(e+"Capture",t)}function Dr(e,t){for(Ia[e]=t,e=0;e<t.length;e++)z0.add(t[e])}var Ss=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qc=Object.prototype.hasOwnProperty,c1=/^[: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]*$/,uf={},df={};function u1(e){return qc.call(df,e)?!0:qc.call(uf,e)?!1:c1.test(e)?df[e]=!0:(uf[e]=!0,!1)}function d1(e,t,s,n){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function h1(e,t,s,n){if(t===null||typeof t>"u"||d1(e,t,s,n))return!0;if(n)return!1;if(s!==null)switch(s.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 ft(e,t,s,n,a,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var Ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ge[e]=new ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ge[t]=new ft(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ge[e]=new ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ge[e]=new ft(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){Ge[e]=new ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ge[e]=new ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ge[e]=new ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ge[e]=new ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ge[e]=new ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nd=/[\-:]([a-z])/g;function kd(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(Nd,kd);Ge[t]=new ft(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(Nd,kd);Ge[t]=new ft(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(Nd,kd);Ge[t]=new ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ge[e]=new ft(e,1,!1,e.toLowerCase(),null,!1,!1)});Ge.xlinkHref=new ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ge[e]=new ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sd(e,t,s,n){var a=Ge.hasOwnProperty(t)?Ge[t]:null;(a!==null?a.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(h1(t,s,a,n)&&(s=null),n||a===null?u1(t)&&(s===null?e.removeAttribute(t):e.setAttribute(t,""+s)):a.mustUseProperty?e[a.propertyName]=s===null?a.type===3?!1:"":s:(t=a.attributeName,n=a.attributeNamespace,s===null?e.removeAttribute(t):(a=a.type,s=a===3||a===4&&s===!0?"":""+s,n?e.setAttributeNS(n,t,s):e.setAttribute(t,s))))}var _s=o1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ii=Symbol.for("react.element"),nr=Symbol.for("react.portal"),rr=Symbol.for("react.fragment"),Cd=Symbol.for("react.strict_mode"),Kc=Symbol.for("react.profiler"),U0=Symbol.for("react.provider"),B0=Symbol.for("react.context"),Ed=Symbol.for("react.forward_ref"),Qc=Symbol.for("react.suspense"),Gc=Symbol.for("react.suspense_list"),Pd=Symbol.for("react.memo"),zs=Symbol.for("react.lazy"),$0=Symbol.for("react.offscreen"),hf=Symbol.iterator;function ia(e){return e===null||typeof e!="object"?null:(e=hf&&e[hf]||e["@@iterator"],typeof e=="function"?e:null)}var Ce=Object.assign,Jo;function va(e){if(Jo===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Jo=t&&t[1]||""}return`
`+Jo+e}var Yo=!1;function Zo(e,t){if(!e||Yo)return"";Yo=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var a=u.stack.split(`
`),i=n.stack.split(`
`),l=a.length-1,o=i.length-1;1<=l&&0<=o&&a[l]!==i[o];)o--;for(;1<=l&&0<=o;l--,o--)if(a[l]!==i[o]){if(l!==1||o!==1)do if(l--,o--,0>o||a[l]!==i[o]){var c=`
`+a[l].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=l&&0<=o);break}}}finally{Yo=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?va(e):""}function f1(e){switch(e.tag){case 5:return va(e.type);case 16:return va("Lazy");case 13:return va("Suspense");case 19:return va("SuspenseList");case 0:case 2:case 15:return e=Zo(e.type,!1),e;case 11:return e=Zo(e.type.render,!1),e;case 1:return e=Zo(e.type,!0),e;default:return""}}function Xc(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 rr:return"Fragment";case nr:return"Portal";case Kc:return"Profiler";case Cd:return"StrictMode";case Qc:return"Suspense";case Gc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case B0:return(e.displayName||"Context")+".Consumer";case U0:return(e._context.displayName||"Context")+".Provider";case Ed:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pd:return t=e.displayName||null,t!==null?t:Xc(e.type)||"Memo";case zs:t=e._payload,e=e._init;try{return Xc(e(t))}catch{}}return null}function m1(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 Xc(t);case 8:return t===Cd?"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 dn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function H0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function p1(e){var t=H0(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var a=s.get,i=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(l){n=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fi(e){e._valueTracker||(e._valueTracker=p1(e))}function W0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),n="";return e&&(n=H0(e)?e.checked?"true":"false":e.value),e=n,e!==s?(t.setValue(e),!0):!1}function kl(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 Jc(e,t){var s=t.checked;return Ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function ff(e,t){var s=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;s=dn(t.value!=null?t.value:s),e._wrapperState={initialChecked:n,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function q0(e,t){t=t.checked,t!=null&&Sd(e,"checked",t,!1)}function Yc(e,t){q0(e,t);var s=dn(t.value),n=t.type;if(s!=null)n==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zc(e,t.type,s):t.hasOwnProperty("defaultValue")&&Zc(e,t.type,dn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mf(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function Zc(e,t,s){(t!=="number"||kl(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var ba=Array.isArray;function vr(e,t,s,n){if(e=e.options,t){t={};for(var a=0;a<s.length;a++)t["$"+s[a]]=!0;for(s=0;s<e.length;s++)a=t.hasOwnProperty("$"+e[s].value),e[s].selected!==a&&(e[s].selected=a),a&&n&&(e[s].defaultSelected=!0)}else{for(s=""+dn(s),t=null,a=0;a<e.length;a++){if(e[a].value===s){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function eu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return Ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function pf(e,t){var s=t.value;if(s==null){if(s=t.children,t=t.defaultValue,s!=null){if(t!=null)throw Error(V(92));if(ba(s)){if(1<s.length)throw Error(V(93));s=s[0]}t=s}t==null&&(t=""),s=t}e._wrapperState={initialValue:dn(s)}}function K0(e,t){var s=dn(t.value),n=dn(t.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),t.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),n!=null&&(e.defaultValue=""+n)}function gf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Q0(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function tu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Q0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Vi,G0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,n,a){MSApp.execUnsafeLocalFunction(function(){return e(t,s,n,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Vi=Vi||document.createElement("div"),Vi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Vi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fa(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var ka={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},g1=["Webkit","ms","Moz","O"];Object.keys(ka).forEach(function(e){g1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ka[t]=ka[e]})});function X0(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||ka.hasOwnProperty(e)&&ka[e]?(""+t).trim():t+"px"}function J0(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var n=s.indexOf("--")===0,a=X0(s,t[s],n);s==="float"&&(s="cssFloat"),n?e.setProperty(s,a):e[s]=a}}var x1=Ce({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 su(e,t){if(t){if(x1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function nu(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 ru=null;function Td(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var au=null,br=null,jr=null;function xf(e){if(e=bi(e)){if(typeof au!="function")throw Error(V(280));var t=e.stateNode;t&&(t=xo(t),au(e.stateNode,e.type,t))}}function Y0(e){br?jr?jr.push(e):jr=[e]:br=e}function Z0(){if(br){var e=br,t=jr;if(jr=br=null,xf(e),t)for(e=0;e<t.length;e++)xf(t[e])}}function eg(e,t){return e(t)}function tg(){}var ec=!1;function sg(e,t,s){if(ec)return e(t,s);ec=!0;try{return eg(e,t,s)}finally{ec=!1,(br!==null||jr!==null)&&(tg(),Z0())}}function Va(e,t){var s=e.stateNode;if(s===null)return null;var n=xo(s);if(n===null)return null;s=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(V(231,t,typeof s));return s}var iu=!1;if(Ss)try{var la={};Object.defineProperty(la,"passive",{get:function(){iu=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{iu=!1}function y1(e,t,s,n,a,i,l,o,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(s,u)}catch(d){this.onError(d)}}var Sa=!1,Sl=null,Cl=!1,lu=null,v1={onError:function(e){Sa=!0,Sl=e}};function b1(e,t,s,n,a,i,l,o,c){Sa=!1,Sl=null,y1.apply(v1,arguments)}function j1(e,t,s,n,a,i,l,o,c){if(b1.apply(this,arguments),Sa){if(Sa){var u=Sl;Sa=!1,Sl=null}else throw Error(V(198));Cl||(Cl=!0,lu=u)}}function Xn(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function ng(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function yf(e){if(Xn(e)!==e)throw Error(V(188))}function w1(e){var t=e.alternate;if(!t){if(t=Xn(e),t===null)throw Error(V(188));return t!==e?null:e}for(var s=e,n=t;;){var a=s.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){s=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===s)return yf(a),e;if(i===n)return yf(a),t;i=i.sibling}throw Error(V(188))}if(s.return!==n.return)s=a,n=i;else{for(var l=!1,o=a.child;o;){if(o===s){l=!0,s=a,n=i;break}if(o===n){l=!0,n=a,s=i;break}o=o.sibling}if(!l){for(o=i.child;o;){if(o===s){l=!0,s=i,n=a;break}if(o===n){l=!0,n=i,s=a;break}o=o.sibling}if(!l)throw Error(V(189))}}if(s.alternate!==n)throw Error(V(190))}if(s.tag!==3)throw Error(V(188));return s.stateNode.current===s?e:t}function rg(e){return e=w1(e),e!==null?ag(e):null}function ag(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ag(e);if(t!==null)return t;e=e.sibling}return null}var ig=Et.unstable_scheduleCallback,vf=Et.unstable_cancelCallback,N1=Et.unstable_shouldYield,k1=Et.unstable_requestPaint,Te=Et.unstable_now,S1=Et.unstable_getCurrentPriorityLevel,_d=Et.unstable_ImmediatePriority,lg=Et.unstable_UserBlockingPriority,El=Et.unstable_NormalPriority,C1=Et.unstable_LowPriority,og=Et.unstable_IdlePriority,fo=null,cs=null;function E1(e){if(cs&&typeof cs.onCommitFiberRoot=="function")try{cs.onCommitFiberRoot(fo,e,void 0,(e.current.flags&128)===128)}catch{}}var Yt=Math.clz32?Math.clz32:_1,P1=Math.log,T1=Math.LN2;function _1(e){return e>>>=0,e===0?32:31-(P1(e)/T1|0)|0}var zi=64,Ui=4194304;function ja(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 Pl(e,t){var s=e.pendingLanes;if(s===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,l=s&268435455;if(l!==0){var o=l&~a;o!==0?n=ja(o):(i&=l,i!==0&&(n=ja(i)))}else l=s&~a,l!==0?n=ja(l):i!==0&&(n=ja(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)s=31-Yt(t),a=1<<s,n|=e[s],t&=~a;return n}function A1(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function R1(e,t){for(var s=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-Yt(i),o=1<<l,c=a[l];c===-1?(!(o&s)||o&n)&&(a[l]=A1(o,t)):c<=t&&(e.expiredLanes|=o),i&=~o}}function ou(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function cg(){var e=zi;return zi<<=1,!(zi&4194240)&&(zi=64),e}function tc(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function yi(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yt(t),e[t]=s}function M1(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<s;){var a=31-Yt(s),i=1<<a;t[a]=0,n[a]=-1,e[a]=-1,s&=~i}}function Ad(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var n=31-Yt(s),a=1<<n;a&t|e[n]&t&&(e[n]|=t),s&=~a}}var le=0;function ug(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var dg,Rd,hg,fg,mg,cu=!1,Bi=[],en=null,tn=null,sn=null,za=new Map,Ua=new Map,$s=[],L1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function bf(e,t){switch(e){case"focusin":case"focusout":en=null;break;case"dragenter":case"dragleave":tn=null;break;case"mouseover":case"mouseout":sn=null;break;case"pointerover":case"pointerout":za.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ua.delete(t.pointerId)}}function oa(e,t,s,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:s,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=bi(t),t!==null&&Rd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function D1(e,t,s,n,a){switch(t){case"focusin":return en=oa(en,e,t,s,n,a),!0;case"dragenter":return tn=oa(tn,e,t,s,n,a),!0;case"mouseover":return sn=oa(sn,e,t,s,n,a),!0;case"pointerover":var i=a.pointerId;return za.set(i,oa(za.get(i)||null,e,t,s,n,a)),!0;case"gotpointercapture":return i=a.pointerId,Ua.set(i,oa(Ua.get(i)||null,e,t,s,n,a)),!0}return!1}function pg(e){var t=En(e.target);if(t!==null){var s=Xn(t);if(s!==null){if(t=s.tag,t===13){if(t=ng(s),t!==null){e.blockedOn=t,mg(e.priority,function(){hg(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ol(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=uu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var n=new s.constructor(s.type,s);ru=n,s.target.dispatchEvent(n),ru=null}else return t=bi(s),t!==null&&Rd(t),e.blockedOn=s,!1;t.shift()}return!0}function jf(e,t,s){ol(e)&&s.delete(t)}function O1(){cu=!1,en!==null&&ol(en)&&(en=null),tn!==null&&ol(tn)&&(tn=null),sn!==null&&ol(sn)&&(sn=null),za.forEach(jf),Ua.forEach(jf)}function ca(e,t){e.blockedOn===t&&(e.blockedOn=null,cu||(cu=!0,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,O1)))}function Ba(e){function t(a){return ca(a,e)}if(0<Bi.length){ca(Bi[0],e);for(var s=1;s<Bi.length;s++){var n=Bi[s];n.blockedOn===e&&(n.blockedOn=null)}}for(en!==null&&ca(en,e),tn!==null&&ca(tn,e),sn!==null&&ca(sn,e),za.forEach(t),Ua.forEach(t),s=0;s<$s.length;s++)n=$s[s],n.blockedOn===e&&(n.blockedOn=null);for(;0<$s.length&&(s=$s[0],s.blockedOn===null);)pg(s),s.blockedOn===null&&$s.shift()}var wr=_s.ReactCurrentBatchConfig,Tl=!0;function I1(e,t,s,n){var a=le,i=wr.transition;wr.transition=null;try{le=1,Md(e,t,s,n)}finally{le=a,wr.transition=i}}function F1(e,t,s,n){var a=le,i=wr.transition;wr.transition=null;try{le=4,Md(e,t,s,n)}finally{le=a,wr.transition=i}}function Md(e,t,s,n){if(Tl){var a=uu(e,t,s,n);if(a===null)dc(e,t,n,_l,s),bf(e,n);else if(D1(a,e,t,s,n))n.stopPropagation();else if(bf(e,n),t&4&&-1<L1.indexOf(e)){for(;a!==null;){var i=bi(a);if(i!==null&&dg(i),i=uu(e,t,s,n),i===null&&dc(e,t,n,_l,s),i===a)break;a=i}a!==null&&n.stopPropagation()}else dc(e,t,n,null,s)}}var _l=null;function uu(e,t,s,n){if(_l=null,e=Td(n),e=En(e),e!==null)if(t=Xn(e),t===null)e=null;else if(s=t.tag,s===13){if(e=ng(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return _l=e,null}function gg(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(S1()){case _d:return 1;case lg:return 4;case El:case C1:return 16;case og:return 536870912;default:return 16}default:return 16}}var Js=null,Ld=null,cl=null;function xg(){if(cl)return cl;var e,t=Ld,s=t.length,n,a="value"in Js?Js.value:Js.textContent,i=a.length;for(e=0;e<s&&t[e]===a[e];e++);var l=s-e;for(n=1;n<=l&&t[s-n]===a[i-n];n++);return cl=a.slice(e,1<n?1-n:void 0)}function ul(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function $i(){return!0}function wf(){return!1}function At(e){function t(s,n,a,i,l){this._reactName=s,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(s=e[o],this[o]=s?s(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?$i:wf,this.isPropagationStopped=wf,this}return Ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=$i)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=$i)},persist:function(){},isPersistent:$i}),t}var Gr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dd=At(Gr),vi=Ce({},Gr,{view:0,detail:0}),V1=At(vi),sc,nc,ua,mo=Ce({},vi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Od,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ua&&(ua&&e.type==="mousemove"?(sc=e.screenX-ua.screenX,nc=e.screenY-ua.screenY):nc=sc=0,ua=e),sc)},movementY:function(e){return"movementY"in e?e.movementY:nc}}),Nf=At(mo),z1=Ce({},mo,{dataTransfer:0}),U1=At(z1),B1=Ce({},vi,{relatedTarget:0}),rc=At(B1),$1=Ce({},Gr,{animationName:0,elapsedTime:0,pseudoElement:0}),H1=At($1),W1=Ce({},Gr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),q1=At(W1),K1=Ce({},Gr,{data:0}),kf=At(K1),Q1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},G1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},X1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=X1[e])?!!t[e]:!1}function Od(){return J1}var Y1=Ce({},vi,{key:function(e){if(e.key){var t=Q1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ul(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?G1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Od,charCode:function(e){return e.type==="keypress"?ul(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ul(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Z1=At(Y1),ej=Ce({},mo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sf=At(ej),tj=Ce({},vi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Od}),sj=At(tj),nj=Ce({},Gr,{propertyName:0,elapsedTime:0,pseudoElement:0}),rj=At(nj),aj=Ce({},mo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ij=At(aj),lj=[9,13,27,32],Id=Ss&&"CompositionEvent"in window,Ca=null;Ss&&"documentMode"in document&&(Ca=document.documentMode);var oj=Ss&&"TextEvent"in window&&!Ca,yg=Ss&&(!Id||Ca&&8<Ca&&11>=Ca),Cf=" ",Ef=!1;function vg(e,t){switch(e){case"keyup":return lj.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ar=!1;function cj(e,t){switch(e){case"compositionend":return bg(t);case"keypress":return t.which!==32?null:(Ef=!0,Cf);case"textInput":return e=t.data,e===Cf&&Ef?null:e;default:return null}}function uj(e,t){if(ar)return e==="compositionend"||!Id&&vg(e,t)?(e=xg(),cl=Ld=Js=null,ar=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return yg&&t.locale!=="ko"?null:t.data;default:return null}}var dj={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Pf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dj[e.type]:t==="textarea"}function jg(e,t,s,n){Y0(n),t=Al(t,"onChange"),0<t.length&&(s=new Dd("onChange","change",null,s,n),e.push({event:s,listeners:t}))}var Ea=null,$a=null;function hj(e){Rg(e,0)}function po(e){var t=or(e);if(W0(t))return e}function fj(e,t){if(e==="change")return t}var wg=!1;if(Ss){var ac;if(Ss){var ic="oninput"in document;if(!ic){var Tf=document.createElement("div");Tf.setAttribute("oninput","return;"),ic=typeof Tf.oninput=="function"}ac=ic}else ac=!1;wg=ac&&(!document.documentMode||9<document.documentMode)}function _f(){Ea&&(Ea.detachEvent("onpropertychange",Ng),$a=Ea=null)}function Ng(e){if(e.propertyName==="value"&&po($a)){var t=[];jg(t,$a,e,Td(e)),sg(hj,t)}}function mj(e,t,s){e==="focusin"?(_f(),Ea=t,$a=s,Ea.attachEvent("onpropertychange",Ng)):e==="focusout"&&_f()}function pj(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return po($a)}function gj(e,t){if(e==="click")return po(t)}function xj(e,t){if(e==="input"||e==="change")return po(t)}function yj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var es=typeof Object.is=="function"?Object.is:yj;function Ha(e,t){if(es(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),n=Object.keys(t);if(s.length!==n.length)return!1;for(n=0;n<s.length;n++){var a=s[n];if(!qc.call(t,a)||!es(e[a],t[a]))return!1}return!0}function Af(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rf(e,t){var s=Af(e);e=0;for(var n;s;){if(s.nodeType===3){if(n=e+s.textContent.length,e<=t&&n>=t)return{node:s,offset:t-e};e=n}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Af(s)}}function kg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sg(){for(var e=window,t=kl();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=kl(e.document)}return t}function Fd(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 vj(e){var t=Sg(),s=e.focusedElem,n=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&kg(s.ownerDocument.documentElement,s)){if(n!==null&&Fd(s)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=s.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=Rf(s,i);var l=Rf(s,n);a&&l&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<t.length;s++)e=t[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var bj=Ss&&"documentMode"in document&&11>=document.documentMode,ir=null,du=null,Pa=null,hu=!1;function Mf(e,t,s){var n=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;hu||ir==null||ir!==kl(n)||(n=ir,"selectionStart"in n&&Fd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Pa&&Ha(Pa,n)||(Pa=n,n=Al(du,"onSelect"),0<n.length&&(t=new Dd("onSelect","select",null,t,s),e.push({event:t,listeners:n}),t.target=ir)))}function Hi(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var lr={animationend:Hi("Animation","AnimationEnd"),animationiteration:Hi("Animation","AnimationIteration"),animationstart:Hi("Animation","AnimationStart"),transitionend:Hi("Transition","TransitionEnd")},lc={},Cg={};Ss&&(Cg=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);function go(e){if(lc[e])return lc[e];if(!lr[e])return e;var t=lr[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Cg)return lc[e]=t[s];return e}var Eg=go("animationend"),Pg=go("animationiteration"),Tg=go("animationstart"),_g=go("transitionend"),Ag=new Map,Lf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function gn(e,t){Ag.set(e,t),Gn(t,[e])}for(var oc=0;oc<Lf.length;oc++){var cc=Lf[oc],jj=cc.toLowerCase(),wj=cc[0].toUpperCase()+cc.slice(1);gn(jj,"on"+wj)}gn(Eg,"onAnimationEnd");gn(Pg,"onAnimationIteration");gn(Tg,"onAnimationStart");gn("dblclick","onDoubleClick");gn("focusin","onFocus");gn("focusout","onBlur");gn(_g,"onTransitionEnd");Dr("onMouseEnter",["mouseout","mouseover"]);Dr("onMouseLeave",["mouseout","mouseover"]);Dr("onPointerEnter",["pointerout","pointerover"]);Dr("onPointerLeave",["pointerout","pointerover"]);Gn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Nj=new Set("cancel close invalid load scroll toggle".split(" ").concat(wa));function Df(e,t,s){var n=e.type||"unknown-event";e.currentTarget=s,j1(n,t,void 0,e),e.currentTarget=null}function Rg(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var n=e[s],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var l=n.length-1;0<=l;l--){var o=n[l],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==i&&a.isPropagationStopped())break e;Df(a,o,u),i=c}else for(l=0;l<n.length;l++){if(o=n[l],c=o.instance,u=o.currentTarget,o=o.listener,c!==i&&a.isPropagationStopped())break e;Df(a,o,u),i=c}}}if(Cl)throw e=lu,Cl=!1,lu=null,e}function ge(e,t){var s=t[xu];s===void 0&&(s=t[xu]=new Set);var n=e+"__bubble";s.has(n)||(Mg(t,e,2,!1),s.add(n))}function uc(e,t,s){var n=0;t&&(n|=4),Mg(s,e,n,t)}var Wi="_reactListening"+Math.random().toString(36).slice(2);function Wa(e){if(!e[Wi]){e[Wi]=!0,z0.forEach(function(s){s!=="selectionchange"&&(Nj.has(s)||uc(s,!1,e),uc(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wi]||(t[Wi]=!0,uc("selectionchange",!1,t))}}function Mg(e,t,s,n){switch(gg(t)){case 1:var a=I1;break;case 4:a=F1;break;default:a=Md}s=a.bind(null,t,s,e),a=void 0,!iu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,s,{capture:!0,passive:a}):e.addEventListener(t,s,!0):a!==void 0?e.addEventListener(t,s,{passive:a}):e.addEventListener(t,s,!1)}function dc(e,t,s,n,a){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var l=n.tag;if(l===3||l===4){var o=n.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(l===4)for(l=n.return;l!==null;){var c=l.tag;if((c===3||c===4)&&(c=l.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;l=l.return}for(;o!==null;){if(l=En(o),l===null)return;if(c=l.tag,c===5||c===6){n=i=l;continue e}o=o.parentNode}}n=n.return}sg(function(){var u=i,d=Td(s),h=[];e:{var f=Ag.get(e);if(f!==void 0){var b=Dd,g=e;switch(e){case"keypress":if(ul(s)===0)break e;case"keydown":case"keyup":b=Z1;break;case"focusin":g="focus",b=rc;break;case"focusout":g="blur",b=rc;break;case"beforeblur":case"afterblur":b=rc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=Nf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=U1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=sj;break;case Eg:case Pg:case Tg:b=H1;break;case _g:b=rj;break;case"scroll":b=V1;break;case"wheel":b=ij;break;case"copy":case"cut":case"paste":b=q1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=Sf}var v=(t&4)!==0,w=!v&&e==="scroll",x=v?f!==null?f+"Capture":null:f;v=[];for(var m=u,p;m!==null;){p=m;var j=p.stateNode;if(p.tag===5&&j!==null&&(p=j,x!==null&&(j=Va(m,x),j!=null&&v.push(qa(m,j,p)))),w)break;m=m.return}0<v.length&&(f=new b(f,g,null,s,d),h.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",b=e==="mouseout"||e==="pointerout",f&&s!==ru&&(g=s.relatedTarget||s.fromElement)&&(En(g)||g[Cs]))break e;if((b||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,b?(g=s.relatedTarget||s.toElement,b=u,g=g?En(g):null,g!==null&&(w=Xn(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(b=null,g=u),b!==g)){if(v=Nf,j="onMouseLeave",x="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=Sf,j="onPointerLeave",x="onPointerEnter",m="pointer"),w=b==null?f:or(b),p=g==null?f:or(g),f=new v(j,m+"leave",b,s,d),f.target=w,f.relatedTarget=p,j=null,En(d)===u&&(v=new v(x,m+"enter",g,s,d),v.target=p,v.relatedTarget=w,j=v),w=j,b&&g)t:{for(v=b,x=g,m=0,p=v;p;p=sr(p))m++;for(p=0,j=x;j;j=sr(j))p++;for(;0<m-p;)v=sr(v),m--;for(;0<p-m;)x=sr(x),p--;for(;m--;){if(v===x||x!==null&&v===x.alternate)break t;v=sr(v),x=sr(x)}v=null}else v=null;b!==null&&Of(h,f,b,v,!1),g!==null&&w!==null&&Of(h,w,g,v,!0)}}e:{if(f=u?or(u):window,b=f.nodeName&&f.nodeName.toLowerCase(),b==="select"||b==="input"&&f.type==="file")var k=fj;else if(Pf(f))if(wg)k=xj;else{k=pj;var S=mj}else(b=f.nodeName)&&b.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=gj);if(k&&(k=k(e,u))){jg(h,k,s,d);break e}S&&S(e,f,u),e==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&Zc(f,"number",f.value)}switch(S=u?or(u):window,e){case"focusin":(Pf(S)||S.contentEditable==="true")&&(ir=S,du=u,Pa=null);break;case"focusout":Pa=du=ir=null;break;case"mousedown":hu=!0;break;case"contextmenu":case"mouseup":case"dragend":hu=!1,Mf(h,s,d);break;case"selectionchange":if(bj)break;case"keydown":case"keyup":Mf(h,s,d)}var E;if(Id)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else ar?vg(e,s)&&(N="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(N="onCompositionStart");N&&(yg&&s.locale!=="ko"&&(ar||N!=="onCompositionStart"?N==="onCompositionEnd"&&ar&&(E=xg()):(Js=d,Ld="value"in Js?Js.value:Js.textContent,ar=!0)),S=Al(u,N),0<S.length&&(N=new kf(N,e,null,s,d),h.push({event:N,listeners:S}),E?N.data=E:(E=bg(s),E!==null&&(N.data=E)))),(E=oj?cj(e,s):uj(e,s))&&(u=Al(u,"onBeforeInput"),0<u.length&&(d=new kf("onBeforeInput","beforeinput",null,s,d),h.push({event:d,listeners:u}),d.data=E))}Rg(h,t)})}function qa(e,t,s){return{instance:e,listener:t,currentTarget:s}}function Al(e,t){for(var s=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=Va(e,s),i!=null&&n.unshift(qa(e,i,a)),i=Va(e,t),i!=null&&n.push(qa(e,i,a))),e=e.return}return n}function sr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Of(e,t,s,n,a){for(var i=t._reactName,l=[];s!==null&&s!==n;){var o=s,c=o.alternate,u=o.stateNode;if(c!==null&&c===n)break;o.tag===5&&u!==null&&(o=u,a?(c=Va(s,i),c!=null&&l.unshift(qa(s,c,o))):a||(c=Va(s,i),c!=null&&l.push(qa(s,c,o)))),s=s.return}l.length!==0&&e.push({event:t,listeners:l})}var kj=/\r\n?/g,Sj=/\u0000|\uFFFD/g;function If(e){return(typeof e=="string"?e:""+e).replace(kj,`
`).replace(Sj,"")}function qi(e,t,s){if(t=If(t),If(e)!==t&&s)throw Error(V(425))}function Rl(){}var fu=null,mu=null;function pu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gu=typeof setTimeout=="function"?setTimeout:void 0,Cj=typeof clearTimeout=="function"?clearTimeout:void 0,Ff=typeof Promise=="function"?Promise:void 0,Ej=typeof queueMicrotask=="function"?queueMicrotask:typeof Ff<"u"?function(e){return Ff.resolve(null).then(e).catch(Pj)}:gu;function Pj(e){setTimeout(function(){throw e})}function hc(e,t){var s=t,n=0;do{var a=s.nextSibling;if(e.removeChild(s),a&&a.nodeType===8)if(s=a.data,s==="/$"){if(n===0){e.removeChild(a),Ba(t);return}n--}else s!=="$"&&s!=="$?"&&s!=="$!"||n++;s=a}while(s);Ba(t)}function nn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Vf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var Xr=Math.random().toString(36).slice(2),os="__reactFiber$"+Xr,Ka="__reactProps$"+Xr,Cs="__reactContainer$"+Xr,xu="__reactEvents$"+Xr,Tj="__reactListeners$"+Xr,_j="__reactHandles$"+Xr;function En(e){var t=e[os];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Cs]||s[os]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Vf(e);e!==null;){if(s=e[os])return s;e=Vf(e)}return t}e=s,s=e.parentNode}return null}function bi(e){return e=e[os]||e[Cs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function or(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function xo(e){return e[Ka]||null}var yu=[],cr=-1;function xn(e){return{current:e}}function xe(e){0>cr||(e.current=yu[cr],yu[cr]=null,cr--)}function de(e,t){cr++,yu[cr]=e.current,e.current=t}var hn={},at=xn(hn),xt=xn(!1),Bn=hn;function Or(e,t){var s=e.type.contextTypes;if(!s)return hn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in s)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function yt(e){return e=e.childContextTypes,e!=null}function Ml(){xe(xt),xe(at)}function zf(e,t,s){if(at.current!==hn)throw Error(V(168));de(at,t),de(xt,s)}function Lg(e,t,s){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return s;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(V(108,m1(e)||"Unknown",a));return Ce({},s,n)}function Ll(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hn,Bn=at.current,de(at,e),de(xt,xt.current),!0}function Uf(e,t,s){var n=e.stateNode;if(!n)throw Error(V(169));s?(e=Lg(e,t,Bn),n.__reactInternalMemoizedMergedChildContext=e,xe(xt),xe(at),de(at,e)):xe(xt),de(xt,s)}var xs=null,yo=!1,fc=!1;function Dg(e){xs===null?xs=[e]:xs.push(e)}function Aj(e){yo=!0,Dg(e)}function yn(){if(!fc&&xs!==null){fc=!0;var e=0,t=le;try{var s=xs;for(le=1;e<s.length;e++){var n=s[e];do n=n(!0);while(n!==null)}xs=null,yo=!1}catch(a){throw xs!==null&&(xs=xs.slice(e+1)),ig(_d,yn),a}finally{le=t,fc=!1}}return null}var ur=[],dr=0,Dl=null,Ol=0,It=[],Ft=0,$n=null,vs=1,bs="";function wn(e,t){ur[dr++]=Ol,ur[dr++]=Dl,Dl=e,Ol=t}function Og(e,t,s){It[Ft++]=vs,It[Ft++]=bs,It[Ft++]=$n,$n=e;var n=vs;e=bs;var a=32-Yt(n)-1;n&=~(1<<a),s+=1;var i=32-Yt(t)+a;if(30<i){var l=a-a%5;i=(n&(1<<l)-1).toString(32),n>>=l,a-=l,vs=1<<32-Yt(t)+a|s<<a|n,bs=i+e}else vs=1<<i|s<<a|n,bs=e}function Vd(e){e.return!==null&&(wn(e,1),Og(e,1,0))}function zd(e){for(;e===Dl;)Dl=ur[--dr],ur[dr]=null,Ol=ur[--dr],ur[dr]=null;for(;e===$n;)$n=It[--Ft],It[Ft]=null,bs=It[--Ft],It[Ft]=null,vs=It[--Ft],It[Ft]=null}var Ct=null,St=null,ye=!1,Xt=null;function Ig(e,t){var s=Vt(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function Bf(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ct=e,St=nn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ct=e,St=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=$n!==null?{id:vs,overflow:bs}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=Vt(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,Ct=e,St=null,!0):!1;default:return!1}}function vu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function bu(e){if(ye){var t=St;if(t){var s=t;if(!Bf(e,t)){if(vu(e))throw Error(V(418));t=nn(s.nextSibling);var n=Ct;t&&Bf(e,t)?Ig(n,s):(e.flags=e.flags&-4097|2,ye=!1,Ct=e)}}else{if(vu(e))throw Error(V(418));e.flags=e.flags&-4097|2,ye=!1,Ct=e}}}function $f(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ct=e}function Ki(e){if(e!==Ct)return!1;if(!ye)return $f(e),ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!pu(e.type,e.memoizedProps)),t&&(t=St)){if(vu(e))throw Fg(),Error(V(418));for(;t;)Ig(e,t),t=nn(t.nextSibling)}if($f(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(t===0){St=nn(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++}e=e.nextSibling}St=null}}else St=Ct?nn(e.stateNode.nextSibling):null;return!0}function Fg(){for(var e=St;e;)e=nn(e.nextSibling)}function Ir(){St=Ct=null,ye=!1}function Ud(e){Xt===null?Xt=[e]:Xt.push(e)}var Rj=_s.ReactCurrentBatchConfig;function da(e,t,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(V(309));var n=s.stateNode}if(!n)throw Error(V(147,e));var a=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var o=a.refs;l===null?delete o[i]:o[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error(V(284));if(!s._owner)throw Error(V(290,e))}return e}function Qi(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Hf(e){var t=e._init;return t(e._payload)}function Vg(e){function t(x,m){if(e){var p=x.deletions;p===null?(x.deletions=[m],x.flags|=16):p.push(m)}}function s(x,m){if(!e)return null;for(;m!==null;)t(x,m),m=m.sibling;return null}function n(x,m){for(x=new Map;m!==null;)m.key!==null?x.set(m.key,m):x.set(m.index,m),m=m.sibling;return x}function a(x,m){return x=on(x,m),x.index=0,x.sibling=null,x}function i(x,m,p){return x.index=p,e?(p=x.alternate,p!==null?(p=p.index,p<m?(x.flags|=2,m):p):(x.flags|=2,m)):(x.flags|=1048576,m)}function l(x){return e&&x.alternate===null&&(x.flags|=2),x}function o(x,m,p,j){return m===null||m.tag!==6?(m=bc(p,x.mode,j),m.return=x,m):(m=a(m,p),m.return=x,m)}function c(x,m,p,j){var k=p.type;return k===rr?d(x,m,p.props.children,j,p.key):m!==null&&(m.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===zs&&Hf(k)===m.type)?(j=a(m,p.props),j.ref=da(x,m,p),j.return=x,j):(j=xl(p.type,p.key,p.props,null,x.mode,j),j.ref=da(x,m,p),j.return=x,j)}function u(x,m,p,j){return m===null||m.tag!==4||m.stateNode.containerInfo!==p.containerInfo||m.stateNode.implementation!==p.implementation?(m=jc(p,x.mode,j),m.return=x,m):(m=a(m,p.children||[]),m.return=x,m)}function d(x,m,p,j,k){return m===null||m.tag!==7?(m=Vn(p,x.mode,j,k),m.return=x,m):(m=a(m,p),m.return=x,m)}function h(x,m,p){if(typeof m=="string"&&m!==""||typeof m=="number")return m=bc(""+m,x.mode,p),m.return=x,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ii:return p=xl(m.type,m.key,m.props,null,x.mode,p),p.ref=da(x,null,m),p.return=x,p;case nr:return m=jc(m,x.mode,p),m.return=x,m;case zs:var j=m._init;return h(x,j(m._payload),p)}if(ba(m)||ia(m))return m=Vn(m,x.mode,p,null),m.return=x,m;Qi(x,m)}return null}function f(x,m,p,j){var k=m!==null?m.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return k!==null?null:o(x,m,""+p,j);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Ii:return p.key===k?c(x,m,p,j):null;case nr:return p.key===k?u(x,m,p,j):null;case zs:return k=p._init,f(x,m,k(p._payload),j)}if(ba(p)||ia(p))return k!==null?null:d(x,m,p,j,null);Qi(x,p)}return null}function b(x,m,p,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return x=x.get(p)||null,o(m,x,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Ii:return x=x.get(j.key===null?p:j.key)||null,c(m,x,j,k);case nr:return x=x.get(j.key===null?p:j.key)||null,u(m,x,j,k);case zs:var S=j._init;return b(x,m,p,S(j._payload),k)}if(ba(j)||ia(j))return x=x.get(p)||null,d(m,x,j,k,null);Qi(m,j)}return null}function g(x,m,p,j){for(var k=null,S=null,E=m,N=m=0,L=null;E!==null&&N<p.length;N++){E.index>N?(L=E,E=null):L=E.sibling;var R=f(x,E,p[N],j);if(R===null){E===null&&(E=L);break}e&&E&&R.alternate===null&&t(x,E),m=i(R,m,N),S===null?k=R:S.sibling=R,S=R,E=L}if(N===p.length)return s(x,E),ye&&wn(x,N),k;if(E===null){for(;N<p.length;N++)E=h(x,p[N],j),E!==null&&(m=i(E,m,N),S===null?k=E:S.sibling=E,S=E);return ye&&wn(x,N),k}for(E=n(x,E);N<p.length;N++)L=b(E,x,N,p[N],j),L!==null&&(e&&L.alternate!==null&&E.delete(L.key===null?N:L.key),m=i(L,m,N),S===null?k=L:S.sibling=L,S=L);return e&&E.forEach(function(W){return t(x,W)}),ye&&wn(x,N),k}function v(x,m,p,j){var k=ia(p);if(typeof k!="function")throw Error(V(150));if(p=k.call(p),p==null)throw Error(V(151));for(var S=k=null,E=m,N=m=0,L=null,R=p.next();E!==null&&!R.done;N++,R=p.next()){E.index>N?(L=E,E=null):L=E.sibling;var W=f(x,E,R.value,j);if(W===null){E===null&&(E=L);break}e&&E&&W.alternate===null&&t(x,E),m=i(W,m,N),S===null?k=W:S.sibling=W,S=W,E=L}if(R.done)return s(x,E),ye&&wn(x,N),k;if(E===null){for(;!R.done;N++,R=p.next())R=h(x,R.value,j),R!==null&&(m=i(R,m,N),S===null?k=R:S.sibling=R,S=R);return ye&&wn(x,N),k}for(E=n(x,E);!R.done;N++,R=p.next())R=b(E,x,N,R.value,j),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?N:R.key),m=i(R,m,N),S===null?k=R:S.sibling=R,S=R);return e&&E.forEach(function($){return t(x,$)}),ye&&wn(x,N),k}function w(x,m,p,j){if(typeof p=="object"&&p!==null&&p.type===rr&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Ii:e:{for(var k=p.key,S=m;S!==null;){if(S.key===k){if(k=p.type,k===rr){if(S.tag===7){s(x,S.sibling),m=a(S,p.props.children),m.return=x,x=m;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===zs&&Hf(k)===S.type){s(x,S.sibling),m=a(S,p.props),m.ref=da(x,S,p),m.return=x,x=m;break e}s(x,S);break}else t(x,S);S=S.sibling}p.type===rr?(m=Vn(p.props.children,x.mode,j,p.key),m.return=x,x=m):(j=xl(p.type,p.key,p.props,null,x.mode,j),j.ref=da(x,m,p),j.return=x,x=j)}return l(x);case nr:e:{for(S=p.key;m!==null;){if(m.key===S)if(m.tag===4&&m.stateNode.containerInfo===p.containerInfo&&m.stateNode.implementation===p.implementation){s(x,m.sibling),m=a(m,p.children||[]),m.return=x,x=m;break e}else{s(x,m);break}else t(x,m);m=m.sibling}m=jc(p,x.mode,j),m.return=x,x=m}return l(x);case zs:return S=p._init,w(x,m,S(p._payload),j)}if(ba(p))return g(x,m,p,j);if(ia(p))return v(x,m,p,j);Qi(x,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,m!==null&&m.tag===6?(s(x,m.sibling),m=a(m,p),m.return=x,x=m):(s(x,m),m=bc(p,x.mode,j),m.return=x,x=m),l(x)):s(x,m)}return w}var Fr=Vg(!0),zg=Vg(!1),Il=xn(null),Fl=null,hr=null,Bd=null;function $d(){Bd=hr=Fl=null}function Hd(e){var t=Il.current;xe(Il),e._currentValue=t}function ju(e,t,s){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===s)break;e=e.return}}function Nr(e,t){Fl=e,Bd=hr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gt=!0),e.firstContext=null)}function Ut(e){var t=e._currentValue;if(Bd!==e)if(e={context:e,memoizedValue:t,next:null},hr===null){if(Fl===null)throw Error(V(308));hr=e,Fl.dependencies={lanes:0,firstContext:e}}else hr=hr.next=e;return t}var Pn=null;function Wd(e){Pn===null?Pn=[e]:Pn.push(e)}function Ug(e,t,s,n){var a=t.interleaved;return a===null?(s.next=s,Wd(t)):(s.next=a.next,a.next=s),t.interleaved=s,Es(e,n)}function Es(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var Us=!1;function qd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bg(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 ws(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function rn(e,t,s){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ie&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,Es(e,s)}return a=n.interleaved,a===null?(t.next=t,Wd(n)):(t.next=a.next,a.next=t),n.interleaved=t,Es(e,s)}function dl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,s|=n,t.lanes=s,Ad(e,s)}}function Wf(e,t){var s=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,s===n)){var a=null,i=null;if(s=s.firstBaseUpdate,s!==null){do{var l={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};i===null?a=i=l:i=i.next=l,s=s.next}while(s!==null);i===null?a=i=t:i=i.next=t}else a=i=t;s={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function Vl(e,t,s,n){var a=e.updateQueue;Us=!1;var i=a.firstBaseUpdate,l=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,u=c.next;c.next=null,l===null?i=u:l.next=u,l=c;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==l&&(o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=a.baseState;l=0,d=u=c=null,o=i;do{var f=o.lane,b=o.eventTime;if((n&f)===f){d!==null&&(d=d.next={eventTime:b,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=e,v=o;switch(f=t,b=s,v.tag){case 1:if(g=v.payload,typeof g=="function"){h=g.call(b,h,f);break e}h=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,f=typeof g=="function"?g.call(b,h,f):g,f==null)break e;h=Ce({},h,f);break e;case 2:Us=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,f=a.effects,f===null?a.effects=[o]:f.push(o))}else b={eventTime:b,lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(u=d=b,c=h):d=d.next=b,l|=f;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;f=o,o=f.next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}while(!0);if(d===null&&(c=h),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=d,t=a.shared.interleaved,t!==null){a=t;do l|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);Wn|=l,e.lanes=l,e.memoizedState=h}}function qf(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],a=n.callback;if(a!==null){if(n.callback=null,n=s,typeof a!="function")throw Error(V(191,a));a.call(n)}}}var ji={},us=xn(ji),Qa=xn(ji),Ga=xn(ji);function Tn(e){if(e===ji)throw Error(V(174));return e}function Kd(e,t){switch(de(Ga,t),de(Qa,e),de(us,ji),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:tu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=tu(t,e)}xe(us),de(us,t)}function Vr(){xe(us),xe(Qa),xe(Ga)}function $g(e){Tn(Ga.current);var t=Tn(us.current),s=tu(t,e.type);t!==s&&(de(Qa,e),de(us,s))}function Qd(e){Qa.current===e&&(xe(us),xe(Qa))}var we=xn(0);function zl(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mc=[];function Gd(){for(var e=0;e<mc.length;e++)mc[e]._workInProgressVersionPrimary=null;mc.length=0}var hl=_s.ReactCurrentDispatcher,pc=_s.ReactCurrentBatchConfig,Hn=0,ke=null,Ie=null,Be=null,Ul=!1,Ta=!1,Xa=0,Mj=0;function et(){throw Error(V(321))}function Xd(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!es(e[s],t[s]))return!1;return!0}function Jd(e,t,s,n,a,i){if(Hn=i,ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hl.current=e===null||e.memoizedState===null?Ij:Fj,e=s(n,a),Ta){i=0;do{if(Ta=!1,Xa=0,25<=i)throw Error(V(301));i+=1,Be=Ie=null,t.updateQueue=null,hl.current=Vj,e=s(n,a)}while(Ta)}if(hl.current=Bl,t=Ie!==null&&Ie.next!==null,Hn=0,Be=Ie=ke=null,Ul=!1,t)throw Error(V(300));return e}function Yd(){var e=Xa!==0;return Xa=0,e}function rs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?ke.memoizedState=Be=e:Be=Be.next=e,Be}function Bt(){if(Ie===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=Be===null?ke.memoizedState:Be.next;if(t!==null)Be=t,Ie=e;else{if(e===null)throw Error(V(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},Be===null?ke.memoizedState=Be=e:Be=Be.next=e}return Be}function Ja(e,t){return typeof t=="function"?t(e):t}function gc(e){var t=Bt(),s=t.queue;if(s===null)throw Error(V(311));s.lastRenderedReducer=e;var n=Ie,a=n.baseQueue,i=s.pending;if(i!==null){if(a!==null){var l=a.next;a.next=i.next,i.next=l}n.baseQueue=a=i,s.pending=null}if(a!==null){i=a.next,n=n.baseState;var o=l=null,c=null,u=i;do{var d=u.lane;if((Hn&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(o=c=h,l=n):c=c.next=h,ke.lanes|=d,Wn|=d}u=u.next}while(u!==null&&u!==i);c===null?l=n:c.next=o,es(n,t.memoizedState)||(gt=!0),t.memoizedState=n,t.baseState=l,t.baseQueue=c,s.lastRenderedState=n}if(e=s.interleaved,e!==null){a=e;do i=a.lane,ke.lanes|=i,Wn|=i,a=a.next;while(a!==e)}else a===null&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function xc(e){var t=Bt(),s=t.queue;if(s===null)throw Error(V(311));s.lastRenderedReducer=e;var n=s.dispatch,a=s.pending,i=t.memoizedState;if(a!==null){s.pending=null;var l=a=a.next;do i=e(i,l.action),l=l.next;while(l!==a);es(i,t.memoizedState)||(gt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),s.lastRenderedState=i}return[i,n]}function Hg(){}function Wg(e,t){var s=ke,n=Bt(),a=t(),i=!es(n.memoizedState,a);if(i&&(n.memoizedState=a,gt=!0),n=n.queue,Zd(Qg.bind(null,s,n,e),[e]),n.getSnapshot!==t||i||Be!==null&&Be.memoizedState.tag&1){if(s.flags|=2048,Ya(9,Kg.bind(null,s,n,a,t),void 0,null),We===null)throw Error(V(349));Hn&30||qg(s,t,a)}return a}function qg(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Kg(e,t,s,n){t.value=s,t.getSnapshot=n,Gg(t)&&Xg(e)}function Qg(e,t,s){return s(function(){Gg(t)&&Xg(e)})}function Gg(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!es(e,s)}catch{return!0}}function Xg(e){var t=Es(e,1);t!==null&&Zt(t,e,1,-1)}function Kf(e){var t=rs();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:e},t.queue=e,e=e.dispatch=Oj.bind(null,ke,e),[t.memoizedState,e]}function Ya(e,t,s,n){return e={tag:e,create:t,destroy:s,deps:n,next:null},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.lastEffect=e.next=e):(s=t.lastEffect,s===null?t.lastEffect=e.next=e:(n=s.next,s.next=e,e.next=n,t.lastEffect=e)),e}function Jg(){return Bt().memoizedState}function fl(e,t,s,n){var a=rs();ke.flags|=e,a.memoizedState=Ya(1|t,s,void 0,n===void 0?null:n)}function vo(e,t,s,n){var a=Bt();n=n===void 0?null:n;var i=void 0;if(Ie!==null){var l=Ie.memoizedState;if(i=l.destroy,n!==null&&Xd(n,l.deps)){a.memoizedState=Ya(t,s,i,n);return}}ke.flags|=e,a.memoizedState=Ya(1|t,s,i,n)}function Qf(e,t){return fl(8390656,8,e,t)}function Zd(e,t){return vo(2048,8,e,t)}function Yg(e,t){return vo(4,2,e,t)}function Zg(e,t){return vo(4,4,e,t)}function ex(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function tx(e,t,s){return s=s!=null?s.concat([e]):null,vo(4,4,ex.bind(null,t,e),s)}function eh(){}function sx(e,t){var s=Bt();t=t===void 0?null:t;var n=s.memoizedState;return n!==null&&t!==null&&Xd(t,n[1])?n[0]:(s.memoizedState=[e,t],e)}function nx(e,t){var s=Bt();t=t===void 0?null:t;var n=s.memoizedState;return n!==null&&t!==null&&Xd(t,n[1])?n[0]:(e=e(),s.memoizedState=[e,t],e)}function rx(e,t,s){return Hn&21?(es(s,t)||(s=cg(),ke.lanes|=s,Wn|=s,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,gt=!0),e.memoizedState=s)}function Lj(e,t){var s=le;le=s!==0&&4>s?s:4,e(!0);var n=pc.transition;pc.transition={};try{e(!1),t()}finally{le=s,pc.transition=n}}function ax(){return Bt().memoizedState}function Dj(e,t,s){var n=ln(e);if(s={lane:n,action:s,hasEagerState:!1,eagerState:null,next:null},ix(e))lx(t,s);else if(s=Ug(e,t,s,n),s!==null){var a=dt();Zt(s,e,n,a),ox(s,t,n)}}function Oj(e,t,s){var n=ln(e),a={lane:n,action:s,hasEagerState:!1,eagerState:null,next:null};if(ix(e))lx(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,s);if(a.hasEagerState=!0,a.eagerState=o,es(o,l)){var c=t.interleaved;c===null?(a.next=a,Wd(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}s=Ug(e,t,a,n),s!==null&&(a=dt(),Zt(s,e,n,a),ox(s,t,n))}}function ix(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function lx(e,t){Ta=Ul=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function ox(e,t,s){if(s&4194240){var n=t.lanes;n&=e.pendingLanes,s|=n,t.lanes=s,Ad(e,s)}}var Bl={readContext:Ut,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useInsertionEffect:et,useLayoutEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useMutableSource:et,useSyncExternalStore:et,useId:et,unstable_isNewReconciler:!1},Ij={readContext:Ut,useCallback:function(e,t){return rs().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:Qf,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,fl(4194308,4,ex.bind(null,t,e),s)},useLayoutEffect:function(e,t){return fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return fl(4,2,e,t)},useMemo:function(e,t){var s=rs();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var n=rs();return t=s!==void 0?s(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Dj.bind(null,ke,e),[n.memoizedState,e]},useRef:function(e){var t=rs();return e={current:e},t.memoizedState=e},useState:Kf,useDebugValue:eh,useDeferredValue:function(e){return rs().memoizedState=e},useTransition:function(){var e=Kf(!1),t=e[0];return e=Lj.bind(null,e[1]),rs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var n=ke,a=rs();if(ye){if(s===void 0)throw Error(V(407));s=s()}else{if(s=t(),We===null)throw Error(V(349));Hn&30||qg(n,t,s)}a.memoizedState=s;var i={value:s,getSnapshot:t};return a.queue=i,Qf(Qg.bind(null,n,i,e),[e]),n.flags|=2048,Ya(9,Kg.bind(null,n,i,s,t),void 0,null),s},useId:function(){var e=rs(),t=We.identifierPrefix;if(ye){var s=bs,n=vs;s=(n&~(1<<32-Yt(n)-1)).toString(32)+s,t=":"+t+"R"+s,s=Xa++,0<s&&(t+="H"+s.toString(32)),t+=":"}else s=Mj++,t=":"+t+"r"+s.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Fj={readContext:Ut,useCallback:sx,useContext:Ut,useEffect:Zd,useImperativeHandle:tx,useInsertionEffect:Yg,useLayoutEffect:Zg,useMemo:nx,useReducer:gc,useRef:Jg,useState:function(){return gc(Ja)},useDebugValue:eh,useDeferredValue:function(e){var t=Bt();return rx(t,Ie.memoizedState,e)},useTransition:function(){var e=gc(Ja)[0],t=Bt().memoizedState;return[e,t]},useMutableSource:Hg,useSyncExternalStore:Wg,useId:ax,unstable_isNewReconciler:!1},Vj={readContext:Ut,useCallback:sx,useContext:Ut,useEffect:Zd,useImperativeHandle:tx,useInsertionEffect:Yg,useLayoutEffect:Zg,useMemo:nx,useReducer:xc,useRef:Jg,useState:function(){return xc(Ja)},useDebugValue:eh,useDeferredValue:function(e){var t=Bt();return Ie===null?t.memoizedState=e:rx(t,Ie.memoizedState,e)},useTransition:function(){var e=xc(Ja)[0],t=Bt().memoizedState;return[e,t]},useMutableSource:Hg,useSyncExternalStore:Wg,useId:ax,unstable_isNewReconciler:!1};function Wt(e,t){if(e&&e.defaultProps){t=Ce({},t),e=e.defaultProps;for(var s in e)t[s]===void 0&&(t[s]=e[s]);return t}return t}function wu(e,t,s,n){t=e.memoizedState,s=s(n,t),s=s==null?t:Ce({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var bo={isMounted:function(e){return(e=e._reactInternals)?Xn(e)===e:!1},enqueueSetState:function(e,t,s){e=e._reactInternals;var n=dt(),a=ln(e),i=ws(n,a);i.payload=t,s!=null&&(i.callback=s),t=rn(e,i,a),t!==null&&(Zt(t,e,a,n),dl(t,e,a))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var n=dt(),a=ln(e),i=ws(n,a);i.tag=1,i.payload=t,s!=null&&(i.callback=s),t=rn(e,i,a),t!==null&&(Zt(t,e,a,n),dl(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=dt(),n=ln(e),a=ws(s,n);a.tag=2,t!=null&&(a.callback=t),t=rn(e,a,n),t!==null&&(Zt(t,e,n,s),dl(t,e,n))}};function Gf(e,t,s,n,a,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,l):t.prototype&&t.prototype.isPureReactComponent?!Ha(s,n)||!Ha(a,i):!0}function cx(e,t,s){var n=!1,a=hn,i=t.contextType;return typeof i=="object"&&i!==null?i=Ut(i):(a=yt(t)?Bn:at.current,n=t.contextTypes,i=(n=n!=null)?Or(e,a):hn),t=new t(s,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bo,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function Xf(e,t,s,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,n),t.state!==e&&bo.enqueueReplaceState(t,t.state,null)}function Nu(e,t,s,n){var a=e.stateNode;a.props=s,a.state=e.memoizedState,a.refs={},qd(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=Ut(i):(i=yt(t)?Bn:at.current,a.context=Or(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(wu(e,t,i,s),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&bo.enqueueReplaceState(a,a.state,null),Vl(e,s,a,n),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function zr(e,t){try{var s="",n=t;do s+=f1(n),n=n.return;while(n);var a=s}catch(i){a=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:a,digest:null}}function yc(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function ku(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var zj=typeof WeakMap=="function"?WeakMap:Map;function ux(e,t,s){s=ws(-1,s),s.tag=3,s.payload={element:null};var n=t.value;return s.callback=function(){Hl||(Hl=!0,Lu=n),ku(e,t)},s}function dx(e,t,s){s=ws(-1,s),s.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var a=t.value;s.payload=function(){return n(a)},s.callback=function(){ku(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(s.callback=function(){ku(e,t),typeof n!="function"&&(an===null?an=new Set([this]):an.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),s}function Jf(e,t,s){var n=e.pingCache;if(n===null){n=e.pingCache=new zj;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(s)||(a.add(s),e=ew.bind(null,e,t,s),t.then(e,e))}function Yf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Zf(e,t,s,n,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=ws(-1,1),t.tag=2,rn(s,t,1))),s.lanes|=1),e)}var Uj=_s.ReactCurrentOwner,gt=!1;function ct(e,t,s,n){t.child=e===null?zg(t,null,s,n):Fr(t,e.child,s,n)}function em(e,t,s,n,a){s=s.render;var i=t.ref;return Nr(t,a),n=Jd(e,t,s,n,i,a),s=Yd(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Ps(e,t,a)):(ye&&s&&Vd(t),t.flags|=1,ct(e,t,n,a),t.child)}function tm(e,t,s,n,a){if(e===null){var i=s.type;return typeof i=="function"&&!oh(i)&&i.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=i,hx(e,t,i,n,a)):(e=xl(s.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var l=i.memoizedProps;if(s=s.compare,s=s!==null?s:Ha,s(l,n)&&e.ref===t.ref)return Ps(e,t,a)}return t.flags|=1,e=on(i,n),e.ref=t.ref,e.return=t,t.child=e}function hx(e,t,s,n,a){if(e!==null){var i=e.memoizedProps;if(Ha(i,n)&&e.ref===t.ref)if(gt=!1,t.pendingProps=n=i,(e.lanes&a)!==0)e.flags&131072&&(gt=!0);else return t.lanes=e.lanes,Ps(e,t,a)}return Su(e,t,s,n,a)}function fx(e,t,s){var n=t.pendingProps,a=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(mr,kt),kt|=s;else{if(!(s&1073741824))return e=i!==null?i.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(mr,kt),kt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:s,de(mr,kt),kt|=n}else i!==null?(n=i.baseLanes|s,t.memoizedState=null):n=s,de(mr,kt),kt|=n;return ct(e,t,a,s),t.child}function mx(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function Su(e,t,s,n,a){var i=yt(s)?Bn:at.current;return i=Or(t,i),Nr(t,a),s=Jd(e,t,s,n,i,a),n=Yd(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Ps(e,t,a)):(ye&&n&&Vd(t),t.flags|=1,ct(e,t,s,a),t.child)}function sm(e,t,s,n,a){if(yt(s)){var i=!0;Ll(t)}else i=!1;if(Nr(t,a),t.stateNode===null)ml(e,t),cx(t,s,n),Nu(t,s,n,a),n=!0;else if(e===null){var l=t.stateNode,o=t.memoizedProps;l.props=o;var c=l.context,u=s.contextType;typeof u=="object"&&u!==null?u=Ut(u):(u=yt(s)?Bn:at.current,u=Or(t,u));var d=s.getDerivedStateFromProps,h=typeof d=="function"||typeof l.getSnapshotBeforeUpdate=="function";h||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==n||c!==u)&&Xf(t,l,n,u),Us=!1;var f=t.memoizedState;l.state=f,Vl(t,n,l,a),c=t.memoizedState,o!==n||f!==c||xt.current||Us?(typeof d=="function"&&(wu(t,s,d,n),c=t.memoizedState),(o=Us||Gf(t,s,o,n,f,c,u))?(h||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),l.props=n,l.state=c,l.context=u,n=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{l=t.stateNode,Bg(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:Wt(t.type,o),l.props=u,h=t.pendingProps,f=l.context,c=s.contextType,typeof c=="object"&&c!==null?c=Ut(c):(c=yt(s)?Bn:at.current,c=Or(t,c));var b=s.getDerivedStateFromProps;(d=typeof b=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==h||f!==c)&&Xf(t,l,n,c),Us=!1,f=t.memoizedState,l.state=f,Vl(t,n,l,a);var g=t.memoizedState;o!==h||f!==g||xt.current||Us?(typeof b=="function"&&(wu(t,s,b,n),g=t.memoizedState),(u=Us||Gf(t,s,u,n,f,g,c)||!1)?(d||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(n,g,c),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(n,g,c)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),l.props=n,l.state=g,l.context=c,n=u):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return Cu(e,t,s,n,i,a)}function Cu(e,t,s,n,a,i){mx(e,t);var l=(t.flags&128)!==0;if(!n&&!l)return a&&Uf(t,s,!1),Ps(e,t,i);n=t.stateNode,Uj.current=t;var o=l&&typeof s.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&l?(t.child=Fr(t,e.child,null,i),t.child=Fr(t,null,o,i)):ct(e,t,o,i),t.memoizedState=n.state,a&&Uf(t,s,!0),t.child}function px(e){var t=e.stateNode;t.pendingContext?zf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zf(e,t.context,!1),Kd(e,t.containerInfo)}function nm(e,t,s,n,a){return Ir(),Ud(a),t.flags|=256,ct(e,t,s,n),t.child}var Eu={dehydrated:null,treeContext:null,retryLane:0};function Pu(e){return{baseLanes:e,cachePool:null,transitions:null}}function gx(e,t,s){var n=t.pendingProps,a=we.current,i=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(a&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),de(we,a&1),e===null)return bu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=n.children,e=n.fallback,i?(n=t.mode,i=t.child,l={mode:"hidden",children:l},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=No(l,n,0,null),e=Vn(e,n,s,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Pu(s),t.memoizedState=Eu,e):th(t,l));if(a=e.memoizedState,a!==null&&(o=a.dehydrated,o!==null))return Bj(e,t,l,n,o,a,s);if(i){i=n.fallback,l=t.mode,a=e.child,o=a.sibling;var c={mode:"hidden",children:n.children};return!(l&1)&&t.child!==a?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=on(a,c),n.subtreeFlags=a.subtreeFlags&14680064),o!==null?i=on(o,i):(i=Vn(i,l,s,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,l=e.child.memoizedState,l=l===null?Pu(s):{baseLanes:l.baseLanes|s,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~s,t.memoizedState=Eu,n}return i=e.child,e=i.sibling,n=on(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=s),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n}function th(e,t){return t=No({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Gi(e,t,s,n){return n!==null&&Ud(n),Fr(t,e.child,null,s),e=th(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bj(e,t,s,n,a,i,l){if(s)return t.flags&256?(t.flags&=-257,n=yc(Error(V(422))),Gi(e,t,l,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,a=t.mode,n=No({mode:"visible",children:n.children},a,0,null),i=Vn(i,a,l,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&Fr(t,e.child,null,l),t.child.memoizedState=Pu(l),t.memoizedState=Eu,i);if(!(t.mode&1))return Gi(e,t,l,null);if(a.data==="$!"){if(n=a.nextSibling&&a.nextSibling.dataset,n)var o=n.dgst;return n=o,i=Error(V(419)),n=yc(i,n,void 0),Gi(e,t,l,n)}if(o=(l&e.childLanes)!==0,gt||o){if(n=We,n!==null){switch(l&-l){case 4:a=2;break;case 16:a=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(n.suspendedLanes|l)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,Es(e,a),Zt(n,e,a,-1))}return lh(),n=yc(Error(V(421))),Gi(e,t,l,n)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=tw.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,St=nn(a.nextSibling),Ct=t,ye=!0,Xt=null,e!==null&&(It[Ft++]=vs,It[Ft++]=bs,It[Ft++]=$n,vs=e.id,bs=e.overflow,$n=t),t=th(t,n.children),t.flags|=4096,t)}function rm(e,t,s){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ju(e.return,t,s)}function vc(e,t,s,n,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:s,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=s,i.tailMode=a)}function xx(e,t,s){var n=t.pendingProps,a=n.revealOrder,i=n.tail;if(ct(e,t,n.children,s),n=we.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rm(e,s,t);else if(e.tag===19)rm(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(de(we,n),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(s=t.child,a=null;s!==null;)e=s.alternate,e!==null&&zl(e)===null&&(a=s),s=s.sibling;s=a,s===null?(a=t.child,t.child=null):(a=s.sibling,s.sibling=null),vc(t,!1,a,s,i);break;case"backwards":for(s=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&zl(e)===null){t.child=a;break}e=a.sibling,a.sibling=s,s=a,a=e}vc(t,!0,s,null,i);break;case"together":vc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ml(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ps(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Wn|=t.lanes,!(s&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,s=on(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=on(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function $j(e,t,s){switch(t.tag){case 3:px(t),Ir();break;case 5:$g(t);break;case 1:yt(t.type)&&Ll(t);break;case 4:Kd(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,a=t.memoizedProps.value;de(Il,n._currentValue),n._currentValue=a;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(de(we,we.current&1),t.flags|=128,null):s&t.child.childLanes?gx(e,t,s):(de(we,we.current&1),e=Ps(e,t,s),e!==null?e.sibling:null);de(we,we.current&1);break;case 19:if(n=(s&t.childLanes)!==0,e.flags&128){if(n)return xx(e,t,s);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),de(we,we.current),n)break;return null;case 22:case 23:return t.lanes=0,fx(e,t,s)}return Ps(e,t,s)}var yx,Tu,vx,bx;yx=function(e,t){for(var s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}};Tu=function(){};vx=function(e,t,s,n){var a=e.memoizedProps;if(a!==n){e=t.stateNode,Tn(us.current);var i=null;switch(s){case"input":a=Jc(e,a),n=Jc(e,n),i=[];break;case"select":a=Ce({},a,{value:void 0}),n=Ce({},n,{value:void 0}),i=[];break;case"textarea":a=eu(e,a),n=eu(e,n),i=[];break;default:typeof a.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Rl)}su(s,n);var l;s=null;for(u in a)if(!n.hasOwnProperty(u)&&a.hasOwnProperty(u)&&a[u]!=null)if(u==="style"){var o=a[u];for(l in o)o.hasOwnProperty(l)&&(s||(s={}),s[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ia.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var c=n[u];if(o=a!=null?a[u]:void 0,n.hasOwnProperty(u)&&c!==o&&(c!=null||o!=null))if(u==="style")if(o){for(l in o)!o.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(s||(s={}),s[l]="");for(l in c)c.hasOwnProperty(l)&&o[l]!==c[l]&&(s||(s={}),s[l]=c[l])}else s||(i||(i=[]),i.push(u,s)),s=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ia.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&ge("scroll",e),i||o===c||(i=[])):(i=i||[]).push(u,c))}s&&(i=i||[]).push("style",s);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};bx=function(e,t,s,n){s!==n&&(t.flags|=4)};function ha(e,t){if(!ye)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var n=null;s!==null;)s.alternate!==null&&(n=s),s=s.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,n=0;if(t)for(var a=e.child;a!==null;)s|=a.lanes|a.childLanes,n|=a.subtreeFlags&14680064,n|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)s|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=s,t}function Hj(e,t,s){var n=t.pendingProps;switch(zd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(t),null;case 1:return yt(t.type)&&Ml(),tt(t),null;case 3:return n=t.stateNode,Vr(),xe(xt),xe(at),Gd(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ki(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xt!==null&&(Iu(Xt),Xt=null))),Tu(e,t),tt(t),null;case 5:Qd(t);var a=Tn(Ga.current);if(s=t.type,e!==null&&t.stateNode!=null)vx(e,t,s,n,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(V(166));return tt(t),null}if(e=Tn(us.current),Ki(t)){n=t.stateNode,s=t.type;var i=t.memoizedProps;switch(n[os]=t,n[Ka]=i,e=(t.mode&1)!==0,s){case"dialog":ge("cancel",n),ge("close",n);break;case"iframe":case"object":case"embed":ge("load",n);break;case"video":case"audio":for(a=0;a<wa.length;a++)ge(wa[a],n);break;case"source":ge("error",n);break;case"img":case"image":case"link":ge("error",n),ge("load",n);break;case"details":ge("toggle",n);break;case"input":ff(n,i),ge("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},ge("invalid",n);break;case"textarea":pf(n,i),ge("invalid",n)}su(s,i),a=null;for(var l in i)if(i.hasOwnProperty(l)){var o=i[l];l==="children"?typeof o=="string"?n.textContent!==o&&(i.suppressHydrationWarning!==!0&&qi(n.textContent,o,e),a=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&qi(n.textContent,o,e),a=["children",""+o]):Ia.hasOwnProperty(l)&&o!=null&&l==="onScroll"&&ge("scroll",n)}switch(s){case"input":Fi(n),mf(n,i,!0);break;case"textarea":Fi(n),gf(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Rl)}n=a,t.updateQueue=n,n!==null&&(t.flags|=4)}else{l=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Q0(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=l.createElement(s,{is:n.is}):(e=l.createElement(s),s==="select"&&(l=e,n.multiple?l.multiple=!0:n.size&&(l.size=n.size))):e=l.createElementNS(e,s),e[os]=t,e[Ka]=n,yx(e,t,!1,!1),t.stateNode=e;e:{switch(l=nu(s,n),s){case"dialog":ge("cancel",e),ge("close",e),a=n;break;case"iframe":case"object":case"embed":ge("load",e),a=n;break;case"video":case"audio":for(a=0;a<wa.length;a++)ge(wa[a],e);a=n;break;case"source":ge("error",e),a=n;break;case"img":case"image":case"link":ge("error",e),ge("load",e),a=n;break;case"details":ge("toggle",e),a=n;break;case"input":ff(e,n),a=Jc(e,n),ge("invalid",e);break;case"option":a=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=Ce({},n,{value:void 0}),ge("invalid",e);break;case"textarea":pf(e,n),a=eu(e,n),ge("invalid",e);break;default:a=n}su(s,a),o=a;for(i in o)if(o.hasOwnProperty(i)){var c=o[i];i==="style"?J0(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&G0(e,c)):i==="children"?typeof c=="string"?(s!=="textarea"||c!=="")&&Fa(e,c):typeof c=="number"&&Fa(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ia.hasOwnProperty(i)?c!=null&&i==="onScroll"&&ge("scroll",e):c!=null&&Sd(e,i,c,l))}switch(s){case"input":Fi(e),mf(e,n,!1);break;case"textarea":Fi(e),gf(e);break;case"option":n.value!=null&&e.setAttribute("value",""+dn(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?vr(e,!!n.multiple,i,!1):n.defaultValue!=null&&vr(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=Rl)}switch(s){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return tt(t),null;case 6:if(e&&t.stateNode!=null)bx(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(V(166));if(s=Tn(Ga.current),Tn(us.current),Ki(t)){if(n=t.stateNode,s=t.memoizedProps,n[os]=t,(i=n.nodeValue!==s)&&(e=Ct,e!==null))switch(e.tag){case 3:qi(n.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qi(n.nodeValue,s,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(s.nodeType===9?s:s.ownerDocument).createTextNode(n),n[os]=t,t.stateNode=n}return tt(t),null;case 13:if(xe(we),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ye&&St!==null&&t.mode&1&&!(t.flags&128))Fg(),Ir(),t.flags|=98560,i=!1;else if(i=Ki(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(V(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(V(317));i[os]=t}else Ir(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;tt(t),i=!1}else Xt!==null&&(Iu(Xt),Xt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=s,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Fe===0&&(Fe=3):lh())),t.updateQueue!==null&&(t.flags|=4),tt(t),null);case 4:return Vr(),Tu(e,t),e===null&&Wa(t.stateNode.containerInfo),tt(t),null;case 10:return Hd(t.type._context),tt(t),null;case 17:return yt(t.type)&&Ml(),tt(t),null;case 19:if(xe(we),i=t.memoizedState,i===null)return tt(t),null;if(n=(t.flags&128)!==0,l=i.rendering,l===null)if(n)ha(i,!1);else{if(Fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=zl(e),l!==null){for(t.flags|=128,ha(i,!1),n=l.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=s,s=t.child;s!==null;)i=s,e=n,i.flags&=14680066,l=i.alternate,l===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return de(we,we.current&1|2),t.child}e=e.sibling}i.tail!==null&&Te()>Ur&&(t.flags|=128,n=!0,ha(i,!1),t.lanes=4194304)}else{if(!n)if(e=zl(l),e!==null){if(t.flags|=128,n=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),ha(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!ye)return tt(t),null}else 2*Te()-i.renderingStartTime>Ur&&s!==1073741824&&(t.flags|=128,n=!0,ha(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(s=i.last,s!==null?s.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Te(),t.sibling=null,s=we.current,de(we,n?s&1|2:s&1),t):(tt(t),null);case 22:case 23:return ih(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?kt&1073741824&&(tt(t),t.subtreeFlags&6&&(t.flags|=8192)):tt(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function Wj(e,t){switch(zd(t),t.tag){case 1:return yt(t.type)&&Ml(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vr(),xe(xt),xe(at),Gd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Qd(t),null;case 13:if(xe(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));Ir()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xe(we),null;case 4:return Vr(),null;case 10:return Hd(t.type._context),null;case 22:case 23:return ih(),null;case 24:return null;default:return null}}var Xi=!1,nt=!1,qj=typeof WeakSet=="function"?WeakSet:Set,K=null;function fr(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(n){Pe(e,t,n)}else s.current=null}function _u(e,t,s){try{s()}catch(n){Pe(e,t,n)}}var am=!1;function Kj(e,t){if(fu=Tl,e=Sg(),Fd(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var n=s.getSelection&&s.getSelection();if(n&&n.rangeCount!==0){s=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{s.nodeType,i.nodeType}catch{s=null;break e}var l=0,o=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var b;h!==s||a!==0&&h.nodeType!==3||(o=l+a),h!==i||n!==0&&h.nodeType!==3||(c=l+n),h.nodeType===3&&(l+=h.nodeValue.length),(b=h.firstChild)!==null;)f=h,h=b;for(;;){if(h===e)break t;if(f===s&&++u===a&&(o=l),f===i&&++d===n&&(c=l),(b=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=b}s=o===-1||c===-1?null:{start:o,end:c}}else s=null}s=s||{start:0,end:0}}else s=null;for(mu={focusedElem:e,selectionRange:s},Tl=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,w=g.memoizedState,x=t.stateNode,m=x.getSnapshotBeforeUpdate(t.elementType===t.type?v:Wt(t.type,v),w);x.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(j){Pe(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return g=am,am=!1,g}function _a(e,t,s){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&_u(t,s,i)}a=a.next}while(a!==n)}}function jo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var n=s.create;s.destroy=n()}s=s.next}while(s!==t)}}function Au(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function jx(e){var t=e.alternate;t!==null&&(e.alternate=null,jx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[os],delete t[Ka],delete t[xu],delete t[Tj],delete t[_j])),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 wx(e){return e.tag===5||e.tag===3||e.tag===4}function im(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wx(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 Ru(e,t,s){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=Rl));else if(n!==4&&(e=e.child,e!==null))for(Ru(e,t,s),e=e.sibling;e!==null;)Ru(e,t,s),e=e.sibling}function Mu(e,t,s){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Mu(e,t,s),e=e.sibling;e!==null;)Mu(e,t,s),e=e.sibling}var Ke=null,Gt=!1;function Ds(e,t,s){for(s=s.child;s!==null;)Nx(e,t,s),s=s.sibling}function Nx(e,t,s){if(cs&&typeof cs.onCommitFiberUnmount=="function")try{cs.onCommitFiberUnmount(fo,s)}catch{}switch(s.tag){case 5:nt||fr(s,t);case 6:var n=Ke,a=Gt;Ke=null,Ds(e,t,s),Ke=n,Gt=a,Ke!==null&&(Gt?(e=Ke,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):Ke.removeChild(s.stateNode));break;case 18:Ke!==null&&(Gt?(e=Ke,s=s.stateNode,e.nodeType===8?hc(e.parentNode,s):e.nodeType===1&&hc(e,s),Ba(e)):hc(Ke,s.stateNode));break;case 4:n=Ke,a=Gt,Ke=s.stateNode.containerInfo,Gt=!0,Ds(e,t,s),Ke=n,Gt=a;break;case 0:case 11:case 14:case 15:if(!nt&&(n=s.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&_u(s,t,l),a=a.next}while(a!==n)}Ds(e,t,s);break;case 1:if(!nt&&(fr(s,t),n=s.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=s.memoizedProps,n.state=s.memoizedState,n.componentWillUnmount()}catch(o){Pe(s,t,o)}Ds(e,t,s);break;case 21:Ds(e,t,s);break;case 22:s.mode&1?(nt=(n=nt)||s.memoizedState!==null,Ds(e,t,s),nt=n):Ds(e,t,s);break;default:Ds(e,t,s)}}function lm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new qj),t.forEach(function(n){var a=sw.bind(null,e,n);s.has(n)||(s.add(n),n.then(a,a))})}}function Ht(e,t){var s=t.deletions;if(s!==null)for(var n=0;n<s.length;n++){var a=s[n];try{var i=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 5:Ke=o.stateNode,Gt=!1;break e;case 3:Ke=o.stateNode.containerInfo,Gt=!0;break e;case 4:Ke=o.stateNode.containerInfo,Gt=!0;break e}o=o.return}if(Ke===null)throw Error(V(160));Nx(i,l,a),Ke=null,Gt=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(u){Pe(a,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)kx(t,e),t=t.sibling}function kx(e,t){var s=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ht(t,e),ss(e),n&4){try{_a(3,e,e.return),jo(3,e)}catch(v){Pe(e,e.return,v)}try{_a(5,e,e.return)}catch(v){Pe(e,e.return,v)}}break;case 1:Ht(t,e),ss(e),n&512&&s!==null&&fr(s,s.return);break;case 5:if(Ht(t,e),ss(e),n&512&&s!==null&&fr(s,s.return),e.flags&32){var a=e.stateNode;try{Fa(a,"")}catch(v){Pe(e,e.return,v)}}if(n&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,l=s!==null?s.memoizedProps:i,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&q0(a,i),nu(o,l);var u=nu(o,i);for(l=0;l<c.length;l+=2){var d=c[l],h=c[l+1];d==="style"?J0(a,h):d==="dangerouslySetInnerHTML"?G0(a,h):d==="children"?Fa(a,h):Sd(a,d,h,u)}switch(o){case"input":Yc(a,i);break;case"textarea":K0(a,i);break;case"select":var f=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var b=i.value;b!=null?vr(a,!!i.multiple,b,!1):f!==!!i.multiple&&(i.defaultValue!=null?vr(a,!!i.multiple,i.defaultValue,!0):vr(a,!!i.multiple,i.multiple?[]:"",!1))}a[Ka]=i}catch(v){Pe(e,e.return,v)}}break;case 6:if(Ht(t,e),ss(e),n&4){if(e.stateNode===null)throw Error(V(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(v){Pe(e,e.return,v)}}break;case 3:if(Ht(t,e),ss(e),n&4&&s!==null&&s.memoizedState.isDehydrated)try{Ba(t.containerInfo)}catch(v){Pe(e,e.return,v)}break;case 4:Ht(t,e),ss(e);break;case 13:Ht(t,e),ss(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(rh=Te())),n&4&&lm(e);break;case 22:if(d=s!==null&&s.memoizedState!==null,e.mode&1?(nt=(u=nt)||d,Ht(t,e),nt=u):Ht(t,e),ss(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(K=e,d=e.child;d!==null;){for(h=K=d;K!==null;){switch(f=K,b=f.child,f.tag){case 0:case 11:case 14:case 15:_a(4,f,f.return);break;case 1:fr(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){n=f,s=f.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(v){Pe(n,s,v)}}break;case 5:fr(f,f.return);break;case 22:if(f.memoizedState!==null){cm(h);continue}}b!==null?(b.return=f,K=b):cm(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{a=h.stateNode,u?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=h.stateNode,c=h.memoizedProps.style,l=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=X0("display",l))}catch(v){Pe(e,e.return,v)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(v){Pe(e,e.return,v)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Ht(t,e),ss(e),n&4&&lm(e);break;case 21:break;default:Ht(t,e),ss(e)}}function ss(e){var t=e.flags;if(t&2){try{e:{for(var s=e.return;s!==null;){if(wx(s)){var n=s;break e}s=s.return}throw Error(V(160))}switch(n.tag){case 5:var a=n.stateNode;n.flags&32&&(Fa(a,""),n.flags&=-33);var i=im(e);Mu(e,i,a);break;case 3:case 4:var l=n.stateNode.containerInfo,o=im(e);Ru(e,o,l);break;default:throw Error(V(161))}}catch(c){Pe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qj(e,t,s){K=e,Sx(e)}function Sx(e,t,s){for(var n=(e.mode&1)!==0;K!==null;){var a=K,i=a.child;if(a.tag===22&&n){var l=a.memoizedState!==null||Xi;if(!l){var o=a.alternate,c=o!==null&&o.memoizedState!==null||nt;o=Xi;var u=nt;if(Xi=l,(nt=c)&&!u)for(K=a;K!==null;)l=K,c=l.child,l.tag===22&&l.memoizedState!==null?um(a):c!==null?(c.return=l,K=c):um(a);for(;i!==null;)K=i,Sx(i),i=i.sibling;K=a,Xi=o,nt=u}om(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,K=i):om(e)}}function om(e){for(;K!==null;){var t=K;if(t.flags&8772){var s=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:nt||jo(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!nt)if(s===null)n.componentDidMount();else{var a=t.elementType===t.type?s.memoizedProps:Wt(t.type,s.memoizedProps);n.componentDidUpdate(a,s.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&qf(t,i,n);break;case 3:var l=t.updateQueue;if(l!==null){if(s=null,t.child!==null)switch(t.child.tag){case 5:s=t.child.stateNode;break;case 1:s=t.child.stateNode}qf(t,l,s)}break;case 5:var o=t.stateNode;if(s===null&&t.flags&4){s=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&s.focus();break;case"img":c.src&&(s.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Ba(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}nt||t.flags&512&&Au(t)}catch(f){Pe(t,t.return,f)}}if(t===e){K=null;break}if(s=t.sibling,s!==null){s.return=t.return,K=s;break}K=t.return}}function cm(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var s=t.sibling;if(s!==null){s.return=t.return,K=s;break}K=t.return}}function um(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{jo(4,t)}catch(c){Pe(t,s,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var a=t.return;try{n.componentDidMount()}catch(c){Pe(t,a,c)}}var i=t.return;try{Au(t)}catch(c){Pe(t,i,c)}break;case 5:var l=t.return;try{Au(t)}catch(c){Pe(t,l,c)}}}catch(c){Pe(t,t.return,c)}if(t===e){K=null;break}var o=t.sibling;if(o!==null){o.return=t.return,K=o;break}K=t.return}}var Gj=Math.ceil,$l=_s.ReactCurrentDispatcher,sh=_s.ReactCurrentOwner,zt=_s.ReactCurrentBatchConfig,ie=0,We=null,Oe=null,Qe=0,kt=0,mr=xn(0),Fe=0,Za=null,Wn=0,wo=0,nh=0,Aa=null,pt=null,rh=0,Ur=1/0,gs=null,Hl=!1,Lu=null,an=null,Ji=!1,Ys=null,Wl=0,Ra=0,Du=null,pl=-1,gl=0;function dt(){return ie&6?Te():pl!==-1?pl:pl=Te()}function ln(e){return e.mode&1?ie&2&&Qe!==0?Qe&-Qe:Rj.transition!==null?(gl===0&&(gl=cg()),gl):(e=le,e!==0||(e=window.event,e=e===void 0?16:gg(e.type)),e):1}function Zt(e,t,s,n){if(50<Ra)throw Ra=0,Du=null,Error(V(185));yi(e,s,n),(!(ie&2)||e!==We)&&(e===We&&(!(ie&2)&&(wo|=s),Fe===4&&Hs(e,Qe)),vt(e,n),s===1&&ie===0&&!(t.mode&1)&&(Ur=Te()+500,yo&&yn()))}function vt(e,t){var s=e.callbackNode;R1(e,t);var n=Pl(e,e===We?Qe:0);if(n===0)s!==null&&vf(s),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(s!=null&&vf(s),t===1)e.tag===0?Aj(dm.bind(null,e)):Dg(dm.bind(null,e)),Ej(function(){!(ie&6)&&yn()}),s=null;else{switch(ug(n)){case 1:s=_d;break;case 4:s=lg;break;case 16:s=El;break;case 536870912:s=og;break;default:s=El}s=Mx(s,Cx.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function Cx(e,t){if(pl=-1,gl=0,ie&6)throw Error(V(327));var s=e.callbackNode;if(kr()&&e.callbackNode!==s)return null;var n=Pl(e,e===We?Qe:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=ql(e,n);else{t=n;var a=ie;ie|=2;var i=Px();(We!==e||Qe!==t)&&(gs=null,Ur=Te()+500,Fn(e,t));do try{Yj();break}catch(o){Ex(e,o)}while(!0);$d(),$l.current=i,ie=a,Oe!==null?t=0:(We=null,Qe=0,t=Fe)}if(t!==0){if(t===2&&(a=ou(e),a!==0&&(n=a,t=Ou(e,a))),t===1)throw s=Za,Fn(e,0),Hs(e,n),vt(e,Te()),s;if(t===6)Hs(e,n);else{if(a=e.current.alternate,!(n&30)&&!Xj(a)&&(t=ql(e,n),t===2&&(i=ou(e),i!==0&&(n=i,t=Ou(e,i))),t===1))throw s=Za,Fn(e,0),Hs(e,n),vt(e,Te()),s;switch(e.finishedWork=a,e.finishedLanes=n,t){case 0:case 1:throw Error(V(345));case 2:Nn(e,pt,gs);break;case 3:if(Hs(e,n),(n&130023424)===n&&(t=rh+500-Te(),10<t)){if(Pl(e,0)!==0)break;if(a=e.suspendedLanes,(a&n)!==n){dt(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=gu(Nn.bind(null,e,pt,gs),t);break}Nn(e,pt,gs);break;case 4:if(Hs(e,n),(n&4194240)===n)break;for(t=e.eventTimes,a=-1;0<n;){var l=31-Yt(n);i=1<<l,l=t[l],l>a&&(a=l),n&=~i}if(n=a,n=Te()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Gj(n/1960))-n,10<n){e.timeoutHandle=gu(Nn.bind(null,e,pt,gs),n);break}Nn(e,pt,gs);break;case 5:Nn(e,pt,gs);break;default:throw Error(V(329))}}}return vt(e,Te()),e.callbackNode===s?Cx.bind(null,e):null}function Ou(e,t){var s=Aa;return e.current.memoizedState.isDehydrated&&(Fn(e,t).flags|=256),e=ql(e,t),e!==2&&(t=pt,pt=s,t!==null&&Iu(t)),e}function Iu(e){pt===null?pt=e:pt.push.apply(pt,e)}function Xj(e){for(var t=e;;){if(t.flags&16384){var s=t.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var n=0;n<s.length;n++){var a=s[n],i=a.getSnapshot;a=a.value;try{if(!es(i(),a))return!1}catch{return!1}}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Hs(e,t){for(t&=~nh,t&=~wo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-Yt(t),n=1<<s;e[s]=-1,t&=~n}}function dm(e){if(ie&6)throw Error(V(327));kr();var t=Pl(e,0);if(!(t&1))return vt(e,Te()),null;var s=ql(e,t);if(e.tag!==0&&s===2){var n=ou(e);n!==0&&(t=n,s=Ou(e,n))}if(s===1)throw s=Za,Fn(e,0),Hs(e,t),vt(e,Te()),s;if(s===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nn(e,pt,gs),vt(e,Te()),null}function ah(e,t){var s=ie;ie|=1;try{return e(t)}finally{ie=s,ie===0&&(Ur=Te()+500,yo&&yn())}}function qn(e){Ys!==null&&Ys.tag===0&&!(ie&6)&&kr();var t=ie;ie|=1;var s=zt.transition,n=le;try{if(zt.transition=null,le=1,e)return e()}finally{le=n,zt.transition=s,ie=t,!(ie&6)&&yn()}}function ih(){kt=mr.current,xe(mr)}function Fn(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,Cj(s)),Oe!==null)for(s=Oe.return;s!==null;){var n=s;switch(zd(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Ml();break;case 3:Vr(),xe(xt),xe(at),Gd();break;case 5:Qd(n);break;case 4:Vr();break;case 13:xe(we);break;case 19:xe(we);break;case 10:Hd(n.type._context);break;case 22:case 23:ih()}s=s.return}if(We=e,Oe=e=on(e.current,null),Qe=kt=t,Fe=0,Za=null,nh=wo=Wn=0,pt=Aa=null,Pn!==null){for(t=0;t<Pn.length;t++)if(s=Pn[t],n=s.interleaved,n!==null){s.interleaved=null;var a=n.next,i=s.pending;if(i!==null){var l=i.next;i.next=a,n.next=l}s.pending=n}Pn=null}return e}function Ex(e,t){do{var s=Oe;try{if($d(),hl.current=Bl,Ul){for(var n=ke.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}Ul=!1}if(Hn=0,Be=Ie=ke=null,Ta=!1,Xa=0,sh.current=null,s===null||s.return===null){Fe=1,Za=t,Oe=null;break}e:{var i=e,l=s.return,o=s,c=t;if(t=Qe,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=o,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var b=Yf(l);if(b!==null){b.flags&=-257,Zf(b,l,o,i,t),b.mode&1&&Jf(i,u,t),t=b,c=u;var g=t.updateQueue;if(g===null){var v=new Set;v.add(c),t.updateQueue=v}else g.add(c);break e}else{if(!(t&1)){Jf(i,u,t),lh();break e}c=Error(V(426))}}else if(ye&&o.mode&1){var w=Yf(l);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Zf(w,l,o,i,t),Ud(zr(c,o));break e}}i=c=zr(c,o),Fe!==4&&(Fe=2),Aa===null?Aa=[i]:Aa.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=ux(i,c,t);Wf(i,x);break e;case 1:o=c;var m=i.type,p=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(an===null||!an.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var j=dx(i,o,t);Wf(i,j);break e}}i=i.return}while(i!==null)}_x(s)}catch(k){t=k,Oe===s&&s!==null&&(Oe=s=s.return);continue}break}while(!0)}function Px(){var e=$l.current;return $l.current=Bl,e===null?Bl:e}function lh(){(Fe===0||Fe===3||Fe===2)&&(Fe=4),We===null||!(Wn&268435455)&&!(wo&268435455)||Hs(We,Qe)}function ql(e,t){var s=ie;ie|=2;var n=Px();(We!==e||Qe!==t)&&(gs=null,Fn(e,t));do try{Jj();break}catch(a){Ex(e,a)}while(!0);if($d(),ie=s,$l.current=n,Oe!==null)throw Error(V(261));return We=null,Qe=0,Fe}function Jj(){for(;Oe!==null;)Tx(Oe)}function Yj(){for(;Oe!==null&&!N1();)Tx(Oe)}function Tx(e){var t=Rx(e.alternate,e,kt);e.memoizedProps=e.pendingProps,t===null?_x(e):Oe=t,sh.current=null}function _x(e){var t=e;do{var s=t.alternate;if(e=t.return,t.flags&32768){if(s=Wj(s,t),s!==null){s.flags&=32767,Oe=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fe=6,Oe=null;return}}else if(s=Hj(s,t,kt),s!==null){Oe=s;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);Fe===0&&(Fe=5)}function Nn(e,t,s){var n=le,a=zt.transition;try{zt.transition=null,le=1,Zj(e,t,s,n)}finally{zt.transition=a,le=n}return null}function Zj(e,t,s,n){do kr();while(Ys!==null);if(ie&6)throw Error(V(327));s=e.finishedWork;var a=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(V(177));e.callbackNode=null,e.callbackPriority=0;var i=s.lanes|s.childLanes;if(M1(e,i),e===We&&(Oe=We=null,Qe=0),!(s.subtreeFlags&2064)&&!(s.flags&2064)||Ji||(Ji=!0,Mx(El,function(){return kr(),null})),i=(s.flags&15990)!==0,s.subtreeFlags&15990||i){i=zt.transition,zt.transition=null;var l=le;le=1;var o=ie;ie|=4,sh.current=null,Kj(e,s),kx(s,e),vj(mu),Tl=!!fu,mu=fu=null,e.current=s,Qj(s),k1(),ie=o,le=l,zt.transition=i}else e.current=s;if(Ji&&(Ji=!1,Ys=e,Wl=a),i=e.pendingLanes,i===0&&(an=null),E1(s.stateNode),vt(e,Te()),t!==null)for(n=e.onRecoverableError,s=0;s<t.length;s++)a=t[s],n(a.value,{componentStack:a.stack,digest:a.digest});if(Hl)throw Hl=!1,e=Lu,Lu=null,e;return Wl&1&&e.tag!==0&&kr(),i=e.pendingLanes,i&1?e===Du?Ra++:(Ra=0,Du=e):Ra=0,yn(),null}function kr(){if(Ys!==null){var e=ug(Wl),t=zt.transition,s=le;try{if(zt.transition=null,le=16>e?16:e,Ys===null)var n=!1;else{if(e=Ys,Ys=null,Wl=0,ie&6)throw Error(V(331));var a=ie;for(ie|=4,K=e.current;K!==null;){var i=K,l=i.child;if(K.flags&16){var o=i.deletions;if(o!==null){for(var c=0;c<o.length;c++){var u=o[c];for(K=u;K!==null;){var d=K;switch(d.tag){case 0:case 11:case 15:_a(8,d,i)}var h=d.child;if(h!==null)h.return=d,K=h;else for(;K!==null;){d=K;var f=d.sibling,b=d.return;if(jx(d),d===u){K=null;break}if(f!==null){f.return=b,K=f;break}K=b}}}var g=i.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}K=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,K=l;else e:for(;K!==null;){if(i=K,i.flags&2048)switch(i.tag){case 0:case 11:case 15:_a(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,K=x;break e}K=i.return}}var m=e.current;for(K=m;K!==null;){l=K;var p=l.child;if(l.subtreeFlags&2064&&p!==null)p.return=l,K=p;else e:for(l=m;K!==null;){if(o=K,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:jo(9,o)}}catch(k){Pe(o,o.return,k)}if(o===l){K=null;break e}var j=o.sibling;if(j!==null){j.return=o.return,K=j;break e}K=o.return}}if(ie=a,yn(),cs&&typeof cs.onPostCommitFiberRoot=="function")try{cs.onPostCommitFiberRoot(fo,e)}catch{}n=!0}return n}finally{le=s,zt.transition=t}}return!1}function hm(e,t,s){t=zr(s,t),t=ux(e,t,1),e=rn(e,t,1),t=dt(),e!==null&&(yi(e,1,t),vt(e,t))}function Pe(e,t,s){if(e.tag===3)hm(e,e,s);else for(;t!==null;){if(t.tag===3){hm(t,e,s);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(an===null||!an.has(n))){e=zr(s,e),e=dx(t,e,1),t=rn(t,e,1),e=dt(),t!==null&&(yi(t,1,e),vt(t,e));break}}t=t.return}}function ew(e,t,s){var n=e.pingCache;n!==null&&n.delete(t),t=dt(),e.pingedLanes|=e.suspendedLanes&s,We===e&&(Qe&s)===s&&(Fe===4||Fe===3&&(Qe&130023424)===Qe&&500>Te()-rh?Fn(e,0):nh|=s),vt(e,t)}function Ax(e,t){t===0&&(e.mode&1?(t=Ui,Ui<<=1,!(Ui&130023424)&&(Ui=4194304)):t=1);var s=dt();e=Es(e,t),e!==null&&(yi(e,t,s),vt(e,s))}function tw(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Ax(e,s)}function sw(e,t){var s=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(s=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(V(314))}n!==null&&n.delete(t),Ax(e,s)}var Rx;Rx=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||xt.current)gt=!0;else{if(!(e.lanes&s)&&!(t.flags&128))return gt=!1,$j(e,t,s);gt=!!(e.flags&131072)}else gt=!1,ye&&t.flags&1048576&&Og(t,Ol,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ml(e,t),e=t.pendingProps;var a=Or(t,at.current);Nr(t,s),a=Jd(null,t,n,e,a,s);var i=Yd();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yt(n)?(i=!0,Ll(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,qd(t),a.updater=bo,t.stateNode=a,a._reactInternals=t,Nu(t,n,e,s),t=Cu(null,t,n,!0,i,s)):(t.tag=0,ye&&i&&Vd(t),ct(null,t,a,s),t=t.child),t;case 16:n=t.elementType;e:{switch(ml(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=rw(n),e=Wt(n,e),a){case 0:t=Su(null,t,n,e,s);break e;case 1:t=sm(null,t,n,e,s);break e;case 11:t=em(null,t,n,e,s);break e;case 14:t=tm(null,t,n,Wt(n.type,e),s);break e}throw Error(V(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Wt(n,a),Su(e,t,n,a,s);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Wt(n,a),sm(e,t,n,a,s);case 3:e:{if(px(t),e===null)throw Error(V(387));n=t.pendingProps,i=t.memoizedState,a=i.element,Bg(e,t),Vl(t,n,null,s);var l=t.memoizedState;if(n=l.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=zr(Error(V(423)),t),t=nm(e,t,n,s,a);break e}else if(n!==a){a=zr(Error(V(424)),t),t=nm(e,t,n,s,a);break e}else for(St=nn(t.stateNode.containerInfo.firstChild),Ct=t,ye=!0,Xt=null,s=zg(t,null,n,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ir(),n===a){t=Ps(e,t,s);break e}ct(e,t,n,s)}t=t.child}return t;case 5:return $g(t),e===null&&bu(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,l=a.children,pu(n,a)?l=null:i!==null&&pu(n,i)&&(t.flags|=32),mx(e,t),ct(e,t,l,s),t.child;case 6:return e===null&&bu(t),null;case 13:return gx(e,t,s);case 4:return Kd(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Fr(t,null,n,s):ct(e,t,n,s),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Wt(n,a),em(e,t,n,a,s);case 7:return ct(e,t,t.pendingProps,s),t.child;case 8:return ct(e,t,t.pendingProps.children,s),t.child;case 12:return ct(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,l=a.value,de(Il,n._currentValue),n._currentValue=l,i!==null)if(es(i.value,l)){if(i.children===a.children&&!xt.current){t=Ps(e,t,s);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var c=o.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=ws(-1,s&-s),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=s,c=i.alternate,c!==null&&(c.lanes|=s),ju(i.return,s,t),o.lanes|=s;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(V(341));l.lanes|=s,o=l.alternate,o!==null&&(o.lanes|=s),ju(l,s,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}ct(e,t,a.children,s),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,Nr(t,s),a=Ut(a),n=n(a),t.flags|=1,ct(e,t,n,s),t.child;case 14:return n=t.type,a=Wt(n,t.pendingProps),a=Wt(n.type,a),tm(e,t,n,a,s);case 15:return hx(e,t,t.type,t.pendingProps,s);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Wt(n,a),ml(e,t),t.tag=1,yt(n)?(e=!0,Ll(t)):e=!1,Nr(t,s),cx(t,n,a),Nu(t,n,a,s),Cu(null,t,n,!0,e,s);case 19:return xx(e,t,s);case 22:return fx(e,t,s)}throw Error(V(156,t.tag))};function Mx(e,t){return ig(e,t)}function nw(e,t,s,n){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,s,n){return new nw(e,t,s,n)}function oh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rw(e){if(typeof e=="function")return oh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ed)return 11;if(e===Pd)return 14}return 2}function on(e,t){var s=e.alternate;return s===null?(s=Vt(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function xl(e,t,s,n,a,i){var l=2;if(n=e,typeof e=="function")oh(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case rr:return Vn(s.children,a,i,t);case Cd:l=8,a|=8;break;case Kc:return e=Vt(12,s,t,a|2),e.elementType=Kc,e.lanes=i,e;case Qc:return e=Vt(13,s,t,a),e.elementType=Qc,e.lanes=i,e;case Gc:return e=Vt(19,s,t,a),e.elementType=Gc,e.lanes=i,e;case $0:return No(s,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U0:l=10;break e;case B0:l=9;break e;case Ed:l=11;break e;case Pd:l=14;break e;case zs:l=16,n=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=Vt(l,s,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function Vn(e,t,s,n){return e=Vt(7,e,n,t),e.lanes=s,e}function No(e,t,s,n){return e=Vt(22,e,n,t),e.elementType=$0,e.lanes=s,e.stateNode={isHidden:!1},e}function bc(e,t,s){return e=Vt(6,e,null,t),e.lanes=s,e}function jc(e,t,s){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function aw(e,t,s,n,a){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=tc(0),this.expirationTimes=tc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tc(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function ch(e,t,s,n,a,i,l,o,c){return e=new aw(e,t,s,o,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Vt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},qd(i),e}function iw(e,t,s){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:nr,key:n==null?null:""+n,children:e,containerInfo:t,implementation:s}}function Lx(e){if(!e)return hn;e=e._reactInternals;e:{if(Xn(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(yt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var s=e.type;if(yt(s))return Lg(e,s,t)}return t}function Dx(e,t,s,n,a,i,l,o,c){return e=ch(s,n,!0,e,a,i,l,o,c),e.context=Lx(null),s=e.current,n=dt(),a=ln(s),i=ws(n,a),i.callback=t??null,rn(s,i,a),e.current.lanes=a,yi(e,a,n),vt(e,n),e}function ko(e,t,s,n){var a=t.current,i=dt(),l=ln(a);return s=Lx(s),t.context===null?t.context=s:t.pendingContext=s,t=ws(i,l),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=rn(a,t,l),e!==null&&(Zt(e,a,l,i),dl(e,a,l)),l}function Kl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function fm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function uh(e,t){fm(e,t),(e=e.alternate)&&fm(e,t)}function lw(){return null}var Ox=typeof reportError=="function"?reportError:function(e){console.error(e)};function dh(e){this._internalRoot=e}So.prototype.render=dh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));ko(e,t,null,null)};So.prototype.unmount=dh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qn(function(){ko(null,e,null,null)}),t[Cs]=null}};function So(e){this._internalRoot=e}So.prototype.unstable_scheduleHydration=function(e){if(e){var t=fg();e={blockedOn:null,target:e,priority:t};for(var s=0;s<$s.length&&t!==0&&t<$s[s].priority;s++);$s.splice(s,0,e),s===0&&pg(e)}};function hh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Co(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mm(){}function ow(e,t,s,n,a){if(a){if(typeof n=="function"){var i=n;n=function(){var u=Kl(l);i.call(u)}}var l=Dx(t,n,e,0,null,!1,!1,"",mm);return e._reactRootContainer=l,e[Cs]=l.current,Wa(e.nodeType===8?e.parentNode:e),qn(),l}for(;a=e.lastChild;)e.removeChild(a);if(typeof n=="function"){var o=n;n=function(){var u=Kl(c);o.call(u)}}var c=ch(e,0,!1,null,null,!1,!1,"",mm);return e._reactRootContainer=c,e[Cs]=c.current,Wa(e.nodeType===8?e.parentNode:e),qn(function(){ko(t,c,s,n)}),c}function Eo(e,t,s,n,a){var i=s._reactRootContainer;if(i){var l=i;if(typeof a=="function"){var o=a;a=function(){var c=Kl(l);o.call(c)}}ko(t,l,e,a)}else l=ow(s,t,e,a,n);return Kl(l)}dg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=ja(t.pendingLanes);s!==0&&(Ad(t,s|1),vt(t,Te()),!(ie&6)&&(Ur=Te()+500,yn()))}break;case 13:qn(function(){var n=Es(e,1);if(n!==null){var a=dt();Zt(n,e,1,a)}}),uh(e,1)}};Rd=function(e){if(e.tag===13){var t=Es(e,134217728);if(t!==null){var s=dt();Zt(t,e,134217728,s)}uh(e,134217728)}};hg=function(e){if(e.tag===13){var t=ln(e),s=Es(e,t);if(s!==null){var n=dt();Zt(s,e,t,n)}uh(e,t)}};fg=function(){return le};mg=function(e,t){var s=le;try{return le=e,t()}finally{le=s}};au=function(e,t,s){switch(t){case"input":if(Yc(e,s),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var n=s[t];if(n!==e&&n.form===e.form){var a=xo(n);if(!a)throw Error(V(90));W0(n),Yc(n,a)}}}break;case"textarea":K0(e,s);break;case"select":t=s.value,t!=null&&vr(e,!!s.multiple,t,!1)}};eg=ah;tg=qn;var cw={usingClientEntryPoint:!1,Events:[bi,or,xo,Y0,Z0,ah]},fa={findFiberByHostInstance:En,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uw={bundleType:fa.bundleType,version:fa.version,rendererPackageName:fa.rendererPackageName,rendererConfig:fa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_s.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=rg(e),e===null?null:e.stateNode},findFiberByHostInstance:fa.findFiberByHostInstance||lw,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yi.isDisabled&&Yi.supportsFiber)try{fo=Yi.inject(uw),cs=Yi}catch{}}_t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cw;_t.createPortal=function(e,t){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!hh(t))throw Error(V(200));return iw(e,t,null,s)};_t.createRoot=function(e,t){if(!hh(e))throw Error(V(299));var s=!1,n="",a=Ox;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=ch(e,1,!1,null,null,s,!1,n,a),e[Cs]=t.current,Wa(e.nodeType===8?e.parentNode:e),new dh(t)};_t.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=rg(t),e=e===null?null:e.stateNode,e};_t.flushSync=function(e){return qn(e)};_t.hydrate=function(e,t,s){if(!Co(t))throw Error(V(200));return Eo(null,e,t,!0,s)};_t.hydrateRoot=function(e,t,s){if(!hh(e))throw Error(V(405));var n=s!=null&&s.hydratedSources||null,a=!1,i="",l=Ox;if(s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(i=s.identifierPrefix),s.onRecoverableError!==void 0&&(l=s.onRecoverableError)),t=Dx(t,null,e,1,s??null,a,!1,i,l),e[Cs]=t.current,Wa(e),n)for(e=0;e<n.length;e++)s=n[e],a=s._getVersion,a=a(s._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[s,a]:t.mutableSourceEagerHydrationData.push(s,a);return new So(t)};_t.render=function(e,t,s){if(!Co(t))throw Error(V(200));return Eo(null,e,t,!1,s)};_t.unmountComponentAtNode=function(e){if(!Co(e))throw Error(V(40));return e._reactRootContainer?(qn(function(){Eo(null,null,e,!1,function(){e._reactRootContainer=null,e[Cs]=null})}),!0):!1};_t.unstable_batchedUpdates=ah;_t.unstable_renderSubtreeIntoContainer=function(e,t,s,n){if(!Co(s))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return Eo(e,t,s,!1,n)};_t.version="18.3.1-next-f1338f8080-20240426";function Ix(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ix)}catch(e){console.error(e)}}Ix(),I0.exports=_t;var dw=I0.exports,pm=dw;Wc.createRoot=pm.createRoot,Wc.hydrateRoot=pm.hydrateRoot;var Po=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},hw={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ws,yd,g0,fw=(g0=class{constructor(){ae(this,Ws,hw);ae(this,yd,!1)}setTimeoutProvider(e){Y(this,Ws,e)}setTimeout(e,t){return M(this,Ws).setTimeout(e,t)}clearTimeout(e){M(this,Ws).clearTimeout(e)}setInterval(e,t){return M(this,Ws).setInterval(e,t)}clearInterval(e){M(this,Ws).clearInterval(e)}},Ws=new WeakMap,yd=new WeakMap,g0),Fu=new fw;function mw(e){setTimeout(e,0)}var To=typeof window>"u"||"Deno"in globalThis;function qt(){}function pw(e,t){return typeof e=="function"?e(t):e}function gw(e){return typeof e=="number"&&e>=0&&e!==1/0}function xw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vu(e,t){return typeof e=="function"?e(t):e}function yw(e,t){return typeof e=="function"?e(t):e}function gm(e,t){const{type:s="all",exact:n,fetchStatus:a,predicate:i,queryKey:l,stale:o}=e;if(l){if(n){if(t.queryHash!==fh(l,t.options))return!1}else if(!ti(t.queryKey,l))return!1}if(s!=="all"){const c=t.isActive();if(s==="active"&&!c||s==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function xm(e,t){const{exact:s,status:n,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(s){if(ei(t.options.mutationKey)!==ei(i))return!1}else if(!ti(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function fh(e,t){return((t==null?void 0:t.queryKeyHashFn)||ei)(e)}function ei(e){return JSON.stringify(e,(t,s)=>zu(s)?Object.keys(s).sort().reduce((n,a)=>(n[a]=s[a],n),{}):s)}function ti(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>ti(e[s],t[s])):!1}var vw=Object.prototype.hasOwnProperty;function Fx(e,t){if(e===t)return e;const s=ym(e)&&ym(t);if(!s&&!(zu(e)&&zu(t)))return t;const a=(s?e:Object.keys(e)).length,i=s?t:Object.keys(t),l=i.length,o=s?new Array(l):{};let c=0;for(let u=0;u<l;u++){const d=s?u:i[u],h=e[d],f=t[d];if(h===f){o[d]=h,(s?u<a:vw.call(e,d))&&c++;continue}if(h===null||f===null||typeof h!="object"||typeof f!="object"){o[d]=f;continue}const b=Fx(h,f);o[d]=b,b===h&&c++}return a===l&&c===a?e:o}function ym(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zu(e){if(!vm(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!vm(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function vm(e){return Object.prototype.toString.call(e)==="[object Object]"}function bw(e){return new Promise(t=>{Fu.setTimeout(t,e)})}function jw(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Fx(e,t):t}function ww(e,t,s=0){const n=[...e,t];return s&&n.length>s?n.slice(1):n}function Nw(e,t,s=0){const n=[t,...e];return s&&n.length>s?n.slice(0,-1):n}var mh=Symbol();function Vx(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===mh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Rn,qs,Er,x0,kw=(x0=class extends Po{constructor(){super();ae(this,Rn);ae(this,qs);ae(this,Er);Y(this,Er,t=>{if(!To&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){M(this,qs)||this.setEventListener(M(this,Er))}onUnsubscribe(){var t;this.hasListeners()||((t=M(this,qs))==null||t.call(this),Y(this,qs,void 0))}setEventListener(t){var s;Y(this,Er,t),(s=M(this,qs))==null||s.call(this),Y(this,qs,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){M(this,Rn)!==t&&(Y(this,Rn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof M(this,Rn)=="boolean"?M(this,Rn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Rn=new WeakMap,qs=new WeakMap,Er=new WeakMap,x0),zx=new kw;function Sw(){let e,t;const s=new Promise((a,i)=>{e=a,t=i});s.status="pending",s.catch(()=>{});function n(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},s.reject=a=>{n({status:"rejected",reason:a}),t(a)},s}var Cw=mw;function Ew(){let e=[],t=0,s=o=>{o()},n=o=>{o()},a=Cw;const i=o=>{t?e.push(o):a(()=>{s(o)})},l=()=>{const o=e;e=[],o.length&&a(()=>{n(()=>{o.forEach(c=>{s(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||l()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{s=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{a=o}}}var ut=Ew(),Pr,Ks,Tr,y0,Pw=(y0=class extends Po{constructor(){super();ae(this,Pr,!0);ae(this,Ks);ae(this,Tr);Y(this,Tr,t=>{if(!To&&window.addEventListener){const s=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",n)}}})}onSubscribe(){M(this,Ks)||this.setEventListener(M(this,Tr))}onUnsubscribe(){var t;this.hasListeners()||((t=M(this,Ks))==null||t.call(this),Y(this,Ks,void 0))}setEventListener(t){var s;Y(this,Tr,t),(s=M(this,Ks))==null||s.call(this),Y(this,Ks,t(this.setOnline.bind(this)))}setOnline(t){M(this,Pr)!==t&&(Y(this,Pr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return M(this,Pr)}},Pr=new WeakMap,Ks=new WeakMap,Tr=new WeakMap,y0),Ql=new Pw;function Tw(e){return Math.min(1e3*2**e,3e4)}function Ux(e){return(e??"online")==="online"?Ql.isOnline():!0}var Uu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Bx(e){let t=!1,s=0,n;const a=Sw(),i=()=>a.status!=="pending",l=v=>{var w;if(!i()){const x=new Uu(v);f(x),(w=e.onCancel)==null||w.call(e,x)}},o=()=>{t=!0},c=()=>{t=!1},u=()=>zx.isFocused()&&(e.networkMode==="always"||Ql.isOnline())&&e.canRun(),d=()=>Ux(e.networkMode)&&e.canRun(),h=v=>{i()||(n==null||n(),a.resolve(v))},f=v=>{i()||(n==null||n(),a.reject(v))},b=()=>new Promise(v=>{var w;n=x=>{(i()||u())&&v(x)},(w=e.onPause)==null||w.call(e)}).then(()=>{var v;n=void 0,i()||(v=e.onContinue)==null||v.call(e)}),g=()=>{if(i())return;let v;const w=s===0?e.initialPromise:void 0;try{v=w??e.fn()}catch(x){v=Promise.reject(x)}Promise.resolve(v).then(h).catch(x=>{var S;if(i())return;const m=e.retry??(To?0:3),p=e.retryDelay??Tw,j=typeof p=="function"?p(s,x):p,k=m===!0||typeof m=="number"&&s<m||typeof m=="function"&&m(s,x);if(t||!k){f(x);return}s++,(S=e.onFail)==null||S.call(e,s,x),bw(j).then(()=>u()?void 0:b()).then(()=>{t?f(x):g()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(n==null||n(),a),cancelRetry:o,continueRetry:c,canStart:d,start:()=>(d()?g():b().then(g),a)}}var Mn,v0,$x=(v0=class{constructor(){ae(this,Mn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gw(this.gcTime)&&Y(this,Mn,Fu.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(To?1/0:5*60*1e3))}clearGcTimeout(){M(this,Mn)&&(Fu.clearTimeout(M(this,Mn)),Y(this,Mn,void 0))}},Mn=new WeakMap,v0),Ln,_r,Ot,Dn,Ue,fi,On,Kt,ps,b0,_w=(b0=class extends $x{constructor(t){super();ae(this,Kt);ae(this,Ln);ae(this,_r);ae(this,Ot);ae(this,Dn);ae(this,Ue);ae(this,fi);ae(this,On);Y(this,On,!1),Y(this,fi,t.defaultOptions),this.setOptions(t.options),this.observers=[],Y(this,Dn,t.client),Y(this,Ot,M(this,Dn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Y(this,Ln,jm(this.options)),this.state=t.state??M(this,Ln),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=M(this,Ue))==null?void 0:t.promise}setOptions(t){if(this.options={...M(this,fi),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=jm(this.options);s.data!==void 0&&(this.setState(bm(s.data,s.dataUpdatedAt)),Y(this,Ln,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&M(this,Ot).remove(this)}setData(t,s){const n=jw(this.state.data,t,this.options);return Ze(this,Kt,ps).call(this,{data:n,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),n}setState(t,s){Ze(this,Kt,ps).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var n,a;const s=(n=M(this,Ue))==null?void 0:n.promise;return(a=M(this,Ue))==null||a.cancel(t),s?s.then(qt).catch(qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(M(this,Ln))}isActive(){return this.observers.some(t=>yw(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Vu(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!xw(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=M(this,Ue))==null||s.continue()}onOnline(){var s;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=M(this,Ue))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),M(this,Ot).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(M(this,Ue)&&(M(this,On)?M(this,Ue).cancel({revert:!0}):M(this,Ue).cancelRetry()),this.scheduleGc()),M(this,Ot).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ze(this,Kt,ps).call(this,{type:"invalidate"})}async fetch(t,s){var c,u,d,h,f,b,g,v,w,x,m,p;if(this.state.fetchStatus!=="idle"&&((c=M(this,Ue))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(M(this,Ue))return M(this,Ue).continueRetry(),M(this,Ue).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find(k=>k.options.queryFn);j&&this.setOptions(j.options)}const n=new AbortController,a=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(Y(this,On,!0),n.signal)})},i=()=>{const j=Vx(this.options,s),S=(()=>{const E={client:M(this,Dn),queryKey:this.queryKey,meta:this.meta};return a(E),E})();return Y(this,On,!1),this.options.persister?this.options.persister(j,S,this):j(S)},o=(()=>{const j={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:M(this,Dn),state:this.state,fetchFn:i};return a(j),j})();(u=this.options.behavior)==null||u.onFetch(o,this),Y(this,_r,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&Ze(this,Kt,ps).call(this,{type:"fetch",meta:(h=o.fetchOptions)==null?void 0:h.meta}),Y(this,Ue,Bx({initialPromise:s==null?void 0:s.initialPromise,fn:o.fetchFn,onCancel:j=>{j instanceof Uu&&j.revert&&this.setState({...M(this,_r),fetchStatus:"idle"}),n.abort()},onFail:(j,k)=>{Ze(this,Kt,ps).call(this,{type:"failed",failureCount:j,error:k})},onPause:()=>{Ze(this,Kt,ps).call(this,{type:"pause"})},onContinue:()=>{Ze(this,Kt,ps).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const j=await M(this,Ue).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(b=(f=M(this,Ot).config).onSuccess)==null||b.call(f,j,this),(v=(g=M(this,Ot).config).onSettled)==null||v.call(g,j,this.state.error,this),j}catch(j){if(j instanceof Uu){if(j.silent)return M(this,Ue).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw Ze(this,Kt,ps).call(this,{type:"error",error:j}),(x=(w=M(this,Ot).config).onError)==null||x.call(w,j,this),(p=(m=M(this,Ot).config).onSettled)==null||p.call(m,this.state.data,j,this),j}finally{this.scheduleGc()}}},Ln=new WeakMap,_r=new WeakMap,Ot=new WeakMap,Dn=new WeakMap,Ue=new WeakMap,fi=new WeakMap,On=new WeakMap,Kt=new WeakSet,ps=function(t){const s=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Aw(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,...bm(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Y(this,_r,t.manual?a:void 0),a;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=s(this.state),ut.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),M(this,Ot).notify({query:this,type:"updated",action:t})})},b0);function Aw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ux(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function bm(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function jm(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,n=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function wm(e){return{onFetch:(t,s)=>{var d,h,f,b,g;const n=t.options,a=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((b=t.state.data)==null?void 0:b.pages)||[],l=((g=t.state.data)==null?void 0:g.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const w=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},x=Vx(t.options,t.fetchOptions),m=async(p,j,k)=>{if(v)return Promise.reject();if(j==null&&p.pages.length)return Promise.resolve(p);const E=(()=>{const W={client:t.client,queryKey:t.queryKey,pageParam:j,direction:k?"backward":"forward",meta:t.options.meta};return w(W),W})(),N=await x(E),{maxPages:L}=t.options,R=k?Nw:ww;return{pages:R(p.pages,N,L),pageParams:R(p.pageParams,j,L)}};if(a&&i.length){const p=a==="backward",j=p?Rw:Nm,k={pages:i,pageParams:l},S=j(n,k);o=await m(k,S,p)}else{const p=e??i.length;do{const j=c===0?l[0]??n.initialPageParam:Nm(n,o);if(c>0&&j==null)break;o=await m(o,j),c++}while(c<p)}return o};t.options.persister?t.fetchFn=()=>{var v,w;return(w=(v=t.options).persister)==null?void 0:w.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=u}}}function Nm(e,{pages:t,pageParams:s}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,s[n],s):void 0}function Rw(e,{pages:t,pageParams:s}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,s[0],s):void 0}var mi,as,lt,In,is,Fs,j0,Mw=(j0=class extends $x{constructor(t){super();ae(this,is);ae(this,mi);ae(this,as);ae(this,lt);ae(this,In);Y(this,mi,t.client),this.mutationId=t.mutationId,Y(this,lt,t.mutationCache),Y(this,as,[]),this.state=t.state||Lw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){M(this,as).includes(t)||(M(this,as).push(t),this.clearGcTimeout(),M(this,lt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Y(this,as,M(this,as).filter(s=>s!==t)),this.scheduleGc(),M(this,lt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){M(this,as).length||(this.state.status==="pending"?this.scheduleGc():M(this,lt).remove(this))}continue(){var t;return((t=M(this,In))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,o,c,u,d,h,f,b,g,v,w,x,m,p,j,k,S,E,N,L;const s=()=>{Ze(this,is,Fs).call(this,{type:"continue"})},n={client:M(this,mi),meta:this.options.meta,mutationKey:this.options.mutationKey};Y(this,In,Bx({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(R,W)=>{Ze(this,is,Fs).call(this,{type:"failed",failureCount:R,error:W})},onPause:()=>{Ze(this,is,Fs).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>M(this,lt).canRun(this)}));const a=this.state.status==="pending",i=!M(this,In).canStart();try{if(a)s();else{Ze(this,is,Fs).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(l=M(this,lt).config).onMutate)==null?void 0:o.call(l,t,this,n));const W=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,t,n));W!==this.state.context&&Ze(this,is,Fs).call(this,{type:"pending",context:W,variables:t,isPaused:i})}const R=await M(this,In).start();return await((h=(d=M(this,lt).config).onSuccess)==null?void 0:h.call(d,R,t,this.state.context,this,n)),await((b=(f=this.options).onSuccess)==null?void 0:b.call(f,R,t,this.state.context,n)),await((v=(g=M(this,lt).config).onSettled)==null?void 0:v.call(g,R,null,this.state.variables,this.state.context,this,n)),await((x=(w=this.options).onSettled)==null?void 0:x.call(w,R,null,t,this.state.context,n)),Ze(this,is,Fs).call(this,{type:"success",data:R}),R}catch(R){try{throw await((p=(m=M(this,lt).config).onError)==null?void 0:p.call(m,R,t,this.state.context,this,n)),await((k=(j=this.options).onError)==null?void 0:k.call(j,R,t,this.state.context,n)),await((E=(S=M(this,lt).config).onSettled)==null?void 0:E.call(S,void 0,R,this.state.variables,this.state.context,this,n)),await((L=(N=this.options).onSettled)==null?void 0:L.call(N,void 0,R,t,this.state.context,n)),R}finally{Ze(this,is,Fs).call(this,{type:"error",error:R})}}finally{M(this,lt).runNext(this)}}},mi=new WeakMap,as=new WeakMap,lt=new WeakMap,In=new WeakMap,is=new WeakSet,Fs=function(t){const s=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ut.batch(()=>{M(this,as).forEach(n=>{n.onMutationUpdate(t)}),M(this,lt).notify({mutation:this,type:"updated",action:t})})},j0);function Lw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ys,Qt,pi,w0,Dw=(w0=class extends Po{constructor(t={}){super();ae(this,ys);ae(this,Qt);ae(this,pi);this.config=t,Y(this,ys,new Set),Y(this,Qt,new Map),Y(this,pi,0)}build(t,s,n){const a=new Mw({client:t,mutationCache:this,mutationId:++Di(this,pi)._,options:t.defaultMutationOptions(s),state:n});return this.add(a),a}add(t){M(this,ys).add(t);const s=Zi(t);if(typeof s=="string"){const n=M(this,Qt).get(s);n?n.push(t):M(this,Qt).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(M(this,ys).delete(t)){const s=Zi(t);if(typeof s=="string"){const n=M(this,Qt).get(s);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&M(this,Qt).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Zi(t);if(typeof s=="string"){const n=M(this,Qt).get(s),a=n==null?void 0:n.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const s=Zi(t);if(typeof s=="string"){const a=(n=M(this,Qt).get(s))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ut.batch(()=>{M(this,ys).forEach(t=>{this.notify({type:"removed",mutation:t})}),M(this,ys).clear(),M(this,Qt).clear()})}getAll(){return Array.from(M(this,ys))}find(t){const s={exact:!0,...t};return this.getAll().find(n=>xm(s,n))}findAll(t={}){return this.getAll().filter(s=>xm(t,s))}notify(t){ut.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return ut.batch(()=>Promise.all(t.map(s=>s.continue().catch(qt))))}},ys=new WeakMap,Qt=new WeakMap,pi=new WeakMap,w0);function Zi(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ls,N0,Ow=(N0=class extends Po{constructor(t={}){super();ae(this,ls);this.config=t,Y(this,ls,new Map)}build(t,s,n){const a=s.queryKey,i=s.queryHash??fh(a,s);let l=this.get(i);return l||(l=new _w({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(s),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){M(this,ls).has(t.queryHash)||(M(this,ls).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=M(this,ls).get(t.queryHash);s&&(t.destroy(),s===t&&M(this,ls).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ut.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return M(this,ls).get(t)}getAll(){return[...M(this,ls).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(n=>gm(s,n))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(n=>gm(t,n)):s}notify(t){ut.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){ut.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ut.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ls=new WeakMap,N0),Ee,Qs,Gs,Ar,Rr,Xs,Mr,Lr,k0,Iw=(k0=class{constructor(e={}){ae(this,Ee);ae(this,Qs);ae(this,Gs);ae(this,Ar);ae(this,Rr);ae(this,Xs);ae(this,Mr);ae(this,Lr);Y(this,Ee,e.queryCache||new Ow),Y(this,Qs,e.mutationCache||new Dw),Y(this,Gs,e.defaultOptions||{}),Y(this,Ar,new Map),Y(this,Rr,new Map),Y(this,Xs,0)}mount(){Di(this,Xs)._++,M(this,Xs)===1&&(Y(this,Mr,zx.subscribe(async e=>{e&&(await this.resumePausedMutations(),M(this,Ee).onFocus())})),Y(this,Lr,Ql.subscribe(async e=>{e&&(await this.resumePausedMutations(),M(this,Ee).onOnline())})))}unmount(){var e,t;Di(this,Xs)._--,M(this,Xs)===0&&((e=M(this,Mr))==null||e.call(this),Y(this,Mr,void 0),(t=M(this,Lr))==null||t.call(this),Y(this,Lr,void 0))}isFetching(e){return M(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return M(this,Qs).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=M(this,Ee).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=M(this,Ee).build(this,t),n=s.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Vu(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return M(this,Ee).findAll(e).map(({queryKey:t,state:s})=>{const n=s.data;return[t,n]})}setQueryData(e,t,s){const n=this.defaultQueryOptions({queryKey:e}),a=M(this,Ee).get(n.queryHash),i=a==null?void 0:a.state.data,l=pw(t,i);if(l!==void 0)return M(this,Ee).build(this,n).setData(l,{...s,manual:!0})}setQueriesData(e,t,s){return ut.batch(()=>M(this,Ee).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=M(this,Ee).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=M(this,Ee);ut.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=M(this,Ee);return ut.batch(()=>(s.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},n=ut.batch(()=>M(this,Ee).findAll(e).map(a=>a.cancel(s)));return Promise.all(n).then(qt).catch(qt)}invalidateQueries(e,t={}){return ut.batch(()=>(M(this,Ee).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},n=ut.batch(()=>M(this,Ee).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,s);return s.throwOnError||(i=i.catch(qt)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(qt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=M(this,Ee).build(this,t);return s.isStaleByTime(Vu(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qt).catch(qt)}fetchInfiniteQuery(e){return e.behavior=wm(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qt).catch(qt)}ensureInfiniteQueryData(e){return e.behavior=wm(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ql.isOnline()?M(this,Qs).resumePausedMutations():Promise.resolve()}getQueryCache(){return M(this,Ee)}getMutationCache(){return M(this,Qs)}getDefaultOptions(){return M(this,Gs)}setDefaultOptions(e){Y(this,Gs,e)}setQueryDefaults(e,t){M(this,Ar).set(ei(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...M(this,Ar).values()],s={};return t.forEach(n=>{ti(e,n.queryKey)&&Object.assign(s,n.defaultOptions)}),s}setMutationDefaults(e,t){M(this,Rr).set(ei(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...M(this,Rr).values()],s={};return t.forEach(n=>{ti(e,n.mutationKey)&&Object.assign(s,n.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...M(this,Gs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===mh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...M(this,Gs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){M(this,Ee).clear(),M(this,Qs).clear()}},Ee=new WeakMap,Qs=new WeakMap,Gs=new WeakMap,Ar=new WeakMap,Rr=new WeakMap,Xs=new WeakMap,Mr=new WeakMap,Lr=new WeakMap,k0),Fw=y.createContext(void 0),Vw=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),r.jsx(Fw.Provider,{value:e,children:t}));/**
* @remix-run/router v1.23.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},si.apply(this,arguments)}var Zs;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Zs||(Zs={}));const km="popstate";function zw(e){e===void 0&&(e={});function t(n,a){let{pathname:i,search:l,hash:o}=n.location;return Bu("",{pathname:i,search:l,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function s(n,a){return typeof a=="string"?a:Gl(a)}return Bw(t,s,null,e)}function Se(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ph(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Uw(){return Math.random().toString(36).substr(2,8)}function Sm(e,t){return{usr:e.state,key:e.key,idx:t}}function Bu(e,t,s,n){return s===void 0&&(s=null),si({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Jr(t):t,{state:s,key:t&&t.key||n||Uw()})}function Gl(e){let{pathname:t="/",search:s="",hash:n=""}=e;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Jr(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substr(s),e=e.substr(0,s));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Bw(e,t,s,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,l=a.history,o=Zs.Pop,c=null,u=d();u==null&&(u=0,l.replaceState(si({},l.state,{idx:u}),""));function d(){return(l.state||{idx:null}).idx}function h(){o=Zs.Pop;let w=d(),x=w==null?null:w-u;u=w,c&&c({action:o,location:v.location,delta:x})}function f(w,x){o=Zs.Push;let m=Bu(v.location,w,x);u=d()+1;let p=Sm(m,u),j=v.createHref(m);try{l.pushState(p,"",j)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(j)}i&&c&&c({action:o,location:v.location,delta:1})}function b(w,x){o=Zs.Replace;let m=Bu(v.location,w,x);u=d();let p=Sm(m,u),j=v.createHref(m);l.replaceState(p,"",j),i&&c&&c({action:o,location:v.location,delta:0})}function g(w){let x=a.location.origin!=="null"?a.location.origin:a.location.href,m=typeof w=="string"?w:Gl(w);return m=m.replace(/ $/,"%20"),Se(x,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,x)}let v={get action(){return o},get location(){return e(a,l)},listen(w){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(km,h),c=w,()=>{a.removeEventListener(km,h),c=null}},createHref(w){return t(a,w)},createURL:g,encodeLocation(w){let x=g(w);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:f,replace:b,go(w){return l.go(w)}};return v}var Cm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Cm||(Cm={}));function $w(e,t,s){return s===void 0&&(s="/"),Hw(e,t,s)}function Hw(e,t,s,n){let a=typeof t=="string"?Jr(t):t,i=Br(a.pathname||"/",s);if(i==null)return null;let l=Hx(e);Ww(l);let o=null;for(let c=0;o==null&&c<l.length;++c){let u=sN(i);o=eN(l[c],u)}return o}function Hx(e,t,s,n){t===void 0&&(t=[]),s===void 0&&(s=[]),n===void 0&&(n="");let a=(i,l,o)=>{let c={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};c.relativePath.startsWith("/")&&(Se(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=cn([n,c.relativePath]),d=s.concat(c);i.children&&i.children.length>0&&(Se(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Hx(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Yw(u,i.index),routesMeta:d})};return e.forEach((i,l)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))a(i,l);else for(let c of Wx(i.path))a(i,l,c)}),t}function Wx(e){let t=e.split("/");if(t.length===0)return[];let[s,...n]=t,a=s.endsWith("?"),i=s.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let l=Wx(n.join("/")),o=[];return o.push(...l.map(c=>c===""?i:[i,c].join("/"))),a&&o.push(...l),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function Ww(e){e.sort((t,s)=>t.score!==s.score?s.score-t.score:Zw(t.routesMeta.map(n=>n.childrenIndex),s.routesMeta.map(n=>n.childrenIndex)))}const qw=/^:[\w-]+$/,Kw=3,Qw=2,Gw=1,Xw=10,Jw=-2,Em=e=>e==="*";function Yw(e,t){let s=e.split("/"),n=s.length;return s.some(Em)&&(n+=Jw),t&&(n+=Qw),s.filter(a=>!Em(a)).reduce((a,i)=>a+(qw.test(i)?Kw:i===""?Gw:Xw),n)}function Zw(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function eN(e,t,s){let{routesMeta:n}=e,a={},i="/",l=[];for(let o=0;o<n.length;++o){let c=n[o],u=o===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=$u({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h)return null;Object.assign(a,h.params),l.push({params:a,pathname:cn([i,h.pathname]),pathnameBase:lN(cn([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=cn([i,h.pathnameBase]))}return l}function $u(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,n]=tN(e.path,e.caseSensitive,e.end),a=t.match(s);if(!a)return null;let i=a[0],l=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:n.reduce((u,d,h)=>{let{paramName:f,isOptional:b}=d;if(f==="*"){let v=o[h]||"";l=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const g=o[h];return b&&!g?u[f]=void 0:u[f]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:l,pattern:e}}function tN(e,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),ph(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,c)=>(n.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function sN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ph(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Br(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,n=e.charAt(s);return n&&n!=="/"?null:e.slice(s)||"/"}const nN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rN=e=>nN.test(e);function aN(e,t){t===void 0&&(t="/");let{pathname:s,search:n="",hash:a=""}=typeof e=="string"?Jr(e):e,i;if(s)if(rN(s))i=s;else{if(s.includes("//")){let l=s;s=s.replace(/\/\/+/g,"/"),ph(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+s))}s.startsWith("/")?i=Pm(s.substring(1),"/"):i=Pm(s,t)}else i=t;return{pathname:i,search:oN(n),hash:cN(a)}}function Pm(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function wc(e,t,s,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function iN(e){return e.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function gh(e,t){let s=iN(e);return t?s.map((n,a)=>a===s.length-1?n.pathname:n.pathnameBase):s.map(n=>n.pathnameBase)}function xh(e,t,s,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Jr(e):(a=si({},e),Se(!a.pathname||!a.pathname.includes("?"),wc("?","pathname","search",a)),Se(!a.pathname||!a.pathname.includes("#"),wc("#","pathname","hash",a)),Se(!a.search||!a.search.includes("#"),wc("#","search","hash",a)));let i=e===""||a.pathname==="",l=i?"/":a.pathname,o;if(l==null)o=s;else{let h=t.length-1;if(!n&&l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),h-=1;a.pathname=f.join("/")}o=h>=0?t[h]:"/"}let c=aN(a,o),u=l&&l!=="/"&&l.endsWith("/"),d=(i||l===".")&&s.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const cn=e=>e.join("/").replace(/\/\/+/g,"/"),lN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),oN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function uN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const qx=["post","put","patch","delete"];new Set(qx);const dN=["get",...qx];new Set(dN);/**
* React Router v6.30.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function ni(){return ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},ni.apply(this,arguments)}const _o=y.createContext(null),Kx=y.createContext(null),As=y.createContext(null),Ao=y.createContext(null),Rs=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Qx=y.createContext(null);function hN(e,t){let{relative:s}=t===void 0?{}:t;Yr()||Se(!1);let{basename:n,navigator:a}=y.useContext(As),{hash:i,pathname:l,search:o}=Ro(e,{relative:s}),c=l;return n!=="/"&&(c=l==="/"?n:cn([n,l])),a.createHref({pathname:c,search:o,hash:i})}function Yr(){return y.useContext(Ao)!=null}function Jn(){return Yr()||Se(!1),y.useContext(Ao).location}function Gx(e){y.useContext(As).static||y.useLayoutEffect(e)}function Zr(){let{isDataRoute:e}=y.useContext(Rs);return e?EN():fN()}function fN(){Yr()||Se(!1);let e=y.useContext(_o),{basename:t,future:s,navigator:n}=y.useContext(As),{matches:a}=y.useContext(Rs),{pathname:i}=Jn(),l=JSON.stringify(gh(a,s.v7_relativeSplatPath)),o=y.useRef(!1);return Gx(()=>{o.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!o.current)return;if(typeof u=="number"){n.go(u);return}let h=xh(u,JSON.parse(l),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:cn([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,l,i,e])}const mN=y.createContext(null);function pN(e){let t=y.useContext(Rs).outlet;return t&&y.createElement(mN.Provider,{value:e},t)}function Ro(e,t){let{relative:s}=t===void 0?{}:t,{future:n}=y.useContext(As),{matches:a}=y.useContext(Rs),{pathname:i}=Jn(),l=JSON.stringify(gh(a,n.v7_relativeSplatPath));return y.useMemo(()=>xh(e,JSON.parse(l),i,s==="path"),[e,l,i,s])}function gN(e,t){return xN(e,t)}function xN(e,t,s,n){Yr()||Se(!1);let{navigator:a}=y.useContext(As),{matches:i}=y.useContext(Rs),l=i[i.length-1],o=l?l.params:{};l&&l.pathname;let c=l?l.pathnameBase:"/";l&&l.route;let u=Jn(),d;if(t){var h;let w=typeof t=="string"?Jr(t):t;c==="/"||(h=w.pathname)!=null&&h.startsWith(c)||Se(!1),d=w}else d=u;let f=d.pathname||"/",b=f;if(c!=="/"){let w=c.replace(/^\//,"").split("/");b="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let g=$w(e,{pathname:b}),v=wN(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:cn([c,a.encodeLocation?a.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:cn([c,a.encodeLocation?a.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,s,n);return t&&v?y.createElement(Ao.Provider,{value:{location:ni({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Zs.Pop}},v):v}function yN(){let e=CN(),t=uN(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),s?y.createElement("pre",{style:a},s):null,null)}const vN=y.createElement(yN,null);class bN extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?y.createElement(Rs.Provider,{value:this.props.routeContext},y.createElement(Qx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function jN(e){let{routeContext:t,match:s,children:n}=e,a=y.useContext(_o);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),y.createElement(Rs.Provider,{value:t},n)}function wN(e,t,s,n){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),n===void 0&&(n=null),e==null){var i;if(!s)return null;if(s.errors)e=s.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let l=e,o=(a=s)==null?void 0:a.errors;if(o!=null){let d=l.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);d>=0||Se(!1),l=l.slice(0,Math.min(l.length,d+1))}let c=!1,u=-1;if(s&&n&&n.v7_partialHydration)for(let d=0;d<l.length;d++){let h=l[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:b}=s,g=h.route.loader&&f[h.route.id]===void 0&&(!b||b[h.route.id]===void 0);if(h.route.lazy||g){c=!0,u>=0?l=l.slice(0,u+1):l=[l[0]];break}}}return l.reduceRight((d,h,f)=>{let b,g=!1,v=null,w=null;s&&(b=o&&h.route.id?o[h.route.id]:void 0,v=h.route.errorElement||vN,c&&(u<0&&f===0?(PN("route-fallback"),g=!0,w=null):u===f&&(g=!0,w=h.route.hydrateFallbackElement||null)));let x=t.concat(l.slice(0,f+1)),m=()=>{let p;return b?p=v:g?p=w:h.route.Component?p=y.createElement(h.route.Component,null):h.route.element?p=h.route.element:p=d,y.createElement(jN,{match:h,routeContext:{outlet:d,matches:x,isDataRoute:s!=null},children:p})};return s&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?y.createElement(bN,{location:s.location,revalidation:s.revalidation,component:v,error:b,children:m(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):m()},null)}var Xx=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Xx||{}),Jx=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Jx||{});function NN(e){let t=y.useContext(_o);return t||Se(!1),t}function kN(e){let t=y.useContext(Kx);return t||Se(!1),t}function SN(e){let t=y.useContext(Rs);return t||Se(!1),t}function Yx(e){let t=SN(),s=t.matches[t.matches.length-1];return s.route.id||Se(!1),s.route.id}function CN(){var e;let t=y.useContext(Qx),s=kN(),n=Yx();return t!==void 0?t:(e=s.errors)==null?void 0:e[n]}function EN(){let{router:e}=NN(Xx.UseNavigateStable),t=Yx(Jx.UseNavigateStable),s=y.useRef(!1);return Gx(()=>{s.current=!0}),y.useCallback(function(a,i){i===void 0&&(i={}),s.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ni({fromRouteId:t},i)))},[e,t])}const Tm={};function PN(e,t,s){Tm[e]||(Tm[e]=!0)}function TN(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Hu(e){let{to:t,replace:s,state:n,relative:a}=e;Yr()||Se(!1);let{future:i,static:l}=y.useContext(As),{matches:o}=y.useContext(Rs),{pathname:c}=Jn(),u=Zr(),d=xh(t,gh(o,i.v7_relativeSplatPath),c,a==="path"),h=JSON.stringify(d);return y.useEffect(()=>u(JSON.parse(h),{replace:s,state:n,relative:a}),[u,h,a,s,n]),null}function _N(e){return pN(e.context)}function je(e){Se(!1)}function AN(e){let{basename:t="/",children:s=null,location:n,navigationType:a=Zs.Pop,navigator:i,static:l=!1,future:o}=e;Yr()&&Se(!1);let c=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:c,navigator:i,static:l,future:ni({v7_relativeSplatPath:!1},o)}),[c,o,i,l]);typeof n=="string"&&(n=Jr(n));let{pathname:d="/",search:h="",hash:f="",state:b=null,key:g="default"}=n,v=y.useMemo(()=>{let w=Br(d,c);return w==null?null:{location:{pathname:w,search:h,hash:f,state:b,key:g},navigationType:a}},[c,d,h,f,b,g,a]);return v==null?null:y.createElement(As.Provider,{value:u},y.createElement(Ao.Provider,{children:s,value:v}))}function RN(e){let{children:t,location:s}=e;return gN(Wu(t),s)}new Promise(()=>{});function Wu(e,t){t===void 0&&(t=[]);let s=[];return y.Children.forEach(e,(n,a)=>{if(!y.isValidElement(n))return;let i=[...t,a];if(n.type===y.Fragment){s.push.apply(s,Wu(n.props.children,i));return}n.type!==je&&Se(!1),!n.props.index||!n.props.children||Se(!1);let l={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=Wu(n.props.children,i)),s.push(l)}),s}/**
* React Router DOM v6.30.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Xl(){return Xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Xl.apply(this,arguments)}function Zx(e,t){if(e==null)return{};var s={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(s[a]=e[a]);return s}function MN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function LN(e,t){return e.button===0&&(!t||t==="_self")&&!MN(e)}const DN=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ON=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],IN="6";try{window.__reactRouterVersion=IN}catch{}const FN=y.createContext({isTransitioning:!1}),VN="startTransition",_m=e1[VN];function zN(e){let{basename:t,children:s,future:n,window:a}=e,i=y.useRef();i.current==null&&(i.current=zw({window:a,v5Compat:!0}));let l=i.current,[o,c]=y.useState({action:l.action,location:l.location}),{v7_startTransition:u}=n||{},d=y.useCallback(h=>{u&&_m?_m(()=>c(h)):c(h)},[c,u]);return y.useLayoutEffect(()=>l.listen(d),[l,d]),y.useEffect(()=>TN(n),[n]),y.createElement(AN,{basename:t,children:s,location:o.location,navigationType:o.action,navigator:l,future:n})}const UN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",BN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jl=y.forwardRef(function(t,s){let{onClick:n,relative:a,reloadDocument:i,replace:l,state:o,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,f=Zx(t,DN),{basename:b}=y.useContext(As),g,v=!1;if(typeof u=="string"&&BN.test(u)&&(g=u,UN))try{let p=new URL(window.location.href),j=u.startsWith("//")?new URL(p.protocol+u):new URL(u),k=Br(j.pathname,b);j.origin===p.origin&&k!=null?u=k+j.search+j.hash:v=!0}catch{}let w=hN(u,{relative:a}),x=WN(u,{replace:l,state:o,target:c,preventScrollReset:d,relative:a,viewTransition:h});function m(p){n&&n(p),p.defaultPrevented||x(p)}return y.createElement("a",Xl({},f,{href:g||w,onClick:v||i?n:m,ref:s,target:c}))}),$N=y.forwardRef(function(t,s){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:l=!1,style:o,to:c,viewTransition:u,children:d}=t,h=Zx(t,ON),f=Ro(c,{relative:h.relative}),b=Jn(),g=y.useContext(Kx),{navigator:v,basename:w}=y.useContext(As),x=g!=null&&qN(f)&&u===!0,m=v.encodeLocation?v.encodeLocation(f).pathname:f.pathname,p=b.pathname,j=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;a||(p=p.toLowerCase(),j=j?j.toLowerCase():null,m=m.toLowerCase()),j&&w&&(j=Br(j,w)||j);const k=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let S=p===m||!l&&p.startsWith(m)&&p.charAt(k)==="/",E=j!=null&&(j===m||!l&&j.startsWith(m)&&j.charAt(m.length)==="/"),N={isActive:S,isPending:E,isTransitioning:x},L=S?n:void 0,R;typeof i=="function"?R=i(N):R=[i,S?"active":null,E?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let W=typeof o=="function"?o(N):o;return y.createElement(Jl,Xl({},h,{"aria-current":L,className:R,ref:s,style:W,to:c,viewTransition:u}),typeof d=="function"?d(N):d)});var qu;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(qu||(qu={}));var Am;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Am||(Am={}));function HN(e){let t=y.useContext(_o);return t||Se(!1),t}function WN(e,t){let{target:s,replace:n,state:a,preventScrollReset:i,relative:l,viewTransition:o}=t===void 0?{}:t,c=Zr(),u=Jn(),d=Ro(e,{relative:l});return y.useCallback(h=>{if(LN(h,s)){h.preventDefault();let f=n!==void 0?n:Gl(u)===Gl(d);c(e,{replace:f,state:a,preventScrollReset:i,relative:l,viewTransition:o})}},[u,c,d,n,a,s,e,i,l,o])}function qN(e,t){t===void 0&&(t={});let s=y.useContext(FN);s==null&&Se(!1);let{basename:n}=HN(qu.useViewTransitionState),a=Ro(e,{relative:t.relative});if(!s.isTransitioning)return!1;let i=Br(s.currentLocation.pathname,n)||s.currentLocation.pathname,l=Br(s.nextLocation.pathname,n)||s.nextLocation.pathname;return $u(a.pathname,l)!=null||$u(a.pathname,i)!=null}const KN={},Rm=e=>{let t;const s=new Set,n=(d,h)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const b=t;t=h??(typeof f!="object"||f===null)?f:Object.assign({},t,f),s.forEach(g=>g(t,b))}},a=()=>t,c={setState:n,getState:a,getInitialState:()=>u,subscribe:d=>(s.add(d),()=>s.delete(d)),destroy:()=>{(KN?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),s.clear()}},u=t=e(n,a,c);return c},QN=e=>e?Rm(e):Rm;var ey={exports:{}},ty={},sy={exports:{}},ny={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var $r=y;function GN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XN=typeof Object.is=="function"?Object.is:GN,JN=$r.useState,YN=$r.useEffect,ZN=$r.useLayoutEffect,ek=$r.useDebugValue;function tk(e,t){var s=t(),n=JN({inst:{value:s,getSnapshot:t}}),a=n[0].inst,i=n[1];return ZN(function(){a.value=s,a.getSnapshot=t,Nc(a)&&i({inst:a})},[e,s,t]),YN(function(){return Nc(a)&&i({inst:a}),e(function(){Nc(a)&&i({inst:a})})},[e]),ek(s),s}function Nc(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!XN(e,s)}catch{return!0}}function sk(e,t){return t()}var nk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?sk:tk;ny.useSyncExternalStore=$r.useSyncExternalStore!==void 0?$r.useSyncExternalStore:nk;sy.exports=ny;var rk=sy.exports;/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Mo=y,ak=rk;function ik(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lk=typeof Object.is=="function"?Object.is:ik,ok=ak.useSyncExternalStore,ck=Mo.useRef,uk=Mo.useEffect,dk=Mo.useMemo,hk=Mo.useDebugValue;ty.useSyncExternalStoreWithSelector=function(e,t,s,n,a){var i=ck(null);if(i.current===null){var l={hasValue:!1,value:null};i.current=l}else l=i.current;i=dk(function(){function c(b){if(!u){if(u=!0,d=b,b=n(b),a!==void 0&&l.hasValue){var g=l.value;if(a(g,b))return h=g}return h=b}if(g=h,lk(d,b))return g;var v=n(b);return a!==void 0&&a(g,v)?(d=b,g):(d=b,h=v)}var u=!1,d,h,f=s===void 0?null:s;return[function(){return c(t())},f===null?void 0:function(){return c(f())}]},[t,s,n,a]);var o=ok(e,i[0],i[1]);return uk(function(){l.hasValue=!0,l.value=o},[o]),hk(o),o};ey.exports=ty;var fk=ey.exports;const mk=S0(fk),ry={},{useDebugValue:pk}=xi,{useSyncExternalStoreWithSelector:gk}=mk;let Mm=!1;const xk=e=>e;function yk(e,t=xk,s){(ry?"production":void 0)!=="production"&&s&&!Mm&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Mm=!0);const n=gk(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,s);return pk(n),n}const Lm=e=>{(ry?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?QN(e):e,s=(n,a)=>yk(t,n,a);return Object.assign(s,t),s},yh=e=>e?Lm(e):Lm,vk={};function vh(e,t){let s;try{s=e()}catch{return}return{getItem:a=>{var i;const l=c=>c===null?null:JSON.parse(c,void 0),o=(i=s.getItem(a))!=null?i:null;return o instanceof Promise?o.then(l):l(o)},setItem:(a,i)=>s.setItem(a,JSON.stringify(i,void 0)),removeItem:a=>s.removeItem(a)}}const ri=e=>t=>{try{const s=e(t);return s instanceof Promise?s:{then(n){return ri(n)(s)},catch(n){return this}}}catch(s){return{then(n){return this},catch(n){return ri(n)(s)}}}},bk=(e,t)=>(s,n,a)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:w=>w,version:0,merge:(w,x)=>({...x,...w}),...t},l=!1;const o=new Set,c=new Set;let u;try{u=i.getStorage()}catch{}if(!u)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),s(...w)},n,a);const d=ri(i.serialize),h=()=>{const w=i.partialize({...n()});let x;const m=d({state:w,version:i.version}).then(p=>u.setItem(i.name,p)).catch(p=>{x=p});if(x)throw x;return m},f=a.setState;a.setState=(w,x)=>{f(w,x),h()};const b=e((...w)=>{s(...w),h()},n,a);let g;const v=()=>{var w;if(!u)return;l=!1,o.forEach(m=>m(n()));const x=((w=i.onRehydrateStorage)==null?void 0:w.call(i,n()))||void 0;return ri(u.getItem.bind(u))(i.name).then(m=>{if(m)return i.deserialize(m)}).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==i.version){if(i.migrate)return i.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var p;return g=i.merge(m,(p=n())!=null?p:b),s(g,!0),h()}).then(()=>{x==null||x(g,void 0),l=!0,c.forEach(m=>m(g))}).catch(m=>{x==null||x(void 0,m)})};return a.persist={setOptions:w=>{i={...i,...w},w.getStorage&&(u=w.getStorage())},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>l,onHydrate:w=>(o.add(w),()=>{o.delete(w)}),onFinishHydration:w=>(c.add(w),()=>{c.delete(w)})},v(),g||b},jk=(e,t)=>(s,n,a)=>{let i={storage:vh(()=>localStorage),partialize:v=>v,version:0,merge:(v,w)=>({...w,...v}),...t},l=!1;const o=new Set,c=new Set;let u=i.storage;if(!u)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),s(...v)},n,a);const d=()=>{const v=i.partialize({...n()});return u.setItem(i.name,{state:v,version:i.version})},h=a.setState;a.setState=(v,w)=>{h(v,w),d()};const f=e((...v)=>{s(...v),d()},n,a);a.getInitialState=()=>f;let b;const g=()=>{var v,w;if(!u)return;l=!1,o.forEach(m=>{var p;return m((p=n())!=null?p:f)});const x=((w=i.onRehydrateStorage)==null?void 0:w.call(i,(v=n())!=null?v:f))||void 0;return ri(u.getItem.bind(u))(i.name).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==i.version){if(i.migrate)return[!0,i.migrate(m.state,m.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,m.state];return[!1,void 0]}).then(m=>{var p;const[j,k]=m;if(b=i.merge(k,(p=n())!=null?p:f),s(b,!0),j)return d()}).then(()=>{x==null||x(b,void 0),b=n(),l=!0,c.forEach(m=>m(b))}).catch(m=>{x==null||x(void 0,m)})};return a.persist={setOptions:v=>{i={...i,...v},v.storage&&(u=v.storage)},clearStorage:()=>{u==null||u.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>g(),hasHydrated:()=>l,onHydrate:v=>(o.add(v),()=>{o.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},i.skipHydration||g(),b||f},wk=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((vk?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),bk(e,t)):jk(e,t),ay=wk,Re=yh()(ay(e=>({token:null,user:null,isAuthenticated:!1,_hasHydrated:!1,setAuth:(t,s)=>{localStorage.setItem("auth_token",t),localStorage.setItem("user_info",JSON.stringify(s)),e({token:t,user:s,isAuthenticated:!0})},clearAuth:()=>{localStorage.removeItem("auth_token"),localStorage.removeItem("user_info"),e({token:null,user:null,isAuthenticated:!1})},updateUser:t=>{e(s=>({user:s.user?{...s.user,...t}:null}))},setHasHydrated:t=>{e({_hasHydrated:t})}}),{name:"auth-storage",storage:vh(()=>localStorage),partialize:e=>({token:e.token,user:e.user,isAuthenticated:e.isAuthenticated}),onRehydrateStorage:()=>e=>{e!=null&&e.token&&localStorage.setItem("auth_token",e.token),e!=null&&e.user&&localStorage.setItem("user_info",JSON.stringify(e.user)),setTimeout(()=>{Re.setState({_hasHydrated:!0})},0)}})),iy=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Lo=y.createContext({}),Do=y.createContext(null),Oo=typeof document<"u",bh=Oo?y.useLayoutEffect:y.useEffect,ly=y.createContext({strict:!1}),jh=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Nk="framerAppearId",oy="data-"+jh(Nk);function kk(e,t,s,n){const{visualElement:a}=y.useContext(Lo),i=y.useContext(ly),l=y.useContext(Do),o=y.useContext(iy).reducedMotion,c=y.useRef();n=n||i.renderer,!c.current&&n&&(c.current=n(e,{visualState:t,parent:a,props:s,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:o}));const u=c.current;y.useInsertionEffect(()=>{u&&u.update(s,l)});const d=y.useRef(!!(s[oy]&&!window.HandoffComplete));return bh(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),y.useEffect(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,window.HandoffComplete=!0))}),u}function pr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Sk(e,t,s){return y.useCallback(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),s&&(typeof s=="function"?s(n):pr(s)&&(s.current=n))},[t])}function ai(e){return typeof e=="string"||Array.isArray(e)}function Io(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const wh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Nh=["initial",...wh];function Fo(e){return Io(e.animate)||Nh.some(t=>ai(e[t]))}function cy(e){return!!(Fo(e)||e.variants)}function Ck(e,t){if(Fo(e)){const{initial:s,animate:n}=e;return{initial:s===!1||ai(s)?s:void 0,animate:ai(n)?n:void 0}}return e.inherit!==!1?t:{}}function Ek(e){const{initial:t,animate:s}=Ck(e,y.useContext(Lo));return y.useMemo(()=>({initial:t,animate:s}),[Dm(t),Dm(s)])}function Dm(e){return Array.isArray(e)?e.join(" "):e}const Om={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ii={};for(const e in Om)ii[e]={isEnabled:t=>Om[e].some(s=>!!t[s])};function Pk(e){for(const t in e)ii[t]={...ii[t],...e[t]}}const kh=y.createContext({}),uy=y.createContext({}),Tk=Symbol.for("motionComponentSymbol");function _k({preloadedFeatures:e,createVisualElement:t,useRender:s,useVisualState:n,Component:a}){e&&Pk(e);function i(o,c){let u;const d={...y.useContext(iy),...o,layoutId:Ak(o)},{isStatic:h}=d,f=Ek(o),b=n(o,h);if(!h&&Oo){f.visualElement=kk(a,b,d,t);const g=y.useContext(uy),v=y.useContext(ly).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,v,e,g))}return y.createElement(Lo.Provider,{value:f},u&&f.visualElement?y.createElement(u,{visualElement:f.visualElement,...d}):null,s(a,o,Sk(b,f.visualElement,c),b,h,f.visualElement))}const l=y.forwardRef(i);return l[Tk]=a,l}function Ak({layoutId:e}){const t=y.useContext(kh).id;return t&&e!==void 0?t+"-"+e:e}function Rk(e){function t(n,a={}){return _k(e(n,a))}if(typeof Proxy>"u")return t;const s=new Map;return new Proxy(t,{get:(n,a)=>(s.has(a)||s.set(a,t(a)),s.get(a))})}const Mk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Sh(e){return typeof e!="string"||e.includes("-")?!1:!!(Mk.indexOf(e)>-1||/[A-Z]/.test(e))}const Yl={};function Lk(e){Object.assign(Yl,e)}const wi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yn=new Set(wi);function dy(e,{layout:t,layoutId:s}){return Yn.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!Yl[e]||e==="opacity")}const wt=e=>!!(e&&e.getVelocity),Dk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ok=wi.length;function Ik(e,{enableHardwareAcceleration:t=!0,allowTransformNone:s=!0},n,a){let i="";for(let l=0;l<Ok;l++){const o=wi[l];if(e[o]!==void 0){const c=Dk[o]||o;i+=`${c}(${e[o]}) `}}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),a?i=a(e,n?"":i):s&&n&&(i="none"),i}const hy=e=>t=>typeof t=="string"&&t.startsWith(e),fy=hy("--"),Ku=hy("var(--"),Fk=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Vk=(e,t)=>t&&typeof e=="number"?t.transform(e):e,fn=(e,t,s)=>Math.min(Math.max(s,e),t),Zn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ma={...Zn,transform:e=>fn(0,1,e)},el={...Zn,default:1},La=e=>Math.round(e*1e5)/1e5,Vo=/(-)?([\d]*\.?[\d])+/g,my=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,zk=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ni(e){return typeof e=="string"}const ki=e=>({test:t=>Ni(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Vs=ki("deg"),ds=ki("%"),J=ki("px"),Uk=ki("vh"),Bk=ki("vw"),Im={...ds,parse:e=>ds.parse(e)/100,transform:e=>ds.transform(e*100)},Fm={...Zn,transform:Math.round},py={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,radius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,size:J,top:J,right:J,bottom:J,left:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,rotate:Vs,rotateX:Vs,rotateY:Vs,rotateZ:Vs,scale:el,scaleX:el,scaleY:el,scaleZ:el,skew:Vs,skewX:Vs,skewY:Vs,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:Ma,originX:Im,originY:Im,originZ:J,zIndex:Fm,fillOpacity:Ma,strokeOpacity:Ma,numOctaves:Fm};function Ch(e,t,s,n){const{style:a,vars:i,transform:l,transformOrigin:o}=e;let c=!1,u=!1,d=!0;for(const h in t){const f=t[h];if(fy(h)){i[h]=f;continue}const b=py[h],g=Vk(f,b);if(Yn.has(h)){if(c=!0,l[h]=g,!d)continue;f!==(b.default||0)&&(d=!1)}else h.startsWith("origin")?(u=!0,o[h]=g):a[h]=g}if(t.transform||(c||n?a.transform=Ik(e.transform,s,d,n):a.transform&&(a.transform="none")),u){const{originX:h="50%",originY:f="50%",originZ:b=0}=o;a.transformOrigin=`${h} ${f} ${b}`}}const Eh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gy(e,t,s){for(const n in t)!wt(t[n])&&!dy(n,s)&&(e[n]=t[n])}function $k({transformTemplate:e},t,s){return y.useMemo(()=>{const n=Eh();return Ch(n,t,{enableHardwareAcceleration:!s},e),Object.assign({},n.vars,n.style)},[t])}function Hk(e,t,s){const n=e.style||{},a={};return gy(a,n,e),Object.assign(a,$k(e,t,s)),e.transformValues?e.transformValues(a):a}function Wk(e,t,s){const n={},a=Hk(e,t,s);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=a,n}const qk=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Zl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qk.has(e)}let xy=e=>!Zl(e);function Kk(e){e&&(xy=t=>t.startsWith("on")?!Zl(t):e(t))}try{Kk(require("@emotion/is-prop-valid").default)}catch{}function Qk(e,t,s){const n={};for(const a in e)a==="values"&&typeof e.values=="object"||(xy(a)||s===!0&&Zl(a)||!t&&!Zl(a)||e.draggable&&a.startsWith("onDrag"))&&(n[a]=e[a]);return n}function Vm(e,t,s){return typeof e=="string"?e:J.transform(t+s*e)}function Gk(e,t,s){const n=Vm(t,e.x,e.width),a=Vm(s,e.y,e.height);return`${n} ${a}`}const Xk={offset:"stroke-dashoffset",array:"stroke-dasharray"},Jk={offset:"strokeDashoffset",array:"strokeDasharray"};function Yk(e,t,s=1,n=0,a=!0){e.pathLength=1;const i=a?Xk:Jk;e[i.offset]=J.transform(-n);const l=J.transform(t),o=J.transform(s);e[i.array]=`${l} ${o}`}function Ph(e,{attrX:t,attrY:s,attrScale:n,originX:a,originY:i,pathLength:l,pathSpacing:o=1,pathOffset:c=0,...u},d,h,f){if(Ch(e,u,d,f),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:b,style:g,dimensions:v}=e;b.transform&&(v&&(g.transform=b.transform),delete b.transform),v&&(a!==void 0||i!==void 0||g.transform)&&(g.transformOrigin=Gk(v,a!==void 0?a:.5,i!==void 0?i:.5)),t!==void 0&&(b.x=t),s!==void 0&&(b.y=s),n!==void 0&&(b.scale=n),l!==void 0&&Yk(b,l,o,c,!1)}const yy=()=>({...Eh(),attrs:{}}),Th=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Zk(e,t,s,n){const a=y.useMemo(()=>{const i=yy();return Ph(i,t,{enableHardwareAcceleration:!1},Th(n),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};gy(i,e.style,e),a.style={...i,...a.style}}return a}function eS(e=!1){return(s,n,a,{latestValues:i},l)=>{const c=(Sh(s)?Zk:Wk)(n,i,l,s),d={...Qk(n,typeof s=="string",e),...c,ref:a},{children:h}=n,f=y.useMemo(()=>wt(h)?h.get():h,[h]);return y.createElement(s,{...d,children:f})}}function vy(e,{style:t,vars:s},n,a){Object.assign(e.style,t,a&&a.getProjectionStyles(n));for(const i in s)e.style.setProperty(i,s[i])}const by=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function jy(e,t,s,n){vy(e,t,void 0,n);for(const a in t.attrs)e.setAttribute(by.has(a)?a:jh(a),t.attrs[a])}function _h(e,t){const{style:s}=e,n={};for(const a in s)(wt(s[a])||t.style&&wt(t.style[a])||dy(a,e))&&(n[a]=s[a]);return n}function wy(e,t){const s=_h(e,t);for(const n in e)if(wt(e[n])||wt(t[n])){const a=wi.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;s[a]=e[n]}return s}function Ah(e,t,s,n={},a={}){return typeof t=="function"&&(t=t(s!==void 0?s:e.custom,n,a)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(s!==void 0?s:e.custom,n,a)),t}function Ny(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const eo=e=>Array.isArray(e),tS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),sS=e=>eo(e)?e[e.length-1]||0:e;function yl(e){const t=wt(e)?e.get():e;return tS(t)?t.toValue():t}function nS({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:s},n,a,i){const l={latestValues:rS(n,a,i,e),renderState:t()};return s&&(l.mount=o=>s(n,o,l)),l}const ky=e=>(t,s)=>{const n=y.useContext(Lo),a=y.useContext(Do),i=()=>nS(e,t,n,a);return s?i():Ny(i)};function rS(e,t,s,n){const a={},i=n(e,{});for(const f in i)a[f]=yl(i[f]);let{initial:l,animate:o}=e;const c=Fo(e),u=cy(e);t&&u&&!c&&e.inherit!==!1&&(l===void 0&&(l=t.initial),o===void 0&&(o=t.animate));let d=s?s.initial===!1:!1;d=d||l===!1;const h=d?o:l;return h&&typeof h!="boolean"&&!Io(h)&&(Array.isArray(h)?h:[h]).forEach(b=>{const g=Ah(e,b);if(!g)return;const{transitionEnd:v,transition:w,...x}=g;for(const m in x){let p=x[m];if(Array.isArray(p)){const j=d?p.length-1:0;p=p[j]}p!==null&&(a[m]=p)}for(const m in v)a[m]=v[m]}),a}const _e=e=>e;class zm{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const s=this.order.indexOf(t);s!==-1&&(this.order.splice(s,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function aS(e){let t=new zm,s=new zm,n=0,a=!1,i=!1;const l=new WeakSet,o={schedule:(c,u=!1,d=!1)=>{const h=d&&a,f=h?t:s;return u&&l.add(c),f.add(c)&&h&&a&&(n=t.order.length),c},cancel:c=>{s.remove(c),l.delete(c)},process:c=>{if(a){i=!0;return}if(a=!0,[t,s]=[s,t],s.clear(),n=t.order.length,n)for(let u=0;u<n;u++){const d=t.order[u];d(c),l.has(d)&&(o.schedule(d),e())}a=!1,i&&(i=!1,o.process(c))}};return o}const tl=["prepare","read","update","preRender","render","postRender"],iS=40;function lS(e,t){let s=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=tl.reduce((h,f)=>(h[f]=aS(()=>s=!0),h),{}),l=h=>i[h].process(a),o=()=>{const h=performance.now();s=!1,a.delta=n?1e3/60:Math.max(Math.min(h-a.timestamp,iS),1),a.timestamp=h,a.isProcessing=!0,tl.forEach(l),a.isProcessing=!1,s&&t&&(n=!1,e(o))},c=()=>{s=!0,n=!0,a.isProcessing||e(o)};return{schedule:tl.reduce((h,f)=>{const b=i[f];return h[f]=(g,v=!1,w=!1)=>(s||c(),b.schedule(g,v,w)),h},{}),cancel:h=>tl.forEach(f=>i[f].cancel(h)),state:a,steps:i}}const{schedule:he,cancel:Ts,state:st,steps:kc}=lS(typeof requestAnimationFrame<"u"?requestAnimationFrame:_e,!0),oS={useVisualState:ky({scrapeMotionValuesFromProps:wy,createRenderState:yy,onMount:(e,t,{renderState:s,latestValues:n})=>{he.read(()=>{try{s.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}),he.render(()=>{Ph(s,n,{enableHardwareAcceleration:!1},Th(t.tagName),e.transformTemplate),jy(t,s)})}})},cS={useVisualState:ky({scrapeMotionValuesFromProps:_h,createRenderState:Eh})};function uS(e,{forwardMotionProps:t=!1},s,n){return{...Sh(e)?oS:cS,preloadedFeatures:s,useRender:eS(t),createVisualElement:n,Component:e}}function js(e,t,s,n={passive:!0}){return e.addEventListener(t,s,n),()=>e.removeEventListener(t,s)}const Sy=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function zo(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const dS=e=>t=>Sy(t)&&e(t,zo(t));function Ns(e,t,s,n){return js(e,t,dS(s),n)}const hS=(e,t)=>s=>t(e(s)),un=(...e)=>e.reduce(hS);function Cy(e){let t=null;return()=>{const s=()=>{t=null};return t===null?(t=e,s):!1}}const Um=Cy("dragHorizontal"),Bm=Cy("dragVertical");function Ey(e){let t=!1;if(e==="y")t=Bm();else if(e==="x")t=Um();else{const s=Um(),n=Bm();s&&n?t=()=>{s(),n()}:(s&&s(),n&&n())}return t}function Py(){const e=Ey(!0);return e?(e(),!1):!0}class vn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function $m(e,t){const s="pointer"+(t?"enter":"leave"),n="onHover"+(t?"Start":"End"),a=(i,l)=>{if(i.pointerType==="touch"||Py())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t),o[n]&&he.update(()=>o[n](i,l))};return Ns(e.current,s,a,{passive:!e.getProps()[n]})}class fS extends vn{mount(){this.unmount=un($m(this.node,!0),$m(this.node,!1))}unmount(){}}class mS extends vn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=un(js(this.node.current,"focus",()=>this.onFocus()),js(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ty=(e,t)=>t?e===t?!0:Ty(e,t.parentElement):!1;function Sc(e,t){if(!t)return;const s=new PointerEvent("pointer"+e);t(s,zo(s))}class pS extends vn{constructor(){super(...arguments),this.removeStartListeners=_e,this.removeEndListeners=_e,this.removeAccessibleListeners=_e,this.startPointerPress=(t,s)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=Ns(window,"pointerup",(o,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d,globalTapTarget:h}=this.node.getProps();he.update(()=>{!h&&!Ty(this.node.current,o.target)?d&&d(o,c):u&&u(o,c)})},{passive:!(n.onTap||n.onPointerUp)}),l=Ns(window,"pointercancel",(o,c)=>this.cancelPress(o,c),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=un(i,l),this.startPress(t,s)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const l=o=>{o.key!=="Enter"||!this.checkPressEnd()||Sc("up",(c,u)=>{const{onTap:d}=this.node.getProps();d&&he.update(()=>d(c,u))})};this.removeEndListeners(),this.removeEndListeners=js(this.node.current,"keyup",l),Sc("down",(o,c)=>{this.startPress(o,c)})},s=js(this.node.current,"keydown",t),n=()=>{this.isPressing&&Sc("cancel",(i,l)=>this.cancelPress(i,l))},a=js(this.node.current,"blur",n);this.removeAccessibleListeners=un(s,a)}}startPress(t,s){this.isPressing=!0;const{onTapStart:n,whileTap:a}=this.node.getProps();a&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&he.update(()=>n(t,s))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Py()}cancelPress(t,s){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&he.update(()=>n(t,s))}mount(){const t=this.node.getProps(),s=Ns(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=js(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=un(s,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Qu=new WeakMap,Cc=new WeakMap,gS=e=>{const t=Qu.get(e.target);t&&t(e)},xS=e=>{e.forEach(gS)};function yS({root:e,...t}){const s=e||document;Cc.has(s)||Cc.set(s,{});const n=Cc.get(s),a=JSON.stringify(t);return n[a]||(n[a]=new IntersectionObserver(xS,{root:e,...t})),n[a]}function vS(e,t,s){const n=yS(t);return Qu.set(e,s),n.observe(e),()=>{Qu.delete(e),n.unobserve(e)}}const bS={some:0,all:1};class jS extends vn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:s,margin:n,amount:a="some",once:i}=t,l={root:s?s.current:void 0,rootMargin:n,threshold:typeof a=="number"?a:bS[a]},o=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};return vS(this.node.current,l,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(wS(t,s))&&this.startObserver()}unmount(){}}function wS({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const NS={inView:{Feature:jS},tap:{Feature:pS},focus:{Feature:mS},hover:{Feature:fS}};function _y(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let n=0;n<s;n++)if(t[n]!==e[n])return!1;return!0}function kS(e){const t={};return e.values.forEach((s,n)=>t[n]=s.get()),t}function SS(e){const t={};return e.values.forEach((s,n)=>t[n]=s.getVelocity()),t}function Uo(e,t,s){const n=e.getProps();return Ah(n,t,s!==void 0?s:n.custom,kS(e),SS(e))}let Rh=_e;const zn=e=>e*1e3,ks=e=>e/1e3,CS={current:!1},Ay=e=>Array.isArray(e)&&typeof e[0]=="number";function Ry(e){return!!(!e||typeof e=="string"&&My[e]||Ay(e)||Array.isArray(e)&&e.every(Ry))}const Na=([e,t,s,n])=>`cubic-bezier(${e}, ${t}, ${s}, ${n})`,My={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Na([0,.65,.55,1]),circOut:Na([.55,0,1,.45]),backIn:Na([.31,.01,.66,-.59]),backOut:Na([.33,1.53,.69,.99])};function Ly(e){if(e)return Ay(e)?Na(e):Array.isArray(e)?e.map(Ly):My[e]}function ES(e,t,s,{delay:n=0,duration:a,repeat:i=0,repeatType:l="loop",ease:o,times:c}={}){const u={[t]:s};c&&(u.offset=c);const d=Ly(o);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:n,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:l==="reverse"?"alternate":"normal"})}function PS(e,{repeat:t,repeatType:s="loop"}){const n=t&&s!=="loop"&&t%2===1?0:e.length-1;return e[n]}const Dy=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,TS=1e-7,_S=12;function AS(e,t,s,n,a){let i,l,o=0;do l=t+(s-t)/2,i=Dy(l,n,a)-e,i>0?s=l:t=l;while(Math.abs(i)>TS&&++o<_S);return l}function Si(e,t,s,n){if(e===t&&s===n)return _e;const a=i=>AS(i,0,1,e,s);return i=>i===0||i===1?i:Dy(a(i),t,n)}const RS=Si(.42,0,1,1),MS=Si(0,0,.58,1),Oy=Si(.42,0,.58,1),LS=e=>Array.isArray(e)&&typeof e[0]!="number",Iy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Fy=e=>t=>1-e(1-t),Mh=e=>1-Math.sin(Math.acos(e)),Vy=Fy(Mh),DS=Iy(Mh),zy=Si(.33,1.53,.69,.99),Lh=Fy(zy),OS=Iy(Lh),IS=e=>(e*=2)<1?.5*Lh(e):.5*(2-Math.pow(2,-10*(e-1))),FS={linear:_e,easeIn:RS,easeInOut:Oy,easeOut:MS,circIn:Mh,circInOut:DS,circOut:Vy,backIn:Lh,backInOut:OS,backOut:zy,anticipate:IS},Hm=e=>{if(Array.isArray(e)){Rh(e.length===4);const[t,s,n,a]=e;return Si(t,s,n,a)}else if(typeof e=="string")return FS[e];return e},Dh=(e,t)=>s=>!!(Ni(s)&&zk.test(s)&&s.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(s,t)),Uy=(e,t,s)=>n=>{if(!Ni(n))return n;const[a,i,l,o]=n.match(Vo);return{[e]:parseFloat(a),[t]:parseFloat(i),[s]:parseFloat(l),alpha:o!==void 0?parseFloat(o):1}},VS=e=>fn(0,255,e),Ec={...Zn,transform:e=>Math.round(VS(e))},_n={test:Dh("rgb","red"),parse:Uy("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:n=1})=>"rgba("+Ec.transform(e)+", "+Ec.transform(t)+", "+Ec.transform(s)+", "+La(Ma.transform(n))+")"};function zS(e){let t="",s="",n="",a="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),n=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),n=e.substring(3,4),a=e.substring(4,5),t+=t,s+=s,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const Gu={test:Dh("#"),parse:zS,transform:_n.transform},gr={test:Dh("hsl","hue"),parse:Uy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:n=1})=>"hsla("+Math.round(e)+", "+ds.transform(La(t))+", "+ds.transform(La(s))+", "+La(Ma.transform(n))+")"},ot={test:e=>_n.test(e)||Gu.test(e)||gr.test(e),parse:e=>_n.test(e)?_n.parse(e):gr.test(e)?gr.parse(e):Gu.parse(e),transform:e=>Ni(e)?e:e.hasOwnProperty("red")?_n.transform(e):gr.transform(e)},Ne=(e,t,s)=>-s*e+s*t+e;function Pc(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function US({hue:e,saturation:t,lightness:s,alpha:n}){e/=360,t/=100,s/=100;let a=0,i=0,l=0;if(!t)a=i=l=s;else{const o=s<.5?s*(1+t):s+t-s*t,c=2*s-o;a=Pc(c,o,e+1/3),i=Pc(c,o,e),l=Pc(c,o,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(l*255),alpha:n}}const Tc=(e,t,s)=>{const n=e*e;return Math.sqrt(Math.max(0,s*(t*t-n)+n))},BS=[Gu,_n,gr],$S=e=>BS.find(t=>t.test(e));function Wm(e){const t=$S(e);let s=t.parse(e);return t===gr&&(s=US(s)),s}const By=(e,t)=>{const s=Wm(e),n=Wm(t),a={...s};return i=>(a.red=Tc(s.red,n.red,i),a.green=Tc(s.green,n.green,i),a.blue=Tc(s.blue,n.blue,i),a.alpha=Ne(s.alpha,n.alpha,i),_n.transform(a))};function HS(e){var t,s;return isNaN(e)&&Ni(e)&&(((t=e.match(Vo))===null||t===void 0?void 0:t.length)||0)+(((s=e.match(my))===null||s===void 0?void 0:s.length)||0)>0}const $y={regex:Fk,countKey:"Vars",token:"${v}",parse:_e},Hy={regex:my,countKey:"Colors",token:"${c}",parse:ot.parse},Wy={regex:Vo,countKey:"Numbers",token:"${n}",parse:Zn.parse};function _c(e,{regex:t,countKey:s,token:n,parse:a}){const i=e.tokenised.match(t);i&&(e["num"+s]=i.length,e.tokenised=e.tokenised.replace(t,n),e.values.push(...i.map(a)))}function to(e){const t=e.toString(),s={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return s.value.includes("var(--")&&_c(s,$y),_c(s,Hy),_c(s,Wy),s}function qy(e){return to(e).values}function Ky(e){const{values:t,numColors:s,numVars:n,tokenised:a}=to(e),i=t.length;return l=>{let o=a;for(let c=0;c<i;c++)c<n?o=o.replace($y.token,l[c]):c<n+s?o=o.replace(Hy.token,ot.transform(l[c])):o=o.replace(Wy.token,La(l[c]));return o}}const WS=e=>typeof e=="number"?0:e;function qS(e){const t=qy(e);return Ky(e)(t.map(WS))}const mn={test:HS,parse:qy,createTransformer:Ky,getAnimatableNone:qS},Qy=(e,t)=>s=>`${s>0?t:e}`;function Gy(e,t){return typeof e=="number"?s=>Ne(e,t,s):ot.test(e)?By(e,t):e.startsWith("var(")?Qy(e,t):Jy(e,t)}const Xy=(e,t)=>{const s=[...e],n=s.length,a=e.map((i,l)=>Gy(i,t[l]));return i=>{for(let l=0;l<n;l++)s[l]=a[l](i);return s}},KS=(e,t)=>{const s={...e,...t},n={};for(const a in s)e[a]!==void 0&&t[a]!==void 0&&(n[a]=Gy(e[a],t[a]));return a=>{for(const i in n)s[i]=n[i](a);return s}},Jy=(e,t)=>{const s=mn.createTransformer(t),n=to(e),a=to(t);return n.numVars===a.numVars&&n.numColors===a.numColors&&n.numNumbers>=a.numNumbers?un(Xy(n.values,a.values),s):Qy(e,t)},li=(e,t,s)=>{const n=t-e;return n===0?1:(s-e)/n},qm=(e,t)=>s=>Ne(e,t,s);function QS(e){return typeof e=="number"?qm:typeof e=="string"?ot.test(e)?By:Jy:Array.isArray(e)?Xy:typeof e=="object"?KS:qm}function GS(e,t,s){const n=[],a=s||QS(e[0]),i=e.length-1;for(let l=0;l<i;l++){let o=a(e[l],e[l+1]);if(t){const c=Array.isArray(t)?t[l]||_e:t;o=un(c,o)}n.push(o)}return n}function Yy(e,t,{clamp:s=!0,ease:n,mixer:a}={}){const i=e.length;if(Rh(i===t.length),i===1)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=GS(t,n,a),o=l.length,c=u=>{let d=0;if(o>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const h=li(e[d],e[d+1],u);return l[d](h)};return s?u=>c(fn(e[0],e[i-1],u)):c}function XS(e,t){const s=e[e.length-1];for(let n=1;n<=t;n++){const a=li(0,t,n);e.push(Ne(s,1,a))}}function JS(e){const t=[0];return XS(t,e.length-1),t}function YS(e,t){return e.map(s=>s*t)}function ZS(e,t){return e.map(()=>t||Oy).splice(0,e.length-1)}function so({duration:e=300,keyframes:t,times:s,ease:n="easeInOut"}){const a=LS(n)?n.map(Hm):Hm(n),i={done:!1,value:t[0]},l=YS(s&&s.length===t.length?s:JS(t),e),o=Yy(l,t,{ease:Array.isArray(a)?a:ZS(t,a)});return{calculatedDuration:e,next:c=>(i.value=o(c),i.done=c>=e,i)}}function Zy(e,t){return t?e*(1e3/t):0}const e2=5;function ev(e,t,s){const n=Math.max(t-e2,0);return Zy(s-e(n),t-n)}const Ac=.001,t2=.01,s2=10,n2=.05,r2=1;function a2({duration:e=800,bounce:t=.25,velocity:s=0,mass:n=1}){let a,i,l=1-t;l=fn(n2,r2,l),e=fn(t2,s2,ks(e)),l<1?(a=u=>{const d=u*l,h=d*e,f=d-s,b=Xu(u,l),g=Math.exp(-h);return Ac-f/b*g},i=u=>{const h=u*l*e,f=h*s+s,b=Math.pow(l,2)*Math.pow(u,2)*e,g=Math.exp(-h),v=Xu(Math.pow(u,2),l);return(-a(u)+Ac>0?-1:1)*((f-b)*g)/v}):(a=u=>{const d=Math.exp(-u*e),h=(u-s)*e+1;return-Ac+d*h},i=u=>{const d=Math.exp(-u*e),h=(s-u)*(e*e);return d*h});const o=5/e,c=l2(a,i,o);if(e=zn(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:l*2*Math.sqrt(n*u),duration:e}}}const i2=12;function l2(e,t,s){let n=s;for(let a=1;a<i2;a++)n=n-e(n)/t(n);return n}function Xu(e,t){return e*Math.sqrt(1-t*t)}const o2=["duration","bounce"],c2=["stiffness","damping","mass"];function Km(e,t){return t.some(s=>e[s]!==void 0)}function u2(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Km(e,c2)&&Km(e,o2)){const s=a2(e);t={...t,...s,mass:1},t.isResolvedFromDuration=!0}return t}function tv({keyframes:e,restDelta:t,restSpeed:s,...n}){const a=e[0],i=e[e.length-1],l={done:!1,value:a},{stiffness:o,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=u2({...n,velocity:-ks(n.velocity||0)}),b=h||0,g=c/(2*Math.sqrt(o*u)),v=i-a,w=ks(Math.sqrt(o/u)),x=Math.abs(v)<5;s||(s=x?.01:2),t||(t=x?.005:.5);let m;if(g<1){const p=Xu(w,g);m=j=>{const k=Math.exp(-g*w*j);return i-k*((b+g*w*v)/p*Math.sin(p*j)+v*Math.cos(p*j))}}else if(g===1)m=p=>i-Math.exp(-w*p)*(v+(b+w*v)*p);else{const p=w*Math.sqrt(g*g-1);m=j=>{const k=Math.exp(-g*w*j),S=Math.min(p*j,300);return i-k*((b+g*w*v)*Math.sinh(S)+p*v*Math.cosh(S))/p}}return{calculatedDuration:f&&d||null,next:p=>{const j=m(p);if(f)l.done=p>=d;else{let k=b;p!==0&&(g<1?k=ev(m,p,j):k=0);const S=Math.abs(k)<=s,E=Math.abs(i-j)<=t;l.done=S&&E}return l.value=l.done?i:j,l}}}function Qm({keyframes:e,velocity:t=0,power:s=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:l,min:o,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},b=N=>o!==void 0&&N<o||c!==void 0&&N>c,g=N=>o===void 0?c:c===void 0||Math.abs(o-N)<Math.abs(c-N)?o:c;let v=s*t;const w=h+v,x=l===void 0?w:l(w);x!==w&&(v=x-h);const m=N=>-v*Math.exp(-N/n),p=N=>x+m(N),j=N=>{const L=m(N),R=p(N);f.done=Math.abs(L)<=u,f.value=f.done?x:R};let k,S;const E=N=>{b(f.value)&&(k=N,S=tv({keyframes:[f.value,g(f.value)],velocity:ev(p,N,f.value),damping:a,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:N=>{let L=!1;return!S&&k===void 0&&(L=!0,j(N),E(N)),k!==void 0&&N>k?S.next(N-k):(!L&&j(N),f)}}}const d2=e=>{const t=({timestamp:s})=>e(s);return{start:()=>he.update(t,!0),stop:()=>Ts(t),now:()=>st.isProcessing?st.timestamp:performance.now()}},Gm=2e4;function Xm(e){let t=0;const s=50;let n=e.next(t);for(;!n.done&&t<Gm;)t+=s,n=e.next(t);return t>=Gm?1/0:t}const h2={decay:Qm,inertia:Qm,tween:so,keyframes:so,spring:tv};function no({autoplay:e=!0,delay:t=0,driver:s=d2,keyframes:n,type:a="keyframes",repeat:i=0,repeatDelay:l=0,repeatType:o="loop",onPlay:c,onStop:u,onComplete:d,onUpdate:h,...f}){let b=1,g=!1,v,w;const x=()=>{w=new Promise(U=>{v=U})};x();let m;const p=h2[a]||so;let j;p!==so&&typeof n[0]!="number"&&(j=Yy([0,100],n,{clamp:!1}),n=[0,100]);const k=p({...f,keyframes:n});let S;o==="mirror"&&(S=p({...f,keyframes:[...n].reverse(),velocity:-(f.velocity||0)}));let E="idle",N=null,L=null,R=null;k.calculatedDuration===null&&i&&(k.calculatedDuration=Xm(k));const{calculatedDuration:W}=k;let $=1/0,P=1/0;W!==null&&($=W+l,P=$*(i+1)-l);let D=0;const z=U=>{if(L===null)return;b>0&&(L=Math.min(L,U)),b<0&&(L=Math.min(U-P/b,L)),N!==null?D=N:D=Math.round(U-L)*b;const A=D-t*(b>=0?1:-1),Z=b>=0?A<0:A>P;D=Math.max(A,0),E==="finished"&&N===null&&(D=P);let se=D,ce=k;if(i){const Je=Math.min(D,P)/$;let Rt=Math.floor(Je),Q=Je%1;!Q&&Je>=1&&(Q=1),Q===1&&Rt--,Rt=Math.min(Rt,i+1),!!(Rt%2)&&(o==="reverse"?(Q=1-Q,l&&(Q-=l/$)):o==="mirror"&&(ce=S)),se=fn(0,1,Q)*$}const F=Z?{done:!1,value:n[0]}:ce.next(se);j&&(F.value=j(F.value));let{done:X}=F;!Z&&W!==null&&(X=b>=0?D>=P:D<=0);const Le=N===null&&(E==="finished"||E==="running"&&X);return h&&h(F.value),Le&&C(),F},H=()=>{m&&m.stop(),m=void 0},O=()=>{E="idle",H(),v(),x(),L=R=null},C=()=>{E="finished",d&&d(),H(),v()},_=()=>{if(g)return;m||(m=s(z));const U=m.now();c&&c(),N!==null?L=U-N:(!L||E==="finished")&&(L=U),E==="finished"&&x(),R=L,N=null,E="running",m.start()};e&&_();const B={then(U,A){return w.then(U,A)},get time(){return ks(D)},set time(U){U=zn(U),D=U,N!==null||!m||b===0?N=U:L=m.now()-U/b},get duration(){const U=k.calculatedDuration===null?Xm(k):k.calculatedDuration;return ks(U)},get speed(){return b},set speed(U){U===b||!m||(b=U,B.time=ks(D))},get state(){return E},play:_,pause:()=>{E="paused",N=D},stop:()=>{g=!0,E!=="idle"&&(E="idle",u&&u(),O())},cancel:()=>{R!==null&&z(R),O()},complete:()=>{E="finished"},sample:U=>(L=0,z(U))};return B}function f2(e){let t;return()=>(t===void 0&&(t=e()),t)}const m2=f2(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),p2=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),sl=10,g2=2e4,x2=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Ry(t.ease);function y2(e,t,{onUpdate:s,onComplete:n,...a}){if(!(m2()&&p2.has(t)&&!a.repeatDelay&&a.repeatType!=="mirror"&&a.damping!==0&&a.type!=="inertia"))return!1;let l=!1,o,c,u=!1;const d=()=>{c=new Promise(p=>{o=p})};d();let{keyframes:h,duration:f=300,ease:b,times:g}=a;if(x2(t,a)){const p=no({...a,repeat:0,delay:0});let j={done:!1,value:h[0]};const k=[];let S=0;for(;!j.done&&S<g2;)j=p.sample(S),k.push(j.value),S+=sl;g=void 0,h=k,f=S-sl,b="linear"}const v=ES(e.owner.current,t,h,{...a,duration:f,ease:b,times:g}),w=()=>{u=!1,v.cancel()},x=()=>{u=!0,he.update(w),o(),d()};return v.onfinish=()=>{u||(e.set(PS(h,a)),n&&n(),x())},{then(p,j){return c.then(p,j)},attachTimeline(p){return v.timeline=p,v.onfinish=null,_e},get time(){return ks(v.currentTime||0)},set time(p){v.currentTime=zn(p)},get speed(){return v.playbackRate},set speed(p){v.playbackRate=p},get duration(){return ks(f)},play:()=>{l||(v.play(),Ts(w))},pause:()=>v.pause(),stop:()=>{if(l=!0,v.playState==="idle")return;const{currentTime:p}=v;if(p){const j=no({...a,autoplay:!1});e.setWithVelocity(j.sample(p-sl).value,j.sample(p).value,sl)}x()},complete:()=>{u||v.finish()},cancel:x}}function v2({keyframes:e,delay:t,onUpdate:s,onComplete:n}){const a=()=>(s&&s(e[e.length-1]),n&&n(),{time:0,speed:1,duration:0,play:_e,pause:_e,stop:_e,then:i=>(i(),Promise.resolve()),cancel:_e,complete:_e});return t?no({keyframes:[0,1],duration:0,delay:t,onComplete:a}):a()}const b2={type:"spring",stiffness:500,damping:25,restSpeed:10},j2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),w2={type:"keyframes",duration:.8},N2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},k2=(e,{keyframes:t})=>t.length>2?w2:Yn.has(e)?e.startsWith("scale")?j2(t[1]):b2:N2,Ju=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(mn.test(t)||t==="0")&&!t.startsWith("url(")),S2=new Set(["brightness","contrast","saturate","opacity"]);function C2(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=s.match(Vo)||[];if(!n)return e;const a=s.replace(n,"");let i=S2.has(t)?1:0;return n!==s&&(i*=100),t+"("+i+a+")"}const E2=/([a-z-]*)\(.*?\)/g,Yu={...mn,getAnimatableNone:e=>{const t=e.match(E2);return t?t.map(C2).join(" "):e}},P2={...py,color:ot,backgroundColor:ot,outlineColor:ot,fill:ot,stroke:ot,borderColor:ot,borderTopColor:ot,borderRightColor:ot,borderBottomColor:ot,borderLeftColor:ot,filter:Yu,WebkitFilter:Yu},Oh=e=>P2[e];function sv(e,t){let s=Oh(e);return s!==Yu&&(s=mn),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const nv=e=>/^0[^.\s]+$/.test(e);function T2(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||nv(e)}function _2(e,t,s,n){const a=Ju(t,s);let i;Array.isArray(s)?i=[...s]:i=[null,s];const l=n.from!==void 0?n.from:e.get();let o;const c=[];for(let u=0;u<i.length;u++)i[u]===null&&(i[u]=u===0?l:i[u-1]),T2(i[u])&&c.push(u),typeof i[u]=="string"&&i[u]!=="none"&&i[u]!=="0"&&(o=i[u]);if(a&&c.length&&o)for(let u=0;u<c.length;u++){const d=c[u];i[d]=sv(t,o)}return i}function A2({when:e,delay:t,delayChildren:s,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:l,repeatDelay:o,from:c,elapsed:u,...d}){return!!Object.keys(d).length}function Ih(e,t){return e[t]||e.default||e}const R2={skipAnimations:!1},Fh=(e,t,s,n={})=>a=>{const i=Ih(n,e)||{},l=i.delay||n.delay||0;let{elapsed:o=0}=n;o=o-zn(l);const c=_2(t,e,s,i),u=c[0],d=c[c.length-1],h=Ju(e,u),f=Ju(e,d);let b={keyframes:c,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-o,onUpdate:g=>{t.set(g),i.onUpdate&&i.onUpdate(g)},onComplete:()=>{a(),i.onComplete&&i.onComplete()}};if(A2(i)||(b={...b,...k2(e,b)}),b.duration&&(b.duration=zn(b.duration)),b.repeatDelay&&(b.repeatDelay=zn(b.repeatDelay)),!h||!f||CS.current||i.type===!1||R2.skipAnimations)return v2(b);if(!n.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const g=y2(t,e,b);if(g)return g}return no(b)};function ro(e){return!!(wt(e)&&e.add)}const rv=e=>/^\-?\d*\.?\d+$/.test(e);function Vh(e,t){e.indexOf(t)===-1&&e.push(t)}function zh(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}class Uh{constructor(){this.subscriptions=[]}add(t){return Vh(this.subscriptions,t),()=>zh(this.subscriptions,t)}notify(t,s,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,s,n);else for(let i=0;i<a;i++){const l=this.subscriptions[i];l&&l(t,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const M2=e=>!isNaN(parseFloat(e));class L2{constructor(t,s={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,a=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:l}=st;this.lastUpdated!==l&&(this.timeDelta=i,this.lastUpdated=l,he.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>he.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=M2(this.current),this.owner=s.owner}onChange(t){return this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new Uh);const n=this.events[t].add(s);return t==="change"?()=>{n(),he.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t,s=!0){!s||!this.passiveEffect?this.updateAndNotify(t,s):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,s,n){this.set(s),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Zy(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=t(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hr(e,t){return new L2(e,t)}const av=e=>t=>t.test(e),D2={test:e=>e==="auto",parse:e=>e},iv=[Zn,J,ds,Vs,Bk,Uk,D2],ma=e=>iv.find(av(e)),O2=[...iv,ot,mn],I2=e=>O2.find(av(e));function F2(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,Hr(s))}function V2(e,t){const s=Uo(e,t);let{transitionEnd:n={},transition:a={},...i}=s?e.makeTargetAnimatable(s,!1):{};i={...i,...n};for(const l in i){const o=sS(i[l]);F2(e,l,o)}}function z2(e,t,s){var n,a;const i=Object.keys(t).filter(o=>!e.hasValue(o)),l=i.length;if(l)for(let o=0;o<l;o++){const c=i[o],u=t[c];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(a=(n=s[c])!==null&&n!==void 0?n:e.readValue(c))!==null&&a!==void 0?a:t[c]),d!=null&&(typeof d=="string"&&(rv(d)||nv(d))?d=parseFloat(d):!I2(d)&&mn.test(u)&&(d=sv(c,u)),e.addValue(c,Hr(d,{owner:e})),s[c]===void 0&&(s[c]=d),d!==null&&e.setBaseTarget(c,d))}}function U2(e,t){return t?(t[e]||t.default||t).from:void 0}function B2(e,t,s){const n={};for(const a in e){const i=U2(a,t);if(i!==void 0)n[a]=i;else{const l=s.getValue(a);l&&(n[a]=l.get())}}return n}function $2({protectedKeys:e,needsAnimating:t},s){const n=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,n}function H2(e,t){const s=e.get();if(Array.isArray(t)){for(let n=0;n<t.length;n++)if(t[n]!==s)return!0}else return s!==t}function lv(e,t,{delay:s=0,transitionOverride:n,type:a}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:l,...o}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");n&&(i=n);const u=[],d=a&&e.animationState&&e.animationState.getState()[a];for(const h in o){const f=e.getValue(h),b=o[h];if(!f||b===void 0||d&&$2(d,h))continue;const g={delay:s,elapsed:0,...Ih(i||{},h)};if(window.HandoffAppearAnimations){const x=e.getProps()[oy];if(x){const m=window.HandoffAppearAnimations(x,h,f,he);m!==null&&(g.elapsed=m,g.isHandoff=!0)}}let v=!g.isHandoff&&!H2(f,b);if(g.type==="spring"&&(f.getVelocity()||g.velocity)&&(v=!1),f.animation&&(v=!1),v)continue;f.start(Fh(h,f,b,e.shouldReduceMotion&&Yn.has(h)?{type:!1}:g));const w=f.animation;ro(c)&&(c.add(h),w.then(()=>c.remove(h))),u.push(w)}return l&&Promise.all(u).then(()=>{l&&V2(e,l)}),u}function Zu(e,t,s={}){const n=Uo(e,t,s.custom);let{transition:a=e.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(a=s.transitionOverride);const i=n?()=>Promise.all(lv(e,n,s)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=a;return W2(e,t,u+c,d,h,s)}:()=>Promise.resolve(),{when:o}=a;if(o){const[c,u]=o==="beforeChildren"?[i,l]:[l,i];return c().then(()=>u())}else return Promise.all([i(),l(s.delay)])}function W2(e,t,s=0,n=0,a=1,i){const l=[],o=(e.variantChildren.size-1)*n,c=a===1?(u=0)=>u*n:(u=0)=>o-u*n;return Array.from(e.variantChildren).sort(q2).forEach((u,d)=>{u.notify("AnimationStart",t),l.push(Zu(u,t,{...i,delay:s+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(l)}function q2(e,t){return e.sortNodePosition(t)}function K2(e,t,s={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const a=t.map(i=>Zu(e,i,s));n=Promise.all(a)}else if(typeof t=="string")n=Zu(e,t,s);else{const a=typeof t=="function"?Uo(e,t,s.custom):t;n=Promise.all(lv(e,a,s))}return n.then(()=>e.notify("AnimationComplete",t))}const Q2=[...wh].reverse(),G2=wh.length;function X2(e){return t=>Promise.all(t.map(({animation:s,options:n})=>K2(e,s,n)))}function J2(e){let t=X2(e);const s=Z2();let n=!0;const a=(c,u)=>{const d=Uo(e,u);if(d){const{transition:h,transitionEnd:f,...b}=d;c={...c,...b,...f}}return c};function i(c){t=c(e)}function l(c,u){const d=e.getProps(),h=e.getVariantContext(!0)||{},f=[],b=new Set;let g={},v=1/0;for(let x=0;x<G2;x++){const m=Q2[x],p=s[m],j=d[m]!==void 0?d[m]:h[m],k=ai(j),S=m===u?p.isActive:null;S===!1&&(v=x);let E=j===h[m]&&j!==d[m]&&k;if(E&&n&&e.manuallyAnimateOnMount&&(E=!1),p.protectedKeys={...g},!p.isActive&&S===null||!j&&!p.prevProp||Io(j)||typeof j=="boolean")continue;let L=Y2(p.prevProp,j)||m===u&&p.isActive&&!E&&k||x>v&&k,R=!1;const W=Array.isArray(j)?j:[j];let $=W.reduce(a,{});S===!1&&($={});const{prevResolvedValues:P={}}=p,D={...P,...$},z=H=>{L=!0,b.has(H)&&(R=!0,b.delete(H)),p.needsAnimating[H]=!0};for(const H in D){const O=$[H],C=P[H];if(g.hasOwnProperty(H))continue;let _=!1;eo(O)&&eo(C)?_=!_y(O,C):_=O!==C,_?O!==void 0?z(H):b.add(H):O!==void 0&&b.has(H)?z(H):p.protectedKeys[H]=!0}p.prevProp=j,p.prevResolvedValues=$,p.isActive&&(g={...g,...$}),n&&e.blockInitialAnimation&&(L=!1),L&&(!E||R)&&f.push(...W.map(H=>({animation:H,options:{type:m,...c}})))}if(b.size){const x={};b.forEach(m=>{const p=e.getBaseTarget(m);p!==void 0&&(x[m]=p)}),f.push({animation:x})}let w=!!f.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(w=!1),n=!1,w?t(f):Promise.resolve()}function o(c,u,d){var h;if(s[c].isActive===u)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(b=>{var g;return(g=b.animationState)===null||g===void 0?void 0:g.setActive(c,u)}),s[c].isActive=u;const f=l(d,c);for(const b in s)s[b].protectedKeys={};return f}return{animateChanges:l,setActive:o,setAnimateFunction:i,getState:()=>s}}function Y2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!_y(t,e):!1}function jn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Z2(){return{animate:jn(!0),whileInView:jn(),whileHover:jn(),whileTap:jn(),whileDrag:jn(),whileFocus:jn(),exit:jn()}}class eC extends vn{constructor(t){super(t),t.animationState||(t.animationState=J2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Io(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){}}let tC=0;class sC extends vn{constructor(){super(...arguments),this.id=tC++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:s,custom:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;const i=this.node.animationState.setActive("exit",!t,{custom:n??this.node.getProps().custom});s&&!t&&i.then(()=>s(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const nC={animation:{Feature:eC},exit:{Feature:sC}},Jm=(e,t)=>Math.abs(e-t);function rC(e,t){const s=Jm(e.x,t.x),n=Jm(e.y,t.y);return Math.sqrt(s**2+n**2)}class ov{constructor(t,s,{transformPagePoint:n,contextWindow:a,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Mc(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,b=rC(h.offset,{x:0,y:0})>=3;if(!f&&!b)return;const{point:g}=h,{timestamp:v}=st;this.history.push({...g,timestamp:v});const{onStart:w,onMove:x}=this.handlers;f||(w&&w(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Rc(f,this.transformPagePoint),he.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:b,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Mc(h.type==="pointercancel"?this.lastMoveEventInfo:Rc(f,this.transformPagePoint),this.history);this.startEvent&&b&&b(h,w),g&&g(h,w)},!Sy(t))return;this.dragSnapToOrigin=i,this.handlers=s,this.transformPagePoint=n,this.contextWindow=a||window;const l=zo(t),o=Rc(l,this.transformPagePoint),{point:c}=o,{timestamp:u}=st;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=s;d&&d(t,Mc(o,this.history)),this.removeListeners=un(Ns(this.contextWindow,"pointermove",this.handlePointerMove),Ns(this.contextWindow,"pointerup",this.handlePointerUp),Ns(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ts(this.updatePoint)}}function Rc(e,t){return t?{point:t(e.point)}:e}function Ym(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Mc({point:e},t){return{point:e,delta:Ym(e,cv(t)),offset:Ym(e,aC(t)),velocity:iC(t,.1)}}function aC(e){return e[0]}function cv(e){return e[e.length-1]}function iC(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,n=null;const a=cv(e);for(;s>=0&&(n=e[s],!(a.timestamp-n.timestamp>zn(t)));)s--;if(!n)return{x:0,y:0};const i=ks(a.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const l={x:(a.x-n.x)/i,y:(a.y-n.y)/i};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function Pt(e){return e.max-e.min}function ed(e,t=0,s=.01){return Math.abs(e-t)<=s}function Zm(e,t,s,n=.5){e.origin=n,e.originPoint=Ne(t.min,t.max,e.origin),e.scale=Pt(s)/Pt(t),(ed(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Ne(s.min,s.max,e.origin)-e.originPoint,(ed(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Da(e,t,s,n){Zm(e.x,t.x,s.x,n?n.originX:void 0),Zm(e.y,t.y,s.y,n?n.originY:void 0)}function ep(e,t,s){e.min=s.min+t.min,e.max=e.min+Pt(t)}function lC(e,t,s){ep(e.x,t.x,s.x),ep(e.y,t.y,s.y)}function tp(e,t,s){e.min=t.min-s.min,e.max=e.min+Pt(t)}function Oa(e,t,s){tp(e.x,t.x,s.x),tp(e.y,t.y,s.y)}function oC(e,{min:t,max:s},n){return t!==void 0&&e<t?e=n?Ne(t,e,n.min):Math.max(e,t):s!==void 0&&e>s&&(e=n?Ne(s,e,n.max):Math.min(e,s)),e}function sp(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function cC(e,{top:t,left:s,bottom:n,right:a}){return{x:sp(e.x,s,a),y:sp(e.y,t,n)}}function np(e,t){let s=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,n]=[n,s]),{min:s,max:n}}function uC(e,t){return{x:np(e.x,t.x),y:np(e.y,t.y)}}function dC(e,t){let s=.5;const n=Pt(e),a=Pt(t);return a>n?s=li(t.min,t.max-n,e.min):n>a&&(s=li(e.min,e.max-a,t.min)),fn(0,1,s)}function hC(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const td=.35;function fC(e=td){return e===!1?e=0:e===!0&&(e=td),{x:rp(e,"left","right"),y:rp(e,"top","bottom")}}function rp(e,t,s){return{min:ap(e,t),max:ap(e,s)}}function ap(e,t){return typeof e=="number"?e:e[t]||0}const ip=()=>({translate:0,scale:1,origin:0,originPoint:0}),xr=()=>({x:ip(),y:ip()}),lp=()=>({min:0,max:0}),De=()=>({x:lp(),y:lp()});function Dt(e){return[e("x"),e("y")]}function uv({top:e,left:t,right:s,bottom:n}){return{x:{min:t,max:s},y:{min:e,max:n}}}function mC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pC(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}function Lc(e){return e===void 0||e===1}function sd({scale:e,scaleX:t,scaleY:s}){return!Lc(e)||!Lc(t)||!Lc(s)}function kn(e){return sd(e)||dv(e)||e.z||e.rotate||e.rotateX||e.rotateY}function dv(e){return op(e.x)||op(e.y)}function op(e){return e&&e!=="0%"}function ao(e,t,s){const n=e-s,a=t*n;return s+a}function cp(e,t,s,n,a){return a!==void 0&&(e=ao(e,a,n)),ao(e,s,n)+t}function nd(e,t=0,s=1,n,a){e.min=cp(e.min,t,s,n,a),e.max=cp(e.max,t,s,n,a)}function hv(e,{x:t,y:s}){nd(e.x,t.translate,t.scale,t.originPoint),nd(e.y,s.translate,s.scale,s.originPoint)}function gC(e,t,s,n=!1){const a=s.length;if(!a)return;t.x=t.y=1;let i,l;for(let o=0;o<a;o++){i=s[o],l=i.projectionDelta;const c=i.instance;c&&c.style&&c.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&yr(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,hv(e,l)),n&&kn(i.latestValues)&&yr(e,i.latestValues))}t.x=up(t.x),t.y=up(t.y)}function up(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Bs(e,t){e.min=e.min+t,e.max=e.max+t}function dp(e,t,[s,n,a]){const i=t[a]!==void 0?t[a]:.5,l=Ne(e.min,e.max,i);nd(e,t[s],t[n],l,t.scale)}const xC=["x","scaleX","originX"],yC=["y","scaleY","originY"];function yr(e,t){dp(e.x,t,xC),dp(e.y,t,yC)}function fv(e,t){return uv(pC(e.getBoundingClientRect(),t))}function vC(e,t,s){const n=fv(e,s),{scroll:a}=t;return a&&(Bs(n.x,a.offset.x),Bs(n.y,a.offset.y)),n}const mv=({current:e})=>e?e.ownerDocument.defaultView:null,bC=new WeakMap;class jC{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=De(),this.visualElement=t}start(t,{snapToCursor:s=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const a=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(zo(d,"page").point)},i=(d,h)=>{const{drag:f,dragPropagation:b,onDragStart:g}=this.getProps();if(f&&!b&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ey(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Dt(w=>{let x=this.getAxisMotionValue(w).get()||0;if(ds.test(x)){const{projection:m}=this.visualElement;if(m&&m.layout){const p=m.layout.layoutBox[w];p&&(x=Pt(p)*(parseFloat(x)/100))}}this.originPoint[w]=x}),g&&he.update(()=>g(d,h),!1,!0);const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},l=(d,h)=>{const{dragPropagation:f,dragDirectionLock:b,onDirectionLock:g,onDrag:v}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:w}=h;if(b&&this.currentDirection===null){this.currentDirection=wC(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,w),this.updateAxis("y",h.point,w),this.visualElement.render(),v&&v(d,h)},o=(d,h)=>this.stop(d,h),c=()=>Dt(d=>{var h;return this.getAnimationState(d)==="paused"&&((h=this.getAxisMotionValue(d).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ov(t,{onSessionStart:a,onStart:i,onMove:l,onSessionEnd:o,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:mv(this.visualElement)})}stop(t,s){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&he.update(()=>i(t,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(t,s,n){const{drag:a}=this.getProps();if(!n||!nl(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let l=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(l=oC(l,this.constraints[t],this.elastic[t])),i.set(l)}resolveConstraints(){var t;const{dragConstraints:s,dragElastic:n}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;s&&pr(s)?this.constraints||(this.constraints=this.resolveRefConstraints()):s&&a?this.constraints=cC(a.layoutBox,s):this.constraints=!1,this.elastic=fC(n),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&Dt(l=>{this.getAxisMotionValue(l)&&(this.constraints[l]=hC(a.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!pr(t))return!1;const n=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=vC(n,a.root,this.visualElement.getTransformPagePoint());let l=uC(a.layout.layoutBox,i);if(s){const o=s(mC(l));this.hasMutatedConstraints=!!o,o&&(l=uv(o))}return l}startAnimation(t){const{drag:s,dragMomentum:n,dragElastic:a,dragTransition:i,dragSnapToOrigin:l,onDragTransitionEnd:o}=this.getProps(),c=this.constraints||{},u=Dt(d=>{if(!nl(d,s,this.currentDirection))return;let h=c&&c[d]||{};l&&(h={min:0,max:0});const f=a?200:1e6,b=a?40:1e7,g={type:"inertia",velocity:n?t[d]:0,bounceStiffness:f,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(o)}startAxisValueAnimation(t,s){const n=this.getAxisMotionValue(t);return n.start(Fh(t,n,0,s))}stopAnimation(){Dt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Dt(t=>{var s;return(s=this.getAxisMotionValue(t).animation)===null||s===void 0?void 0:s.pause()})}getAnimationState(t){var s;return(s=this.getAxisMotionValue(t).animation)===null||s===void 0?void 0:s.state}getAxisMotionValue(t){const s="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),a=n[s];return a||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Dt(s=>{const{drag:n}=this.getProps();if(!nl(s,n,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(s);if(a&&a.layout){const{min:l,max:o}=a.layout.layoutBox[s];i.set(t[s]-Ne(l,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!pr(s)||!n||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};Dt(l=>{const o=this.getAxisMotionValue(l);if(o){const c=o.get();a[l]=dC({min:c,max:c},this.constraints[l])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Dt(l=>{if(!nl(l,t,null))return;const o=this.getAxisMotionValue(l),{min:c,max:u}=this.constraints[l];o.set(Ne(c,u,a[l]))})}addListeners(){if(!this.visualElement.current)return;bC.set(this.visualElement,this);const t=this.visualElement.current,s=Ns(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();pr(c)&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",n);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),n();const l=js(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Dt(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{l(),s(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:l=td,dragMomentum:o=!0}=t;return{...t,drag:s,dragDirectionLock:n,dragPropagation:a,dragConstraints:i,dragElastic:l,dragMomentum:o}}}function nl(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function wC(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class NC extends vn{constructor(t){super(t),this.removeGroupControls=_e,this.removeListeners=_e,this.controls=new jC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_e}unmount(){this.removeGroupControls(),this.removeListeners()}}const hp=e=>(t,s)=>{e&&he.update(()=>e(t,s))};class kC extends vn{constructor(){super(...arguments),this.removePointerDownListener=_e}onPointerDown(t){this.session=new ov(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:n,onPanEnd:a}=this.node.getProps();return{onSessionStart:hp(t),onStart:hp(s),onMove:n,onEnd:(i,l)=>{delete this.session,a&&he.update(()=>a(i,l))}}}mount(){this.removePointerDownListener=Ns(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function SC(){const e=y.useContext(Do);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:s,register:n}=e,a=y.useId();return y.useEffect(()=>n(a),[]),!t&&s?[!1,()=>s&&s(a)]:[!0]}const vl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fp(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const pa={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(J.test(e))e=parseFloat(e);else return e;const s=fp(e,t.target.x),n=fp(e,t.target.y);return`${s}% ${n}%`}},CC={correct:(e,{treeScale:t,projectionDelta:s})=>{const n=e,a=mn.parse(e);if(a.length>5)return n;const i=mn.createTransformer(e),l=typeof a[0]!="number"?1:0,o=s.x.scale*t.x,c=s.y.scale*t.y;a[0+l]/=o,a[1+l]/=c;const u=Ne(o,c,.5);return typeof a[2+l]=="number"&&(a[2+l]/=u),typeof a[3+l]=="number"&&(a[3+l]/=u),i(a)}};class EC extends xi.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n,layoutId:a}=this.props,{projection:i}=t;Lk(PC),i&&(s.group&&s.group.add(i),n&&n.register&&a&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),vl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:n,drag:a,isPresent:i}=this.props,l=n.projection;return l&&(l.isPresent=i,a||t.layoutDependency!==s||s===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?l.promote():l.relegate()||he.postRender(()=>{const o=l.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(a),n&&n.deregister&&n.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function pv(e){const[t,s]=SC(),n=y.useContext(kh);return xi.createElement(EC,{...e,layoutGroup:n,switchLayoutGroup:y.useContext(uy),isPresent:t,safeToRemove:s})}const PC={borderRadius:{...pa,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:pa,borderTopRightRadius:pa,borderBottomLeftRadius:pa,borderBottomRightRadius:pa,boxShadow:CC},gv=["TopLeft","TopRight","BottomLeft","BottomRight"],TC=gv.length,mp=e=>typeof e=="string"?parseFloat(e):e,pp=e=>typeof e=="number"||J.test(e);function _C(e,t,s,n,a,i){a?(e.opacity=Ne(0,s.opacity!==void 0?s.opacity:1,AC(n)),e.opacityExit=Ne(t.opacity!==void 0?t.opacity:1,0,RC(n))):i&&(e.opacity=Ne(t.opacity!==void 0?t.opacity:1,s.opacity!==void 0?s.opacity:1,n));for(let l=0;l<TC;l++){const o=`border${gv[l]}Radius`;let c=gp(t,o),u=gp(s,o);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||pp(c)===pp(u)?(e[o]=Math.max(Ne(mp(c),mp(u),n),0),(ds.test(u)||ds.test(c))&&(e[o]+="%")):e[o]=u}(t.rotate||s.rotate)&&(e.rotate=Ne(t.rotate||0,s.rotate||0,n))}function gp(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const AC=xv(0,.5,Vy),RC=xv(.5,.95,_e);function xv(e,t,s){return n=>n<e?0:n>t?1:s(li(e,t,n))}function xp(e,t){e.min=t.min,e.max=t.max}function Lt(e,t){xp(e.x,t.x),xp(e.y,t.y)}function yp(e,t,s,n,a){return e-=t,e=ao(e,1/s,n),a!==void 0&&(e=ao(e,1/a,n)),e}function MC(e,t=0,s=1,n=.5,a,i=e,l=e){if(ds.test(t)&&(t=parseFloat(t),t=Ne(l.min,l.max,t/100)-l.min),typeof t!="number")return;let o=Ne(i.min,i.max,n);e===i&&(o-=t),e.min=yp(e.min,t,s,o,a),e.max=yp(e.max,t,s,o,a)}function vp(e,t,[s,n,a],i,l){MC(e,t[s],t[n],t[a],t.scale,i,l)}const LC=["x","scaleX","originX"],DC=["y","scaleY","originY"];function bp(e,t,s,n){vp(e.x,t,LC,s?s.x:void 0,n?n.x:void 0),vp(e.y,t,DC,s?s.y:void 0,n?n.y:void 0)}function jp(e){return e.translate===0&&e.scale===1}function yv(e){return jp(e.x)&&jp(e.y)}function OC(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function vv(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function wp(e){return Pt(e.x)/Pt(e.y)}class IC{constructor(){this.members=[]}add(t){Vh(this.members,t),t.scheduleRender()}remove(t){if(zh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){const s=this.members.findIndex(a=>t===a);if(s===0)return!1;let n;for(let a=s;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,s){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,s&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:s,resumingFrom:n}=t;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Np(e,t,s){let n="";const a=e.x.translate/t.x,i=e.y.translate/t.y;if((a||i)&&(n=`translate3d(${a}px, ${i}px, 0) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),s){const{rotate:c,rotateX:u,rotateY:d}=s;c&&(n+=`rotate(${c}deg) `),u&&(n+=`rotateX(${u}deg) `),d&&(n+=`rotateY(${d}deg) `)}const l=e.x.scale*t.x,o=e.y.scale*t.y;return(l!==1||o!==1)&&(n+=`scale(${l}, ${o})`),n||"none"}const FC=(e,t)=>e.depth-t.depth;class VC{constructor(){this.children=[],this.isDirty=!1}add(t){Vh(this.children,t),this.isDirty=!0}remove(t){zh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(FC),this.isDirty=!1,this.children.forEach(t)}}function zC(e,t){const s=performance.now(),n=({timestamp:a})=>{const i=a-s;i>=t&&(Ts(n),e(i-t))};return he.read(n,!0),()=>Ts(n)}function UC(e){window.MotionDebug&&window.MotionDebug.record(e)}function BC(e){return e instanceof SVGElement&&e.tagName!=="svg"}function $C(e,t,s){const n=wt(e)?e:Hr(e);return n.start(Fh("",n,t,s)),n.animation}const kp=["","X","Y","Z"],HC={visibility:"hidden"},Sp=1e3;let WC=0;const Sn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function bv({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:n,resetTransform:a}){return class{constructor(l={},o=t==null?void 0:t()){this.id=WC++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Sn.totalNodes=Sn.resolvedTargetDeltas=Sn.recalculatedProjection=0,this.nodes.forEach(QC),this.nodes.forEach(ZC),this.nodes.forEach(e4),this.nodes.forEach(GC),UC(Sn)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new VC)}addEventListener(l,o){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Uh),this.eventHandlers.get(l).add(o)}notifyListeners(l,...o){const c=this.eventHandlers.get(l);c&&c.notify(...o)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=BC(l),this.instance=l;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(u||c)&&(this.isLayoutDirty=!0),e){let h;const f=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=zC(f,250),vl.hasAnimatedSinceResize&&(vl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ep))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:b,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||d.getDefaultTransition()||a4,{onLayoutAnimationStart:w,onLayoutAnimationComplete:x}=d.getProps(),m=!this.targetLayout||!vv(this.targetLayout,g)||b,p=!f&&b;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||p||f&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,p);const j={...Ih(v,"layout"),onPlay:w,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j)}else f||Ep(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ts(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(t4),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Cp);return}this.isUpdating||this.nodes.forEach(JC),this.isUpdating=!1,this.nodes.forEach(YC),this.nodes.forEach(qC),this.nodes.forEach(KC),this.clearAllSnapshots();const o=performance.now();st.delta=fn(0,1e3/60,o-st.timestamp),st.timestamp=o,st.isProcessing=!0,kc.update.process(st),kc.preRender.process(st),kc.render.process(st),st.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(XC),this.sharedNodes.forEach(s4)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,he.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){he.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=De(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let o=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(o=!1),o&&(this.scroll={animationId:this.root.animationId,phase:l,isRoot:n(this.instance),offset:s(this.instance)})}resetTransform(){if(!a)return;const l=this.isLayoutDirty||this.shouldResetTransform,o=this.projectionDelta&&!yv(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;l&&(o||kn(this.latestValues)||d)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return l&&(c=this.removeTransform(c)),i4(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return De();const o=l.measureViewportBox(),{scroll:c}=this.root;return c&&(Bs(o.x,c.offset.x),Bs(o.y,c.offset.y)),o}removeElementScroll(l){const o=De();Lt(o,l);for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;if(u!==this.root&&d&&h.layoutScroll){if(d.isRoot){Lt(o,l);const{scroll:f}=this.root;f&&(Bs(o.x,-f.offset.x),Bs(o.y,-f.offset.y))}Bs(o.x,d.offset.x),Bs(o.y,d.offset.y)}}return o}applyTransform(l,o=!1){const c=De();Lt(c,l);for(let u=0;u<this.path.length;u++){const d=this.path[u];!o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&yr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),kn(d.latestValues)&&yr(c,d.latestValues)}return kn(this.latestValues)&&yr(c,this.latestValues),c}removeTransform(l){const o=De();Lt(o,l);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!kn(u.latestValues))continue;sd(u.latestValues)&&u.updateSnapshot();const d=De(),h=u.measurePageBox();Lt(d,h),bp(o,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return kn(this.latestValues)&&bp(o,this.latestValues),o}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==st.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var o;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(l||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=st.timestamp,!this.targetDelta&&!this.relativeTarget){const b=this.getClosestProjectingParent();b&&b.layout&&this.animationProgress!==1?(this.relativeParent=b,this.forceRelativeParentToResolveTarget(),this.relativeTarget=De(),this.relativeTargetOrigin=De(),Oa(this.relativeTargetOrigin,this.layout.layoutBox,b.layout.layoutBox),Lt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=De(),this.targetWithTransforms=De()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Lt(this.target,this.layout.layoutBox),hv(this.target,this.targetDelta)):Lt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const b=this.getClosestProjectingParent();b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?(this.relativeParent=b,this.forceRelativeParentToResolveTarget(),this.relativeTarget=De(),this.relativeTargetOrigin=De(),Oa(this.relativeTargetOrigin,this.target,b.target),Lt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Sn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||sd(this.parent.latestValues)||dv(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const o=this.getLead(),c=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===st.timestamp&&(u=!1),u)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;Lt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,b=this.treeScale.y;gC(this.layoutCorrected,this.treeScale,this.path,c),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox);const{target:g}=o;if(!g){this.projectionTransform&&(this.projectionDelta=xr(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=xr(),this.projectionDeltaWithTransform=xr());const v=this.projectionTransform;Da(this.projectionDelta,this.layoutCorrected,g,this.latestValues),this.projectionTransform=Np(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==f||this.treeScale.y!==b)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),Sn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),l){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(l,o=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=xr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=De(),b=c?c.source:void 0,g=this.layout?this.layout.source:void 0,v=b!==g,w=this.getStack(),x=!w||w.members.length<=1,m=!!(v&&!x&&this.options.crossfade===!0&&!this.path.some(r4));this.animationProgress=0;let p;this.mixTargetDelta=j=>{const k=j/1e3;Pp(h.x,l.x,k),Pp(h.y,l.y,k),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oa(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),n4(this.relativeTarget,this.relativeTargetOrigin,f,k),p&&OC(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=De()),Lt(p,this.relativeTarget)),v&&(this.animationValues=d,_C(d,u,this.latestValues,k,m,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ts(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=he.update(()=>{vl.hasAnimatedSinceResize=!0,this.currentAnimation=$C(0,Sp,{...l,onUpdate:o=>{this.mixTargetDelta(o),l.onUpdate&&l.onUpdate(o)},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sp),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:o,target:c,layout:u,latestValues:d}=l;if(!(!o||!c||!u)){if(this!==l&&this.layout&&u&&jv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||De();const h=Pt(this.layout.layoutBox.x);c.x.min=l.target.x.min,c.x.max=c.x.min+h;const f=Pt(this.layout.layoutBox.y);c.y.min=l.target.y.min,c.y.max=c.y.min+f}Lt(o,c),yr(o,d),Da(this.projectionDeltaWithTransform,this.layoutCorrected,o,d)}}registerSharedNode(l,o){this.sharedNodes.has(l)||this.sharedNodes.set(l,new IC),this.sharedNodes.get(l).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:o,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),l&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetRotation(){const{visualElement:l}=this.options;if(!l)return;let o=!1;const{latestValues:c}=l;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(o=!0),!o)return;const u={};for(let d=0;d<kp.length;d++){const h="rotate"+kp[d];c[h]&&(u[h]=c[h],l.setStaticValue(h,0))}l.render();for(const d in u)l.setStaticValue(d,u[d]);l.scheduleRender()}getProjectionStyles(l){var o,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return HC;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=yl(l==null?void 0:l.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=yl(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!kn(this.latestValues)&&(v.transform=d?d({},""):"none",this.hasProjected=!1),v}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=Np(this.projectionDeltaWithTransform,this.treeScale,f),d&&(u.transform=d(f,u.transform));const{x:b,y:g}=this.projectionDelta;u.transformOrigin=`${b.origin*100}% ${g.origin*100}% 0`,h.animationValues?u.opacity=h===this?(c=(o=f.opacity)!==null&&o!==void 0?o:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const v in Yl){if(f[v]===void 0)continue;const{correct:w,applyTo:x}=Yl[v],m=u.transform==="none"?f[v]:w(f[v],h);if(x){const p=x.length;for(let j=0;j<p;j++)u[x[j]]=m}else u[v]=m}return this.options.layoutId&&(u.pointerEvents=h===this?yl(l==null?void 0:l.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var o;return(o=l.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(Cp),this.root.sharedNodes.clear()}}}function qC(e){e.updateLayout()}function KC(e){var t;const s=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&s&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:a}=e.layout,{animationType:i}=e.options,l=s.source!==e.layout.source;i==="size"?Dt(h=>{const f=l?s.measuredBox[h]:s.layoutBox[h],b=Pt(f);f.min=n[h].min,f.max=f.min+b}):jv(i,s.layoutBox,n)&&Dt(h=>{const f=l?s.measuredBox[h]:s.layoutBox[h],b=Pt(n[h]);f.max=f.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+b)});const o=xr();Da(o,n,s.layoutBox);const c=xr();l?Da(c,e.applyTransform(a,!0),s.measuredBox):Da(c,n,s.layoutBox);const u=!yv(o);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:b}=h;if(f&&b){const g=De();Oa(g,s.layoutBox,f.layoutBox);const v=De();Oa(v,n,b.layoutBox),vv(g,v)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:s,delta:c,layoutDelta:o,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function QC(e){Sn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function GC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function XC(e){e.clearSnapshot()}function Cp(e){e.clearMeasurements()}function JC(e){e.isLayoutDirty=!1}function YC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ep(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ZC(e){e.resolveTargetDelta()}function e4(e){e.calcProjection()}function t4(e){e.resetRotation()}function s4(e){e.removeLeadSnapshot()}function Pp(e,t,s){e.translate=Ne(t.translate,0,s),e.scale=Ne(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function Tp(e,t,s,n){e.min=Ne(t.min,s.min,n),e.max=Ne(t.max,s.max,n)}function n4(e,t,s,n){Tp(e.x,t.x,s.x,n),Tp(e.y,t.y,s.y,n)}function r4(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const a4={duration:.45,ease:[.4,0,.1,1]},_p=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),Ap=_p("applewebkit/")&&!_p("chrome/")?Math.round:_e;function Rp(e){e.min=Ap(e.min),e.max=Ap(e.max)}function i4(e){Rp(e.x),Rp(e.y)}function jv(e,t,s){return e==="position"||e==="preserve-aspect"&&!ed(wp(t),wp(s),.2)}const l4=bv({attachResizeListener:(e,t)=>js(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dc={current:void 0},wv=bv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Dc.current){const e=new l4({});e.mount(window),e.setOptions({layoutScroll:!0}),Dc.current=e}return Dc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),o4={pan:{Feature:kC},drag:{Feature:NC,ProjectionNode:wv,MeasureLayout:pv}},c4=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function u4(e){const t=c4.exec(e);if(!t)return[,];const[,s,n]=t;return[s,n]}function rd(e,t,s=1){const[n,a]=u4(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const l=i.trim();return rv(l)?parseFloat(l):l}else return Ku(a)?rd(a,t,s+1):a}function d4(e,{...t},s){const n=e.current;if(!(n instanceof Element))return{target:t,transitionEnd:s};s&&(s={...s}),e.values.forEach(a=>{const i=a.get();if(!Ku(i))return;const l=rd(i,n);l&&a.set(l)});for(const a in t){const i=t[a];if(!Ku(i))continue;const l=rd(i,n);l&&(t[a]=l,s||(s={}),s[a]===void 0&&(s[a]=i))}return{target:t,transitionEnd:s}}const h4=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Nv=e=>h4.has(e),f4=e=>Object.keys(e).some(Nv),Mp=e=>e===Zn||e===J,Lp=(e,t)=>parseFloat(e.split(", ")[t]),Dp=(e,t)=>(s,{transform:n})=>{if(n==="none"||!n)return 0;const a=n.match(/^matrix3d\((.+)\)$/);if(a)return Lp(a[1],t);{const i=n.match(/^matrix\((.+)\)$/);return i?Lp(i[1],e):0}},m4=new Set(["x","y","z"]),p4=wi.filter(e=>!m4.has(e));function g4(e){const t=[];return p4.forEach(s=>{const n=e.getValue(s);n!==void 0&&(t.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Wr={width:({x:e},{paddingLeft:t="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),height:({y:e},{paddingTop:t="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Dp(4,13),y:Dp(5,14)};Wr.translateX=Wr.x;Wr.translateY=Wr.y;const x4=(e,t,s)=>{const n=t.measureViewportBox(),a=t.current,i=getComputedStyle(a),{display:l}=i,o={};l==="none"&&t.setStaticValue("display",e.display||"block"),s.forEach(u=>{o[u]=Wr[u](n,i)}),t.render();const c=t.measureViewportBox();return s.forEach(u=>{const d=t.getValue(u);d&&d.jump(o[u]),e[u]=Wr[u](c,i)}),e},y4=(e,t,s={},n={})=>{t={...t},n={...n};const a=Object.keys(t).filter(Nv);let i=[],l=!1;const o=[];if(a.forEach(c=>{const u=e.getValue(c);if(!e.hasValue(c))return;let d=s[c],h=ma(d);const f=t[c];let b;if(eo(f)){const g=f.length,v=f[0]===null?1:0;d=f[v],h=ma(d);for(let w=v;w<g&&f[w]!==null;w++)b?Rh(ma(f[w])===b):b=ma(f[w])}else b=ma(f);if(h!==b)if(Mp(h)&&Mp(b)){const g=u.get();typeof g=="string"&&u.set(parseFloat(g)),typeof f=="string"?t[c]=parseFloat(f):Array.isArray(f)&&b===J&&(t[c]=f.map(parseFloat))}else h!=null&&h.transform&&(b!=null&&b.transform)&&(d===0||f===0)?d===0?u.set(b.transform(d)):t[c]=h.transform(f):(l||(i=g4(e),l=!0),o.push(c),n[c]=n[c]!==void 0?n[c]:t[c],u.jump(f))}),o.length){const c=o.indexOf("height")>=0?window.pageYOffset:null,u=x4(t,e,o);return i.length&&i.forEach(([d,h])=>{e.getValue(d).set(h)}),e.render(),Oo&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:n}}else return{target:t,transitionEnd:n}};function v4(e,t,s,n){return f4(t)?y4(e,t,s,n):{target:t,transitionEnd:n}}const b4=(e,t,s,n)=>{const a=d4(e,t,n);return t=a.target,n=a.transitionEnd,v4(e,t,s,n)},ad={current:null},kv={current:!1};function j4(){if(kv.current=!0,!!Oo)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ad.current=e.matches;e.addListener(t),t()}else ad.current=!1}function w4(e,t,s){const{willChange:n}=t;for(const a in t){const i=t[a],l=s[a];if(wt(i))e.addValue(a,i),ro(n)&&n.add(a);else if(wt(l))e.addValue(a,Hr(i,{owner:e})),ro(n)&&n.remove(a);else if(l!==i)if(e.hasValue(a)){const o=e.getValue(a);!o.hasAnimated&&o.set(i)}else{const o=e.getStaticValue(a);e.addValue(a,Hr(o!==void 0?o:i,{owner:e}))}}for(const a in s)t[a]===void 0&&e.removeValue(a);return t}const Op=new WeakMap,Sv=Object.keys(ii),N4=Sv.length,Ip=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],k4=Nh.length;class S4{constructor({parent:t,props:s,presenceContext:n,reducedMotionConfig:a,visualState:i},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>he.render(this.render,!1,!0);const{latestValues:o,renderState:c}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=s.initial?{...o}:{},this.renderState=c,this.parent=t,this.props=s,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=l,this.isControllingVariants=Fo(s),this.isVariantNode=cy(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(s,{});for(const h in d){const f=d[h];o[h]!==void 0&&wt(f)&&(f.set(o[h],!1),ro(u)&&u.add(h))}}scrapeMotionValuesFromProps(t,s){return{}}mount(t){this.current=t,Op.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,n)=>this.bindToMotionValue(n,s)),kv.current||j4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ad.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Op.delete(this.current),this.projection&&this.projection.unmount(),Ts(this.notifyUpdate),Ts(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,s){const n=Yn.has(t),a=s.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&he.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=s.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{a(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...s},n,a,i){let l,o;for(let c=0;c<N4;c++){const u=Sv[c],{isEnabled:d,Feature:h,ProjectionNode:f,MeasureLayout:b}=ii[u];f&&(l=f),d(s)&&(!this.features[u]&&h&&(this.features[u]=new h(this)),b&&(o=b))}if((this.type==="html"||this.type==="svg")&&!this.projection&&l){this.projection=new l(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:u,drag:d,dragConstraints:h,layoutScroll:f,layoutRoot:b}=s;this.projection.setOptions({layoutId:c,layout:u,alwaysMeasureLayout:!!d||h&&pr(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,layoutScroll:f,layoutRoot:b})}return o}updateFeatures(){for(const t in this.features){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):De()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}makeTargetAnimatable(t,s=!0){return this.makeTargetAnimatableFromInstance(t,this.props,s)}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;n<Ip.length;n++){const a=Ip[n];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i=t["on"+a];i&&(this.propEventSubscriptions[a]=this.on(a,i))}this.prevMotionValues=w4(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const n=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(n.initial=this.props.initial),n}const s={};for(let n=0;n<k4;n++){const a=Nh[n],i=this.props[a];(ai(i)||i===!1)&&(s[a]=i)}return s}addVariantChild(t){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(t),()=>s.variantChildren.delete(t)}addValue(t,s){s!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,s)),this.values.set(t,s),this.latestValues[t]=s.get()}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&s!==void 0&&(n=Hr(s,{owner:this}),this.addValue(t,n)),n}readValue(t){var s;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(s=this.getBaseTargetFromProps(this.props,t))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,s){this.baseTarget[t]=s}getBaseTarget(t){var s;const{initial:n}=this.props,a=typeof n=="string"||typeof n=="object"?(s=Ah(this.props,n))===null||s===void 0?void 0:s[t]:void 0;if(n&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!wt(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,s){return this.events[t]||(this.events[t]=new Uh),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}}class Cv extends S4{sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){return t.style?t.style[s]:void 0}removeValueFromRenderState(t,{vars:s,style:n}){delete s[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:s,...n},{transformValues:a},i){let l=B2(n,t||{},this);if(a&&(s&&(s=a(s)),n&&(n=a(n)),l&&(l=a(l))),i){z2(this,n,l);const o=b4(this,n,l,s);s=o.transitionEnd,n=o.target}return{transition:t,transitionEnd:s,...n}}}function C4(e){return window.getComputedStyle(e)}class E4 extends Cv{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,s){if(Yn.has(s)){const n=Oh(s);return n&&n.default||0}else{const n=C4(t),a=(fy(s)?n.getPropertyValue(s):n[s])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:s}){return fv(t,s)}build(t,s,n,a){Ch(t,s,n,a.transformTemplate)}scrapeMotionValuesFromProps(t,s){return _h(t,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wt(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}renderInstance(t,s,n,a){vy(t,s,n,a)}}class P4 extends Cv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if(Yn.has(s)){const n=Oh(s);return n&&n.default||0}return s=by.has(s)?s:jh(s),t.getAttribute(s)}measureInstanceViewportBox(){return De()}scrapeMotionValuesFromProps(t,s){return wy(t,s)}build(t,s,n,a){Ph(t,s,n,this.isSVGTag,a.transformTemplate)}renderInstance(t,s,n,a){jy(t,s,n,a)}mount(t){this.isSVGTag=Th(t.tagName),super.mount(t)}}const T4=(e,t)=>Sh(e)?new P4(t,{enableHardwareAcceleration:!1}):new E4(t,{enableHardwareAcceleration:!0}),_4={layout:{ProjectionNode:wv,MeasureLayout:pv}},A4={...nC,...NS,...o4,..._4},oe=Rk((e,t)=>uS(e,t,A4,T4));function Ev(){const e=y.useRef(!1);return bh(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function R4(){const e=Ev(),[t,s]=y.useState(0),n=y.useCallback(()=>{e.current&&s(t+1)},[t]);return[y.useCallback(()=>he.postRender(n),[n]),t]}class M4 extends y.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(s&&t.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=s.offsetHeight||0,n.width=s.offsetWidth||0,n.top=s.offsetTop,n.left=s.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function L4({children:e,isPresent:t}){const s=y.useId(),n=y.useRef(null),a=y.useRef({width:0,height:0,top:0,left:0});return y.useInsertionEffect(()=>{const{width:i,height:l,top:o,left:c}=a.current;if(t||!n.current||!i||!l)return;n.current.dataset.motionPopId=s;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
[data-motion-pop-id="${s}"] {
position: absolute !important;
width: ${i}px !important;
height: ${l}px !important;
top: ${o}px !important;
left: ${c}px !important;
}
`),()=>{document.head.removeChild(u)}},[t]),y.createElement(M4,{isPresent:t,childRef:n,sizeRef:a},y.cloneElement(e,{ref:n}))}const Oc=({children:e,initial:t,isPresent:s,onExitComplete:n,custom:a,presenceAffectsLayout:i,mode:l})=>{const o=Ny(D4),c=y.useId(),u=y.useMemo(()=>({id:c,initial:t,isPresent:s,custom:a,onExitComplete:d=>{o.set(d,!0);for(const h of o.values())if(!h)return;n&&n()},register:d=>(o.set(d,!1),()=>o.delete(d))}),i?void 0:[s]);return y.useMemo(()=>{o.forEach((d,h)=>o.set(h,!1))},[s]),y.useEffect(()=>{!s&&!o.size&&n&&n()},[s]),l==="popLayout"&&(e=y.createElement(L4,{isPresent:s},e)),y.createElement(Do.Provider,{value:u},e)};function D4(){return new Map}function O4(e){return y.useEffect(()=>()=>e(),[])}const Cn=e=>e.key||"";function I4(e,t){e.forEach(s=>{const n=Cn(s);t.set(n,s)})}function F4(e){const t=[];return y.Children.forEach(e,s=>{y.isValidElement(s)&&t.push(s)}),t}const V4=({children:e,custom:t,initial:s=!0,onExitComplete:n,exitBeforeEnter:a,presenceAffectsLayout:i=!0,mode:l="sync"})=>{const o=y.useContext(kh).forceRender||R4()[0],c=Ev(),u=F4(e);let d=u;const h=y.useRef(new Map).current,f=y.useRef(d),b=y.useRef(new Map).current,g=y.useRef(!0);if(bh(()=>{g.current=!1,I4(u,b),f.current=d}),O4(()=>{g.current=!0,b.clear(),h.clear()}),g.current)return y.createElement(y.Fragment,null,d.map(m=>y.createElement(Oc,{key:Cn(m),isPresent:!0,initial:s?void 0:!1,presenceAffectsLayout:i,mode:l},m)));d=[...d];const v=f.current.map(Cn),w=u.map(Cn),x=v.length;for(let m=0;m<x;m++){const p=v[m];w.indexOf(p)===-1&&!h.has(p)&&h.set(p,void 0)}return l==="wait"&&h.size&&(d=[]),h.forEach((m,p)=>{if(w.indexOf(p)!==-1)return;const j=b.get(p);if(!j)return;const k=v.indexOf(p);let S=m;if(!S){const E=()=>{h.delete(p);const N=Array.from(b.keys()).filter(L=>!w.includes(L));if(N.forEach(L=>b.delete(L)),f.current=u.filter(L=>{const R=Cn(L);return R===p||N.includes(R)}),!h.size){if(c.current===!1)return;o(),n&&n()}};S=y.createElement(Oc,{key:Cn(j),isPresent:!1,onExitComplete:E,custom:t,presenceAffectsLayout:i,mode:l},j),h.set(p,S)}d.splice(k,0,S)}),d=d.map(m=>{const p=m.key;return h.has(p)?m:y.createElement(Oc,{key:Cn(m),isPresent:!0,presenceAffectsLayout:i,mode:l},m)}),y.createElement(y.Fragment,null,h.size?d:d.map(m=>y.cloneElement(m)))};/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var z4={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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U4=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),q=(e,t)=>{const s=y.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:c,...u},d)=>y.createElement("svg",{ref:d,...z4,width:a,height:a,stroke:n,strokeWidth:l?Number(i)*24/Number(a):i,className:["lucide",`lucide-${U4(e)}`,o].join(" "),...u},[...t.map(([h,f])=>y.createElement(h,f)),...Array.isArray(c)?c:[c]]));return s.displayName=`${e}`,s};/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const B4=q("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pv=q("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $4=q("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H4=q("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
* @license lucide-react v0.309.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=q("ArrowUpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const W4=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oi=q("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const io=q("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bh=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vp=q("CheckSquare",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q4=q("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tv=q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.309.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=q("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const K4=q("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Q4=q("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const id=q("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ci=q("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _v=q("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ld=q("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const od=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sr=q("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rl=q("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const G4=q("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Av=q("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const X4=q("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ic=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ui=q("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rv=q("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",key:"1kog09"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cd=q("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const J4=q("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Y4=q("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $e=q("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lo=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Z4=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kn=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eE=q("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tE=q("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const di=q("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $t=q("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mv=q("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ud=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sE=q("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nE=q("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pn=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bn=q("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bo=q("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hi=q("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rE=q("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xe=q("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aE=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $h=q("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dd=q("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hh=q("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Up=q("ShieldAlert",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lv=q("Shield",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bp=q("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oo=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iE=q("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
* @license lucide-react v0.309.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=q("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dv=q("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lE=q("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hp=q("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Nt=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const co=q("Truck",[["path",{d:"M5 18H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h10c.6 0 1 .4 1 1v11",key:"hs4xqm"}],["path",{d:"M14 9h4l4 4v4c0 .6-.4 1-1 1h-2",key:"11fp61"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hd=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const oE=q("UserCheck",[["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"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cE=q("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ov=q("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
* @license lucide-react v0.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qr=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const uE=q("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.309.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const He=q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Me=yh(e=>({sidebarCollapsed:!1,sidebarMobileOpen:!1,loading:!1,toasts:[],toggleSidebar:()=>{e(t=>({sidebarCollapsed:!t.sidebarCollapsed}))},setSidebarCollapsed:t=>{e({sidebarCollapsed:t})},setSidebarMobileOpen:t=>{e({sidebarMobileOpen:t})},setLoading:t=>{e({loading:t})},addToast:t=>{const s=Math.random().toString(36).substr(2,9);e(a=>({toasts:[...a.toasts,{...t,id:s}]}));const n=t.duration??3e3;setTimeout(()=>{e(a=>({toasts:a.toasts.filter(i=>i.id!==s)}))},n)},removeToast:t=>{e(s=>({toasts:s.toasts.filter(n=>n.id!==t)}))}}));function Iv(e){var t,s,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(s=Iv(e[t]))&&(n&&(n+=" "),n+=s)}else for(s in e)e[s]&&(n&&(n+=" "),n+=s);return n}function dE(){for(var e,t,s=0,n="",a=arguments.length;s<a;s++)(e=arguments[s])&&(t=Iv(e))&&(n&&(n+=" "),n+=t);return n}const Wh="-",hE=e=>{const t=mE(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{const o=l.split(Wh);return o[0]===""&&o.length!==1&&o.shift(),Fv(o,t)||fE(l)},getConflictingClassGroupIds:(l,o)=>{const c=s[l]||[];return o&&n[l]?[...c,...n[l]]:c}}},Fv=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const s=e[0],n=t.nextPart.get(s),a=n?Fv(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Wh);return(l=t.validators.find(({validator:o})=>o(i)))==null?void 0:l.classGroupId},Wp=/^\[(.+)\]$/,fE=e=>{if(Wp.test(e)){const t=Wp.exec(e)[1],s=t==null?void 0:t.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},mE=e=>{const{theme:t,prefix:s}=e,n={nextPart:new Map,validators:[]};return gE(Object.entries(e.classGroups),s).forEach(([i,l])=>{fd(l,n,i,t)}),n},fd=(e,t,s,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:qp(t,a);i.classGroupId=s;return}if(typeof a=="function"){if(pE(a)){fd(a(n),t,s,n);return}t.validators.push({validator:a,classGroupId:s});return}Object.entries(a).forEach(([i,l])=>{fd(l,qp(t,i),s,n)})})},qp=(e,t)=>{let s=e;return t.split(Wh).forEach(n=>{s.nextPart.has(n)||s.nextPart.set(n,{nextPart:new Map,validators:[]}),s=s.nextPart.get(n)}),s},pE=e=>e.isThemeGetter,gE=(e,t)=>t?e.map(([s,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,o])=>[t+l,o])):i);return[s,a]}):e,xE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,n=new Map;const a=(i,l)=>{s.set(i,l),t++,t>e&&(t=0,n=s,s=new Map)};return{get(i){let l=s.get(i);if(l!==void 0)return l;if((l=n.get(i))!==void 0)return a(i,l),l},set(i,l){s.has(i)?s.set(i,l):a(i,l)}}},Vv="!",yE=e=>{const{separator:t,experimentalParseClassName:s}=e,n=t.length===1,a=t[0],i=t.length,l=o=>{const c=[];let u=0,d=0,h;for(let w=0;w<o.length;w++){let x=o[w];if(u===0){if(x===a&&(n||o.slice(w,w+i)===t)){c.push(o.slice(d,w)),d=w+i;continue}if(x==="/"){h=w;continue}}x==="["?u++:x==="]"&&u--}const f=c.length===0?o:o.substring(d),b=f.startsWith(Vv),g=b?f.substring(1):f,v=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:b,baseClassName:g,maybePostfixModifierPosition:v}};return s?o=>s({className:o,parseClassName:l}):l},vE=e=>{if(e.length<=1)return e;const t=[];let s=[];return e.forEach(n=>{n[0]==="["?(t.push(...s.sort(),n),s=[]):s.push(n)}),t.push(...s.sort()),t},bE=e=>({cache:xE(e.cacheSize),parseClassName:yE(e),...hE(e)}),jE=/\s+/,wE=(e,t)=>{const{parseClassName:s,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],l=e.trim().split(jE);let o="";for(let c=l.length-1;c>=0;c-=1){const u=l[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:b}=s(u);let g=!!b,v=n(g?f.substring(0,b):f);if(!v){if(!g){o=u+(o.length>0?" "+o:o);continue}if(v=n(f),!v){o=u+(o.length>0?" "+o:o);continue}g=!1}const w=vE(d).join(":"),x=h?w+Vv:w,m=x+v;if(i.includes(m))continue;i.push(m);const p=a(v,g);for(let j=0;j<p.length;++j){const k=p[j];i.push(x+k)}o=u+(o.length>0?" "+o:o)}return o};function NE(){let e=0,t,s,n="";for(;e<arguments.length;)(t=arguments[e++])&&(s=zv(t))&&(n&&(n+=" "),n+=s);return n}const zv=e=>{if(typeof e=="string")return e;let t,s="";for(let n=0;n<e.length;n++)e[n]&&(t=zv(e[n]))&&(s&&(s+=" "),s+=t);return s};function kE(e,...t){let s,n,a,i=l;function l(c){const u=t.reduce((d,h)=>h(d),e());return s=bE(u),n=s.cache.get,a=s.cache.set,i=o,o(c)}function o(c){const u=n(c);if(u)return u;const d=wE(c,s);return a(c,d),d}return function(){return i(NE.apply(null,arguments))}}const pe=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},Uv=/^\[(?:([a-z-]+):)?(.+)\]$/i,SE=/^\d+\/\d+$/,CE=new Set(["px","full","screen"]),EE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,TE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_E=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ms=e=>Cr(e)||CE.has(e)||SE.test(e),Os=e=>ea(e,"length",VE),Cr=e=>!!e&&!Number.isNaN(Number(e)),Fc=e=>ea(e,"number",Cr),ga=e=>!!e&&Number.isInteger(Number(e)),RE=e=>e.endsWith("%")&&Cr(e.slice(0,-1)),te=e=>Uv.test(e),Is=e=>EE.test(e),ME=new Set(["length","size","percentage"]),LE=e=>ea(e,ME,Bv),DE=e=>ea(e,"position",Bv),OE=new Set(["image","url"]),IE=e=>ea(e,OE,UE),FE=e=>ea(e,"",zE),xa=()=>!0,ea=(e,t,s)=>{const n=Uv.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):s(n[2]):!1},VE=e=>PE.test(e)&&!TE.test(e),Bv=()=>!1,zE=e=>_E.test(e),UE=e=>AE.test(e),BE=()=>{const e=pe("colors"),t=pe("spacing"),s=pe("blur"),n=pe("brightness"),a=pe("borderColor"),i=pe("borderRadius"),l=pe("borderSpacing"),o=pe("borderWidth"),c=pe("contrast"),u=pe("grayscale"),d=pe("hueRotate"),h=pe("invert"),f=pe("gap"),b=pe("gradientColorStops"),g=pe("gradientColorStopPositions"),v=pe("inset"),w=pe("margin"),x=pe("opacity"),m=pe("padding"),p=pe("saturate"),j=pe("scale"),k=pe("sepia"),S=pe("skew"),E=pe("space"),N=pe("translate"),L=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto",te,t],$=()=>[te,t],P=()=>["",ms,Os],D=()=>["auto",Cr,te],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",te],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[Cr,te];return{cacheSize:500,separator:":",theme:{colors:[xa],spacing:[ms,Os],blur:["none","",Is,te],brightness:U(),borderColor:[e],borderRadius:["none","","full",Is,te],borderSpacing:$(),borderWidth:P(),contrast:U(),grayscale:_(),hueRotate:U(),invert:_(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[RE,Os],inset:W(),margin:W(),opacity:U(),padding:$(),saturate:U(),scale:U(),sepia:_(),skew:U(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",te]}],container:["container"],columns:[{columns:[Is]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...z(),te]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ga,te]}],basis:[{basis:W()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",te]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",ga,te]}],"grid-cols":[{"grid-cols":[xa]}],"col-start-end":[{col:["auto",{span:["full",ga,te]},te]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[xa]}],"row-start-end":[{row:["auto",{span:[ga,te]},te]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",te]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",te]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",te,t]}],"min-w":[{"min-w":[te,t,"min","max","fit"]}],"max-w":[{"max-w":[te,t,"none","full","min","max","fit","prose",{screen:[Is]},Is]}],h:[{h:[te,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[te,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[te,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Is,Os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Fc]}],"font-family":[{font:[xa]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",te]}],"line-clamp":[{"line-clamp":["none",Cr,Fc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ms,te]}],"list-image":[{"list-image":["none",te]}],"list-style-type":[{list:["none","disc","decimal",te]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ms,Os]}],"underline-offset":[{"underline-offset":["auto",ms,te]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...z(),DE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",LE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},IE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:H()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[ms,te]}],"outline-w":[{outline:[ms,Os]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[ms,Os]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Is,FE]}],"shadow-color":[{shadow:[xa]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Is,te]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[p]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[p]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",te]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",te]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",te]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[ga,te]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",te]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",te]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",te]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ms,Os,Fc]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},$E=kE(BE);function ue(...e){return $E(dE(e))}const HE=[{icon:J4,label:"仪表盘",path:"/dashboard"},{icon:qr,label:"账号管理",path:"/accounts"},{icon:ud,label:"商品管理",path:"/items"},{icon:oo,label:"订单管理",path:"/orders"},{icon:$t,label:"自动回复",path:"/keywords"},{icon:Q4,label:"卡券管理",path:"/cards"},{icon:co,label:"自动发货",path:"/delivery"},{icon:oi,label:"通知渠道",path:"/notification-channels"},{icon:di,label:"消息通知",path:"/message-notifications"},{icon:Hh,label:"系统设置",path:"/settings"}],WE=[{icon:cE,label:"用户管理",path:"/admin/users",adminOnly:!0},{icon:Sr,label:"系统日志",path:"/admin/logs",adminOnly:!0},{icon:Lv,label:"风控日志",path:"/admin/risk-logs",adminOnly:!0},{icon:id,label:"数据管理",path:"/admin/data",adminOnly:!0}],qE=[{icon:ui,label:"关于",path:"/about"}];function KE(){const{user:e}=Re(),{sidebarCollapsed:t,sidebarMobileOpen:s,setSidebarMobileOpen:n,setSidebarCollapsed:a}=Me();y.useEffect(()=>{const o=()=>{const c=window.innerWidth;c>=640&&c<1024?a(!0):c>=1024&&a(!1)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[a]);const i=()=>{n(!1)},l=({item:o})=>{const c=o.icon,u=s||!t;return r.jsxs($N,{to:o.path,onClick:i,title:u?void 0:o.label,className:({isActive:d})=>ue("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm transition-all duration-150",!u&&"justify-center px-2",d?"bg-blue-600 text-white dark:text-white hover:text-white hover:bg-blue-700 shadow-sm":"text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white hover:bg-slate-100 dark:hover:bg-white/10"),children:[r.jsx(c,{className:"w-4 h-4 flex-shrink-0"}),u&&r.jsx("span",{className:"truncate",children:o.label})]})};return r.jsxs(r.Fragment,{children:[r.jsx(oe.div,{initial:{opacity:0},animate:{opacity:s?1:0},transition:{duration:.2},className:ue("fixed inset-0 bg-black/60 z-40 sm:hidden",s?"pointer-events-auto":"pointer-events-none"),onClick:i}),r.jsxs(oe.aside,{initial:!1,className:ue("fixed top-0 left-0 h-screen z-50","bg-white dark:bg-[#001529]","flex flex-col","transition-transform duration-200 ease-out","border-r border-slate-200 dark:border-slate-700",s?"translate-x-0":"-translate-x-full sm:translate-x-0",s?"w-72":t?"w-16":"w-56"),children:[r.jsxs("div",{className:ue("h-14 flex items-center border-b border-slate-200 dark:border-slate-700",!s&&t?"justify-center px-2":"justify-between px-4"),children:[r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx("div",{className:"w-8 h-8 rounded-lg bg-blue-500 flex items-center justify-center flex-shrink-0",children:r.jsx($t,{className:"w-4 h-4 text-white"})}),(s||!t)&&r.jsx("span",{className:"font-semibold text-sm text-slate-900 dark:text-white whitespace-nowrap",children:"闲鱼管理系统"})]}),s&&r.jsx("button",{onClick:i,className:"sm:hidden p-1.5 hover:bg-slate-100 dark:hover:bg-white/10 rounded transition-colors text-slate-400 hover:text-slate-900 dark:hover:text-white",children:r.jsx(He,{className:"w-4 h-4"})})]}),r.jsxs("nav",{className:ue("flex-1 overflow-y-auto py-3 space-y-0.5 sidebar-scrollbar",!s&&t?"px-1.5":"px-2"),children:[HE.map(o=>r.jsx(l,{item:o},o.path)),(e==null?void 0:e.is_admin)&&r.jsxs(r.Fragment,{children:[(s||!t)&&r.jsx("div",{className:"pt-4 pb-2 px-3",children:r.jsx("p",{className:"text-xs font-medium text-slate-400 dark:text-gray-500 uppercase tracking-wider",children:"管理员"})}),!s&&t&&r.jsx("div",{className:"pt-2 border-t border-slate-200 dark:border-slate-700 mt-2"}),WE.map(o=>r.jsx(l,{item:o},o.path))]}),(s||!t)&&r.jsx("div",{className:"pt-4 pb-2 px-3",children:r.jsx("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider",children:"其他"})}),!s&&t&&r.jsx("div",{className:"pt-2 border-t border-slate-200 dark:border-slate-700 mt-2"}),qE.map(o=>r.jsx(l,{item:o},o.path))]}),r.jsx("div",{className:"hidden lg:flex items-center justify-center p-2 border-t border-slate-200 dark:border-slate-700",children:r.jsx("button",{onClick:()=>a(!t),className:"p-2 rounded-lg hover:bg-slate-100 dark:hover:bg-white/10 transition-colors text-slate-400 hover:text-slate-600 dark:hover:text-white",title:t?"展开侧边栏":"收起侧边栏",children:t?r.jsx(nE,{className:"w-4 h-4"}):r.jsx(sE,{className:"w-4 h-4"})})})]}),r.jsx(oe.button,{initial:{opacity:0,scale:.9},animate:{opacity:s?0:1,scale:s?.9:1},transition:{duration:.15},onClick:()=>n(!0),className:ue("fixed top-2.5 left-2.5 z-50 sm:hidden","w-8 h-8 rounded-md","bg-blue-500 text-white shadow-md","flex items-center justify-center","hover:bg-blue-600 active:scale-95 transition-all",s&&"pointer-events-none"),children:r.jsx(tE,{className:"w-4 h-4"})})]})}function QE(){const e=Zr(),{user:t,clearAuth:s}=Re(),[n,a]=y.useState(!1),[i,l]=y.useState(!1);y.useEffect(()=>{const u=localStorage.getItem("theme"),d=window.matchMedia("(prefers-color-scheme: dark)").matches,h=u==="dark"||!u&&d;a(h),document.documentElement.classList.toggle("dark",h)},[]);const o=()=>{const u=!n;a(u),document.documentElement.classList.toggle("dark",u),localStorage.setItem("theme",u?"dark":"light")},c=()=>{s(),e("/login")};return r.jsxs("div",{className:"top-navbar",children:[r.jsxs("div",{className:"flex items-center gap-2 ml-12 sm:ml-0",children:[r.jsx("span",{className:"text-sm text-slate-500 dark:text-slate-400 hidden sm:inline",children:"欢迎使用闲鱼管理系统"}),r.jsx("span",{className:"text-sm text-slate-500 dark:text-slate-400 sm:hidden",children:"闲鱼管理"})]}),r.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[r.jsx("button",{onClick:o,className:`p-2 rounded-md text-slate-500 dark:text-slate-400 \r
hover:bg-slate-100 dark:hover:bg-slate-700 \r
hover:text-slate-700 dark:hover:text-slate-200\r
transition-colors duration-150`,title:n?"切换到亮色模式":"切换到暗色模式",children:n?r.jsx(Dv,{className:"w-5 h-5"}):r.jsx(Mv,{className:"w-5 h-5"})}),r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>l(!i),className:`flex items-center gap-1 sm:gap-2 px-2 sm:px-3 py-1.5 rounded-md\r
text-slate-700 dark:text-slate-200\r
hover:bg-slate-100 dark:hover:bg-slate-700\r
transition-colors duration-150`,children:[r.jsx("div",{className:"w-7 h-7 rounded-full bg-blue-500 flex items-center justify-center text-white text-xs font-medium",children:((t==null?void 0:t.username)||"U").charAt(0).toUpperCase()}),r.jsx("span",{className:"text-sm font-medium hidden sm:inline",children:(t==null?void 0:t.username)||"用户"}),r.jsx(Tv,{className:"w-4 h-4 text-slate-400 hidden sm:block"})]}),i&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>l(!1)}),r.jsxs("div",{className:`absolute right-0 mt-2 w-48 bg-white dark:bg-slate-800 \r
rounded-lg shadow-lg ring-1 ring-black/5 dark:ring-white/10\r
py-1 z-50 animate-fade-in`,children:[r.jsxs("div",{className:"px-4 py-2 border-b border-slate-100 dark:border-slate-700",children:[r.jsx("p",{className:"text-sm font-medium text-slate-900 dark:text-slate-100",children:t==null?void 0:t.username}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:t!=null&&t.is_admin?"管理员":"普通用户"})]}),r.jsxs("button",{onClick:c,className:ue("w-full flex items-center gap-2 px-4 py-2 text-sm","text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20","transition-colors duration-150"),children:[r.jsx(Z4,{className:"w-4 h-4"}),"退出登录"]})]})]})]})]})]})}const GE={"/dashboard":"仪表盘","/accounts":"账号管理","/items":"商品管理","/keywords":"自动回复","/item-replies":"指定商品回复","/orders":"订单管理","/cards":"卡券管理","/delivery":"自动发货","/notification-channels":"通知渠道","/message-notifications":"消息通知","/item-search":"商品搜索","/settings":"系统设置","/admin/users":"用户管理","/admin/logs":"系统日志","/admin/risk-logs":"风控日志","/admin/data":"数据管理","/about":"关于"},XE=yh()(ay((e,t)=>({tabs:[{path:"/dashboard",title:"仪表盘",closable:!1}],activeTab:"/dashboard",addTab:s=>{const{tabs:n}=t(),a=n.find(i=>i.path===s.path);e(a?{activeTab:s.path}:{tabs:[...n,s],activeTab:s.path})},removeTab:s=>{const{tabs:n,activeTab:a}=t(),i=n.filter(l=>l.path!==s);a===s&&i.length>0?e({tabs:i,activeTab:i[i.length-1].path}):e({tabs:i})},setActiveTab:s=>e({activeTab:s})}),{name:"tabs-storage",storage:vh(()=>localStorage)}));function JE(){const e=Jn(),t=Zr(),{tabs:s,activeTab:n,addTab:a,removeTab:i,setActiveTab:l}=XE();y.useEffect(()=>{const u=e.pathname,d=GE[u];d&&a({path:u,title:d,closable:u!=="/dashboard"})},[e.pathname]);const o=u=>{l(u),t(u)},c=(u,d)=>{if(u.stopPropagation(),i(d),n===d){const h=s.filter(f=>f.path!==d);h.length>0&&t(h[h.length-1].path)}};return r.jsx("div",{className:"tabs-bar overflow-x-auto scrollbar-hide",children:r.jsx("div",{className:"flex min-w-max",children:s.map(u=>r.jsxs("div",{onClick:()=>o(u.path),className:ue(n===u.path?"tab-item-active":"tab-item","whitespace-nowrap flex-shrink-0"),children:[u.path==="/dashboard"&&r.jsx(X4,{className:"w-3.5 h-3.5"}),r.jsx("span",{className:"text-xs sm:text-sm",children:u.title}),u.closable&&r.jsx("button",{onClick:d=>c(d,u.path),className:"tab-close",children:r.jsx(He,{className:"w-3 h-3"})})]},u.path))})})}const YE={success:Bh,error:uE,warning:Pv,info:ui},ZE={success:"bg-emerald-50 dark:bg-emerald-900/30 border-emerald-200 dark:border-emerald-800 text-emerald-800 dark:text-emerald-200",error:"bg-red-50 dark:bg-red-900/30 border-red-200 dark:border-red-800 text-red-800 dark:text-red-200",warning:"bg-amber-50 dark:bg-amber-900/30 border-amber-200 dark:border-amber-800 text-amber-800 dark:text-amber-200",info:"bg-blue-50 dark:bg-blue-900/30 border-blue-200 dark:border-blue-800 text-blue-800 dark:text-blue-200"},eP={success:"text-emerald-500 dark:text-emerald-400",error:"text-red-500 dark:text-red-400",warning:"text-amber-500 dark:text-amber-400",info:"text-blue-500 dark:text-blue-400"};function $v(){const{toasts:e,removeToast:t}=Me();return r.jsx("div",{className:"fixed top-20 left-1/2 -translate-x-1/2 z-[100] flex flex-col items-center gap-3",children:r.jsx(V4,{children:e.map(s=>{const n=YE[s.type];return r.jsxs(oe.div,{initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-20,scale:.95},className:ue("flex items-center gap-3 px-4 py-3 rounded-xl border shadow-lg","backdrop-blur-sm min-w-[280px] max-w-[400px]","bg-white/95 dark:bg-slate-800/95",ZE[s.type]),children:[r.jsx(n,{className:ue("w-5 h-5 flex-shrink-0",eP[s.type])}),r.jsx("p",{className:"flex-1 text-sm font-medium",children:s.message}),r.jsx("button",{onClick:()=>t(s.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/10 rounded-lg transition-colors",children:r.jsx(He,{className:"w-4 h-4"})})]},s.id)})})})}function tP(){const{sidebarCollapsed:e}=Me();return r.jsxs("div",{className:"min-h-screen bg-slate-50 dark:bg-slate-900 transition-colors duration-200",children:[r.jsx(KE,{}),r.jsxs("div",{className:ue("min-h-screen flex flex-col transition-[margin] duration-200","ml-0 sm:ml-16",!e&&"sm:ml-56"),children:[r.jsxs("div",{className:"sticky top-0 z-30 bg-slate-50 dark:bg-slate-900",children:[r.jsx(QE,{}),r.jsx(JE,{})]}),r.jsx("main",{className:"flex-1 p-3 sm:p-4 lg:p-6 overflow-x-hidden",children:r.jsx(_N,{})})]}),r.jsx($v,{})]})}function Hv(e,t){return function(){return e.apply(t,arguments)}}const{toString:sP}=Object.prototype,{getPrototypeOf:qh}=Object,{iterator:$o,toStringTag:Wv}=Symbol,Ho=(e=>t=>{const s=sP.call(t);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),ts=e=>(e=e.toLowerCase(),t=>Ho(t)===e),Wo=e=>t=>typeof t===e,{isArray:ta}=Array,Kr=Wo("undefined");function Ci(e){return e!==null&&!Kr(e)&&e.constructor!==null&&!Kr(e.constructor)&&bt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qv=ts("ArrayBuffer");function nP(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qv(e.buffer),t}const rP=Wo("string"),bt=Wo("function"),Kv=Wo("number"),Ei=e=>e!==null&&typeof e=="object",aP=e=>e===!0||e===!1,bl=e=>{if(Ho(e)!=="object")return!1;const t=qh(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Wv in e)&&!($o in e)},iP=e=>{if(!Ei(e)||Ci(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},lP=ts("Date"),oP=ts("File"),cP=ts("Blob"),uP=ts("FileList"),dP=e=>Ei(e)&&bt(e.pipe),hP=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bt(e.append)&&((t=Ho(e))==="formdata"||t==="object"&&bt(e.toString)&&e.toString()==="[object FormData]"))},fP=ts("URLSearchParams"),[mP,pP,gP,xP]=["ReadableStream","Request","Response","Headers"].map(ts),yP=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Pi(e,t,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),ta(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(Ci(e))return;const i=s?Object.getOwnPropertyNames(e):Object.keys(e),l=i.length;let o;for(n=0;n<l;n++)o=i[n],t.call(null,e[o],o,e)}}function Qv(e,t){if(Ci(e))return null;t=t.toLowerCase();const s=Object.keys(e);let n=s.length,a;for(;n-- >0;)if(a=s[n],t===a.toLowerCase())return a;return null}const An=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gv=e=>!Kr(e)&&e!==An;function md(){const{caseless:e,skipUndefined:t}=Gv(this)&&this||{},s={},n=(a,i)=>{const l=e&&Qv(s,i)||i;bl(s[l])&&bl(a)?s[l]=md(s[l],a):bl(a)?s[l]=md({},a):ta(a)?s[l]=a.slice():(!t||!Kr(a))&&(s[l]=a)};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Pi(arguments[a],n);return s}const vP=(e,t,s,{allOwnKeys:n}={})=>(Pi(t,(a,i)=>{s&&bt(a)?e[i]=Hv(a,s):e[i]=a},{allOwnKeys:n}),e),bP=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),jP=(e,t,s,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),s&&Object.assign(e.prototype,s)},wP=(e,t,s,n)=>{let a,i,l;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)l=a[i],(!n||n(l,e,t))&&!o[l]&&(t[l]=e[l],o[l]=!0);e=s!==!1&&qh(e)}while(e&&(!s||s(e,t))&&e!==Object.prototype);return t},NP=(e,t,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=t.length;const n=e.indexOf(t,s);return n!==-1&&n===s},kP=e=>{if(!e)return null;if(ta(e))return e;let t=e.length;if(!Kv(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=e[t];return s},SP=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qh(Uint8Array)),CP=(e,t)=>{const n=(e&&e[$o]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},EP=(e,t)=>{let s;const n=[];for(;(s=e.exec(t))!==null;)n.push(s);return n},PP=ts("HTMLFormElement"),TP=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,n,a){return n.toUpperCase()+a}),Kp=(({hasOwnProperty:e})=>(t,s)=>e.call(t,s))(Object.prototype),_P=ts("RegExp"),Xv=(e,t)=>{const s=Object.getOwnPropertyDescriptors(e),n={};Pi(s,(a,i)=>{let l;(l=t(a,i,e))!==!1&&(n[i]=l||a)}),Object.defineProperties(e,n)},AP=e=>{Xv(e,(t,s)=>{if(bt(e)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const n=e[s];if(bt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},RP=(e,t)=>{const s={},n=a=>{a.forEach(i=>{s[i]=!0})};return ta(e)?n(e):n(String(e).split(t)),s},MP=()=>{},LP=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function DP(e){return!!(e&&bt(e.append)&&e[Wv]==="FormData"&&e[$o])}const OP=e=>{const t=new Array(10),s=(n,a)=>{if(Ei(n)){if(t.indexOf(n)>=0)return;if(Ci(n))return n;if(!("toJSON"in n)){t[a]=n;const i=ta(n)?[]:{};return Pi(n,(l,o)=>{const c=s(l,a+1);!Kr(c)&&(i[o]=c)}),t[a]=void 0,i}}return n};return s(e,0)},IP=ts("AsyncFunction"),FP=e=>e&&(Ei(e)||bt(e))&&bt(e.then)&&bt(e.catch),Jv=((e,t)=>e?setImmediate:t?((s,n)=>(An.addEventListener("message",({source:a,data:i})=>{a===An&&i===s&&n.length&&n.shift()()},!1),a=>{n.push(a),An.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",bt(An.postMessage)),VP=typeof queueMicrotask<"u"?queueMicrotask.bind(An):typeof process<"u"&&process.nextTick||Jv,zP=e=>e!=null&&bt(e[$o]),T={isArray:ta,isArrayBuffer:qv,isBuffer:Ci,isFormData:hP,isArrayBufferView:nP,isString:rP,isNumber:Kv,isBoolean:aP,isObject:Ei,isPlainObject:bl,isEmptyObject:iP,isReadableStream:mP,isRequest:pP,isResponse:gP,isHeaders:xP,isUndefined:Kr,isDate:lP,isFile:oP,isBlob:cP,isRegExp:_P,isFunction:bt,isStream:dP,isURLSearchParams:fP,isTypedArray:SP,isFileList:uP,forEach:Pi,merge:md,extend:vP,trim:yP,stripBOM:bP,inherits:jP,toFlatObject:wP,kindOf:Ho,kindOfTest:ts,endsWith:NP,toArray:kP,forEachEntry:CP,matchAll:EP,isHTMLForm:PP,hasOwnProperty:Kp,hasOwnProp:Kp,reduceDescriptors:Xv,freezeMethods:AP,toObjectSet:RP,toCamelCase:TP,noop:MP,toFiniteNumber:LP,findKey:Qv,global:An,isContextDefined:Gv,isSpecCompliantForm:DP,toJSONObject:OP,isAsyncFn:IP,isThenable:FP,setImmediate:Jv,asap:VP,isIterable:zP};function ee(e,t,s,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),s&&(this.config=s),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}T.inherits(ee,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:T.toJSONObject(this.config),code:this.code,status:this.status}}});const Yv=ee.prototype,Zv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Zv[e]={value:e}});Object.defineProperties(ee,Zv);Object.defineProperty(Yv,"isAxiosError",{value:!0});ee.from=(e,t,s,n,a,i)=>{const l=Object.create(Yv);T.toFlatObject(e,l,function(d){return d!==Error.prototype},u=>u!=="isAxiosError");const o=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return ee.call(l,o,c,s,n,a),e&&l.cause==null&&Object.defineProperty(l,"cause",{value:e,configurable:!0}),l.name=e&&e.name||"Error",i&&Object.assign(l,i),l};const UP=null;function pd(e){return T.isPlainObject(e)||T.isArray(e)}function eb(e){return T.endsWith(e,"[]")?e.slice(0,-2):e}function Qp(e,t,s){return e?e.concat(t).map(function(a,i){return a=eb(a),!s&&i?"["+a+"]":a}).join(s?".":""):t}function BP(e){return T.isArray(e)&&!e.some(pd)}const $P=T.toFlatObject(T,{},null,function(t){return/^is[A-Z]/.test(t)});function qo(e,t,s){if(!T.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,s=T.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!T.isUndefined(w[v])});const n=s.metaTokens,a=s.visitor||d,i=s.dots,l=s.indexes,c=(s.Blob||typeof Blob<"u"&&Blob)&&T.isSpecCompliantForm(t);if(!T.isFunction(a))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(T.isDate(g))return g.toISOString();if(T.isBoolean(g))return g.toString();if(!c&&T.isBlob(g))throw new ee("Blob is not supported. Use a Buffer instead.");return T.isArrayBuffer(g)||T.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,v,w){let x=g;if(g&&!w&&typeof g=="object"){if(T.endsWith(v,"{}"))v=n?v:v.slice(0,-2),g=JSON.stringify(g);else if(T.isArray(g)&&BP(g)||(T.isFileList(g)||T.endsWith(v,"[]"))&&(x=T.toArray(g)))return v=eb(v),x.forEach(function(p,j){!(T.isUndefined(p)||p===null)&&t.append(l===!0?Qp([v],j,i):l===null?v:v+"[]",u(p))}),!1}return pd(g)?!0:(t.append(Qp(w,v,i),u(g)),!1)}const h=[],f=Object.assign($P,{defaultVisitor:d,convertValue:u,isVisitable:pd});function b(g,v){if(!T.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));h.push(g),T.forEach(g,function(x,m){(!(T.isUndefined(x)||x===null)&&a.call(t,x,T.isString(m)?m.trim():m,v,f))===!0&&b(x,v?v.concat(m):[m])}),h.pop()}}if(!T.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Gp(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Kh(e,t){this._pairs=[],e&&qo(e,this,t)}const tb=Kh.prototype;tb.append=function(t,s){this._pairs.push([t,s])};tb.toString=function(t){const s=t?function(n){return t.call(this,n,Gp)}:Gp;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function HP(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function sb(e,t,s){if(!t)return e;const n=s&&s.encode||HP;T.isFunction(s)&&(s={serialize:s});const a=s&&s.serialize;let i;if(a?i=a(t,s):i=T.isURLSearchParams(t)?t.toString():new Kh(t,s).toString(n),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Xp{constructor(){this.handlers=[]}use(t,s,n){return this.handlers.push({fulfilled:t,rejected:s,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){T.forEach(this.handlers,function(n){n!==null&&t(n)})}}const nb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},WP=typeof URLSearchParams<"u"?URLSearchParams:Kh,qP=typeof FormData<"u"?FormData:null,KP=typeof Blob<"u"?Blob:null,QP={isBrowser:!0,classes:{URLSearchParams:WP,FormData:qP,Blob:KP},protocols:["http","https","file","blob","url","data"]},Qh=typeof window<"u"&&typeof document<"u",gd=typeof navigator=="object"&&navigator||void 0,GP=Qh&&(!gd||["ReactNative","NativeScript","NS"].indexOf(gd.product)<0),XP=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",JP=Qh&&window.location.href||"http://localhost",YP=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qh,hasStandardBrowserEnv:GP,hasStandardBrowserWebWorkerEnv:XP,navigator:gd,origin:JP},Symbol.toStringTag,{value:"Module"})),rt={...YP,...QP};function ZP(e,t){return qo(e,new rt.classes.URLSearchParams,{visitor:function(s,n,a,i){return rt.isNode&&T.isBuffer(s)?(this.append(n,s.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function e5(e){return T.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function t5(e){const t={},s=Object.keys(e);let n;const a=s.length;let i;for(n=0;n<a;n++)i=s[n],t[i]=e[i];return t}function rb(e){function t(s,n,a,i){let l=s[i++];if(l==="__proto__")return!0;const o=Number.isFinite(+l),c=i>=s.length;return l=!l&&T.isArray(a)?a.length:l,c?(T.hasOwnProp(a,l)?a[l]=[a[l],n]:a[l]=n,!o):((!a[l]||!T.isObject(a[l]))&&(a[l]=[]),t(s,n,a[l],i)&&T.isArray(a[l])&&(a[l]=t5(a[l])),!o)}if(T.isFormData(e)&&T.isFunction(e.entries)){const s={};return T.forEachEntry(e,(n,a)=>{t(e5(n),a,s,0)}),s}return null}function s5(e,t,s){if(T.isString(e))try{return(t||JSON.parse)(e),T.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(s||JSON.stringify)(e)}const Ti={transitional:nb,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const n=s.getContentType()||"",a=n.indexOf("application/json")>-1,i=T.isObject(t);if(i&&T.isHTMLForm(t)&&(t=new FormData(t)),T.isFormData(t))return a?JSON.stringify(rb(t)):t;if(T.isArrayBuffer(t)||T.isBuffer(t)||T.isStream(t)||T.isFile(t)||T.isBlob(t)||T.isReadableStream(t))return t;if(T.isArrayBufferView(t))return t.buffer;if(T.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ZP(t,this.formSerializer).toString();if((o=T.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return qo(o?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||a?(s.setContentType("application/json",!1),s5(t)):t}],transformResponse:[function(t){const s=this.transitional||Ti.transitional,n=s&&s.forcedJSONParsing,a=this.responseType==="json";if(T.isResponse(t)||T.isReadableStream(t))return t;if(t&&T.isString(t)&&(n&&!this.responseType||a)){const l=!(s&&s.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(o){if(l)throw o.name==="SyntaxError"?ee.from(o,ee.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};T.forEach(["delete","get","head","post","put","patch"],e=>{Ti.headers[e]={}});const n5=T.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"]),r5=e=>{const t={};let s,n,a;return e&&e.split(`
`).forEach(function(l){a=l.indexOf(":"),s=l.substring(0,a).trim().toLowerCase(),n=l.substring(a+1).trim(),!(!s||t[s]&&n5[s])&&(s==="set-cookie"?t[s]?t[s].push(n):t[s]=[n]:t[s]=t[s]?t[s]+", "+n:n)}),t},Jp=Symbol("internals");function ya(e){return e&&String(e).trim().toLowerCase()}function jl(e){return e===!1||e==null?e:T.isArray(e)?e.map(jl):String(e)}function a5(e){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=s.exec(e);)t[n[1]]=n[2];return t}const i5=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vc(e,t,s,n,a){if(T.isFunction(n))return n.call(this,t,s);if(a&&(t=s),!!T.isString(t)){if(T.isString(n))return t.indexOf(n)!==-1;if(T.isRegExp(n))return n.test(t)}}function l5(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,n)=>s.toUpperCase()+n)}function o5(e,t){const s=T.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+s,{value:function(a,i,l){return this[n].call(this,t,a,i,l)},configurable:!0})})}let jt=class{constructor(t){t&&this.set(t)}set(t,s,n){const a=this;function i(o,c,u){const d=ya(c);if(!d)throw new Error("header name must be a non-empty string");const h=T.findKey(a,d);(!h||a[h]===void 0||u===!0||u===void 0&&a[h]!==!1)&&(a[h||c]=jl(o))}const l=(o,c)=>T.forEach(o,(u,d)=>i(u,d,c));if(T.isPlainObject(t)||t instanceof this.constructor)l(t,s);else if(T.isString(t)&&(t=t.trim())&&!i5(t))l(r5(t),s);else if(T.isObject(t)&&T.isIterable(t)){let o={},c,u;for(const d of t){if(!T.isArray(d))throw TypeError("Object iterator must return a key-value pair");o[u=d[0]]=(c=o[u])?T.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}l(o,s)}else t!=null&&i(s,t,n);return this}get(t,s){if(t=ya(t),t){const n=T.findKey(this,t);if(n){const a=this[n];if(!s)return a;if(s===!0)return a5(a);if(T.isFunction(s))return s.call(this,a,n);if(T.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=ya(t),t){const n=T.findKey(this,t);return!!(n&&this[n]!==void 0&&(!s||Vc(this,this[n],n,s)))}return!1}delete(t,s){const n=this;let a=!1;function i(l){if(l=ya(l),l){const o=T.findKey(n,l);o&&(!s||Vc(n,n[o],o,s))&&(delete n[o],a=!0)}}return T.isArray(t)?t.forEach(i):i(t),a}clear(t){const s=Object.keys(this);let n=s.length,a=!1;for(;n--;){const i=s[n];(!t||Vc(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const s=this,n={};return T.forEach(this,(a,i)=>{const l=T.findKey(n,i);if(l){s[l]=jl(a),delete s[i];return}const o=t?l5(i):String(i).trim();o!==i&&delete s[i],s[o]=jl(a),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return T.forEach(this,(n,a)=>{n!=null&&n!==!1&&(s[a]=t&&T.isArray(n)?n.join(", "):n)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const n=new this(t);return s.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[Jp]=this[Jp]={accessors:{}}).accessors,a=this.prototype;function i(l){const o=ya(l);n[o]||(o5(a,l),n[o]=!0)}return T.isArray(t)?t.forEach(i):i(t),this}};jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);T.reduceDescriptors(jt.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[s]=n}}});T.freezeMethods(jt);function zc(e,t){const s=this||Ti,n=t||s,a=jt.from(n.headers);let i=n.data;return T.forEach(e,function(o){i=o.call(s,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function ab(e){return!!(e&&e.__CANCEL__)}function sa(e,t,s){ee.call(this,e??"canceled",ee.ERR_CANCELED,t,s),this.name="CanceledError"}T.inherits(sa,ee,{__CANCEL__:!0});function ib(e,t,s){const n=s.config.validateStatus;!s.status||!n||n(s.status)?e(s):t(new ee("Request failed with status code "+s.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function c5(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function u5(e,t){e=e||10;const s=new Array(e),n=new Array(e);let a=0,i=0,l;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=n[i];l||(l=u),s[a]=c,n[a]=u;let h=i,f=0;for(;h!==a;)f+=s[h++],h=h%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-l<t)return;const b=d&&u-d;return b?Math.round(f*1e3/b):void 0}}function d5(e,t){let s=0,n=1e3/t,a,i;const l=(u,d=Date.now())=>{s=d,a=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const d=Date.now(),h=d-s;h>=n?l(u,d):(a=u,i||(i=setTimeout(()=>{i=null,l(a)},n-h)))},()=>a&&l(a)]}const uo=(e,t,s=3)=>{let n=0;const a=u5(50,250);return d5(i=>{const l=i.loaded,o=i.lengthComputable?i.total:void 0,c=l-n,u=a(c),d=l<=o;n=l;const h={loaded:l,total:o,progress:o?l/o:void 0,bytes:c,rate:u||void 0,estimated:u&&o&&d?(o-l)/u:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(h)},s)},Yp=(e,t)=>{const s=e!=null;return[n=>t[0]({lengthComputable:s,total:e,loaded:n}),t[1]]},Zp=e=>(...t)=>T.asap(()=>e(...t)),h5=rt.hasStandardBrowserEnv?((e,t)=>s=>(s=new URL(s,rt.origin),e.protocol===s.protocol&&e.host===s.host&&(t||e.port===s.port)))(new URL(rt.origin),rt.navigator&&/(msie|trident)/i.test(rt.navigator.userAgent)):()=>!0,f5=rt.hasStandardBrowserEnv?{write(e,t,s,n,a,i,l){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];T.isNumber(s)&&o.push(`expires=${new Date(s).toUTCString()}`),T.isString(n)&&o.push(`path=${n}`),T.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),T.isString(l)&&o.push(`SameSite=${l}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function m5(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function p5(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function lb(e,t,s){let n=!m5(t);return e&&(n||s==!1)?p5(e,t):t}const e0=e=>e instanceof jt?{...e}:e;function Qn(e,t){t=t||{};const s={};function n(u,d,h,f){return T.isPlainObject(u)&&T.isPlainObject(d)?T.merge.call({caseless:f},u,d):T.isPlainObject(d)?T.merge({},d):T.isArray(d)?d.slice():d}function a(u,d,h,f){if(T.isUndefined(d)){if(!T.isUndefined(u))return n(void 0,u,h,f)}else return n(u,d,h,f)}function i(u,d){if(!T.isUndefined(d))return n(void 0,d)}function l(u,d){if(T.isUndefined(d)){if(!T.isUndefined(u))return n(void 0,u)}else return n(void 0,d)}function o(u,d,h){if(h in t)return n(u,d);if(h in e)return n(void 0,u)}const c={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:o,headers:(u,d,h)=>a(e0(u),e0(d),h,!0)};return T.forEach(Object.keys({...e,...t}),function(d){const h=c[d]||a,f=h(e[d],t[d],d);T.isUndefined(f)&&h!==o||(s[d]=f)}),s}const ob=e=>{const t=Qn({},e);let{data:s,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:l,auth:o}=t;if(t.headers=l=jt.from(l),t.url=sb(lb(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&l.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),T.isFormData(s)){if(rt.hasStandardBrowserEnv||rt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(T.isFunction(s.getHeaders)){const c=s.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([d,h])=>{u.includes(d.toLowerCase())&&l.set(d,h)})}}if(rt.hasStandardBrowserEnv&&(n&&T.isFunction(n)&&(n=n(t)),n||n!==!1&&h5(t.url))){const c=a&&i&&f5.read(i);c&&l.set(a,c)}return t},g5=typeof XMLHttpRequest<"u",x5=g5&&function(e){return new Promise(function(s,n){const a=ob(e);let i=a.data;const l=jt.from(a.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:u}=a,d,h,f,b,g;function v(){b&&b(),g&&g(),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener("abort",d)}let w=new XMLHttpRequest;w.open(a.method.toUpperCase(),a.url,!0),w.timeout=a.timeout;function x(){if(!w)return;const p=jt.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),k={data:!o||o==="text"||o==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:p,config:e,request:w};ib(function(E){s(E),v()},function(E){n(E),v()},k),w=null}"onloadend"in w?w.onloadend=x:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(x)},w.onabort=function(){w&&(n(new ee("Request aborted",ee.ECONNABORTED,e,w)),w=null)},w.onerror=function(j){const k=j&&j.message?j.message:"Network Error",S=new ee(k,ee.ERR_NETWORK,e,w);S.event=j||null,n(S),w=null},w.ontimeout=function(){let j=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const k=a.transitional||nb;a.timeoutErrorMessage&&(j=a.timeoutErrorMessage),n(new ee(j,k.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,w)),w=null},i===void 0&&l.setContentType(null),"setRequestHeader"in w&&T.forEach(l.toJSON(),function(j,k){w.setRequestHeader(k,j)}),T.isUndefined(a.withCredentials)||(w.withCredentials=!!a.withCredentials),o&&o!=="json"&&(w.responseType=a.responseType),u&&([f,g]=uo(u,!0),w.addEventListener("progress",f)),c&&w.upload&&([h,b]=uo(c),w.upload.addEventListener("progress",h),w.upload.addEventListener("loadend",b)),(a.cancelToken||a.signal)&&(d=p=>{w&&(n(!p||p.type?new sa(null,e,w):p),w.abort(),w=null)},a.cancelToken&&a.cancelToken.subscribe(d),a.signal&&(a.signal.aborted?d():a.signal.addEventListener("abort",d)));const m=c5(a.url);if(m&&rt.protocols.indexOf(m)===-1){n(new ee("Unsupported protocol "+m+":",ee.ERR_BAD_REQUEST,e));return}w.send(i||null)})},y5=(e,t)=>{const{length:s}=e=e?e.filter(Boolean):[];if(t||s){let n=new AbortController,a;const i=function(u){if(!a){a=!0,o();const d=u instanceof Error?u:this.reason;n.abort(d instanceof ee?d:new sa(d instanceof Error?d.message:d))}};let l=t&&setTimeout(()=>{l=null,i(new ee(`timeout ${t} of ms exceeded`,ee.ETIMEDOUT))},t);const o=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>T.asap(o),c}},v5=function*(e,t){let s=e.byteLength;if(s<t){yield e;return}let n=0,a;for(;n<s;)a=n+t,yield e.slice(n,a),n=a},b5=async function*(e,t){for await(const s of j5(e))yield*v5(s,t)},j5=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:s,value:n}=await t.read();if(s)break;yield n}}finally{await t.cancel()}},t0=(e,t,s,n)=>{const a=b5(e,t);let i=0,l,o=c=>{l||(l=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await a.next();if(u){o(),c.close();return}let h=d.byteLength;if(s){let f=i+=h;s(f)}c.enqueue(new Uint8Array(d))}catch(u){throw o(u),u}},cancel(c){return o(c),a.return()}},{highWaterMark:2})},s0=64*1024,{isFunction:al}=T,w5=(({Request:e,Response:t})=>({Request:e,Response:t}))(T.global),{ReadableStream:n0,TextEncoder:r0}=T.global,a0=(e,...t)=>{try{return!!e(...t)}catch{return!1}},N5=e=>{e=T.merge.call({skipUndefined:!0},w5,e);const{fetch:t,Request:s,Response:n}=e,a=t?al(t):typeof fetch=="function",i=al(s),l=al(n);if(!a)return!1;const o=a&&al(n0),c=a&&(typeof r0=="function"?(g=>v=>g.encode(v))(new r0):async g=>new Uint8Array(await new s(g).arrayBuffer())),u=i&&o&&a0(()=>{let g=!1;const v=new s(rt.origin,{body:new n0,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!v}),d=l&&o&&a0(()=>T.isReadableStream(new n("").body)),h={stream:d&&(g=>g.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!h[g]&&(h[g]=(v,w)=>{let x=v&&v[g];if(x)return x.call(v);throw new ee(`Response type '${g}' is not supported`,ee.ERR_NOT_SUPPORT,w)})});const f=async g=>{if(g==null)return 0;if(T.isBlob(g))return g.size;if(T.isSpecCompliantForm(g))return(await new s(rt.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(T.isArrayBufferView(g)||T.isArrayBuffer(g))return g.byteLength;if(T.isURLSearchParams(g)&&(g=g+""),T.isString(g))return(await c(g)).byteLength},b=async(g,v)=>{const w=T.toFiniteNumber(g.getContentLength());return w??f(v)};return async g=>{let{url:v,method:w,data:x,signal:m,cancelToken:p,timeout:j,onDownloadProgress:k,onUploadProgress:S,responseType:E,headers:N,withCredentials:L="same-origin",fetchOptions:R}=ob(g),W=t||fetch;E=E?(E+"").toLowerCase():"text";let $=y5([m,p&&p.toAbortSignal()],j),P=null;const D=$&&$.unsubscribe&&(()=>{$.unsubscribe()});let z;try{if(S&&u&&w!=="get"&&w!=="head"&&(z=await b(N,x))!==0){let U=new s(v,{method:"POST",body:x,duplex:"half"}),A;if(T.isFormData(x)&&(A=U.headers.get("content-type"))&&N.setContentType(A),U.body){const[Z,se]=Yp(z,uo(Zp(S)));x=t0(U.body,s0,Z,se)}}T.isString(L)||(L=L?"include":"omit");const H=i&&"credentials"in s.prototype,O={...R,signal:$,method:w.toUpperCase(),headers:N.normalize().toJSON(),body:x,duplex:"half",credentials:H?L:void 0};P=i&&new s(v,O);let C=await(i?W(P,R):W(v,O));const _=d&&(E==="stream"||E==="response");if(d&&(k||_&&D)){const U={};["status","statusText","headers"].forEach(ce=>{U[ce]=C[ce]});const A=T.toFiniteNumber(C.headers.get("content-length")),[Z,se]=k&&Yp(A,uo(Zp(k),!0))||[];C=new n(t0(C.body,s0,Z,()=>{se&&se(),D&&D()}),U)}E=E||"text";let B=await h[T.findKey(h,E)||"text"](C,g);return!_&&D&&D(),await new Promise((U,A)=>{ib(U,A,{data:B,headers:jt.from(C.headers),status:C.status,statusText:C.statusText,config:g,request:P})})}catch(H){throw D&&D(),H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)?Object.assign(new ee("Network Error",ee.ERR_NETWORK,g,P),{cause:H.cause||H}):ee.from(H,H&&H.code,g,P)}}},k5=new Map,cb=e=>{let t=e&&e.env||{};const{fetch:s,Request:n,Response:a}=t,i=[n,a,s];let l=i.length,o=l,c,u,d=k5;for(;o--;)c=i[o],u=d.get(c),u===void 0&&d.set(c,u=o?new Map:N5(t)),d=u;return u};cb();const Gh={http:UP,xhr:x5,fetch:{get:cb}};T.forEach(Gh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const i0=e=>`- ${e}`,S5=e=>T.isFunction(e)||e===null||e===!1;function C5(e,t){e=T.isArray(e)?e:[e];const{length:s}=e;let n,a;const i={};for(let l=0;l<s;l++){n=e[l];let o;if(a=n,!S5(n)&&(a=Gh[(o=String(n)).toLowerCase()],a===void 0))throw new ee(`Unknown adapter '${o}'`);if(a&&(T.isFunction(a)||(a=a.get(t))))break;i[o||"#"+l]=a}if(!a){const l=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=s?l.length>1?`since :
`+l.map(i0).join(`
`):" "+i0(l[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return a}const ub={getAdapter:C5,adapters:Gh};function Uc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new sa(null,e)}function l0(e){return Uc(e),e.headers=jt.from(e.headers),e.data=zc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ub.getAdapter(e.adapter||Ti.adapter,e)(e).then(function(n){return Uc(e),n.data=zc.call(e,e.transformResponse,n),n.headers=jt.from(n.headers),n},function(n){return ab(n)||(Uc(e),n&&n.response&&(n.response.data=zc.call(e,e.transformResponse,n.response),n.response.headers=jt.from(n.response.headers))),Promise.reject(n)})}const db="1.13.2",Ko={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ko[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const o0={};Ko.transitional=function(t,s,n){function a(i,l){return"[Axios v"+db+"] Transitional option '"+i+"'"+l+(n?". "+n:"")}return(i,l,o)=>{if(t===!1)throw new ee(a(l," has been removed"+(s?" in "+s:"")),ee.ERR_DEPRECATED);return s&&!o0[l]&&(o0[l]=!0,console.warn(a(l," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(i,l,o):!0}};Ko.spelling=function(t){return(s,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function E5(e,t,s){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],l=t[i];if(l){const o=e[i],c=o===void 0||l(o,i,e);if(c!==!0)throw new ee("option "+i+" must be "+c,ee.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new ee("Unknown option "+i,ee.ERR_BAD_OPTION)}}const wl={assertOptions:E5,validators:Ko},ns=wl.validators;let Un=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Xp,response:new Xp}}async request(t,s){try{return await this._request(t,s)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+i):n.stack=i}catch{}}throw n}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=Qn(this.defaults,s);const{transitional:n,paramsSerializer:a,headers:i}=s;n!==void 0&&wl.assertOptions(n,{silentJSONParsing:ns.transitional(ns.boolean),forcedJSONParsing:ns.transitional(ns.boolean),clarifyTimeoutError:ns.transitional(ns.boolean)},!1),a!=null&&(T.isFunction(a)?s.paramsSerializer={serialize:a}:wl.assertOptions(a,{encode:ns.function,serialize:ns.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),wl.assertOptions(s,{baseUrl:ns.spelling("baseURL"),withXsrfToken:ns.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let l=i&&T.merge(i.common,i[s.method]);i&&T.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),s.headers=jt.concat(l,i);const o=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(s)===!1||(c=c&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let d,h=0,f;if(!c){const g=[l0.bind(this),void 0];for(g.unshift(...o),g.push(...u),f=g.length,d=Promise.resolve(s);h<f;)d=d.then(g[h++],g[h++]);return d}f=o.length;let b=s;for(;h<f;){const g=o[h++],v=o[h++];try{b=g(b)}catch(w){v.call(this,w);break}}try{d=l0.call(this,b)}catch(g){return Promise.reject(g)}for(h=0,f=u.length;h<f;)d=d.then(u[h++],u[h++]);return d}getUri(t){t=Qn(this.defaults,t);const s=lb(t.baseURL,t.url,t.allowAbsoluteUrls);return sb(s,t.params,t.paramsSerializer)}};T.forEach(["delete","get","head","options"],function(t){Un.prototype[t]=function(s,n){return this.request(Qn(n||{},{method:t,url:s,data:(n||{}).data}))}});T.forEach(["post","put","patch"],function(t){function s(n){return function(i,l,o){return this.request(Qn(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}Un.prototype[t]=s(),Un.prototype[t+"Form"]=s(!0)});let P5=class hb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(i){s=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const l=new Promise(o=>{n.subscribe(o),i=o}).then(a);return l.cancel=function(){n.unsubscribe(i)},l},t(function(i,l,o){n.reason||(n.reason=new sa(i,l,o),s(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=n=>{t.abort(n)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new hb(function(a){t=a}),cancel:t}}};function T5(e){return function(s){return e.apply(null,s)}}function _5(e){return T.isObject(e)&&e.isAxiosError===!0}const xd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(xd).forEach(([e,t])=>{xd[t]=e});function fb(e){const t=new Un(e),s=Hv(Un.prototype.request,t);return T.extend(s,Un.prototype,t,{allOwnKeys:!0}),T.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return fb(Qn(e,a))},s}const Ae=fb(Ti);Ae.Axios=Un;Ae.CanceledError=sa;Ae.CancelToken=P5;Ae.isCancel=ab;Ae.VERSION=db;Ae.toFormData=qo;Ae.AxiosError=ee;Ae.Cancel=Ae.CanceledError;Ae.all=function(t){return Promise.all(t)};Ae.spread=T5;Ae.isAxiosError=_5;Ae.mergeConfig=Qn;Ae.AxiosHeaders=jt;Ae.formToJSON=e=>rb(T.isHTMLForm(e)?new FormData(e):e);Ae.getAdapter=ub.getAdapter;Ae.HttpStatusCode=xd;Ae.default=Ae;const{Axios:j_,AxiosError:w_,CanceledError:N_,isCancel:k_,CancelToken:S_,VERSION:C_,all:E_,Cancel:P_,isAxiosError:T_,spread:__,toFormData:A_,AxiosHeaders:R_,HttpStatusCode:M_,formToJSON:L_,getAdapter:D_,mergeConfig:O_}=Ae,na=Ae.create({baseURL:"",timeout:3e4,headers:{"Content-Type":"application/json"}});na.interceptors.request.use(e=>{const t=localStorage.getItem("auth_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));na.interceptors.response.use(e=>e,e=>{var t;if(((t=e.response)==null?void 0:t.status)===401)try{Re.getState().clearAuth()}catch{}return Promise.reject(e)});const ve=async(e,t)=>(await na.get(e,t)).data,be=async(e,t,s)=>(await na.post(e,t,s)).data,it=async(e,t,s)=>(await na.put(e,t,s)).data,Ms=async(e,t)=>(await na.delete(e,t)).data,A5=e=>be("/login",e),mb=()=>ve("/verify"),pb=()=>ve("/registration-status"),R5=()=>ve("/login-info-status"),gb=e=>be("/generate-captcha",{session_id:e}),xb=(e,t)=>be("/verify-captcha",{session_id:e,captcha_code:t}),yb=(e,t,s)=>be("/send-verification-code",{email:e,type:t,session_id:s}),M5=e=>be("/register",e),L5={sm:"w-4 h-4",md:"w-8 h-8",lg:"w-12 h-12"};function vb({size:e="md",fullScreen:t=!1,text:s}){const n=r.jsxs("div",{className:"flex flex-col items-center justify-center gap-3",children:[r.jsx(oe.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},children:r.jsx($e,{className:ue("text-blue-500",L5[e])})}),s&&r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 font-medium",children:s})]});return t?r.jsx("div",{className:"fixed inset-0 bg-white/80 dark:bg-slate-900/80 backdrop-blur-sm z-50 flex items-center justify-center",children:n}):n}function mt(){return r.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:r.jsx(vb,{size:"lg",text:"加载中..."})})}function Jt(){return r.jsx(vb,{size:"sm"})}function D5(){const e=Zr(),{setAuth:t,isAuthenticated:s}=Re(),{addToast:n}=Me(),[a,i]=y.useState("username"),[l,o]=y.useState(!1),[c,u]=y.useState(!1),[d,h]=y.useState(!0),[f,b]=y.useState(!0),[g,v]=y.useState(!1),[w,x]=y.useState(""),[m,p]=y.useState(""),[j,k]=y.useState(""),[S,E]=y.useState(""),[N,L]=y.useState(""),[R,W]=y.useState(""),[$,P]=y.useState(""),[D,z]=y.useState(""),[H]=y.useState(()=>`session_${Math.random().toString(36).substr(2,9)}_${Date.now()}`),[O,C]=y.useState(!1),[_,B]=y.useState(0),[U,A]=y.useState("");y.useEffect(()=>{const fe=localStorage.getItem("theme")==="dark";v(fe),document.documentElement.classList.toggle("dark",fe)},[]);const Z=()=>{const Q=!g;v(Q),document.documentElement.classList.toggle("dark",Q),localStorage.setItem("theme",Q?"dark":"light")};y.useEffect(()=>{if(s){e("/dashboard");return}localStorage.getItem("auth_token")&&mb().then(fe=>{fe.authenticated&&e("/dashboard")}).catch(()=>{localStorage.removeItem("auth_token")})},[s,e]),y.useEffect(()=>{pb().then(Q=>h(Q.enabled)).catch(()=>{}),R5().then(Q=>b(Q.enabled)).catch(()=>{})},[]),y.useEffect(()=>{a==="email-code"&&se()},[a]),y.useEffect(()=>{if(_>0){const Q=setTimeout(()=>B(_-1),1e3);return()=>clearTimeout(Q)}},[_]);const se=async()=>{try{const Q=await gb(H);Q.success&&Q.captcha_image&&(z(Q.captcha_image),C(!1),W(""))}catch{n({type:"error",message:"加载验证码失败"})}},ce=async Q=>{const fe=Q||R;if(fe.length===4)try{(await xb(H,fe)).success?(C(!0),n({type:"success",message:"验证码验证成功"})):(C(!1),se(),n({type:"error",message:"验证码错误"}))}catch{n({type:"error",message:"验证失败"})}},F=Q=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Q),X=Q=>{L(Q),Q&&!F(Q)?A("请输入正确的邮箱格式"):A("")},Le=async()=>{if(!N){A("请输入邮箱地址");return}if(!F(N)){A("请输入正确的邮箱格式");return}if(!O){n({type:"warning",message:"请先完成图形验证码验证"});return}if(!(_>0))try{const Q=await yb(N,"login",H);Q.success?(B(60),n({type:"success",message:"验证码已发送"})):n({type:"error",message:Q.message||"发送失败"})}catch{n({type:"error",message:"发送验证码失败"})}},Je=async Q=>{Q.preventDefault(),o(!0);try{let fe={};if(a==="username"){if(!w||!m){n({type:"error",message:"请输入用户名和密码"});return}fe={username:w,password:m}}else if(a==="email-password"){if(!j||!S){n({type:"error",message:"请输入邮箱和密码"});return}fe={email:j,password:S}}else{if(!N||!$){n({type:"error",message:"请输入邮箱和验证码"});return}fe={email:N,verification_code:$}}const Mt=await A5(fe);Mt.success&&Mt.token?(t(Mt.token,{user_id:Mt.user_id,username:Mt.username,is_admin:Mt.is_admin}),n({type:"success",message:"登录成功"}),e("/dashboard")):n({type:"error",message:Mt.message||"登录失败"})}catch{n({type:"error",message:"登录失败,请检查网络连接"})}finally{o(!1)}},Rt=()=>{i("username"),x("admin"),p("admin123")};return r.jsxs("div",{className:"min-h-screen flex bg-slate-50 dark:bg-slate-900 transition-colors duration-200",children:[r.jsx("button",{onClick:Z,className:`fixed top-4 right-4 z-50 p-2.5 rounded-lg\r
bg-white dark:bg-slate-800 shadow-sm border border-slate-200 dark:border-slate-700\r
text-slate-600 dark:text-slate-300 hover:text-slate-900 dark:hover:text-white\r
transition-colors duration-150`,title:g?"切换到亮色模式":"切换到暗色模式",children:g?r.jsx(Dv,{className:"w-4 h-4"}):r.jsx(Mv,{className:"w-4 h-4"})}),r.jsxs(oe.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.5},className:"hidden lg:flex lg:w-1/2 bg-slate-900 dark:bg-slate-950 relative overflow-hidden",children:[r.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-600/20 to-transparent"}),r.jsxs("div",{className:"relative z-10 flex flex-col justify-center px-16",children:[r.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2,duration:.5},className:"flex items-center gap-3 mb-8",children:[r.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500 flex items-center justify-center",children:r.jsx($t,{className:"w-6 h-6 text-white"})}),r.jsx("span",{className:"text-2xl font-bold text-white",children:"闲鱼管理系统"})]}),r.jsxs(oe.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3,duration:.5},className:"text-4xl font-bold text-white mb-4 leading-tight",children:["高效专业的",r.jsx("br",{}),"闲鱼自动化管理平台"]}),r.jsx(oe.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4,duration:.5},className:"text-slate-400 text-lg max-w-md",children:"自动回复、智能客服、订单管理、数据分析,一站式解决闲鱼运营难题"})]}),r.jsx("div",{className:"absolute -bottom-32 -left-32 w-96 h-96 rounded-full bg-blue-600/10"}),r.jsx("div",{className:"absolute -top-32 -right-32 w-96 h-96 rounded-full bg-blue-600/5"})]}),r.jsx("div",{className:"flex-1 flex items-center justify-center p-4 sm:p-6",children:r.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"w-full max-w-md",children:[r.jsxs(oe.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:.1,duration:.4},className:"lg:hidden text-center mb-8",children:[r.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500 text-white mx-auto mb-4 flex items-center justify-center",children:r.jsx($t,{className:"w-6 h-6"})}),r.jsx("h1",{className:"text-xl font-bold text-slate-900 dark:text-white",children:"闲鱼管理系统"})]}),r.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-lg shadow-sm border border-slate-200 dark:border-slate-700 p-5 sm:p-8",children:[r.jsxs("div",{className:"mb-6",children:[r.jsx("h2",{className:"text-xl vben-card-title text-slate-900 dark:text-white",children:"登录"}),r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1",children:"欢迎回来,请登录您的账号"})]}),r.jsx("div",{className:"flex border-b border-slate-200 dark:border-slate-700 mb-4 sm:mb-6 overflow-x-auto scrollbar-hide",children:[{type:"username",label:"账号登录"},{type:"email-password",label:"邮箱密码"},{type:"email-code",label:"验证码"}].map(Q=>r.jsx("button",{onClick:()=>i(Q.type),className:ue("px-3 sm:px-4 py-2 sm:py-2.5 text-xs sm:text-sm font-medium border-b-2 -mb-px transition-colors whitespace-nowrap flex-shrink-0",a===Q.type?"text-blue-600 dark:text-blue-400 border-blue-600 dark:border-blue-400":"text-slate-500 dark:text-slate-400 border-transparent hover:text-slate-700 dark:hover:text-slate-300"),children:Q.label},Q.type))}),r.jsxs("form",{onSubmit:Je,className:"space-y-3 sm:space-y-4",children:[a==="username"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"用户名"}),r.jsxs("div",{className:"relative",children:[r.jsx(Ov,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),r.jsx("input",{type:"text",value:w,onChange:Q=>x(Q.target.value),placeholder:"请输入用户名",className:"input-ios pl-9"})]})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"密码"}),r.jsxs("div",{className:"relative",children:[r.jsx(lo,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),r.jsx("input",{type:c?"text":"password",value:m,onChange:Q=>p(Q.target.value),placeholder:"请输入密码",className:"input-ios pl-9 pr-9"}),r.jsx("button",{type:"button",onClick:()=>u(!c),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:c?r.jsx(ld,{className:"w-4 h-4"}):r.jsx(od,{className:"w-4 h-4"})})]})]})]}),a==="email-password"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"邮箱地址"}),r.jsxs("div",{className:"relative",children:[r.jsx(Kn,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),r.jsx("input",{type:"email",value:j,onChange:Q=>k(Q.target.value),placeholder:"name@example.com",className:"input-ios pl-9"})]})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"密码"}),r.jsxs("div",{className:"relative",children:[r.jsx(lo,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),r.jsx("input",{type:c?"text":"password",value:S,onChange:Q=>E(Q.target.value),placeholder:"请输入密码",className:"input-ios pl-9 pr-9"}),r.jsx("button",{type:"button",onClick:()=>u(!c),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:c?r.jsx(ld,{className:"w-4 h-4"}):r.jsx(od,{className:"w-4 h-4"})})]})]})]}),a==="email-code"&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"邮箱地址"}),r.jsxs("div",{className:"relative",children:[r.jsx(Kn,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),r.jsx("input",{type:"email",value:N,onChange:Q=>X(Q.target.value),placeholder:"name@example.com",className:ue("input-ios pl-9",U&&"border-red-500 focus:border-red-500")})]}),U&&r.jsx("p",{className:"text-xs text-red-500 mt-1",children:U})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"图形验证码"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("input",{type:"text",value:R,onChange:Q=>{const fe=Q.target.value.toUpperCase();W(fe),fe.length===4&&!O&&ce(fe)},placeholder:"输入验证码",maxLength:4,className:ue("input-ios flex-1",O&&"border-green-500 bg-green-50 dark:bg-green-900/20"),disabled:O}),r.jsx("img",{src:D,alt:"验证码",onClick:se,className:"h-[38px] rounded border border-gray-300 cursor-pointer hover:opacity-80 transition-opacity"})]}),r.jsx("p",{className:ue("text-xs",O?"text-green-600":"text-gray-400"),children:O?"✓ 验证成功,可以发送邮箱验证码":"输入4位验证码后自动验证"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"邮箱验证码"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx(Rv,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),r.jsx("input",{type:"text",value:$,onChange:Q=>P(Q.target.value),placeholder:"6位数字验证码",maxLength:6,className:"input-ios pl-9"})]}),r.jsx("button",{type:"button",onClick:Le,disabled:_>0,className:"btn-ios-secondary whitespace-nowrap",children:_>0?`${_}s`:"发送"})]})]})]}),r.jsx("button",{type:"submit",disabled:l,className:"w-full btn-ios-primary",children:l?r.jsx(Jt,{}):"登 录"})]}),d&&r.jsxs("p",{className:"text-center mt-6 text-slate-500 dark:text-slate-400 text-sm",children:["还没有账号?"," ",r.jsx(Jl,{to:"/register",className:"text-blue-600 dark:text-blue-400 font-medium hover:text-blue-700 dark:hover:text-blue-300",children:"立即注册"})]}),f&&r.jsx("div",{className:"mt-6 pt-6 border-t border-slate-100 dark:border-slate-700",children:r.jsxs("button",{type:"button",onClick:Rt,className:`w-full flex items-center justify-between p-3 rounded-md \r
bg-slate-50 dark:bg-slate-700/50 hover:bg-slate-100 dark:hover:bg-slate-700 \r
transition-colors text-sm`,children:[r.jsxs("div",{className:"text-left",children:[r.jsx("p",{className:"text-slate-500 dark:text-slate-400",children:"演示账号"}),r.jsx("p",{className:"text-slate-900 dark:text-white font-medium",children:"admin / admin123"})]}),r.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:"一键填充 →"})]})})]}),r.jsxs("p",{className:"text-center mt-6 text-slate-400 dark:text-slate-500 text-xs",children:["© ",new Date().getFullYear()," 划算云服务器 ·",r.jsx("a",{href:"https://www.hsykj.com",target:"_blank",rel:"noopener noreferrer",className:"hover:text-blue-600 dark:hover:text-blue-400 ml-1 transition-colors",children:"www.hsykj.com"})]})]})})]})}function O5(){const e=Zr(),{addToast:t}=Me(),[s,n]=y.useState(!1),[a,i]=y.useState(!1),[l,o]=y.useState(!0),[c,u]=y.useState(""),[d,h]=y.useState(""),[f,b]=y.useState(""),[g,v]=y.useState(""),[w,x]=y.useState(""),[m,p]=y.useState(""),[j,k]=y.useState(""),[S]=y.useState(()=>`session_${Math.random().toString(36).substr(2,9)}_${Date.now()}`),[E,N]=y.useState(!1),[L,R]=y.useState(0),[W,$]=y.useState("");y.useEffect(()=>{pb().then(_=>{o(_.enabled),_.enabled||t({type:"warning",message:"注册功能已关闭"})}).catch(()=>{})},[]),y.useEffect(()=>{P()},[]),y.useEffect(()=>{if(L>0){const _=setTimeout(()=>R(L-1),1e3);return()=>clearTimeout(_)}},[L]);const P=async()=>{try{const _=await gb(S);_.success&&_.captcha_image&&(k(_.captcha_image),N(!1),x(""))}catch{t({type:"error",message:"加载验证码失败"})}},D=async _=>{const B=_||w;if(B.length===4)try{(await xb(S,B)).success?(N(!0),t({type:"success",message:"验证码验证成功"})):(N(!1),P(),t({type:"error",message:"验证码错误"}))}catch{t({type:"error",message:"验证失败"})}},z=_=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(_),H=_=>{h(_),_&&!z(_)?$("请输入正确的邮箱格式"):$("")},O=async()=>{if(!d){$("请输入邮箱地址");return}if(!z(d)){$("请输入正确的邮箱格式");return}if(!E){t({type:"warning",message:"请先完成图形验证码验证"});return}if(!(L>0))try{const _=await yb(d,"register",S);_.success?(R(60),t({type:"success",message:"验证码已发送"})):t({type:"error",message:_.message||"发送失败"})}catch{t({type:"error",message:"发送验证码失败"})}},C=async _=>{if(_.preventDefault(),!c||!d||!f||!g||!m){t({type:"error",message:"请填写所有必填项"});return}if(f!==g){t({type:"error",message:"两次输入的密码不一致"});return}if(f.length<6){t({type:"error",message:"密码长度至少6位"});return}n(!0);try{const B=await M5({username:c,email:d,password:f,verification_code:m,session_id:S});B.success?(t({type:"success",message:"注册成功,请登录"}),e("/login")):t({type:"error",message:B.message||"注册失败"})}catch{t({type:"error",message:"注册失败,请检查网络连接"})}finally{n(!1)}};return l?r.jsx("div",{className:"min-h-screen bg-slate-50 dark:bg-slate-900 flex items-center justify-center p-6 transition-colors",children:r.jsxs("div",{className:"w-full max-w-md",children:[r.jsxs("div",{className:"text-center mb-6",children:[r.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-600 text-white mx-auto mb-4 flex items-center justify-center",children:r.jsx($t,{className:"w-6 h-6"})}),r.jsx("h1",{className:"text-xl font-bold text-slate-900 dark:text-slate-100",children:"用户注册"}),r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"创建您的账号以开始使用"})]}),r.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-lg shadow-sm border border-slate-200 dark:border-slate-700 p-6",children:[r.jsxs("form",{onSubmit:C,className:"space-y-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"用户名"}),r.jsxs("div",{className:"relative",children:[r.jsx(Ov,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),r.jsx("input",{type:"text",value:c,onChange:_=>u(_.target.value),placeholder:"请输入用户名",className:"input-ios pl-9"})]})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"邮箱地址"}),r.jsxs("div",{className:"relative",children:[r.jsx(Kn,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),r.jsx("input",{type:"email",value:d,onChange:_=>H(_.target.value),placeholder:"name@example.com",className:ue("input-ios pl-9",W&&"border-red-500 focus:border-red-500")})]}),W&&r.jsx("p",{className:"text-xs text-red-500 mt-1",children:W})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"密码"}),r.jsxs("div",{className:"relative",children:[r.jsx(lo,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),r.jsx("input",{type:a?"text":"password",value:f,onChange:_=>b(_.target.value),placeholder:"至少6位字符",className:"input-ios pl-9 pr-9"}),r.jsx("button",{type:"button",onClick:()=>i(!a),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-300",children:a?r.jsx(ld,{className:"w-4 h-4"}):r.jsx(od,{className:"w-4 h-4"})})]})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"确认密码"}),r.jsxs("div",{className:"relative",children:[r.jsx(lo,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),r.jsx("input",{type:a?"text":"password",value:g,onChange:_=>v(_.target.value),placeholder:"请再次输入密码",className:"input-ios pl-9"})]})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"图形验证码"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("input",{type:"text",value:w,onChange:_=>{const B=_.target.value.toUpperCase();x(B),B.length===4&&!E&&D(B)},disabled:E,placeholder:"输入验证码",maxLength:4,className:ue("input-ios flex-1",E&&"border-green-500 bg-green-50 dark:bg-green-900/20")}),r.jsx("img",{src:j,alt:"验证码",onClick:P,className:"h-[38px] rounded border border-slate-300 dark:border-slate-600 cursor-pointer hover:opacity-80 transition-opacity"})]}),r.jsx("p",{className:ue("text-xs",E?"text-green-600 dark:text-green-400":"text-slate-400"),children:E?"✓ 验证成功,可以发送邮箱验证码":"输入4位验证码后自动验证"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"邮箱验证码"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx(Rv,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),r.jsx("input",{type:"text",value:m,onChange:_=>p(_.target.value),placeholder:"6位数字验证码",maxLength:6,className:"input-ios pl-9"})]}),r.jsx("button",{type:"button",onClick:O,disabled:L>0,className:"btn-ios-secondary whitespace-nowrap",children:L>0?`${L}s`:"发送"})]})]}),r.jsx("button",{type:"submit",disabled:s,className:"w-full btn-ios-primary",children:s?r.jsx(Jt,{}):"注 册"})]}),r.jsxs("p",{className:"text-center mt-6 text-slate-500 dark:text-slate-400 text-sm",children:["已有账号?"," ",r.jsx(Jl,{to:"/login",className:"text-blue-600 dark:text-blue-400 font-medium hover:text-indigo-700",children:"立即登录"})]})]}),r.jsxs("p",{className:"text-center mt-6 text-slate-400 text-xs",children:["© ",new Date().getFullYear()," 划算云服务器 ·",r.jsx("a",{href:"https://www.hsykj.com",target:"_blank",rel:"noopener noreferrer",className:"hover:text-blue-600 dark:text-blue-400 ml-1 transition-colors",children:"www.hsykj.com"})]})]})}):r.jsx("div",{className:"min-h-screen bg-slate-50 dark:bg-slate-900 flex items-center justify-center p-4",children:r.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-lg shadow-sm border border-slate-200 dark:border-slate-700 p-8 text-center max-w-sm",children:[r.jsx("div",{className:"w-14 h-14 rounded-full bg-amber-100 dark:bg-amber-900/30 mx-auto mb-4 flex items-center justify-center",children:r.jsx("span",{className:"text-2xl",children:"🚫"})}),r.jsx("h1",{className:"text-lg vben-card-title text-slate-900 dark:text-slate-100 mb-2",children:"注册功能已关闭"}),r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mb-6",children:"管理员已关闭注册功能,如需账号请联系管理员"}),r.jsx(Jl,{to:"/login",className:"btn-ios-primary",children:"返回登录"})]})})}const er=async()=>(await ve("/cookies")).map(t=>({id:t,cookie:"",enabled:!0,use_ai_reply:!1,use_default_reply:!1,auto_confirm:!1})),bb=async()=>(await ve("/cookies/details")).map(t=>({id:t.id,cookie:t.value,enabled:t.enabled,auto_confirm:t.auto_confirm,note:t.remark,pause_duration:t.pause_duration,use_ai_reply:!1,use_default_reply:!1})),I5=e=>be("/cookies",{id:e.id,value:e.cookie}),F5=(e,t)=>it(`/cookies/${e}`,{id:e,value:t}),V5=(e,t)=>it(`/cookies/${e}/status`,{enabled:t}),z5=(e,t)=>it(`/cookies/${e}/remark`,{remark:t}),U5=(e,t)=>it(`/cookies/${e}/auto-confirm`,{auto_confirm:t}),B5=(e,t)=>it(`/cookies/${e}/pause-duration`,{pause_duration:t}),$5=e=>Ms(`/cookies/${e}`),H5=e=>be("/password-login",e),c0=()=>be("/qr-login/generate"),W5=async e=>{const t=await ve(`/qr-login/check/${e}`);return{success:t.status!=="error",status:t.status,message:t.message,account_info:t.account_info}},q5=e=>ve(`/ai-reply-settings/${e}`),u0=(e,t)=>{const s={ai_enabled:t.ai_enabled??t.enabled??!1,model_name:t.model_name??"qwen-plus",api_key:t.api_key??"",base_url:t.base_url??"https://dashscope.aliyuncs.com/compatible-mode/v1",max_discount_percent:t.max_discount_percent??10,max_discount_amount:t.max_discount_amount??100,max_bargain_rounds:t.max_bargain_rounds??3,custom_prompts:t.custom_prompts??""};return it(`/ai-reply-settings/${e}`,s)},K5=()=>ve("/ai-reply-settings"),ra=e=>ve(`/keywords-with-item-id/${e}`),Xh=(e,t)=>{const s=t.filter(n=>n.type!=="image").map(n=>({keyword:n.keyword,reply:n.reply||"",item_id:n.item_id||""}));return be(`/keywords-with-item-id/${e}`,{keywords:s})},Q5=async(e,t)=>{const s=await ra(e);return s.some(a=>a.keyword===t.keyword&&(a.item_id||"")===(t.item_id||""))?{success:!1,message:"该关键词已存在"}:(s.push({keyword:t.keyword||"",reply:t.reply||"",item_id:t.item_id||"",type:"text"}),Xh(e,s))},G5=async(e,t,s,n)=>{const a=await ra(e),i=a.findIndex(l=>l.keyword===t&&(l.item_id||"")===(s||""));return i===-1?{success:!1,message:"关键词不存在"}:(n.keyword!==t||n.item_id!==s)&&a.some((o,c)=>c!==i&&o.keyword===n.keyword&&(o.item_id||"")===(n.item_id||""))?{success:!1,message:"该关键词已存在"}:(a[i]={...a[i],...n},Xh(e,a))},X5=async(e,t,s)=>{const n=await ra(e),a=n.filter(i=>!(i.keyword===t&&(i.item_id||"")===(s||"")));return a.length===n.length?{success:!1,message:"关键词不存在"}:Xh(e,a)},J5=e=>ve(`/default-reply/${e}`),Y5=(e,t)=>it(`/default-reply/${e}`,{default_reply:t}),Z5=e=>ve(`/keywords-export/${e}`,{responseType:"blob"}),eT=(e,t)=>{const s=new FormData;return s.append("file",t),be(`/keywords-import/${e}`,s,{headers:{"Content-Type":"multipart/form-data"}})},tT=(e,t,s,n)=>{const a=new FormData;return a.append("keyword",t),a.append("image",s),n&&a.append("item_id",n),be(`/keywords/${e}/image`,a,{headers:{"Content-Type":"multipart/form-data"}})},jb=(e,t)=>{const s=new URLSearchParams;e&&s.append("cookie_id",e),t&&s.append("status",t);const n=s.toString();return ve(`/api/orders${n?`?${n}`:""}`)},sT=async e=>({success:!1,message:"后端暂未实现订单删除接口"}),nT=async()=>({success:!0,data:((await ve("/admin/users")).users||[]).map(s=>({user_id:s.id,username:s.username,email:s.email,is_admin:s.is_admin}))}),rT=e=>Ms(`/admin/users/${e}`),aT=async e=>{const t=new URLSearchParams;e!=null&&e.page&&t.set("page",String(e.page)),e!=null&&e.limit&&t.set("lines",String(e.limit)),e!=null&&e.level&&t.set("level",e.level.toUpperCase());const s=await ve(`/admin/logs?${t.toString()}`);return{success:!0,data:(s.logs||[]).map((a,i)=>({id:String(i),level:a.includes("ERROR")?"error":a.includes("WARNING")?"warning":"info",message:a,module:"system",created_at:new Date().toISOString()})),total:s.total}},iT=()=>be("/logs/clear"),lT=async e=>{const t=new URLSearchParams;e!=null&&e.page&&t.set("page",String(e.page)),e!=null&&e.limit&&t.set("limit",String(e.limit)),e!=null&&e.cookie_id&&t.set("cookie_id",e.cookie_id);const s=await ve(`/admin/risk-control-logs?${t.toString()}`);return{success:!0,data:(s.data||[]).map(a=>({id:String(a.id),cookie_id:a.cookie_id||a.cookie_name,risk_type:a.event_type,message:a.event_description||a.processing_result,created_at:a.created_at})),total:s.total}},oT=async()=>({success:!1,message:"后端暂未实现批量清空风控日志接口"}),cT=async e=>ve(`/admin/data/${e}`),uT=e=>Ms(`/admin/data/${e}`),dT=()=>`/admin/logs/export?token=${localStorage.getItem("auth_token")}`,hT=async()=>{try{return{success:!0,data:await ve("/admin/stats")}}catch{return{success:!1}}};function fT(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n,user:a}=Re(),[i,l]=y.useState(!0),[o,c]=y.useState({totalAccounts:0,totalKeywords:0,activeAccounts:0,totalOrders:0}),[u,d]=y.useState([]),[h,f]=y.useState(null),b=async()=>{var w;if(!(!n||!t||!s))try{l(!0);const x=await bb(),m=await Promise.all(x.map(async S=>{try{const E=await ra(S.id);return{...S,keywordCount:E.length}}catch{return{...S,keywordCount:0}}}));let p=0,j=0;m.forEach(S=>{S.enabled!==!1&&(j++,p+=S.keywordCount||0)});let k=0;try{const S=await jb();S.success&&(k=((w=S.data)==null?void 0:w.length)||0)}catch{}if(c({totalAccounts:m.length,totalKeywords:p,activeAccounts:j,totalOrders:k}),d(m),a!=null&&a.is_admin)try{const S=await hT();S.success&&S.data&&f(S.data)}catch{}}catch{e({type:"error",message:"加载仪表盘数据失败"})}finally{l(!1)}};if(y.useEffect(()=>{!n||!t||!s||b()},[n,t,s]),i)return r.jsx(mt,{});const g=[{icon:qr,label:"总账号数",value:o.totalAccounts,color:"primary"},{icon:$t,label:"总关键词数",value:o.totalKeywords,color:"success"},{icon:B4,label:"启用账号数",value:o.activeAccounts,color:"warning"},{icon:oo,label:"总订单数",value:o.totalOrders,color:"info"}],v={primary:"stat-icon-primary",success:"stat-icon-success",warning:"stat-icon-warning",info:"stat-icon-info"};return r.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[r.jsxs("div",{className:"page-header flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"仪表盘"}),r.jsx("p",{className:"page-description",children:"系统概览和统计信息"})]}),r.jsxs("button",{onClick:b,className:"btn-ios-secondary",children:[r.jsx(Xe,{className:"w-4 h-4"}),r.jsx("span",{className:"hidden sm:inline",children:"刷新数据"}),r.jsx("span",{className:"sm:hidden",children:"刷新"})]})]}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4 gap-2 sm:gap-4",children:g.map((w,x)=>{const m=w.icon;return r.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:x*.1,duration:.3},className:"stat-card",children:[r.jsx("div",{className:v[w.color],children:r.jsx(m,{className:"w-6 h-6"})}),r.jsxs("div",{children:[r.jsx("p",{className:"stat-value",children:w.value}),r.jsx("p",{className:"stat-label",children:w.label})]})]},w.label)})}),(a==null?void 0:a.is_admin)&&h&&r.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3,duration:.3},className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title flex items-center gap-2",children:[r.jsx(Lv,{className:"w-4 h-4"}),"全局统计(管理员)"]})}),r.jsx("div",{className:"vben-card-body",children:r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-4",children:[r.jsxs("div",{className:"text-center p-3 bg-slate-50 dark:bg-slate-800 rounded-lg",children:[r.jsx("p",{className:"text-2xl font-bold text-blue-600",children:h.total_users}),r.jsx("p",{className:"text-sm text-slate-500",children:"总用户数"})]}),r.jsxs("div",{className:"text-center p-3 bg-slate-50 dark:bg-slate-800 rounded-lg",children:[r.jsx("p",{className:"text-2xl font-bold text-green-600",children:h.total_cookies}),r.jsx("p",{className:"text-sm text-slate-500",children:"总账号数"})]}),r.jsxs("div",{className:"text-center p-3 bg-slate-50 dark:bg-slate-800 rounded-lg",children:[r.jsx("p",{className:"text-2xl font-bold text-amber-600",children:h.active_cookies}),r.jsx("p",{className:"text-sm text-slate-500",children:"活跃账号"})]}),r.jsxs("div",{className:"text-center p-3 bg-slate-50 dark:bg-slate-800 rounded-lg",children:[r.jsx("p",{className:"text-2xl font-bold text-purple-600",children:h.total_cards}),r.jsx("p",{className:"text-sm text-slate-500",children:"总卡券数"})]}),r.jsxs("div",{className:"text-center p-3 bg-slate-50 dark:bg-slate-800 rounded-lg",children:[r.jsx("p",{className:"text-2xl font-bold text-cyan-600",children:h.total_keywords}),r.jsx("p",{className:"text-sm text-slate-500",children:"总关键词"})]}),r.jsxs("div",{className:"text-center p-3 bg-slate-50 dark:bg-slate-800 rounded-lg",children:[r.jsx("p",{className:"text-2xl font-bold text-rose-600",children:h.total_orders}),r.jsx("p",{className:"text-sm text-slate-500",children:"总订单数"})]})]})})]}),r.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4,duration:.3},className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsx("h2",{className:"vben-card-title",children:"账号详情"})}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"账号ID"}),r.jsx("th",{children:"关键词数量"}),r.jsx("th",{children:"状态"}),r.jsx("th",{children:"最后更新"})]})}),r.jsx("tbody",{children:u.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:4,children:r.jsxs("div",{className:"empty-state py-8",children:[r.jsx(qr,{className:"empty-state-icon"}),r.jsx("p",{className:"text-gray-500",children:"暂无账号数据"})]})})}):u.map(w=>{const x=w.enabled!==!1,m=w.keywordCount||0;return r.jsxs("tr",{children:[r.jsx("td",{className:"font-medium text-blue-600 dark:text-blue-400",children:w.id}),r.jsx("td",{children:m}),r.jsx("td",{children:(()=>{const p=x?m>0?"text-green-600":"text-gray-500":"text-gray-400",j=x?m>0?"status-dot-success":"bg-gray-300":"status-dot-danger",k=x?m>0?"活跃":"无关键词":"已禁用";return r.jsxs("span",{className:`inline-flex items-center gap-1.5 ${p}`,children:[r.jsx("span",{className:`status-dot ${j}`}),k]})})()}),r.jsx("td",{className:"text-gray-500",children:w.updated_at?new Date(w.updated_at).toLocaleString():"-"})]},w.id)})})]})})]})]})}function mT(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState(null),[d,h]=y.useState(null),[f,b]=y.useState(""),[g,v]=y.useState(!1),[w,x]=y.useState(""),[,m]=y.useState(""),[p,j]=y.useState("loading"),k=y.useRef(null),[S,E]=y.useState(""),[N,L]=y.useState(""),[R,W]=y.useState(!1),[$,P]=y.useState(!1),[D,z]=y.useState(""),[H,O]=y.useState(""),[C,_]=y.useState(!1),[B,U]=y.useState(null),[A,Z]=y.useState(""),[se,ce]=y.useState(""),[F,X]=y.useState(!1),[Le,Je]=y.useState(0),[Rt,Q]=y.useState(!1),[fe,Mt]=y.useState(null),[_i,Qo]=y.useState(!1),[Ai,Ri]=y.useState(10),[Mi,Li]=y.useState(100),[G,me]=y.useState(3),[qe,Ye]=y.useState(""),[hs,aa]=y.useState(!1),[Jh,Yh]=y.useState(!1),Ls=async()=>{if(!(!n||!t||!s))try{i(!0);const I=await bb();let ne={};try{ne=await K5()}catch{}const tr=await Promise.all(I.map(async ze=>{var tf,sf,nf,rf;try{const Ib=await ra(ze.id);return{...ze,keywordCount:Ib.length,aiEnabled:((tf=ne[ze.id])==null?void 0:tf.ai_enabled)??((sf=ne[ze.id])==null?void 0:sf.enabled)??!1}}catch{return{...ze,keywordCount:0,aiEnabled:((nf=ne[ze.id])==null?void 0:nf.ai_enabled)??((rf=ne[ze.id])==null?void 0:rf.enabled)??!1}}}));o(tr)}catch{e({type:"error",message:"加载账号列表失败"})}finally{i(!1)}};y.useEffect(()=>{!n||!t||!s||Ls()},[n,t,s]);const fs=y.useCallback(()=>{k.current&&(clearInterval(k.current),k.current=null)},[]),Ve=y.useCallback(()=>{fs(),u(null),x(""),m(""),j("loading"),E(""),L(""),W(!1),z(""),O(""),_(!1)},[fs]),Sb=async()=>{u("qrcode"),j("loading");try{const I=await c0();I.success&&I.qr_code_url&&I.session_id?(x(I.qr_code_url),m(I.session_id),j("ready"),Zh(I.session_id)):(j("error"),e({type:"error",message:I.message||"生成二维码失败"}))}catch{j("error"),e({type:"error",message:"生成二维码失败"})}},Zh=I=>{fs(),k.current=setInterval(async()=>{var ne,tr;try{const ze=await W5(I);if(!ze.success)return;switch(ze.status){case"scanned":j("scanned");break;case"processing":j("scanned");break;case"success":case"already_processed":j("success"),fs(),e({type:"success",message:(ne=ze.account_info)!=null&&ne.is_new_account?`新账号 ${ze.account_info.account_id} 添加成功`:(tr=ze.account_info)!=null&&tr.account_id?`账号 ${ze.account_info.account_id} 登录成功`:"账号登录成功"}),setTimeout(()=>{Ve(),Ls()},1500);break;case"expired":j("expired"),fs();break;case"cancelled":fs(),e({type:"warning",message:"用户取消登录"}),Ve();break;case"verification_required":e({type:"warning",message:"需要手机验证,请在手机上完成"});break}}catch{}},2e3)},ef=async()=>{j("loading"),fs();try{const I=await c0();I.success&&I.qr_code_url&&I.session_id?(x(I.qr_code_url),m(I.session_id),j("ready"),Zh(I.session_id)):j("error")}catch{j("error")}},Cb=async I=>{if(I.preventDefault(),!S.trim()||!N.trim()){e({type:"warning",message:"请输入账号和密码"});return}W(!0);try{const ne=await H5({account_id:S.trim(),account:S.trim(),password:N,show_browser:$});ne.success?(e({type:"success",message:"登录请求已提交,请等待处理"}),Ve(),setTimeout(Ls,3e3)):e({type:"error",message:ne.message||"登录失败"})}catch{e({type:"error",message:"登录请求失败"})}finally{W(!1)}},Eb=async I=>{if(I.preventDefault(),!D.trim()){e({type:"warning",message:"请输入账号ID"});return}if(!H.trim()){e({type:"warning",message:"请输入Cookie"});return}_(!0);try{const ne=await I5({id:D.trim(),cookie:H.trim()});ne.success||ne.msg==="success"?(e({type:"success",message:"账号添加成功"}),Ve(),Ls()):e({type:"error",message:ne.message||ne.detail||"添加失败"})}catch{e({type:"error",message:"添加账号失败"})}finally{_(!1)}},Pb=async I=>{try{await V5(I.id,!I.enabled),e({type:"success",message:I.enabled?"账号已禁用":"账号已启用"}),Ls()}catch{e({type:"error",message:"操作失败"})}},Tb=async I=>{if(confirm("确定要删除这个账号吗?"))try{await $5(I),e({type:"success",message:"删除成功"}),Ls()}catch{e({type:"error",message:"删除失败"})}},_b=I=>{U(I),Z(I.note||""),ce(I.cookie||""),X(I.auto_confirm||!1),Je(I.pause_duration||0),u("edit")},Ab=async I=>{if(I.preventDefault(),!!B){Q(!0);try{const ne=[];A.trim()!==(B.note||"")&&ne.push(z5(B.id,A.trim())),se.trim()&&se.trim()!==B.cookie&&ne.push(F5(B.id,se.trim())),F!==(B.auto_confirm||!1)&&ne.push(U5(B.id,F)),Le!==(B.pause_duration||0)&&ne.push(B5(B.id,Le)),await Promise.all(ne),e({type:"success",message:"账号信息已更新"}),Ve(),Ls()}catch{e({type:"error",message:"保存失败"})}finally{Q(!1)}}},Rb=async I=>{h(I),b(""),u("default-reply");try{const ne=await J5(I.id);b(ne.default_reply||"")}catch{}},Mb=async()=>{if(d)try{v(!0),await Y5(d.id,f),e({type:"success",message:"默认回复已保存"}),Ve()}catch{e({type:"error",message:"保存失败"})}finally{v(!1)}},Lb=async I=>{const ne=!I.aiEnabled;try{await u0(I.id,{enabled:ne}),o(tr=>tr.map(ze=>ze.id===I.id?{...ze,aiEnabled:ne}:ze)),e({type:"success",message:`AI回复已${ne?"开启":"关闭"}`})}catch{e({type:"error",message:"操作失败"})}},Db=async I=>{Mt(I),u("ai-settings"),Yh(!0);try{const ne=await q5(I.id);Qo(ne.enabled??!1),Ri(ne.max_discount_percent??10),Li(ne.max_discount_amount??100),me(ne.max_bargain_rounds??3),Ye(ne.custom_prompts??"")}catch{e({type:"error",message:"加载AI设置失败"})}finally{Yh(!1)}},Ob=async()=>{if(fe)try{aa(!0),await u0(fe.id,{enabled:_i,max_discount_percent:Ai,max_discount_amount:Mi,max_bargain_rounds:G,custom_prompts:qe}),o(I=>I.map(ne=>ne.id===fe.id?{...ne,aiEnabled:_i}:ne)),e({type:"success",message:"AI设置已保存"}),Ve()}catch{e({type:"error",message:"保存失败"})}finally{aa(!1)}};return y.useEffect(()=>()=>fs(),[fs]),a?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"page-header flex-between",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"账号管理"}),r.jsx("p",{className:"page-description",children:"管理闲鱼账号Cookie信息"})]}),r.jsxs("button",{onClick:Ls,className:"btn-ios-secondary",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]}),r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title ",children:[r.jsx(bn,{className:"w-4 h-4"}),"添加新账号"]})}),r.jsx("div",{className:"vben-card-body",children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[r.jsxs("button",{onClick:Sb,className:`flex items-center gap-3 p-4 rounded-md border border-blue-200 dark:border-blue-800 \r
bg-blue-50 dark:bg-blue-900/30 hover:bg-blue-100 dark:hover:bg-blue-900/50 transition-colors text-left`,children:[r.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-600 flex items-center justify-center flex-shrink-0",children:r.jsx(rE,{className:"w-4 h-4 text-white"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-slate-900 dark:text-slate-100 text-sm",children:"扫码登录"}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"推荐方式"})]})]}),r.jsxs("button",{onClick:()=>u("password"),className:`flex items-center gap-3 p-4 rounded-md border border-slate-200 dark:border-slate-700 \r
hover:border-blue-300 dark:hover:border-blue-700 hover:bg-blue-50 dark:hover:bg-blue-900/30 transition-colors text-left`,children:[r.jsx("div",{className:"w-10 h-10 rounded-lg bg-slate-100 dark:bg-slate-700 flex items-center justify-center flex-shrink-0",children:r.jsx(cd,{className:"w-4 h-4 text-slate-600 dark:text-slate-300"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-slate-900 dark:text-slate-100 text-sm",children:"账号密码"}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"使用账号和密码"})]})]}),r.jsxs("button",{onClick:()=>u("manual"),className:`flex items-center gap-3 p-4 rounded-md border border-slate-200 dark:border-slate-700 \r
hover:border-blue-300 dark:hover:border-blue-700 hover:bg-blue-50 dark:hover:bg-blue-900/30 transition-colors text-left`,children:[r.jsx("div",{className:"w-10 h-10 rounded-lg bg-slate-100 dark:bg-slate-700 flex items-center justify-center flex-shrink-0",children:r.jsx(pn,{className:"w-4 h-4 text-slate-600 dark:text-slate-300"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-slate-900 dark:text-slate-100 text-sm",children:"手动输入"}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"手动输入Cookie"})]})]})]})})]}),r.jsxs("div",{className:"vben-card",children:[r.jsxs("div",{className:"vben-card-header",children:[r.jsx("h2",{className:"vben-card-title",children:"账号列表"}),r.jsxs("span",{className:"badge-primary",children:[l.length," 个账号"]})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"账号ID"}),r.jsx("th",{children:"关键词"}),r.jsx("th",{children:"状态"}),r.jsx("th",{children:"AI回复"}),r.jsx("th",{children:"自动确认"}),r.jsx("th",{children:"暂停时间"}),r.jsx("th",{children:"操作"})]})}),r.jsx("tbody",{children:l.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:8,children:r.jsx("div",{className:"empty-state py-8",children:r.jsx("p",{className:"text-slate-500 dark:text-slate-400",children:"暂无账号,请添加新账号"})})})}):l.map(I=>r.jsxs("tr",{children:[r.jsx("td",{className:"font-medium text-blue-600 dark:text-blue-400",children:I.id}),r.jsx("td",{children:r.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[r.jsx($t,{className:"w-3.5 h-3.5 text-blue-500"}),r.jsx("span",{className:"font-medium",children:I.keywordCount||0}),r.jsx("span",{className:"text-slate-400",children:"个"})]})}),r.jsx("td",{children:r.jsxs("span",{className:`inline-flex items-center gap-1.5 ${I.enabled!==!1?"text-green-600":"text-gray-400"}`,children:[r.jsx("span",{className:`status-dot ${I.enabled!==!1?"status-dot-success":"status-dot-danger"}`}),I.enabled!==!1?"启用":"禁用"]})}),r.jsx("td",{children:r.jsxs("button",{onClick:()=>Lb(I),className:`inline-flex items-center gap-1.5 px-2 py-1 rounded text-xs font-medium transition-colors ${I.aiEnabled?"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300 hover:bg-purple-200 dark:hover:bg-purple-900/50":"bg-slate-100 text-slate-500 dark:bg-slate-700 dark:text-slate-400 hover:bg-slate-200 dark:hover:bg-slate-600"}`,title:I.aiEnabled?"点击关闭AI回复":"点击开启AI回复",children:[r.jsx(io,{className:"w-3.5 h-3.5"}),I.aiEnabled?"已开启":"已关闭"]})}),r.jsx("td",{children:r.jsx("span",{className:I.auto_confirm?"badge-success":"badge-gray",children:I.auto_confirm?"开启":"关闭"})}),r.jsx("td",{children:r.jsxs("span",{className:"text-slate-600 dark:text-slate-300 text-sm",children:[r.jsx(zp,{className:"w-3.5 h-3.5 inline mr-1"}),I.pause_duration||0," 分钟"]})}),r.jsx("td",{children:r.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[r.jsxs("button",{onClick:()=>Db(I),className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-purple-50 dark:hover:bg-purple-900/30 transition-colors",title:"AI设置",children:[r.jsx(io,{className:"w-3.5 h-3.5 text-purple-500"}),r.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:"AI设置"})]}),r.jsxs("button",{onClick:()=>Rb(I),className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-green-50 dark:hover:bg-green-900/30 transition-colors",title:"默认回复",children:[r.jsx($t,{className:"w-3.5 h-3.5 text-green-500"}),r.jsx("span",{className:"text-green-600 dark:text-green-400",children:"默认回复"})]}),r.jsx("button",{onClick:()=>Pb(I),className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors",title:I.enabled!==!1?"禁用":"启用",children:I.enabled!==!1?r.jsxs(r.Fragment,{children:[r.jsx(Bo,{className:"w-3.5 h-3.5 text-amber-500"}),r.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:"禁用"})]}):r.jsxs(r.Fragment,{children:[r.jsx(hi,{className:"w-3.5 h-3.5 text-green-500"}),r.jsx("span",{className:"text-green-600 dark:text-green-400",children:"启用"})]})}),r.jsxs("button",{onClick:()=>_b(I),className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors",title:"编辑",children:[r.jsx(pn,{className:"w-3.5 h-3.5 text-blue-500"}),r.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:"编辑"})]}),r.jsxs("button",{onClick:()=>Tb(I.id),className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded hover:bg-red-50 dark:hover:bg-red-900/30 transition-colors",title:"删除",children:[r.jsx(Nt,{className:"w-3.5 h-3.5 text-red-500"}),r.jsx("span",{className:"text-red-600 dark:text-red-400",children:"删除"})]})]})})]},I.id))})]})})]}),c==="qrcode"&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-sm",children:[r.jsxs("div",{className:"modal-header",children:[r.jsx("h2",{className:"modal-title",children:"扫码登录"}),r.jsx("button",{onClick:Ve,className:"modal-close",children:r.jsx(He,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"modal-body flex flex-col items-center py-6",children:[p==="loading"&&r.jsxs("div",{className:"flex flex-col items-center gap-3",children:[r.jsx($e,{className:"w-10 h-10 text-blue-600 dark:text-blue-400 animate-spin"}),r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"正在生成二维码..."})]}),p==="ready"&&r.jsxs("div",{className:"flex flex-col items-center gap-3",children:[r.jsx("img",{src:w,alt:"登录二维码",className:"w-44 h-44 rounded-lg border"}),r.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-300",children:"请使用闲鱼APP扫描二维码"}),r.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500",children:"二维码有效期约5分钟"})]}),p==="scanned"&&r.jsxs("div",{className:"flex flex-col items-center gap-3",children:[r.jsx("img",{src:w,alt:"登录二维码",className:"w-44 h-44 rounded-lg border opacity-50"}),r.jsxs("div",{className:" text-blue-600 dark:text-blue-400 text-sm",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),r.jsx("span",{children:"已扫描,等待确认..."})]})]}),p==="success"&&r.jsxs("div",{className:"flex flex-col items-center gap-3 text-green-600",children:[r.jsx("div",{className:"w-14 h-14 rounded-full bg-green-100 flex items-center justify-center",children:r.jsx(hi,{className:"w-7 h-7"})}),r.jsx("p",{className:"font-medium",children:"登录成功!"})]}),p==="expired"&&r.jsxs("div",{className:"flex flex-col items-center gap-3",children:[r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"二维码已过期"}),r.jsx("button",{onClick:ef,className:"btn-ios-primary btn-sm",children:"刷新二维码"})]}),p==="error"&&r.jsxs("div",{className:"flex flex-col items-center gap-3",children:[r.jsx("p",{className:"text-sm text-red-500",children:"生成二维码失败"}),r.jsx("button",{onClick:ef,className:"btn-ios-primary btn-sm",children:"重试"})]})]})]})}),c==="password"&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-sm",children:[r.jsxs("div",{className:"modal-header",children:[r.jsx("h2",{className:"modal-title",children:"账号密码登录"}),r.jsx("button",{onClick:Ve,className:"modal-close",children:r.jsx(He,{className:"w-4 h-4"})})]}),r.jsxs("form",{onSubmit:Cb,children:[r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"账号"}),r.jsx("input",{type:"text",value:S,onChange:I=>E(I.target.value),className:"input-ios",placeholder:"请输入闲鱼账号/手机号",autoFocus:!0})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"密码"}),r.jsx("input",{type:"password",value:N,onChange:I=>L(I.target.value),className:"input-ios",placeholder:"请输入密码"})]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-600 dark:text-slate-300",children:[r.jsx("input",{type:"checkbox",checked:$,onChange:I=>P(I.target.checked),className:"h-4 w-4 rounded border-slate-300 dark:border-slate-600 text-blue-600"}),"显示浏览器(调试用)"]}),r.jsx("p",{className:"input-hint",children:"登录过程可能需要进行人脸验证,请确保手机畅通"})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:Ve,className:"btn-ios-secondary",disabled:R,children:"取消"}),r.jsx("button",{type:"submit",className:"btn-ios-primary",disabled:R,children:R?r.jsxs("span",{className:"",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"登录中..."]}):"登录"})]})]})]})}),c==="manual"&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-md",children:[r.jsxs("div",{className:"modal-header",children:[r.jsx("h2",{className:"modal-title",children:"手动输入Cookie"}),r.jsx("button",{onClick:Ve,className:"modal-close",children:r.jsx(He,{className:"w-4 h-4"})})]}),r.jsxs("form",{onSubmit:Eb,children:[r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"账号ID"}),r.jsx("input",{type:"text",value:D,onChange:I=>z(I.target.value),className:"input-ios",placeholder:"请输入账号ID如手机号或用户名",autoFocus:!0})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"Cookie"}),r.jsx("textarea",{value:H,onChange:I=>O(I.target.value),className:"input-ios h-28 resize-none font-mono text-xs",placeholder:"请粘贴完整的Cookie值"}),r.jsx("p",{className:"input-hint",children:"可从浏览器开发者工具中获取Cookie"})]})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:Ve,className:"btn-ios-secondary",disabled:C,children:"取消"}),r.jsx("button",{type:"submit",className:"btn-ios-primary",disabled:C,children:C?r.jsxs("span",{className:"",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"添加中..."]}):"添加账号"})]})]})]})}),c==="edit"&&B&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-md",children:[r.jsxs("div",{className:"modal-header",children:[r.jsx("h2",{className:"modal-title",children:"编辑账号"}),r.jsx("button",{onClick:Ve,className:"modal-close",children:r.jsx(He,{className:"w-4 h-4"})})]}),r.jsxs("form",{onSubmit:Ab,children:[r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"账号ID"}),r.jsx("input",{type:"text",value:B.id,disabled:!0,className:"input-ios bg-slate-100 dark:bg-slate-700"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"备注"}),r.jsx("input",{type:"text",value:A,onChange:I=>Z(I.target.value),className:"input-ios",placeholder:"添加备注信息"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"Cookie"}),r.jsx("textarea",{value:se,onChange:I=>ce(I.target.value),className:"input-ios h-20 resize-none font-mono text-xs",placeholder:"更新Cookie值"}),r.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:["当前Cookie长度: ",se.length," 字符"]})]}),r.jsxs("div",{className:"flex items-center justify-between py-3 border-t border-slate-100 dark:border-slate-700",children:[r.jsxs("div",{children:[r.jsxs("p",{className:"font-medium text-slate-900 dark:text-slate-100 flex items-center gap-2",children:[r.jsx(Bh,{className:"w-4 h-4 text-green-500"}),"自动确认发货"]}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"开启后系统会自动确认发货"})]}),r.jsx("button",{type:"button",onClick:()=>X(!F),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${F?"bg-blue-600":"bg-slate-300 dark:bg-slate-600"}`,children:r.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${F?"translate-x-6":"translate-x-1"}`})})]}),r.jsxs("div",{className:"input-group",children:[r.jsxs("label",{className:"input-label flex items-center gap-2",children:[r.jsx(zp,{className:"w-4 h-4 text-amber-500"}),"暂停时间(分钟)"]}),r.jsx("input",{type:"number",min:"0",max:"1440",value:Le,onChange:I=>Je(parseInt(I.target.value)||0),className:"input-ios",placeholder:"0"}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"检测到手动发出消息后自动回复暂停的时间。设置为0表示不暂停。"})]}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 pt-2",children:'提示AI回复和默认回复设置请在"自动回复"页面配置'})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:Ve,className:"btn-ios-secondary",disabled:Rt,children:"取消"}),r.jsx("button",{type:"submit",className:"btn-ios-primary",disabled:Rt,children:Rt?r.jsxs("span",{className:"",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"保存中..."]}):"保存"})]})]})]})}),c==="default-reply"&&d&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-lg",children:[r.jsxs("div",{className:"modal-header",children:[r.jsx("h2",{className:"modal-title",children:"默认回复管理"}),r.jsx("button",{onClick:Ve,className:"modal-close",children:r.jsx(He,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"账号"}),r.jsx("input",{type:"text",value:d.id,disabled:!0,className:"input-ios bg-slate-100 dark:bg-slate-700"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"默认回复内容"}),r.jsx("textarea",{value:f,onChange:I=>b(I.target.value),className:"input-ios h-32 resize-none",placeholder:"输入默认回复内容,留空表示不使用默认回复"}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"当没有匹配到任何关键词时,将使用此默认回复。留空表示不自动回复。"})]}),r.jsx("div",{className:"p-3 bg-blue-50 dark:bg-blue-900/20 rounded-lg",children:r.jsxs("p",{className:"text-xs text-blue-600 dark:text-blue-400",children:[r.jsx("strong",{children:"支持变量:"}),r.jsx("br",{}),r.jsx("code",{className:"bg-blue-100 dark:bg-blue-800 px-1 rounded",children:"{send_user_name}"})," - 用户昵称",r.jsx("br",{}),r.jsx("code",{className:"bg-blue-100 dark:bg-blue-800 px-1 rounded",children:"{send_user_id}"})," - 用户ID",r.jsx("br",{}),r.jsx("code",{className:"bg-blue-100 dark:bg-blue-800 px-1 rounded",children:"{send_message}"})," - 用户消息内容"]})})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:Ve,className:"btn-ios-secondary",disabled:g,children:"取消"}),r.jsx("button",{onClick:Mb,className:"btn-ios-primary",disabled:g,children:g?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"保存中..."]}):"保存"})]})]})}),c==="ai-settings"&&fe&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-lg",children:[r.jsxs("div",{className:"modal-header",children:[r.jsx("h2",{className:"modal-title",children:"AI回复设置"}),r.jsx("button",{onClick:Ve,className:"modal-close",children:r.jsx(He,{className:"w-4 h-4"})})]}),r.jsx("div",{className:"modal-body space-y-4",children:Jh?r.jsx("div",{className:"flex items-center justify-center py-8",children:r.jsx($e,{className:"w-6 h-6 animate-spin text-blue-500"})}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"账号"}),r.jsx("input",{type:"text",value:fe.id,disabled:!0,className:"input-ios bg-slate-100 dark:bg-slate-700"})]}),r.jsxs("div",{className:"border-t border-slate-200 dark:border-slate-700 pt-4 mt-2",children:[r.jsx("h3",{className:"text-sm font-medium text-slate-700 dark:text-slate-300 mb-3",children:"议价设置"}),r.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label text-xs",children:"最大折扣(%)"}),r.jsx("input",{type:"number",value:Ai,onChange:I=>Ri(Number(I.target.value)),className:"input-ios",min:"0",max:"100"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label text-xs",children:"最大减价(元)"}),r.jsx("input",{type:"number",value:Mi,onChange:I=>Li(Number(I.target.value)),className:"input-ios",min:"0"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label text-xs",children:"最大议价轮数"}),r.jsx("input",{type:"number",value:G,onChange:I=>me(Number(I.target.value)),className:"input-ios",min:"1",max:"10"})]})]})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"自定义提示词 (JSON格式)"}),r.jsx("textarea",{value:qe,onChange:I=>Ye(I.target.value),className:"input-ios h-32 resize-none font-mono text-xs",placeholder:'{"classify": "分类提示词", "price": "议价提示词", "tech": "技术提示词", "default": "默认提示词"}'}),r.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:["留空使用系统默认提示词。格式:",'{"classify": "...", "price": "...", "tech": "...", "default": "..."}']})]})]})}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:Ve,className:"btn-ios-secondary",disabled:hs,children:"取消"}),r.jsx("button",{onClick:Ob,className:"btn-ios-primary",disabled:hs||Jh,children:hs?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"保存中..."]}):"保存"})]})]})})]})}const pT=async e=>{const t=e?`/items/cookie/${e}`:"/items",s=await ve(t);return{success:!0,data:Array.isArray(s)?s:s.items||[]}},gT=(e,t)=>Ms(`/items/${e}/${t}`),xT=e=>Ms("/items/batch",{data:{items:e}}),yT=(e,t)=>be("/items/get-by-page",{cookie_id:e,page:t||1}),vT=(e,t,s)=>it(`/items/${e}/${t}`,s),bT=async e=>{const t=e?`/cookie/${e}`:"",s=await ve(`/itemReplays${t}`);return{success:!0,data:Array.isArray(s)?s:s.items||[]}},jT=(e,t,s)=>it(`/item-reply/${e}/${t}`,s),wT=(e,t,s)=>it(`/item-reply/${e}/${t}`,s),NT=(e,t)=>Ms(`/item-reply/${e}/${t}`),kT=(e,t,s)=>it(`/items/${e}/${t}/multi-quantity-delivery`,{multi_quantity_delivery:s}),ST=(e,t,s)=>it(`/items/${e}/${t}/multi-spec`,{is_multi_spec:s});function Tt({value:e,onChange:t,options:s,placeholder:n="请选择",disabled:a=!1,className:i}){const[l,o]=y.useState(!1),c=y.useRef(null),u=s.find(h=>h.value===e);y.useEffect(()=>{const h=f=>{c.current&&!c.current.contains(f.target)&&o(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const d=h=>{if(!a)switch(h.key){case"Enter":case" ":h.preventDefault(),o(!l);break;case"Escape":o(!1);break;case"ArrowDown":if(h.preventDefault(),!l)o(!0);else{const f=s.findIndex(g=>g.value===e),b=Math.min(f+1,s.length-1);t(s[b].value)}break;case"ArrowUp":if(h.preventDefault(),l){const f=s.findIndex(g=>g.value===e),b=Math.max(f-1,0);t(s[b].value)}break}};return r.jsxs("div",{ref:c,className:ue("relative",i),children:[r.jsxs("button",{type:"button",onClick:()=>!a&&o(!l),onKeyDown:d,disabled:a,className:ue("w-full flex items-center justify-between gap-2","px-3 py-2 rounded-md text-sm text-left","bg-white dark:bg-slate-700","border border-slate-300 dark:border-slate-600","hover:border-blue-400 dark:hover:border-blue-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-150",a&&"opacity-60 cursor-not-allowed bg-slate-100 dark:bg-slate-800",l&&"ring-2 ring-blue-500 border-transparent"),children:[r.jsx("span",{className:ue("truncate",u?"text-slate-900 dark:text-slate-100":"text-slate-400"),children:(u==null?void 0:u.label)||n}),r.jsx(Tv,{className:ue("w-4 h-4 text-slate-400 flex-shrink-0 transition-transform duration-200",l&&"rotate-180")})]}),l&&r.jsx("div",{className:ue("absolute z-50 w-full mt-1","bg-white dark:bg-slate-800","border border-slate-200 dark:border-slate-700","rounded-md shadow-lg","max-h-60 overflow-auto","animate-in fade-in-0 zoom-in-95 duration-100"),children:s.length===0?r.jsx("div",{className:"px-3 py-2 text-sm text-slate-400 text-center",children:"暂无选项"}):s.map(h=>r.jsxs("button",{type:"button",onClick:()=>{h.disabled||(t(h.value),o(!1))},disabled:h.disabled,className:ue("w-full flex items-center justify-between gap-2","px-3 py-2 text-sm text-left","transition-colors duration-100",h.disabled?"text-slate-400 cursor-not-allowed":"text-slate-700 dark:text-slate-200 hover:bg-blue-50 dark:hover:bg-slate-700",h.value===e&&"bg-blue-50 dark:bg-slate-700 text-blue-600 dark:text-blue-400"),children:[r.jsx("span",{className:"truncate",children:h.label}),h.value===e&&r.jsx(q4,{className:"w-4 h-4 text-blue-500 flex-shrink-0"})]},h.value))})]})}function CT(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState([]),[d,h]=y.useState(""),[f,b]=y.useState(""),[g,v]=y.useState(new Set),[w,x]=y.useState(!1),[m,p]=y.useState({current:0,total:0}),[j,k]=y.useState(null),[S,E]=y.useState(""),[N,L]=y.useState(!1),R=async()=>{if(!(!n||!t||!s))try{i(!0);const A=await pT(d||void 0);A.success&&o(A.data||[])}catch{e({type:"error",message:"加载商品列表失败"})}finally{i(!1)}},W=async()=>{if(!d){e({type:"warning",message:"请先选择账号后再获取商品"});return}x(!0),p({current:0,total:0});try{let A=1,Z=!0,se=0;for(;Z;){p({current:A,total:A});const ce=await yT(d,A);if(ce.success){const F=ce.count||0;se+=F,Z=ce.has_more===!0,A++}else Z=!1;A>20&&(Z=!1)}e({type:"success",message:`成功获取商品 ${se} `}),await R()}catch{e({type:"error",message:"获取商品失败"})}finally{x(!1),p({current:0,total:0})}},$=async()=>{if(!(!n||!t||!s))try{const A=await er();u(A)}catch{}};y.useEffect(()=>{!n||!t||!s||($(),R())},[n,t,s]),y.useEffect(()=>{!n||!t||!s||R()},[n,t,s,d]);const P=async A=>{if(confirm("确定要删除这个商品吗?"))try{await gT(A.cookie_id,A.item_id),e({type:"success",message:"删除成功"}),R()}catch{e({type:"error",message:"删除失败"})}},D=A=>{v(Z=>{const se=new Set(Z);return se.has(A)?se.delete(A):se.add(A),se})},z=()=>{g.size===U.length?v(new Set):v(new Set(U.map(A=>A.id)))},H=async()=>{if(g.size===0){e({type:"warning",message:"请先选择要删除的商品"});return}if(confirm(`确定要删除选中的 ${g.size} 个商品吗`))try{const A=l.filter(Z=>g.has(Z.id)).map(Z=>({cookie_id:Z.cookie_id,item_id:Z.item_id}));await xT(A),e({type:"success",message:`成功删除 ${g.size} 个商品`}),v(new Set),R()}catch{e({type:"error",message:"批量删除失败"})}},O=async A=>{try{const Z=!A.multi_quantity_delivery;await kT(A.cookie_id,A.item_id,Z),e({type:"success",message:`多数量发货已${Z?"开启":"关闭"}`}),R()}catch{e({type:"error",message:"操作失败"})}},C=async A=>{try{const Z=!(A.is_multi_spec||A.has_sku);await ST(A.cookie_id,A.item_id,Z),e({type:"success",message:`多规格已${Z?"开启":"关闭"}`}),R()}catch{e({type:"error",message:"操作失败"})}},_=A=>{k(A),E(A.item_detail||A.desc||"")},B=async()=>{if(j){L(!0);try{await vT(j.cookie_id,j.item_id,{item_detail:S}),e({type:"success",message:"商品详情已更新"}),k(null),R()}catch{e({type:"error",message:"更新失败"})}finally{L(!1)}}},U=l.filter(A=>{var F;if(!f)return!0;const Z=f.toLowerCase(),se=A.item_title||A.title||"",ce=A.item_detail||A.desc||"";return se.toLowerCase().includes(Z)||ce.toLowerCase().includes(Z)||((F=A.item_id)==null?void 0:F.includes(Z))});return a?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"page-header flex-between flex-wrap gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"商品管理"}),r.jsx("p",{className:"page-description",children:"管理各账号的商品信息"})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.size>0&&r.jsxs("button",{onClick:H,className:"btn-ios-danger",children:[r.jsx(Nt,{className:"w-4 h-4"}),"删除选中 (",g.size,")"]}),r.jsx("button",{onClick:W,disabled:w,className:"btn-ios-primary",children:w?r.jsxs(r.Fragment,{children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"抓取中 (第",m.current,"页)"]}):r.jsxs(r.Fragment,{children:[r.jsx(ci,{className:"w-4 h-4"}),"获取商品"]})}),r.jsxs("button",{onClick:R,className:"btn-ios-secondary",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]})]}),r.jsx("div",{className:"vben-card",children:r.jsx("div",{className:"vben-card-body",children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"筛选账号"}),r.jsx(Tt,{value:d,onChange:h,options:[{value:"",label:"所有账号"},...c.map(A=>({value:A.id,label:A.id}))],placeholder:"所有账号"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"搜索商品"}),r.jsxs("div",{className:"relative",children:[r.jsx($h,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),r.jsx("input",{type:"text",value:f,onChange:A=>b(A.target.value),placeholder:"搜索商品标题或详情...",className:"input-ios pl-9"})]})]})]})})}),r.jsxs("div",{className:"vben-card",children:[r.jsxs("div",{className:"vben-card-header",children:[r.jsxs("h2",{className:"vben-card-title ",children:[r.jsx(ud,{className:"w-4 h-4"}),"商品列表"]}),r.jsxs("span",{className:"badge-primary",children:[U.length," 个商品"]})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios min-w-[900px]",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{className:"w-10 whitespace-nowrap",children:r.jsx("button",{onClick:z,className:"p-1 hover:bg-gray-100 rounded",title:g.size===U.length?"取消全选":"全选",children:g.size===U.length&&U.length>0?r.jsx(Vp,{className:"w-4 h-4 text-blue-600 dark:text-blue-400"}):r.jsx($p,{className:"w-4 h-4 text-gray-400"})})}),r.jsx("th",{className:"whitespace-nowrap",children:"账号ID"}),r.jsx("th",{className:"whitespace-nowrap",children:"商品ID"}),r.jsx("th",{className:"whitespace-nowrap",children:"商品标题"}),r.jsx("th",{className:"whitespace-nowrap",children:"价格"}),r.jsx("th",{className:"whitespace-nowrap",children:"多规格"}),r.jsx("th",{className:"whitespace-nowrap",children:"多数量发货"}),r.jsx("th",{className:"whitespace-nowrap",children:"更新时间"}),r.jsx("th",{className:"whitespace-nowrap sticky right-0 bg-slate-50 dark:bg-slate-800",children:"操作"})]})}),r.jsx("tbody",{children:U.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:9,children:r.jsxs("div",{className:"empty-state py-8",children:[r.jsx(ud,{className:"empty-state-icon"}),r.jsx("p",{className:"text-gray-500",children:"暂无商品数据"})]})})}):U.map(A=>r.jsxs("tr",{className:g.has(A.id)?"bg-blue-50 dark:bg-blue-900/30":"",children:[r.jsx("td",{children:r.jsx("button",{onClick:()=>D(A.id),className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded",children:g.has(A.id)?r.jsx(Vp,{className:"w-4 h-4 text-blue-600 dark:text-blue-400"}):r.jsx($p,{className:"w-4 h-4 text-gray-400"})})}),r.jsx("td",{className:"font-medium text-blue-600 dark:text-blue-400",children:A.cookie_id}),r.jsx("td",{className:"text-xs text-gray-500",children:r.jsxs("a",{href:`https://www.goofish.com/item?id=${A.item_id}`,target:"_blank",rel:"noopener noreferrer",className:"hover:text-blue-500 flex items-center gap-1",children:[A.item_id,r.jsx(_v,{className:"w-3 h-3"})]})}),r.jsxs("td",{className:"max-w-[280px]",children:[r.jsx("div",{className:"font-medium line-clamp-2 cursor-help",title:A.item_title||A.title||"-",children:A.item_title||A.title||"-"}),(A.item_detail||A.desc)&&r.jsx("div",{className:"text-xs text-gray-400 line-clamp-1 mt-0.5 cursor-help",title:A.item_detail||A.desc,children:A.item_detail||A.desc})]}),r.jsx("td",{className:"text-amber-600 font-medium",children:A.item_price||(A.price?`¥${A.price}`:"-")}),r.jsx("td",{children:r.jsx("button",{onClick:()=>C(A),className:`px-2 py-1 rounded text-xs font-medium transition-colors ${A.is_multi_spec||A.has_sku?"bg-green-100 text-green-700 hover:bg-green-200 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-500 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-400"}`,title:A.is_multi_spec||A.has_sku?"点击关闭多规格":"点击开启多规格",children:A.is_multi_spec||A.has_sku?"已开启":"已关闭"})}),r.jsx("td",{children:r.jsx("button",{onClick:()=>O(A),className:`px-2 py-1 rounded text-xs font-medium transition-colors ${A.multi_quantity_delivery?"bg-green-100 text-green-700 hover:bg-green-200 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-500 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-400"}`,title:A.multi_quantity_delivery?"点击关闭多数量发货":"点击开启多数量发货",children:A.multi_quantity_delivery?"已开启":"已关闭"})}),r.jsx("td",{className:"text-gray-500 text-xs",children:A.updated_at?new Date(A.updated_at).toLocaleString():"-"}),r.jsx("td",{className:"sticky right-0 bg-white dark:bg-slate-900",children:r.jsxs("div",{className:"flex gap-1",children:[r.jsx("button",{onClick:()=>_(A),className:"table-action-btn hover:!bg-blue-50",title:"编辑",children:r.jsx(pn,{className:"w-4 h-4 text-blue-500"})}),r.jsx("button",{onClick:()=>P(A),className:"table-action-btn hover:!bg-red-50",title:"删除",children:r.jsx(Nt,{className:"w-4 h-4 text-red-500"})})]})})]},A.id))})]})})]}),j&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-lg",children:[r.jsxs("div",{className:"modal-header",children:[r.jsx("h2",{className:"modal-title",children:"编辑商品"}),r.jsx("button",{onClick:()=>k(null),className:"modal-close",children:r.jsx(He,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"商品ID"}),r.jsx("input",{type:"text",value:j.item_id,disabled:!0,className:"input-ios bg-slate-100 dark:bg-slate-700"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"商品标题"}),r.jsx("input",{type:"text",value:j.item_title||j.title||"",disabled:!0,className:"input-ios bg-slate-100 dark:bg-slate-700"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"商品详情"}),r.jsx("textarea",{value:S,onChange:A=>E(A.target.value),className:"input-ios h-32 resize-none",placeholder:"输入商品详情..."})]})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:()=>k(null),className:"btn-ios-secondary",disabled:N,children:"取消"}),r.jsx("button",{onClick:B,className:"btn-ios-primary",disabled:N,children:N?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"保存中..."]}):"保存"})]})]})})]})}const d0={processing:{label:"处理中",class:"badge-warning"},processed:{label:"已处理",class:"badge-info"},shipped:{label:"已发货",class:"badge-success"},completed:{label:"已完成",class:"badge-success"},cancelled:{label:"已关闭",class:"badge-danger"},unknown:{label:"未知",class:"badge-gray"}};function ET(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState([]),[d,h]=y.useState(""),[f,b]=y.useState(""),[g,v]=y.useState(""),w=async()=>{if(!(!n||!t||!s))try{i(!0);const j=await jb(d||void 0,f||void 0);j.success&&o(j.data||[])}catch{e({type:"error",message:"加载订单列表失败"})}finally{i(!1)}},x=async()=>{if(!(!n||!t||!s))try{const j=await er();u(j)}catch{}};y.useEffect(()=>{!n||!t||!s||(x(),w())},[n,t,s]),y.useEffect(()=>{!n||!t||!s||w()},[n,t,s,d,f]);const m=async j=>{if(confirm("确定要删除这个订单吗?"))try{await sT(j),e({type:"success",message:"删除成功"}),w()}catch{e({type:"error",message:"删除失败"})}},p=l.filter(j=>{var S,E,N;if(!g)return!0;const k=g.toLowerCase();return((S=j.order_id)==null?void 0:S.toLowerCase().includes(k))||((E=j.item_id)==null?void 0:E.toLowerCase().includes(k))||((N=j.buyer_id)==null?void 0:N.toLowerCase().includes(k))});return a?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"订单管理"}),r.jsx("p",{className:"page-description",children:"查看和管理所有订单信息"})]}),r.jsxs("button",{onClick:w,className:"btn-ios-secondary w-full sm:w-auto",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]}),r.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"vben-card",children:r.jsx("div",{className:"vben-card-body",children:r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"筛选账号"}),r.jsx(Tt,{value:d,onChange:h,options:[{value:"",label:"所有账号"},...c.map(j=>({value:j.id,label:j.id}))],placeholder:"所有账号"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"订单状态"}),r.jsx(Tt,{value:f,onChange:b,options:[{value:"",label:"所有状态"},{value:"processing",label:"处理中"},{value:"processed",label:"已处理"},{value:"shipped",label:"已发货"},{value:"completed",label:"已完成"},{value:"cancelled",label:"已关闭"}],placeholder:"所有状态"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"搜索订单"}),r.jsxs("div",{className:"relative",children:[r.jsx($h,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),r.jsx("input",{type:"text",value:g,onChange:j=>v(j.target.value),placeholder:"搜索订单ID或商品ID...",className:"input-ios pl-9"})]})]})]})})}),r.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"vben-card",children:[r.jsxs("div",{className:`vben-card-header \r
flex items-center justify-between`,children:[r.jsxs("h2",{className:"vben-card-title ",children:[r.jsx(oo,{className:"w-4 h-4"}),"订单列表"]}),r.jsxs("span",{className:"badge-primary",children:[p.length," 个订单"]})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"订单ID"}),r.jsx("th",{children:"商品ID"}),r.jsx("th",{children:"买家ID"}),r.jsx("th",{children:"数量"}),r.jsx("th",{children:"金额"}),r.jsx("th",{children:"状态"}),r.jsx("th",{children:"账号ID"}),r.jsx("th",{children:"操作"})]})}),r.jsx("tbody",{children:p.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:8,className:"text-center py-8 text-gray-500",children:r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx(oo,{className:"w-12 h-12 text-gray-300"}),r.jsx("p",{children:"暂无订单数据"})]})})}):p.map((j,k)=>{const S=d0[j.status]||d0.unknown;return r.jsxs("tr",{children:[r.jsx("td",{className:"font-mono text-sm",children:j.order_id}),r.jsx("td",{className:"text-sm",children:j.item_id}),r.jsx("td",{className:"text-sm",children:j.buyer_id}),r.jsx("td",{children:j.quantity}),r.jsxs("td",{className:"text-amber-600 font-medium",children:["¥",j.amount]}),r.jsx("td",{children:r.jsx("span",{className:S.class,children:S.label})}),r.jsx("td",{className:"font-medium text-blue-600 dark:text-blue-400",children:j.cookie_id}),r.jsx("td",{children:r.jsx("button",{onClick:()=>m(j.id),className:"p-2 rounded-lg hover:bg-red-50 transition-colors",title:"删除",children:r.jsx(Nt,{className:"w-4 h-4 text-red-500"})})})]},j.id||j.order_id||k)})})]})})]})]})}function PT(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState([]),[d,h]=y.useState(""),[f,b]=y.useState(!1),[g,v]=y.useState(null),[w,x]=y.useState(""),[m,p]=y.useState(""),[j,k]=y.useState(""),[S,E]=y.useState(!1),[N,L]=y.useState(!1),[R,W]=y.useState(!1),[$,P]=y.useState(!1),D=y.useRef(null),[z,H]=y.useState(!1),[O,C]=y.useState(""),[_,B]=y.useState(""),[U,A]=y.useState(null),[Z,se]=y.useState(""),[ce,F]=y.useState(!1),X=y.useRef(null),Le=async()=>{if(!(!n||!t||!s)){if(!d){o([]),i(!1);return}try{i(!0);const G=await ra(d);o(Array.isArray(G)?G:[])}catch{o([]),e({type:"error",message:"加载关键词列表失败"})}finally{i(!1)}}},Je=async()=>{if(!(!n||!t||!s))try{i(!0);const G=await er();u(G),G.length>0?d||h(G[0].id):h("")}catch{}finally{i(!1)}};y.useEffect(()=>{!n||!t||!s||Je()},[n,t,s]),y.useEffect(()=>{!n||!t||!s||d&&Le()},[n,t,s,d]);const Rt=()=>{if(!d){e({type:"warning",message:"请先选择账号"});return}v(null),x(""),p(""),k(""),E(!1),b(!0)},Q=G=>{v(G),x(G.keyword),p(G.reply),k(G.item_id||""),E(!!G.fuzzy_match),b(!0)},fe=async G=>{if(G.preventDefault(),!d){e({type:"warning",message:"请先选择账号"});return}if(!w.trim()){e({type:"warning",message:"请输入关键词"});return}if(!m.trim()){e({type:"warning",message:"请输入回复内容"});return}try{if(L(!0),g){const me=await G5(d,g.keyword,g.item_id||"",{keyword:w.trim(),reply:m.trim(),item_id:j.trim()});if(me.success===!1){e({type:"error",message:me.message||"更新失败"});return}e({type:"success",message:"关键词已更新"})}else{const me=await Q5(d,{keyword:w.trim(),reply:m.trim(),item_id:j.trim()});if(me.success===!1){e({type:"error",message:me.message||"添加失败"});return}e({type:"success",message:"关键词已添加"})}await Le(),b(!1)}catch{e({type:"error",message:"保存关键词失败"})}finally{L(!1)}},Mt=async()=>{if(!d){e({type:"warning",message:"请先选择账号"});return}try{P(!0);const G=await Z5(d),me=window.URL.createObjectURL(G),qe=document.createElement("a"),Ye=new Date().toISOString().split("T")[0];qe.href=me,qe.download=`keywords_${d}_${Ye}.xlsx`,document.body.appendChild(qe),qe.click(),document.body.removeChild(qe),window.URL.revokeObjectURL(me),e({type:"success",message:"关键词导出成功"})}catch{e({type:"error",message:"关键词导出失败"})}finally{P(!1)}},_i=()=>{var G;if(!d){e({type:"warning",message:"请先选择账号"});return}(G=D.current)==null||G.click()},Qo=async G=>{var qe;const me=(qe=G.target.files)==null?void 0:qe[0];if(me)try{W(!0);const Ye=await eT(d,me);if(Ye.success){const hs=Ye.data||{};e({type:"success",message:`导入成功新增 ${hs.added??0} 更新 ${hs.updated??0} `}),await Le()}else e({type:"error",message:Ye.message||"导入失败"})}catch{e({type:"error",message:"导入关键词失败"})}finally{W(!1),G.target.value=""}},Ai=async G=>{if(confirm("确定要删除这个关键词吗?"))try{await X5(d,G.keyword,G.item_id||""),e({type:"success",message:"删除成功"}),Le()}catch{e({type:"error",message:"删除失败"})}},Ri=()=>{if(!d){e({type:"warning",message:"请先选择账号"});return}C(""),B(""),A(null),se(""),H(!0)},Mi=G=>{var Ye;const me=(Ye=G.target.files)==null?void 0:Ye[0];if(!me)return;if(!me.type.startsWith("image/")){e({type:"error",message:"请选择图片文件"});return}if(me.size>5*1024*1024){e({type:"error",message:"图片大小不能超过5MB"});return}A(me);const qe=new FileReader;qe.onload=hs=>{var aa;se((aa=hs.target)==null?void 0:aa.result)},qe.readAsDataURL(me)},Li=async G=>{var me,qe;if(G.preventDefault(),!O.trim()){e({type:"warning",message:"请输入关键词"});return}if(!U){e({type:"warning",message:"请选择图片"});return}F(!0);try{const Ye=await tT(d,O.trim(),U,_.trim()||void 0);Ye&&Ye.keyword?(e({type:"success",message:"图片关键词添加成功"}),H(!1),Le()):e({type:"error",message:"添加失败"})}catch(Ye){e({type:"error",message:((qe=(me=Ye.response)==null?void 0:me.data)==null?void 0:qe.detail)||"添加图片关键词失败"})}finally{F(!1)}};return a&&c.length===0?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"自动回复"}),r.jsx("p",{className:"page-description",children:"管理关键词自动回复规则"})]}),r.jsxs("div",{className:"flex flex-wrap gap-3",children:[r.jsxs("button",{type:"button",onClick:Rt,className:"btn-ios-primary",children:[r.jsx(bn,{className:"w-4 h-4"}),"添加文本关键词"]}),r.jsxs("button",{type:"button",onClick:Ri,className:"btn-ios-primary",children:[r.jsx(Ic,{className:"w-4 h-4"}),"添加图片关键词"]}),r.jsxs("button",{type:"button",onClick:Mt,disabled:!d||$,className:"btn-ios-secondary",children:[r.jsx(ci,{className:"w-4 h-4"}),"导出"]}),r.jsxs("button",{type:"button",onClick:_i,disabled:!d||R,className:"btn-ios-secondary ",children:[r.jsx(hd,{className:"w-4 h-4"}),"导入"]}),r.jsxs("button",{onClick:Le,className:"btn-ios-secondary ",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]}),r.jsx("input",{ref:D,type:"file",accept:".xlsx,.xls",className:"hidden",onChange:Qo})]})]}),r.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"vben-card",children:r.jsx("div",{className:"vben-card-body",children:r.jsxs("div",{className:"max-w-md",children:[r.jsx("label",{className:"input-label",children:"选择账号"}),r.jsx(Tt,{value:d,onChange:h,options:c.length===0?[{value:"",label:"暂无账号"}]:c.map(G=>({value:G.id,label:G.id})),placeholder:"选择账号"})]})})}),r.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.05},className:"vben-card bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800",children:r.jsx("div",{className:"vben-card-body py-3",children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(ui,{className:"w-5 h-5 text-blue-500 flex-shrink-0 mt-0.5"}),r.jsxs("div",{className:"text-sm",children:[r.jsx("p",{className:"font-medium text-blue-700 dark:text-blue-300 mb-1",children:"支持变量替换"}),r.jsxs("div",{className:"text-blue-600 dark:text-blue-400 space-y-0.5",children:[r.jsxs("p",{children:[r.jsx("code",{className:"bg-blue-100 dark:bg-blue-800 px-1 rounded",children:"{send_user_name}"})," - 用户昵称"]}),r.jsxs("p",{children:[r.jsx("code",{className:"bg-blue-100 dark:bg-blue-800 px-1 rounded",children:"{send_user_id}"})," - 用户ID"]}),r.jsxs("p",{children:[r.jsx("code",{className:"bg-blue-100 dark:bg-blue-800 px-1 rounded",children:"{send_message}"})," - 用户消息内容"]})]})]})]})})}),r.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"vben-card",children:[r.jsxs("div",{className:"vben-card-header",children:[r.jsxs("h2",{className:"vben-card-title flex items-center gap-2",children:[r.jsx($t,{className:"w-4 h-4"}),"关键词列表"]}),r.jsxs("span",{className:"badge-primary",children:[l.length," 个关键词"]})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"关键词"}),r.jsx("th",{children:"商品ID"}),r.jsx("th",{children:"回复内容"}),r.jsx("th",{children:"类型"}),r.jsx("th",{children:"操作"})]})}),r.jsx("tbody",{children:d?a?r.jsx("tr",{children:r.jsx("td",{colSpan:5,className:"text-center py-8 text-gray-500",children:"加载中..."})}):l.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:5,className:"text-center py-8 text-gray-500",children:r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx($t,{className:"w-12 h-12 text-gray-300"}),r.jsx("p",{children:"暂无关键词,点击上方按钮添加"})]})})}):l.map((G,me)=>r.jsxs("tr",{children:[r.jsx("td",{className:"font-medium",children:r.jsx("code",{className:"bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 px-2 py-1 rounded",children:G.keyword})}),r.jsx("td",{children:G.item_id?r.jsx("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:G.item_id}):r.jsx("span",{className:"text-xs text-gray-400",children:"通用"})}),r.jsx("td",{className:"max-w-[300px]",children:r.jsx("p",{className:"truncate text-slate-600 dark:text-slate-300",title:G.reply,children:G.reply||r.jsx("span",{className:"text-gray-400",children:"不回复"})})}),r.jsx("td",{children:G.type==="image"?r.jsx("span",{className:"badge-primary",children:"图片"}):r.jsx("span",{className:"badge-gray",children:"文本"})}),r.jsx("td",{children:r.jsxs("div",{className:"",children:[r.jsx("button",{onClick:()=>Q(G),className:"p-2 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors",title:"编辑",children:r.jsx(pn,{className:"w-4 h-4 text-blue-500 dark:text-blue-400"})}),r.jsx("button",{onClick:()=>Ai(G),className:"p-2 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/30 transition-colors",title:"删除",children:r.jsx(Nt,{className:"w-4 h-4 text-red-500"})})]})})]},G.id||`keyword-${me}`)):r.jsx("tr",{children:r.jsx("td",{colSpan:5,className:"text-center py-8 text-gray-500",children:"请先选择一个账号"})})})]})})]}),f&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content",children:[r.jsxs("div",{className:"modal-header flex items-center justify-between",children:[r.jsx("h2",{className:"text-lg font-semibold",children:g?"编辑关键词":"添加关键词"}),r.jsx("button",{type:"button",onClick:()=>b(!1),className:"p-1 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-lg transition-colors",children:r.jsx("svg",{className:"w-5 h-5 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r.jsxs("form",{onSubmit:fe,className:"flex flex-col flex-1 min-h-0",children:[r.jsxs("div",{className:"modal-body space-y-4 overflow-y-auto",children:[r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"所属账号"}),r.jsx("input",{type:"text",value:d,disabled:!0,className:"input-ios bg-slate-100 dark:bg-slate-700 cursor-not-allowed"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"关键词"}),r.jsx("input",{type:"text",value:w,onChange:G=>x(G.target.value),className:"input-ios",placeholder:"请输入关键词"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"商品ID可选"}),r.jsx("input",{type:"text",value:j,onChange:G=>k(G.target.value),className:"input-ios",placeholder:"留空表示通用关键词,填写则仅对该商品生效"}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"绑定商品ID后此关键词仅在该商品对话中生效"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"回复内容"}),r.jsx("textarea",{value:m,onChange:G=>p(G.target.value),className:"input-ios h-28 resize-none",placeholder:"请输入自动回复内容,留空表示不回复"}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"回复内容留空时,匹配到关键词但不会自动回复,可用于屏蔽特定消息"})]}),r.jsxs("div",{className:"flex items-center justify-between pt-2",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-200",children:"使用模糊匹配"}),r.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500 mt-0.5",children:"开启后,将在消息中模糊匹配该关键词"})]}),r.jsx("button",{type:"button",onClick:()=>E(!S),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${S?"bg-blue-600":"bg-slate-300 dark:bg-slate-600"}`,children:r.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${S?"translate-x-6":"translate-x-1"}`})})]})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:()=>b(!1),className:"btn-ios-secondary",disabled:N,children:"取消"}),r.jsx("button",{type:"submit",className:"btn-ios-primary",disabled:N,children:N?"保存中...":"保存"})]})]})]})}),z&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-lg",children:[r.jsxs("div",{className:"modal-header flex items-center justify-between",children:[r.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[r.jsx(Ic,{className:"w-5 h-5 text-blue-500"}),"添加图片关键词"]}),r.jsx("button",{type:"button",onClick:()=>H(!1),className:"p-1 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-lg transition-colors",children:r.jsx("svg",{className:"w-5 h-5 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r.jsxs("form",{onSubmit:Li,className:"flex flex-col flex-1 min-h-0",children:[r.jsxs("div",{className:"modal-body space-y-4 overflow-y-auto",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"input-label",children:["关键词 ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{type:"text",value:O,onChange:G=>C(G.target.value),className:"input-ios",placeholder:"例如:图片、照片"}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"用户发送此关键词时将回复上传的图片"})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"input-label",children:["上传图片 ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("div",{className:"border-2 border-dashed border-slate-300 dark:border-slate-600 rounded-lg p-4 text-center hover:border-blue-400 dark:hover:border-blue-500 transition-colors cursor-pointer",onClick:()=>{var G;return(G=X.current)==null?void 0:G.click()},children:Z?r.jsxs("div",{className:"flex flex-col items-center",children:[r.jsx("img",{src:Z,alt:"预览",className:"max-h-32 rounded-lg mb-2"}),r.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:U==null?void 0:U.name}),r.jsx("p",{className:"text-xs text-blue-500 mt-1",children:"点击更换图片"})]}):r.jsxs("div",{className:"py-4",children:[r.jsx(Ic,{className:"w-10 h-10 text-slate-400 mx-auto mb-2"}),r.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"点击选择图片"}),r.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500 mt-1",children:"支持 JPG、PNG、GIF不超过 5MB"})]})}),r.jsx("input",{ref:X,type:"file",accept:"image/*",className:"hidden",onChange:Mi})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"关联商品(可选)"}),r.jsx("input",{type:"text",value:_,onChange:G=>B(G.target.value),className:"input-ios",placeholder:"留空表示通用关键词"}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"填写商品ID后此关键词仅在该商品对话中生效"})]}),r.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-3",children:r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsx(ui,{className:"w-4 h-4 text-blue-500 mt-0.5 flex-shrink-0"}),r.jsxs("div",{className:"text-sm text-blue-700 dark:text-blue-300",children:[r.jsx("p",{className:"font-medium mb-1",children:"说明:"}),r.jsxs("ul",{className:"list-disc list-inside space-y-0.5 text-xs",children:[r.jsx("li",{children:"图片关键词优先级高于文本关键词"}),r.jsx("li",{children:"用户发送匹配的关键词时,系统将回复上传的图片"}),r.jsx("li",{children:"图片将被转换为适合聊天的格式"})]})]})]})})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:()=>H(!1),className:"btn-ios-secondary",disabled:ce,children:"取消"}),r.jsx("button",{type:"submit",className:"btn-ios-primary",disabled:ce,children:ce?"添加中...":"添加图片关键词"})]})]})]})})]})}function TT(e,t){const s=i=>i.replace(/^v/,"").split(".").map(Number),n=s(e),a=s(t);for(let i=0;i<Math.max(n.length,a.length);i++){const l=n[i]||0,o=a[i]||0;if(l>o)return 1;if(l<o)return-1}return 0}function _T(){const[e,t]=y.useState(null),[s,n]=y.useState("v1.0.4"),[a,i]=y.useState(0),[l,o]=y.useState(null),[c,u]=y.useState(null),[d,h]=y.useState(!1),[f,b]=y.useState(!1),[g,v]=y.useState(!1),[w,x]=y.useState(!1),[m,p]=y.useState([]),[j,k]=y.useState(!1),S=y.useCallback(async(N=!1)=>{b(!0);try{const R=await(await fetch("https://xianyu.zhinianblog.cn/index.php?action=getVersion")).json();if(R.error){N&&console.error("获取版本信息失败:",R.message);return}const W=R.version||R.latest_version;W&&(o(W),u({version:W,date:R.date||R.release_date,changes:R.changes||R.changelog||[],download_url:R.download_url}),TT(W,s)>0?(h(!0),N&&v(!0)):N&&h(!1))}catch(L){console.error("检查更新失败:",L)}finally{b(!1)}},[s]),E=y.useCallback(async()=>{k(!0);try{const L=await(await fetch("https://xianyu.zhinianblog.cn/index.php?action=getChangelog")).json();!L.error&&L.changelog?p(L.changelog):!L.error&&Array.isArray(L)&&p(L)}catch(N){console.error("获取更新日志失败:",N)}finally{k(!1)}},[]);return y.useEffect(()=>{fetch("/static/version.txt").then(N=>N.ok?N.text():null).then(N=>{N&&N.trim().startsWith("v")&&n(N.trim())}).catch(()=>{}),fetch("/project-stats").then(N=>N.ok?N.json():null).then(N=>{N!=null&&N.total_users&&i(N.total_users)}).catch(()=>{}),S(!1)},[S]),r.jsxs("div",{className:"max-w-5xl mx-auto space-y-4",children:[r.jsxs("div",{className:"text-center mb-6",children:[r.jsx("div",{className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-blue-500 to-blue-600 mx-auto mb-4 flex items-center justify-center shadow-md",children:r.jsx($t,{className:"w-8 h-8 text-white"})}),r.jsx("h1",{className:"text-2xl font-bold text-slate-900 dark:text-slate-100",children:"闲鱼自动回复管理系统"}),r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1",children:"智能管理您的闲鱼店铺,提升客服效率"}),r.jsxs("div",{className:"flex items-center justify-center gap-3 mt-3 flex-wrap",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-gradient-to-r from-emerald-500/10 to-teal-500/10 text-emerald-600 dark:from-emerald-500/20 dark:to-teal-500/20 dark:text-emerald-400 border border-emerald-200/50 dark:border-emerald-500/30",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"}),r.jsx("span",{children:s})]}),d&&l&&r.jsxs("button",{onClick:()=>v(!0),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-gradient-to-r from-amber-500/10 to-orange-500/10 text-amber-600 dark:from-amber-500/20 dark:to-orange-500/20 dark:text-amber-400 border border-amber-200/50 dark:border-amber-500/30 hover:from-amber-500/20 hover:to-orange-500/20 transition-all cursor-pointer",children:[r.jsx(Fp,{className:"w-3.5 h-3.5"}),r.jsxs("span",{children:["有更新 ",l]})]}),a>0&&r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-gradient-to-r from-blue-500/10 to-cyan-500/10 text-blue-600 dark:from-blue-500/20 dark:to-cyan-500/20 dark:text-blue-400 border border-blue-200/50 dark:border-blue-500/30",children:[r.jsx(G4,{className:"w-3.5 h-3.5"}),r.jsxs("span",{children:[a.toLocaleString()," 人使用"]})]})]}),r.jsxs("div",{className:"flex items-center justify-center gap-2 mt-3",children:[r.jsxs("button",{onClick:()=>S(!0),disabled:f,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-slate-100 dark:bg-slate-700 text-slate-600 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors disabled:opacity-50",children:[f?r.jsx($e,{className:"w-3.5 h-3.5 animate-spin"}):r.jsx(Xe,{className:"w-3.5 h-3.5"}),r.jsx("span",{children:f?"检查中...":"检查更新"})]}),r.jsxs("button",{onClick:()=>{x(!0),E()},className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-slate-100 dark:bg-slate-700 text-slate-600 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors",children:[r.jsx(Sr,{className:"w-3.5 h-3.5"}),r.jsx("span",{children:"更新日志"})]})]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(di,{className:"w-4 h-4 text-green-500"}),"微信群"]})}),r.jsxs("div",{className:"vben-card-body text-center",children:[r.jsx("div",{className:"w-[160px] h-[160px] mx-auto overflow-hidden rounded-lg border border-slate-200 dark:border-slate-700 cursor-pointer transition-all duration-200 hover:scale-105 hover:shadow-lg hover:border-green-400",onClick:()=>t("/static/wechat-group.png"),children:r.jsx("img",{src:"/static/wechat-group.png",alt:"微信群二维码",className:"w-full h-full object-cover object-center",onError:N=>{N.target.style.display="none";const L=N.target.parentElement;L&&(L.innerHTML='<p class="text-slate-400 dark:text-slate-500 py-12 text-sm">二维码未配置</p>')}})}),r.jsx("p",{className:"mt-3 text-sm text-slate-500 dark:text-slate-400",children:"扫码加入微信技术交流群"})]})]}),r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(qr,{className:"w-4 h-4 text-blue-500"}),"QQ群"]})}),r.jsxs("div",{className:"vben-card-body text-center",children:[r.jsx("div",{className:"w-[160px] h-[160px] mx-auto overflow-hidden rounded-lg border border-slate-200 dark:border-slate-700 cursor-pointer transition-all duration-200 hover:scale-105 hover:shadow-lg hover:border-blue-400",onClick:()=>t("/static/qq-group.png"),children:r.jsx("img",{src:"/static/qq-group.png",alt:"QQ群二维码",className:"w-full h-full object-cover object-center",onError:N=>{N.target.style.display="none";const L=N.target.parentElement;L&&(L.innerHTML='<p class="text-slate-400 dark:text-slate-500 py-12 text-sm">二维码未配置</p>')}})}),r.jsx("p",{className:"mt-3 text-sm text-slate-500 dark:text-slate-400",children:"扫码加入QQ技术交流群"})]})]})]}),r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsx("h2",{className:"vben-card-title",children:"主要功能"})}),r.jsx("div",{className:"vben-card-body",children:r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:[{title:"多账号管理",desc:"同时管理多个账号",icon:oE,color:"text-blue-500"},{title:"智能回复",desc:"关键词自动回复",icon:$t,color:"text-green-500"},{title:"AI 助手",desc:"智能处理复杂问题",icon:io,color:"text-purple-500"},{title:"自动发货",desc:"支持卡密发货",icon:co,color:"text-orange-500"},{title:"消息通知",desc:"多渠道推送",icon:oi,color:"text-pink-500"},{title:"数据统计",desc:"订单商品分析",icon:W4,color:"text-cyan-500"}].map((N,L)=>r.jsxs("div",{className:"p-4 rounded-lg bg-slate-50 dark:bg-slate-800 flex items-center gap-3",children:[r.jsx("div",{className:`w-10 h-10 rounded-lg bg-white dark:bg-slate-700 flex items-center justify-center shadow-sm ${N.color}`,children:r.jsx(N.icon,{className:"w-5 h-5"})}),r.jsxs("div",{className:"text-left",children:[r.jsx("p",{className:"font-medium text-sm text-slate-900 dark:text-slate-100",children:N.title}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:N.desc})]})]},L))})})]}),r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(K4,{className:"w-4 h-4"}),"贡献者"]})}),r.jsx("div",{className:"vben-card-body",children:r.jsxs("div",{className:"flex flex-wrap gap-3",children:[r.jsxs("a",{href:"https://github.com/zhinianboke",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-slate-100 dark:bg-slate-700 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors",children:[r.jsx(rl,{className:"w-4 h-4 text-slate-600 dark:text-slate-300"}),r.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-200",children:"zhinianboke"}),r.jsx("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:"项目作者"})]}),r.jsxs("a",{href:"https://github.com/legeling",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-slate-100 dark:bg-slate-700 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors",children:[r.jsx(rl,{className:"w-4 h-4 text-slate-600 dark:text-slate-300"}),r.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-200",children:"legeling"}),r.jsx("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:"前端重构"})]})]})})]}),r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsx("h2",{className:"vben-card-title",children:"相关链接"})}),r.jsx("div",{className:"vben-card-body",children:r.jsx("div",{className:"flex gap-3",children:r.jsxs("a",{href:"https://github.com/zhinianboke/xianyu-auto-reply",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-gray-900 text-white hover:bg-gray-800 transition-colors text-sm",children:[r.jsx(rl,{className:"w-4 h-4"}),r.jsx("span",{children:"GitHub"})]})})})]}),r.jsxs("div",{className:"text-center py-4 text-slate-500 dark:text-slate-400 text-sm",children:[r.jsxs("p",{className:"flex items-center justify-center gap-1",children:["Made with ",r.jsx(Av,{className:"w-3.5 h-3.5 text-red-500"})," by Open Source Community"]}),r.jsxs("p",{className:"mt-1 text-xs",children:["赞助商:",r.jsx("a",{href:"https://www.hsykj.com",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 dark:text-blue-400 hover:underline ml-1",children:"划算云服务器"})]})]}),e&&r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm",onClick:()=>t(null),children:r.jsxs("div",{className:"relative max-w-[90vw] max-h-[90vh]",children:[r.jsx("button",{onClick:()=>t(null),className:"absolute -top-10 right-0 p-2 text-white hover:text-gray-300 transition-colors",children:r.jsx(He,{className:"w-6 h-6"})}),r.jsx("img",{src:e,alt:"预览",className:"max-w-full max-h-[85vh] rounded-lg shadow-2xl",onClick:N=>N.stopPropagation()})]})}),g&&c&&r.jsx("div",{className:"modal-overlay",onClick:()=>v(!1),children:r.jsxs("div",{className:"modal-content max-w-lg",onClick:N=>N.stopPropagation(),children:[r.jsxs("div",{className:"modal-header",children:[r.jsxs("h2",{className:"modal-title flex items-center gap-2",children:[r.jsx(Fp,{className:"w-5 h-5 text-amber-500"}),"发现新版本"]}),r.jsx("button",{onClick:()=>v(!1),className:"modal-close",children:r.jsx(He,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between p-4 bg-gradient-to-r from-amber-50 to-orange-50 dark:from-amber-900/20 dark:to-orange-900/20 rounded-lg",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"当前版本"}),r.jsx("p",{className:"text-lg font-bold text-slate-700 dark:text-slate-200",children:s})]}),r.jsx("div",{className:"text-2xl text-slate-400",children:"→"}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"最新版本"}),r.jsx("p",{className:"text-lg font-bold text-emerald-600 dark:text-emerald-400",children:c.version})]})]}),c.date&&r.jsxs("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:["发布日期:",c.date]}),c.changes&&c.changes.length>0&&r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"更新内容:"}),r.jsx("ul",{className:"space-y-1.5",children:c.changes.map((N,L)=>r.jsxs("li",{className:"flex items-start gap-2 text-sm text-slate-600 dark:text-slate-400",children:[r.jsx(Bh,{className:"w-4 h-4 text-emerald-500 mt-0.5 flex-shrink-0"}),r.jsx("span",{children:N})]},L))})]}),r.jsx("div",{className:"p-3 bg-blue-50 dark:bg-blue-900/20 rounded-lg",children:r.jsxs("p",{className:"text-xs text-blue-600 dark:text-blue-400",children:[r.jsx("strong",{children:"提示:"}),"请前往 GitHub 下载最新版本,或使用 git pull 更新代码。"]})})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{onClick:()=>v(!1),className:"btn-ios-secondary",children:"稍后再说"}),r.jsxs("a",{href:c.download_url||"https://github.com/zhinianboke/xianyu-auto-reply/releases",target:"_blank",rel:"noopener noreferrer",className:"btn-ios-primary",children:[r.jsx(rl,{className:"w-4 h-4"}),"前往下载"]})]})]})}),w&&r.jsx("div",{className:"modal-overlay",onClick:()=>x(!1),children:r.jsxs("div",{className:"modal-content max-w-2xl max-h-[80vh] flex flex-col",onClick:N=>N.stopPropagation(),children:[r.jsxs("div",{className:"modal-header",children:[r.jsxs("h2",{className:"modal-title flex items-center gap-2",children:[r.jsx(Sr,{className:"w-5 h-5 text-blue-500"}),"更新日志"]}),r.jsx("button",{onClick:()=>x(!1),className:"modal-close",children:r.jsx(He,{className:"w-4 h-4"})})]}),r.jsx("div",{className:"modal-body flex-1 overflow-y-auto",children:j?r.jsx("div",{className:"flex items-center justify-center py-12",children:r.jsx($e,{className:"w-8 h-8 animate-spin text-blue-500"})}):m.length===0?r.jsxs("div",{className:"text-center py-12 text-slate-500 dark:text-slate-400",children:[r.jsx(Sr,{className:"w-12 h-12 mx-auto mb-3 text-slate-300 dark:text-slate-600"}),r.jsx("p",{children:"暂无更新日志"})]}):r.jsx("div",{className:"space-y-4",children:m.map((N,L)=>r.jsxs("div",{className:"p-4 rounded-lg bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("span",{className:"font-medium text-slate-900 dark:text-slate-100",children:N.version}),N.date&&r.jsx("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:N.date})]}),N.changes&&N.changes.length>0&&r.jsx("ul",{className:"space-y-1",children:N.changes.map((R,W)=>r.jsxs("li",{className:"flex items-start gap-2 text-sm text-slate-600 dark:text-slate-400",children:[r.jsx("span",{className:"text-emerald-500 mt-1",children:"•"}),r.jsx("span",{children:R})]},W))})]},L))})}),r.jsx("div",{className:"modal-footer",children:r.jsx("button",{onClick:()=>x(!1),className:"btn-ios-secondary",children:"关闭"})})]})})]})}const wb=async e=>{const t=await ve("/cards");return{success:!0,data:Array.isArray(t)?t:t.cards||[]}},AT=e=>be("/cards",e),h0=(e,t)=>it(`/cards/${e}`,t),RT=e=>Ms(`/cards/${e}`),MT=[{value:"",label:"请选择类型"},{value:"api",label:"API接口"},{value:"text",label:"固定文字"},{value:"data",label:"批量数据"},{value:"image",label:"图片"}],LT=[{value:"GET",label:"GET"},{value:"POST",label:"POST"}],DT={api:"badge-info",text:"badge-success",data:"badge-warning",image:"badge-primary"},OT={api:"API",text:"文本",data:"批量",image:"图片"},IT=[{name:"order_id",desc:"订单编号"},{name:"item_id",desc:"商品编号"},{name:"item_detail",desc:"商品详情"},{name:"order_amount",desc:"订单金额"},{name:"order_quantity",desc:"订单数量"},{name:"spec_name",desc:"规格名称"},{name:"spec_value",desc:"规格值"},{name:"cookie_id",desc:"cookies账号id"},{name:"buyer_id",desc:"买家id"}],f0={name:"",type:"",apiUrl:"",apiMethod:"GET",apiTimeout:10,apiHeaders:"",apiParams:"",textContent:"",dataContent:"",imageFile:null,imageUrl:"",delaySeconds:0,description:"",isMultiSpec:!1,specName:"",specValue:""};function FT(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState(null),[d,h]=y.useState(null),[f,b]=y.useState(f0),[g,v]=y.useState(!1),[w,x]=y.useState(null),m=y.useRef(null),p=async()=>{if(!(!n||!t||!s))try{i(!0);const P=await wb();P.success&&o(P.data||[])}catch{e({type:"error",message:"加载卡券列表失败"})}finally{i(!1)}};y.useEffect(()=>{!n||!t||!s||p()},[n,t,s]);const j=async P=>{if(confirm("确定要删除这张卡券吗?"))try{await RT(String(P)),e({type:"success",message:"删除成功"}),p()}catch{e({type:"error",message:"删除失败"})}},k=async P=>{try{await h0(String(P.id),{enabled:!P.enabled}),e({type:"success",message:P.enabled?"已禁用":"已启用"}),p()}catch{e({type:"error",message:"操作失败"})}},S=P=>{var D,z,H,O,C;h(P.id??null),b({name:P.name||"",type:P.type||"",apiUrl:((D=P.api_config)==null?void 0:D.url)||"",apiMethod:((z=P.api_config)==null?void 0:z.method)||"GET",apiTimeout:((H=P.api_config)==null?void 0:H.timeout)||10,apiHeaders:((O=P.api_config)==null?void 0:O.headers)||"",apiParams:((C=P.api_config)==null?void 0:C.params)||"",textContent:P.text_content||"",dataContent:P.data_content||"",imageFile:null,imageUrl:P.image_url||"",delaySeconds:P.delay_seconds||0,description:P.description||"",isMultiSpec:P.is_multi_spec||!1,specName:P.spec_name||"",specValue:P.spec_value||""}),P.image_url&&x(P.image_url),u("edit")},E=()=>{u(null),h(null),b(f0),x(null),v(!1)},N=(P,D)=>{b(z=>({...z,[P]:D}))},L=P=>{var z;const D=(z=P.target.files)==null?void 0:z[0];if(D){if(D.size>5*1024*1024){e({type:"error",message:"图片大小不能超过5MB"});return}N("imageFile",D);const H=new FileReader;H.onload=O=>{var C;x((C=O.target)==null?void 0:C.result)},H.readAsDataURL(D)}},R=P=>{const D=f.apiParams.trim();let z={};if(D&&D!=="{}")try{z=JSON.parse(D)}catch{}z[P]=`{${P}}`,N("apiParams",JSON.stringify(z,null,2)),e({type:"success",message:`已添加参数 ${P}`})},W=()=>{if(!f.name.trim())return e({type:"warning",message:"请输入卡券名称"}),!1;if(!f.type)return e({type:"warning",message:"请选择卡券类型"}),!1;if(f.type==="api"&&!f.apiUrl.trim())return e({type:"warning",message:"请输入API地址"}),!1;if(f.type==="text"&&!f.textContent.trim())return e({type:"warning",message:"请输入固定文字内容"}),!1;if(f.type==="data"&&!f.dataContent.trim())return e({type:"warning",message:"请输入批量数据"}),!1;if(f.type==="image"&&!f.imageFile&&!f.imageUrl)return e({type:"warning",message:"请选择图片"}),!1;if(f.isMultiSpec&&(!f.specName.trim()||!f.specValue.trim()))return e({type:"warning",message:"多规格卡券必须填写规格名称和规格值"}),!1;if(f.apiHeaders.trim())try{JSON.parse(f.apiHeaders)}catch{return e({type:"warning",message:"请求头格式错误请输入有效的JSON"}),!1}if(f.apiParams.trim())try{JSON.parse(f.apiParams)}catch{return e({type:"warning",message:"请求参数格式错误请输入有效的JSON"}),!1}return!0},$=async P=>{if(P.preventDefault(),!!W()){v(!0);try{let D=f.imageUrl;if(f.type==="image"&&f.imageFile){const H=new FormData;H.append("image",f.imageFile),D=(await be("/upload-image",H,{headers:{"Content-Type":"multipart/form-data"}})).image_url}const z={name:f.name.trim(),type:f.type,description:f.description.trim()||void 0,enabled:!0,delay_seconds:f.delaySeconds,is_multi_spec:f.isMultiSpec,spec_name:f.isMultiSpec?f.specName.trim():void 0,spec_value:f.isMultiSpec?f.specValue.trim():void 0};f.type==="api"?z.api_config={url:f.apiUrl.trim(),method:f.apiMethod,timeout:f.apiTimeout,headers:f.apiHeaders.trim()||void 0,params:f.apiParams.trim()||void 0}:f.type==="text"?z.text_content=f.textContent.trim():f.type==="data"?z.data_content=f.dataContent.trim():f.type==="image"&&(z.image_url=D),d?(await h0(String(d),z),e({type:"success",message:"卡券更新成功"})):(await AT(z),e({type:"success",message:"卡券创建成功"})),E(),p()}catch{e({type:"error",message:d?"更新卡券失败":"创建卡券失败"})}finally{v(!1)}}};return a&&l.length===0?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"page-header flex-between flex-wrap gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"卡券管理"}),r.jsx("p",{className:"page-description",children:"管理自动发货的卡密信息"})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsxs("button",{onClick:()=>u("add"),className:"btn-ios-primary",children:[r.jsx(bn,{className:"w-4 h-4"}),"添加卡券"]}),r.jsxs("button",{onClick:p,className:"btn-ios-secondary",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[r.jsxs("div",{className:"vben-card p-4",children:[r.jsx("div",{className:"text-2xl font-bold text-blue-600",children:l.length}),r.jsx("div",{className:"text-sm text-gray-500",children:"总卡券数"})]}),r.jsxs("div",{className:"vben-card p-4",children:[r.jsx("div",{className:"text-2xl font-bold text-cyan-600",children:l.filter(P=>P.type==="api").length}),r.jsx("div",{className:"text-sm text-gray-500",children:"API类型"})]}),r.jsxs("div",{className:"vben-card p-4",children:[r.jsx("div",{className:"text-2xl font-bold text-green-600",children:l.filter(P=>P.type==="text").length}),r.jsx("div",{className:"text-sm text-gray-500",children:"固定文字"})]}),r.jsxs("div",{className:"vben-card p-4",children:[r.jsx("div",{className:"text-2xl font-bold text-amber-600",children:l.filter(P=>P.type==="data").length}),r.jsx("div",{className:"text-sm text-gray-500",children:"批量数据"})]})]}),r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(Hp,{className:"w-4 h-4"}),"卡券列表"]})}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"名称"}),r.jsx("th",{children:"类型"}),r.jsx("th",{children:"内容预览"}),r.jsx("th",{children:"延时"}),r.jsx("th",{children:"规格"}),r.jsx("th",{children:"状态"}),r.jsx("th",{children:"操作"})]})}),r.jsx("tbody",{children:l.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:7,className:"text-center py-8 text-gray-500",children:r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx(Hp,{className:"w-12 h-12 text-gray-300"}),r.jsx("p",{children:"暂无卡券数据"})]})})}):l.map(P=>{var D,z;return r.jsxs("tr",{children:[r.jsx("td",{className:"font-medium",children:P.name}),r.jsx("td",{children:r.jsx("span",{className:DT[P.type]||"badge-gray",children:OT[P.type]||P.type})}),r.jsx("td",{children:r.jsx("code",{className:"text-xs bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded max-w-[200px] truncate block",children:P.text_content||((D=P.data_content)==null?void 0:D.split(`
`)[0])||((z=P.api_config)==null?void 0:z.url)||P.image_url||"-"})}),r.jsxs("td",{children:[P.delay_seconds||0,"秒"]}),r.jsx("td",{children:P.is_multi_spec?r.jsxs("span",{className:"text-xs text-blue-600",children:[P.spec_name,": ",P.spec_value]}):r.jsx("span",{className:"text-gray-400",children:"-"})}),r.jsx("td",{children:P.enabled?r.jsx("span",{className:"badge-success",children:"启用"}):r.jsx("span",{className:"badge-gray",children:"禁用"})}),r.jsx("td",{children:r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx("button",{onClick:()=>S(P),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",title:"编辑",children:r.jsx(pn,{className:"w-4 h-4 text-blue-500"})}),r.jsx("button",{onClick:()=>k(P),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",title:P.enabled?"禁用":"启用",children:P.enabled?r.jsx(hi,{className:"w-4 h-4 text-green-500"}):r.jsx(Bo,{className:"w-4 h-4 text-gray-400"})}),r.jsx("button",{onClick:()=>P.id&&j(P.id),className:"p-2 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",title:"删除",children:r.jsx(Nt,{className:"w-4 h-4 text-red-500"})})]})})]},P.id)})})]})})]}),c&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-2xl max-h-[90vh] overflow-y-auto",children:[r.jsxs("div",{className:"modal-header flex items-center justify-between sticky top-0 bg-white dark:bg-gray-900 z-10",children:[r.jsx("h2",{className:"text-lg font-semibold",children:d?"编辑卡券":"添加卡券"}),r.jsx("button",{onClick:E,className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg",children:r.jsx(He,{className:"w-4 h-4 text-gray-500"})})]}),r.jsxs("form",{onSubmit:$,children:[r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"input-label",children:["卡券名称 ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{type:"text",value:f.name,onChange:P=>N("name",P.target.value),className:"input-ios",placeholder:"例如:游戏点卡、会员卡等"})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"input-label",children:["卡券类型 ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx(Tt,{value:f.type,onChange:P=>N("type",P),options:MT})]})]}),f.type==="api"&&r.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4 space-y-4",children:[r.jsx("h3",{className:"font-medium text-gray-900 dark:text-white",children:"API配置"}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"API地址"}),r.jsx("input",{type:"url",value:f.apiUrl,onChange:P=>N("apiUrl",P.target.value),className:"input-ios",placeholder:"https://api.example.com/get-card"})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"请求方法"}),r.jsx(Tt,{value:f.apiMethod,onChange:P=>N("apiMethod",P),options:LT})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"超时时间(秒)"}),r.jsx("input",{type:"number",value:f.apiTimeout,onChange:P=>N("apiTimeout",parseInt(P.target.value)||10),className:"input-ios",min:1,max:60})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"请求头 (JSON格式)"}),r.jsx("textarea",{value:f.apiHeaders,onChange:P=>N("apiHeaders",P.target.value),className:"input-ios h-20 font-mono text-sm",placeholder:'{"Authorization": "Bearer token"}'})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"请求参数 (JSON格式)"}),r.jsx("textarea",{value:f.apiParams,onChange:P=>N("apiParams",P.target.value),className:"input-ios h-20 font-mono text-sm",placeholder:'{"type": "card", "count": 1}'}),f.apiMethod==="POST"&&r.jsxs("div",{className:"mt-2 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-lg",children:[r.jsx("p",{className:"text-sm text-blue-600 dark:text-blue-400 mb-2 font-medium",children:"POST请求可用参数点击添加"}),r.jsx("div",{className:"flex flex-wrap gap-2",children:IT.map(P=>r.jsx("button",{type:"button",onClick:()=>R(P.name),className:"px-2 py-1 bg-white dark:bg-gray-800 border border-blue-200 dark:border-blue-800 rounded text-xs hover:bg-blue-100 dark:hover:bg-blue-900/40 transition-colors",title:P.desc,children:r.jsx("code",{children:P.name})},P.name))})]})]})]}),f.type==="text"&&r.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[r.jsx("h3",{className:"font-medium text-gray-900 dark:text-white mb-3",children:"固定文字配置"}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"固定文字内容"}),r.jsx("textarea",{value:f.textContent,onChange:P=>N("textContent",P.target.value),className:"input-ios h-32",placeholder:"请输入要发送的固定文字内容..."})]})]}),f.type==="data"&&r.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[r.jsx("h3",{className:"font-medium text-gray-900 dark:text-white mb-3",children:"批量数据配置"}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"数据内容 (一行一个)"}),r.jsx("textarea",{value:f.dataContent,onChange:P=>N("dataContent",P.target.value),className:"input-ios h-40 font-mono text-sm",placeholder:`请输入数据每行一个
卡号1:密码1
卡号2:密码2
或者
兑换码1
兑换码2`}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"支持格式:卡号:密码 或 单独的兑换码"})]})]}),f.type==="image"&&r.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[r.jsx("h3",{className:"font-medium text-gray-900 dark:text-white mb-3",children:"图片配置"}),r.jsxs("div",{children:[r.jsxs("label",{className:"input-label",children:["选择图片 ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{ref:m,type:"file",onChange:L,accept:"image/*",className:"input-ios"}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"支持JPG、PNG、GIF格式最大5MB"})]}),w&&r.jsxs("div",{className:"mt-3",children:[r.jsx("label",{className:"input-label",children:"图片预览"}),r.jsx("img",{src:w,alt:"预览",className:"max-w-full max-h-48 rounded-lg border border-gray-200 dark:border-gray-700"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"延时发货时间"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("input",{type:"number",value:f.delaySeconds,onChange:P=>N("delaySeconds",parseInt(P.target.value)||0),className:"input-ios w-32",min:0,max:3600}),r.jsx("span",{className:"text-gray-500",children:"秒"})]}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"设置自动发货的延时时间0表示立即发货最大3600秒(1小时)"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"备注信息"}),r.jsx("textarea",{value:f.description,onChange:P=>N("description",P.target.value),className:"input-ios h-20",placeholder:`可选的备注信息支持变量替换
{DELIVERY_CONTENT} - 发货内容`}),r.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["备注内容会与发货内容一起发送。使用 ",r.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"{DELIVERY_CONTENT}"})," 变量可以在备注中插入实际的发货内容。"]})]}),r.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[r.jsx("input",{type:"checkbox",id:"isMultiSpec",checked:f.isMultiSpec,onChange:P=>N("isMultiSpec",P.target.checked),className:"w-4 h-4 rounded border-gray-300"}),r.jsx("label",{htmlFor:"isMultiSpec",className:"font-medium text-gray-900 dark:text-white",children:"多规格卡券"})]}),r.jsx("p",{className:"text-xs text-gray-500 mb-3",children:"开启后可以为同一商品的不同规格创建不同的卡券"}),f.isMultiSpec&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"input-label",children:["规格名称 ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{type:"text",value:f.specName,onChange:P=>N("specName",P.target.value),className:"input-ios",placeholder:"例如:套餐类型、颜色、尺寸"})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"input-label",children:["规格值 ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{type:"text",value:f.specValue,onChange:P=>N("specValue",P.target.value),className:"input-ios",placeholder:"例如30天、红色、XL"})]})]}),r.jsxs("div",{className:"mt-3 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-lg text-sm text-blue-600 dark:text-blue-400",children:[r.jsx("strong",{children:"多规格说明:"}),r.jsxs("ul",{className:"list-disc list-inside mt-1 space-y-1",children:[r.jsx("li",{children:"同一卡券名称可以创建多个不同规格的卡券"}),r.jsx("li",{children:"卡券名称+规格名称+规格值必须唯一"}),r.jsx("li",{children:"自动发货时会优先匹配精确规格,找不到时使用普通卡券兜底"})]})]})]})]})]}),r.jsxs("div",{className:"modal-footer sticky bottom-0 bg-white dark:bg-gray-900",children:[r.jsx("button",{type:"button",onClick:E,className:"btn-ios-secondary",disabled:g,children:"取消"}),r.jsx("button",{type:"submit",className:"btn-ios-primary",disabled:g,children:g?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),d?"更新中...":"创建中..."]}):d?"更新卡券":"保存卡券"})]})]})]})})]})}const VT=async()=>{const e=await ve("/delivery-rules");return{success:!0,data:Array.isArray(e)?e:e.rules||[]}},zT=e=>be("/delivery-rules",e),m0=(e,t)=>it(`/delivery-rules/${e}`,t),UT=e=>Ms(`/delivery-rules/${e}`);function BT(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState([]),[d,h]=y.useState(!1),[f,b]=y.useState(null),[g,v]=y.useState(""),[w,x]=y.useState(""),[m,p]=y.useState(1),[j,k]=y.useState(""),[S,E]=y.useState(!0),[N,L]=y.useState(!1),R=async()=>{if(!(!n||!t||!s))try{i(!0);const C=await VT();C.success&&o(C.data||[])}catch{e({type:"error",message:"加载发货规则失败"})}finally{i(!1)}},W=async()=>{if(!(!n||!t||!s))try{const C=await wb();C.success&&u(C.data||[])}catch{}};y.useEffect(()=>{!n||!t||!s||(W(),R())},[n,t,s]);const $=async C=>{try{await m0(String(C.id),{enabled:!C.enabled}),e({type:"success",message:C.enabled?"规则已禁用":"规则已启用"}),R()}catch{e({type:"error",message:"操作失败"})}},P=async C=>{if(confirm("确定要删除这条规则吗?"))try{await UT(String(C)),e({type:"success",message:"删除成功"}),R()}catch{e({type:"error",message:"删除失败"})}},D=()=>{b(null),v(""),x(""),p(1),k(""),E(!0),h(!0)},z=C=>{b(C),v(C.keyword),x(String(C.card_id)),p(C.delivery_count),k(C.description||""),E(C.enabled),h(!0)},H=()=>{h(!1),b(null)},O=async C=>{if(C.preventDefault(),!g.trim()){e({type:"warning",message:"请输入触发关键词"});return}if(!w){e({type:"warning",message:"请选择卡券"});return}L(!0);try{const _={keyword:g.trim(),card_id:Number(w),delivery_count:m,description:j||void 0,enabled:S};f?(await m0(String(f.id),_),e({type:"success",message:"规则已更新"})):(await zT(_),e({type:"success",message:"规则已添加"})),H(),R()}catch{e({type:"error",message:"保存失败"})}finally{L(!1)}};return a&&l.length===0?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"自动发货"}),r.jsx("p",{className:"page-description",children:"配置商品的自动发货规则"})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:D,className:"btn-ios-primary ",children:[r.jsx(bn,{className:"w-4 h-4"}),"添加规则"]}),r.jsxs("button",{onClick:R,className:"btn-ios-secondary ",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]})]}),r.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"vben-card",children:[r.jsxs("div",{className:`vben-card-header \r
flex items-center justify-between`,children:[r.jsxs("h2",{className:"vben-card-title ",children:[r.jsx(co,{className:"w-4 h-4"}),"发货规则"]}),r.jsxs("span",{className:"badge-primary",children:[l.length," 条规则"]})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"触发关键词"}),r.jsx("th",{children:"关联卡券"}),r.jsx("th",{children:"发货数量"}),r.jsx("th",{children:"已发次数"}),r.jsx("th",{children:"状态"}),r.jsx("th",{children:"操作"})]})}),r.jsx("tbody",{children:l.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:6,className:"text-center py-8 text-gray-500",children:r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx(co,{className:"w-12 h-12 text-gray-300"}),r.jsx("p",{children:"暂无发货规则"})]})})}):l.map(C=>r.jsxs("tr",{children:[r.jsx("td",{className:"font-medium text-blue-600 dark:text-blue-400",children:C.keyword}),r.jsx("td",{className:"text-sm",children:C.card_name||`卡券ID: ${C.card_id}`}),r.jsx("td",{className:"text-center",children:C.delivery_count}),r.jsx("td",{className:"text-center text-slate-500",children:C.delivery_times||0}),r.jsx("td",{children:C.enabled?r.jsx("span",{className:"badge-success",children:"启用"}):r.jsx("span",{className:"badge-danger",children:"禁用"})}),r.jsx("td",{children:r.jsxs("div",{className:"",children:[r.jsx("button",{onClick:()=>$(C),className:"p-2 rounded-lg hover:bg-gray-100 transition-colors",title:C.enabled?"禁用":"启用",children:C.enabled?r.jsx(Bo,{className:"w-4 h-4 text-amber-500"}):r.jsx(hi,{className:"w-4 h-4 text-emerald-500"})}),r.jsx("button",{onClick:()=>z(C),className:"p-2 rounded-lg hover:bg-gray-100 transition-colors",title:"编辑",children:r.jsx(pn,{className:"w-4 h-4 text-blue-500 dark:text-blue-400"})}),r.jsx("button",{onClick:()=>P(C.id),className:"p-2 rounded-lg hover:bg-red-50 transition-colors",title:"删除",children:r.jsx(Nt,{className:"w-4 h-4 text-red-500"})})]})})]},C.id))})]})})]}),d&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-lg",children:[r.jsxs("div",{className:"modal-header flex items-center justify-between",children:[r.jsx("h2",{className:"text-lg font-semibold",children:f?"编辑发货规则":"添加发货规则"}),r.jsx("button",{onClick:H,className:"p-1 hover:bg-gray-100 rounded-lg",children:r.jsx(He,{className:"w-4 h-4 text-gray-500"})})]}),r.jsxs("form",{onSubmit:O,children:[r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"触发关键词 *"}),r.jsx("input",{type:"text",value:g,onChange:C=>v(C.target.value),className:"input-ios",placeholder:"输入触发自动发货的关键词",required:!0})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"关联卡券 *"}),r.jsx(Tt,{value:w,onChange:x,options:[{value:"",label:"请选择卡券"},...c.map(C=>{var _;return{value:String(C.id),label:C.name||((_=C.text_content)==null?void 0:_.substring(0,20))||`卡券 ${C.id}`}})],placeholder:"请选择卡券"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"发货数量"}),r.jsx("input",{type:"number",value:m,onChange:C=>p(Number(C.target.value)||1),className:"input-ios",min:1,placeholder:"每次发货的卡密数量"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"描述(可选)"}),r.jsx("textarea",{value:j,onChange:C=>k(C.target.value),className:"input-ios h-20 resize-none",placeholder:"规则描述,方便识别"})]}),r.jsxs("div",{className:"flex items-center justify-between pt-2",children:[r.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-200",children:"启用此规则"}),r.jsx("button",{type:"button",onClick:()=>E(!S),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${S?"bg-blue-600":"bg-slate-300 dark:bg-slate-600"}`,children:r.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${S?"translate-x-6":"translate-x-1"}`})})]})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:H,className:"btn-ios-secondary",disabled:N,children:"取消"}),r.jsx("button",{type:"submit",className:"btn-ios-primary",disabled:N,children:N?r.jsxs("span",{className:"",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"保存中..."]}):"保存"})]})]})]})})]})}const Nb=e=>{if(typeof e=="string")return e;if(e&&typeof e=="object")try{return JSON.stringify(e)}catch{return"{}"}return"{}"},kb=async()=>({success:!0,data:(await ve("/notification-channels")||[]).map(s=>{let n;if(s.config)if(typeof s.config=="string")try{n=JSON.parse(s.config)}catch{n=void 0}else typeof s.config=="object"&&(n=s.config);return{id:String(s.id),name:s.name,type:s.type,config:n,enabled:s.enabled,created_at:s.created_at,updated_at:s.updated_at}})}),$T=e=>{const t={...e,config:Nb(e.config)};return be("/notification-channels",t)},p0=(e,t)=>{const s={...t};return"config"in t&&(s.config=Nb(t.config)),it(`/notification-channels/${e}`,s)},HT=e=>Ms(`/notification-channels/${e}`),WT=async e=>({success:!1,message:"通知渠道测试功能暂未实现"}),qT=async()=>{const e=await ve("/message-notifications"),t=[];for(const[s,n]of Object.entries(e||{}))if(Array.isArray(n))for(const a of n)t.push({cookie_id:s,channel_id:a.channel_id,channel_name:a.channel_name,enabled:a.enabled});return{success:!0,data:t}},Bc=(e,t,s)=>be(`/message-notifications/${e}`,{channel_id:t,enabled:s}),Nl=[{type:"dingtalk",label:"钉钉通知",desc:"钉钉机器人消息",icon:oi,placeholder:'{"webhook_url": "https://oapi.dingtalk.com/robot/send?access_token=..."}'},{type:"feishu",label:"飞书通知",desc:"飞书机器人消息",icon:dd,placeholder:'{"webhook_url": "https://open.feishu.cn/open-apis/bot/v2/hook/..."}'},{type:"bark",label:"Bark通知",desc:"iOS推送通知",icon:iE,placeholder:'{"device_key": "xxx", "server_url": "https://api.day.app"}'},{type:"email",label:"邮件通知",desc:"SMTP邮件发送",icon:Kn,placeholder:'{"smtp_server": "...", "smtp_port": 587, "email_user": "...", "email_password": "...", "recipient_email": "..."}'},{type:"webhook",label:"Webhook",desc:"自定义HTTP请求",icon:Y4,placeholder:'{"webhook_url": "https://..."}'},{type:"wechat",label:"微信通知",desc:"企业微信机器人",icon:di,placeholder:'{"webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=..."}'},{type:"telegram",label:"Telegram",desc:"Telegram机器人",icon:dd,placeholder:'{"bot_token": "...", "chat_id": "..."}'}],$c=Object.fromEntries(Nl.map(e=>[e.type,e.label]));function KT(){var H;const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState(!1),[d,h]=y.useState(null),[f,b]=y.useState(null),[g,v]=y.useState(""),[w,x]=y.useState(""),[m,p]=y.useState(!0),[j,k]=y.useState(!1),S=async()=>{var O;if(!n||!t||!s){i(!1);return}try{i(!0);const C=await kb();C.success&&o(C.data||[])}catch(C){if(C&&typeof C=="object"&&"response"in C&&((O=C.response)==null?void 0:O.status)===401)return;e({type:"error",message:"加载通知渠道失败"})}finally{i(!1)}};y.useEffect(()=>{if(n){if(!t||!s){i(!1);return}S()}},[n,t,s]);const E=O=>l.find(C=>C.type===O),N=async O=>{try{await p0(O.id,{name:O.name,config:O.config,enabled:!O.enabled}),e({type:"success",message:O.enabled?"渠道已禁用":"渠道已启用"}),S()}catch{e({type:"error",message:"操作失败"})}},L=async O=>{try{const C=await WT(O);C.success?e({type:"success",message:"测试消息发送成功"}):e({type:"error",message:C.message||"测试失败"})}catch{e({type:"error",message:"测试失败"})}},R=async O=>{if(confirm("确定要删除这个通知渠道吗?"))try{await HT(O),e({type:"success",message:"删除成功"}),S()}catch{e({type:"error",message:"删除失败"})}},W=O=>{const C=Nl.find(_=>_.type===O);b(O),h(null),v((C==null?void 0:C.label)||""),x(""),p(!0),u(!0)},$=O=>{b(O.type),h(O),v(O.name),x(JSON.stringify(O.config||{},null,2)),p(O.enabled),u(!0)},P=()=>{u(!1),h(null),b(null)},D=async O=>{if(O.preventDefault(),!g.trim()){e({type:"warning",message:"请输入渠道名称"});return}if(f){k(!0);try{let C={};if(w.trim())try{C=JSON.parse(w)}catch{e({type:"error",message:"配置JSON格式错误"}),k(!1);return}const _={name:g.trim(),type:f,config:C,enabled:m};d?(await p0(d.id,_),e({type:"success",message:"渠道已更新"})):(await $T(_),e({type:"success",message:"渠道已添加"})),P(),S()}catch{e({type:"error",message:"保存失败"})}finally{k(!1)}}},z=O=>{switch(O){case"bark":return"Bark是iOS推送通知服务需要填写设备密钥";case"dingtalk":return"请设置钉钉机器人Webhook URL可选填加签密钥";case"feishu":return"请设置飞书机器人Webhook URL";case"email":return"需要填写SMTP服务器、端口、发送邮箱、密码和接收邮箱";case"wechat":return"请设置企业微信机器人Webhook URL";case"telegram":return"需要填写Bot Token和Chat ID";case"webhook":return"填写自定义Webhook URL";default:return""}};return a?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"通知渠道"}),r.jsx("p",{className:"page-description",children:"管理消息通知渠道支持QQ通知等多种方式"})]}),r.jsxs("button",{onClick:S,className:"btn-ios-secondary",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]}),r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(Hh,{className:"w-4 h-4"}),"选择通知方式"]})}),r.jsxs("div",{className:"vben-card-body",children:[r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mb-4",children:"点击下方按钮选择您要配置的通知渠道类型"}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:Nl.map((O,C)=>{const _=E(O.type),B=O.icon;return r.jsx(oe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:C*.03},className:`relative p-4 rounded-xl border-2 transition-all ${_?_.enabled?"border-blue-200 dark:border-blue-800 bg-blue-50/50 dark:bg-blue-900/20":"border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50":"border-slate-200 dark:border-slate-700 hover:border-blue-300 dark:hover:border-blue-600"}`,children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:`w-10 h-10 mx-auto mb-2 rounded-lg flex items-center justify-center ${_!=null&&_.enabled?"bg-blue-100 dark:bg-blue-900/50 text-blue-600 dark:text-blue-400":"bg-slate-100 dark:bg-slate-700 text-slate-500"}`,children:r.jsx(B,{className:"w-5 h-5"})}),r.jsx("h3",{className:"font-medium text-slate-900 dark:text-slate-100 text-sm",children:O.label}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-0.5",children:O.desc}),_?r.jsxs("div",{className:"mt-3 flex items-center justify-center gap-1",children:[r.jsx("button",{onClick:()=>$(_),className:"text-xs px-2 py-1 rounded bg-blue-100 dark:bg-blue-900/50 text-blue-600 dark:text-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800",children:"编辑"}),r.jsx("button",{onClick:()=>N(_),className:`text-xs px-2 py-1 rounded ${_.enabled?"bg-green-100 dark:bg-green-900/50 text-green-600 dark:text-green-400":"bg-slate-100 dark:bg-slate-700 text-slate-500"}`,children:_.enabled?"已启用":"已禁用"})]}):r.jsxs("button",{onClick:()=>W(O.type),className:"mt-3 text-xs px-3 py-1 rounded border border-blue-300 dark:border-blue-600 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/30",children:[r.jsx(bn,{className:"w-3 h-3 inline mr-1"}),"配置"]})]})},O.type)})})]})]}),l.length>0&&r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(oi,{className:"w-4 h-4"}),"已配置渠道"]})}),r.jsx("div",{className:"vben-card-body",children:r.jsx("div",{className:"divide-y divide-slate-100 dark:divide-slate-700",children:l.map(O=>r.jsxs("div",{className:"flex items-center justify-between py-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center ${O.enabled?"bg-blue-100 dark:bg-blue-900/50 text-blue-600":"bg-slate-100 dark:bg-slate-700 text-slate-500"}`,children:r.jsx(oi,{className:"w-4 h-4"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-slate-900 dark:text-slate-100",children:O.name}),r.jsx("p",{className:"text-xs text-slate-500",children:$c[O.type]||O.type})]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:`text-xs px-2 py-0.5 rounded ${O.enabled?"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-400":"bg-slate-100 text-slate-500 dark:bg-slate-700"}`,children:O.enabled?"启用":"禁用"}),r.jsx("button",{onClick:()=>L(O.id),className:"p-1.5 rounded hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-500",title:"测试",children:r.jsx(dd,{className:"w-4 h-4"})}),r.jsx("button",{onClick:()=>$(O),className:"p-1.5 rounded hover:bg-slate-100 dark:hover:bg-slate-700 text-slate-500",title:"编辑",children:r.jsx(pn,{className:"w-4 h-4"})}),r.jsx("button",{onClick:()=>R(O.id),className:"p-1.5 rounded hover:bg-red-50 dark:hover:bg-red-900/30 text-red-500",title:"删除",children:r.jsx(Nt,{className:"w-4 h-4"})})]})]},O.id))})})]}),c&&f&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-lg",children:[r.jsxs("div",{className:"modal-header flex items-center justify-between",children:[r.jsxs("h2",{className:"text-lg font-semibold",children:[d?"编辑":"配置",$c[f]]}),r.jsx("button",{onClick:P,className:"p-1 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-lg",children:r.jsx(He,{className:"w-4 h-4 text-slate-500"})})]}),r.jsxs("form",{onSubmit:D,children:[r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"渠道名称"}),r.jsx("input",{type:"text",value:g,onChange:O=>v(O.target.value),className:"input-ios",placeholder:`我的${$c[f]}`})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"配置 (JSON)"}),r.jsx("textarea",{value:w,onChange:O=>x(O.target.value),className:"input-ios h-32 resize-none font-mono text-sm",placeholder:(H=Nl.find(O=>O.type===f))==null?void 0:H.placeholder}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:z(f)})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-200",children:"启用此渠道"}),r.jsx("button",{type:"button",onClick:()=>p(!m),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${m?"bg-blue-600":"bg-slate-300 dark:bg-slate-600"}`,children:r.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${m?"translate-x-6":"translate-x-1"}`})})]})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:P,className:"btn-ios-secondary",disabled:j,children:"取消"}),r.jsx("button",{type:"submit",className:"btn-ios-primary",disabled:j,children:j?r.jsxs(r.Fragment,{children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"保存中..."]}):"保存"})]})]})]})})]})}function QT(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState([]),[d,h]=y.useState([]),[f,b]=y.useState(!1),[g,v]=y.useState(""),[w,x]=y.useState(""),[m,p]=y.useState(!0),[j,k]=y.useState(!1),S=async()=>{if(!(!n||!t||!s))try{i(!0);const D=await qT();D.success&&o(D.data||[])}catch{e({type:"error",message:"加载消息通知失败"})}finally{i(!1)}},E=async()=>{if(!(!n||!t||!s))try{const D=await kb();D.success&&u(D.data||[])}catch{}},N=async()=>{if(!(!n||!t||!s))try{const D=await er();h(D)}catch{}};y.useEffect(()=>{!n||!t||!s||(E(),N(),S())},[n,t,s]);const L=async D=>{try{await Bc(D.cookie_id,D.channel_id,!D.enabled),e({type:"success",message:D.enabled?"通知已禁用":"通知已启用"}),S()}catch{e({type:"error",message:"操作失败"})}},R=async D=>{if(confirm("确定要删除这个消息通知吗?"))try{await Bc(D.cookie_id,D.channel_id,!1),e({type:"success",message:"通知已禁用"}),S()}catch{e({type:"error",message:"操作失败"})}},W=()=>{v(""),x(""),p(!0),b(!0)},$=()=>{b(!1)},P=async D=>{if(D.preventDefault(),!g){e({type:"warning",message:"请选择账号"});return}if(!w){e({type:"warning",message:"请选择通知渠道"});return}k(!0);try{await Bc(g,Number(w),m),e({type:"success",message:"通知已添加"}),$(),S()}catch{e({type:"error",message:"保存失败"})}finally{k(!1)}};return a?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"消息通知"}),r.jsx("p",{className:"page-description",children:"配置关键词触发的消息通知"})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:W,className:"btn-ios-primary ",children:[r.jsx(bn,{className:"w-4 h-4"}),"添加通知"]}),r.jsxs("button",{onClick:S,className:"btn-ios-secondary ",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]})]}),r.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"vben-card",children:[r.jsxs("div",{className:`vben-card-header \r
flex items-center justify-between`,children:[r.jsxs("h2",{className:"vben-card-title ",children:[r.jsx(Kn,{className:"w-4 h-4"}),"通知规则"]}),r.jsxs("span",{className:"badge-primary",children:[l.length," 条规则"]})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"账号ID"}),r.jsx("th",{children:"通知渠道"}),r.jsx("th",{children:"状态"}),r.jsx("th",{children:"操作"})]})}),r.jsx("tbody",{children:l.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:4,className:"text-center py-8 text-gray-500",children:r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx(Kn,{className:"w-12 h-12 text-gray-300"}),r.jsx("p",{children:"暂无消息通知配置"})]})})}):l.map(D=>r.jsxs("tr",{children:[r.jsx("td",{className:"font-medium text-blue-600 dark:text-blue-400",children:D.cookie_id}),r.jsx("td",{className:"text-sm",children:D.channel_name||`渠道 ${D.channel_id}`}),r.jsx("td",{children:D.enabled?r.jsx("span",{className:"badge-success",children:"启用"}):r.jsx("span",{className:"badge-danger",children:"禁用"})}),r.jsx("td",{children:r.jsxs("div",{className:"flex gap-1",children:[r.jsx("button",{onClick:()=>L(D),className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-slate-700 transition-colors",title:D.enabled?"禁用":"启用",children:D.enabled?r.jsx(Bo,{className:"w-4 h-4 text-amber-500"}):r.jsx(hi,{className:"w-4 h-4 text-emerald-500"})}),r.jsx("button",{onClick:()=>R(D),className:"p-2 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",title:"删除",children:r.jsx(Nt,{className:"w-4 h-4 text-red-500"})})]})})]},`${D.cookie_id}-${D.channel_id}`))})]})})]}),f&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-md",children:[r.jsxs("div",{className:"modal-header flex items-center justify-between",children:[r.jsx("h2",{className:"text-lg font-semibold",children:"添加消息通知"}),r.jsx("button",{onClick:$,className:"p-1 hover:bg-gray-100 dark:hover:bg-slate-700 rounded-lg",children:r.jsx(He,{className:"w-4 h-4 text-gray-500"})})]}),r.jsxs("form",{onSubmit:P,children:[r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"选择账号 *"}),r.jsx(Tt,{value:g,onChange:v,options:[{value:"",label:"请选择账号"},...d.map(D=>({value:D.id,label:D.id}))],placeholder:"请选择账号"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"选择通知渠道 *"}),r.jsx(Tt,{value:w,onChange:x,options:[{value:"",label:"请选择通知渠道"},...c.map(D=>({value:String(D.id),label:D.name||D.channel_name||`渠道 ${D.id}`}))],placeholder:"请选择通知渠道"})]}),r.jsxs("div",{className:"flex items-center justify-between pt-2",children:[r.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-200",children:"启用此通知"}),r.jsx("button",{type:"button",onClick:()=>p(!m),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${m?"bg-blue-600":"bg-slate-300 dark:bg-slate-600"}`,children:r.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${m?"translate-x-6":"translate-x-1"}`})})]})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:$,className:"btn-ios-secondary",disabled:j,children:"取消"}),r.jsx("button",{type:"submit",className:"btn-ios-primary",disabled:j,children:j?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"保存中..."]}):"保存"})]})]})]})})]})}const GT=async()=>{const e=await ve("/system-settings"),t=["registration_enabled","show_default_login_info","login_captcha_enabled","smtp_use_tls","smtp_use_ssl"],s={};for(const[n,a]of Object.entries(e))t.includes(n)?s[n]=a===!0||a==="true":s[n]=a;return{success:!0,data:s}},XT=async e=>{const t=Object.entries(e).filter(([,s])=>s!=null).map(([s,n])=>{let a;return typeof n=="boolean"?a=n?"true":"false":typeof n=="number"?a=String(n):a=String(n??""),it(`/system-settings/${s}`,{value:a})});try{return await Promise.all(t),{success:!0,message:"设置已保存"}}catch(s){return console.error("保存设置失败:",s),{success:!1,message:"保存设置失败"}}},JT=async e=>{var t,s,n,a;if(!e)return{success:!1,message:"请先选择一个账号进行测试"};try{const i=await be(`/ai-reply-test/${e}`,{message:"你好,这是一条测试消息"});return i.reply?{success:!0,message:`AI 回复: ${i.reply}`}:{success:i.success??!0,message:i.message||"AI 连接测试成功"}}catch(i){const l=i;return{success:!1,message:((s=(t=l.response)==null?void 0:t.data)==null?void 0:s.detail)||((a=(n=l.response)==null?void 0:n.data)==null?void 0:a.message)||"AI 连接测试失败"}}},YT=async e=>({success:!1,message:"邮件测试功能暂未实现,请检查 SMTP 配置后直接保存"}),ZT=async e=>be("/change-admin-password",e),e_=()=>`/admin/backup/download?token=${localStorage.getItem("auth_token")}`,t_=async e=>{const t=new FormData;return t.append("backup_file",e),be("/admin/backup/upload",t)},s_=async()=>be("/admin/reload-cache"),n_=()=>`/backup/export?token=${localStorage.getItem("auth_token")}`,r_=async e=>{const t=new FormData;return t.append("file",e),be("/backup/import",t)};function a_(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n,user:a}=Re(),[i,l]=y.useState(!0),[o,c]=y.useState(!1),[u,d]=y.useState(null),[h,f]=y.useState(""),[b,g]=y.useState(""),[v,w]=y.useState(""),[x,m]=y.useState(!1),[p,j]=y.useState(!1),[k,S]=y.useState(!1),E=y.useRef(null),N=y.useRef(null),[L,R]=y.useState([]),[W,$]=y.useState(""),[P,D]=y.useState(!1),z=async()=>{if(!(!n||!t||!s))try{l(!0);const F=await GT();F.success&&F.data&&d(F.data)}catch{e({type:"error",message:"加载系统设置失败"})}finally{l(!1)}};y.useEffect(()=>{!n||!t||!s||z()},[n,t,s]);const H=async()=>{if(u)try{c(!0);const F=await XT(u);F.success?e({type:"success",message:"设置保存成功"}):e({type:"error",message:F.message||"保存失败"})}catch{e({type:"error",message:"保存设置失败"})}finally{c(!1)}},O=async()=>{try{const F=await er();R(F),F.length>0&&!W&&$(F[0].id)}catch{}};y.useEffect(()=>{n&&t&&s&&O()},[n,t,s]);const C=async()=>{if(!W){e({type:"warning",message:"请先选择一个账号"});return}D(!0);try{const F=await JT(W);F.success?e({type:"success",message:F.message||"AI 连接测试成功"}):e({type:"error",message:F.message||"AI 连接测试失败"})}catch{e({type:"error",message:"AI 连接测试失败"})}finally{D(!1)}},_=async()=>{const F=prompt("请输入测试邮箱地址:");if(F)try{const X=await YT(F);X.success?e({type:"success",message:"测试邮件发送成功"}):e({type:"error",message:X.message||"发送测试邮件失败"})}catch{e({type:"error",message:"发送测试邮件失败"})}},B=async()=>{if(!h){e({type:"warning",message:"请输入当前密码"});return}if(!b){e({type:"warning",message:"请输入新密码"});return}if(b!==v){e({type:"warning",message:"两次输入的密码不一致"});return}if(b.length<6){e({type:"warning",message:"新密码长度不能少于6位"});return}try{m(!0);const F=await ZT({current_password:h,new_password:b});F.success?(e({type:"success",message:"密码修改成功"}),f(""),g(""),w("")):e({type:"error",message:F.message||"密码修改失败"})}catch{e({type:"error",message:"密码修改失败"})}finally{m(!1)}},U=()=>{const F=e_();window.open(F,"_blank")},A=async F=>{var Le;const X=(Le=F.target.files)==null?void 0:Le[0];if(X){if(!X.name.endsWith(".db")){e({type:"error",message:"只支持 .db 格式的数据库文件"});return}if(!confirm("警告:恢复数据库将覆盖所有当前数据!确定要继续吗?")){F.target.value="";return}try{j(!0);const Je=await t_(X);Je.success?e({type:"success",message:"数据库恢复成功"}):e({type:"error",message:Je.message||"数据库恢复失败"})}catch{e({type:"error",message:"数据库恢复失败"})}finally{j(!1),F.target.value=""}}},Z=async()=>{try{S(!0);const F=await s_();F.success?e({type:"success",message:"系统缓存已刷新"}):e({type:"error",message:F.message||"刷新缓存失败"})}catch{e({type:"error",message:"刷新缓存失败"})}finally{S(!1)}},se=()=>{const F=n_();window.open(F,"_blank")},ce=async F=>{var Le;const X=(Le=F.target.files)==null?void 0:Le[0];if(X){if(!X.name.endsWith(".json")){e({type:"error",message:"只支持 .json 格式的备份文件"});return}try{const Je=await r_(X);Je.success?e({type:"success",message:"备份导入成功"}):e({type:"error",message:Je.message||"备份导入失败"})}catch{e({type:"error",message:"备份导入失败"})}finally{F.target.value=""}}};return i?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"page-header flex-between flex-wrap gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"系统设置"}),r.jsx("p",{className:"page-description",children:"配置系统全局设置"})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("button",{onClick:z,className:"btn-ios-secondary",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]}),r.jsxs("button",{onClick:H,disabled:o,className:"btn-ios-primary",children:[o?r.jsx(Jt,{}):r.jsx(aE,{className:"w-4 h-4"}),"保存设置"]})]})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(Hh,{className:"w-4 h-4"}),"基础设置"]})}),r.jsxs("div",{className:"vben-card-body space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-slate-100 dark:border-slate-700",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-slate-900 dark:text-slate-100",children:"允许用户注册"}),r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"开启后允许新用户注册账号"})]}),r.jsxs("label",{className:"switch-ios",children:[r.jsx("input",{type:"checkbox",checked:!!((u==null?void 0:u.registration_enabled)??!1),onChange:F=>d(X=>X?{...X,registration_enabled:F.target.checked}:null)}),r.jsx("span",{className:"switch-slider"})]})]}),r.jsxs("div",{className:"flex items-center justify-between py-3",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-slate-900 dark:text-slate-100",children:"显示默认登录信息"}),r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"登录页面显示默认账号密码提示"})]}),r.jsxs("label",{className:"switch-ios",children:[r.jsx("input",{type:"checkbox",checked:!!((u==null?void 0:u.show_default_login_info)??!1),onChange:F=>d(X=>X?{...X,show_default_login_info:F.target.checked}:null)}),r.jsx("span",{className:"switch-slider"})]})]})]})]}),r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(io,{className:"w-4 h-4"}),"AI 设置"]})}),r.jsxs("div",{className:"vben-card-body space-y-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"API 地址"}),r.jsx("input",{type:"text",value:(u==null?void 0:u.ai_api_url)||"https://dashscope.aliyuncs.com/compatible-mode/v1",onChange:F=>d(X=>X?{...X,ai_api_url:F.target.value}:null),className:"input-ios"}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"无需补全 /chat/completions"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"API Key"}),r.jsx("input",{type:"password",value:(u==null?void 0:u.ai_api_key)||"",onChange:F=>d(X=>X?{...X,ai_api_key:F.target.value}:null),placeholder:"sk-...",className:"input-ios"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"模型"}),r.jsx("input",{type:"text",value:(u==null?void 0:u.ai_model)||"qwen-plus",onChange:F=>d(X=>X?{...X,ai_model:F.target.value}:null),className:"input-ios"}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"如: qwen-plus、qwen-turbo、gpt-3.5-turbo、gpt-4"})]}),r.jsxs("div",{className:"flex items-end gap-2",children:[r.jsxs("div",{className:"flex-1",children:[r.jsx("label",{className:"input-label",children:"测试账号"}),r.jsx(Tt,{value:W,onChange:$,options:L.map(F=>({value:F.id,label:F.id})),placeholder:"选择账号"})]}),r.jsx("button",{onClick:C,className:"btn-ios-secondary",disabled:P||!W,children:P?"测试中...":"测试 AI 连接"})]}),r.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800/50 rounded-lg p-3 text-xs text-slate-500 dark:text-slate-400",children:[r.jsx("p",{className:"font-medium mb-1",children:"常见 AI 服务配置:"}),r.jsxs("ul",{className:"space-y-0.5 list-disc list-inside",children:[r.jsx("li",{children:"阿里云通义千问: https://dashscope.aliyuncs.com/compatible-mode/v1"}),r.jsx("li",{children:"OpenAI: https://api.openai.com/v1"}),r.jsx("li",{children:"国内中转: 使用服务商提供的 API 地址"})]})]})]})]})]}),r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(Kn,{className:"w-4 h-4"}),"SMTP邮件配置"]})}),r.jsxs("div",{className:"vben-card-body space-y-4",children:[r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"配置SMTP服务器用于发送注册验证码等邮件通知"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"SMTP服务器"}),r.jsx("input",{type:"text",value:(u==null?void 0:u.smtp_server)||"",onChange:F=>d(X=>X?{...X,smtp_server:F.target.value}:null),placeholder:"smtp.qq.com",className:"input-ios"}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"如smtp.qq.com、smtp.gmail.com"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"SMTP端口"}),r.jsx("input",{type:"number",value:(u==null?void 0:u.smtp_port)||587,onChange:F=>d(X=>X?{...X,smtp_port:parseInt(F.target.value)}:null),placeholder:"587",className:"input-ios"}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"通常为587(TLS)或465(SSL)"})]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"发件邮箱"}),r.jsx("input",{type:"email",value:(u==null?void 0:u.smtp_user)||"",onChange:F=>d(X=>X?{...X,smtp_user:F.target.value}:null),placeholder:"your-email@qq.com",className:"input-ios"}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"用于发送邮件的邮箱地址"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"邮箱密码/授权码"}),r.jsx("input",{type:"password",value:(u==null?void 0:u.smtp_password)||"",onChange:F=>d(X=>X?{...X,smtp_password:F.target.value}:null),placeholder:"输入密码或授权码",className:"input-ios"}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"邮箱密码或应用专用密码(QQ邮箱需要授权码)"})]})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"发件人显示名(可选)"}),r.jsx("input",{type:"text",value:(u==null?void 0:u.smtp_from)||"",onChange:F=>d(X=>X?{...X,smtp_from:F.target.value}:null),placeholder:"闲鱼自动回复系统",className:"input-ios"}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"邮件发件人显示的名称,留空则使用邮箱地址"})]}),r.jsx("button",{onClick:_,className:"btn-ios-secondary",children:"发送测试邮件"})]})]})})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(cd,{className:"w-4 h-4"}),"修改密码"]})}),r.jsxs("div",{className:"vben-card-body space-y-4",children:[r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"当前密码"}),r.jsx("input",{type:"password",value:h,onChange:F=>f(F.target.value),placeholder:"请输入当前密码",className:"input-ios"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"新密码"}),r.jsx("input",{type:"password",value:b,onChange:F=>g(F.target.value),placeholder:"请输入新密码",className:"input-ios"})]}),r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"确认新密码"}),r.jsx("input",{type:"password",value:v,onChange:F=>w(F.target.value),placeholder:"请再次输入新密码",className:"input-ios"})]}),r.jsxs("button",{onClick:B,disabled:x,className:"btn-ios-primary",children:[x?r.jsx(Jt,{}):r.jsx(cd,{className:"w-4 h-4"}),"修改密码"]})]})]}),r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(H4,{className:"w-4 h-4"}),"数据备份"]})}),r.jsxs("div",{className:"vben-card-body space-y-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-slate-900 dark:text-slate-100 mb-1",children:"用户数据备份"}),r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mb-2",children:"导出您的账号、关键词、卡券等数据"}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsxs("button",{onClick:se,className:"btn-ios-primary",children:[r.jsx(ci,{className:"w-4 h-4"}),"导出备份"]}),r.jsxs("label",{className:"btn-ios-secondary cursor-pointer",children:[r.jsx(hd,{className:"w-4 h-4"}),"导入备份",r.jsx("input",{ref:N,type:"file",accept:".json",className:"hidden",onChange:ce})]})]})]}),(a==null?void 0:a.is_admin)&&r.jsxs("div",{className:"border-t border-slate-200 dark:border-slate-700 pt-4",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx("p",{className:"font-medium text-slate-900 dark:text-slate-100",children:"数据库备份"}),r.jsx("span",{className:"text-xs bg-slate-500 text-white px-1.5 py-0.5 rounded",children:"管理员"})]}),r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mb-2",children:"完整备份或恢复整个数据库"}),r.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[r.jsxs("button",{onClick:U,className:"btn-ios-primary",children:[r.jsx(ci,{className:"w-4 h-4"}),"下载数据库"]}),r.jsxs("label",{className:"btn-ios-secondary cursor-pointer",children:[p?r.jsx(Jt,{}):r.jsx(hd,{className:"w-4 h-4"}),"恢复数据库",r.jsx("input",{ref:E,type:"file",accept:".db",className:"hidden",onChange:A,disabled:p})]}),r.jsxs("button",{onClick:Z,disabled:k,className:"btn-ios-secondary",children:[k?r.jsx(Jt,{}):r.jsx(Xe,{className:"w-4 h-4"}),"刷新缓存"]})]}),r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"注意:恢复数据库将覆盖所有当前数据,请谨慎操作"})]})]})]})]})]})}function i_(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState([]),[d,h]=y.useState(""),[f,b]=y.useState(!1),[g,v]=y.useState(null),[w,x]=y.useState(""),[m,p]=y.useState(""),[j,k]=y.useState(""),[S,E]=y.useState(!1),N=async()=>{if(!(!n||!t||!s))try{i(!0);const z=await bT(d||void 0);z.success&&o(z.data||[])}catch{e({type:"error",message:"加载商品回复列表失败"})}finally{i(!1)}},L=async()=>{if(!(!n||!t||!s))try{const z=await er();u(z)}catch{}};y.useEffect(()=>{!n||!t||!s||(L(),N())},[n,t,s]),y.useEffect(()=>{!n||!t||!s||N()},[n,t,s,d]);const R=async z=>{if(confirm("确定要删除这条商品回复吗?"))try{await NT(z.cookie_id,z.item_id),e({type:"success",message:"删除成功"}),N()}catch{e({type:"error",message:"删除失败"})}},W=()=>{if(!d){e({type:"warning",message:"请先选择账号"});return}v(null),x(""),p(""),k(""),b(!0)},$=z=>{v(z),x(z.item_id),p(z.title||""),k(z.reply),b(!0)},P=()=>{b(!1),v(null)},D=async z=>{if(z.preventDefault(),!w.trim()){e({type:"warning",message:"请输入商品ID"});return}if(!j.trim()){e({type:"warning",message:"请输入回复内容"});return}E(!0);try{const H={cookie_id:(g==null?void 0:g.cookie_id)||d,item_id:w.trim(),title:m.trim()||void 0,reply_content:j.trim()};g?(await wT(g.cookie_id,g.item_id,H),e({type:"success",message:"回复已更新"})):(await jT(d,w.trim(),H),e({type:"success",message:"回复已添加"})),P(),N()}catch{e({type:"error",message:"保存失败"})}finally{E(!1)}};return a&&l.length===0?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"指定商品回复"}),r.jsx("p",{className:"page-description",children:"为特定商品设置自动回复内容"})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:W,className:"btn-ios-primary ",children:[r.jsx(bn,{className:"w-4 h-4"}),"添加回复"]}),r.jsxs("button",{onClick:N,className:"btn-ios-secondary ",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]})]}),r.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"vben-card",children:r.jsx("div",{className:"vben-card-body",children:r.jsxs("div",{className:"max-w-xs",children:[r.jsx("label",{className:"input-label",children:"筛选账号"}),r.jsx(Tt,{value:d,onChange:h,options:[{value:"",label:"所有账号"},...c.map(z=>({value:z.id,label:z.id}))],placeholder:"选择账号"})]})})}),r.jsxs(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"vben-card",children:[r.jsxs("div",{className:`vben-card-header \r
flex items-center justify-between`,children:[r.jsxs("h2",{className:"vben-card-title ",children:[r.jsx(di,{className:"w-4 h-4"}),"商品回复列表"]}),r.jsxs("span",{className:"badge-primary",children:[l.length," 条回复"]})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"账号ID"}),r.jsx("th",{children:"商品ID"}),r.jsx("th",{children:"商品标题"}),r.jsx("th",{children:"回复内容"}),r.jsx("th",{children:"创建时间"}),r.jsx("th",{children:"操作"})]})}),r.jsx("tbody",{children:l.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:6,className:"text-center py-8 text-gray-500",children:r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx(di,{className:"w-12 h-12 text-gray-300"}),r.jsx("p",{children:"暂无商品回复数据"})]})})}):l.map(z=>r.jsxs("tr",{children:[r.jsx("td",{className:"font-medium text-blue-600 dark:text-blue-400",children:z.cookie_id}),r.jsx("td",{className:"text-sm",children:z.item_id}),r.jsx("td",{className:"max-w-[150px] truncate",children:z.title||"-"}),r.jsx("td",{className:"max-w-[200px] truncate text-gray-500",children:z.reply}),r.jsx("td",{className:"text-gray-500 text-sm",children:z.created_at?new Date(z.created_at).toLocaleString():"-"}),r.jsx("td",{children:r.jsxs("div",{className:"",children:[r.jsx("button",{onClick:()=>$(z),className:"p-2 rounded-lg hover:bg-gray-100 transition-colors",title:"编辑",children:r.jsx(pn,{className:"w-4 h-4 text-blue-500 dark:text-blue-400"})}),r.jsx("button",{onClick:()=>R(z),className:"p-2 rounded-lg hover:bg-red-50 transition-colors",title:"删除",children:r.jsx(Nt,{className:"w-4 h-4 text-red-500"})})]})})]},z.id))})]})})]}),f&&r.jsx("div",{className:"modal-overlay",children:r.jsxs("div",{className:"modal-content max-w-lg",children:[r.jsxs("div",{className:"modal-header flex items-center justify-between",children:[r.jsx("h2",{className:"text-lg font-semibold",children:g?"编辑商品回复":"添加商品回复"}),r.jsx("button",{onClick:P,className:"p-1 hover:bg-gray-100 rounded-lg",children:r.jsx(He,{className:"w-4 h-4 text-gray-500"})})]}),r.jsxs("form",{onSubmit:D,children:[r.jsxs("div",{className:"modal-body space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"所属账号"}),r.jsx("input",{type:"text",value:(g==null?void 0:g.cookie_id)||d,disabled:!0,className:"input-ios bg-gray-100 cursor-not-allowed"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"商品ID"}),r.jsx("input",{type:"text",value:w,onChange:z=>x(z.target.value),className:"input-ios",placeholder:"请输入商品ID"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"商品标题(可选)"}),r.jsx("input",{type:"text",value:m,onChange:z=>p(z.target.value),className:"input-ios",placeholder:"用于备注商品名称"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"input-label",children:"回复内容"}),r.jsx("textarea",{value:j,onChange:z=>k(z.target.value),className:"input-ios h-28 resize-none",placeholder:"请输入自动回复内容"})]})]}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",onClick:P,className:"btn-ios-secondary",disabled:S,children:"取消"}),r.jsx("button",{type:"submit",className:"btn-ios-primary",disabled:S,children:S?r.jsxs("span",{className:"",children:[r.jsx($e,{className:"w-4 h-4 animate-spin"}),"保存中..."]}):"保存"})]})]})]})})]})}const l_=async(e,t=1,s=20)=>{const n=await be("/items/search",{keyword:e,page:t,page_size:s});return{success:n.success,data:n.data||[],total:n.total,error:n.error}};function o_(){const{addToast:e}=Me(),[t,s]=y.useState(!1),[n,a]=y.useState(""),[i,l]=y.useState([]),[o,c]=y.useState(0),u=async d=>{if(d==null||d.preventDefault(),!n.trim()){e({type:"warning",message:"请输入搜索关键词"});return}e({type:"info",message:"正在搜索中,请稍候..."});try{s(!0),l([]);const h=await l_(n.trim());h.success&&(l(h.data||[]),c(h.total||h.data.length),(h.data||[]).length===0?e({type:"info",message:"未找到相关商品"}):e({type:"success",message:`搜索完成找到 ${h.data.length} 件商品`}),h.error&&e({type:"warning",message:h.error}))}catch{e({type:"error",message:"搜索失败,请稍后重试"})}finally{s(!1)}};return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"商品搜索"}),r.jsx("p",{className:"page-description",children:"在闲鱼平台搜索商品"})]}),o>0&&r.jsxs("span",{className:"badge-primary",children:["共 ",o," 件商品"]})]}),r.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"vben-card",children:r.jsx("div",{className:"vben-card-body",children:r.jsxs("form",{onSubmit:u,className:"flex flex-col md:flex-row gap-4",children:[r.jsxs("div",{className:"flex-1 relative",children:[r.jsx($h,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 dark:text-slate-500 z-10"}),r.jsx("input",{type:"text",value:n,onChange:d=>a(d.target.value),placeholder:"输入关键词搜索商品...",className:"input-ios pl-12"})]}),r.jsx("button",{type:"submit",disabled:t,className:"btn-ios-primary w-full md:w-32 flex items-center justify-center",children:t?r.jsx(Jt,{}):"搜索"})]})})}),i.length>0&&r.jsx(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map((d,h)=>r.jsxs(oe.a,{href:d.item_url||`https://www.goofish.com/item?id=${d.item_id}`,target:"_blank",rel:"noopener noreferrer",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:h*.03},className:"vben-card group hover:shadow-lg transition-all duration-300 overflow-hidden",children:[r.jsxs("div",{className:"aspect-square bg-slate-100 dark:bg-slate-800 relative overflow-hidden",children:[d.main_image?r.jsx("img",{src:d.main_image,alt:d.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",onError:f=>{f.target.style.display="none"}}):r.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-slate-300 dark:text-slate-600",children:r.jsx(Bp,{className:"w-12 h-12"})}),r.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:r.jsx("div",{className:"bg-black/50 rounded-full p-1.5",children:r.jsx(_v,{className:"w-3.5 h-3.5 text-white"})})})]}),r.jsxs("div",{className:"p-3",children:[r.jsx("h3",{className:"font-medium text-slate-900 dark:text-slate-100 line-clamp-2 text-sm mb-2 min-h-[2.5rem]",children:d.title}),r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("span",{className:"text-lg font-bold text-red-500",children:d.price}),d.want_count&&d.want_count>0&&r.jsxs("span",{className:"text-xs text-slate-500 dark:text-slate-400 flex items-center gap-1",children:[r.jsx(Av,{className:"w-3 h-3"}),d.want_count,"人想要"]})]}),r.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-500 dark:text-slate-400",children:[r.jsx("span",{className:"truncate max-w-[60%]",children:d.seller_name||"-"}),d.area&&r.jsxs("span",{className:"flex items-center gap-0.5",children:[r.jsx(eE,{className:"w-3 h-3"}),d.area]})]}),d.tags&&d.tags.length>0&&r.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:d.tags.slice(0,3).map((f,b)=>r.jsx("span",{className:"text-xs px-1.5 py-0.5 bg-slate-100 dark:bg-slate-700 rounded text-slate-600 dark:text-slate-300",children:f},b))})]})]},d.item_id||h))}),!t&&i.length===0&&r.jsxs("div",{className:"text-center py-12 text-slate-500 dark:text-slate-400",children:[r.jsx(Bp,{className:"w-16 h-16 text-slate-300 dark:text-slate-600 mx-auto mb-4"}),r.jsx("p",{children:"输入关键词开始搜索"})]}),t&&r.jsx("div",{className:"text-center py-12",children:r.jsxs("div",{className:"inline-flex items-center gap-2 text-blue-500",children:[r.jsx(Jt,{}),r.jsx("span",{children:"正在搜索中..."})]})})]})}function c_(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),c=async()=>{if(!(!n||!t||!s))try{i(!0);const h=await nT();h.success&&o(h.data||[])}catch{e({type:"error",message:"加载用户列表失败"})}finally{i(!1)}};y.useEffect(()=>{!n||!t||!s||c()},[n,t,s]);const u=h=>{e({type:"warning",message:`${h}功能后端暂未实现`})},d=async h=>{if(confirm("确定要删除这个用户吗?此操作不可恢复!"))try{await rT(h),e({type:"success",message:"删除成功"}),c()}catch{e({type:"error",message:"删除失败"})}};return a?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"用户管理"}),r.jsx("p",{className:"page-description",children:"管理系统用户账号"})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:()=>u("添加用户"),className:"btn-ios-primary",children:[r.jsx(bn,{className:"w-4 h-4"}),"添加用户"]}),r.jsxs("button",{onClick:c,className:"btn-ios-secondary",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]})]}),r.jsxs("div",{className:"vben-card",children:[r.jsxs("div",{className:"vben-card-header flex items-center justify-between",children:[r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(qr,{className:"w-4 h-4"}),"用户列表"]}),r.jsxs("span",{className:"badge-primary",children:[l.length," 个用户"]})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"ID"}),r.jsx("th",{children:"用户名"}),r.jsx("th",{children:"邮箱"}),r.jsx("th",{children:"角色"}),r.jsx("th",{children:"操作"})]})}),r.jsx("tbody",{children:l.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:5,className:"text-center py-8 text-slate-500 dark:text-slate-400",children:r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx(qr,{className:"w-12 h-12 text-slate-300 dark:text-slate-600"}),r.jsx("p",{children:"暂无用户数据"})]})})}):l.map(h=>r.jsxs("tr",{children:[r.jsx("td",{className:"font-medium",children:h.user_id}),r.jsx("td",{className:"font-medium text-blue-600 dark:text-blue-400",children:h.username}),r.jsx("td",{className:"text-slate-500 dark:text-slate-400",children:h.email||"-"}),r.jsx("td",{children:h.is_admin?r.jsx("span",{className:"badge-warning",children:"管理员"}):r.jsx("span",{className:"badge-gray",children:"普通用户"})}),r.jsx("td",{children:r.jsx("div",{className:"flex gap-1",children:r.jsx("button",{onClick:()=>d(h.user_id),className:"p-2 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors",title:"删除",children:r.jsx(Nt,{className:"w-4 h-4 text-red-500"})})})})]},h.user_id))})]})})]}),r.jsx("div",{className:"vben-card",children:r.jsx("div",{className:"vben-card-body",children:r.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"提示:用户可通过注册页面自行注册账号。管理员可在此页面删除用户。"})})})]})}const u_=[{value:50,label:"50 条"},{value:100,label:"100 条"},{value:200,label:"200 条"},{value:500,label:"500 条"}];function d_(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState(""),[d,h]=y.useState(100),f=async()=>{if(!(!n||!t||!s))try{i(!0);const x=await aT({limit:d});x.success&&o(x.data||[])}catch{e({type:"error",message:"加载系统日志失败"})}finally{i(!1)}};y.useEffect(()=>{n&&(!t||!s||f())},[n,t,s,d]);const b=c?l.filter(x=>x.level===c):l,g=async()=>{if(confirm("确定要清空所有系统日志吗?此操作不可恢复!"))try{await iT(),e({type:"success",message:"日志已清空"}),f()}catch{e({type:"error",message:"清空失败"})}},v=x=>{switch(x){case"error":return r.jsx(Pv,{className:"w-4 h-4 text-red-500"});case"warning":return r.jsx($4,{className:"w-4 h-4 text-amber-500"});default:return r.jsx(ui,{className:"w-4 h-4 text-blue-500"})}},w=x=>{switch(x){case"error":return r.jsx("span",{className:"badge-danger",children:"错误"});case"warning":return r.jsx("span",{className:"badge-warning",children:"警告"});default:return r.jsx("span",{className:"badge-info",children:"信息"})}};return a&&l.length===0?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"page-header flex-between flex-wrap gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"系统日志"}),r.jsx("p",{className:"page-description",children:"查看系统运行日志"})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("button",{onClick:()=>window.open(dT(),"_blank"),className:"btn-ios-primary",children:[r.jsx(ci,{className:"w-4 h-4"}),"导出日志"]}),r.jsxs("button",{onClick:g,className:"btn-ios-danger",children:[r.jsx(Nt,{className:"w-4 h-4"}),"清空日志"]}),r.jsxs("button",{onClick:f,className:"btn-ios-secondary",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[r.jsx("div",{className:"flex gap-2",children:["","info","warning","error"].map(x=>r.jsx("button",{onClick:()=>u(x),className:ue("px-4 py-2 rounded-lg text-sm font-medium transition-colors",c===x?"bg-blue-500 text-white":"bg-slate-100 dark:bg-slate-700 text-slate-600 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600"),children:x===""?"全部":x==="info"?"信息":x==="warning"?"警告":"错误"},x))}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-slate-500 dark:text-slate-400",children:"显示条数:"}),r.jsx("select",{value:d,onChange:x=>h(Number(x.target.value)),className:"px-3 py-2 rounded-lg text-sm bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 border-0 focus:ring-2 focus:ring-blue-500",children:u_.map(x=>r.jsx("option",{value:x.value,children:x.label},x.value))})]})]}),r.jsxs("div",{className:"vben-card",children:[r.jsxs("div",{className:"vben-card-header",children:[r.jsxs("h2",{className:"vben-card-title flex items-center gap-2",children:[r.jsx(Sr,{className:"w-4 h-4"}),"日志列表"]}),r.jsxs("span",{className:"badge-primary",children:[b.length," 条记录"]})]}),r.jsx("div",{className:"divide-y divide-slate-100 dark:divide-slate-700 max-h-[600px] overflow-y-auto",children:b.length===0?r.jsxs("div",{className:"text-center py-12 text-slate-500 dark:text-slate-400",children:[r.jsx(Sr,{className:"w-12 h-12 text-slate-300 dark:text-slate-600 mx-auto mb-4"}),r.jsx("p",{children:"暂无日志记录"})]}):b.map(x=>r.jsx("div",{className:"px-6 py-4 hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors",children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"mt-0.5",children:v(x.level)}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[w(x.level),r.jsx("span",{className:"text-xs text-slate-500 dark:text-slate-400 bg-slate-100 dark:bg-slate-700 px-2 py-0.5 rounded",children:x.module}),r.jsx("span",{className:"text-xs text-slate-400 dark:text-slate-500",children:new Date(x.created_at).toLocaleString()})]}),r.jsx("p",{className:"text-sm text-slate-700 dark:text-slate-300 break-all",children:x.message})]})]})},x.id))})]})]})}function h_(){const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!0),[l,o]=y.useState([]),[c,u]=y.useState([]),[d,h]=y.useState(""),f=async()=>{if(!(!n||!t||!s))try{i(!0);const v=await lT({cookie_id:d||void 0});v.success&&o(v.data||[])}catch{e({type:"error",message:"加载风控日志失败"})}finally{i(!1)}},b=async()=>{if(!(!n||!t||!s))try{const v=await er();u(v)}catch{}};y.useEffect(()=>{!n||!t||!s||(b(),f())},[n,t,s]),y.useEffect(()=>{!n||!t||!s||f()},[n,t,s,d]);const g=async()=>{if(confirm("确定要清空所有风控日志吗?此操作不可恢复!"))try{await oT(),e({type:"success",message:"日志已清空"}),f()}catch{e({type:"error",message:"清空失败"})}};return a&&l.length===0?r.jsx(mt,{}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"page-title",children:"风控日志"}),r.jsx("p",{className:"page-description",children:"查看账号风控相关日志"})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:g,className:"btn-ios-danger ",children:[r.jsx(Nt,{className:"w-4 h-4"}),"清空日志"]}),r.jsxs("button",{onClick:f,className:"btn-ios-secondary ",children:[r.jsx(Xe,{className:"w-4 h-4"}),"刷新"]})]})]}),r.jsx("div",{className:"vben-card",children:r.jsx("div",{className:"vben-card-body",children:r.jsx("div",{className:"max-w-md",children:r.jsxs("div",{className:"input-group",children:[r.jsx("label",{className:"input-label",children:"筛选账号"}),r.jsx(Tt,{value:d,onChange:h,options:[{value:"",label:"所有账号"},...c.map(v=>({value:v.id,label:v.id}))],placeholder:"所有账号"})]})})})}),r.jsxs("div",{className:"vben-card",children:[r.jsxs("div",{className:"vben-card-header",children:[r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(Up,{className:"w-4 h-4 text-amber-500"}),"风控日志"]}),r.jsxs("span",{className:"badge-primary",children:[l.length," 条记录"]})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"table-ios",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"账号ID"}),r.jsx("th",{children:"风控类型"}),r.jsx("th",{children:"详情"}),r.jsx("th",{children:"时间"})]})}),r.jsx("tbody",{children:l.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:4,className:"text-center py-8 text-slate-500 dark:text-slate-400",children:r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx(Up,{className:"w-12 h-12 text-slate-300 dark:text-slate-600"}),r.jsx("p",{children:"暂无风控日志"})]})})}):l.map(v=>r.jsxs("tr",{children:[r.jsx("td",{className:"font-medium text-blue-600 dark:text-blue-400",children:v.cookie_id}),r.jsx("td",{children:r.jsx("span",{className:"badge-danger",children:v.risk_type})}),r.jsx("td",{className:"max-w-[300px] text-slate-500 dark:text-slate-400",children:r.jsx("span",{className:"block truncate cursor-help",title:v.message,children:v.message})}),r.jsx("td",{className:"text-slate-500 dark:text-slate-400 text-sm",children:new Date(v.created_at).toLocaleString()})]},v.id))})]})})]})]})}const Hc=[{value:"default_replies",label:"默认回复表"},{value:"keywords",label:"关键词表"},{value:"cookies",label:"账号表"},{value:"cards",label:"卡券表"},{value:"orders",label:"订单表"},{value:"item_info",label:"商品信息表"},{value:"notification_channels",label:"通知渠道表"},{value:"delivery_rules",label:"发货规则表"},{value:"risk_control_logs",label:"风控日志表"}];function f_(){var m;const{addToast:e}=Me(),{isAuthenticated:t,token:s,_hasHydrated:n}=Re(),[a,i]=y.useState(!1),[l,o]=y.useState("default_replies"),[c,u]=y.useState([]),[d,h]=y.useState([]),[f,b]=y.useState(0),[g,v]=y.useState(!1),w=async()=>{if(!(!n||!t||!s))try{i(!0);const p=await cT(l);p.success?(u(p.data||[]),h(p.columns||[]),b(p.count||0)):e({type:"error",message:"加载数据失败"})}catch{e({type:"error",message:"加载数据失败"})}finally{i(!1)}};y.useEffect(()=>{n&&t&&s&&w()},[n,t,s,l]);const x=async()=>{var p;if(confirm(`确定要清空 ${(p=Hc.find(j=>j.value===l))==null?void 0:p.label} 吗?此操作不可恢复!`)&&confirm("再次确认:是否真的要清空该表的所有数据?"))try{v(!0);const j=await uT(l);j.success?(e({type:"success",message:"清空成功"}),w()):e({type:"error",message:j.message||"清空失败"})}catch{e({type:"error",message:"清空失败"})}finally{v(!1)}};return n?r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"vben-card",children:[r.jsx("div",{className:"vben-card-header",children:r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(lE,{className:"w-4 h-4"}),"数据表选择"]})}),r.jsx("div",{className:"vben-card-body",children:r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-12 gap-4 items-end",children:[r.jsxs("div",{className:"sm:col-span-6",children:[r.jsx("label",{className:"input-label mb-1",children:"选择数据表"}),r.jsx(Tt,{value:l,onChange:o,options:Hc,placeholder:"选择数据表"})]}),r.jsxs("div",{className:"sm:col-span-2 text-center py-2 px-4 bg-slate-50 dark:bg-slate-800/50 rounded-lg",children:[r.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"数据统计"}),r.jsx("p",{className:"text-xl font-bold text-slate-900 dark:text-slate-100",children:f}),r.jsx("p",{className:"text-xs text-slate-400",children:"条记录"})]}),r.jsx("div",{className:"sm:col-span-4 flex justify-end",children:r.jsxs("button",{onClick:w,disabled:a,className:"btn-ios-primary w-full sm:w-auto",children:[a?r.jsx(Jt,{}):r.jsx(Xe,{className:"w-4 h-4"}),"刷新数据"]})})]})})]}),r.jsxs("div",{className:"vben-card",children:[r.jsxs("div",{className:"vben-card-header flex items-center justify-between",children:[r.jsxs("h2",{className:"vben-card-title",children:[r.jsx(id,{className:"w-4 h-4"}),((m=Hc.find(p=>p.value===l))==null?void 0:m.label)||l]}),r.jsxs("button",{onClick:x,disabled:g||f===0,className:"btn-ios-danger text-sm",children:[g?r.jsx(Jt,{}):r.jsx(Nt,{className:"w-4 h-4"}),"清空"]})]}),r.jsx("div",{className:"vben-card-body p-0",children:a?r.jsxs("div",{className:"p-8 text-center",children:[r.jsx(Jt,{}),r.jsx("p",{className:"text-slate-500 mt-2",children:"加载中..."})]}):c.length===0?r.jsxs("div",{className:"p-8 text-center",children:[r.jsx(id,{className:"w-12 h-12 text-slate-300 dark:text-slate-600 mx-auto mb-3"}),r.jsx("p",{className:"text-slate-500 dark:text-slate-400",children:"该表暂无数据"})]}):r.jsxs("div",{className:"overflow-x-auto",children:[r.jsxs("table",{className:"w-full text-sm table-fixed",children:[r.jsx("thead",{className:"bg-slate-50 dark:bg-slate-800/50 border-b border-slate-200 dark:border-slate-700",children:r.jsx("tr",{children:d.map((p,j)=>r.jsx("th",{className:`px-4 py-3 text-left font-medium text-slate-700 dark:text-slate-300 ${j===0?"w-32":"min-w-[120px]"}`,children:p},p))})}),r.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-700",children:c.slice(0,100).map((p,j)=>r.jsx("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/30",children:d.map(k=>r.jsx("td",{className:"px-4 py-3 text-slate-600 dark:text-slate-400 truncate",title:String(p[k]??""),children:String(p[k]??"-")},k))},j))})]}),c.length>100&&r.jsxs("div",{className:"p-3 text-center text-sm text-slate-500 bg-slate-50 dark:bg-slate-800/30 border-t border-slate-200 dark:border-slate-700",children:["仅显示前 100 条记录,共 ",c.length," 条"]})]})})]})]}):r.jsx(mt,{})}function m_({children:e}){const{isAuthenticated:t,setAuth:s,clearAuth:n,token:a,_hasHydrated:i}=Re(),[l,o]=y.useState("checking"),c=y.useRef(!1);return y.useEffect(()=>{if(!i||c.current)return;(async()=>{c.current=!0;const d=a||localStorage.getItem("auth_token");if(!d){o("unauthenticated"),c.current=!1;return}try{const h=await mb();h.authenticated&&h.user_id?(s(d,{user_id:h.user_id,username:h.username||"",is_admin:h.is_admin||!1}),o("authenticated")):(n(),o("unauthenticated"))}catch{n(),o("unauthenticated")}finally{c.current=!1}})()},[i,t,a,s,n]),!i||l==="checking"?r.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50 dark:bg-slate-900",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"})}):l==="unauthenticated"?r.jsx(Hu,{to:"/login",replace:!0}):r.jsx(r.Fragment,{children:e})}function p_(){return r.jsxs(zN,{future:{v7_startTransition:!0,v7_relativeSplatPath:!0},children:[r.jsx($v,{}),r.jsxs(RN,{children:[r.jsx(je,{path:"/login",element:r.jsx(D5,{})}),r.jsx(je,{path:"/register",element:r.jsx(O5,{})}),r.jsxs(je,{path:"/",element:r.jsx(m_,{children:r.jsx(tP,{})}),children:[r.jsx(je,{index:!0,element:r.jsx(Hu,{to:"/dashboard",replace:!0})}),r.jsx(je,{path:"dashboard",element:r.jsx(fT,{})}),r.jsx(je,{path:"accounts",element:r.jsx(mT,{})}),r.jsx(je,{path:"items",element:r.jsx(CT,{})}),r.jsx(je,{path:"orders",element:r.jsx(ET,{})}),r.jsx(je,{path:"keywords",element:r.jsx(PT,{})}),r.jsx(je,{path:"item-replies",element:r.jsx(i_,{})}),r.jsx(je,{path:"cards",element:r.jsx(FT,{})}),r.jsx(je,{path:"delivery",element:r.jsx(BT,{})}),r.jsx(je,{path:"notification-channels",element:r.jsx(KT,{})}),r.jsx(je,{path:"message-notifications",element:r.jsx(QT,{})}),r.jsx(je,{path:"item-search",element:r.jsx(o_,{})}),r.jsx(je,{path:"settings",element:r.jsx(a_,{})}),r.jsx(je,{path:"about",element:r.jsx(_T,{})}),r.jsx(je,{path:"admin/users",element:r.jsx(c_,{})}),r.jsx(je,{path:"admin/logs",element:r.jsx(d_,{})}),r.jsx(je,{path:"admin/risk-logs",element:r.jsx(h_,{})}),r.jsx(je,{path:"admin/data",element:r.jsx(f_,{})})]}),r.jsx(je,{path:"*",element:r.jsx(Hu,{to:"/dashboard",replace:!0})})]})]})}const g_=new Iw({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:3e4}}});Wc.createRoot(document.getElementById("root")).render(r.jsx(xi.StrictMode,{children:r.jsx(Vw,{client:g_,children:r.jsx(p_,{})})}));