From 6e276fca61b99fc399cdd5e52d826c024f1c8ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=8B=A5?= Date: Sat, 21 Feb 2026 15:30:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E5=AE=B9=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=A2=9E=E5=BC=BA=EF=BC=9A=E4=B8=8A=E4=BC=A0/?= =?UTF-8?q?=E5=88=A0=E9=99=A4/API=E6=96=87=E6=A1=A3=E9=9B=86=E6=88=90?= =?UTF-8?q?=E5=88=B0=E5=8E=9F=E6=9C=89admin=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将"初始化数据库"和"同步到数据库"按钮替换为"上传内容"和"API接口" - 隐藏"导入"、"导出"、"同步飞书"按钮 - 每个章节条目增加"删除"按钮 - 添加上传面板和API接口文档面板(可展开/收起) - 保持原有侧边栏和页面风格不变 Co-authored-by: Cursor --- soul-admin/dist/assets/index-CbOmKBRd.js | 454 ++++++++++++++++++++++ soul-admin/dist/assets/index-DBQ1UORI.css | 1 + soul-admin/dist/index.html | 244 ++++++++++++ 部署到GitHub与宝塔.sh | 52 +++ 部署到Kr宝塔.sh | 52 +++ 5 files changed, 803 insertions(+) create mode 100644 soul-admin/dist/assets/index-CbOmKBRd.js create mode 100644 soul-admin/dist/assets/index-DBQ1UORI.css create mode 100644 soul-admin/dist/index.html create mode 100755 部署到GitHub与宝塔.sh create mode 100755 部署到Kr宝塔.sh diff --git a/soul-admin/dist/assets/index-CbOmKBRd.js b/soul-admin/dist/assets/index-CbOmKBRd.js new file mode 100644 index 0000000..02bedb0 --- /dev/null +++ b/soul-admin/dist/assets/index-CbOmKBRd.js @@ -0,0 +1,454 @@ +function $v(r,a){for(var l=0;li[c]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function i(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();function Km(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Pc={exports:{}},Ca={},Rc={exports:{}},Oe={};/** + * @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 Fh;function Bv(){if(Fh)return Oe;Fh=1;var r=Symbol.for("react.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function E(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,b={};function j(L,B,le){this.props=L,this.context=B,this.refs=b,this.updater=le||k}j.prototype.isReactComponent={},j.prototype.setState=function(L,B){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,B,"setState")},j.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function N(){}N.prototype=j.prototype;function R(L,B,le){this.props=L,this.context=B,this.refs=b,this.updater=le||k}var S=R.prototype=new N;S.constructor=R,C(S,j.prototype),S.isPureReactComponent=!0;var A=Array.isArray,V=Object.prototype.hasOwnProperty,Q={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function U(L,B,le){var Z,be={},je=null,ne=null;if(B!=null)for(Z in B.ref!==void 0&&(ne=B.ref),B.key!==void 0&&(je=""+B.key),B)V.call(B,Z)&&!G.hasOwnProperty(Z)&&(be[Z]=B[Z]);var me=arguments.length-2;if(me===1)be.children=le;else if(1>>1,B=T[L];if(0>>1;Lc(be,X))jec(ne,be)?(T[L]=ne,T[je]=X,L=je):(T[L]=be,T[Z]=X,L=Z);else if(jec(ne,X))T[L]=ne,T[je]=X,L=je;else break e}}return J}function c(T,J){var X=T.sortIndex-J.sortIndex;return X!==0?X:T.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();r.unstable_now=function(){return f.now()-m}}var x=[],g=[],v=1,y=null,E=3,k=!1,C=!1,b=!1,j=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(T){for(var J=l(g);J!==null;){if(J.callback===null)i(g);else if(J.startTime<=T)i(g),J.sortIndex=J.expirationTime,a(x,J);else break;J=l(g)}}function A(T){if(b=!1,S(T),!C)if(l(x)!==null)C=!0,W(V);else{var J=l(g);J!==null&&$(A,J.startTime-T)}}function V(T,J){C=!1,b&&(b=!1,N(U),U=-1),k=!0;var X=E;try{for(S(J),y=l(x);y!==null&&(!(y.expirationTime>J)||T&&!oe());){var L=y.callback;if(typeof L=="function"){y.callback=null,E=y.priorityLevel;var B=L(y.expirationTime<=J);J=r.unstable_now(),typeof B=="function"?y.callback=B:y===l(x)&&i(x),S(J)}else i(x);y=l(x)}if(y!==null)var le=!0;else{var Z=l(g);Z!==null&&$(A,Z.startTime-J),le=!1}return le}finally{y=null,E=X,k=!1}}var Q=!1,G=null,U=-1,ie=5,fe=-1;function oe(){return!(r.unstable_now()-feT||125L?(T.sortIndex=X,a(g,T),l(x)===null&&T===l(g)&&(b?(N(U),U=-1):b=!0,$(A,X-L))):(T.sortIndex=B,a(x,T),C||k||(C=!0,W(V))),T},r.unstable_shouldYield=oe,r.unstable_wrapCallback=function(T){var J=E;return function(){var X=E;E=J;try{return T.apply(this,arguments)}finally{E=X}}}})(Ic)),Ic}var Vh;function Hv(){return Vh||(Vh=1,Tc.exports=Wv()),Tc.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 Wh;function Kv(){if(Wh)return zt;Wh=1;var r=yu(),a=Hv();function l(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),x=Object.prototype.hasOwnProperty,g=/^[: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]*$/,v={},y={};function E(e){return x.call(y,e)?!0:x.call(v,e)?!1:g.test(e)?y[e]=!0:(v[e]=!0,!1)}function k(e,t,s,o){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function C(e,t,s,o){if(t===null||typeof t>"u"||k(e,t,s,o))return!0;if(o)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 b(e,t,s,o,u,h,w){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=u,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=h,this.removeEmptyString=w}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){j[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];j[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){j[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){j[e]=new b(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){j[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){j[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){j[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){j[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){j[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function R(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(N,R);j[t]=new b(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(N,R);j[t]=new b(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(N,R);j[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){j[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),j.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){j[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,s,o){var u=j.hasOwnProperty(t)?j[t]:null;(u!==null?u.type!==0:o||!(2_||u[w]!==h[_]){var I=` +`+u[w].replace(" at new "," at ");return e.displayName&&I.includes("")&&(I=I.replace("",e.displayName)),I}while(1<=w&&0<=_);break}}}finally{le=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?B(e):""}function be(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=Z(e.type,!1),e;case 11:return e=Z(e.type.render,!1),e;case 1:return e=Z(e.type,!0),e;default:return""}}function je(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 G:return"Fragment";case Q:return"Portal";case ie:return"Profiler";case U:return"StrictMode";case P:return"Suspense";case K:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oe:return(e.displayName||"Context")+".Consumer";case fe:return(e._context.displayName||"Context")+".Provider";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case re:return t=e.displayName||null,t!==null?t:je(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return je(e(t))}catch{}}return null}function ne(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 je(t);case 8:return t===U?"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 me(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Se(e){var t=Ee(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,h=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(w){o=""+w,h.call(this,w)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(w){o=""+w},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Te(e){e._valueTracker||(e._valueTracker=Se(e))}function Ae(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),o="";return e&&(o=Ee(e)?e.checked?"true":"false":e.value),e=o,e!==s?(t.setValue(e),!0):!1}function nt(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 ut(e,t){var s=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function $t(e,t){var s=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;s=me(t.value!=null?t.value:s),e._wrapperState={initialChecked:o,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Bt(e,t){t=t.checked,t!=null&&S(e,"checked",t,!1)}function At(e,t){Bt(e,t);var s=me(t.value),o=t.type;if(s!=null)o==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Me(e,t.type,s):t.hasOwnProperty("defaultValue")&&Me(e,t.type,me(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Y(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="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 Me(e,t,s){(t!=="number"||nt(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var ze=Array.isArray;function St(e,t,s,o){if(e=e.options,t){t={};for(var u=0;u"+t.valueOf().toString()+"",t=Tn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xn(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var Us={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},Wg=["Webkit","ms","Moz","O"];Object.keys(Us).forEach(function(e){Wg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Us[t]=Us[e]})});function Ju(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||Us.hasOwnProperty(e)&&Us[e]?(""+t).trim():t+"px"}function Zu(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=s.indexOf("--")===0,u=Ju(s,t[s],o);s==="float"&&(s="cssFloat"),o?e.setProperty(s,u):e[s]=u}}var Hg=X({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 $o(e,t){if(t){if(Hg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(l(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(l(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(l(61))}if(t.style!=null&&typeof t.style!="object")throw Error(l(62))}}function Bo(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 Uo=null;function Vo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wo=null,qr=null,Jr=null;function ed(e){if(e=ua(e)){if(typeof Wo!="function")throw Error(l(280));var t=e.stateNode;t&&(t=al(t),Wo(e.stateNode,e.type,t))}}function td(e){qr?Jr?Jr.push(e):Jr=[e]:qr=e}function nd(){if(qr){var e=qr,t=Jr;if(Jr=qr=null,ed(e),t)for(e=0;e>>=0,e===0?32:31-(n0(e)/r0|0)|0}var Ba=64,Ua=4194304;function Ks(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 Va(e,t){var s=e.pendingLanes;if(s===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes,w=s&268435455;if(w!==0){var _=w&~u;_!==0?o=Ks(_):(h&=w,h!==0&&(o=Ks(h)))}else w=s&~u,w!==0?o=Ks(w):h!==0&&(o=Ks(h));if(o===0)return 0;if(t!==0&&t!==o&&(t&u)===0&&(u=o&-o,h=t&-t,u>=h||u===16&&(h&4194240)!==0))return t;if((o&4)!==0&&(o|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0s;s++)t.push(e);return t}function Gs(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rn(t),e[t]=s}function o0(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 o=e.eventTimes;for(e=e.expirationTimes;0=ta),_d=" ",Td=!1;function Id(e,t){switch(e){case"keyup":return L0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ad(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ts=!1;function O0(e,t){switch(e){case"compositionend":return Ad(t);case"keypress":return t.which!==32?null:(Td=!0,_d);case"textInput":return e=t.data,e===_d&&Td?null:e;default:return null}}function F0(e,t){if(ts)return e==="compositionend"||!ii&&Id(e,t)?(e=Sd(),Qa=ni=Zn=null,ts=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:s,offset:t-e};e=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=$d(s)}}function Ud(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ud(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vd(){for(var e=window,t=nt();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=nt(e.document)}return t}function di(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 G0(e){var t=Vd(),s=e.focusedElem,o=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&Ud(s.ownerDocument.documentElement,s)){if(o!==null&&di(s)){if(t=o.start,e=o.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 u=s.textContent.length,h=Math.min(o.start,u);o=o.end===void 0?h:Math.min(o.end,u),!e.extend&&h>o&&(u=o,o=h,h=u),u=Bd(s,h);var w=Bd(s,o);u&&w&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==w.node||e.focusOffset!==w.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),h>o?(e.addRange(t),e.extend(w.node,w.offset)):(t.setEnd(w.node,w.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=document.documentMode,ns=null,fi=null,aa=null,hi=!1;function Wd(e,t,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;hi||ns==null||ns!==nt(o)||(o=ns,"selectionStart"in o&&di(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),aa&&sa(aa,o)||(aa=o,o=nl(fi,"onSelect"),0os||(e.current=Ci[os],Ci[os]=null,os--)}function Qe(e,t){os++,Ci[os]=e.current,e.current=t}var rr={},Ct=nr(rr),Mt=nr(!1),_r=rr;function is(e,t){var s=e.type.contextTypes;if(!s)return rr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var u={},h;for(h in s)u[h]=t[h];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=u),u}function Lt(e){return e=e.childContextTypes,e!=null}function ll(){Je(Mt),Je(Ct)}function af(e,t,s){if(Ct.current!==rr)throw Error(l(168));Qe(Ct,t),Qe(Mt,s)}function lf(e,t,s){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return s;o=o.getChildContext();for(var u in o)if(!(u in t))throw Error(l(108,ne(e)||"Unknown",u));return X({},s,o)}function ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rr,_r=Ct.current,Qe(Ct,e),Qe(Mt,Mt.current),!0}function of(e,t,s){var o=e.stateNode;if(!o)throw Error(l(169));s?(e=lf(e,t,_r),o.__reactInternalMemoizedMergedChildContext=e,Je(Mt),Je(Ct),Qe(Ct,e)):Je(Mt),Qe(Mt,s)}var An=null,il=!1,ki=!1;function cf(e){An===null?An=[e]:An.push(e)}function av(e){il=!0,cf(e)}function sr(){if(!ki&&An!==null){ki=!0;var e=0,t=Ke;try{var s=An;for(Ke=1;e>=w,u-=w,Mn=1<<32-rn(t)+u|s<Pe?(wt=ke,ke=null):wt=ke.sibling;var Be=q(D,ke,O[Pe],se);if(Be===null){ke===null&&(ke=wt);break}e&&ke&&Be.alternate===null&&t(D,ke),M=h(Be,M,Pe),Ce===null?Ne=Be:Ce.sibling=Be,Ce=Be,ke=wt}if(Pe===O.length)return s(D,ke),Ze&&Ir(D,Pe),Ne;if(ke===null){for(;PePe?(wt=ke,ke=null):wt=ke.sibling;var hr=q(D,ke,Be.value,se);if(hr===null){ke===null&&(ke=wt);break}e&&ke&&hr.alternate===null&&t(D,ke),M=h(hr,M,Pe),Ce===null?Ne=hr:Ce.sibling=hr,Ce=hr,ke=wt}if(Be.done)return s(D,ke),Ze&&Ir(D,Pe),Ne;if(ke===null){for(;!Be.done;Pe++,Be=O.next())Be=te(D,Be.value,se),Be!==null&&(M=h(Be,M,Pe),Ce===null?Ne=Be:Ce.sibling=Be,Ce=Be);return Ze&&Ir(D,Pe),Ne}for(ke=o(D,ke);!Be.done;Pe++,Be=O.next())Be=ce(ke,D,Pe,Be.value,se),Be!==null&&(e&&Be.alternate!==null&&ke.delete(Be.key===null?Pe:Be.key),M=h(Be,M,Pe),Ce===null?Ne=Be:Ce.sibling=Be,Ce=Be);return e&&ke.forEach(function(zv){return t(D,zv)}),Ze&&Ir(D,Pe),Ne}function it(D,M,O,se){if(typeof O=="object"&&O!==null&&O.type===G&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case V:e:{for(var Ne=O.key,Ce=M;Ce!==null;){if(Ce.key===Ne){if(Ne=O.type,Ne===G){if(Ce.tag===7){s(D,Ce.sibling),M=u(Ce,O.props.children),M.return=D,D=M;break e}}else if(Ce.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===W&&pf(Ne)===Ce.type){s(D,Ce.sibling),M=u(Ce,O.props),M.ref=da(D,Ce,O),M.return=D,D=M;break e}s(D,Ce);break}else t(D,Ce);Ce=Ce.sibling}O.type===G?(M=$r(O.props.children,D.mode,se,O.key),M.return=D,D=M):(se=Dl(O.type,O.key,O.props,null,D.mode,se),se.ref=da(D,M,O),se.return=D,D=se)}return w(D);case Q:e:{for(Ce=O.key;M!==null;){if(M.key===Ce)if(M.tag===4&&M.stateNode.containerInfo===O.containerInfo&&M.stateNode.implementation===O.implementation){s(D,M.sibling),M=u(M,O.children||[]),M.return=D,D=M;break e}else{s(D,M);break}else t(D,M);M=M.sibling}M=bc(O,D.mode,se),M.return=D,D=M}return w(D);case W:return Ce=O._init,it(D,M,Ce(O._payload),se)}if(ze(O))return xe(D,M,O,se);if(J(O))return ye(D,M,O,se);fl(D,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,M!==null&&M.tag===6?(s(D,M.sibling),M=u(M,O),M.return=D,D=M):(s(D,M),M=jc(O,D.mode,se),M.return=D,D=M),w(D)):s(D,M)}return it}var fs=xf(!0),gf=xf(!1),hl=nr(null),ml=null,hs=null,Ii=null;function Ai(){Ii=hs=ml=null}function Mi(e){var t=hl.current;Je(hl),e._currentValue=t}function Li(e,t,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===s)break;e=e.return}}function ms(e,t){ml=e,Ii=hs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Dt=!0),e.firstContext=null)}function qt(e){var t=e._currentValue;if(Ii!==e)if(e={context:e,memoizedValue:t,next:null},hs===null){if(ml===null)throw Error(l(308));hs=e,ml.dependencies={lanes:0,firstContext:e}}else hs=hs.next=e;return t}var Ar=null;function Di(e){Ar===null?Ar=[e]:Ar.push(e)}function vf(e,t,s,o){var u=t.interleaved;return u===null?(s.next=s,Di(t)):(s.next=u.next,u.next=s),t.interleaved=s,Dn(e,o)}function Dn(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 ar=!1;function Oi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yf(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 On(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function lr(e,t,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,($e&2)!==0){var u=o.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),o.pending=t,Dn(e,s)}return u=o.interleaved,u===null?(t.next=t,Di(o)):(t.next=u.next,u.next=t),o.interleaved=t,Dn(e,s)}function pl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,qo(e,s)}}function wf(e,t){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var u=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var w={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};h===null?u=h=w:h=h.next=w,s=s.next}while(s!==null);h===null?u=h=t:h=h.next=t}else u=h=t;s={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:o.shared,effects:o.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function xl(e,t,s,o){var u=e.updateQueue;ar=!1;var h=u.firstBaseUpdate,w=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var I=_,F=I.next;I.next=null,w===null?h=F:w.next=F,w=I;var ee=e.alternate;ee!==null&&(ee=ee.updateQueue,_=ee.lastBaseUpdate,_!==w&&(_===null?ee.firstBaseUpdate=F:_.next=F,ee.lastBaseUpdate=I))}if(h!==null){var te=u.baseState;w=0,ee=F=I=null,_=h;do{var q=_.lane,ce=_.eventTime;if((o&q)===q){ee!==null&&(ee=ee.next={eventTime:ce,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var xe=e,ye=_;switch(q=t,ce=s,ye.tag){case 1:if(xe=ye.payload,typeof xe=="function"){te=xe.call(ce,te,q);break e}te=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ye.payload,q=typeof xe=="function"?xe.call(ce,te,q):xe,q==null)break e;te=X({},te,q);break e;case 2:ar=!0}}_.callback!==null&&_.lane!==0&&(e.flags|=64,q=u.effects,q===null?u.effects=[_]:q.push(_))}else ce={eventTime:ce,lane:q,tag:_.tag,payload:_.payload,callback:_.callback,next:null},ee===null?(F=ee=ce,I=te):ee=ee.next=ce,w|=q;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;q=_,_=q.next,q.next=null,u.lastBaseUpdate=q,u.shared.pending=null}}while(!0);if(ee===null&&(I=te),u.baseState=I,u.firstBaseUpdate=F,u.lastBaseUpdate=ee,t=u.shared.interleaved,t!==null){u=t;do w|=u.lane,u=u.next;while(u!==t)}else h===null&&(u.shared.lanes=0);Dr|=w,e.lanes=w,e.memoizedState=te}}function Nf(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;ts?s:4,e(!0);var o=Ui.transition;Ui.transition={};try{e(!1),t()}finally{Ke=s,Ui.transition=o}}function $f(){return Jt().memoizedState}function cv(e,t,s){var o=ur(e);if(s={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null},Bf(e))Uf(t,s);else if(s=vf(e,t,s,o),s!==null){var u=Tt();un(s,e,o,u),Vf(s,t,o)}}function uv(e,t,s){var o=ur(e),u={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null};if(Bf(e))Uf(t,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var w=t.lastRenderedState,_=h(w,s);if(u.hasEagerState=!0,u.eagerState=_,sn(_,w)){var I=t.interleaved;I===null?(u.next=u,Di(t)):(u.next=I.next,I.next=u),t.interleaved=u;return}}catch{}finally{}s=vf(e,t,u,o),s!==null&&(u=Tt(),un(s,e,o,u),Vf(s,t,o))}}function Bf(e){var t=e.alternate;return e===st||t!==null&&t===st}function Uf(e,t){pa=yl=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Vf(e,t,s){if((s&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,qo(e,s)}}var jl={readContext:qt,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useInsertionEffect:kt,useLayoutEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useMutableSource:kt,useSyncExternalStore:kt,useId:kt,unstable_isNewReconciler:!1},dv={readContext:qt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:If,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,wl(4194308,4,Lf.bind(null,t,e),s)},useLayoutEffect:function(e,t){return wl(4194308,4,e,t)},useInsertionEffect:function(e,t){return wl(4,2,e,t)},useMemo:function(e,t){var s=wn();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var o=wn();return t=s!==void 0?s(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=cv.bind(null,st,e),[o.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:_f,useDebugValue:Yi,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=_f(!1),t=e[0];return e=iv.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var o=st,u=wn();if(Ze){if(s===void 0)throw Error(l(407));s=s()}else{if(s=t(),yt===null)throw Error(l(349));(Lr&30)!==0||Cf(o,t,s)}u.memoizedState=s;var h={value:s,getSnapshot:t};return u.queue=h,If(Ef.bind(null,o,h,e),[e]),o.flags|=2048,va(9,kf.bind(null,o,h,s,t),void 0,null),s},useId:function(){var e=wn(),t=yt.identifierPrefix;if(Ze){var s=Ln,o=Mn;s=(o&~(1<<32-rn(o)-1)).toString(32)+s,t=":"+t+"R"+s,s=xa++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=w.createElement(s,{is:o.is}):(e=w.createElement(s),s==="select"&&(w=e,o.multiple?w.multiple=!0:o.size&&(w.size=o.size))):e=w.createElementNS(e,s),e[vn]=t,e[ca]=o,ch(e,t,!1,!1),t.stateNode=e;e:{switch(w=Bo(s,o),s){case"dialog":qe("cancel",e),qe("close",e),u=o;break;case"iframe":case"object":case"embed":qe("load",e),u=o;break;case"video":case"audio":for(u=0;uys&&(t.flags|=128,o=!0,ya(h,!1),t.lanes=4194304)}else{if(!o)if(e=gl(w),e!==null){if(t.flags|=128,o=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),ya(h,!0),h.tail===null&&h.tailMode==="hidden"&&!w.alternate&&!Ze)return Et(t),null}else 2*ot()-h.renderingStartTime>ys&&s!==1073741824&&(t.flags|=128,o=!0,ya(h,!1),t.lanes=4194304);h.isBackwards?(w.sibling=t.child,t.child=w):(s=h.last,s!==null?s.sibling=w:t.child=w,h.last=w)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=ot(),t.sibling=null,s=rt.current,Qe(rt,o?s&1|2:s&1),t):(Et(t),null);case 22:case 23:return yc(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(Kt&1073741824)!==0&&(Et(t),t.subtreeFlags&6&&(t.flags|=8192)):Et(t),null;case 24:return null;case 25:return null}throw Error(l(156,t.tag))}function yv(e,t){switch(Pi(t),t.tag){case 1:return Lt(t.type)&&ll(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ps(),Je(Mt),Je(Ct),Bi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return zi(t),null;case 13:if(Je(rt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Je(rt),null;case 4:return ps(),null;case 10:return Mi(t.type._context),null;case 22:case 23:return yc(),null;case 24:return null;default:return null}}var kl=!1,Pt=!1,wv=typeof WeakSet=="function"?WeakSet:Set,pe=null;function gs(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(o){at(e,t,o)}else s.current=null}function oc(e,t,s){try{s()}catch(o){at(e,t,o)}}var fh=!1;function Nv(e,t){if(yi=Ka,e=Vd(),di(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var u=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var w=0,_=-1,I=-1,F=0,ee=0,te=e,q=null;t:for(;;){for(var ce;te!==s||u!==0&&te.nodeType!==3||(_=w+u),te!==h||o!==0&&te.nodeType!==3||(I=w+o),te.nodeType===3&&(w+=te.nodeValue.length),(ce=te.firstChild)!==null;)q=te,te=ce;for(;;){if(te===e)break t;if(q===s&&++F===u&&(_=w),q===h&&++ee===o&&(I=w),(ce=te.nextSibling)!==null)break;te=q,q=te.parentNode}te=ce}s=_===-1||I===-1?null:{start:_,end:I}}else s=null}s=s||{start:0,end:0}}else s=null;for(wi={focusedElem:e,selectionRange:s},Ka=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var xe=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var ye=xe.memoizedProps,it=xe.memoizedState,D=t.stateNode,M=D.getSnapshotBeforeUpdate(t.elementType===t.type?ye:ln(t.type,ye),it);D.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(se){at(t,t.return,se)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return xe=fh,fh=!1,xe}function wa(e,t,s){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&e)===e){var h=u.destroy;u.destroy=void 0,h!==void 0&&oc(t,s,h)}u=u.next}while(u!==o)}}function El(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 o=s.create;s.destroy=o()}s=s.next}while(s!==t)}}function ic(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 hh(e){var t=e.alternate;t!==null&&(e.alternate=null,hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vn],delete t[ca],delete t[Si],delete t[rv],delete t[sv])),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 mh(e){return e.tag===5||e.tag===3||e.tag===4}function ph(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mh(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 cc(e,t,s){var o=e.tag;if(o===5||o===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=sl));else if(o!==4&&(e=e.child,e!==null))for(cc(e,t,s),e=e.sibling;e!==null;)cc(e,t,s),e=e.sibling}function uc(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(uc(e,t,s),e=e.sibling;e!==null;)uc(e,t,s),e=e.sibling}var jt=null,on=!1;function or(e,t,s){for(s=s.child;s!==null;)xh(e,t,s),s=s.sibling}function xh(e,t,s){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount($a,s)}catch{}switch(s.tag){case 5:Pt||gs(s,t);case 6:var o=jt,u=on;jt=null,or(e,t,s),jt=o,on=u,jt!==null&&(on?(e=jt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):jt.removeChild(s.stateNode));break;case 18:jt!==null&&(on?(e=jt,s=s.stateNode,e.nodeType===8?bi(e.parentNode,s):e.nodeType===1&&bi(e,s),Js(e)):bi(jt,s.stateNode));break;case 4:o=jt,u=on,jt=s.stateNode.containerInfo,on=!0,or(e,t,s),jt=o,on=u;break;case 0:case 11:case 14:case 15:if(!Pt&&(o=s.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){u=o=o.next;do{var h=u,w=h.destroy;h=h.tag,w!==void 0&&((h&2)!==0||(h&4)!==0)&&oc(s,t,w),u=u.next}while(u!==o)}or(e,t,s);break;case 1:if(!Pt&&(gs(s,t),o=s.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=s.memoizedProps,o.state=s.memoizedState,o.componentWillUnmount()}catch(_){at(s,t,_)}or(e,t,s);break;case 21:or(e,t,s);break;case 22:s.mode&1?(Pt=(o=Pt)||s.memoizedState!==null,or(e,t,s),Pt=o):or(e,t,s);break;default:or(e,t,s)}}function gh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new wv),t.forEach(function(o){var u=_v.bind(null,e,o);s.has(o)||(s.add(o),o.then(u,u))})}}function cn(e,t){var s=t.deletions;if(s!==null)for(var o=0;ou&&(u=w),o&=~h}if(o=u,o=ot()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*bv(o/1960))-o,10e?16:e,cr===null)var o=!1;else{if(e=cr,cr=null,Il=0,($e&6)!==0)throw Error(l(331));var u=$e;for($e|=4,pe=e.current;pe!==null;){var h=pe,w=h.child;if((pe.flags&16)!==0){var _=h.deletions;if(_!==null){for(var I=0;I<_.length;I++){var F=_[I];for(pe=F;pe!==null;){var ee=pe;switch(ee.tag){case 0:case 11:case 15:wa(8,ee,h)}var te=ee.child;if(te!==null)te.return=ee,pe=te;else for(;pe!==null;){ee=pe;var q=ee.sibling,ce=ee.return;if(hh(ee),ee===F){pe=null;break}if(q!==null){q.return=ce,pe=q;break}pe=ce}}}var xe=h.alternate;if(xe!==null){var ye=xe.child;if(ye!==null){xe.child=null;do{var it=ye.sibling;ye.sibling=null,ye=it}while(ye!==null)}}pe=h}}if((h.subtreeFlags&2064)!==0&&w!==null)w.return=h,pe=w;else e:for(;pe!==null;){if(h=pe,(h.flags&2048)!==0)switch(h.tag){case 0:case 11:case 15:wa(9,h,h.return)}var D=h.sibling;if(D!==null){D.return=h.return,pe=D;break e}pe=h.return}}var M=e.current;for(pe=M;pe!==null;){w=pe;var O=w.child;if((w.subtreeFlags&2064)!==0&&O!==null)O.return=w,pe=O;else e:for(w=M;pe!==null;){if(_=pe,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:El(9,_)}}catch(Ne){at(_,_.return,Ne)}if(_===w){pe=null;break e}var se=_.sibling;if(se!==null){se.return=_.return,pe=se;break e}pe=_.return}}if($e=u,sr(),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot($a,e)}catch{}o=!0}return o}finally{Ke=s,Zt.transition=t}}return!1}function Rh(e,t,s){t=xs(s,t),t=Gf(e,t,1),e=lr(e,t,1),t=Tt(),e!==null&&(Gs(e,1,t),Ft(e,t))}function at(e,t,s){if(e.tag===3)Rh(e,e,s);else for(;t!==null;){if(t.tag===3){Rh(t,e,s);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ir===null||!ir.has(o))){e=xs(s,e),e=Qf(t,e,1),t=lr(t,e,1),e=Tt(),t!==null&&(Gs(t,1,e),Ft(t,e));break}}t=t.return}}function Pv(e,t,s){var o=e.pingCache;o!==null&&o.delete(t),t=Tt(),e.pingedLanes|=e.suspendedLanes&s,yt===e&&(bt&s)===s&&(mt===4||mt===3&&(bt&130023424)===bt&&500>ot()-hc?Fr(e,0):fc|=s),Ft(e,t)}function _h(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ua,Ua<<=1,(Ua&130023424)===0&&(Ua=4194304)));var s=Tt();e=Dn(e,t),e!==null&&(Gs(e,t,s),Ft(e,s))}function Rv(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),_h(e,s)}function _v(e,t){var s=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(s=u.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(l(314))}o!==null&&o.delete(t),_h(e,s)}var Th;Th=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)Dt=!0;else{if((e.lanes&s)===0&&(t.flags&128)===0)return Dt=!1,gv(e,t,s);Dt=(e.flags&131072)!==0}else Dt=!1,Ze&&(t.flags&1048576)!==0&&uf(t,ul,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Cl(e,t),e=t.pendingProps;var u=is(t,Ct.current);ms(t,s),u=Wi(null,t,o,e,u,s);var h=Hi();return t.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lt(o)?(h=!0,ol(t)):h=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Oi(t),u.updater=bl,t.stateNode=u,u._reactInternals=t,qi(t,o,e,s),t=tc(null,t,o,!0,h,s)):(t.tag=0,Ze&&h&&Ei(t),_t(null,t,u,s),t=t.child),t;case 16:o=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,u=o._init,o=u(o._payload),t.type=o,u=t.tag=Iv(o),e=ln(o,e),u){case 0:t=ec(null,t,o,e,s);break e;case 1:t=rh(null,t,o,e,s);break e;case 11:t=Jf(null,t,o,e,s);break e;case 14:t=Zf(null,t,o,ln(o.type,e),s);break e}throw Error(l(306,o,""))}return t;case 0:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:ln(o,u),ec(e,t,o,u,s);case 1:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:ln(o,u),rh(e,t,o,u,s);case 3:e:{if(sh(t),e===null)throw Error(l(387));o=t.pendingProps,h=t.memoizedState,u=h.element,yf(e,t),xl(t,o,null,s);var w=t.memoizedState;if(o=w.element,h.isDehydrated)if(h={element:o,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){u=xs(Error(l(423)),t),t=ah(e,t,o,s,u);break e}else if(o!==u){u=xs(Error(l(424)),t),t=ah(e,t,o,s,u);break e}else for(Ht=tr(t.stateNode.containerInfo.firstChild),Wt=t,Ze=!0,an=null,s=gf(t,null,o,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(ds(),o===u){t=Fn(e,t,s);break e}_t(e,t,o,s)}t=t.child}return t;case 5:return jf(t),e===null&&_i(t),o=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,w=u.children,Ni(o,u)?w=null:h!==null&&Ni(o,h)&&(t.flags|=32),nh(e,t),_t(e,t,w,s),t.child;case 6:return e===null&&_i(t),null;case 13:return lh(e,t,s);case 4:return Fi(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=fs(t,null,o,s):_t(e,t,o,s),t.child;case 11:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:ln(o,u),Jf(e,t,o,u,s);case 7:return _t(e,t,t.pendingProps,s),t.child;case 8:return _t(e,t,t.pendingProps.children,s),t.child;case 12:return _t(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(o=t.type._context,u=t.pendingProps,h=t.memoizedProps,w=u.value,Qe(hl,o._currentValue),o._currentValue=w,h!==null)if(sn(h.value,w)){if(h.children===u.children&&!Mt.current){t=Fn(e,t,s);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var _=h.dependencies;if(_!==null){w=h.child;for(var I=_.firstContext;I!==null;){if(I.context===o){if(h.tag===1){I=On(-1,s&-s),I.tag=2;var F=h.updateQueue;if(F!==null){F=F.shared;var ee=F.pending;ee===null?I.next=I:(I.next=ee.next,ee.next=I),F.pending=I}}h.lanes|=s,I=h.alternate,I!==null&&(I.lanes|=s),Li(h.return,s,t),_.lanes|=s;break}I=I.next}}else if(h.tag===10)w=h.type===t.type?null:h.child;else if(h.tag===18){if(w=h.return,w===null)throw Error(l(341));w.lanes|=s,_=w.alternate,_!==null&&(_.lanes|=s),Li(w,s,t),w=h.sibling}else w=h.child;if(w!==null)w.return=h;else for(w=h;w!==null;){if(w===t){w=null;break}if(h=w.sibling,h!==null){h.return=w.return,w=h;break}w=w.return}h=w}_t(e,t,u.children,s),t=t.child}return t;case 9:return u=t.type,o=t.pendingProps.children,ms(t,s),u=qt(u),o=o(u),t.flags|=1,_t(e,t,o,s),t.child;case 14:return o=t.type,u=ln(o,t.pendingProps),u=ln(o.type,u),Zf(e,t,o,u,s);case 15:return eh(e,t,t.type,t.pendingProps,s);case 17:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:ln(o,u),Cl(e,t),t.tag=1,Lt(o)?(e=!0,ol(t)):e=!1,ms(t,s),Hf(t,o,u),qi(t,o,u,s),tc(null,t,o,!0,e,s);case 19:return ih(e,t,s);case 22:return th(e,t,s)}throw Error(l(156,t.tag))};function Ih(e,t){return ud(e,t)}function Tv(e,t,s,o){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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,s,o){return new Tv(e,t,s,o)}function Nc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Iv(e){if(typeof e=="function")return Nc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===H)return 11;if(e===re)return 14}return 2}function fr(e,t){var s=e.alternate;return s===null?(s=en(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 Dl(e,t,s,o,u,h){var w=2;if(o=e,typeof e=="function")Nc(e)&&(w=1);else if(typeof e=="string")w=5;else e:switch(e){case G:return $r(s.children,u,h,t);case U:w=8,u|=8;break;case ie:return e=en(12,s,t,u|2),e.elementType=ie,e.lanes=h,e;case P:return e=en(13,s,t,u),e.elementType=P,e.lanes=h,e;case K:return e=en(19,s,t,u),e.elementType=K,e.lanes=h,e;case $:return Ol(s,u,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:w=10;break e;case oe:w=9;break e;case H:w=11;break e;case re:w=14;break e;case W:w=16,o=null;break e}throw Error(l(130,e==null?e:typeof e,""))}return t=en(w,s,t,u),t.elementType=e,t.type=o,t.lanes=h,t}function $r(e,t,s,o){return e=en(7,e,o,t),e.lanes=s,e}function Ol(e,t,s,o){return e=en(22,e,o,t),e.elementType=$,e.lanes=s,e.stateNode={isHidden:!1},e}function jc(e,t,s){return e=en(6,e,null,t),e.lanes=s,e}function bc(e,t,s){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Av(e,t,s,o,u){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=Xo(0),this.expirationTimes=Xo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xo(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Sc(e,t,s,o,u,h,w,_,I){return e=new Av(e,t,s,_,I),t===1?(t=1,h===!0&&(t|=8)):t=0,h=en(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:o,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oi(h),e}function Mv(e,t,s){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(a){console.error(a)}}return r(),_c.exports=Kv(),_c.exports}var Kh;function Gv(){if(Kh)return Wl;Kh=1;var r=Gm();return Wl.createRoot=r.createRoot,Wl.hydrateRoot=r.hydrateRoot,Wl}var Qv=Gv(),Ia=Gm();const Yv=Km(Ia);/** + * @remix-run/router v1.23.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Pa(){return Pa=Object.assign?Object.assign.bind():function(r){for(var a=1;a"u")throw new Error(a)}function wu(r,a){if(!r){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function qv(){return Math.random().toString(36).substr(2,8)}function Qh(r,a){return{usr:r.state,key:r.key,idx:a}}function Qc(r,a,l,i){return l===void 0&&(l=null),Pa({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof a=="string"?Ms(a):a,{state:l,key:a&&a.key||i||qv()})}function ao(r){let{pathname:a="/",search:l="",hash:i=""}=r;return l&&l!=="?"&&(a+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(a+=i.charAt(0)==="#"?i:"#"+i),a}function Ms(r){let a={};if(r){let l=r.indexOf("#");l>=0&&(a.hash=r.substr(l),r=r.substr(0,l));let i=r.indexOf("?");i>=0&&(a.search=r.substr(i),r=r.substr(0,i)),r&&(a.pathname=r)}return a}function Jv(r,a,l,i){i===void 0&&(i={});let{window:c=document.defaultView,v5Compat:d=!1}=i,f=c.history,m=vr.Pop,x=null,g=v();g==null&&(g=0,f.replaceState(Pa({},f.state,{idx:g}),""));function v(){return(f.state||{idx:null}).idx}function y(){m=vr.Pop;let j=v(),N=j==null?null:j-g;g=j,x&&x({action:m,location:b.location,delta:N})}function E(j,N){m=vr.Push;let R=Qc(b.location,j,N);g=v()+1;let S=Qh(R,g),A=b.createHref(R);try{f.pushState(S,"",A)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;c.location.assign(A)}d&&x&&x({action:m,location:b.location,delta:1})}function k(j,N){m=vr.Replace;let R=Qc(b.location,j,N);g=v();let S=Qh(R,g),A=b.createHref(R);f.replaceState(S,"",A),d&&x&&x({action:m,location:b.location,delta:0})}function C(j){let N=c.location.origin!=="null"?c.location.origin:c.location.href,R=typeof j=="string"?j:ao(j);return R=R.replace(/ $/,"%20"),ct(N,"No window.location.(origin|href) available to create URL for href: "+R),new URL(R,N)}let b={get action(){return m},get location(){return r(c,f)},listen(j){if(x)throw new Error("A history only accepts one active listener");return c.addEventListener(Gh,y),x=j,()=>{c.removeEventListener(Gh,y),x=null}},createHref(j){return a(c,j)},createURL:C,encodeLocation(j){let N=C(j);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:E,replace:k,go(j){return f.go(j)}};return b}var Yh;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Yh||(Yh={}));function Zv(r,a,l){return l===void 0&&(l="/"),ey(r,a,l)}function ey(r,a,l,i){let c=typeof a=="string"?Ms(a):a,d=Nu(c.pathname||"/",l);if(d==null)return null;let f=Qm(r);ty(f);let m=null;for(let x=0;m==null&&x{let x={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:f,route:d};x.relativePath.startsWith("/")&&(ct(x.relativePath.startsWith(i),'Absolute route path "'+x.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),x.relativePath=x.relativePath.slice(i.length));let g=yr([i,x.relativePath]),v=l.concat(x);d.children&&d.children.length>0&&(ct(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),Qm(d.children,a,v,g)),!(d.path==null&&!d.index)&&a.push({path:g,score:iy(g,d.index),routesMeta:v})};return r.forEach((d,f)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))c(d,f);else for(let x of Ym(d.path))c(d,f,x)}),a}function Ym(r){let a=r.split("/");if(a.length===0)return[];let[l,...i]=a,c=l.endsWith("?"),d=l.replace(/\?$/,"");if(i.length===0)return c?[d,""]:[d];let f=Ym(i.join("/")),m=[];return m.push(...f.map(x=>x===""?d:[d,x].join("/"))),c&&m.push(...f),m.map(x=>r.startsWith("/")&&x===""?"/":x)}function ty(r){r.sort((a,l)=>a.score!==l.score?l.score-a.score:cy(a.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}const ny=/^:[\w-]+$/,ry=3,sy=2,ay=1,ly=10,oy=-2,Xh=r=>r==="*";function iy(r,a){let l=r.split("/"),i=l.length;return l.some(Xh)&&(i+=oy),a&&(i+=sy),l.filter(c=>!Xh(c)).reduce((c,d)=>c+(ny.test(d)?ry:d===""?ay:ly),i)}function cy(r,a){return r.length===a.length&&r.slice(0,-1).every((i,c)=>i===a[c])?r[r.length-1]-a[a.length-1]:0}function uy(r,a,l){let{routesMeta:i}=r,c={},d="/",f=[];for(let m=0;m{let{paramName:E,isOptional:k}=v;if(E==="*"){let b=m[y]||"";f=d.slice(0,d.length-b.length).replace(/(.)\/+$/,"$1")}const C=m[y];return k&&!C?g[E]=void 0:g[E]=(C||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:f,pattern:r}}function fy(r,a,l){a===void 0&&(a=!1),l===void 0&&(l=!0),wu(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let i=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,m,x)=>(i.push({paramName:m,isOptional:x!=null}),x?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(i.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),i]}function hy(r){try{return r.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return wu(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+a+").")),r}}function Nu(r,a){if(a==="/")return r;if(!r.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,i=r.charAt(l);return i&&i!=="/"?null:r.slice(l)||"/"}const my=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,py=r=>my.test(r);function xy(r,a){a===void 0&&(a="/");let{pathname:l,search:i="",hash:c=""}=typeof r=="string"?Ms(r):r,d;if(l)if(py(l))d=l;else{if(l.includes("//")){let f=l;l=l.replace(/\/\/+/g,"/"),wu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(f+" -> "+l))}l.startsWith("/")?d=qh(l.substring(1),"/"):d=qh(l,a)}else d=a;return{pathname:d,search:yy(i),hash:wy(c)}}function qh(r,a){let l=a.replace(/\/+$/,"").split("/");return r.split("/").forEach(c=>{c===".."?l.length>1&&l.pop():c!=="."&&l.push(c)}),l.length>1?l.join("/"):"/"}function Ac(r,a,l,i){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+a+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+l+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function gy(r){return r.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function ju(r,a){let l=gy(r);return a?l.map((i,c)=>c===l.length-1?i.pathname:i.pathnameBase):l.map(i=>i.pathnameBase)}function bu(r,a,l,i){i===void 0&&(i=!1);let c;typeof r=="string"?c=Ms(r):(c=Pa({},r),ct(!c.pathname||!c.pathname.includes("?"),Ac("?","pathname","search",c)),ct(!c.pathname||!c.pathname.includes("#"),Ac("#","pathname","hash",c)),ct(!c.search||!c.search.includes("#"),Ac("#","search","hash",c)));let d=r===""||c.pathname==="",f=d?"/":c.pathname,m;if(f==null)m=l;else{let y=a.length-1;if(!i&&f.startsWith("..")){let E=f.split("/");for(;E[0]==="..";)E.shift(),y-=1;c.pathname=E.join("/")}m=y>=0?a[y]:"/"}let x=xy(c,m),g=f&&f!=="/"&&f.endsWith("/"),v=(d||f===".")&&l.endsWith("/");return!x.pathname.endsWith("/")&&(g||v)&&(x.pathname+="/"),x}const yr=r=>r.join("/").replace(/\/\/+/g,"/"),vy=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),yy=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,wy=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function Ny(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const Xm=["post","put","patch","delete"];new Set(Xm);const jy=["get",...Xm];new Set(jy);/** + * React Router v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ra(){return Ra=Object.assign?Object.assign.bind():function(r){for(var a=1;a{m.current=!0}),p.useCallback(function(g,v){if(v===void 0&&(v={}),!m.current)return;if(typeof g=="number"){i.go(g);return}let y=bu(g,JSON.parse(f),d,v.relative==="path");r==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:yr([a,y.pathname])),(v.replace?i.replace:i.push)(y,v.state,v)},[a,i,f,d,r])}const ky=p.createContext(null);function Ey(r){let a=p.useContext(Gn).outlet;return a&&p.createElement(ky.Provider,{value:r},a)}function Zm(r,a){let{relative:l}=a===void 0?{}:a,{future:i}=p.useContext(Sr),{matches:c}=p.useContext(Gn),{pathname:d}=Xr(),f=JSON.stringify(ju(c,i.v7_relativeSplatPath));return p.useMemo(()=>bu(r,JSON.parse(f),d,l==="path"),[r,f,d,l])}function Py(r,a){return Ry(r,a)}function Ry(r,a,l,i){Ls()||ct(!1);let{navigator:c}=p.useContext(Sr),{matches:d}=p.useContext(Gn),f=d[d.length-1],m=f?f.params:{};f&&f.pathname;let x=f?f.pathnameBase:"/";f&&f.route;let g=Xr(),v;if(a){var y;let j=typeof a=="string"?Ms(a):a;x==="/"||(y=j.pathname)!=null&&y.startsWith(x)||ct(!1),v=j}else v=g;let E=v.pathname||"/",k=E;if(x!=="/"){let j=x.replace(/^\//,"").split("/");k="/"+E.replace(/^\//,"").split("/").slice(j.length).join("/")}let C=Zv(r,{pathname:k}),b=My(C&&C.map(j=>Object.assign({},j,{params:Object.assign({},m,j.params),pathname:yr([x,c.encodeLocation?c.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?x:yr([x,c.encodeLocation?c.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),d,l,i);return a&&b?p.createElement(wo.Provider,{value:{location:Ra({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:vr.Pop}},b):b}function _y(){let r=Fy(),a=Ny(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),l=r instanceof Error?r.stack:null,c={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},a),l?p.createElement("pre",{style:c},l):null,null)}const Ty=p.createElement(_y,null);class Iy extends p.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,l){return l.location!==a.location||l.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:l.error,location:l.location,revalidation:a.revalidation||l.revalidation}}componentDidCatch(a,l){console.error("React Router caught the following error during render",a,l)}render(){return this.state.error!==void 0?p.createElement(Gn.Provider,{value:this.props.routeContext},p.createElement(qm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ay(r){let{routeContext:a,match:l,children:i}=r,c=p.useContext(Su);return c&&c.static&&c.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=l.route.id),p.createElement(Gn.Provider,{value:a},i)}function My(r,a,l,i){var c;if(a===void 0&&(a=[]),l===void 0&&(l=null),i===void 0&&(i=null),r==null){var d;if(!l)return null;if(l.errors)r=l.matches;else if((d=i)!=null&&d.v7_partialHydration&&a.length===0&&!l.initialized&&l.matches.length>0)r=l.matches;else return null}let f=r,m=(c=l)==null?void 0:c.errors;if(m!=null){let v=f.findIndex(y=>y.route.id&&(m==null?void 0:m[y.route.id])!==void 0);v>=0||ct(!1),f=f.slice(0,Math.min(f.length,v+1))}let x=!1,g=-1;if(l&&i&&i.v7_partialHydration)for(let v=0;v=0?f=f.slice(0,g+1):f=[f[0]];break}}}return f.reduceRight((v,y,E)=>{let k,C=!1,b=null,j=null;l&&(k=m&&y.route.id?m[y.route.id]:void 0,b=y.route.errorElement||Ty,x&&(g<0&&E===0?($y("route-fallback"),C=!0,j=null):g===E&&(C=!0,j=y.route.hydrateFallbackElement||null)));let N=a.concat(f.slice(0,E+1)),R=()=>{let S;return k?S=b:C?S=j:y.route.Component?S=p.createElement(y.route.Component,null):y.route.element?S=y.route.element:S=v,p.createElement(Ay,{match:y,routeContext:{outlet:v,matches:N,isDataRoute:l!=null},children:S})};return l&&(y.route.ErrorBoundary||y.route.errorElement||E===0)?p.createElement(Iy,{location:l.location,revalidation:l.revalidation,component:b,error:k,children:R(),routeContext:{outlet:null,matches:N,isDataRoute:!0}}):R()},null)}var ep=(function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r})(ep||{}),tp=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(tp||{});function Ly(r){let a=p.useContext(Su);return a||ct(!1),a}function Dy(r){let a=p.useContext(by);return a||ct(!1),a}function Oy(r){let a=p.useContext(Gn);return a||ct(!1),a}function np(r){let a=Oy(),l=a.matches[a.matches.length-1];return l.route.id||ct(!1),l.route.id}function Fy(){var r;let a=p.useContext(qm),l=Dy(),i=np();return a!==void 0?a:(r=l.errors)==null?void 0:r[i]}function zy(){let{router:r}=Ly(ep.UseNavigateStable),a=np(tp.UseNavigateStable),l=p.useRef(!1);return Jm(()=>{l.current=!0}),p.useCallback(function(c,d){d===void 0&&(d={}),l.current&&(typeof c=="number"?r.navigate(c):r.navigate(c,Ra({fromRouteId:a},d)))},[r,a])}const Jh={};function $y(r,a,l){Jh[r]||(Jh[r]=!0)}function By(r,a){r==null||r.v7_startTransition,r==null||r.v7_relativeSplatPath}function Uy(r){let{to:a,replace:l,state:i,relative:c}=r;Ls()||ct(!1);let{future:d,static:f}=p.useContext(Sr),{matches:m}=p.useContext(Gn),{pathname:x}=Xr(),g=Aa(),v=bu(a,ju(m,d.v7_relativeSplatPath),x,c==="path"),y=JSON.stringify(v);return p.useEffect(()=>g(JSON.parse(y),{replace:l,state:i,relative:c}),[g,y,c,l,i]),null}function Vy(r){return Ey(r.context)}function Nt(r){ct(!1)}function Wy(r){let{basename:a="/",children:l=null,location:i,navigationType:c=vr.Pop,navigator:d,static:f=!1,future:m}=r;Ls()&&ct(!1);let x=a.replace(/^\/*/,"/"),g=p.useMemo(()=>({basename:x,navigator:d,static:f,future:Ra({v7_relativeSplatPath:!1},m)}),[x,m,d,f]);typeof i=="string"&&(i=Ms(i));let{pathname:v="/",search:y="",hash:E="",state:k=null,key:C="default"}=i,b=p.useMemo(()=>{let j=Nu(v,x);return j==null?null:{location:{pathname:j,search:y,hash:E,state:k,key:C},navigationType:c}},[x,v,y,E,k,C,c]);return b==null?null:p.createElement(Sr.Provider,{value:g},p.createElement(wo.Provider,{children:l,value:b}))}function Hy(r){let{children:a,location:l}=r;return Py(Yc(a),l)}new Promise(()=>{});function Yc(r,a){a===void 0&&(a=[]);let l=[];return p.Children.forEach(r,(i,c)=>{if(!p.isValidElement(i))return;let d=[...a,c];if(i.type===p.Fragment){l.push.apply(l,Yc(i.props.children,d));return}i.type!==Nt&&ct(!1),!i.props.index||!i.props.children||ct(!1);let f={id:i.props.id||d.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(f.children=Yc(i.props.children,d)),l.push(f)}),l}/** + * React Router DOM v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Xc(){return Xc=Object.assign?Object.assign.bind():function(r){for(var a=1;a=0)&&(l[c]=r[c]);return l}function Gy(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Qy(r,a){return r.button===0&&(!a||a==="_self")&&!Gy(r)}const Yy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Xy="6";try{window.__reactRouterVersion=Xy}catch{}const qy="startTransition",Zh=yo[qy];function Jy(r){let{basename:a,children:l,future:i,window:c}=r,d=p.useRef();d.current==null&&(d.current=Xv({window:c,v5Compat:!0}));let f=d.current,[m,x]=p.useState({action:f.action,location:f.location}),{v7_startTransition:g}=i||{},v=p.useCallback(y=>{g&&Zh?Zh(()=>x(y)):x(y)},[x,g]);return p.useLayoutEffect(()=>f.listen(v),[f,v]),p.useEffect(()=>By(i),[i]),p.createElement(Wy,{basename:a,children:l,location:m.location,navigationType:m.action,navigator:f,future:i})}const Zy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ew=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rp=p.forwardRef(function(a,l){let{onClick:i,relative:c,reloadDocument:d,replace:f,state:m,target:x,to:g,preventScrollReset:v,viewTransition:y}=a,E=Ky(a,Yy),{basename:k}=p.useContext(Sr),C,b=!1;if(typeof g=="string"&&ew.test(g)&&(C=g,Zy))try{let S=new URL(window.location.href),A=g.startsWith("//")?new URL(S.protocol+g):new URL(g),V=Nu(A.pathname,k);A.origin===S.origin&&V!=null?g=V+A.search+A.hash:b=!0}catch{}let j=Sy(g,{relative:c}),N=tw(g,{replace:f,state:m,target:x,preventScrollReset:v,relative:c,viewTransition:y});function R(S){i&&i(S),S.defaultPrevented||N(S)}return p.createElement("a",Xc({},E,{href:C||j,onClick:b||d?i:R,ref:l,target:x}))});var em;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(em||(em={}));var tm;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(tm||(tm={}));function tw(r,a){let{target:l,replace:i,state:c,preventScrollReset:d,relative:f,viewTransition:m}=a===void 0?{}:a,x=Aa(),g=Xr(),v=Zm(r,{relative:f});return p.useCallback(y=>{if(Qy(y,l)){y.preventDefault();let E=i!==void 0?i:ao(g)===ao(v);x(r,{replace:E,state:c,preventScrollReset:d,relative:f,viewTransition:m})}},[g,x,v,i,c,l,r,d,f,m])}/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nw=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rw=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,i)=>i?i.toUpperCase():l.toLowerCase()),nm=r=>{const a=rw(r);return a.charAt(0).toUpperCase()+a.slice(1)},sp=(...r)=>r.filter((a,l,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===l).join(" ").trim(),sw=r=>{for(const a in r)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var aw={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.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lw=p.forwardRef(({color:r="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:c="",children:d,iconNode:f,...m},x)=>p.createElement("svg",{ref:x,...aw,width:a,height:a,stroke:r,strokeWidth:i?Number(l)*24/Number(a):l,className:sp("lucide",c),...!d&&!sw(m)&&{"aria-hidden":"true"},...m},[...f.map(([g,v])=>p.createElement(g,v)),...Array.isArray(d)?d:[d]]));/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const we=(r,a)=>{const l=p.forwardRef(({className:i,...c},d)=>p.createElement(lw,{ref:d,iconNode:a,className:sp(`lucide-${nw(nm(r))}`,`lucide-${r}`,i),...c}));return l.displayName=nm(r),l};/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ow=[["path",{d:"M11.767 19.089c4.924.868 6.14-6.025 1.216-6.894m-1.216 6.894L5.86 18.047m5.908 1.042-.347 1.97m1.563-8.864c4.924.869 6.14-6.025 1.215-6.893m-1.215 6.893-3.94-.694m5.155-6.2L8.29 4.26m5.908 1.042.348-1.97M7.48 20.364l3.126-17.727",key:"yr8idg"}]],rm=we("bitcoin",ow);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iw=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],_s=we("book-open",iw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cw=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],qc=we("calendar",cw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],No=we("check",uw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dw=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ap=we("chevron-down",dw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fw=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],hw=we("chevron-left",fw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Cu=we("chevron-right",mw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pw=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xw=we("chevron-up",pw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gw=[["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"}]],vw=we("circle-alert",gw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yw=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Jc=we("circle-check-big",yw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ww=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lp=we("circle-question-mark",ww);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],sm=we("circle-user",Nw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jw=[["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"}]],bw=we("circle-x",jw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sw=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],op=we("clock",Sw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cw=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ip=we("copy",Cw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kw=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Zc=we("credit-card",kw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ew=[["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"}]],Pw=we("database",Ew);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rw=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],lo=we("dollar-sign",Rw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _w=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],cp=we("download",_w);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tw=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],oo=we("external-link",Tw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Iw=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ku=we("eye",Iw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Aw=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],up=we("file-text",Aw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mw=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Lw=we("funnel",Mw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dw=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],am=we("gift",Dw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ow=[["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"}]],eu=we("globe",Ow);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],lm=we("history",Fw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zw=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],$w=we("house",zw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bw=[["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"}]],Uw=we("image",Bw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],om=we("info",Vw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ww=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],im=we("key",Ww);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Hw=[["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"}]],Kw=we("layout-dashboard",Hw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Gw=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],ks=we("link-2",Gw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qw=[["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"}]],cm=we("link",Qw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Yw=[["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"}]],Xw=we("lock",Yw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qw=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Jw=we("log-out",qw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zw=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],e1=we("map-pin",Zw);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t1=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],n1=we("menu",t1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r1=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],s1=we("message-circle",r1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a1=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],l1=we("palette",a1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o1=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Ts=we("pen-line",o1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const i1=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],um=we("percent",i1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c1=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],u1=we("phone",c1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Es=we("plus",d1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f1=[["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"}]],dm=we("qr-code",f1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const h1=[["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"}]],et=we("refresh-cw",h1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m1=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Vn=we("save",m1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const p1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Vr=we("search",p1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],io=we("settings",x1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const g1=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],v1=we("settings-2",g1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],w1=we("shield-check",y1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const N1=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],tu=we("shopping-bag",N1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j1=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],fm=we("smartphone",j1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b1=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],S1=we("tag",b1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],dp=we("trash-2",C1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k1=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],nu=we("trending-up",k1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E1=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Cs=we("upload",E1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const P1=[["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"}]],Zl=we("user",P1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Pn=we("users",R1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _1=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],Is=we("wallet",_1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wr=we("x",T1);/** + * @license lucide-react v0.562.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I1=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],A1=we("zap",I1),Eu="admin_token";function M1(){try{return localStorage.getItem(Eu)}catch{return null}}function L1(r){try{localStorage.setItem(Eu,r)}catch{}}function D1(){try{localStorage.removeItem(Eu)}catch{}}const O1="http://localhost:3000",F1=()=>{const r="";return r.length>0?r.replace(/\/$/,""):O1};function ru(r){const a=F1(),l=r.startsWith("/")?r:`/${r}`;return a?`${a}${l}`:l}async function jo(r,a={}){const{data:l,...i}=a,c=ru(r),d=new Headers(i.headers),f=M1();f&&d.set("Authorization",`Bearer ${f}`),l!=null&&!d.has("Content-Type")&&d.set("Content-Type","application/json");const m=l!=null?JSON.stringify(l):i.body,x=await fetch(c,{...i,headers:d,body:m,credentials:"include"}),v=(x.headers.get("Content-Type")||"").includes("application/json")?await x.json():x;if(!x.ok){const y=new Error((v==null?void 0:v.error)||`HTTP ${x.status}`);throw y.status=x.status,y.data=v,y}return v}function Xe(r,a){return jo(r,{...a,method:"GET"})}function It(r,a,l){return jo(r,{...l,method:"POST",data:a})}function Wn(r,a,l){return jo(r,{...l,method:"PUT",data:a})}function z1(r,a){return jo(r,{...a,method:"DELETE"})}const $1=[{icon:Kw,label:"数据概览",href:"/dashboard"},{icon:_s,label:"内容管理",href:"/content"},{icon:Pn,label:"用户管理",href:"/users"},{icon:Is,label:"交易中心",href:"/distribution"},{icon:Zc,label:"推广设置",href:"/referral-settings"},{icon:io,label:"系统设置",href:"/settings"}];function B1(){const r=Xr(),a=Aa(),[l,i]=p.useState(!1),[c,d]=p.useState(!1);p.useEffect(()=>{i(!0)},[]),p.useEffect(()=>{if(!l)return;d(!1);let m=!1;return Xe("/api/admin").then(x=>{m||(x&&x.success!==!1?d(!0):a("/login",{replace:!0}))}).catch(()=>{m||a("/login",{replace:!0})}),()=>{m=!0}},[l,a]);const f=async()=>{D1();try{await It("/api/admin/logout",{})}catch{}a("/login",{replace:!0})};return!l||!c?n.jsxs("div",{className:"flex min-h-screen bg-[#0a1628]",children:[n.jsx("div",{className:"w-64 bg-[#0f2137] border-r border-gray-700/50"}),n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx("div",{className:"text-[#38bdac]",children:"加载中..."})})]}):n.jsxs("div",{className:"flex min-h-screen bg-[#0a1628]",children:[n.jsxs("div",{className:"w-64 bg-[#0f2137] flex flex-col border-r border-gray-700/50 shadow-xl",children:[n.jsxs("div",{className:"p-6 border-b border-gray-700/50",children:[n.jsx("h1",{className:"text-xl font-bold text-[#38bdac]",children:"管理后台"}),n.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Soul创业派对"})]}),n.jsx("nav",{className:"flex-1 p-4 space-y-1",children:$1.map(m=>{const x=r.pathname===m.href;return n.jsxs(rp,{to:m.href,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${x?"bg-[#38bdac]/20 text-[#38bdac] font-medium":"text-gray-400 hover:bg-gray-700/50 hover:text-white"}`,children:[n.jsx(m.icon,{className:"w-5 h-5"}),n.jsx("span",{className:"text-sm",children:m.label})]},m.href)})}),n.jsxs("div",{className:"p-4 border-t border-gray-700/50 space-y-1",children:[n.jsxs("button",{type:"button",onClick:f,className:"w-full flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white rounded-lg hover:bg-gray-700/50 transition-colors",children:[n.jsx(Jw,{className:"w-5 h-5"}),n.jsx("span",{className:"text-sm",children:"退出登录"})]}),n.jsx("a",{href:`${typeof window<"u"?window.location.origin:""}/view`,target:"_blank",rel:"noreferrer",className:"flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white rounded-lg hover:bg-gray-700/50 transition-colors",children:n.jsx("span",{className:"text-sm",children:"返回前台"})})]})]}),n.jsx("div",{className:"flex-1 overflow-auto bg-[#0a1628]",children:n.jsx(Vy,{})})]})}function hm(r,a){if(typeof r=="function")return r(a);r!=null&&(r.current=a)}function Pu(...r){return a=>{let l=!1;const i=r.map(c=>{const d=hm(c,a);return!l&&typeof d=="function"&&(l=!0),d});if(l)return()=>{for(let c=0;c{let{children:d,...f}=i;fp(d)&&typeof co=="function"&&(d=co(d._payload));const m=p.Children.toArray(d),x=m.find(K1);if(x){const g=x.props.children,v=m.map(y=>y===x?p.Children.count(g)>1?p.Children.only(null):p.isValidElement(g)?g.props.children:null:y);return n.jsx(a,{...f,ref:c,children:p.isValidElement(g)?p.cloneElement(g,void 0,v):null})}return n.jsx(a,{...f,ref:c,children:d})});return l.displayName=`${r}.Slot`,l}var mp=hp("Slot");function W1(r){const a=p.forwardRef((l,i)=>{let{children:c,...d}=l;if(fp(c)&&typeof co=="function"&&(c=co(c._payload)),p.isValidElement(c)){const f=Q1(c),m=G1(d,c.props);return c.type!==p.Fragment&&(m.ref=i?Pu(i,f):f),p.cloneElement(c,m)}return p.Children.count(c)>1?p.Children.only(null):null});return a.displayName=`${r}.SlotClone`,a}var H1=Symbol("radix.slottable");function K1(r){return p.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===H1}function G1(r,a){const l={...a};for(const i in a){const c=r[i],d=a[i];/^on[A-Z]/.test(i)?c&&d?l[i]=(...m)=>{const x=d(...m);return c(...m),x}:c&&(l[i]=c):i==="style"?l[i]={...c,...d}:i==="className"&&(l[i]=[c,d].filter(Boolean).join(" "))}return{...r,...l}}function Q1(r){var i,c;let a=(i=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?r.ref:(a=(c=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:c.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?r.props.ref:r.props.ref||r.ref)}function pp(r){var a,l,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var c=r.length;for(a=0;atypeof r=="boolean"?`${r}`:r===0?"0":r,pm=Y1,xp=(r,a)=>l=>{var i;if((a==null?void 0:a.variants)==null)return pm(r,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:c,defaultVariants:d}=a,f=Object.keys(c).map(g=>{const v=l==null?void 0:l[g],y=d==null?void 0:d[g];if(v===null)return null;const E=mm(v)||mm(y);return c[g][E]}),m=l&&Object.entries(l).reduce((g,v)=>{let[y,E]=v;return E===void 0||(g[y]=E),g},{}),x=a==null||(i=a.compoundVariants)===null||i===void 0?void 0:i.reduce((g,v)=>{let{class:y,className:E,...k}=v;return Object.entries(k).every(C=>{let[b,j]=C;return Array.isArray(j)?j.includes({...d,...m}[b]):{...d,...m}[b]===j})?[...g,y,E]:g},[]);return pm(r,f,x,l==null?void 0:l.class,l==null?void 0:l.className)};function gp(r){var a,l,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var c=r.length;for(a=0;a{const l=new Array(r.length+a.length);for(let i=0;i({classGroupId:r,validator:a}),vp=(r=new Map,a=null,l)=>({nextPart:r,validators:a,classGroupId:l}),uo="-",xm=[],Z1="arbitrary..",eN=r=>{const a=nN(r),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=r;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return tN(f);const m=f.split(uo),x=m[0]===""&&m.length>1?1:0;return yp(m,x,a)},getConflictingClassGroupIds:(f,m)=>{if(m){const x=i[f],g=l[f];return x?g?q1(g,x):x:g||xm}return l[f]||xm}}},yp=(r,a,l)=>{if(r.length-a===0)return l.classGroupId;const c=r[a],d=l.nextPart.get(c);if(d){const g=yp(r,a+1,d);if(g)return g}const f=l.validators;if(f===null)return;const m=a===0?r.join(uo):r.slice(a).join(uo),x=f.length;for(let g=0;gr.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=r.slice(1,-1),l=a.indexOf(":"),i=a.slice(0,l);return i?Z1+i:void 0})(),nN=r=>{const{theme:a,classGroups:l}=r;return rN(l,a)},rN=(r,a)=>{const l=vp();for(const i in r){const c=r[i];Ru(c,l,i,a)}return l},Ru=(r,a,l,i)=>{const c=r.length;for(let d=0;d{if(typeof r=="string"){aN(r,a,l);return}if(typeof r=="function"){lN(r,a,l,i);return}oN(r,a,l,i)},aN=(r,a,l)=>{const i=r===""?a:wp(a,r);i.classGroupId=l},lN=(r,a,l,i)=>{if(iN(r)){Ru(r(i),a,l,i);return}a.validators===null&&(a.validators=[]),a.validators.push(J1(l,r))},oN=(r,a,l,i)=>{const c=Object.entries(r),d=c.length;for(let f=0;f{let l=r;const i=a.split(uo),c=i.length;for(let d=0;d"isThemeGetter"in r&&r.isThemeGetter===!0,cN=r=>{if(r<1)return{get:()=>{},set:()=>{}};let a=0,l=Object.create(null),i=Object.create(null);const c=(d,f)=>{l[d]=f,a++,a>r&&(a=0,i=l,l=Object.create(null))};return{get(d){let f=l[d];if(f!==void 0)return f;if((f=i[d])!==void 0)return c(d,f),f},set(d,f){d in l?l[d]=f:c(d,f)}}},su="!",gm=":",uN=[],vm=(r,a,l,i,c)=>({modifiers:r,hasImportantModifier:a,baseClassName:l,maybePostfixModifierPosition:i,isExternal:c}),dN=r=>{const{prefix:a,experimentalParseClassName:l}=r;let i=c=>{const d=[];let f=0,m=0,x=0,g;const v=c.length;for(let b=0;bx?g-x:void 0;return vm(d,k,E,C)};if(a){const c=a+gm,d=i;i=f=>f.startsWith(c)?d(f.slice(c.length)):vm(uN,!1,f,void 0,!0)}if(l){const c=i;i=d=>l({className:d,parseClassName:c})}return i},fN=r=>{const a=new Map;return r.orderSensitiveModifiers.forEach((l,i)=>{a.set(l,1e6+i)}),l=>{const i=[];let c=[];for(let d=0;d0&&(c.sort(),i.push(...c),c=[]),i.push(f)):c.push(f)}return c.length>0&&(c.sort(),i.push(...c)),i}},hN=r=>({cache:cN(r.cacheSize),parseClassName:dN(r),sortModifiers:fN(r),...eN(r)}),mN=/\s+/,pN=(r,a)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:c,sortModifiers:d}=a,f=[],m=r.trim().split(mN);let x="";for(let g=m.length-1;g>=0;g-=1){const v=m[g],{isExternal:y,modifiers:E,hasImportantModifier:k,baseClassName:C,maybePostfixModifierPosition:b}=l(v);if(y){x=v+(x.length>0?" "+x:x);continue}let j=!!b,N=i(j?C.substring(0,b):C);if(!N){if(!j){x=v+(x.length>0?" "+x:x);continue}if(N=i(C),!N){x=v+(x.length>0?" "+x:x);continue}j=!1}const R=E.length===0?"":E.length===1?E[0]:d(E).join(":"),S=k?R+su:R,A=S+N;if(f.indexOf(A)>-1)continue;f.push(A);const V=c(N,j);for(let Q=0;Q0?" "+x:x)}return x},xN=(...r)=>{let a=0,l,i,c="";for(;a{if(typeof r=="string")return r;let a,l="";for(let i=0;i{let l,i,c,d;const f=x=>{const g=a.reduce((v,y)=>y(v),r());return l=hN(g),i=l.cache.get,c=l.cache.set,d=m,m(x)},m=x=>{const g=i(x);if(g)return g;const v=pN(x,l);return c(x,v),v};return d=f,(...x)=>d(xN(...x))},vN=[],pt=r=>{const a=l=>l[r]||vN;return a.isThemeGetter=!0,a},jp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yN=/^\d+\/\d+$/,wN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NN=/\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$/,jN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,SN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ns=r=>yN.test(r),Le=r=>!!r&&!Number.isNaN(Number(r)),mr=r=>!!r&&Number.isInteger(Number(r)),Mc=r=>r.endsWith("%")&&Le(r.slice(0,-1)),$n=r=>wN.test(r),CN=()=>!0,kN=r=>NN.test(r)&&!jN.test(r),Sp=()=>!1,EN=r=>bN.test(r),PN=r=>SN.test(r),RN=r=>!ge(r)&&!ve(r),_N=r=>Ds(r,Ep,Sp),ge=r=>jp.test(r),Br=r=>Ds(r,Pp,kN),Lc=r=>Ds(r,LN,Le),ym=r=>Ds(r,Cp,Sp),TN=r=>Ds(r,kp,PN),Hl=r=>Ds(r,Rp,EN),ve=r=>bp.test(r),ka=r=>Os(r,Pp),IN=r=>Os(r,DN),wm=r=>Os(r,Cp),AN=r=>Os(r,Ep),MN=r=>Os(r,kp),Kl=r=>Os(r,Rp,!0),Ds=(r,a,l)=>{const i=jp.exec(r);return i?i[1]?a(i[1]):l(i[2]):!1},Os=(r,a,l=!1)=>{const i=bp.exec(r);return i?i[1]?a(i[1]):l:!1},Cp=r=>r==="position"||r==="percentage",kp=r=>r==="image"||r==="url",Ep=r=>r==="length"||r==="size"||r==="bg-size",Pp=r=>r==="length",LN=r=>r==="number",DN=r=>r==="family-name",Rp=r=>r==="shadow",ON=()=>{const r=pt("color"),a=pt("font"),l=pt("text"),i=pt("font-weight"),c=pt("tracking"),d=pt("leading"),f=pt("breakpoint"),m=pt("container"),x=pt("spacing"),g=pt("radius"),v=pt("shadow"),y=pt("inset-shadow"),E=pt("text-shadow"),k=pt("drop-shadow"),C=pt("blur"),b=pt("perspective"),j=pt("aspect"),N=pt("ease"),R=pt("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...A(),ve,ge],Q=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],U=()=>[ve,ge,x],ie=()=>[Ns,"full","auto",...U()],fe=()=>[mr,"none","subgrid",ve,ge],oe=()=>["auto",{span:["full",mr,ve,ge]},mr,ve,ge],H=()=>[mr,"auto",ve,ge],P=()=>["auto","min","max","fr",ve,ge],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...U()],$=()=>[Ns,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],T=()=>[r,ve,ge],J=()=>[...A(),wm,ym,{position:[ve,ge]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",AN,_N,{size:[ve,ge]}],B=()=>[Mc,ka,Br],le=()=>["","none","full",g,ve,ge],Z=()=>["",Le,ka,Br],be=()=>["solid","dashed","dotted","double"],je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[Le,Mc,wm,ym],me=()=>["","none",C,ve,ge],Ee=()=>["none",Le,ve,ge],Se=()=>["none",Le,ve,ge],Te=()=>[Le,ve,ge],Ae=()=>[Ns,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$n],breakpoint:[$n],color:[CN],container:[$n],"drop-shadow":[$n],ease:["in","out","in-out"],font:[RN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$n],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$n],shadow:[$n],spacing:["px",Le],text:[$n],"text-shadow":[$n],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ns,ge,ve,j]}],container:["container"],columns:[{columns:[Le,ge,ve,m]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{start:ie()}],end:[{end:ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[mr,"auto",ve,ge]}],basis:[{basis:[Ns,"full","auto",m,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,Ns,"auto","initial","none",ge]}],grow:[{grow:["",Le,ve,ge]}],shrink:[{shrink:["",Le,ve,ge]}],order:[{order:[mr,"first","last","none",ve,ge]}],"grid-cols":[{"grid-cols":fe()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":fe()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],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":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[m,"screen",...$()]}],"min-w":[{"min-w":[m,"screen","none",...$()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",l,ka,Br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ve,Lc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mc,ge]}],"font-family":[{font:[IN,ge,a]}],"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:[c,ve,ge]}],"line-clamp":[{"line-clamp":[Le,"none",ve,Lc]}],leading:[{leading:[d,...U()]}],"list-image":[{"list-image":["none",ve,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ve,Br]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[Le,"auto",ve,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mr,ve,ge],radial:["",ve,ge],conic:[mr,ve,ge]},MN,TN]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ve,ge]}],"outline-w":[{outline:["",Le,ka,Br]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",v,Kl,Hl]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",y,Kl,Hl]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[Le,Br]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",E,Kl,Hl]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[Le,ve,ge]}],"mix-blend":[{"mix-blend":[...je(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":je()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[ve,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,ge]}],filter:[{filter:["","none",ve,ge]}],blur:[{blur:me()}],brightness:[{brightness:[Le,ve,ge]}],contrast:[{contrast:[Le,ve,ge]}],"drop-shadow":[{"drop-shadow":["","none",k,Kl,Hl]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",Le,ve,ge]}],"hue-rotate":[{"hue-rotate":[Le,ve,ge]}],invert:[{invert:["",Le,ve,ge]}],saturate:[{saturate:[Le,ve,ge]}],sepia:[{sepia:["",Le,ve,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ge]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ve,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ve,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ve,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ve,ge]}],"backdrop-invert":[{"backdrop-invert":["",Le,ve,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ve,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ve,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ve,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ve,ge]}],ease:[{ease:["linear","initial",N,ve,ge]}],delay:[{delay:[Le,ve,ge]}],animate:[{animate:["none",R,ve,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ve,ge]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Se()}],"scale-x":[{"scale-x":Se()}],"scale-y":[{"scale-y":Se()}],"scale-z":[{"scale-z":Se()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[ve,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ae()}],"translate-x":[{"translate-x":Ae()}],"translate-y":[{"translate-y":Ae()}],"translate-z":[{"translate-z":Ae()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",ve,ge]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[Le,ka,Br,Lc]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},FN=gN(ON);function He(...r){return FN(X1(r))}const zN=xp("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function he({className:r,variant:a,size:l,asChild:i=!1,...c}){const d=i?mp:"button";return n.jsx(d,{"data-slot":"button",className:He(zN({variant:a,size:l,className:r})),...c})}function ue({className:r,type:a,...l}){return n.jsx("input",{type:a,"data-slot":"input",className:He("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none placeholder:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 md:text-sm focus-visible:ring-2 focus-visible:ring-ring",r),...l})}function $N(){const r=Aa(),[a,l]=p.useState(""),[i,c]=p.useState(""),[d,f]=p.useState(""),[m,x]=p.useState(!1),g=async()=>{f(""),x(!0);try{const v=await It("/api/admin",{username:a.trim(),password:i});if((v==null?void 0:v.success)!==!1&&(v!=null&&v.token)){L1(v.token),r("/dashboard",{replace:!0});return}f(v.error||"用户名或密码错误")}catch(v){const y=v;f(y.status===401?"用户名或密码错误":(y==null?void 0:y.message)||"网络错误,请重试")}finally{x(!1)}};return n.jsxs("div",{className:"min-h-screen bg-[#0a1628] flex items-center justify-center p-4",children:[n.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[n.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-[#38bdac]/5 rounded-full blur-3xl"}),n.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-blue-500/5 rounded-full blur-3xl"})]}),n.jsxs("div",{className:"w-full max-w-md relative z-10",children:[n.jsxs("div",{className:"text-center mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-[#38bdac]/20 rounded-2xl flex items-center justify-center mx-auto mb-4 border border-[#38bdac]/30",children:n.jsx(w1,{className:"w-8 h-8 text-[#38bdac]"})}),n.jsx("h1",{className:"text-2xl font-bold text-white mb-2",children:"管理后台"}),n.jsx("p",{className:"text-gray-400",children:"一场SOUL的创业实验场"})]}),n.jsxs("div",{className:"bg-[#0f2137] rounded-2xl p-8 shadow-xl border border-gray-700/50 backdrop-blur-xl",children:[n.jsx("h2",{className:"text-xl font-semibold text-white mb-6 text-center",children:"管理员登录"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-gray-400 text-sm mb-2",children:"用户名"}),n.jsxs("div",{className:"relative",children:[n.jsx(Zl,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-500"}),n.jsx(ue,{type:"text",value:a,onChange:v=>l(v.target.value),placeholder:"请输入用户名",className:"pl-10 bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 focus:border-[#38bdac]"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-gray-400 text-sm mb-2",children:"密码"}),n.jsxs("div",{className:"relative",children:[n.jsx(Xw,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-500"}),n.jsx(ue,{type:"password",value:i,onChange:v=>c(v.target.value),placeholder:"请输入密码",className:"pl-10 bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 focus:border-[#38bdac]",onKeyDown:v=>v.key==="Enter"&&g()})]})]}),d&&n.jsx("div",{className:"bg-red-500/10 text-red-400 text-sm p-3 rounded-lg border border-red-500/20",children:d}),n.jsx(he,{onClick:g,disabled:m,className:"w-full bg-[#38bdac] hover:bg-[#2da396] text-white py-5 disabled:opacity-50",children:m?"登录中...":"登录"})]})]}),n.jsx("p",{className:"text-center text-gray-500 text-xs mt-6",children:"Soul创业实验场 · 后台管理系统"})]})]})}const Re=p.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("rounded-xl border bg-card text-card-foreground shadow",r),...a}));Re.displayName="Card";const Ve=p.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("flex flex-col space-y-1.5 p-6",r),...a}));Ve.displayName="CardHeader";const Ge=p.forwardRef(({className:r,...a},l)=>n.jsx("h3",{ref:l,className:He("font-semibold leading-none tracking-tight",r),...a}));Ge.displayName="CardTitle";const gt=p.forwardRef(({className:r,...a},l)=>n.jsx("p",{ref:l,className:He("text-sm text-muted-foreground",r),...a}));gt.displayName="CardDescription";const _e=p.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("p-6 pt-0",r),...a}));_e.displayName="CardContent";const BN=p.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("flex items-center p-6 pt-0",r),...a}));BN.displayName="CardFooter";function UN(){const r=Aa(),[a,l]=p.useState(!1),[i,c]=p.useState([]),[d,f]=p.useState([]);async function m(){try{const[k,C]=await Promise.all([Xe("/api/db/users"),Xe("/api/orders")]);k!=null&&k.success&&k.users&&c(k.users),C!=null&&C.success&&C.orders&&f(C.orders)}catch(k){console.error("加载数据失败",k)}}if(p.useEffect(()=>{l(!0),m()},[]),!a)return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsx("h1",{className:"text-2xl font-bold mb-8 text-white",children:"数据概览"}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[1,2,3,4].map(k=>n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsx("div",{className:"h-4 w-20 bg-gray-700 rounded animate-pulse"}),n.jsx("div",{className:"w-8 h-8 bg-gray-700 rounded-lg animate-pulse"})]}),n.jsx(_e,{children:n.jsx("div",{className:"h-8 w-16 bg-gray-700 rounded animate-pulse"})})]},k))}),n.jsxs("div",{className:"flex items-center justify-center py-8",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]})]});const x=d.reduce((k,C)=>k+Number(C.amount||0),0),g=i.length,v=d.length,y=k=>{const C=k.productType||"",b=k.description||"";if(b){if(C==="section"&&b.includes("章节")){if(b.includes("-")){const j=b.split("-");if(j.length>=3)return{title:`第${j[1]}章 第${j[2]}节`,subtitle:"《一场Soul的创业实验》"}}return{title:b,subtitle:"章节购买"}}return C==="fullbook"||b.includes("全书")?{title:"《一场Soul的创业实验》",subtitle:"全书购买"}:C==="match"||b.includes("伙伴")?{title:"找伙伴匹配",subtitle:"功能服务"}:{title:b,subtitle:C==="section"?"单章":C==="fullbook"?"全书":"其他"}}return C==="section"?{title:`章节 ${k.productId||""}`,subtitle:"单章购买"}:C==="fullbook"?{title:"《一场Soul的创业实验》",subtitle:"全书购买"}:C==="match"?{title:"找伙伴匹配",subtitle:"功能服务"}:{title:"未知商品",subtitle:C||"其他"}},E=[{title:"总用户数",value:g,icon:Pn,color:"text-blue-400",bg:"bg-blue-500/20",link:"/users"},{title:"总收入",value:`¥${Number(x).toFixed(2)}`,icon:nu,color:"text-[#38bdac]",bg:"bg-[#38bdac]/20",link:"/orders"},{title:"订单数",value:v,icon:tu,color:"text-purple-400",bg:"bg-purple-500/20",link:"/orders"},{title:"转化率",value:`${g>0?(v/g*100).toFixed(1):0}%`,icon:_s,color:"text-orange-400",bg:"bg-orange-500/20",link:"/distribution"}];return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsx("h1",{className:"text-2xl font-bold mb-8 text-white",children:"数据概览"}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:E.map((k,C)=>n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl cursor-pointer hover:border-[#38bdac]/50 transition-colors group",onClick:()=>k.link&&r(k.link),children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsx(Ge,{className:"text-sm font-medium text-gray-400",children:k.title}),n.jsx("div",{className:`p-2 rounded-lg ${k.bg}`,children:n.jsx(k.icon,{className:`w-4 h-4 ${k.color}`})})]}),n.jsx(_e,{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"text-2xl font-bold text-white",children:k.value}),n.jsx(Cu,{className:"w-5 h-5 text-gray-600 group-hover:text-[#38bdac] transition-colors"})]})})]},C))}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Ve,{children:n.jsx(Ge,{className:"text-white",children:"最近订单"})}),n.jsx(_e,{children:n.jsxs("div",{className:"space-y-3",children:[d.slice(-5).reverse().map(k=>{var R;const C=k.referrerId?i.find(S=>S.id===k.referrerId):void 0,b=k.referralCode||(C==null?void 0:C.referralCode)||(C==null?void 0:C.nickname)||(k.referrerId?String(k.referrerId).slice(0,8):""),j=y(k),N=k.userNickname||((R=i.find(S=>S.id===k.userId))==null?void 0:R.nickname)||"匿名用户";return n.jsxs("div",{className:"flex items-start justify-between p-4 bg-[#0a1628] rounded-lg border border-gray-700/30 hover:border-[#38bdac]/30 transition-colors",children:[n.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[k.userAvatar?n.jsx("img",{src:k.userAvatar,alt:N,className:"w-9 h-9 rounded-full object-cover flex-shrink-0 mt-0.5",onError:S=>{S.currentTarget.style.display="none";const A=S.currentTarget.nextElementSibling;A&&A.classList.remove("hidden")}}):null,n.jsx("div",{className:`w-9 h-9 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm font-medium text-[#38bdac] flex-shrink-0 mt-0.5 ${k.userAvatar?"hidden":""}`,children:N.charAt(0)}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm text-gray-300",children:N}),n.jsx("span",{className:"text-gray-600",children:"·"}),n.jsx("span",{className:"text-sm font-medium text-white truncate",children:j.title})]}),n.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[n.jsx("span",{className:"px-1.5 py-0.5 bg-gray-700/50 rounded",children:j.subtitle}),n.jsx("span",{children:new Date(k.createdAt||0).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})})]}),b&&n.jsxs("p",{className:"text-xs text-gray-600 mt-1",children:["推荐: ",b]})]})]}),n.jsxs("div",{className:"text-right ml-4 flex-shrink-0",children:[n.jsxs("p",{className:"text-sm font-bold text-[#38bdac]",children:["+¥",Number(k.amount).toFixed(2)]}),n.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:k.paymentMethod||"微信"})]})]},k.id)}),d.length===0&&n.jsxs("div",{className:"text-center py-12",children:[n.jsx(tu,{className:"w-12 h-12 text-gray-600 mx-auto mb-3"}),n.jsx("p",{className:"text-gray-500",children:"暂无订单数据"})]})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Ve,{children:n.jsx(Ge,{className:"text-white",children:"新注册用户"})}),n.jsx(_e,{children:n.jsxs("div",{className:"space-y-3",children:[i.slice(0,5).map(k=>{var C;return n.jsxs("div",{className:"flex items-center justify-between p-4 bg-[#0a1628] rounded-lg border border-gray-700/30",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-10 h-10 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm font-medium text-[#38bdac]",children:((C=k.nickname)==null?void 0:C.charAt(0))||"?"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:k.nickname||"匿名用户"}),n.jsx("p",{className:"text-xs text-gray-500",children:k.phone||"-"})]})]}),n.jsx("p",{className:"text-xs text-gray-400",children:k.createdAt?new Date(k.createdAt).toLocaleDateString():"-"})]},k.id)}),i.length===0&&n.jsx("p",{className:"text-gray-500 text-center py-8",children:"暂无用户数据"})]})})]})]})]})}const bo=p.forwardRef(({className:r,...a},l)=>n.jsx("div",{className:"relative w-full overflow-auto",children:n.jsx("table",{ref:l,className:He("w-full caption-bottom text-sm",r),...a})}));bo.displayName="Table";const So=p.forwardRef(({className:r,...a},l)=>n.jsx("thead",{ref:l,className:He("[&_tr]:border-b",r),...a}));So.displayName="TableHeader";const Co=p.forwardRef(({className:r,...a},l)=>n.jsx("tbody",{ref:l,className:He("[&_tr:last-child]:border-0",r),...a}));Co.displayName="TableBody";const Un=p.forwardRef(({className:r,...a},l)=>n.jsx("tr",{ref:l,className:He("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...a}));Un.displayName="TableRow";const tt=p.forwardRef(({className:r,...a},l)=>n.jsx("th",{ref:l,className:He("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",r),...a}));tt.displayName="TableHead";const Ye=p.forwardRef(({className:r,...a},l)=>n.jsx("td",{ref:l,className:He("p-4 align-middle [&:has([role=checkbox])]:pr-0",r),...a}));Ye.displayName="TableCell";const VN=xp("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-white",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Fe({className:r,variant:a,asChild:l=!1,...i}){const c=l?mp:"span";return n.jsx(c,{className:He(VN({variant:a}),r),...i})}function WN(){const[r,a]=p.useState([]),[l,i]=p.useState([]),[c,d]=p.useState(""),[f,m]=p.useState("all"),[x,g]=p.useState(!0);async function v(){g(!0);try{const[N,R]=await Promise.all([Xe("/api/orders"),Xe("/api/db/users")]);N!=null&&N.success&&N.orders&&a(N.orders),R!=null&&R.success&&R.users&&i(R.users)}catch(N){console.error("加载订单失败",N)}finally{g(!1)}}p.useEffect(()=>{v()},[]);const y=N=>{var R;return N.userNickname||((R=l.find(S=>S.id===N.userId))==null?void 0:R.nickname)||"匿名用户"},E=N=>{var R;return((R=l.find(S=>S.id===N))==null?void 0:R.phone)||"-"},k=N=>{const R=N.productType||N.type||"",S=N.description||"";if(S){if(R==="section"&&S.includes("章节")){if(S.includes("-")){const A=S.split("-");if(A.length>=3)return{name:`第${A[1]}章 第${A[2]}节`,type:"《一场Soul的创业实验》"}}return{name:S,type:"章节购买"}}return R==="fullbook"||S.includes("全书")?{name:"《一场Soul的创业实验》",type:"全书购买"}:R==="match"||S.includes("伙伴")?{name:"找伙伴匹配",type:"功能服务"}:{name:S,type:"其他"}}return R==="section"?{name:`章节 ${N.productId||N.sectionId||""}`,type:"单章"}:R==="fullbook"?{name:"《一场Soul的创业实验》",type:"全书"}:R==="match"?{name:"找伙伴匹配",type:"功能"}:{name:"未知商品",type:R||"其他"}},C=r.filter(N=>{const R=k(N),S=y(N).includes(c)||E(N.userId).includes(c)||R.name.includes(c)||N.orderSn&&N.orderSn.includes(c)||N.id&&N.id.includes(c),A=f==="all"||N.status===f||f==="completed"&&N.status==="paid";return S&&A}),b=r.filter(N=>N.status==="paid"||N.status==="completed").reduce((N,R)=>N+Number(R.amount||0),0),j=r.filter(N=>{const R=new Date().toDateString();return(N.status==="paid"||N.status==="completed")&&new Date(N.createdAt).toDateString()===R}).reduce((N,R)=>N+Number(R.amount||0),0);return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"订单管理"}),n.jsxs("p",{className:"text-gray-400 mt-1",children:["共 ",r.length," 笔订单"]})]}),n.jsx("div",{className:"flex items-center gap-4",children:n.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[n.jsx("span",{className:"text-gray-400",children:"总收入:"}),n.jsxs("span",{className:"text-[#38bdac] font-bold",children:["¥",b.toFixed(2)]}),n.jsx("span",{className:"text-gray-600",children:"|"}),n.jsx("span",{className:"text-gray-400",children:"今日:"}),n.jsxs("span",{className:"text-[#FFD700] font-bold",children:["¥",j.toFixed(2)]})]})})]}),n.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[n.jsxs("div",{className:"relative flex-1 max-w-md",children:[n.jsx(Vr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),n.jsx(ue,{type:"text",placeholder:"搜索订单号/用户/章节...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white placeholder:text-gray-500",value:c,onChange:N=>d(N.target.value)})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Lw,{className:"w-4 h-4 text-gray-400"}),n.jsxs("select",{value:f,onChange:N=>m(N.target.value),className:"bg-[#0f2137] border border-gray-700 text-white rounded-lg px-3 py-2 text-sm",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"completed",children:"已完成"}),n.jsx("option",{value:"pending",children:"待支付"}),n.jsx("option",{value:"created",children:"已创建"}),n.jsx("option",{value:"failed",children:"已失败"})]})]}),n.jsxs(he,{variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(cp,{className:"w-4 h-4 mr-2"}),"导出"]})]}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:n.jsx(_e,{className:"p-0",children:x?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsxs(bo,{children:[n.jsx(So,{children:n.jsxs(Un,{className:"bg-[#0a1628] hover:bg-[#0a1628] border-gray-700",children:[n.jsx(tt,{className:"text-gray-400",children:"订单号"}),n.jsx(tt,{className:"text-gray-400",children:"用户"}),n.jsx(tt,{className:"text-gray-400",children:"商品"}),n.jsx(tt,{className:"text-gray-400",children:"金额"}),n.jsx(tt,{className:"text-gray-400",children:"支付方式"}),n.jsx(tt,{className:"text-gray-400",children:"状态"}),n.jsx(tt,{className:"text-gray-400",children:"分销佣金"}),n.jsx(tt,{className:"text-gray-400",children:"下单时间"})]})}),n.jsxs(Co,{children:[C.map(N=>{const R=k(N);return n.jsxs(Un,{className:"hover:bg-[#0a1628] border-gray-700/50",children:[n.jsxs(Ye,{className:"font-mono text-xs text-gray-400",children:[(N.orderSn||N.id||"").slice(0,12),"..."]}),n.jsx(Ye,{children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:y(N)}),n.jsx("p",{className:"text-gray-500 text-xs",children:E(N.userId)})]})}),n.jsx(Ye,{children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:R.name}),n.jsx("p",{className:"text-gray-500 text-xs",children:R.type})]})}),n.jsxs(Ye,{className:"text-[#38bdac] font-bold",children:["¥",Number(N.amount||0).toFixed(2)]}),n.jsx(Ye,{className:"text-gray-300",children:N.paymentMethod==="wechat"?"微信支付":N.paymentMethod==="alipay"?"支付宝":N.paymentMethod||"微信支付"}),n.jsx(Ye,{children:N.status==="paid"||N.status==="completed"?n.jsx(Fe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"已完成"}):N.status==="pending"||N.status==="created"?n.jsx(Fe,{className:"bg-yellow-500/20 text-yellow-400 hover:bg-yellow-500/20 border-0",children:"待支付"}):n.jsx(Fe,{className:"bg-red-500/20 text-red-400 hover:bg-red-500/20 border-0",children:"已失败"})}),n.jsx(Ye,{className:"text-[#FFD700]",children:N.referrerEarnings?`¥${Number(N.referrerEarnings).toFixed(2)}`:"-"}),n.jsx(Ye,{className:"text-gray-400 text-sm",children:new Date(N.createdAt).toLocaleString("zh-CN")})]},N.id)}),C.length===0&&n.jsx(Un,{children:n.jsx(Ye,{colSpan:8,className:"text-center py-12 text-gray-500",children:"暂无订单数据"})})]})]})})})]})}var HN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],KN=HN.reduce((r,a)=>{const l=hp(`Primitive.${a}`),i=p.forwardRef((c,d)=>{const{asChild:f,...m}=c,x=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(x,{...m,ref:d})});return i.displayName=`Primitive.${a}`,{...r,[a]:i}},{}),GN="Label",_p=p.forwardRef((r,a)=>n.jsx(KN.label,{...r,ref:a,onMouseDown:l=>{var c;l.target.closest("button, input, select, textarea")||((c=r.onMouseDown)==null||c.call(r,l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));_p.displayName=GN;var Tp=_p;const ae=p.forwardRef(({className:r,...a},l)=>n.jsx(Tp,{ref:l,className:He("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r),...a}));ae.displayName=Tp.displayName;function Ie(r,a,{checkForDefaultPrevented:l=!0}={}){return function(c){if(r==null||r(c),l===!1||!c.defaultPrevented)return a==null?void 0:a(c)}}function QN(r,a){const l=p.createContext(a),i=d=>{const{children:f,...m}=d,x=p.useMemo(()=>m,Object.values(m));return n.jsx(l.Provider,{value:x,children:f})};i.displayName=r+"Provider";function c(d){const f=p.useContext(l);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${r}\``)}return[i,c]}function Cr(r,a=[]){let l=[];function i(d,f){const m=p.createContext(f),x=l.length;l=[...l,f];const g=y=>{var N;const{scope:E,children:k,...C}=y,b=((N=E==null?void 0:E[r])==null?void 0:N[x])||m,j=p.useMemo(()=>C,Object.values(C));return n.jsx(b.Provider,{value:j,children:k})};g.displayName=d+"Provider";function v(y,E){var b;const k=((b=E==null?void 0:E[r])==null?void 0:b[x])||m,C=p.useContext(k);if(C)return C;if(f!==void 0)return f;throw new Error(`\`${y}\` must be used within \`${d}\``)}return[g,v]}const c=()=>{const d=l.map(f=>p.createContext(f));return function(m){const x=(m==null?void 0:m[r])||d;return p.useMemo(()=>({[`__scope${r}`]:{...m,[r]:x}}),[m,x])}};return c.scopeName=r,[i,YN(c,...a)]}function YN(...r){const a=r[0];if(r.length===1)return a;const l=()=>{const i=r.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(d){const f=i.reduce((m,{useScope:x,scopeName:g})=>{const y=x(d)[`__scope${g}`];return{...m,...y}},{});return p.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var Rt=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},XN=yo[" useId ".trim().toString()]||(()=>{}),qN=0;function wr(r){const[a,l]=p.useState(XN());return Rt(()=>{l(i=>i??String(qN++))},[r]),a?`radix-${a}`:""}var JN=yo[" useInsertionEffect ".trim().toString()]||Rt;function Hr({prop:r,defaultProp:a,onChange:l=()=>{},caller:i}){const[c,d,f]=ZN({defaultProp:a,onChange:l}),m=r!==void 0,x=m?r:c;{const v=p.useRef(r!==void 0);p.useEffect(()=>{const y=v.current;y!==m&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=m},[m,i])}const g=p.useCallback(v=>{var y;if(m){const E=ej(v)?v(r):v;E!==r&&((y=f.current)==null||y.call(f,E))}else d(v)},[m,r,d,f]);return[x,g]}function ZN({defaultProp:r,onChange:a}){const[l,i]=p.useState(r),c=p.useRef(l),d=p.useRef(a);return JN(()=>{d.current=a},[a]),p.useEffect(()=>{var f;c.current!==l&&((f=d.current)==null||f.call(d,l),c.current=l)},[l,c]),[l,i,d]}function ej(r){return typeof r=="function"}function _a(r){const a=tj(r),l=p.forwardRef((i,c)=>{const{children:d,...f}=i,m=p.Children.toArray(d),x=m.find(rj);if(x){const g=x.props.children,v=m.map(y=>y===x?p.Children.count(g)>1?p.Children.only(null):p.isValidElement(g)?g.props.children:null:y);return n.jsx(a,{...f,ref:c,children:p.isValidElement(g)?p.cloneElement(g,void 0,v):null})}return n.jsx(a,{...f,ref:c,children:d})});return l.displayName=`${r}.Slot`,l}function tj(r){const a=p.forwardRef((l,i)=>{const{children:c,...d}=l;if(p.isValidElement(c)){const f=aj(c),m=sj(d,c.props);return c.type!==p.Fragment&&(m.ref=i?Pu(i,f):f),p.cloneElement(c,m)}return p.Children.count(c)>1?p.Children.only(null):null});return a.displayName=`${r}.SlotClone`,a}var nj=Symbol("radix.slottable");function rj(r){return p.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===nj}function sj(r,a){const l={...a};for(const i in a){const c=r[i],d=a[i];/^on[A-Z]/.test(i)?c&&d?l[i]=(...m)=>{const x=d(...m);return c(...m),x}:c&&(l[i]=c):i==="style"?l[i]={...c,...d}:i==="className"&&(l[i]=[c,d].filter(Boolean).join(" "))}return{...r,...l}}function aj(r){var i,c;let a=(i=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?r.ref:(a=(c=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:c.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?r.props.ref:r.props.ref||r.ref)}var lj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],De=lj.reduce((r,a)=>{const l=_a(`Primitive.${a}`),i=p.forwardRef((c,d)=>{const{asChild:f,...m}=c,x=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(x,{...m,ref:d})});return i.displayName=`Primitive.${a}`,{...r,[a]:i}},{});function oj(r,a){r&&Ia.flushSync(()=>r.dispatchEvent(a))}function Nr(r){const a=p.useRef(r);return p.useEffect(()=>{a.current=r}),p.useMemo(()=>(...l)=>{var i;return(i=a.current)==null?void 0:i.call(a,...l)},[])}function ij(r,a=globalThis==null?void 0:globalThis.document){const l=Nr(r);p.useEffect(()=>{const i=c=>{c.key==="Escape"&&l(c)};return a.addEventListener("keydown",i,{capture:!0}),()=>a.removeEventListener("keydown",i,{capture:!0})},[l,a])}var cj="DismissableLayer",au="dismissableLayer.update",uj="dismissableLayer.pointerDownOutside",dj="dismissableLayer.focusOutside",Nm,Ip=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_u=p.forwardRef((r,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m,...x}=r,g=p.useContext(Ip),[v,y]=p.useState(null),E=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=p.useState({}),C=We(a,G=>y(G)),b=Array.from(g.layers),[j]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),N=b.indexOf(j),R=v?b.indexOf(v):-1,S=g.layersWithOutsidePointerEventsDisabled.size>0,A=R>=N,V=mj(G=>{const U=G.target,ie=[...g.branches].some(fe=>fe.contains(U));!A||ie||(c==null||c(G),f==null||f(G),G.defaultPrevented||m==null||m())},E),Q=pj(G=>{const U=G.target;[...g.branches].some(fe=>fe.contains(U))||(d==null||d(G),f==null||f(G),G.defaultPrevented||m==null||m())},E);return ij(G=>{R===g.layers.size-1&&(i==null||i(G),!G.defaultPrevented&&m&&(G.preventDefault(),m()))},E),p.useEffect(()=>{if(v)return l&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Nm=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(v)),g.layers.add(v),jm(),()=>{l&&g.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=Nm)}},[v,E,l,g]),p.useEffect(()=>()=>{v&&(g.layers.delete(v),g.layersWithOutsidePointerEventsDisabled.delete(v),jm())},[v,g]),p.useEffect(()=>{const G=()=>k({});return document.addEventListener(au,G),()=>document.removeEventListener(au,G)},[]),n.jsx(De.div,{...x,ref:C,style:{pointerEvents:S?A?"auto":"none":void 0,...r.style},onFocusCapture:Ie(r.onFocusCapture,Q.onFocusCapture),onBlurCapture:Ie(r.onBlurCapture,Q.onBlurCapture),onPointerDownCapture:Ie(r.onPointerDownCapture,V.onPointerDownCapture)})});_u.displayName=cj;var fj="DismissableLayerBranch",hj=p.forwardRef((r,a)=>{const l=p.useContext(Ip),i=p.useRef(null),c=We(a,i);return p.useEffect(()=>{const d=i.current;if(d)return l.branches.add(d),()=>{l.branches.delete(d)}},[l.branches]),n.jsx(De.div,{...r,ref:c})});hj.displayName=fj;function mj(r,a=globalThis==null?void 0:globalThis.document){const l=Nr(r),i=p.useRef(!1),c=p.useRef(()=>{});return p.useEffect(()=>{const d=m=>{if(m.target&&!i.current){let x=function(){Ap(uj,l,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(a.removeEventListener("click",c.current),c.current=x,a.addEventListener("click",c.current,{once:!0})):x()}else a.removeEventListener("click",c.current);i.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",d),a.removeEventListener("click",c.current)}},[a,l]),{onPointerDownCapture:()=>i.current=!0}}function pj(r,a=globalThis==null?void 0:globalThis.document){const l=Nr(r),i=p.useRef(!1);return p.useEffect(()=>{const c=d=>{d.target&&!i.current&&Ap(dj,l,{originalEvent:d},{discrete:!1})};return a.addEventListener("focusin",c),()=>a.removeEventListener("focusin",c)},[a,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function jm(){const r=new CustomEvent(au);document.dispatchEvent(r)}function Ap(r,a,l,{discrete:i}){const c=l.originalEvent.target,d=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:l});a&&c.addEventListener(r,a,{once:!0}),i?oj(c,d):c.dispatchEvent(d)}var Dc="focusScope.autoFocusOnMount",Oc="focusScope.autoFocusOnUnmount",bm={bubbles:!1,cancelable:!0},xj="FocusScope",Tu=p.forwardRef((r,a)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:c,onUnmountAutoFocus:d,...f}=r,[m,x]=p.useState(null),g=Nr(c),v=Nr(d),y=p.useRef(null),E=We(a,b=>x(b)),k=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(i){let b=function(S){if(k.paused||!m)return;const A=S.target;m.contains(A)?y.current=A:xr(y.current,{select:!0})},j=function(S){if(k.paused||!m)return;const A=S.relatedTarget;A!==null&&(m.contains(A)||xr(y.current,{select:!0}))},N=function(S){if(document.activeElement===document.body)for(const V of S)V.removedNodes.length>0&&xr(m)};document.addEventListener("focusin",b),document.addEventListener("focusout",j);const R=new MutationObserver(N);return m&&R.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",j),R.disconnect()}}},[i,m,k.paused]),p.useEffect(()=>{if(m){Cm.add(k);const b=document.activeElement;if(!m.contains(b)){const N=new CustomEvent(Dc,bm);m.addEventListener(Dc,g),m.dispatchEvent(N),N.defaultPrevented||(gj(jj(Mp(m)),{select:!0}),document.activeElement===b&&xr(m))}return()=>{m.removeEventListener(Dc,g),setTimeout(()=>{const N=new CustomEvent(Oc,bm);m.addEventListener(Oc,v),m.dispatchEvent(N),N.defaultPrevented||xr(b??document.body,{select:!0}),m.removeEventListener(Oc,v),Cm.remove(k)},0)}}},[m,g,v,k]);const C=p.useCallback(b=>{if(!l&&!i||k.paused)return;const j=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,N=document.activeElement;if(j&&N){const R=b.currentTarget,[S,A]=vj(R);S&&A?!b.shiftKey&&N===A?(b.preventDefault(),l&&xr(S,{select:!0})):b.shiftKey&&N===S&&(b.preventDefault(),l&&xr(A,{select:!0})):N===R&&b.preventDefault()}},[l,i,k.paused]);return n.jsx(De.div,{tabIndex:-1,...f,ref:E,onKeyDown:C})});Tu.displayName=xj;function gj(r,{select:a=!1}={}){const l=document.activeElement;for(const i of r)if(xr(i,{select:a}),document.activeElement!==l)return}function vj(r){const a=Mp(r),l=Sm(a,r),i=Sm(a.reverse(),r);return[l,i]}function Mp(r){const a=[],l=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const c=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||c?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function Sm(r,a){for(const l of r)if(!yj(l,{upTo:a}))return l}function yj(r,{upTo:a}){if(getComputedStyle(r).visibility==="hidden")return!0;for(;r;){if(a!==void 0&&r===a)return!1;if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}function wj(r){return r instanceof HTMLInputElement&&"select"in r}function xr(r,{select:a=!1}={}){if(r&&r.focus){const l=document.activeElement;r.focus({preventScroll:!0}),r!==l&&wj(r)&&a&&r.select()}}var Cm=Nj();function Nj(){let r=[];return{add(a){const l=r[0];a!==l&&(l==null||l.pause()),r=km(r,a),r.unshift(a)},remove(a){var l;r=km(r,a),(l=r[0])==null||l.resume()}}}function km(r,a){const l=[...r],i=l.indexOf(a);return i!==-1&&l.splice(i,1),l}function jj(r){return r.filter(a=>a.tagName!=="A")}var bj="Portal",Iu=p.forwardRef((r,a)=>{var m;const{container:l,...i}=r,[c,d]=p.useState(!1);Rt(()=>d(!0),[]);const f=l||c&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return f?Yv.createPortal(n.jsx(De.div,{...i,ref:a}),f):null});Iu.displayName=bj;function Sj(r,a){return p.useReducer((l,i)=>a[l][i]??l,r)}var Ma=r=>{const{present:a,children:l}=r,i=Cj(a),c=typeof l=="function"?l({present:i.isPresent}):p.Children.only(l),d=We(i.ref,kj(c));return typeof l=="function"||i.isPresent?p.cloneElement(c,{ref:d}):null};Ma.displayName="Presence";function Cj(r){const[a,l]=p.useState(),i=p.useRef(null),c=p.useRef(r),d=p.useRef("none"),f=r?"mounted":"unmounted",[m,x]=Sj(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const g=Gl(i.current);d.current=m==="mounted"?g:"none"},[m]),Rt(()=>{const g=i.current,v=c.current;if(v!==r){const E=d.current,k=Gl(g);r?x("MOUNT"):k==="none"||(g==null?void 0:g.display)==="none"?x("UNMOUNT"):x(v&&E!==k?"ANIMATION_OUT":"UNMOUNT"),c.current=r}},[r,x]),Rt(()=>{if(a){let g;const v=a.ownerDocument.defaultView??window,y=k=>{const b=Gl(i.current).includes(CSS.escape(k.animationName));if(k.target===a&&b&&(x("ANIMATION_END"),!c.current)){const j=a.style.animationFillMode;a.style.animationFillMode="forwards",g=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=j)})}},E=k=>{k.target===a&&(d.current=Gl(i.current))};return a.addEventListener("animationstart",E),a.addEventListener("animationcancel",y),a.addEventListener("animationend",y),()=>{v.clearTimeout(g),a.removeEventListener("animationstart",E),a.removeEventListener("animationcancel",y),a.removeEventListener("animationend",y)}}else x("ANIMATION_END")},[a,x]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:p.useCallback(g=>{i.current=g?getComputedStyle(g):null,l(g)},[])}}function Gl(r){return(r==null?void 0:r.animationName)||"none"}function kj(r){var i,c;let a=(i=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?r.ref:(a=(c=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:c.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?r.props.ref:r.props.ref||r.ref)}var Fc=0;function Lp(){p.useEffect(()=>{const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",r[0]??Em()),document.body.insertAdjacentElement("beforeend",r[1]??Em()),Fc++,()=>{Fc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),Fc--}},[])}function Em(){const r=document.createElement("span");return r.setAttribute("data-radix-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}var jn=function(){return jn=Object.assign||function(a){for(var l,i=1,c=arguments.length;i"u")return Vj;var a=Wj(r),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,i-l+a[2]-a[0])}},Kj=zp(),Ps="data-scroll-locked",Gj=function(r,a,l,i){var c=r.left,d=r.top,f=r.right,m=r.gap;return l===void 0&&(l="margin"),` + .`.concat(Pj,` { + overflow: hidden `).concat(i,`; + padding-right: `).concat(m,"px ").concat(i,`; + } + body[`).concat(Ps,`] { + overflow: hidden `).concat(i,`; + overscroll-behavior: contain; + `).concat([a&&"position: relative ".concat(i,";"),l==="margin"&&` + padding-left: `.concat(c,`px; + padding-top: `).concat(d,`px; + padding-right: `).concat(f,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(m,"px ").concat(i,`; + `),l==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),` + } + + .`).concat(eo,` { + right: `).concat(m,"px ").concat(i,`; + } + + .`).concat(to,` { + margin-right: `).concat(m,"px ").concat(i,`; + } + + .`).concat(eo," .").concat(eo,` { + right: 0 `).concat(i,`; + } + + .`).concat(to," .").concat(to,` { + margin-right: 0 `).concat(i,`; + } + + body[`).concat(Ps,`] { + `).concat(Rj,": ").concat(m,`px; + } +`)},Rm=function(){var r=parseInt(document.body.getAttribute(Ps)||"0",10);return isFinite(r)?r:0},Qj=function(){p.useEffect(function(){return document.body.setAttribute(Ps,(Rm()+1).toString()),function(){var r=Rm()-1;r<=0?document.body.removeAttribute(Ps):document.body.setAttribute(Ps,r.toString())}},[])},Yj=function(r){var a=r.noRelative,l=r.noImportant,i=r.gapMode,c=i===void 0?"margin":i;Qj();var d=p.useMemo(function(){return Hj(c)},[c]);return p.createElement(Kj,{styles:Gj(d,!a,c,l?"":"!important")})},lu=!1;if(typeof window<"u")try{var Ql=Object.defineProperty({},"passive",{get:function(){return lu=!0,!0}});window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{lu=!1}var js=lu?{passive:!1}:!1,Xj=function(r){return r.tagName==="TEXTAREA"},$p=function(r,a){if(!(r instanceof Element))return!1;var l=window.getComputedStyle(r);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!Xj(r)&&l[a]==="visible")},qj=function(r){return $p(r,"overflowY")},Jj=function(r){return $p(r,"overflowX")},_m=function(r,a){var l=a.ownerDocument,i=a;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var c=Bp(r,i);if(c){var d=Up(r,i),f=d[1],m=d[2];if(f>m)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},Zj=function(r){var a=r.scrollTop,l=r.scrollHeight,i=r.clientHeight;return[a,l,i]},eb=function(r){var a=r.scrollLeft,l=r.scrollWidth,i=r.clientWidth;return[a,l,i]},Bp=function(r,a){return r==="v"?qj(a):Jj(a)},Up=function(r,a){return r==="v"?Zj(a):eb(a)},tb=function(r,a){return r==="h"&&a==="rtl"?-1:1},nb=function(r,a,l,i,c){var d=tb(r,window.getComputedStyle(a).direction),f=d*i,m=l.target,x=a.contains(m),g=!1,v=f>0,y=0,E=0;do{if(!m)break;var k=Up(r,m),C=k[0],b=k[1],j=k[2],N=b-j-d*C;(C||N)&&Bp(r,m)&&(y+=N,E+=C);var R=m.parentNode;m=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!x&&m!==document.body||x&&(a.contains(m)||a===m));return(v&&Math.abs(y)<1||!v&&Math.abs(E)<1)&&(g=!0),g},Yl=function(r){return"changedTouches"in r?[r.changedTouches[0].clientX,r.changedTouches[0].clientY]:[0,0]},Tm=function(r){return[r.deltaX,r.deltaY]},Im=function(r){return r&&"current"in r?r.current:r},rb=function(r,a){return r[0]===a[0]&&r[1]===a[1]},sb=function(r){return` + .block-interactivity-`.concat(r,` {pointer-events: none;} + .allow-interactivity-`).concat(r,` {pointer-events: all;} +`)},ab=0,bs=[];function lb(r){var a=p.useRef([]),l=p.useRef([0,0]),i=p.useRef(),c=p.useState(ab++)[0],d=p.useState(zp)[0],f=p.useRef(r);p.useEffect(function(){f.current=r},[r]),p.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(c));var b=Ej([r.lockRef.current],(r.shards||[]).map(Im),!0).filter(Boolean);return b.forEach(function(j){return j.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),b.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(c))})}}},[r.inert,r.lockRef.current,r.shards]);var m=p.useCallback(function(b,j){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!f.current.allowPinchZoom;var N=Yl(b),R=l.current,S="deltaX"in b?b.deltaX:R[0]-N[0],A="deltaY"in b?b.deltaY:R[1]-N[1],V,Q=b.target,G=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in b&&G==="h"&&Q.type==="range")return!1;var U=window.getSelection(),ie=U&&U.anchorNode,fe=ie?ie===Q||ie.contains(Q):!1;if(fe)return!1;var oe=_m(G,Q);if(!oe)return!0;if(oe?V=G:(V=G==="v"?"h":"v",oe=_m(G,Q)),!oe)return!1;if(!i.current&&"changedTouches"in b&&(S||A)&&(i.current=V),!V)return!0;var H=i.current||V;return nb(H,j,b,H==="h"?S:A)},[]),x=p.useCallback(function(b){var j=b;if(!(!bs.length||bs[bs.length-1]!==d)){var N="deltaY"in j?Tm(j):Yl(j),R=a.current.filter(function(V){return V.name===j.type&&(V.target===j.target||j.target===V.shadowParent)&&rb(V.delta,N)})[0];if(R&&R.should){j.cancelable&&j.preventDefault();return}if(!R){var S=(f.current.shards||[]).map(Im).filter(Boolean).filter(function(V){return V.contains(j.target)}),A=S.length>0?m(j,S[0]):!f.current.noIsolation;A&&j.cancelable&&j.preventDefault()}}},[]),g=p.useCallback(function(b,j,N,R){var S={name:b,delta:j,target:N,should:R,shadowParent:ob(N)};a.current.push(S),setTimeout(function(){a.current=a.current.filter(function(A){return A!==S})},1)},[]),v=p.useCallback(function(b){l.current=Yl(b),i.current=void 0},[]),y=p.useCallback(function(b){g(b.type,Tm(b),b.target,m(b,r.lockRef.current))},[]),E=p.useCallback(function(b){g(b.type,Yl(b),b.target,m(b,r.lockRef.current))},[]);p.useEffect(function(){return bs.push(d),r.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:E}),document.addEventListener("wheel",x,js),document.addEventListener("touchmove",x,js),document.addEventListener("touchstart",v,js),function(){bs=bs.filter(function(b){return b!==d}),document.removeEventListener("wheel",x,js),document.removeEventListener("touchmove",x,js),document.removeEventListener("touchstart",v,js)}},[]);var k=r.removeScrollBar,C=r.inert;return p.createElement(p.Fragment,null,C?p.createElement(d,{styles:sb(c)}):null,k?p.createElement(Yj,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function ob(r){for(var a=null;r!==null;)r instanceof ShadowRoot&&(a=r.host,r=r.host),r=r.parentNode;return a}const ib=Dj(Fp,lb);var Au=p.forwardRef(function(r,a){return p.createElement(ko,jn({},r,{ref:a,sideCar:ib}))});Au.classNames=ko.classNames;var cb=function(r){if(typeof document>"u")return null;var a=Array.isArray(r)?r[0]:r;return a.ownerDocument.body},Ss=new WeakMap,Xl=new WeakMap,ql={},Uc=0,Vp=function(r){return r&&(r.host||Vp(r.parentNode))},ub=function(r,a){return a.map(function(l){if(r.contains(l))return l;var i=Vp(l);return i&&r.contains(i)?i:(console.error("aria-hidden",l,"in not contained inside",r,". Doing nothing"),null)}).filter(function(l){return!!l})},db=function(r,a,l,i){var c=ub(a,Array.isArray(r)?r:[r]);ql[l]||(ql[l]=new WeakMap);var d=ql[l],f=[],m=new Set,x=new Set(c),g=function(y){!y||m.has(y)||(m.add(y),g(y.parentNode))};c.forEach(g);var v=function(y){!y||x.has(y)||Array.prototype.forEach.call(y.children,function(E){if(m.has(E))v(E);else try{var k=E.getAttribute(i),C=k!==null&&k!=="false",b=(Ss.get(E)||0)+1,j=(d.get(E)||0)+1;Ss.set(E,b),d.set(E,j),f.push(E),b===1&&C&&Xl.set(E,!0),j===1&&E.setAttribute(l,"true"),C||E.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",E,N)}})};return v(a),m.clear(),Uc++,function(){f.forEach(function(y){var E=Ss.get(y)-1,k=d.get(y)-1;Ss.set(y,E),d.set(y,k),E||(Xl.has(y)||y.removeAttribute(i),Xl.delete(y)),k||y.removeAttribute(l)}),Uc--,Uc||(Ss=new WeakMap,Ss=new WeakMap,Xl=new WeakMap,ql={})}},Wp=function(r,a,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(r)?r:[r]),c=cb(r);return c?(i.push.apply(i,Array.from(c.querySelectorAll("[aria-live], script"))),db(i,c,l,"aria-hidden")):function(){return null}},Eo="Dialog",[Hp]=Cr(Eo),[fb,pn]=Hp(Eo),Kp=r=>{const{__scopeDialog:a,children:l,open:i,defaultOpen:c,onOpenChange:d,modal:f=!0}=r,m=p.useRef(null),x=p.useRef(null),[g,v]=Hr({prop:i,defaultProp:c??!1,onChange:d,caller:Eo});return n.jsx(fb,{scope:a,triggerRef:m,contentRef:x,contentId:wr(),titleId:wr(),descriptionId:wr(),open:g,onOpenChange:v,onOpenToggle:p.useCallback(()=>v(y=>!y),[v]),modal:f,children:l})};Kp.displayName=Eo;var Gp="DialogTrigger",hb=p.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=pn(Gp,l),d=We(a,c.triggerRef);return n.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":Du(c.open),...i,ref:d,onClick:Ie(r.onClick,c.onOpenToggle)})});hb.displayName=Gp;var Mu="DialogPortal",[mb,Qp]=Hp(Mu,{forceMount:void 0}),Yp=r=>{const{__scopeDialog:a,forceMount:l,children:i,container:c}=r,d=pn(Mu,a);return n.jsx(mb,{scope:a,forceMount:l,children:p.Children.map(i,f=>n.jsx(Ma,{present:l||d.open,children:n.jsx(Iu,{asChild:!0,container:c,children:f})}))})};Yp.displayName=Mu;var fo="DialogOverlay",Xp=p.forwardRef((r,a)=>{const l=Qp(fo,r.__scopeDialog),{forceMount:i=l.forceMount,...c}=r,d=pn(fo,r.__scopeDialog);return d.modal?n.jsx(Ma,{present:i||d.open,children:n.jsx(xb,{...c,ref:a})}):null});Xp.displayName=fo;var pb=_a("DialogOverlay.RemoveScroll"),xb=p.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=pn(fo,l);return n.jsx(Au,{as:pb,allowPinchZoom:!0,shards:[c.contentRef],children:n.jsx(De.div,{"data-state":Du(c.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),Kr="DialogContent",qp=p.forwardRef((r,a)=>{const l=Qp(Kr,r.__scopeDialog),{forceMount:i=l.forceMount,...c}=r,d=pn(Kr,r.__scopeDialog);return n.jsx(Ma,{present:i||d.open,children:d.modal?n.jsx(gb,{...c,ref:a}):n.jsx(vb,{...c,ref:a})})});qp.displayName=Kr;var gb=p.forwardRef((r,a)=>{const l=pn(Kr,r.__scopeDialog),i=p.useRef(null),c=We(a,l.contentRef,i);return p.useEffect(()=>{const d=i.current;if(d)return Wp(d)},[]),n.jsx(Jp,{...r,ref:c,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(r.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=l.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Ie(r.onPointerDownOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&d.preventDefault()}),onFocusOutside:Ie(r.onFocusOutside,d=>d.preventDefault())})}),vb=p.forwardRef((r,a)=>{const l=pn(Kr,r.__scopeDialog),i=p.useRef(!1),c=p.useRef(!1);return n.jsx(Jp,{...r,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=r.onCloseAutoFocus)==null||f.call(r,d),d.defaultPrevented||(i.current||(m=l.triggerRef.current)==null||m.focus(),d.preventDefault()),i.current=!1,c.current=!1},onInteractOutside:d=>{var x,g;(x=r.onInteractOutside)==null||x.call(r,d),d.defaultPrevented||(i.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const f=d.target;((g=l.triggerRef.current)==null?void 0:g.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})}),Jp=p.forwardRef((r,a)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:d,...f}=r,m=pn(Kr,l),x=p.useRef(null),g=We(a,x);return Lp(),n.jsxs(n.Fragment,{children:[n.jsx(Tu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:d,children:n.jsx(_u,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Du(m.open),...f,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),n.jsxs(n.Fragment,{children:[n.jsx(yb,{titleId:m.titleId}),n.jsx(Nb,{contentRef:x,descriptionId:m.descriptionId})]})]})}),Lu="DialogTitle",Zp=p.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=pn(Lu,l);return n.jsx(De.h2,{id:c.titleId,...i,ref:a})});Zp.displayName=Lu;var ex="DialogDescription",tx=p.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=pn(ex,l);return n.jsx(De.p,{id:c.descriptionId,...i,ref:a})});tx.displayName=ex;var nx="DialogClose",rx=p.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=pn(nx,l);return n.jsx(De.button,{type:"button",...i,ref:a,onClick:Ie(r.onClick,()=>c.onOpenChange(!1))})});rx.displayName=nx;function Du(r){return r?"open":"closed"}var sx="DialogTitleWarning",[HC,ax]=QN(sx,{contentName:Kr,titleName:Lu,docsSlug:"dialog"}),yb=({titleId:r})=>{const a=ax(sx),l=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return p.useEffect(()=>{r&&(document.getElementById(r)||console.error(l))},[l,r]),null},wb="DialogDescriptionWarning",Nb=({contentRef:r,descriptionId:a})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ax(wb).contentName}}.`;return p.useEffect(()=>{var d;const c=(d=r.current)==null?void 0:d.getAttribute("aria-describedby");a&&c&&(document.getElementById(a)||console.warn(i))},[i,r,a]),null},jb=Kp,bb=Yp,Sb=Xp,Cb=qp,kb=Zp,Eb=tx,Pb=rx;function bn(r){return n.jsx(jb,{"data-slot":"dialog",...r})}function Rb(r){return n.jsx(bb,{...r})}const lx=p.forwardRef(({className:r,...a},l)=>n.jsx(Sb,{ref:l,className:He("fixed inset-0 z-50 bg-black/50",r),...a}));lx.displayName="DialogOverlay";const fn=p.forwardRef(({className:r,children:a,showCloseButton:l=!0,...i},c)=>n.jsxs(Rb,{children:[n.jsx(lx,{}),n.jsxs(Cb,{ref:c,className:He("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border bg-background p-6 shadow-lg sm:max-w-lg",r),...i,children:[a,l&&n.jsxs(Pb,{className:"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[n.jsx(Wr,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));fn.displayName="DialogContent";function Sn({className:r,...a}){return n.jsx("div",{className:He("flex flex-col gap-2 text-center sm:text-left",r),...a})}function Bn({className:r,...a}){return n.jsx("div",{className:He("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",r),...a})}function Cn(r){return n.jsx(kb,{className:"text-lg font-semibold leading-none",...r})}function _b(r){return n.jsx(Eb,{className:"text-sm text-muted-foreground",...r})}function Ou(r){const a=p.useRef({value:r,previous:r});return p.useMemo(()=>(a.current.value!==r&&(a.current.previous=a.current.value,a.current.value=r),a.current.previous),[r])}function Fu(r){const[a,l]=p.useState(void 0);return Rt(()=>{if(r){l({width:r.offsetWidth,height:r.offsetHeight});const i=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const d=c[0];let f,m;if("borderBoxSize"in d){const x=d.borderBoxSize,g=Array.isArray(x)?x[0]:x;f=g.inlineSize,m=g.blockSize}else f=r.offsetWidth,m=r.offsetHeight;l({width:f,height:m})});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else l(void 0)},[r]),a}var Po="Switch",[Tb]=Cr(Po),[Ib,Ab]=Tb(Po),ox=p.forwardRef((r,a)=>{const{__scopeSwitch:l,name:i,checked:c,defaultChecked:d,required:f,disabled:m,value:x="on",onCheckedChange:g,form:v,...y}=r,[E,k]=p.useState(null),C=We(a,S=>k(S)),b=p.useRef(!1),j=E?v||!!E.closest("form"):!0,[N,R]=Hr({prop:c,defaultProp:d??!1,onChange:g,caller:Po});return n.jsxs(Ib,{scope:l,checked:N,disabled:m,children:[n.jsx(De.button,{type:"button",role:"switch","aria-checked":N,"aria-required":f,"data-state":dx(N),"data-disabled":m?"":void 0,disabled:m,value:x,...y,ref:C,onClick:Ie(r.onClick,S=>{R(A=>!A),j&&(b.current=S.isPropagationStopped(),b.current||S.stopPropagation())})}),j&&n.jsx(ux,{control:E,bubbles:!b.current,name:i,value:x,checked:N,required:f,disabled:m,form:v,style:{transform:"translateX(-100%)"}})]})});ox.displayName=Po;var ix="SwitchThumb",cx=p.forwardRef((r,a)=>{const{__scopeSwitch:l,...i}=r,c=Ab(ix,l);return n.jsx(De.span,{"data-state":dx(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:a})});cx.displayName=ix;var Mb="SwitchBubbleInput",ux=p.forwardRef(({__scopeSwitch:r,control:a,checked:l,bubbles:i=!0,...c},d)=>{const f=p.useRef(null),m=We(f,d),x=Ou(l),g=Fu(a);return p.useEffect(()=>{const v=f.current;if(!v)return;const y=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(y,"checked").set;if(x!==l&&k){const C=new Event("click",{bubbles:i});k.call(v,l),v.dispatchEvent(C)}},[x,l,i]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:l,...c,tabIndex:-1,ref:m,style:{...c.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ux.displayName=Mb;function dx(r){return r?"checked":"unchecked"}var fx=ox,Lb=cx;const xt=p.forwardRef(({className:r,...a},l)=>n.jsx(fx,{className:He("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#38bdac] focus-visible:ring-offset-2 focus-visible:ring-offset-[#0a1628] disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-600 data-[state=checked]:bg-[#38bdac]",r),...a,ref:l,children:n.jsx(Lb,{className:He("pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));xt.displayName=fx.displayName;function zu(r){const a=r+"CollectionProvider",[l,i]=Cr(a),[c,d]=l(a,{collectionRef:{current:null},itemMap:new Map}),f=b=>{const{scope:j,children:N}=b,R=pr.useRef(null),S=pr.useRef(new Map).current;return n.jsx(c,{scope:j,itemMap:S,collectionRef:R,children:N})};f.displayName=a;const m=r+"CollectionSlot",x=_a(m),g=pr.forwardRef((b,j)=>{const{scope:N,children:R}=b,S=d(m,N),A=We(j,S.collectionRef);return n.jsx(x,{ref:A,children:R})});g.displayName=m;const v=r+"CollectionItemSlot",y="data-radix-collection-item",E=_a(v),k=pr.forwardRef((b,j)=>{const{scope:N,children:R,...S}=b,A=pr.useRef(null),V=We(j,A),Q=d(v,N);return pr.useEffect(()=>(Q.itemMap.set(A,{ref:A,...S}),()=>void Q.itemMap.delete(A))),n.jsx(E,{[y]:"",ref:V,children:R})});k.displayName=v;function C(b){const j=d(r+"CollectionConsumer",b);return pr.useCallback(()=>{const R=j.collectionRef.current;if(!R)return[];const S=Array.from(R.querySelectorAll(`[${y}]`));return Array.from(j.itemMap.values()).sort((Q,G)=>S.indexOf(Q.ref.current)-S.indexOf(G.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:f,Slot:g,ItemSlot:k},C,i]}var Db=p.createContext(void 0);function Ro(r){const a=p.useContext(Db);return r||a||"ltr"}var Vc="rovingFocusGroup.onEntryFocus",Ob={bubbles:!1,cancelable:!0},La="RovingFocusGroup",[ou,hx,Fb]=zu(La),[zb,mx]=Cr(La,[Fb]),[$b,Bb]=zb(La),px=p.forwardRef((r,a)=>n.jsx(ou.Provider,{scope:r.__scopeRovingFocusGroup,children:n.jsx(ou.Slot,{scope:r.__scopeRovingFocusGroup,children:n.jsx(Ub,{...r,ref:a})})}));px.displayName=La;var Ub=p.forwardRef((r,a)=>{const{__scopeRovingFocusGroup:l,orientation:i,loop:c=!1,dir:d,currentTabStopId:f,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:x,onEntryFocus:g,preventScrollOnEntryFocus:v=!1,...y}=r,E=p.useRef(null),k=We(a,E),C=Ro(d),[b,j]=Hr({prop:f,defaultProp:m??null,onChange:x,caller:La}),[N,R]=p.useState(!1),S=Nr(g),A=hx(l),V=p.useRef(!1),[Q,G]=p.useState(0);return p.useEffect(()=>{const U=E.current;if(U)return U.addEventListener(Vc,S),()=>U.removeEventListener(Vc,S)},[S]),n.jsx($b,{scope:l,orientation:i,dir:C,loop:c,currentTabStopId:b,onItemFocus:p.useCallback(U=>j(U),[j]),onItemShiftTab:p.useCallback(()=>R(!0),[]),onFocusableItemAdd:p.useCallback(()=>G(U=>U+1),[]),onFocusableItemRemove:p.useCallback(()=>G(U=>U-1),[]),children:n.jsx(De.div,{tabIndex:N||Q===0?-1:0,"data-orientation":i,...y,ref:k,style:{outline:"none",...r.style},onMouseDown:Ie(r.onMouseDown,()=>{V.current=!0}),onFocus:Ie(r.onFocus,U=>{const ie=!V.current;if(U.target===U.currentTarget&&ie&&!N){const fe=new CustomEvent(Vc,Ob);if(U.currentTarget.dispatchEvent(fe),!fe.defaultPrevented){const oe=A().filter(W=>W.focusable),H=oe.find(W=>W.active),P=oe.find(W=>W.id===b),re=[H,P,...oe].filter(Boolean).map(W=>W.ref.current);vx(re,v)}}V.current=!1}),onBlur:Ie(r.onBlur,()=>R(!1))})})}),xx="RovingFocusGroupItem",gx=p.forwardRef((r,a)=>{const{__scopeRovingFocusGroup:l,focusable:i=!0,active:c=!1,tabStopId:d,children:f,...m}=r,x=wr(),g=d||x,v=Bb(xx,l),y=v.currentTabStopId===g,E=hx(l),{onFocusableItemAdd:k,onFocusableItemRemove:C,currentTabStopId:b}=v;return p.useEffect(()=>{if(i)return k(),()=>C()},[i,k,C]),n.jsx(ou.ItemSlot,{scope:l,id:g,focusable:i,active:c,children:n.jsx(De.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...m,ref:a,onMouseDown:Ie(r.onMouseDown,j=>{i?v.onItemFocus(g):j.preventDefault()}),onFocus:Ie(r.onFocus,()=>v.onItemFocus(g)),onKeyDown:Ie(r.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){v.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const N=Hb(j,v.orientation,v.dir);if(N!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let S=E().filter(A=>A.focusable).map(A=>A.ref.current);if(N==="last")S.reverse();else if(N==="prev"||N==="next"){N==="prev"&&S.reverse();const A=S.indexOf(j.currentTarget);S=v.loop?Kb(S,A+1):S.slice(A+1)}setTimeout(()=>vx(S))}}),children:typeof f=="function"?f({isCurrentTabStop:y,hasTabStop:b!=null}):f})})});gx.displayName=xx;var Vb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Wb(r,a){return a!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}function Hb(r,a,l){const i=Wb(r.key,l);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Vb[i]}function vx(r,a=!1){const l=document.activeElement;for(const i of r)if(i===l||(i.focus({preventScroll:a}),document.activeElement!==l))return}function Kb(r,a){return r.map((l,i)=>r[(a+i)%r.length])}var Gb=px,Qb=gx,_o="Tabs",[Yb]=Cr(_o,[mx]),yx=mx(),[Xb,$u]=Yb(_o),wx=p.forwardRef((r,a)=>{const{__scopeTabs:l,value:i,onValueChange:c,defaultValue:d,orientation:f="horizontal",dir:m,activationMode:x="automatic",...g}=r,v=Ro(m),[y,E]=Hr({prop:i,onChange:c,defaultProp:d??"",caller:_o});return n.jsx(Xb,{scope:l,baseId:wr(),value:y,onValueChange:E,orientation:f,dir:v,activationMode:x,children:n.jsx(De.div,{dir:v,"data-orientation":f,...g,ref:a})})});wx.displayName=_o;var Nx="TabsList",jx=p.forwardRef((r,a)=>{const{__scopeTabs:l,loop:i=!0,...c}=r,d=$u(Nx,l),f=yx(l);return n.jsx(Gb,{asChild:!0,...f,orientation:d.orientation,dir:d.dir,loop:i,children:n.jsx(De.div,{role:"tablist","aria-orientation":d.orientation,...c,ref:a})})});jx.displayName=Nx;var bx="TabsTrigger",Sx=p.forwardRef((r,a)=>{const{__scopeTabs:l,value:i,disabled:c=!1,...d}=r,f=$u(bx,l),m=yx(l),x=Ex(f.baseId,i),g=Px(f.baseId,i),v=i===f.value;return n.jsx(Qb,{asChild:!0,...m,focusable:!c,active:v,children:n.jsx(De.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":g,"data-state":v?"active":"inactive","data-disabled":c?"":void 0,disabled:c,id:x,...d,ref:a,onMouseDown:Ie(r.onMouseDown,y=>{!c&&y.button===0&&y.ctrlKey===!1?f.onValueChange(i):y.preventDefault()}),onKeyDown:Ie(r.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&f.onValueChange(i)}),onFocus:Ie(r.onFocus,()=>{const y=f.activationMode!=="manual";!v&&!c&&y&&f.onValueChange(i)})})})});Sx.displayName=bx;var Cx="TabsContent",kx=p.forwardRef((r,a)=>{const{__scopeTabs:l,value:i,forceMount:c,children:d,...f}=r,m=$u(Cx,l),x=Ex(m.baseId,i),g=Px(m.baseId,i),v=i===m.value,y=p.useRef(v);return p.useEffect(()=>{const E=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(E)},[]),n.jsx(Ma,{present:c||v,children:({present:E})=>n.jsx(De.div,{"data-state":v?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":x,hidden:!E,id:g,tabIndex:0,...f,ref:a,style:{...r.style,animationDuration:y.current?"0s":void 0},children:E&&d})})});kx.displayName=Cx;function Ex(r,a){return`${r}-trigger-${a}`}function Px(r,a){return`${r}-content-${a}`}var qb=wx,Rx=jx,_x=Sx,Tx=kx;const Bu=qb,To=p.forwardRef(({className:r,...a},l)=>n.jsx(Rx,{ref:l,className:He("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",r),...a}));To.displayName=Rx.displayName;const tn=p.forwardRef(({className:r,...a},l)=>n.jsx(_x,{ref:l,className:He("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",r),...a}));tn.displayName=_x.displayName;const nn=p.forwardRef(({className:r,...a},l)=>n.jsx(Tx,{ref:l,className:He("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r),...a}));nn.displayName=Tx.displayName;function Jb({open:r,onClose:a,userId:l,onUserUpdated:i}){var W;const[c,d]=p.useState(null),[f,m]=p.useState([]),[x,g]=p.useState([]),[v,y]=p.useState(!1),[E,k]=p.useState(!1),[C,b]=p.useState(!1),[j,N]=p.useState("info"),[R,S]=p.useState(""),[A,V]=p.useState(""),[Q,G]=p.useState([]),[U,ie]=p.useState("");p.useEffect(()=>{r&&l&&fe()},[r,l]);async function fe(){if(l){y(!0);try{const $=await Xe(`/api/db/users?id=${encodeURIComponent(l)}`);if($!=null&&$.success&&$.user){const T=$.user;d(T),S(T.phone||""),V(T.nickname||""),G(typeof T.tags=="string"?JSON.parse(T.tags||"[]"):[])}try{const T=await Xe(`/api/user/track?userId=${encodeURIComponent(l)}&limit=50`);T!=null&&T.success&&T.tracks&&m(T.tracks)}catch{m([])}try{const T=await Xe(`/api/db/users/referrals?userId=${encodeURIComponent(l)}`);T!=null&&T.success&&T.referrals&&g(T.referrals)}catch{g([])}}catch($){console.error("Load user detail error:",$)}finally{y(!1)}}}async function oe(){if(!(c!=null&&c.phone)){alert("用户未绑定手机号,无法同步");return}k(!0);try{const $=await It("/api/ckb/sync",{action:"full_sync",phone:c.phone,userId:c.id});$!=null&&$.success?(alert("同步成功"),fe()):alert("同步失败: "+($==null?void 0:$.error))}catch($){console.error("Sync CKB error:",$),alert("同步失败")}finally{k(!1)}}async function H(){if(c){b(!0);try{const $=await Wn("/api/db/users",{id:c.id,phone:R||void 0,nickname:A||void 0,tags:JSON.stringify(Q)});$!=null&&$.success?(alert("保存成功"),fe(),i==null||i()):alert("保存失败: "+($==null?void 0:$.error))}catch($){console.error("Save user error:",$),alert("保存失败")}finally{b(!1)}}}const P=()=>{U&&!Q.includes(U)&&(G([...Q,U]),ie(""))},K=$=>{G(Q.filter(T=>T!==$))},re=$=>{const J={view_chapter:_s,purchase:tu,match:Pn,login:Zl,register:Zl,share:ks,bind_phone:u1,bind_wechat:s1}[$]||lm;return n.jsx(J,{className:"w-4 h-4"})};return r?n.jsx(bn,{open:r,onOpenChange:()=>a(),children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-4xl max-h-[90vh] overflow-hidden",children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Zl,{className:"w-5 h-5 text-[#38bdac]"}),"用户详情",(c==null?void 0:c.phone)&&n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0 ml-2",children:"已绑定手机"})]})}),v?n.jsxs("div",{className:"flex items-center justify-center py-20",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):c?n.jsxs("div",{className:"flex flex-col h-[70vh]",children:[n.jsxs("div",{className:"flex items-center gap-4 p-4 bg-[#0a1628] rounded-lg mb-4",children:[n.jsx("div",{className:"w-16 h-16 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-2xl text-[#38bdac]",children:c.avatar?n.jsx("img",{src:c.avatar,className:"w-full h-full rounded-full object-cover",alt:""}):((W=c.nickname)==null?void 0:W.charAt(0))||"?"}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:"text-lg font-bold text-white",children:c.nickname}),c.isAdmin&&n.jsx(Fe,{className:"bg-purple-500/20 text-purple-400 border-0",children:"管理员"}),c.hasFullBook&&n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0",children:"全书已购"})]}),n.jsxs("p",{className:"text-gray-400 text-sm mt-1",children:[c.phone?`📱 ${c.phone}`:"未绑定手机",c.wechatId&&` · 💬 ${c.wechatId}`]}),n.jsxs("p",{className:"text-gray-500 text-xs mt-1",children:["ID: ",c.id," · 推广码: ",c.referralCode??"-"]})]}),n.jsxs("div",{className:"text-right",children:[n.jsxs("p",{className:"text-[#38bdac] font-bold",children:["¥",(c.earnings||0).toFixed(2)]}),n.jsx("p",{className:"text-gray-500 text-xs",children:"累计收益"})]})]}),n.jsxs(Bu,{value:j,onValueChange:N,className:"flex-1 flex flex-col overflow-hidden",children:[n.jsxs(To,{className:"bg-[#0a1628] border border-gray-700/50 p-1 mb-4",children:[n.jsx(tn,{value:"info",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"基础信息"}),n.jsx(tn,{value:"tags",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"标签体系"}),n.jsx(tn,{value:"tracks",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"行为轨迹"}),n.jsx(tn,{value:"relations",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"关系链路"})]}),n.jsxs(nn,{value:"info",className:"flex-1 overflow-auto space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"手机号"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"输入手机号",value:R,onChange:$=>S($.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"昵称"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"输入昵称",value:A,onChange:$=>V($.target.value)})]})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"推荐人数"}),n.jsx("p",{className:"text-2xl font-bold text-white",children:c.referralCount??0})]}),n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"待提现"}),n.jsxs("p",{className:"text-2xl font-bold text-yellow-400",children:["¥",(c.pendingEarnings??0).toFixed(2)]})]}),n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"创建时间"}),n.jsx("p",{className:"text-sm text-white",children:c.createdAt?new Date(c.createdAt).toLocaleDateString():"-"})]})]}),n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ks,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-white font-medium",children:"存客宝同步"})]}),n.jsx(he,{size:"sm",onClick:oe,disabled:E||!c.phone,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:E?n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-1 animate-spin"})," 同步中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-1"})," 同步数据"]})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500",children:"同步状态:"}),c.ckbSyncedAt?n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0 ml-1",children:"已同步"}):n.jsx(Fe,{className:"bg-gray-500/20 text-gray-400 border-0 ml-1",children:"未同步"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500",children:"最后同步:"}),n.jsx("span",{className:"text-gray-300 ml-1",children:c.ckbSyncedAt?new Date(c.ckbSyncedAt).toLocaleString():"-"})]})]})]})]}),n.jsx(nn,{value:"tags",className:"flex-1 overflow-auto space-y-4",children:n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(S1,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-white font-medium",children:"系统标签"})]}),n.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[Q.map(($,T)=>n.jsxs(Fe,{className:"bg-[#38bdac]/20 text-[#38bdac] border-0 pr-1",children:[$,n.jsx("button",{type:"button",onClick:()=>K($),className:"ml-1 hover:text-red-400",children:n.jsx(Wr,{className:"w-3 h-3"})})]},T)),Q.length===0&&n.jsx("span",{className:"text-gray-500 text-sm",children:"暂无标签"})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ue,{className:"bg-[#162840] border-gray-700 text-white flex-1",placeholder:"添加新标签",value:U,onChange:$=>ie($.target.value),onKeyDown:$=>$.key==="Enter"&&P()}),n.jsx(he,{onClick:P,className:"bg-[#38bdac] hover:bg-[#2da396]",children:"添加"})]})]})}),n.jsx(nn,{value:"tracks",className:"flex-1 overflow-auto",children:n.jsx("div",{className:"space-y-2",children:f.length>0?f.map($=>n.jsxs("div",{className:"flex items-start gap-3 p-3 bg-[#0a1628] rounded-lg",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-[#38bdac]",children:re($.action)}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-white font-medium",children:$.actionLabel}),$.chapterTitle&&n.jsxs("span",{className:"text-gray-400 text-sm",children:["- ",$.chapterTitle]})]}),n.jsxs("p",{className:"text-gray-500 text-xs mt-1",children:[n.jsx(op,{className:"w-3 h-3 inline mr-1"}),$.timeAgo," · ",new Date($.createdAt).toLocaleString()]})]})]},$.id)):n.jsxs("div",{className:"text-center py-12",children:[n.jsx(lm,{className:"w-10 h-10 text-[#38bdac]/40 mx-auto mb-4"}),n.jsx("p",{className:"text-gray-400",children:"暂无行为轨迹"})]})})}),n.jsx(nn,{value:"relations",className:"flex-1 overflow-auto space-y-4",children:n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ks,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-white font-medium",children:"推荐的用户"})]}),n.jsxs(Fe,{className:"bg-[#38bdac]/20 text-[#38bdac] border-0",children:["共 ",x.length," 人"]})]}),n.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:x.length>0?x.map(($,T)=>{var X;const J=$;return n.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#162840] rounded",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-6 h-6 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-xs text-[#38bdac]",children:((X=J.nickname)==null?void 0:X.charAt(0))||"?"}),n.jsx("span",{className:"text-white text-sm",children:J.nickname})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[J.status==="vip"&&n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0 text-xs",children:"已购"}),n.jsx("span",{className:"text-gray-500 text-xs",children:J.createdAt?new Date(J.createdAt).toLocaleDateString():""})]})]},J.id||T)}):n.jsx("p",{className:"text-gray-500 text-sm text-center py-4",children:"暂无推荐用户"})})]})})]}),n.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t border-gray-700 mt-4",children:[n.jsxs(he,{variant:"outline",onClick:a,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Wr,{className:"w-4 h-4 mr-2"}),"关闭"]}),n.jsxs(he,{onClick:H,disabled:C,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),C?"保存中...":"保存修改"]})]})]}):n.jsx("div",{className:"text-center py-12 text-gray-500",children:"用户不存在"})]})}):null}function Zb(){var nt,ut,$t,Bt,At;const[r,a]=p.useState([]),[l,i]=p.useState(""),[c,d]=p.useState(1),[f]=p.useState(15),[m,x]=p.useState(0),[g,v]=p.useState(0),[y,E]=p.useState(!0),[,k]=p.useState(null),[C,b]=p.useState(!1),[j,N]=p.useState(!1),[R,S]=p.useState(null),[A,V]=p.useState(""),[Q,G]=p.useState(""),[U,ie]=p.useState(!1),[fe,oe]=p.useState(!1),[H,P]=p.useState({referrals:[],stats:{}}),[K,re]=p.useState(!1),[W,$]=p.useState(null),[T,J]=p.useState(!1),[X,L]=p.useState(null),[B,le]=p.useState({phone:"",nickname:"",password:"",isAdmin:!1,hasFullBook:!1});async function Z(Y){E(!0),k(null);try{const Me=new URLSearchParams;Me.set("page",String(Y??c)),Me.set("pageSize",String(f)),l.trim()&&Me.set("search",l.trim());const ze=await Xe(`/api/db/users?${Me.toString()}`);ze!=null&&ze.success?(a(ze.users||[]),x(ze.total??0),v(ze.totalPages??0),Y!=null&&d(Y)):k((ze==null?void 0:ze.error)||"加载失败")}catch(Me){console.error("Load users error:",Me),k("网络错误,请检查连接")}finally{E(!1)}}p.useEffect(()=>{Z()},[c]);const be=()=>{Z(1)};async function je(Y){if(confirm("确定要删除这个用户吗?"))try{const Me=await z1(`/api/db/users?id=${encodeURIComponent(Y)}`);Me!=null&&Me.success?Z():alert("删除失败: "+((Me==null?void 0:Me.error)||"未知错误"))}catch(Me){console.error("Delete user error:",Me),alert("删除失败")}}const ne=Y=>{S(Y),le({phone:Y.phone||"",nickname:Y.nickname||"",password:"",isAdmin:!!(Y.isAdmin??!1),hasFullBook:!!(Y.hasFullBook??!1)}),b(!0)};async function me(){if(R){if(!B.phone||!B.nickname){alert("请填写手机号和昵称");return}ie(!0);try{const Y=await Wn("/api/db/users",{id:R.id,nickname:B.nickname,isAdmin:B.isAdmin,hasFullBook:B.hasFullBook,...B.password&&{password:B.password}});if(!(Y!=null&&Y.success)){alert("更新失败: "+((Y==null?void 0:Y.error)||"未知错误"));return}b(!1),Z()}catch(Y){console.error("Save user error:",Y),alert("保存失败")}finally{ie(!1)}}}const Ee=Y=>{S(Y),V(""),G(""),N(!0)};async function Se(Y){$(Y),oe(!0),re(!0);try{const Me=await Xe(`/api/db/users/referrals?userId=${encodeURIComponent(Y.id)}`);Me!=null&&Me.success?P({referrals:Me.referrals||[],stats:Me.stats||{}}):P({referrals:[],stats:{}})}catch(Me){console.error("Load referrals error:",Me),P({referrals:[],stats:{}})}finally{re(!1)}}const Te=Y=>{L(Y.id),J(!0)};async function Ae(){if(!A){alert("请输入新密码");return}if(A!==Q){alert("两次输入的密码不一致");return}if(A.length<6){alert("密码长度不能少于6位");return}ie(!0);try{const Y=await Wn("/api/db/users",{id:R==null?void 0:R.id,password:A});Y!=null&&Y.success?(alert("密码修改成功"),N(!1)):alert("密码修改失败: "+((Y==null?void 0:Y.error)||"未知错误"))}catch(Y){console.error("Change password error:",Y),alert("密码修改失败")}finally{ie(!1)}}return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"用户管理"}),n.jsxs("p",{className:"text-gray-400 mt-1",children:["共 ",m," 位注册用户"]})]}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsxs(he,{variant:"outline",onClick:()=>Z(),disabled:y,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${y?"animate-spin":""}`}),"刷新"]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs("div",{className:"relative",children:[n.jsx(Vr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500 pointer-events-none"}),n.jsx(ue,{type:"text",placeholder:"搜索昵称/手机/ID...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white placeholder:text-gray-500 w-56",value:l,onChange:Y=>i(Y.target.value),onKeyDown:Y=>Y.key==="Enter"&&be()})]}),n.jsx(he,{variant:"outline",onClick:be,disabled:y,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent shrink-0",children:"搜索"})]})]})]}),n.jsx(bn,{open:C,onOpenChange:b,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-lg",children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Ts,{className:"w-5 h-5 text-[#38bdac]"}),"编辑用户"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"手机号"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请输入手机号",value:B.phone,onChange:Y=>le({...B,phone:Y.target.value}),disabled:!!R})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"昵称"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请输入昵称",value:B.nickname,onChange:Y=>le({...B,nickname:Y.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:R?"新密码 (留空则不修改)":"密码"}),n.jsx(ue,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:R?"留空则不修改":"请输入密码",value:B.password,onChange:Y=>le({...B,password:Y.target.value})})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(ae,{className:"text-gray-300",children:"管理员权限"}),n.jsx(xt,{checked:B.isAdmin,onCheckedChange:Y=>le({...B,isAdmin:Y})})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(ae,{className:"text-gray-300",children:"已购全书"}),n.jsx(xt,{checked:B.hasFullBook,onCheckedChange:Y=>le({...B,hasFullBook:Y})})]})]}),n.jsxs(Bn,{children:[n.jsxs(he,{variant:"outline",onClick:()=>b(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Wr,{className:"w-4 h-4 mr-2"}),"取消"]}),n.jsxs(he,{onClick:me,disabled:U,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),U?"保存中...":"保存"]})]})]})}),n.jsx(bn,{open:j,onOpenChange:N,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-md",children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(im,{className:"w-5 h-5 text-[#38bdac]"}),"修改密码"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3",children:[n.jsxs("p",{className:"text-gray-400 text-sm",children:["用户:",R==null?void 0:R.nickname]}),n.jsxs("p",{className:"text-gray-400 text-sm",children:["手机号:",R==null?void 0:R.phone]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"新密码"}),n.jsx(ue,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请输入新密码 (至少6位)",value:A,onChange:Y=>V(Y.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"确认密码"}),n.jsx(ue,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请再次输入新密码",value:Q,onChange:Y=>G(Y.target.value)})]})]}),n.jsxs(Bn,{children:[n.jsx(he,{variant:"outline",onClick:()=>N(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(he,{onClick:Ae,disabled:U,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:U?"保存中...":"确认修改"})]})]})}),n.jsx(Jb,{open:T,onClose:()=>J(!1),userId:X,onUserUpdated:Z}),n.jsx(bn,{open:fe,onOpenChange:oe,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-2xl max-h-[80vh] overflow-auto",children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Pn,{className:"w-5 h-5 text-[#38bdac]"}),"绑定关系详情 - ",W==null?void 0:W.nickname]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsx("div",{className:"text-2xl font-bold text-[#38bdac]",children:((nt=H.stats)==null?void 0:nt.total)||0}),n.jsx("div",{className:"text-xs text-gray-400",children:"绑定总数"})]}),n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsx("div",{className:"text-2xl font-bold text-green-400",children:((ut=H.stats)==null?void 0:ut.purchased)||0}),n.jsx("div",{className:"text-xs text-gray-400",children:"已付费"})]}),n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsxs("div",{className:"text-2xl font-bold text-yellow-400",children:["¥",((($t=H.stats)==null?void 0:$t.earnings)||0).toFixed(2)]}),n.jsx("div",{className:"text-xs text-gray-400",children:"累计收益"})]}),n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsxs("div",{className:"text-2xl font-bold text-orange-400",children:["¥",(((Bt=H.stats)==null?void 0:Bt.pendingEarnings)||0).toFixed(2)]}),n.jsx("div",{className:"text-xs text-gray-400",children:"待提现"})]})]}),K?n.jsxs("div",{className:"flex items-center justify-center py-8",children:[n.jsx(et,{className:"w-5 h-5 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):(((At=H.referrals)==null?void 0:At.length)??0)>0?n.jsx("div",{className:"space-y-2 max-h-[300px] overflow-y-auto",children:(H.referrals??[]).map((Y,Me)=>{var St;const ze=Y;return n.jsxs("div",{className:"flex items-center justify-between bg-[#0a1628] rounded-lg p-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac] overflow-hidden shrink-0",children:ze.avatar?n.jsx("img",{src:ze.avatar,className:"w-full h-full object-cover",alt:""}):((St=ze.nickname)==null?void 0:St.charAt(0))||"?"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white text-sm",children:ze.nickname}),n.jsx("div",{className:"text-xs text-gray-500",children:ze.phone||(ze.hasOpenId?"微信用户":"未绑定")})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[ze.status==="vip"&&n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0 text-xs",children:"全书已购"}),ze.status==="paid"&&n.jsxs(Fe,{className:"bg-blue-500/20 text-blue-400 border-0 text-xs",children:["已付费",ze.purchasedSections,"章"]}),ze.status==="free"&&n.jsx(Fe,{className:"bg-gray-500/20 text-gray-400 border-0 text-xs",children:"未付费"}),n.jsx("span",{className:"text-xs text-gray-500",children:ze.createdAt?new Date(ze.createdAt).toLocaleDateString():""})]})]},ze.id||Me)})}):n.jsx("div",{className:"text-center py-8 text-gray-500",children:"暂无绑定用户"})]}),n.jsx(Bn,{children:n.jsx(he,{variant:"outline",onClick:()=>oe(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"关闭"})})]})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:n.jsxs(_e,{className:"p-0",children:[y?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsxs(bo,{children:[n.jsx(So,{children:n.jsxs(Un,{className:"bg-[#0a1628] hover:bg-[#0a1628] border-gray-700",children:[n.jsx(tt,{className:"text-gray-400",children:"用户信息"}),n.jsx(tt,{className:"text-gray-400",children:"绑定信息"}),n.jsx(tt,{className:"text-gray-400",children:"购买状态"}),n.jsx(tt,{className:"text-gray-400",children:"分销收益"}),n.jsx(tt,{className:"text-gray-400",children:"推广码"}),n.jsx(tt,{className:"text-gray-400",children:"注册时间"}),n.jsx(tt,{className:"text-right text-gray-400",children:"操作"})]})}),n.jsxs(Co,{children:[r.map(Y=>{var Me,ze,St;return n.jsxs(Un,{className:"hover:bg-[#0a1628] border-gray-700/50",children:[n.jsx(Ye,{children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-10 h-10 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm font-medium text-[#38bdac]",children:Y.avatar?n.jsx("img",{src:Y.avatar,className:"w-full h-full rounded-full object-cover",alt:""}):((Me=Y.nickname)==null?void 0:Me.charAt(0))||"?"}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("p",{className:"font-medium text-white",children:Y.nickname}),Y.isAdmin&&n.jsx(Fe,{className:"bg-purple-500/20 text-purple-400 hover:bg-purple-500/20 border-0 text-xs",children:"管理员"}),Y.openId&&!((ze=Y.id)!=null&&ze.startsWith("user_"))&&n.jsx(Fe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0 text-xs",children:"微信"})]}),n.jsx("p",{className:"text-xs text-gray-500 font-mono",children:Y.openId?Y.openId.slice(0,12)+"...":(St=Y.id)==null?void 0:St.slice(0,12)})]})]})}),n.jsx(Ye,{children:n.jsxs("div",{className:"space-y-1",children:[Y.phone&&n.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[n.jsx("span",{className:"text-gray-500",children:"📱"}),n.jsx("span",{className:"text-gray-300",children:Y.phone})]}),Y.wechatId&&n.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[n.jsx("span",{className:"text-gray-500",children:"💬"}),n.jsx("span",{className:"text-gray-300",children:Y.wechatId})]}),Y.openId&&n.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[n.jsx("span",{className:"text-gray-500",children:"🔗"}),n.jsxs("span",{className:"text-gray-500 truncate max-w-[100px]",title:Y.openId,children:[Y.openId.slice(0,12),"..."]})]}),!Y.phone&&!Y.wechatId&&!Y.openId&&n.jsx("span",{className:"text-gray-600 text-xs",children:"未绑定"})]})}),n.jsx(Ye,{children:Y.hasFullBook?n.jsx(Fe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"全书已购"}):(Y.purchasedSectionCount??0)>0?n.jsxs(Fe,{className:"bg-blue-500/20 text-blue-400 hover:bg-blue-500/20 border-0",children:["已付费",Y.purchasedSectionCount??0,"章"]}):n.jsx(Fe,{variant:"outline",className:"text-gray-500 border-gray-600",children:"未购买"})}),n.jsx(Ye,{children:n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"text-white font-medium",children:["¥",parseFloat(String(Y.earnings||0)).toFixed(2)]}),parseFloat(String(Y.pendingEarnings||0))>0&&n.jsxs("div",{className:"text-xs text-yellow-400",children:["待提现: ¥",parseFloat(String(Y.pendingEarnings||0)).toFixed(2)]}),n.jsxs("div",{className:"text-xs text-[#38bdac] cursor-pointer hover:underline flex items-center gap-1",onClick:()=>Se(Y),onKeyDown:Qn=>Qn.key==="Enter"&&Se(Y),role:"button",tabIndex:0,children:[n.jsx(Pn,{className:"w-3 h-3"}),"绑定",Y.referralCount||0,"人"]})]})}),n.jsx(Ye,{children:n.jsx("code",{className:"text-[#38bdac] text-xs bg-[#38bdac]/10 px-2 py-0.5 rounded",children:Y.referralCode||"-"})}),n.jsx(Ye,{className:"text-gray-400",children:Y.createdAt?new Date(Y.createdAt).toLocaleDateString():"-"}),n.jsx(Ye,{className:"text-right",children:n.jsxs("div",{className:"flex items-center justify-end gap-1",children:[n.jsx(he,{variant:"ghost",size:"sm",onClick:()=>Te(Y),className:"text-gray-400 hover:text-blue-400 hover:bg-blue-400/10",title:"查看详情",children:n.jsx(ku,{className:"w-4 h-4"})}),n.jsx(he,{variant:"ghost",size:"sm",onClick:()=>ne(Y),className:"text-gray-400 hover:text-[#38bdac] hover:bg-[#38bdac]/10",title:"编辑",children:n.jsx(Ts,{className:"w-4 h-4"})}),n.jsx(he,{variant:"ghost",size:"sm",onClick:()=>Ee(Y),className:"text-gray-400 hover:text-yellow-400 hover:bg-yellow-400/10",title:"修改密码",children:n.jsx(im,{className:"w-4 h-4"})}),n.jsx(he,{variant:"ghost",size:"sm",className:"text-red-400 hover:text-red-300 hover:bg-red-500/10",onClick:()=>je(Y.id),title:"删除",children:n.jsx(dp,{className:"w-4 h-4"})})]})})]},Y.id)}),r.length===0&&n.jsx(Un,{children:n.jsx(Ye,{colSpan:7,className:"text-center py-12 text-gray-500",children:l?"未找到匹配用户":"暂无用户数据"})})]})]}),!y&&g>0&&n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-gray-700/50",children:[n.jsxs("span",{className:"text-sm text-gray-400",children:["第 ",c," / ",g," 页,共 ",m," 条"]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(he,{variant:"outline",size:"sm",onClick:()=>d(Y=>Math.max(1,Y-1)),disabled:c<=1,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(hw,{className:"w-4 h-4"}),"上一页"]}),n.jsxs(he,{variant:"outline",size:"sm",onClick:()=>d(Y=>Math.min(g,Y+1)),disabled:c>=g,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:["下一页",n.jsx(Cu,{className:"w-4 h-4"})]})]})]})]})})]})}function e2(){const[r,a]=p.useState("overview"),[l,i]=p.useState([]),[c,d]=p.useState(null),[f,m]=p.useState([]),[x,g]=p.useState([]),[v,y]=p.useState([]),[E,k]=p.useState(!0),[C,b]=p.useState(""),[j,N]=p.useState("all"),[R,S]=p.useState(new Set);p.useEffect(()=>{A()},[]),p.useEffect(()=>{V(r)},[r]);async function A(){k(!0);try{const P=await Xe("/api/admin/distribution/overview");P!=null&&P.success&&P.overview&&d(P.overview)}catch(P){console.error("[Admin] 概览接口异常:",P)}try{const P=await Xe("/api/db/users");y((P==null?void 0:P.users)||[])}catch(P){console.error("[Admin] 用户数据加载失败:",P)}finally{k(!1)}}async function V(P,K=!1){if(!(!K&&R.has(P))){k(!0);try{const re=v;switch(P){case"overview":break;case"orders":{try{const W=await Xe("/api/orders");if(W!=null&&W.success&&W.orders){const $=W.orders.map(T=>{var J,X,L,B,le;return{...T,amount:parseFloat(String(T.amount))||0,userNickname:T.userNickname??((J=re.find(Z=>Z.id===T.userId))==null?void 0:J.nickname)??"未知用户",userPhone:T.userPhone||((X=re.find(Z=>Z.id===T.userId))==null?void 0:X.phone)||"-",userAvatar:T.userAvatar??((L=re.find(Z=>Z.id===T.userId))==null?void 0:L.avatar)??null,referrerNickname:T.referrerNickname??(T.referrerId?(B=re.find(Z=>Z.id===T.referrerId))==null?void 0:B.nickname:null)??null,referrerCode:T.referrerCode??(T.referrerId?(le=re.find(Z=>Z.id===T.referrerId))==null?void 0:le.referralCode:null)??null,type:T.productType||T.type}});i($)}else i([])}catch{i([])}break}case"bindings":{try{const W=await Xe("/api/db/distribution");m((W==null?void 0:W.bindings)||[])}catch{m([])}break}case"withdrawals":{try{const W=await Xe("/api/admin/withdrawals");if(W!=null&&W.success&&W.withdrawals){const $=W.withdrawals.map(T=>({...T,account:T.account??"未绑定微信号",status:T.status==="success"?"completed":T.status==="failed"?"rejected":T.status}));g($)}else W!=null&&W.success||alert(`获取提现记录失败: ${(W==null?void 0:W.error)||"未知错误"}`),g([])}catch(W){console.error(W),alert("加载提现数据失败"),g([])}break}}S(W=>new Set(W).add(P))}catch(re){console.error(re)}finally{P!=="overview"&&k(!1)}}}async function Q(){S(P=>{const K=new Set(P);return K.delete(r),K}),r==="overview"&&A(),await V(r,!0)}async function G(P){if(confirm("确认审核通过并打款?"))try{const K=await Wn("/api/admin/withdrawals",{id:P,action:"approve"});if(!(K!=null&&K.success)){const re=(K==null?void 0:K.message)||(K==null?void 0:K.error)||"操作失败";alert(re);return}await Q()}catch(K){console.error(K),alert("操作失败")}}async function U(P){const K=prompt("请输入拒绝原因:");if(K)try{const re=await Wn("/api/admin/withdrawals",{id:P,action:"reject",errorMessage:K});if(!(re!=null&&re.success)){alert((re==null?void 0:re.error)||"操作失败");return}await Q()}catch(re){console.error(re),alert("操作失败")}}function ie(P){const K={active:"bg-green-500/20 text-green-400",converted:"bg-blue-500/20 text-blue-400",expired:"bg-gray-500/20 text-gray-400",cancelled:"bg-red-500/20 text-red-400",pending:"bg-orange-500/20 text-orange-400",pending_confirm:"bg-orange-500/20 text-orange-400",processing:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",rejected:"bg-red-500/20 text-red-400"},re={active:"有效",converted:"已转化",expired:"已过期",cancelled:"已取消",pending:"待审核",pending_confirm:"待用户确认",processing:"处理中",completed:"已完成",rejected:"已拒绝"};return n.jsx(Fe,{className:`${K[P]||"bg-gray-500/20 text-gray-400"} border-0`,children:re[P]||P})}const fe=f.filter(P=>{var K,re,W,$;if(j!=="all"&&P.status!==j)return!1;if(C){const T=C.toLowerCase();return((K=P.refereeNickname)==null?void 0:K.toLowerCase().includes(T))||((re=P.refereePhone)==null?void 0:re.includes(T))||((W=P.referrerName)==null?void 0:W.toLowerCase().includes(T))||(($=P.referrerCode)==null?void 0:$.toLowerCase().includes(T))}return!0}),oe=x.filter(P=>{var K,re;if(j!=="all"&&P.status!==j)return!1;if(C){const W=C.toLowerCase();return((K=P.userName)==null?void 0:K.toLowerCase().includes(W))||((re=P.account)==null?void 0:re.toLowerCase().includes(W))}return!0}),H=l.filter(P=>{var K,re,W,$,T,J;if(j!=="all"&&P.status!==j)return!1;if(C){const X=C.toLowerCase();return((K=P.id)==null?void 0:K.toLowerCase().includes(X))||((re=P.userNickname)==null?void 0:re.toLowerCase().includes(X))||((W=P.userPhone)==null?void 0:W.includes(X))||(($=P.sectionTitle)==null?void 0:$.toLowerCase().includes(X))||((T=P.chapterTitle)==null?void 0:T.toLowerCase().includes(X))||((J=P.bookName)==null?void 0:J.toLowerCase().includes(X))||P.referrerCode&&P.referrerCode.toLowerCase().includes(X)||P.referrerNickname&&P.referrerNickname.toLowerCase().includes(X)}return!0});return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex items-center justify-between mb-8",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-white",children:"交易中心"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"统一管理:订单、分销绑定、提现审核"})]}),n.jsxs(he,{onClick:Q,disabled:E,variant:"outline",className:"border-gray-700 text-gray-300 hover:bg-gray-800",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${E?"animate-spin":""}`}),"刷新数据"]})]}),n.jsx("div",{className:"flex gap-2 mb-6 border-b border-gray-700 pb-4",children:[{key:"overview",label:"数据概览",icon:nu},{key:"orders",label:"订单管理",icon:lo},{key:"bindings",label:"绑定管理",icon:ks},{key:"withdrawals",label:"提现审核",icon:Is}].map(P=>n.jsxs("button",{type:"button",onClick:()=>{a(P.key),N("all"),b("")},className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${r===P.key?"bg-[#38bdac] text-white":"text-gray-400 hover:text-white hover:bg-gray-800"}`,children:[n.jsx(P.icon,{className:"w-4 h-4"}),P.label]},P.key))}),E?n.jsxs("div",{className:"flex items-center justify-center py-20",children:[n.jsx(et,{className:"w-8 h-8 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsxs(n.Fragment,{children:[r==="overview"&&c&&n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日点击"}),n.jsx("p",{className:"text-2xl font-bold text-white mt-1",children:c.todayClicks})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/20 flex items-center justify-center",children:n.jsx(ku,{className:"w-6 h-6 text-blue-400"})})]})})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日绑定"}),n.jsx("p",{className:"text-2xl font-bold text-white mt-1",children:c.todayBindings})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-green-500/20 flex items-center justify-center",children:n.jsx(ks,{className:"w-6 h-6 text-green-400"})})]})})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日转化"}),n.jsx("p",{className:"text-2xl font-bold text-white mt-1",children:c.todayConversions})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-purple-500/20 flex items-center justify-center",children:n.jsx(Jc,{className:"w-6 h-6 text-purple-400"})})]})})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日佣金"}),n.jsxs("p",{className:"text-2xl font-bold text-[#38bdac] mt-1",children:["¥",c.todayEarnings.toFixed(2)]})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#38bdac]/20 flex items-center justify-center",children:n.jsx(lo,{className:"w-6 h-6 text-[#38bdac]"})})]})})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsx(Re,{className:"bg-orange-500/10 border-orange-500/30",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl bg-orange-500/20 flex items-center justify-center",children:n.jsx(op,{className:"w-6 h-6 text-orange-400"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-orange-300 font-medium",children:"即将过期绑定"}),n.jsxs("p",{className:"text-2xl font-bold text-white",children:[c.expiringBindings," 个"]}),n.jsx("p",{className:"text-orange-300/60 text-sm",children:"7天内到期,需关注转化"})]})]})})}),n.jsx(Re,{className:"bg-blue-500/10 border-blue-500/30",children:n.jsx(_e,{className:"p-6",children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/20 flex items-center justify-center",children:n.jsx(Is,{className:"w-6 h-6 text-blue-400"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-blue-300 font-medium",children:"待审核提现"}),n.jsxs("p",{className:"text-2xl font-bold text-white",children:[c.pendingWithdrawals," 笔"]}),n.jsxs("p",{className:"text-blue-300/60 text-sm",children:["共 ¥",c.pendingWithdrawAmount.toFixed(2)]})]}),n.jsx(he,{onClick:()=>a("withdrawals"),variant:"outline",className:"border-blue-500/50 text-blue-400 hover:bg-blue-500/20",children:"去审核"})]})})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Ve,{children:n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(qc,{className:"w-5 h-5 text-[#38bdac]"}),"本月统计"]})}),n.jsx(_e,{children:n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"点击量"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.monthClicks})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"绑定数"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.monthBindings})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"转化数"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.monthConversions})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"佣金"}),n.jsxs("p",{className:"text-xl font-bold text-[#38bdac]",children:["¥",c.monthEarnings.toFixed(2)]})]})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Ve,{children:n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(nu,{className:"w-5 h-5 text-[#38bdac]"}),"累计统计"]})}),n.jsxs(_e,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总点击"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.totalClicks.toLocaleString()})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总绑定"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.totalBindings.toLocaleString()})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总转化"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.totalConversions})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总佣金"}),n.jsxs("p",{className:"text-xl font-bold text-[#38bdac]",children:["¥",c.totalEarnings.toFixed(2)]})]})]}),n.jsxs("div",{className:"mt-4 p-4 bg-[#38bdac]/10 rounded-lg flex items-center justify-between",children:[n.jsx("span",{className:"text-gray-300",children:"点击转化率"}),n.jsxs("span",{className:"text-[#38bdac] font-bold text-xl",children:[c.conversionRate,"%"]})]})]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Ve,{children:n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(Pn,{className:"w-5 h-5 text-[#38bdac]"}),"推广统计"]})}),n.jsx(_e,{children:n.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-white",children:c.totalDistributors}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"推广用户数"})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-green-400",children:c.activeDistributors}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"有收益用户"})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-[#38bdac]",children:"90%"}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"佣金比例"})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-orange-400",children:"30天"}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"绑定有效期"})]})]})})]})]}),r==="orders"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Vr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),n.jsx(ue,{value:C,onChange:P=>b(P.target.value),placeholder:"搜索订单号、用户名、手机号...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white"})]}),n.jsxs("select",{value:j,onChange:P=>N(P.target.value),className:"px-4 py-2 bg-[#0f2137] border border-gray-700 rounded-lg text-white",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"completed",children:"已完成"}),n.jsx("option",{value:"pending",children:"待支付"}),n.jsx("option",{value:"failed",children:"已失败"})]})]}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-0",children:l.length===0?n.jsx("div",{className:"py-12 text-center text-gray-500",children:"暂无订单数据"}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"订单号"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"用户"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"商品"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"金额"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"支付方式"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"推荐人/邀请码"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"分销佣金"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"下单时间"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:H.map(P=>{var K,re;return n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsxs("td",{className:"p-4 font-mono text-xs text-gray-400",children:[(K=P.id)==null?void 0:K.slice(0,12),"..."]}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac] overflow-hidden shrink-0",children:P.userAvatar?n.jsx("img",{src:P.userAvatar,className:"w-full h-full object-cover",alt:""}):(P.userNickname||"?").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:P.userNickname||"未知用户"}),n.jsx("p",{className:"text-gray-500 text-xs",children:P.userPhone||"-"})]})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:(()=>{const W=P.productType||P.type;return W==="fullbook"?`${P.bookName||"《底层逻辑》"} - 全本`:W==="match"?"匹配次数购买":`${P.bookName||"《底层逻辑》"} - ${P.sectionTitle||P.chapterTitle||`章节${P.productId||P.sectionId||""}`}`})()}),n.jsx("p",{className:"text-gray-500 text-xs",children:(()=>{const W=P.productType||P.type;return W==="fullbook"?"全书解锁":W==="match"?"功能权益":P.chapterTitle||"单章购买"})()})]})}),n.jsxs("td",{className:"p-4 text-[#38bdac] font-bold",children:["¥",typeof P.amount=="number"?P.amount.toFixed(2):parseFloat(String(P.amount||"0")).toFixed(2)]}),n.jsx("td",{className:"p-4 text-gray-300",children:P.paymentMethod==="wechat"?"微信支付":P.paymentMethod==="alipay"?"支付宝":P.paymentMethod||"微信支付"}),n.jsx("td",{className:"p-4",children:P.status==="completed"||P.status==="paid"?n.jsx(Fe,{className:"bg-green-500/20 text-green-400 border-0",children:"已完成"}):P.status==="pending"||P.status==="created"?n.jsx(Fe,{className:"bg-yellow-500/20 text-yellow-400 border-0",children:"待支付"}):n.jsx(Fe,{className:"bg-red-500/20 text-red-400 border-0",children:"已失败"})}),n.jsx("td",{className:"p-4 text-gray-300 text-sm",children:P.referrerId||P.referralCode?n.jsxs("span",{title:P.referralCode||P.referrerCode||P.referrerId||"",children:[P.referrerNickname||P.referralCode||P.referrerCode||((re=P.referrerId)==null?void 0:re.slice(0,8)),(P.referralCode||P.referrerCode)&&` (${P.referralCode||P.referrerCode})`]}):"-"}),n.jsx("td",{className:"p-4 text-[#FFD700]",children:P.referrerEarnings?`¥${(typeof P.referrerEarnings=="number"?P.referrerEarnings:parseFloat(String(P.referrerEarnings))).toFixed(2)}`:"-"}),n.jsx("td",{className:"p-4 text-gray-400 text-sm",children:P.createdAt?new Date(P.createdAt).toLocaleString("zh-CN"):"-"})]},P.id)})})]})})})})]}),r==="bindings"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Vr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),n.jsx(ue,{value:C,onChange:P=>b(P.target.value),placeholder:"搜索用户昵称、手机号、推广码...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white"})]}),n.jsxs("select",{value:j,onChange:P=>N(P.target.value),className:"px-4 py-2 bg-[#0f2137] border border-gray-700 rounded-lg text-white",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"active",children:"有效"}),n.jsx("option",{value:"converted",children:"已转化"}),n.jsx("option",{value:"expired",children:"已过期"}),n.jsx("option",{value:"cancelled",children:"已取消"})]})]}),n.jsx("p",{className:"text-xs text-gray-500",children:"规则(见《新分销逻辑设计方案》):绑定有有效期(默认 30 天,可在推广设置中配置 bindingDays)。有效 = 未到期;已转化 = 该消费者有购买;已过期 = 到期且未购买被自动解绑;已取消 = 消费者点击了他人链接,绑定已切换。"}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-0",children:fe.length===0?n.jsx("div",{className:"py-12 text-center text-gray-500",children:"暂无绑定数据"}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"分销商"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"消费者"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"绑定时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"到期时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"佣金"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:fe.map(P=>n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac] overflow-hidden shrink-0",children:P.referrerAvatar?n.jsx("img",{src:P.referrerAvatar,className:"w-full h-full object-cover",alt:""}):(P.referrerName||P.referrerCode||"?").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"text-white font-medium",children:P.referrerName||"-"}),n.jsx("p",{className:"text-gray-500 text-xs font-mono",children:P.referrerCode||"-"})]})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac] overflow-hidden shrink-0",children:P.refereeAvatar?n.jsx("img",{src:P.refereeAvatar,className:"w-full h-full object-cover",alt:""}):(P.refereeNickname||"?").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"text-white",children:P.refereeNickname||"微信用户"}),n.jsx("p",{className:"text-gray-500 text-xs",children:P.refereePhone||"-"})]})]})}),n.jsx("td",{className:"p-4 text-gray-400",children:P.boundAt?new Date(P.boundAt).toLocaleString("zh-CN",{dateStyle:"short",timeStyle:"short"}):"-"}),n.jsx("td",{className:"p-4 text-gray-400",children:P.expiresAt?new Date(P.expiresAt).toLocaleString("zh-CN",{dateStyle:"short",timeStyle:"short"}):"-"}),n.jsx("td",{className:"p-4",children:ie(P.status)}),n.jsx("td",{className:"p-4",children:(P.totalCommission??P.commission)!=null&&(P.totalCommission??P.commission)!==void 0?n.jsxs("span",{className:"text-[#38bdac] font-medium",children:["¥",Number(P.totalCommission??P.commission).toFixed(2)]}):n.jsx("span",{className:"text-gray-500",children:"-"})})]},P.id))})]})})})})]}),r==="withdrawals"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Vr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),n.jsx(ue,{value:C,onChange:P=>b(P.target.value),placeholder:"搜索用户名称、账号...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white"})]}),n.jsxs("select",{value:j,onChange:P=>N(P.target.value),className:"px-4 py-2 bg-[#0f2137] border border-gray-700 rounded-lg text-white",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"pending",children:"待审核"}),n.jsx("option",{value:"completed",children:"已完成"}),n.jsx("option",{value:"rejected",children:"已拒绝"})]})]}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(_e,{className:"p-0",children:oe.length===0?n.jsx("div",{className:"py-12 text-center text-gray-500",children:"暂无提现记录"}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"申请人"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"金额"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"收款方式"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"收款账号"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"申请时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-right font-medium",children:"操作"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:oe.map(P=>n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[P.userAvatar?n.jsx("img",{src:P.userAvatar,alt:"",className:"w-8 h-8 rounded-full object-cover"}):n.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-600 flex items-center justify-center text-white text-sm font-medium",children:(P.userName||P.name||"?").slice(0,1)}),n.jsx("p",{className:"text-white font-medium",children:P.userName||P.name})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("span",{className:"text-[#38bdac] font-bold",children:["¥",P.amount.toFixed(2)]})}),n.jsx("td",{className:"p-4",children:n.jsx(Fe,{className:P.method==="wechat"?"bg-green-500/20 text-green-400 border-0":"bg-blue-500/20 text-blue-400 border-0",children:P.method==="wechat"?"微信":"支付宝"})}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white font-mono text-xs",children:P.account}),n.jsx("p",{className:"text-gray-500 text-xs",children:P.name})]})}),n.jsx("td",{className:"p-4 text-gray-400",children:P.createdAt?new Date(P.createdAt).toLocaleString("zh-CN"):"-"}),n.jsx("td",{className:"p-4",children:ie(P.status)}),n.jsx("td",{className:"p-4 text-right",children:P.status==="pending"&&n.jsxs("div",{className:"flex gap-2 justify-end",children:[n.jsxs(he,{size:"sm",onClick:()=>G(P.id),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Jc,{className:"w-4 h-4 mr-1"}),"通过"]}),n.jsxs(he,{size:"sm",variant:"outline",onClick:()=>U(P.id),className:"border-red-500/50 text-red-400 hover:bg-red-500/20",children:[n.jsx(bw,{className:"w-4 h-4 mr-1"}),"拒绝"]})]})})]},P.id))})]})})})})]})]})]})}function t2(){const[r,a]=p.useState([]),[l,i]=p.useState({total:0,pendingCount:0,pendingAmount:0,successCount:0,successAmount:0,failedCount:0}),[c,d]=p.useState(!0),[f,m]=p.useState("all"),[x,g]=p.useState(null);async function v(){var C,b,j,N,R,S;d(!0);try{const A=await Xe(`/api/admin/withdrawals?status=${f}`);if(A!=null&&A.success){const V=A.withdrawals||[];a(V),i({total:((C=A.stats)==null?void 0:C.total)??V.length,pendingCount:((b=A.stats)==null?void 0:b.pendingCount)??0,pendingAmount:((j=A.stats)==null?void 0:j.pendingAmount)??0,successCount:((N=A.stats)==null?void 0:N.successCount)??0,successAmount:((R=A.stats)==null?void 0:R.successAmount)??0,failedCount:((S=A.stats)==null?void 0:S.failedCount)??0})}}catch(A){console.error("Load withdrawals error:",A)}finally{d(!1)}}p.useEffect(()=>{v()},[f]);async function y(C){const b=r.find(j=>j.id===C);if(b!=null&&b.userCommissionInfo&&b.userCommissionInfo.availableAfterThis<0){if(!confirm(`⚠️ 风险警告:该用户审核后余额为负数(¥${b.userCommissionInfo.availableAfterThis.toFixed(2)}),可能存在超额提现。 + +确认已核实用户账户并完成打款?`))return}else if(!confirm("确认已完成打款?批准后将更新用户提现记录。"))return;g(C);try{const j=await Wn("/api/admin/withdrawals",{id:C,action:"approve"});j!=null&&j.success?v():alert("操作失败: "+((j==null?void 0:j.error)??""))}catch{alert("操作失败")}finally{g(null)}}async function E(C){const b=prompt("请输入拒绝原因(将返还用户余额):");if(b){g(C);try{const j=await Wn("/api/admin/withdrawals",{id:C,action:"reject",errorMessage:b});j!=null&&j.success?v():alert("操作失败: "+((j==null?void 0:j.error)??""))}catch{alert("操作失败")}finally{g(null)}}}function k(C){switch(C){case"pending":return n.jsx(Fe,{className:"bg-orange-500/20 text-orange-400 hover:bg-orange-500/20 border-0",children:"待处理"});case"pending_confirm":return n.jsx(Fe,{className:"bg-orange-500/20 text-orange-400 hover:bg-orange-500/20 border-0",children:"待用户确认"});case"processing":return n.jsx(Fe,{className:"bg-blue-500/20 text-blue-400 hover:bg-blue-500/20 border-0",children:"已审批等待打款"});case"success":case"completed":return n.jsx(Fe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"已完成"});case"failed":case"rejected":return n.jsx(Fe,{className:"bg-red-500/20 text-red-400 hover:bg-red-500/20 border-0",children:"已拒绝"});default:return n.jsx(Fe,{className:"bg-gray-500/20 text-gray-400 border-0",children:C})}}return n.jsxs("div",{className:"p-8 max-w-6xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-start mb-8",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-white",children:"分账提现管理"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"管理用户分销收益的提现申请"})]}),n.jsxs(he,{variant:"outline",onClick:v,disabled:c,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${c?"animate-spin":""}`}),"刷新"]})]}),n.jsx(Re,{className:"bg-gradient-to-r from-[#38bdac]/10 to-[#0f2137] border-[#38bdac]/30 mb-6",children:n.jsx(_e,{className:"p-4",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(lo,{className:"w-5 h-5 text-[#38bdac] mt-0.5"}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-white font-medium mb-2",children:"自动分账规则"}),n.jsxs("div",{className:"text-sm text-gray-400 space-y-1",children:[n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"分销比例"}),":推广者获得订单金额的"," ",n.jsx("span",{className:"text-white font-medium",children:"90%"})]}),n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"结算方式"}),":用户付款后,分销收益自动计入推广者账户"]}),n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"提现方式"}),":用户在小程序端点击提现,系统自动转账到微信零钱"]}),n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"审批流程"}),":待处理的提现需管理员手动确认打款后批准"]})]})]})]})})}),n.jsxs("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(_e,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-[#38bdac]",children:l.total}),n.jsx("div",{className:"text-sm text-gray-400",children:"总申请"})]})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(_e,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-orange-400",children:l.pendingCount}),n.jsx("div",{className:"text-sm text-gray-400",children:"待处理"}),n.jsxs("div",{className:"text-xs text-orange-400 mt-1",children:["¥",l.pendingAmount.toFixed(2)]})]})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(_e,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-green-400",children:l.successCount}),n.jsx("div",{className:"text-sm text-gray-400",children:"已完成"}),n.jsxs("div",{className:"text-xs text-green-400 mt-1",children:["¥",l.successAmount.toFixed(2)]})]})}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(_e,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-red-400",children:l.failedCount}),n.jsx("div",{className:"text-sm text-gray-400",children:"已拒绝"})]})})]}),n.jsx("div",{className:"flex gap-2 mb-4",children:["all","pending","success","failed"].map(C=>n.jsx(he,{variant:f===C?"default":"outline",size:"sm",onClick:()=>m(C),className:f===C?"bg-[#38bdac] hover:bg-[#2da396] text-white":"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:C==="all"?"全部":C==="pending"?"待处理":C==="success"?"已完成":"已拒绝"},C))}),n.jsx(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:n.jsx(_e,{className:"p-0",children:c?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):r.length===0?n.jsxs("div",{className:"text-center py-12",children:[n.jsx(Is,{className:"w-12 h-12 text-gray-600 mx-auto mb-3"}),n.jsx("p",{className:"text-gray-500",children:"暂无提现记录"})]}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"申请时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"用户"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"提现金额"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"用户佣金信息"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"处理时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"确认收款"}),n.jsx("th",{className:"p-4 text-right font-medium",children:"操作"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:r.map(C=>n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsx("td",{className:"p-4 text-gray-400",children:new Date(C.createdAt??"").toLocaleString()}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[C.userAvatar?n.jsx("img",{src:C.userAvatar,alt:C.userName??"",className:"w-8 h-8 rounded-full object-cover"}):n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac]",children:(C.userName??"?").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"font-medium text-white",children:C.userName??"未知"}),n.jsx("p",{className:"text-xs text-gray-500",children:C.userPhone??C.referralCode??(C.userId??"").slice(0,10)})]})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("span",{className:"font-bold text-orange-400",children:["¥",Number(C.amount).toFixed(2)]})}),n.jsx("td",{className:"p-4",children:C.userCommissionInfo?n.jsxs("div",{className:"text-xs space-y-1",children:[n.jsxs("div",{className:"flex justify-between gap-4",children:[n.jsx("span",{className:"text-gray-500",children:"累计佣金:"}),n.jsxs("span",{className:"text-[#38bdac] font-medium",children:["¥",C.userCommissionInfo.totalCommission.toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between gap-4",children:[n.jsx("span",{className:"text-gray-500",children:"已提现:"}),n.jsxs("span",{className:"text-gray-400",children:["¥",C.userCommissionInfo.withdrawnEarnings.toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between gap-4",children:[n.jsx("span",{className:"text-gray-500",children:"待审核:"}),n.jsxs("span",{className:"text-orange-400",children:["¥",C.userCommissionInfo.pendingWithdrawals.toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between gap-4 pt-1 border-t border-gray-700/30",children:[n.jsx("span",{className:"text-gray-500",children:"审核后余额:"}),n.jsxs("span",{className:C.userCommissionInfo.availableAfterThis>=0?"text-green-400 font-medium":"text-red-400 font-medium",children:["¥",C.userCommissionInfo.availableAfterThis.toFixed(2)]})]})]}):n.jsx("span",{className:"text-gray-500 text-xs",children:"暂无数据"})}),n.jsxs("td",{className:"p-4",children:[k(C.status),C.errorMessage&&n.jsx("p",{className:"text-xs text-red-400 mt-1",children:C.errorMessage})]}),n.jsx("td",{className:"p-4 text-gray-400",children:C.processedAt?new Date(C.processedAt).toLocaleString():"-"}),n.jsx("td",{className:"p-4 text-gray-400",children:C.userConfirmedAt?n.jsxs("span",{className:"text-green-400",title:C.userConfirmedAt,children:["已确认 ",new Date(C.userConfirmedAt).toLocaleString()]}):"-"}),n.jsxs("td",{className:"p-4 text-right",children:[(C.status==="pending"||C.status==="pending_confirm")&&n.jsxs("div",{className:"flex items-center justify-end gap-2",children:[n.jsxs(he,{size:"sm",onClick:()=>y(C.id),disabled:x===C.id,className:"bg-green-600 hover:bg-green-700 text-white",children:[n.jsx(No,{className:"w-4 h-4 mr-1"}),"批准"]}),n.jsxs(he,{size:"sm",variant:"outline",onClick:()=>E(C.id),disabled:x===C.id,className:"border-red-500/50 text-red-400 hover:bg-red-500/10 bg-transparent",children:[n.jsx(Wr,{className:"w-4 h-4 mr-1"}),"拒绝"]})]}),(C.status==="success"||C.status==="completed")&&C.transactionId&&n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:C.transactionId})]})]},C.id))})]})})})})]})}const Ur=p.forwardRef(({className:r,...a},l)=>n.jsx("textarea",{className:He("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),ref:l,...a}));Ur.displayName="Textarea";function ho(r,[a,l]){return Math.min(l,Math.max(a,r))}const n2=["top","right","bottom","left"],jr=Math.min,Gt=Math.max,mo=Math.round,Jl=Math.floor,En=r=>({x:r,y:r}),r2={left:"right",right:"left",bottom:"top",top:"bottom"},s2={start:"end",end:"start"};function iu(r,a,l){return Gt(r,jr(a,l))}function Hn(r,a){return typeof r=="function"?r(a):r}function Kn(r){return r.split("-")[0]}function Fs(r){return r.split("-")[1]}function Uu(r){return r==="x"?"y":"x"}function Vu(r){return r==="y"?"height":"width"}const a2=new Set(["top","bottom"]);function kn(r){return a2.has(Kn(r))?"y":"x"}function Wu(r){return Uu(kn(r))}function l2(r,a,l){l===void 0&&(l=!1);const i=Fs(r),c=Wu(r),d=Vu(c);let f=c==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return a.reference[d]>a.floating[d]&&(f=po(f)),[f,po(f)]}function o2(r){const a=po(r);return[cu(r),a,cu(a)]}function cu(r){return r.replace(/start|end/g,a=>s2[a])}const Am=["left","right"],Mm=["right","left"],i2=["top","bottom"],c2=["bottom","top"];function u2(r,a,l){switch(r){case"top":case"bottom":return l?a?Mm:Am:a?Am:Mm;case"left":case"right":return a?i2:c2;default:return[]}}function d2(r,a,l,i){const c=Fs(r);let d=u2(Kn(r),l==="start",i);return c&&(d=d.map(f=>f+"-"+c),a&&(d=d.concat(d.map(cu)))),d}function po(r){return r.replace(/left|right|bottom|top/g,a=>r2[a])}function f2(r){return{top:0,right:0,bottom:0,left:0,...r}}function Ix(r){return typeof r!="number"?f2(r):{top:r,right:r,bottom:r,left:r}}function xo(r){const{x:a,y:l,width:i,height:c}=r;return{width:i,height:c,top:l,left:a,right:a+i,bottom:l+c,x:a,y:l}}function Lm(r,a,l){let{reference:i,floating:c}=r;const d=kn(a),f=Wu(a),m=Vu(f),x=Kn(a),g=d==="y",v=i.x+i.width/2-c.width/2,y=i.y+i.height/2-c.height/2,E=i[m]/2-c[m]/2;let k;switch(x){case"top":k={x:v,y:i.y-c.height};break;case"bottom":k={x:v,y:i.y+i.height};break;case"right":k={x:i.x+i.width,y};break;case"left":k={x:i.x-c.width,y};break;default:k={x:i.x,y:i.y}}switch(Fs(a)){case"start":k[f]-=E*(l&&g?-1:1);break;case"end":k[f]+=E*(l&&g?-1:1);break}return k}async function h2(r,a){var l;a===void 0&&(a={});const{x:i,y:c,platform:d,rects:f,elements:m,strategy:x}=r,{boundary:g="clippingAncestors",rootBoundary:v="viewport",elementContext:y="floating",altBoundary:E=!1,padding:k=0}=Hn(a,r),C=Ix(k),j=m[E?y==="floating"?"reference":"floating":y],N=xo(await d.getClippingRect({element:(l=await(d.isElement==null?void 0:d.isElement(j)))==null||l?j:j.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(m.floating)),boundary:g,rootBoundary:v,strategy:x})),R=y==="floating"?{x:i,y:c,width:f.floating.width,height:f.floating.height}:f.reference,S=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m.floating)),A=await(d.isElement==null?void 0:d.isElement(S))?await(d.getScale==null?void 0:d.getScale(S))||{x:1,y:1}:{x:1,y:1},V=xo(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:R,offsetParent:S,strategy:x}):R);return{top:(N.top-V.top+C.top)/A.y,bottom:(V.bottom-N.bottom+C.bottom)/A.y,left:(N.left-V.left+C.left)/A.x,right:(V.right-N.right+C.right)/A.x}}const m2=async(r,a,l)=>{const{placement:i="bottom",strategy:c="absolute",middleware:d=[],platform:f}=l,m=d.filter(Boolean),x=await(f.isRTL==null?void 0:f.isRTL(a));let g=await f.getElementRects({reference:r,floating:a,strategy:c}),{x:v,y}=Lm(g,i,x),E=i,k={},C=0;for(let j=0;j({name:"arrow",options:r,async fn(a){const{x:l,y:i,placement:c,rects:d,platform:f,elements:m,middlewareData:x}=a,{element:g,padding:v=0}=Hn(r,a)||{};if(g==null)return{};const y=Ix(v),E={x:l,y:i},k=Wu(c),C=Vu(k),b=await f.getDimensions(g),j=k==="y",N=j?"top":"left",R=j?"bottom":"right",S=j?"clientHeight":"clientWidth",A=d.reference[C]+d.reference[k]-E[k]-d.floating[C],V=E[k]-d.reference[k],Q=await(f.getOffsetParent==null?void 0:f.getOffsetParent(g));let G=Q?Q[S]:0;(!G||!await(f.isElement==null?void 0:f.isElement(Q)))&&(G=m.floating[S]||d.floating[C]);const U=A/2-V/2,ie=G/2-b[C]/2-1,fe=jr(y[N],ie),oe=jr(y[R],ie),H=fe,P=G-b[C]-oe,K=G/2-b[C]/2+U,re=iu(H,K,P),W=!x.arrow&&Fs(c)!=null&&K!==re&&d.reference[C]/2-(KK<=0)){var oe,H;const K=(((oe=d.flip)==null?void 0:oe.index)||0)+1,re=G[K];if(re&&(!(y==="alignment"?R!==kn(re):!1)||fe.every(T=>kn(T.placement)===R?T.overflows[0]>0:!0)))return{data:{index:K,overflows:fe},reset:{placement:re}};let W=(H=fe.filter($=>$.overflows[0]<=0).sort(($,T)=>$.overflows[1]-T.overflows[1])[0])==null?void 0:H.placement;if(!W)switch(k){case"bestFit":{var P;const $=(P=fe.filter(T=>{if(Q){const J=kn(T.placement);return J===R||J==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(J=>J>0).reduce((J,X)=>J+X,0)]).sort((T,J)=>T[1]-J[1])[0])==null?void 0:P[0];$&&(W=$);break}case"initialPlacement":W=m;break}if(c!==W)return{reset:{placement:W}}}return{}}}};function Dm(r,a){return{top:r.top-a.height,right:r.right-a.width,bottom:r.bottom-a.height,left:r.left-a.width}}function Om(r){return n2.some(a=>r[a]>=0)}const g2=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(a){const{rects:l,platform:i}=a,{strategy:c="referenceHidden",...d}=Hn(r,a);switch(c){case"referenceHidden":{const f=await i.detectOverflow(a,{...d,elementContext:"reference"}),m=Dm(f,l.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:Om(m)}}}case"escaped":{const f=await i.detectOverflow(a,{...d,altBoundary:!0}),m=Dm(f,l.floating);return{data:{escapedOffsets:m,escaped:Om(m)}}}default:return{}}}}},Ax=new Set(["left","top"]);async function v2(r,a){const{placement:l,platform:i,elements:c}=r,d=await(i.isRTL==null?void 0:i.isRTL(c.floating)),f=Kn(l),m=Fs(l),x=kn(l)==="y",g=Ax.has(f)?-1:1,v=d&&x?-1:1,y=Hn(a,r);let{mainAxis:E,crossAxis:k,alignmentAxis:C}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return m&&typeof C=="number"&&(k=m==="end"?C*-1:C),x?{x:k*v,y:E*g}:{x:E*g,y:k*v}}const y2=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(a){var l,i;const{x:c,y:d,placement:f,middlewareData:m}=a,x=await v2(a,r);return f===((l=m.offset)==null?void 0:l.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:c+x.x,y:d+x.y,data:{...x,placement:f}}}}},w2=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(a){const{x:l,y:i,placement:c,platform:d}=a,{mainAxis:f=!0,crossAxis:m=!1,limiter:x={fn:N=>{let{x:R,y:S}=N;return{x:R,y:S}}},...g}=Hn(r,a),v={x:l,y:i},y=await d.detectOverflow(a,g),E=kn(Kn(c)),k=Uu(E);let C=v[k],b=v[E];if(f){const N=k==="y"?"top":"left",R=k==="y"?"bottom":"right",S=C+y[N],A=C-y[R];C=iu(S,C,A)}if(m){const N=E==="y"?"top":"left",R=E==="y"?"bottom":"right",S=b+y[N],A=b-y[R];b=iu(S,b,A)}const j=x.fn({...a,[k]:C,[E]:b});return{...j,data:{x:j.x-l,y:j.y-i,enabled:{[k]:f,[E]:m}}}}}},N2=function(r){return r===void 0&&(r={}),{options:r,fn(a){const{x:l,y:i,placement:c,rects:d,middlewareData:f}=a,{offset:m=0,mainAxis:x=!0,crossAxis:g=!0}=Hn(r,a),v={x:l,y:i},y=kn(c),E=Uu(y);let k=v[E],C=v[y];const b=Hn(m,a),j=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(x){const S=E==="y"?"height":"width",A=d.reference[E]-d.floating[S]+j.mainAxis,V=d.reference[E]+d.reference[S]-j.mainAxis;kV&&(k=V)}if(g){var N,R;const S=E==="y"?"width":"height",A=Ax.has(Kn(c)),V=d.reference[y]-d.floating[S]+(A&&((N=f.offset)==null?void 0:N[y])||0)+(A?0:j.crossAxis),Q=d.reference[y]+d.reference[S]+(A?0:((R=f.offset)==null?void 0:R[y])||0)-(A?j.crossAxis:0);CQ&&(C=Q)}return{[E]:k,[y]:C}}}},j2=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(a){var l,i;const{placement:c,rects:d,platform:f,elements:m}=a,{apply:x=()=>{},...g}=Hn(r,a),v=await f.detectOverflow(a,g),y=Kn(c),E=Fs(c),k=kn(c)==="y",{width:C,height:b}=d.floating;let j,N;y==="top"||y==="bottom"?(j=y,N=E===(await(f.isRTL==null?void 0:f.isRTL(m.floating))?"start":"end")?"left":"right"):(N=y,j=E==="end"?"top":"bottom");const R=b-v.top-v.bottom,S=C-v.left-v.right,A=jr(b-v[j],R),V=jr(C-v[N],S),Q=!a.middlewareData.shift;let G=A,U=V;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(U=S),(i=a.middlewareData.shift)!=null&&i.enabled.y&&(G=R),Q&&!E){const fe=Gt(v.left,0),oe=Gt(v.right,0),H=Gt(v.top,0),P=Gt(v.bottom,0);k?U=C-2*(fe!==0||oe!==0?fe+oe:Gt(v.left,v.right)):G=b-2*(H!==0||P!==0?H+P:Gt(v.top,v.bottom))}await x({...a,availableWidth:U,availableHeight:G});const ie=await f.getDimensions(m.floating);return C!==ie.width||b!==ie.height?{reset:{rects:!0}}:{}}}};function Io(){return typeof window<"u"}function zs(r){return Mx(r)?(r.nodeName||"").toLowerCase():"#document"}function Qt(r){var a;return(r==null||(a=r.ownerDocument)==null?void 0:a.defaultView)||window}function _n(r){var a;return(a=(Mx(r)?r.ownerDocument:r.document)||window.document)==null?void 0:a.documentElement}function Mx(r){return Io()?r instanceof Node||r instanceof Qt(r).Node:!1}function hn(r){return Io()?r instanceof Element||r instanceof Qt(r).Element:!1}function Rn(r){return Io()?r instanceof HTMLElement||r instanceof Qt(r).HTMLElement:!1}function Fm(r){return!Io()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Qt(r).ShadowRoot}const b2=new Set(["inline","contents"]);function Da(r){const{overflow:a,overflowX:l,overflowY:i,display:c}=mn(r);return/auto|scroll|overlay|hidden|clip/.test(a+i+l)&&!b2.has(c)}const S2=new Set(["table","td","th"]);function C2(r){return S2.has(zs(r))}const k2=[":popover-open",":modal"];function Ao(r){return k2.some(a=>{try{return r.matches(a)}catch{return!1}})}const E2=["transform","translate","scale","rotate","perspective"],P2=["transform","translate","scale","rotate","perspective","filter"],R2=["paint","layout","strict","content"];function Hu(r){const a=Ku(),l=hn(r)?mn(r):r;return E2.some(i=>l[i]?l[i]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!a&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!a&&(l.filter?l.filter!=="none":!1)||P2.some(i=>(l.willChange||"").includes(i))||R2.some(i=>(l.contain||"").includes(i))}function _2(r){let a=br(r);for(;Rn(a)&&!As(a);){if(Hu(a))return a;if(Ao(a))return null;a=br(a)}return null}function Ku(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const T2=new Set(["html","body","#document"]);function As(r){return T2.has(zs(r))}function mn(r){return Qt(r).getComputedStyle(r)}function Mo(r){return hn(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function br(r){if(zs(r)==="html")return r;const a=r.assignedSlot||r.parentNode||Fm(r)&&r.host||_n(r);return Fm(a)?a.host:a}function Lx(r){const a=br(r);return As(a)?r.ownerDocument?r.ownerDocument.body:r.body:Rn(a)&&Da(a)?a:Lx(a)}function Ta(r,a,l){var i;a===void 0&&(a=[]),l===void 0&&(l=!0);const c=Lx(r),d=c===((i=r.ownerDocument)==null?void 0:i.body),f=Qt(c);if(d){const m=uu(f);return a.concat(f,f.visualViewport||[],Da(c)?c:[],m&&l?Ta(m):[])}return a.concat(c,Ta(c,[],l))}function uu(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function Dx(r){const a=mn(r);let l=parseFloat(a.width)||0,i=parseFloat(a.height)||0;const c=Rn(r),d=c?r.offsetWidth:l,f=c?r.offsetHeight:i,m=mo(l)!==d||mo(i)!==f;return m&&(l=d,i=f),{width:l,height:i,$:m}}function Gu(r){return hn(r)?r:r.contextElement}function Rs(r){const a=Gu(r);if(!Rn(a))return En(1);const l=a.getBoundingClientRect(),{width:i,height:c,$:d}=Dx(a);let f=(d?mo(l.width):l.width)/i,m=(d?mo(l.height):l.height)/c;return(!f||!Number.isFinite(f))&&(f=1),(!m||!Number.isFinite(m))&&(m=1),{x:f,y:m}}const I2=En(0);function Ox(r){const a=Qt(r);return!Ku()||!a.visualViewport?I2:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function A2(r,a,l){return a===void 0&&(a=!1),!l||a&&l!==Qt(r)?!1:a}function Gr(r,a,l,i){a===void 0&&(a=!1),l===void 0&&(l=!1);const c=r.getBoundingClientRect(),d=Gu(r);let f=En(1);a&&(i?hn(i)&&(f=Rs(i)):f=Rs(r));const m=A2(d,l,i)?Ox(d):En(0);let x=(c.left+m.x)/f.x,g=(c.top+m.y)/f.y,v=c.width/f.x,y=c.height/f.y;if(d){const E=Qt(d),k=i&&hn(i)?Qt(i):i;let C=E,b=uu(C);for(;b&&i&&k!==C;){const j=Rs(b),N=b.getBoundingClientRect(),R=mn(b),S=N.left+(b.clientLeft+parseFloat(R.paddingLeft))*j.x,A=N.top+(b.clientTop+parseFloat(R.paddingTop))*j.y;x*=j.x,g*=j.y,v*=j.x,y*=j.y,x+=S,g+=A,C=Qt(b),b=uu(C)}}return xo({width:v,height:y,x,y:g})}function Lo(r,a){const l=Mo(r).scrollLeft;return a?a.left+l:Gr(_n(r)).left+l}function Fx(r,a){const l=r.getBoundingClientRect(),i=l.left+a.scrollLeft-Lo(r,l),c=l.top+a.scrollTop;return{x:i,y:c}}function M2(r){let{elements:a,rect:l,offsetParent:i,strategy:c}=r;const d=c==="fixed",f=_n(i),m=a?Ao(a.floating):!1;if(i===f||m&&d)return l;let x={scrollLeft:0,scrollTop:0},g=En(1);const v=En(0),y=Rn(i);if((y||!y&&!d)&&((zs(i)!=="body"||Da(f))&&(x=Mo(i)),Rn(i))){const k=Gr(i);g=Rs(i),v.x=k.x+i.clientLeft,v.y=k.y+i.clientTop}const E=f&&!y&&!d?Fx(f,x):En(0);return{width:l.width*g.x,height:l.height*g.y,x:l.x*g.x-x.scrollLeft*g.x+v.x+E.x,y:l.y*g.y-x.scrollTop*g.y+v.y+E.y}}function L2(r){return Array.from(r.getClientRects())}function D2(r){const a=_n(r),l=Mo(r),i=r.ownerDocument.body,c=Gt(a.scrollWidth,a.clientWidth,i.scrollWidth,i.clientWidth),d=Gt(a.scrollHeight,a.clientHeight,i.scrollHeight,i.clientHeight);let f=-l.scrollLeft+Lo(r);const m=-l.scrollTop;return mn(i).direction==="rtl"&&(f+=Gt(a.clientWidth,i.clientWidth)-c),{width:c,height:d,x:f,y:m}}const zm=25;function O2(r,a){const l=Qt(r),i=_n(r),c=l.visualViewport;let d=i.clientWidth,f=i.clientHeight,m=0,x=0;if(c){d=c.width,f=c.height;const v=Ku();(!v||v&&a==="fixed")&&(m=c.offsetLeft,x=c.offsetTop)}const g=Lo(i);if(g<=0){const v=i.ownerDocument,y=v.body,E=getComputedStyle(y),k=v.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,C=Math.abs(i.clientWidth-y.clientWidth-k);C<=zm&&(d-=C)}else g<=zm&&(d+=g);return{width:d,height:f,x:m,y:x}}const F2=new Set(["absolute","fixed"]);function z2(r,a){const l=Gr(r,!0,a==="fixed"),i=l.top+r.clientTop,c=l.left+r.clientLeft,d=Rn(r)?Rs(r):En(1),f=r.clientWidth*d.x,m=r.clientHeight*d.y,x=c*d.x,g=i*d.y;return{width:f,height:m,x,y:g}}function $m(r,a,l){let i;if(a==="viewport")i=O2(r,l);else if(a==="document")i=D2(_n(r));else if(hn(a))i=z2(a,l);else{const c=Ox(r);i={x:a.x-c.x,y:a.y-c.y,width:a.width,height:a.height}}return xo(i)}function zx(r,a){const l=br(r);return l===a||!hn(l)||As(l)?!1:mn(l).position==="fixed"||zx(l,a)}function $2(r,a){const l=a.get(r);if(l)return l;let i=Ta(r,[],!1).filter(m=>hn(m)&&zs(m)!=="body"),c=null;const d=mn(r).position==="fixed";let f=d?br(r):r;for(;hn(f)&&!As(f);){const m=mn(f),x=Hu(f);!x&&m.position==="fixed"&&(c=null),(d?!x&&!c:!x&&m.position==="static"&&!!c&&F2.has(c.position)||Da(f)&&!x&&zx(r,f))?i=i.filter(v=>v!==f):c=m,f=br(f)}return a.set(r,i),i}function B2(r){let{element:a,boundary:l,rootBoundary:i,strategy:c}=r;const f=[...l==="clippingAncestors"?Ao(a)?[]:$2(a,this._c):[].concat(l),i],m=f[0],x=f.reduce((g,v)=>{const y=$m(a,v,c);return g.top=Gt(y.top,g.top),g.right=jr(y.right,g.right),g.bottom=jr(y.bottom,g.bottom),g.left=Gt(y.left,g.left),g},$m(a,m,c));return{width:x.right-x.left,height:x.bottom-x.top,x:x.left,y:x.top}}function U2(r){const{width:a,height:l}=Dx(r);return{width:a,height:l}}function V2(r,a,l){const i=Rn(a),c=_n(a),d=l==="fixed",f=Gr(r,!0,d,a);let m={scrollLeft:0,scrollTop:0};const x=En(0);function g(){x.x=Lo(c)}if(i||!i&&!d)if((zs(a)!=="body"||Da(c))&&(m=Mo(a)),i){const k=Gr(a,!0,d,a);x.x=k.x+a.clientLeft,x.y=k.y+a.clientTop}else c&&g();d&&!i&&c&&g();const v=c&&!i&&!d?Fx(c,m):En(0),y=f.left+m.scrollLeft-x.x-v.x,E=f.top+m.scrollTop-x.y-v.y;return{x:y,y:E,width:f.width,height:f.height}}function Wc(r){return mn(r).position==="static"}function Bm(r,a){if(!Rn(r)||mn(r).position==="fixed")return null;if(a)return a(r);let l=r.offsetParent;return _n(r)===l&&(l=l.ownerDocument.body),l}function $x(r,a){const l=Qt(r);if(Ao(r))return l;if(!Rn(r)){let c=br(r);for(;c&&!As(c);){if(hn(c)&&!Wc(c))return c;c=br(c)}return l}let i=Bm(r,a);for(;i&&C2(i)&&Wc(i);)i=Bm(i,a);return i&&As(i)&&Wc(i)&&!Hu(i)?l:i||_2(r)||l}const W2=async function(r){const a=this.getOffsetParent||$x,l=this.getDimensions,i=await l(r.floating);return{reference:V2(r.reference,await a(r.floating),r.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function H2(r){return mn(r).direction==="rtl"}const K2={convertOffsetParentRelativeRectToViewportRelativeRect:M2,getDocumentElement:_n,getClippingRect:B2,getOffsetParent:$x,getElementRects:W2,getClientRects:L2,getDimensions:U2,getScale:Rs,isElement:hn,isRTL:H2};function Bx(r,a){return r.x===a.x&&r.y===a.y&&r.width===a.width&&r.height===a.height}function G2(r,a){let l=null,i;const c=_n(r);function d(){var m;clearTimeout(i),(m=l)==null||m.disconnect(),l=null}function f(m,x){m===void 0&&(m=!1),x===void 0&&(x=1),d();const g=r.getBoundingClientRect(),{left:v,top:y,width:E,height:k}=g;if(m||a(),!E||!k)return;const C=Jl(y),b=Jl(c.clientWidth-(v+E)),j=Jl(c.clientHeight-(y+k)),N=Jl(v),S={rootMargin:-C+"px "+-b+"px "+-j+"px "+-N+"px",threshold:Gt(0,jr(1,x))||1};let A=!0;function V(Q){const G=Q[0].intersectionRatio;if(G!==x){if(!A)return f();G?f(!1,G):i=setTimeout(()=>{f(!1,1e-7)},1e3)}G===1&&!Bx(g,r.getBoundingClientRect())&&f(),A=!1}try{l=new IntersectionObserver(V,{...S,root:c.ownerDocument})}catch{l=new IntersectionObserver(V,S)}l.observe(r)}return f(!0),d}function Q2(r,a,l,i){i===void 0&&(i={});const{ancestorScroll:c=!0,ancestorResize:d=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:x=!1}=i,g=Gu(r),v=c||d?[...g?Ta(g):[],...Ta(a)]:[];v.forEach(N=>{c&&N.addEventListener("scroll",l,{passive:!0}),d&&N.addEventListener("resize",l)});const y=g&&m?G2(g,l):null;let E=-1,k=null;f&&(k=new ResizeObserver(N=>{let[R]=N;R&&R.target===g&&k&&(k.unobserve(a),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var S;(S=k)==null||S.observe(a)})),l()}),g&&!x&&k.observe(g),k.observe(a));let C,b=x?Gr(r):null;x&&j();function j(){const N=Gr(r);b&&!Bx(b,N)&&l(),b=N,C=requestAnimationFrame(j)}return l(),()=>{var N;v.forEach(R=>{c&&R.removeEventListener("scroll",l),d&&R.removeEventListener("resize",l)}),y==null||y(),(N=k)==null||N.disconnect(),k=null,x&&cancelAnimationFrame(C)}}const Y2=y2,X2=w2,q2=x2,J2=j2,Z2=g2,Um=p2,eS=N2,tS=(r,a,l)=>{const i=new Map,c={platform:K2,...l},d={...c.platform,_c:i};return m2(r,a,{...c,platform:d})};var nS=typeof document<"u",rS=function(){},no=nS?p.useLayoutEffect:rS;function go(r,a){if(r===a)return!0;if(typeof r!=typeof a)return!1;if(typeof r=="function"&&r.toString()===a.toString())return!0;let l,i,c;if(r&&a&&typeof r=="object"){if(Array.isArray(r)){if(l=r.length,l!==a.length)return!1;for(i=l;i--!==0;)if(!go(r[i],a[i]))return!1;return!0}if(c=Object.keys(r),l=c.length,l!==Object.keys(a).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(a,c[i]))return!1;for(i=l;i--!==0;){const d=c[i];if(!(d==="_owner"&&r.$$typeof)&&!go(r[d],a[d]))return!1}return!0}return r!==r&&a!==a}function Ux(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function Vm(r,a){const l=Ux(r);return Math.round(a*l)/l}function Hc(r){const a=p.useRef(r);return no(()=>{a.current=r}),a}function sS(r){r===void 0&&(r={});const{placement:a="bottom",strategy:l="absolute",middleware:i=[],platform:c,elements:{reference:d,floating:f}={},transform:m=!0,whileElementsMounted:x,open:g}=r,[v,y]=p.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[E,k]=p.useState(i);go(E,i)||k(i);const[C,b]=p.useState(null),[j,N]=p.useState(null),R=p.useCallback(T=>{T!==Q.current&&(Q.current=T,b(T))},[]),S=p.useCallback(T=>{T!==G.current&&(G.current=T,N(T))},[]),A=d||C,V=f||j,Q=p.useRef(null),G=p.useRef(null),U=p.useRef(v),ie=x!=null,fe=Hc(x),oe=Hc(c),H=Hc(g),P=p.useCallback(()=>{if(!Q.current||!G.current)return;const T={placement:a,strategy:l,middleware:E};oe.current&&(T.platform=oe.current),tS(Q.current,G.current,T).then(J=>{const X={...J,isPositioned:H.current!==!1};K.current&&!go(U.current,X)&&(U.current=X,Ia.flushSync(()=>{y(X)}))})},[E,a,l,oe,H]);no(()=>{g===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,y(T=>({...T,isPositioned:!1})))},[g]);const K=p.useRef(!1);no(()=>(K.current=!0,()=>{K.current=!1}),[]),no(()=>{if(A&&(Q.current=A),V&&(G.current=V),A&&V){if(fe.current)return fe.current(A,V,P);P()}},[A,V,P,fe,ie]);const re=p.useMemo(()=>({reference:Q,floating:G,setReference:R,setFloating:S}),[R,S]),W=p.useMemo(()=>({reference:A,floating:V}),[A,V]),$=p.useMemo(()=>{const T={position:l,left:0,top:0};if(!W.floating)return T;const J=Vm(W.floating,v.x),X=Vm(W.floating,v.y);return m?{...T,transform:"translate("+J+"px, "+X+"px)",...Ux(W.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:J,top:X}},[l,m,W.floating,v.x,v.y]);return p.useMemo(()=>({...v,update:P,refs:re,elements:W,floatingStyles:$}),[v,P,re,W,$])}const aS=r=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:r,fn(l){const{element:i,padding:c}=typeof r=="function"?r(l):r;return i&&a(i)?i.current!=null?Um({element:i.current,padding:c}).fn(l):{}:i?Um({element:i,padding:c}).fn(l):{}}}},lS=(r,a)=>({...Y2(r),options:[r,a]}),oS=(r,a)=>({...X2(r),options:[r,a]}),iS=(r,a)=>({...eS(r),options:[r,a]}),cS=(r,a)=>({...q2(r),options:[r,a]}),uS=(r,a)=>({...J2(r),options:[r,a]}),dS=(r,a)=>({...Z2(r),options:[r,a]}),fS=(r,a)=>({...aS(r),options:[r,a]});var hS="Arrow",Vx=p.forwardRef((r,a)=>{const{children:l,width:i=10,height:c=5,...d}=r;return n.jsx(De.svg,{...d,ref:a,width:i,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?l:n.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vx.displayName=hS;var mS=Vx,Qu="Popper",[Wx,Hx]=Cr(Qu),[pS,Kx]=Wx(Qu),Gx=r=>{const{__scopePopper:a,children:l}=r,[i,c]=p.useState(null);return n.jsx(pS,{scope:a,anchor:i,onAnchorChange:c,children:l})};Gx.displayName=Qu;var Qx="PopperAnchor",Yx=p.forwardRef((r,a)=>{const{__scopePopper:l,virtualRef:i,...c}=r,d=Kx(Qx,l),f=p.useRef(null),m=We(a,f),x=p.useRef(null);return p.useEffect(()=>{const g=x.current;x.current=(i==null?void 0:i.current)||f.current,g!==x.current&&d.onAnchorChange(x.current)}),i?null:n.jsx(De.div,{...c,ref:m})});Yx.displayName=Qx;var Yu="PopperContent",[xS,gS]=Wx(Yu),Xx=p.forwardRef((r,a)=>{var ne,me,Ee,Se,Te,Ae;const{__scopePopper:l,side:i="bottom",sideOffset:c=0,align:d="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:x=!0,collisionBoundary:g=[],collisionPadding:v=0,sticky:y="partial",hideWhenDetached:E=!1,updatePositionStrategy:k="optimized",onPlaced:C,...b}=r,j=Kx(Yu,l),[N,R]=p.useState(null),S=We(a,nt=>R(nt)),[A,V]=p.useState(null),Q=Fu(A),G=(Q==null?void 0:Q.width)??0,U=(Q==null?void 0:Q.height)??0,ie=i+(d!=="center"?"-"+d:""),fe=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},oe=Array.isArray(g)?g:[g],H=oe.length>0,P={padding:fe,boundary:oe.filter(yS),altBoundary:H},{refs:K,floatingStyles:re,placement:W,isPositioned:$,middlewareData:T}=sS({strategy:"fixed",placement:ie,whileElementsMounted:(...nt)=>Q2(...nt,{animationFrame:k==="always"}),elements:{reference:j.anchor},middleware:[lS({mainAxis:c+U,alignmentAxis:f}),x&&oS({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?iS():void 0,...P}),x&&cS({...P}),uS({...P,apply:({elements:nt,rects:ut,availableWidth:$t,availableHeight:Bt})=>{const{width:At,height:Y}=ut.reference,Me=nt.floating.style;Me.setProperty("--radix-popper-available-width",`${$t}px`),Me.setProperty("--radix-popper-available-height",`${Bt}px`),Me.setProperty("--radix-popper-anchor-width",`${At}px`),Me.setProperty("--radix-popper-anchor-height",`${Y}px`)}}),A&&fS({element:A,padding:m}),wS({arrowWidth:G,arrowHeight:U}),E&&dS({strategy:"referenceHidden",...P})]}),[J,X]=Zx(W),L=Nr(C);Rt(()=>{$&&(L==null||L())},[$,L]);const B=(ne=T.arrow)==null?void 0:ne.x,le=(me=T.arrow)==null?void 0:me.y,Z=((Ee=T.arrow)==null?void 0:Ee.centerOffset)!==0,[be,je]=p.useState();return Rt(()=>{N&&je(window.getComputedStyle(N).zIndex)},[N]),n.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:$?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(Se=T.transformOrigin)==null?void 0:Se.x,(Te=T.transformOrigin)==null?void 0:Te.y].join(" "),...((Ae=T.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:r.dir,children:n.jsx(xS,{scope:l,placedSide:J,onArrowChange:V,arrowX:B,arrowY:le,shouldHideArrow:Z,children:n.jsx(De.div,{"data-side":J,"data-align":X,...b,ref:S,style:{...b.style,animation:$?void 0:"none"}})})})});Xx.displayName=Yu;var qx="PopperArrow",vS={top:"bottom",right:"left",bottom:"top",left:"right"},Jx=p.forwardRef(function(a,l){const{__scopePopper:i,...c}=a,d=gS(qx,i),f=vS[d.placedSide];return n.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:n.jsx(mS,{...c,ref:l,style:{...c.style,display:"block"}})})});Jx.displayName=qx;function yS(r){return r!==null}var wS=r=>({name:"transformOrigin",options:r,fn(a){var j,N,R;const{placement:l,rects:i,middlewareData:c}=a,f=((j=c.arrow)==null?void 0:j.centerOffset)!==0,m=f?0:r.arrowWidth,x=f?0:r.arrowHeight,[g,v]=Zx(l),y={start:"0%",center:"50%",end:"100%"}[v],E=(((N=c.arrow)==null?void 0:N.x)??0)+m/2,k=(((R=c.arrow)==null?void 0:R.y)??0)+x/2;let C="",b="";return g==="bottom"?(C=f?y:`${E}px`,b=`${-x}px`):g==="top"?(C=f?y:`${E}px`,b=`${i.floating.height+x}px`):g==="right"?(C=`${-x}px`,b=f?y:`${k}px`):g==="left"&&(C=`${i.floating.width+x}px`,b=f?y:`${k}px`),{data:{x:C,y:b}}}});function Zx(r){const[a,l="center"]=r.split("-");return[a,l]}var NS=Gx,jS=Yx,bS=Xx,SS=Jx,eg=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),CS="VisuallyHidden",kS=p.forwardRef((r,a)=>n.jsx(De.span,{...r,ref:a,style:{...eg,...r.style}}));kS.displayName=CS;var ES=[" ","Enter","ArrowUp","ArrowDown"],PS=[" ","Enter"],Qr="Select",[Do,Oo,RS]=zu(Qr),[$s]=Cr(Qr,[RS,Hx]),Fo=Hx(),[_S,kr]=$s(Qr),[TS,IS]=$s(Qr),tg=r=>{const{__scopeSelect:a,children:l,open:i,defaultOpen:c,onOpenChange:d,value:f,defaultValue:m,onValueChange:x,dir:g,name:v,autoComplete:y,disabled:E,required:k,form:C}=r,b=Fo(a),[j,N]=p.useState(null),[R,S]=p.useState(null),[A,V]=p.useState(!1),Q=Ro(g),[G,U]=Hr({prop:i,defaultProp:c??!1,onChange:d,caller:Qr}),[ie,fe]=Hr({prop:f,defaultProp:m,onChange:x,caller:Qr}),oe=p.useRef(null),H=j?C||!!j.closest("form"):!0,[P,K]=p.useState(new Set),re=Array.from(P).map(W=>W.props.value).join(";");return n.jsx(NS,{...b,children:n.jsxs(_S,{required:k,scope:a,trigger:j,onTriggerChange:N,valueNode:R,onValueNodeChange:S,valueNodeHasChildren:A,onValueNodeHasChildrenChange:V,contentId:wr(),value:ie,onValueChange:fe,open:G,onOpenChange:U,dir:Q,triggerPointerDownPosRef:oe,disabled:E,children:[n.jsx(Do.Provider,{scope:a,children:n.jsx(TS,{scope:r.__scopeSelect,onNativeOptionAdd:p.useCallback(W=>{K($=>new Set($).add(W))},[]),onNativeOptionRemove:p.useCallback(W=>{K($=>{const T=new Set($);return T.delete(W),T})},[]),children:l})}),H?n.jsxs(bg,{"aria-hidden":!0,required:k,tabIndex:-1,name:v,autoComplete:y,value:ie,onChange:W=>fe(W.target.value),disabled:E,form:C,children:[ie===void 0?n.jsx("option",{value:""}):null,Array.from(P)]},re):null]})})};tg.displayName=Qr;var ng="SelectTrigger",rg=p.forwardRef((r,a)=>{const{__scopeSelect:l,disabled:i=!1,...c}=r,d=Fo(l),f=kr(ng,l),m=f.disabled||i,x=We(a,f.onTriggerChange),g=Oo(l),v=p.useRef("touch"),[y,E,k]=Cg(b=>{const j=g().filter(S=>!S.disabled),N=j.find(S=>S.value===f.value),R=kg(j,b,N);R!==void 0&&f.onValueChange(R.value)}),C=b=>{m||(f.onOpenChange(!0),k()),b&&(f.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return n.jsx(jS,{asChild:!0,...d,children:n.jsx(De.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Sg(f.value)?"":void 0,...c,ref:x,onClick:Ie(c.onClick,b=>{b.currentTarget.focus(),v.current!=="mouse"&&C(b)}),onPointerDown:Ie(c.onPointerDown,b=>{v.current=b.pointerType;const j=b.target;j.hasPointerCapture(b.pointerId)&&j.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(C(b),b.preventDefault())}),onKeyDown:Ie(c.onKeyDown,b=>{const j=y.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&E(b.key),!(j&&b.key===" ")&&ES.includes(b.key)&&(C(),b.preventDefault())})})})});rg.displayName=ng;var sg="SelectValue",ag=p.forwardRef((r,a)=>{const{__scopeSelect:l,className:i,style:c,children:d,placeholder:f="",...m}=r,x=kr(sg,l),{onValueNodeHasChildrenChange:g}=x,v=d!==void 0,y=We(a,x.onValueNodeChange);return Rt(()=>{g(v)},[g,v]),n.jsx(De.span,{...m,ref:y,style:{pointerEvents:"none"},children:Sg(x.value)?n.jsx(n.Fragment,{children:f}):d})});ag.displayName=sg;var AS="SelectIcon",lg=p.forwardRef((r,a)=>{const{__scopeSelect:l,children:i,...c}=r;return n.jsx(De.span,{"aria-hidden":!0,...c,ref:a,children:i||"▼"})});lg.displayName=AS;var MS="SelectPortal",og=r=>n.jsx(Iu,{asChild:!0,...r});og.displayName=MS;var Yr="SelectContent",ig=p.forwardRef((r,a)=>{const l=kr(Yr,r.__scopeSelect),[i,c]=p.useState();if(Rt(()=>{c(new DocumentFragment)},[]),!l.open){const d=i;return d?Ia.createPortal(n.jsx(cg,{scope:r.__scopeSelect,children:n.jsx(Do.Slot,{scope:r.__scopeSelect,children:n.jsx("div",{children:r.children})})}),d):null}return n.jsx(ug,{...r,ref:a})});ig.displayName=Yr;var dn=10,[cg,Er]=$s(Yr),LS="SelectContentImpl",DS=_a("SelectContent.RemoveScroll"),ug=p.forwardRef((r,a)=>{const{__scopeSelect:l,position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,side:m,sideOffset:x,align:g,alignOffset:v,arrowPadding:y,collisionBoundary:E,collisionPadding:k,sticky:C,hideWhenDetached:b,avoidCollisions:j,...N}=r,R=kr(Yr,l),[S,A]=p.useState(null),[V,Q]=p.useState(null),G=We(a,ne=>A(ne)),[U,ie]=p.useState(null),[fe,oe]=p.useState(null),H=Oo(l),[P,K]=p.useState(!1),re=p.useRef(!1);p.useEffect(()=>{if(S)return Wp(S)},[S]),Lp();const W=p.useCallback(ne=>{const[me,...Ee]=H().map(Ae=>Ae.ref.current),[Se]=Ee.slice(-1),Te=document.activeElement;for(const Ae of ne)if(Ae===Te||(Ae==null||Ae.scrollIntoView({block:"nearest"}),Ae===me&&V&&(V.scrollTop=0),Ae===Se&&V&&(V.scrollTop=V.scrollHeight),Ae==null||Ae.focus(),document.activeElement!==Te))return},[H,V]),$=p.useCallback(()=>W([U,S]),[W,U,S]);p.useEffect(()=>{P&&$()},[P,$]);const{onOpenChange:T,triggerPointerDownPosRef:J}=R;p.useEffect(()=>{if(S){let ne={x:0,y:0};const me=Se=>{var Te,Ae;ne={x:Math.abs(Math.round(Se.pageX)-(((Te=J.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(Se.pageY)-(((Ae=J.current)==null?void 0:Ae.y)??0))}},Ee=Se=>{ne.x<=10&&ne.y<=10?Se.preventDefault():S.contains(Se.target)||T(!1),document.removeEventListener("pointermove",me),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",Ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",Ee,{capture:!0})}}},[S,T,J]),p.useEffect(()=>{const ne=()=>T(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[T]);const[X,L]=Cg(ne=>{const me=H().filter(Te=>!Te.disabled),Ee=me.find(Te=>Te.ref.current===document.activeElement),Se=kg(me,ne,Ee);Se&&setTimeout(()=>Se.ref.current.focus())}),B=p.useCallback((ne,me,Ee)=>{const Se=!re.current&&!Ee;(R.value!==void 0&&R.value===me||Se)&&(ie(ne),Se&&(re.current=!0))},[R.value]),le=p.useCallback(()=>S==null?void 0:S.focus(),[S]),Z=p.useCallback((ne,me,Ee)=>{const Se=!re.current&&!Ee;(R.value!==void 0&&R.value===me||Se)&&oe(ne)},[R.value]),be=i==="popper"?du:dg,je=be===du?{side:m,sideOffset:x,align:g,alignOffset:v,arrowPadding:y,collisionBoundary:E,collisionPadding:k,sticky:C,hideWhenDetached:b,avoidCollisions:j}:{};return n.jsx(cg,{scope:l,content:S,viewport:V,onViewportChange:Q,itemRefCallback:B,selectedItem:U,onItemLeave:le,itemTextRefCallback:Z,focusSelectedItem:$,selectedItemText:fe,position:i,isPositioned:P,searchRef:X,children:n.jsx(Au,{as:DS,allowPinchZoom:!0,children:n.jsx(Tu,{asChild:!0,trapped:R.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:Ie(c,ne=>{var me;(me=R.trigger)==null||me.focus({preventScroll:!0}),ne.preventDefault()}),children:n.jsx(_u,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>R.onOpenChange(!1),children:n.jsx(be,{role:"listbox",id:R.contentId,"data-state":R.open?"open":"closed",dir:R.dir,onContextMenu:ne=>ne.preventDefault(),...N,...je,onPlaced:()=>K(!0),ref:G,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:Ie(N.onKeyDown,ne=>{const me=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!me&&ne.key.length===1&&L(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let Se=H().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(Se=Se.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Te=ne.target,Ae=Se.indexOf(Te);Se=Se.slice(Ae+1)}setTimeout(()=>W(Se)),ne.preventDefault()}})})})})})})});ug.displayName=LS;var OS="SelectItemAlignedPosition",dg=p.forwardRef((r,a)=>{const{__scopeSelect:l,onPlaced:i,...c}=r,d=kr(Yr,l),f=Er(Yr,l),[m,x]=p.useState(null),[g,v]=p.useState(null),y=We(a,G=>v(G)),E=Oo(l),k=p.useRef(!1),C=p.useRef(!0),{viewport:b,selectedItem:j,selectedItemText:N,focusSelectedItem:R}=f,S=p.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&g&&b&&j&&N){const G=d.trigger.getBoundingClientRect(),U=g.getBoundingClientRect(),ie=d.valueNode.getBoundingClientRect(),fe=N.getBoundingClientRect();if(d.dir!=="rtl"){const Te=fe.left-U.left,Ae=ie.left-Te,nt=G.left-Ae,ut=G.width+nt,$t=Math.max(ut,U.width),Bt=window.innerWidth-dn,At=ho(Ae,[dn,Math.max(dn,Bt-$t)]);m.style.minWidth=ut+"px",m.style.left=At+"px"}else{const Te=U.right-fe.right,Ae=window.innerWidth-ie.right-Te,nt=window.innerWidth-G.right-Ae,ut=G.width+nt,$t=Math.max(ut,U.width),Bt=window.innerWidth-dn,At=ho(Ae,[dn,Math.max(dn,Bt-$t)]);m.style.minWidth=ut+"px",m.style.right=At+"px"}const oe=E(),H=window.innerHeight-dn*2,P=b.scrollHeight,K=window.getComputedStyle(g),re=parseInt(K.borderTopWidth,10),W=parseInt(K.paddingTop,10),$=parseInt(K.borderBottomWidth,10),T=parseInt(K.paddingBottom,10),J=re+W+P+T+$,X=Math.min(j.offsetHeight*5,J),L=window.getComputedStyle(b),B=parseInt(L.paddingTop,10),le=parseInt(L.paddingBottom,10),Z=G.top+G.height/2-dn,be=H-Z,je=j.offsetHeight/2,ne=j.offsetTop+je,me=re+W+ne,Ee=J-me;if(me<=Z){const Te=oe.length>0&&j===oe[oe.length-1].ref.current;m.style.bottom="0px";const Ae=g.clientHeight-b.offsetTop-b.offsetHeight,nt=Math.max(be,je+(Te?le:0)+Ae+$),ut=me+nt;m.style.height=ut+"px"}else{const Te=oe.length>0&&j===oe[0].ref.current;m.style.top="0px";const nt=Math.max(Z,re+b.offsetTop+(Te?B:0)+je)+Ee;m.style.height=nt+"px",b.scrollTop=me-Z+b.offsetTop}m.style.margin=`${dn}px 0`,m.style.minHeight=X+"px",m.style.maxHeight=H+"px",i==null||i(),requestAnimationFrame(()=>k.current=!0)}},[E,d.trigger,d.valueNode,m,g,b,j,N,d.dir,i]);Rt(()=>S(),[S]);const[A,V]=p.useState();Rt(()=>{g&&V(window.getComputedStyle(g).zIndex)},[g]);const Q=p.useCallback(G=>{G&&C.current===!0&&(S(),R==null||R(),C.current=!1)},[S,R]);return n.jsx(zS,{scope:l,contentWrapper:m,shouldExpandOnScrollRef:k,onScrollButtonChange:Q,children:n.jsx("div",{ref:x,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:n.jsx(De.div,{...c,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});dg.displayName=OS;var FS="SelectPopperPosition",du=p.forwardRef((r,a)=>{const{__scopeSelect:l,align:i="start",collisionPadding:c=dn,...d}=r,f=Fo(l);return n.jsx(bS,{...f,...d,ref:a,align:i,collisionPadding:c,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});du.displayName=FS;var[zS,Xu]=$s(Yr,{}),fu="SelectViewport",fg=p.forwardRef((r,a)=>{const{__scopeSelect:l,nonce:i,...c}=r,d=Er(fu,l),f=Xu(fu,l),m=We(a,d.onViewportChange),x=p.useRef(0);return n.jsxs(n.Fragment,{children:[n.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),n.jsx(Do.Slot,{scope:l,children:n.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:Ie(c.onScroll,g=>{const v=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:E}=f;if(E!=null&&E.current&&y){const k=Math.abs(x.current-v.scrollTop);if(k>0){const C=window.innerHeight-dn*2,b=parseFloat(y.style.minHeight),j=parseFloat(y.style.height),N=Math.max(b,j);if(N0?A:0,y.style.justifyContent="flex-end")}}}x.current=v.scrollTop})})})]})});fg.displayName=fu;var hg="SelectGroup",[$S,BS]=$s(hg),US=p.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r,c=wr();return n.jsx($S,{scope:l,id:c,children:n.jsx(De.div,{role:"group","aria-labelledby":c,...i,ref:a})})});US.displayName=hg;var mg="SelectLabel",VS=p.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r,c=BS(mg,l);return n.jsx(De.div,{id:c.id,...i,ref:a})});VS.displayName=mg;var vo="SelectItem",[WS,pg]=$s(vo),xg=p.forwardRef((r,a)=>{const{__scopeSelect:l,value:i,disabled:c=!1,textValue:d,...f}=r,m=kr(vo,l),x=Er(vo,l),g=m.value===i,[v,y]=p.useState(d??""),[E,k]=p.useState(!1),C=We(a,R=>{var S;return(S=x.itemRefCallback)==null?void 0:S.call(x,R,i,c)}),b=wr(),j=p.useRef("touch"),N=()=>{c||(m.onValueChange(i),m.onOpenChange(!1))};if(i==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return n.jsx(WS,{scope:l,value:i,disabled:c,textId:b,isSelected:g,onItemTextChange:p.useCallback(R=>{y(S=>S||((R==null?void 0:R.textContent)??"").trim())},[]),children:n.jsx(Do.ItemSlot,{scope:l,value:i,disabled:c,textValue:v,children:n.jsx(De.div,{role:"option","aria-labelledby":b,"data-highlighted":E?"":void 0,"aria-selected":g&&E,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...f,ref:C,onFocus:Ie(f.onFocus,()=>k(!0)),onBlur:Ie(f.onBlur,()=>k(!1)),onClick:Ie(f.onClick,()=>{j.current!=="mouse"&&N()}),onPointerUp:Ie(f.onPointerUp,()=>{j.current==="mouse"&&N()}),onPointerDown:Ie(f.onPointerDown,R=>{j.current=R.pointerType}),onPointerMove:Ie(f.onPointerMove,R=>{var S;j.current=R.pointerType,c?(S=x.onItemLeave)==null||S.call(x):j.current==="mouse"&&R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ie(f.onPointerLeave,R=>{var S;R.currentTarget===document.activeElement&&((S=x.onItemLeave)==null||S.call(x))}),onKeyDown:Ie(f.onKeyDown,R=>{var A;((A=x.searchRef)==null?void 0:A.current)!==""&&R.key===" "||(PS.includes(R.key)&&N(),R.key===" "&&R.preventDefault())})})})})});xg.displayName=vo;var Ea="SelectItemText",gg=p.forwardRef((r,a)=>{const{__scopeSelect:l,className:i,style:c,...d}=r,f=kr(Ea,l),m=Er(Ea,l),x=pg(Ea,l),g=IS(Ea,l),[v,y]=p.useState(null),E=We(a,N=>y(N),x.onItemTextChange,N=>{var R;return(R=m.itemTextRefCallback)==null?void 0:R.call(m,N,x.value,x.disabled)}),k=v==null?void 0:v.textContent,C=p.useMemo(()=>n.jsx("option",{value:x.value,disabled:x.disabled,children:k},x.value),[x.disabled,x.value,k]),{onNativeOptionAdd:b,onNativeOptionRemove:j}=g;return Rt(()=>(b(C),()=>j(C)),[b,j,C]),n.jsxs(n.Fragment,{children:[n.jsx(De.span,{id:x.textId,...d,ref:E}),x.isSelected&&f.valueNode&&!f.valueNodeHasChildren?Ia.createPortal(d.children,f.valueNode):null]})});gg.displayName=Ea;var vg="SelectItemIndicator",yg=p.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r;return pg(vg,l).isSelected?n.jsx(De.span,{"aria-hidden":!0,...i,ref:a}):null});yg.displayName=vg;var hu="SelectScrollUpButton",wg=p.forwardRef((r,a)=>{const l=Er(hu,r.__scopeSelect),i=Xu(hu,r.__scopeSelect),[c,d]=p.useState(!1),f=We(a,i.onScrollButtonChange);return Rt(()=>{if(l.viewport&&l.isPositioned){let m=function(){const g=x.scrollTop>0;d(g)};const x=l.viewport;return m(),x.addEventListener("scroll",m),()=>x.removeEventListener("scroll",m)}},[l.viewport,l.isPositioned]),c?n.jsx(jg,{...r,ref:f,onAutoScroll:()=>{const{viewport:m,selectedItem:x}=l;m&&x&&(m.scrollTop=m.scrollTop-x.offsetHeight)}}):null});wg.displayName=hu;var mu="SelectScrollDownButton",Ng=p.forwardRef((r,a)=>{const l=Er(mu,r.__scopeSelect),i=Xu(mu,r.__scopeSelect),[c,d]=p.useState(!1),f=We(a,i.onScrollButtonChange);return Rt(()=>{if(l.viewport&&l.isPositioned){let m=function(){const g=x.scrollHeight-x.clientHeight,v=Math.ceil(x.scrollTop)x.removeEventListener("scroll",m)}},[l.viewport,l.isPositioned]),c?n.jsx(jg,{...r,ref:f,onAutoScroll:()=>{const{viewport:m,selectedItem:x}=l;m&&x&&(m.scrollTop=m.scrollTop+x.offsetHeight)}}):null});Ng.displayName=mu;var jg=p.forwardRef((r,a)=>{const{__scopeSelect:l,onAutoScroll:i,...c}=r,d=Er("SelectScrollButton",l),f=p.useRef(null),m=Oo(l),x=p.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return p.useEffect(()=>()=>x(),[x]),Rt(()=>{var v;const g=m().find(y=>y.ref.current===document.activeElement);(v=g==null?void 0:g.ref.current)==null||v.scrollIntoView({block:"nearest"})},[m]),n.jsx(De.div,{"aria-hidden":!0,...c,ref:a,style:{flexShrink:0,...c.style},onPointerDown:Ie(c.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(i,50))}),onPointerMove:Ie(c.onPointerMove,()=>{var g;(g=d.onItemLeave)==null||g.call(d),f.current===null&&(f.current=window.setInterval(i,50))}),onPointerLeave:Ie(c.onPointerLeave,()=>{x()})})}),HS="SelectSeparator",KS=p.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r;return n.jsx(De.div,{"aria-hidden":!0,...i,ref:a})});KS.displayName=HS;var pu="SelectArrow",GS=p.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r,c=Fo(l),d=kr(pu,l),f=Er(pu,l);return d.open&&f.position==="popper"?n.jsx(SS,{...c,...i,ref:a}):null});GS.displayName=pu;var QS="SelectBubbleInput",bg=p.forwardRef(({__scopeSelect:r,value:a,...l},i)=>{const c=p.useRef(null),d=We(i,c),f=Ou(a);return p.useEffect(()=>{const m=c.current;if(!m)return;const x=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(x,"value").set;if(f!==a&&v){const y=new Event("change",{bubbles:!0});v.call(m,a),m.dispatchEvent(y)}},[f,a]),n.jsx(De.select,{...l,style:{...eg,...l.style},ref:d,defaultValue:a})});bg.displayName=QS;function Sg(r){return r===""||r===void 0}function Cg(r){const a=Nr(r),l=p.useRef(""),i=p.useRef(0),c=p.useCallback(f=>{const m=l.current+f;a(m),(function x(g){l.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>x(""),1e3))})(m)},[a]),d=p.useCallback(()=>{l.current="",window.clearTimeout(i.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(i.current),[]),[l,c,d]}function kg(r,a,l){const c=a.length>1&&Array.from(a).every(g=>g===a[0])?a[0]:a,d=l?r.indexOf(l):-1;let f=YS(r,Math.max(d,0));c.length===1&&(f=f.filter(g=>g!==l));const x=f.find(g=>g.textValue.toLowerCase().startsWith(c.toLowerCase()));return x!==l?x:void 0}function YS(r,a){return r.map((l,i)=>r[(a+i)%r.length])}var XS=tg,Eg=rg,qS=ag,JS=lg,ZS=og,Pg=ig,eC=fg,Rg=xg,tC=gg,nC=yg,rC=wg,sC=Ng;const Kc=XS,Gc=qS,ro=p.forwardRef(({className:r,children:a,...l},i)=>n.jsxs(Eg,{ref:i,className:He("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r),...l,children:[a,n.jsx(JS,{asChild:!0,children:n.jsx(ap,{className:"h-4 w-4 opacity-50"})})]}));ro.displayName=Eg.displayName;const so=p.forwardRef(({className:r,children:a,position:l="popper",...i},c)=>n.jsx(ZS,{children:n.jsxs(Pg,{ref:c,className:He("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",l==="popper"&&"data-[side=bottom]:translate-y-1",r),position:l,...i,children:[n.jsx(rC,{className:"flex cursor-default items-center justify-center py-1",children:n.jsx(xw,{className:"h-4 w-4"})}),n.jsx(eC,{className:"p-1",children:a}),n.jsx(sC,{className:"flex cursor-default items-center justify-center py-1",children:n.jsx(ap,{className:"h-4 w-4"})})]})}));so.displayName=Pg.displayName;const gr=p.forwardRef(({className:r,children:a,...l},i)=>n.jsxs(Rg,{ref:i,className:He("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...l,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(nC,{children:n.jsx(No,{className:"h-4 w-4"})})}),n.jsx(tC,{children:a})]}));gr.displayName=Rg.displayName;function aC(r){const a=new Map;for(const l of r){const i=l.partId||"part-1",c=l.partTitle||"未分类",d=l.chapterId||"chapter-1",f=l.chapterTitle||"未分类";a.has(i)||a.set(i,{id:i,title:c,chapters:new Map});const m=a.get(i);m.chapters.has(d)||m.chapters.set(d,{id:d,title:f,sections:[]}),m.chapters.get(d).sections.push({id:l.id,title:l.title,price:l.price??1,filePath:l.filePath,isFree:l.isFree})}return Array.from(a.values()).map(l=>({...l,chapters:Array.from(l.chapters.values())}))}function lC(r,a){const l=r.split(` +`),i=[];let c=null,d=[],f=1;for(const m of l){const x=m.match(/^#+\s+(.+)$/)||m.match(/^(\d+[.\、]\s*.+)$/);x?(c&&(c.content=d.join(` +`).trim(),c.content&&i.push(c)),c={id:`import-${f}`,title:x[1].replace(/^#+\s*/,"").trim(),price:1,isFree:f<=3},d=[],f++):c?d.push(m):m.trim()&&(c={id:`import-${f}`,title:a.replace(/\.(txt|md|markdown)$/i,""),price:1,isFree:!0},d.push(m),f++)}return c&&(c.content=d.join(` +`).trim(),c.content&&i.push(c)),i}function oC(){const[r,a]=p.useState([]),[l,i]=p.useState(!0),[c,d]=p.useState([]),[f,m]=p.useState(null),[x,g]=p.useState(!1),[v,y]=p.useState(!1),[E,k]=p.useState(!1),[C,b]=p.useState(!1),[j,N]=p.useState(""),[R,S]=p.useState(!1),[A,V]=p.useState(!1),[Q,G]=p.useState(!1),[U,ie]=p.useState(""),[fe,oe]=p.useState(!1),[H,P]=p.useState(!1),[K,re]=p.useState(""),[W,$]=p.useState([]),[T,J]=p.useState(!1),[X,L]=p.useState(!1),B=p.useRef(null),le=p.useRef(null),[Z,be]=p.useState({id:"",title:"",price:1,partId:"part-1",chapterId:"chapter-1",content:""}),je=aC(r),ne=r.length,me=async()=>{i(!0);try{const z=await Xe("/api/db/book?action=list");a(Array.isArray(z==null?void 0:z.sections)?z.sections:[]),c.length===0&&je.length>0&&d([je[0].id])}catch(z){console.error(z),a([])}finally{i(!1)}};p.useEffect(()=>{me()},[]),p.useEffect(()=>{!l&&je.length>0&&c.length===0&&d([je[0].id])},[l,je.length,c.length]);const Ee=z=>{d(de=>de.includes(z)?de.filter(lt=>lt!==z):[...de,z])},Se=async z=>{oe(!0);try{const de=await Xe(`/api/db/book?action=read&id=${encodeURIComponent(z.id)}`);de!=null&&de.success&&de.section?m({id:z.id,title:de.section.title??z.title,price:de.section.price??z.price,content:de.section.content??"",filePath:z.filePath,isFree:z.isFree||z.price===0}):(m({id:z.id,title:z.title,price:z.price,content:"",filePath:z.filePath,isFree:z.isFree}),de&&!de.success&&alert("无法读取文件内容: "+(de.error||"未知错误")))}catch(de){console.error(de),m({id:z.id,title:z.title,price:z.price,content:"",filePath:z.filePath,isFree:z.isFree})}finally{oe(!1)}},Te=async()=>{var z;if(f){P(!0);try{let de=f.content||"";const lt=[new RegExp(`^#+\\s*${f.id.replace(".","\\.")}\\s+.*$`,"gm"),new RegExp(`^#+\\s*${f.id.replace(".","\\.")}[::].*$`,"gm"),new RegExp(`^#\\s+.*${(z=f.title)==null?void 0:z.slice(0,10).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}.*$`,"gm")];for(const Ut of lt)de=de.replace(Ut,"");de=de.replace(/^\s*\n+/,"").trim();const Ue=await Wn("/api/db/book",{id:f.id,title:f.title,price:f.isFree?0:f.price,content:de,isFree:f.isFree||f.price===0,saveToFile:!0});Ue&&Ue.success!==!1?(alert(`已保存章节: ${f.title}`),m(null),me()):alert("保存失败: "+(Ue&&typeof Ue=="object"&&"error"in Ue?Ue.error:"未知错误"))}catch(de){console.error(de),alert("保存失败")}finally{P(!1)}}},Ae=async()=>{if(!Z.id||!Z.title){alert("请填写章节ID和标题");return}P(!0);try{const z=await Wn("/api/db/book",{id:Z.id,title:Z.title,price:Z.price,content:Z.content,partId:Z.partId,chapterId:Z.chapterId,saveToFile:!1});z&&z.success!==!1?(alert(`章节创建成功: ${Z.title}`),G(!1),be({id:"",title:"",price:1,partId:"part-1",chapterId:"chapter-1",content:""}),me()):alert("创建失败: "+(z&&typeof z=="object"&&"error"in z?z.error:"未知错误"))}catch(z){console.error(z),alert("创建失败")}finally{P(!1)}},nt=async z=>{var lt,Ue;const de=(lt=z.target.files)==null?void 0:lt[0];if(de){L(!0);try{const Ut=new FormData;Ut.append("file",de),Ut.append("folder","book-images");const ft=await(await fetch(ru("/api/upload"),{method:"POST",body:Ut,credentials:"include"})).json();if(ft!=null&&ft.success&&((Ue=ft==null?void 0:ft.data)!=null&&Ue.url)){const xn=`![${de.name}](${ft.data.url})`;f&&m({...f,content:(f.content||"")+` + +`+xn}),alert(`图片上传成功: ${ft.data.url}`)}else alert("上传失败: "+((ft==null?void 0:ft.error)||"未知错误"))}catch(Ut){console.error(Ut),alert("上传失败")}finally{L(!1),le.current&&(le.current.value="")}}},ut=async()=>{var z;if(K.trim()){J(!0);try{const de=await Xe(`/api/search?q=${encodeURIComponent(K)}`);de!=null&&de.success&&((z=de.data)!=null&&z.results)?$(de.data.results):($([]),de&&!de.success&&alert("搜索失败: "+de.error))}catch(de){console.error(de),$([]),alert("搜索失败")}finally{J(!1)}}},$t=async()=>{g(!0);try{const z=await It("/api/db/book",{action:"sync"});z&&z.success!==!1?(alert(z.message||"同步成功"),me()):alert("同步失败: "+(z&&typeof z=="object"&&"error"in z?z.error:"未知错误"))}catch(z){console.error(z),alert("同步失败")}finally{g(!1)}},Bt=async()=>{y(!0);try{const de=await(await fetch(ru("/api/db/book?action=export"),{credentials:"include"})).blob(),lt=window.URL.createObjectURL(de),Ue=document.createElement("a");Ue.href=lt,Ue.download=`book_sections_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(Ue),Ue.click(),window.URL.revokeObjectURL(lt),document.body.removeChild(Ue),alert("导出成功")}catch(z){console.error(z),alert("导出失败")}finally{y(!1)}},At=async()=>{if(!U.trim()){alert("请输入或上传JSON数据");return}k(!0);try{const z=JSON.parse(U),de=await It("/api/db/book",{action:"import",data:z});de&&de.success!==!1?(alert(de.message||"导入成功"),V(!1),ie(""),me()):alert("导入失败: "+(de&&typeof de=="object"&&"error"in de?de.error:"未知错误"))}catch(z){console.error(z),alert("导入失败: JSON格式错误")}finally{k(!1)}},Y=z=>{var Ue;const de=(Ue=z.target.files)==null?void 0:Ue[0];if(!de)return;const lt=new FileReader;lt.onload=Ut=>{var xn;const Tn=((xn=Ut.target)==null?void 0:xn.result)||"",ft=de.name.toLowerCase();ft.endsWith(".json")?ie(Tn):ft.endsWith(".txt")||ft.endsWith(".md")||ft.endsWith(".markdown")?ie(JSON.stringify(lC(Tn,de.name),null,2)):ie(Tn)},lt.readAsText(de)},Me=async()=>{var z;if(confirm("确定要初始化数据库吗?这将创建所有必需的表结构。")){b(!0);try{const de=await It("/api/db/init",{adminToken:"init_db_2025"});de&&de.success!==!1?alert(((z=de.data)==null?void 0:z.message)||"初始化成功"):alert("初始化失败: "+(de&&typeof de=="object"&&"error"in de?de.error:"未知错误"))}catch(de){console.error(de),alert("初始化失败")}finally{b(!1)}}},ze=async()=>{if(!j.trim()){alert("请输入飞书文档链接");return}g(!0),await new Promise(z=>setTimeout(z,2e3)),g(!1),S(!1),alert("飞书文档同步成功!")},St=je.find(z=>z.id===Z.partId),Qn=(St==null?void 0:St.chapters)??[];return n.jsxs("div",{className:"p-8 max-w-6xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"内容管理"}),n.jsxs("p",{className:"text-gray-400 mt-1",children:["共 ",je.length," 篇 · ",ne," 节内容"]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(he,{onClick:Me,disabled:C,variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Pw,{className:"w-4 h-4 mr-2"}),C?"初始化中...":"初始化数据库"]}),n.jsxs(he,{onClick:$t,disabled:x,variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${x?"animate-spin":""}`}),"同步到数据库"]}),n.jsxs(he,{onClick:()=>V(!0),variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"导入"]}),n.jsxs(he,{onClick:Bt,disabled:v,variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(cp,{className:"w-4 h-4 mr-2"}),v?"导出中...":"导出"]}),n.jsxs(he,{onClick:()=>S(!0),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(up,{className:"w-4 h-4 mr-2"}),"同步飞书"]})]})]}),n.jsx(bn,{open:A,onOpenChange:V,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-2xl",showCloseButton:!0,children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Cs,{className:"w-5 h-5 text-[#38bdac]"}),"导入章节数据"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"上传文件 (支持 JSON / TXT / MD)"}),n.jsx("input",{ref:B,type:"file",accept:".json,.txt,.md,.markdown",onChange:Y,className:"hidden"}),n.jsxs(he,{variant:"outline",onClick:()=>{var z;return(z=B.current)==null?void 0:z.click()},className:"w-full border-dashed border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"选择文件 (JSON/TXT/MD)"]}),n.jsxs("p",{className:"text-xs text-gray-500",children:["• JSON格式: 直接导入章节数据",n.jsx("br",{}),"• TXT/MD格式: 自动解析为章节内容"]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"或粘贴数据"}),n.jsx(Ur,{className:"bg-[#0a1628] border-gray-700 text-white min-h-[200px] font-mono text-sm placeholder:text-gray-500",placeholder:`JSON格式: [{"id": "1-1", "title": "章节标题", "content": "内容..."}] + +或直接粘贴TXT/MD内容,系统将自动解析`,value:U,onChange:z=>ie(z.target.value)})]})]}),n.jsxs(Bn,{children:[n.jsx(he,{variant:"outline",onClick:()=>{V(!1),ie("")},className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(he,{onClick:At,disabled:E||!U.trim(),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:E?n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}),"导入中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"开始导入"]})})]})]})}),n.jsx(bn,{open:R,onOpenChange:S,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-lg",showCloseButton:!0,children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(ks,{className:"w-5 h-5 text-[#38bdac]"}),"同步飞书文档"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"飞书文档链接"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",placeholder:"https://xxx.feishu.cn/docx/...",value:j,onChange:z=>N(z.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"请确保文档已开启公开访问权限"})]}),n.jsx("div",{className:"bg-[#38bdac]/10 border border-[#38bdac]/30 rounded-lg p-3",children:n.jsx("p",{className:"text-[#38bdac] text-sm",children:"同步说明:系统将自动解析飞书文档结构,按照标题层级导入为章节内容。"})})]}),n.jsxs(Bn,{children:[n.jsx(he,{variant:"outline",onClick:()=>S(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(he,{onClick:ze,disabled:x,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:x?n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}),"同步中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-2"}),"开始同步"]})})]})]})}),n.jsx(bn,{open:Q,onOpenChange:G,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-2xl max-h-[90vh] overflow-y-auto",showCloseButton:!0,children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Es,{className:"w-5 h-5 text-[#38bdac]"}),"新建章节"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"章节ID *"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: 9.15",value:Z.id,onChange:z=>be({...Z,id:z.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"价格 (元)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:Z.price,onChange:z=>be({...Z,price:Number(z.target.value)})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"章节标题 *"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"输入章节标题",value:Z.title,onChange:z=>be({...Z,title:z.target.value})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"所属篇"}),n.jsxs(Kc,{value:Z.partId,onValueChange:z=>be({...Z,partId:z,chapterId:"chapter-1"}),children:[n.jsx(ro,{className:"bg-[#0a1628] border-gray-700 text-white",children:n.jsx(Gc,{})}),n.jsxs(so,{className:"bg-[#0f2137] border-gray-700",children:[je.map(z=>n.jsx(gr,{value:z.id,className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:z.title},z.id)),je.length===0&&n.jsx(gr,{value:"part-1",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"默认篇"})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"所属章"}),n.jsxs(Kc,{value:Z.chapterId,onValueChange:z=>be({...Z,chapterId:z}),children:[n.jsx(ro,{className:"bg-[#0a1628] border-gray-700 text-white",children:n.jsx(Gc,{})}),n.jsxs(so,{className:"bg-[#0f2137] border-gray-700",children:[Qn.map(z=>n.jsx(gr,{value:z.id,className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:z.title},z.id)),Qn.length===0&&n.jsx(gr,{value:"chapter-1",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"默认章"})]})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"内容 (Markdown格式)"}),n.jsx(Ur,{className:"bg-[#0a1628] border-gray-700 text-white min-h-[300px] font-mono text-sm placeholder:text-gray-500",placeholder:"输入章节内容...",value:Z.content,onChange:z=>be({...Z,content:z.target.value})})]})]}),n.jsxs(Bn,{children:[n.jsx(he,{variant:"outline",onClick:()=>G(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(he,{onClick:Ae,disabled:H||!Z.id||!Z.title,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:H?n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}),"创建中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Es,{className:"w-4 h-4 mr-2"}),"创建章节"]})})]})]})}),n.jsx(bn,{open:!!f,onOpenChange:()=>m(null),children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-4xl max-h-[90vh] overflow-y-auto",showCloseButton:!0,children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[n.jsx(Ts,{className:"w-5 h-5 text-[#38bdac]"}),"编辑章节"]})}),f&&n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"章节ID"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:f.id,disabled:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"价格 (元)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:f.isFree?0:f.price,onChange:z=>m({...f,price:Number(z.target.value),isFree:Number(z.target.value)===0}),disabled:f.isFree})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"免费章节"}),n.jsx("div",{className:"flex items-center h-10",children:n.jsxs("label",{className:"flex items-center cursor-pointer",children:[n.jsx("input",{type:"checkbox",checked:f.isFree||f.price===0,onChange:z=>m({...f,isFree:z.target.checked,price:z.target.checked?0:1}),className:"w-5 h-5 rounded border-gray-600 bg-[#0a1628] text-[#38bdac] focus:ring-[#38bdac]"}),n.jsx("span",{className:"ml-2 text-gray-400 text-sm",children:"设为免费"})]})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"章节标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:f.title,onChange:z=>m({...f,title:z.target.value})})]}),f.filePath&&n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"文件路径"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-gray-400 text-sm",value:f.filePath,disabled:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(ae,{className:"text-gray-300",children:"内容 (Markdown格式)"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{ref:le,type:"file",accept:"image/*",onChange:nt,className:"hidden"}),n.jsxs(he,{variant:"outline",size:"sm",onClick:()=>{var z;return(z=le.current)==null?void 0:z.click()},disabled:X,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[X?n.jsx(et,{className:"w-4 h-4 mr-1 animate-spin"}):n.jsx(Uw,{className:"w-4 h-4 mr-1"}),"上传图片"]})]})]}),fe?n.jsxs("div",{className:"bg-[#0a1628] border border-gray-700 rounded-md min-h-[400px] flex items-center justify-center",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsx(Ur,{className:"bg-[#0a1628] border-gray-700 text-white min-h-[400px] font-mono text-sm placeholder:text-gray-500",placeholder:"此处输入章节内容,支持Markdown格式...",value:f.content,onChange:z=>m({...f,content:z.target.value})})]})]}),n.jsxs(Bn,{children:[n.jsxs(he,{variant:"outline",onClick:()=>m(null),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Wr,{className:"w-4 h-4 mr-2"}),"取消"]}),n.jsx(he,{onClick:Te,disabled:H,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:H?n.jsxs(n.Fragment,{children:[n.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}),"保存中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),"保存修改"]})})]})]})}),n.jsxs(Bu,{defaultValue:"chapters",className:"space-y-6",children:[n.jsxs(To,{className:"bg-[#0f2137] border border-gray-700/50 p-1",children:[n.jsxs(tn,{value:"chapters",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac] text-gray-400",children:[n.jsx(_s,{className:"w-4 h-4 mr-2"}),"章节管理"]}),n.jsxs(tn,{value:"search",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac] text-gray-400",children:[n.jsx(Vr,{className:"w-4 h-4 mr-2"}),"内容搜索"]}),n.jsxs(tn,{value:"hooks",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac] text-gray-400",children:[n.jsx(v1,{className:"w-4 h-4 mr-2"}),"钩子配置"]})]}),n.jsxs(nn,{value:"chapters",className:"space-y-4",children:[n.jsxs(he,{onClick:()=>G(!0),className:"w-full bg-[#38bdac]/10 hover:bg-[#38bdac]/20 text-[#38bdac] border border-[#38bdac]/30",children:[n.jsx(Es,{className:"w-4 h-4 mr-2"}),"新建章节"]}),l?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(et,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):je.map((z,de)=>n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl overflow-hidden",children:[n.jsx(Ve,{className:"cursor-pointer hover:bg-[#162840] transition-colors",onClick:()=>Ee(z.id),children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"text-[#38bdac] font-mono text-sm",children:["0",de+1]}),n.jsx(Ge,{className:"text-white",children:z.title}),n.jsxs(Fe,{variant:"outline",className:"text-gray-400 border-gray-600",children:[z.chapters.reduce((lt,Ue)=>lt+Ue.sections.length,0)," 节"]})]}),n.jsx(Cu,{className:`w-5 h-5 text-gray-400 transition-transform ${c.includes(z.id)?"rotate-90":""}`})]})}),c.includes(z.id)&&n.jsx(_e,{className:"pt-0 pb-4",children:n.jsx("div",{className:"space-y-3 pl-8 border-l-2 border-gray-700",children:z.chapters.map(lt=>n.jsxs("div",{className:"space-y-2",children:[n.jsx("h4",{className:"font-medium text-gray-300",children:lt.title}),n.jsx("div",{className:"space-y-1",children:lt.sections.map(Ue=>n.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg hover:bg-[#162840] text-sm group transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Jc,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-gray-400",children:Ue.title})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[#38bdac] font-medium",children:Ue.price===0?"免费":`¥${Ue.price}`}),n.jsxs(he,{variant:"ghost",size:"sm",onClick:()=>Se(Ue),className:"text-gray-500 hover:text-[#38bdac] hover:bg-[#38bdac]/10 opacity-0 group-hover:opacity-100 transition-opacity",children:[n.jsx(ku,{className:"w-4 h-4 mr-1"}),"读取"]}),n.jsxs(he,{variant:"ghost",size:"sm",onClick:()=>Se(Ue),className:"text-gray-500 hover:text-[#38bdac] hover:bg-[#38bdac]/10 opacity-0 group-hover:opacity-100 transition-opacity",children:[n.jsx(Ts,{className:"w-4 h-4 mr-1"}),"编辑"]})]})]},Ue.id))})]},lt.id))})})]},z.id))]}),n.jsx(nn,{value:"search",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Ve,{children:n.jsx(Ge,{className:"text-white",children:"内容搜索"})}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 flex-1",placeholder:"搜索标题或内容...",value:K,onChange:z=>re(z.target.value),onKeyDown:z=>z.key==="Enter"&&ut()}),n.jsx(he,{onClick:ut,disabled:T||!K.trim(),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:T?n.jsx(et,{className:"w-4 h-4 animate-spin"}):n.jsx(Vr,{className:"w-4 h-4"})})]}),W.length>0&&n.jsxs("div",{className:"space-y-2 mt-4",children:[n.jsxs("p",{className:"text-gray-400 text-sm",children:["找到 ",W.length," 个结果"]}),W.map(z=>n.jsxs("div",{className:"p-3 rounded-lg bg-[#162840] hover:bg-[#1a3050] cursor-pointer transition-colors",onClick:()=>Se({id:z.id,title:z.title,price:z.price??1,filePath:""}),children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-[#38bdac] font-mono text-xs mr-2",children:z.id}),n.jsx("span",{className:"text-white",children:z.title})]}),n.jsx(Fe,{variant:"outline",className:"text-gray-400 border-gray-600 text-xs",children:z.matchType==="title"?"标题匹配":"内容匹配"})]}),z.snippet&&n.jsx("p",{className:"text-gray-500 text-xs mt-2 line-clamp-2",children:z.snippet}),(z.partTitle||z.chapterTitle)&&n.jsxs("p",{className:"text-gray-600 text-xs mt-1",children:[z.partTitle," · ",z.chapterTitle]})]},z.id))]})]})]})}),n.jsx(nn,{value:"hooks",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Ve,{children:n.jsx(Ge,{className:"text-white",children:"引流钩子配置"})}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid w-full max-w-sm items-center gap-1.5",children:[n.jsx(ae,{htmlFor:"hook-chapter",className:"text-gray-300",children:"触发章节"}),n.jsxs(Kc,{defaultValue:"3",children:[n.jsx(ro,{id:"hook-chapter",className:"bg-[#0a1628] border-gray-700 text-white",children:n.jsx(Gc,{placeholder:"选择章节"})}),n.jsxs(so,{className:"bg-[#0f2137] border-gray-700",children:[n.jsx(gr,{value:"1",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"第一章"}),n.jsx(gr,{value:"2",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"第二章"}),n.jsx(gr,{value:"3",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"第三章 (默认)"})]})]})]}),n.jsxs("div",{className:"grid w-full gap-1.5",children:[n.jsx(ae,{htmlFor:"message",className:"text-gray-300",children:"引流文案"}),n.jsx(Ur,{placeholder:"输入引导用户加群的文案...",id:"message",className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",defaultValue:"阅读更多精彩内容,请加入Soul创业实验派对群..."})]}),n.jsx(he,{className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:"保存配置"})]})]})})]})]})}function iC(){const[r,a]=p.useState([]),[l,i]=p.useState(null),[c,d]=p.useState(!0),[f,m]=p.useState([]),[x,g]=p.useState(null),[v,y]=p.useState(1);async function E(){d(!0);try{const j=await Xe("/api/admin/chapters");j!=null&&j.success&&j.data&&(a(j.data.structure??[]),i(j.data.stats??null))}catch(j){console.error("加载章节失败:",j)}finally{d(!1)}}p.useEffect(()=>{E()},[]);const k=j=>{m(N=>N.includes(j)?N.filter(R=>R!==j):[...N,j])},C=async j=>{try{const N=await It("/api/admin/chapters",{action:"updatePrice",chapterId:j,data:{price:v}});N!=null&&N.success&&(alert("价格更新成功"),g(null),E())}catch(N){console.error("更新价格失败:",N)}},b=async(j,N)=>{try{const R=await It("/api/admin/chapters",{action:"toggleFree",chapterId:j,data:{isFree:!N}});R!=null&&R.success&&(alert("状态更新成功"),E())}catch(R){console.error("更新状态失败:",R)}};return c?n.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:n.jsx("div",{className:"text-xl text-gray-400",children:"加载中..."})}):n.jsxs("div",{className:"min-h-screen bg-black text-white",children:[n.jsx("div",{className:"sticky top-0 bg-black/90 backdrop-blur border-b border-white/10 z-50",children:n.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[n.jsx("h1",{className:"text-xl font-bold",children:"章节管理"}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("button",{type:"button",onClick:()=>m(r.map(j=>j.id)),className:"px-4 py-2 bg-white/10 rounded-lg hover:bg-white/20 text-white",children:"展开全部"}),n.jsx("button",{type:"button",onClick:()=>m([]),className:"px-4 py-2 bg-white/10 rounded-lg hover:bg-white/20 text-white",children:"收起全部"})]})]})}),n.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[l&&n.jsxs("div",{className:"grid grid-cols-4 gap-4 mb-8",children:[n.jsxs("div",{className:"bg-gradient-to-br from-cyan-500/20 to-cyan-500/5 border border-cyan-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-cyan-400",children:l.totalSections}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"总章节数"})]}),n.jsxs("div",{className:"bg-gradient-to-br from-green-500/20 to-green-500/5 border border-green-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-green-400",children:l.freeSections}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"免费章节"})]}),n.jsxs("div",{className:"bg-gradient-to-br from-yellow-500/20 to-yellow-500/5 border border-yellow-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-yellow-400",children:l.paidSections}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"付费章节"})]}),n.jsxs("div",{className:"bg-gradient-to-br from-purple-500/20 to-purple-500/5 border border-purple-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-purple-400",children:l.totalParts}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"篇章数"})]})]}),n.jsx("div",{className:"space-y-4",children:r.map(j=>n.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer hover:bg-white/5",onClick:()=>k(j.id),onKeyDown:N=>N.key==="Enter"&&k(j.id),role:"button",tabIndex:0,children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-2xl",children:j.type==="preface"?"📖":j.type==="epilogue"?"🎬":j.type==="appendix"?"📎":"📚"}),n.jsx("span",{className:"font-semibold text-white",children:j.title}),n.jsxs("span",{className:"text-white/40 text-sm",children:["(",j.chapters.reduce((N,R)=>{var S;return N+(((S=R.sections)==null?void 0:S.length)||1)},0)," 节)"]})]}),n.jsx("span",{className:"text-white/40",children:f.includes(j.id)?"▲":"▼"})]}),f.includes(j.id)&&n.jsx("div",{className:"border-t border-white/10",children:j.chapters.map(N=>n.jsx("div",{className:"border-b border-white/5 last:border-b-0",children:N.sections?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-6 py-3 bg-white/5 text-white/70 font-medium",children:N.title}),n.jsx("div",{className:"divide-y divide-white/5",children:N.sections.map(R=>n.jsxs("div",{className:"flex items-center justify-between px-6 py-3 hover:bg-white/5",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:R.isFree?"text-green-400":"text-yellow-400",children:R.isFree?"🔓":"🔒"}),n.jsx("span",{className:"text-white/80",children:R.id}),n.jsx("span",{className:"text-white/60",children:R.title})]}),n.jsx("div",{className:"flex items-center gap-3",children:x===R.id?n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"number",value:v,onChange:S=>y(Number(S.target.value)),className:"w-20 px-2 py-1 bg-white/10 border border-white/20 rounded text-white",min:0,step:.1}),n.jsx("button",{type:"button",onClick:()=>C(R.id),className:"px-3 py-1 bg-cyan-500 text-black rounded text-sm",children:"保存"}),n.jsx("button",{type:"button",onClick:()=>g(null),className:"px-3 py-1 bg-white/20 rounded text-sm text-white",children:"取消"})]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:`px-2 py-1 rounded text-xs ${R.isFree?"bg-green-500/20 text-green-400":"bg-yellow-500/20 text-yellow-400"}`,children:R.isFree?"免费":`¥${R.price}`}),n.jsx("button",{type:"button",onClick:()=>{g(R.id),y(R.price)},className:"px-2 py-1 text-xs bg-white/10 rounded hover:bg-white/20 text-white",children:"编辑价格"}),n.jsx("button",{type:"button",onClick:()=>b(R.id,R.isFree),className:"px-2 py-1 text-xs bg-white/10 rounded hover:bg-white/20 text-white",children:R.isFree?"设为付费":"设为免费"})]})})]},R.id))})]}):n.jsxs("div",{className:"flex items-center justify-between px-6 py-3 hover:bg-white/5",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:N.isFree?"text-green-400":"text-yellow-400",children:N.isFree?"🔓":"🔒"}),n.jsx("span",{className:"text-white/80",children:N.title})]}),n.jsx("span",{className:`px-2 py-1 rounded text-xs ${N.isFree?"bg-green-500/20 text-green-400":"bg-yellow-500/20 text-yellow-400"}`,children:N.isFree?"免费":`¥${N.price??1}`})]})},N.id))})]},j.id))})]})]})}var _g=["PageUp","PageDown"],Tg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ig={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Bs="Slider",[xu,cC,uC]=zu(Bs),[Ag]=Cr(Bs,[uC]),[dC,zo]=Ag(Bs),Mg=p.forwardRef((r,a)=>{const{name:l,min:i=0,max:c=100,step:d=1,orientation:f="horizontal",disabled:m=!1,minStepsBetweenThumbs:x=0,defaultValue:g=[i],value:v,onValueChange:y=()=>{},onValueCommit:E=()=>{},inverted:k=!1,form:C,...b}=r,j=p.useRef(new Set),N=p.useRef(0),S=f==="horizontal"?fC:hC,[A=[],V]=Hr({prop:v,defaultProp:g,onChange:oe=>{var P;(P=[...j.current][N.current])==null||P.focus(),y(oe)}}),Q=p.useRef(A);function G(oe){const H=vC(A,oe);fe(oe,H)}function U(oe){fe(oe,N.current)}function ie(){const oe=Q.current[N.current];A[N.current]!==oe&&E(A)}function fe(oe,H,{commit:P}={commit:!1}){const K=jC(d),re=bC(Math.round((oe-i)/d)*d+i,K),W=ho(re,[i,c]);V(($=[])=>{const T=xC($,W,H);if(NC(T,x*d)){N.current=T.indexOf(W);const J=String(T)!==String($);return J&&P&&E(T),J?T:$}else return $})}return n.jsx(dC,{scope:r.__scopeSlider,name:l,disabled:m,min:i,max:c,valueIndexToChangeRef:N,thumbs:j.current,values:A,orientation:f,form:C,children:n.jsx(xu.Provider,{scope:r.__scopeSlider,children:n.jsx(xu.Slot,{scope:r.__scopeSlider,children:n.jsx(S,{"aria-disabled":m,"data-disabled":m?"":void 0,...b,ref:a,onPointerDown:Ie(b.onPointerDown,()=>{m||(Q.current=A)}),min:i,max:c,inverted:k,onSlideStart:m?void 0:G,onSlideMove:m?void 0:U,onSlideEnd:m?void 0:ie,onHomeKeyDown:()=>!m&&fe(i,0,{commit:!0}),onEndKeyDown:()=>!m&&fe(c,A.length-1,{commit:!0}),onStepKeyDown:({event:oe,direction:H})=>{if(!m){const re=_g.includes(oe.key)||oe.shiftKey&&Tg.includes(oe.key)?10:1,W=N.current,$=A[W],T=d*re*H;fe($+T,W,{commit:!0})}}})})})})});Mg.displayName=Bs;var[Lg,Dg]=Ag(Bs,{startEdge:"left",endEdge:"right",size:"width",direction:1}),fC=p.forwardRef((r,a)=>{const{min:l,max:i,dir:c,inverted:d,onSlideStart:f,onSlideMove:m,onSlideEnd:x,onStepKeyDown:g,...v}=r,[y,E]=p.useState(null),k=We(a,S=>E(S)),C=p.useRef(void 0),b=Ro(c),j=b==="ltr",N=j&&!d||!j&&d;function R(S){const A=C.current||y.getBoundingClientRect(),V=[0,A.width],G=qu(V,N?[l,i]:[i,l]);return C.current=A,G(S-A.left)}return n.jsx(Lg,{scope:r.__scopeSlider,startEdge:N?"left":"right",endEdge:N?"right":"left",direction:N?1:-1,size:"width",children:n.jsx(Og,{dir:b,"data-orientation":"horizontal",...v,ref:k,style:{...v.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:S=>{const A=R(S.clientX);f==null||f(A)},onSlideMove:S=>{const A=R(S.clientX);m==null||m(A)},onSlideEnd:()=>{C.current=void 0,x==null||x()},onStepKeyDown:S=>{const V=Ig[N?"from-left":"from-right"].includes(S.key);g==null||g({event:S,direction:V?-1:1})}})})}),hC=p.forwardRef((r,a)=>{const{min:l,max:i,inverted:c,onSlideStart:d,onSlideMove:f,onSlideEnd:m,onStepKeyDown:x,...g}=r,v=p.useRef(null),y=We(a,v),E=p.useRef(void 0),k=!c;function C(b){const j=E.current||v.current.getBoundingClientRect(),N=[0,j.height],S=qu(N,k?[i,l]:[l,i]);return E.current=j,S(b-j.top)}return n.jsx(Lg,{scope:r.__scopeSlider,startEdge:k?"bottom":"top",endEdge:k?"top":"bottom",size:"height",direction:k?1:-1,children:n.jsx(Og,{"data-orientation":"vertical",...g,ref:y,style:{...g.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const j=C(b.clientY);d==null||d(j)},onSlideMove:b=>{const j=C(b.clientY);f==null||f(j)},onSlideEnd:()=>{E.current=void 0,m==null||m()},onStepKeyDown:b=>{const N=Ig[k?"from-bottom":"from-top"].includes(b.key);x==null||x({event:b,direction:N?-1:1})}})})}),Og=p.forwardRef((r,a)=>{const{__scopeSlider:l,onSlideStart:i,onSlideMove:c,onSlideEnd:d,onHomeKeyDown:f,onEndKeyDown:m,onStepKeyDown:x,...g}=r,v=zo(Bs,l);return n.jsx(De.span,{...g,ref:a,onKeyDown:Ie(r.onKeyDown,y=>{y.key==="Home"?(f(y),y.preventDefault()):y.key==="End"?(m(y),y.preventDefault()):_g.concat(Tg).includes(y.key)&&(x(y),y.preventDefault())}),onPointerDown:Ie(r.onPointerDown,y=>{const E=y.target;E.setPointerCapture(y.pointerId),y.preventDefault(),v.thumbs.has(E)?E.focus():i(y)}),onPointerMove:Ie(r.onPointerMove,y=>{y.target.hasPointerCapture(y.pointerId)&&c(y)}),onPointerUp:Ie(r.onPointerUp,y=>{const E=y.target;E.hasPointerCapture(y.pointerId)&&(E.releasePointerCapture(y.pointerId),d(y))})})}),Fg="SliderTrack",zg=p.forwardRef((r,a)=>{const{__scopeSlider:l,...i}=r,c=zo(Fg,l);return n.jsx(De.span,{"data-disabled":c.disabled?"":void 0,"data-orientation":c.orientation,...i,ref:a})});zg.displayName=Fg;var gu="SliderRange",$g=p.forwardRef((r,a)=>{const{__scopeSlider:l,...i}=r,c=zo(gu,l),d=Dg(gu,l),f=p.useRef(null),m=We(a,f),x=c.values.length,g=c.values.map(E=>Vg(E,c.min,c.max)),v=x>1?Math.min(...g):0,y=100-Math.max(...g);return n.jsx(De.span,{"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,...i,ref:m,style:{...r.style,[d.startEdge]:v+"%",[d.endEdge]:y+"%"}})});$g.displayName=gu;var vu="SliderThumb",Bg=p.forwardRef((r,a)=>{const l=cC(r.__scopeSlider),[i,c]=p.useState(null),d=We(a,m=>c(m)),f=p.useMemo(()=>i?l().findIndex(m=>m.ref.current===i):-1,[l,i]);return n.jsx(mC,{...r,ref:d,index:f})}),mC=p.forwardRef((r,a)=>{const{__scopeSlider:l,index:i,name:c,...d}=r,f=zo(vu,l),m=Dg(vu,l),[x,g]=p.useState(null),v=We(a,R=>g(R)),y=x?f.form||!!x.closest("form"):!0,E=Fu(x),k=f.values[i],C=k===void 0?0:Vg(k,f.min,f.max),b=gC(i,f.values.length),j=E==null?void 0:E[m.size],N=j?yC(j,C,m.direction):0;return p.useEffect(()=>{if(x)return f.thumbs.add(x),()=>{f.thumbs.delete(x)}},[x,f.thumbs]),n.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[m.startEdge]:`calc(${C}% + ${N}px)`},children:[n.jsx(xu.ItemSlot,{scope:r.__scopeSlider,children:n.jsx(De.span,{role:"slider","aria-label":r["aria-label"]||b,"aria-valuemin":f.min,"aria-valuenow":k,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...d,ref:v,style:k===void 0?{display:"none"}:r.style,onFocus:Ie(r.onFocus,()=>{f.valueIndexToChangeRef.current=i})})}),y&&n.jsx(Ug,{name:c??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:k},i)]})});Bg.displayName=vu;var pC="RadioBubbleInput",Ug=p.forwardRef(({__scopeSlider:r,value:a,...l},i)=>{const c=p.useRef(null),d=We(c,i),f=Ou(a);return p.useEffect(()=>{const m=c.current;if(!m)return;const x=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(x,"value").set;if(f!==a&&v){const y=new Event("input",{bubbles:!0});v.call(m,a),m.dispatchEvent(y)}},[f,a]),n.jsx(De.input,{style:{display:"none"},...l,ref:d,defaultValue:a})});Ug.displayName=pC;function xC(r=[],a,l){const i=[...r];return i[l]=a,i.sort((c,d)=>c-d)}function Vg(r,a,l){const d=100/(l-a)*(r-a);return ho(d,[0,100])}function gC(r,a){return a>2?`Value ${r+1} of ${a}`:a===2?["Minimum","Maximum"][r]:void 0}function vC(r,a){if(r.length===1)return 0;const l=r.map(c=>Math.abs(c-a)),i=Math.min(...l);return l.indexOf(i)}function yC(r,a,l){const i=r/2,d=qu([0,50],[0,i]);return(i-d(a)*l)*l}function wC(r){return r.slice(0,-1).map((a,l)=>r[l+1]-a)}function NC(r,a){if(a>0){const l=wC(r);return Math.min(...l)>=a}return!0}function qu(r,a){return l=>{if(r[0]===r[1]||a[0]===a[1])return a[0];const i=(a[1]-a[0])/(r[1]-r[0]);return a[0]+i*(l-r[0])}}function jC(r){return(String(r).split(".")[1]||"").length}function bC(r,a){const l=Math.pow(10,a);return Math.round(r*l)/l}var SC=Mg,CC=zg,kC=$g,EC=Bg;function PC({className:r,defaultValue:a,value:l,min:i=0,max:c=100,...d}){const f=p.useMemo(()=>Array.isArray(l)?l:Array.isArray(a)?a:[i,c],[l,a,i,c]);return n.jsxs(SC,{defaultValue:a,value:l,min:i,max:c,className:He("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50",r),...d,children:[n.jsx(CC,{className:"bg-gray-600 relative grow overflow-hidden rounded-full h-1.5 w-full",children:n.jsx(kC,{className:"bg-[#38bdac] absolute h-full rounded-full"})}),Array.from({length:f.length},(m,x)=>n.jsx(EC,{className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},x))]})}const RC={distributorShare:90,minWithdrawAmount:10,bindingDays:30,userDiscount:5,withdrawFee:5,enableAutoWithdraw:!1};function _C(){const[r,a]=p.useState(RC),[l,i]=p.useState(!0),[c,d]=p.useState(!1);p.useEffect(()=>{Xe("/api/admin/referral-settings").then(x=>{const g=x==null?void 0:x.data;g&&typeof g=="object"&&a({distributorShare:g.distributorShare??90,minWithdrawAmount:g.minWithdrawAmount??10,bindingDays:g.bindingDays??30,userDiscount:g.userDiscount??5,withdrawFee:g.withdrawFee??5,enableAutoWithdraw:g.enableAutoWithdraw??!1})}).catch(console.error).finally(()=>i(!1))},[]);const f=async()=>{d(!0);try{const x={distributorShare:Number(r.distributorShare)||0,minWithdrawAmount:Number(r.minWithdrawAmount)||0,bindingDays:Number(r.bindingDays)||0,userDiscount:Number(r.userDiscount)||0,withdrawFee:Number(r.withdrawFee)??5,enableAutoWithdraw:!!r.enableAutoWithdraw},g=await It("/api/admin/referral-settings",x);if(!g||g.success===!1){alert("保存失败: "+(g&&typeof g=="object"&&"error"in g?g.error:""));return}alert(`✅ 分销配置已保存成功! + +• 小程序与网站的推广规则会一起生效 +• 绑定关系会使用新的天数配置 +• 佣金比例会立即应用到新订单 + +如有缓存,请刷新前台/小程序页面。`)}catch(x){console.error(x),alert("保存失败: "+(x instanceof Error?x.message:String(x)))}finally{d(!1)}},m=x=>g=>{const v=parseFloat(g.target.value||"0");a(y=>({...y,[x]:isNaN(v)?0:v}))};return l?n.jsx("div",{className:"p-8 text-gray-500",children:"加载中..."}):n.jsxs("div",{className:"p-8 max-w-4xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[n.jsx(Is,{className:"w-5 h-5 text-[#38bdac]"}),"推广 / 分销设置"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"统一管理「好友优惠」「你得 90% 收益」「绑定期 30 天」「提现门槛」等规则,小程序和 Web 共用这套配置。"})]}),n.jsxs(he,{onClick:f,disabled:c||l,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),c?"保存中...":"保存配置"]})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"flex items-center gap-2 text-white",children:[n.jsx(um,{className:"w-4 h-4 text-[#38bdac]"}),"推广规则"]}),n.jsx(gt,{className:"text-gray-400",children:"这三项会直接体现在小程序「推广规则」卡片上,同时影响实收佣金计算。"})]}),n.jsx(_e,{className:"space-y-6",children:n.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(om,{className:"w-3 h-3 text-[#38bdac]"}),"好友优惠(%)"]}),n.jsx(ue,{type:"number",min:0,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.userDiscount,onChange:m("userDiscount")}),n.jsx("p",{className:"text-xs text-gray-500",children:"例如 5 表示好友立减 5%(在价格配置基础上生效)。"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(Pn,{className:"w-3 h-3 text-[#38bdac]"}),"推广者分成(%)"]}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx(PC,{className:"flex-1",min:10,max:100,step:1,value:[r.distributorShare],onValueChange:([x])=>a(g=>({...g,distributorShare:x}))}),n.jsx(ue,{type:"number",min:0,max:100,className:"w-20 bg-[#0a1628] border-gray-700 text-white text-center",value:r.distributorShare,onChange:m("distributorShare")})]}),n.jsxs("p",{className:"text-xs text-gray-500",children:["实际佣金 = 订单金额 ×"," ",n.jsxs("span",{className:"text-[#38bdac] font-mono",children:[r.distributorShare,"%"]}),",支付回调和分销统计都会用这个值。"]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(Pn,{className:"w-3 h-3 text-[#38bdac]"}),"绑定有效期(天)"]}),n.jsx(ue,{type:"number",min:1,max:365,className:"bg-[#0a1628] border-gray-700 text-white",value:r.bindingDays,onChange:m("bindingDays")}),n.jsx("p",{className:"text-xs text-gray-500",children:"好友通过你的链接进来并登录后,绑定在你名下的天数。"})]})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"flex items-center gap-2 text-white",children:[n.jsx(Is,{className:"w-4 h-4 text-[#38bdac]"}),"提现规则"]}),n.jsx(gt,{className:"text-gray-400",children:"与「提现中心」「自动提现」相关的参数,影响推广者看到的可提现金额和最低门槛。"})]}),n.jsx(_e,{className:"space-y-6",children:n.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"最低提现金额(元)"}),n.jsx(ue,{type:"number",min:0,step:1,className:"bg-[#0a1628] border-gray-700 text-white",value:r.minWithdrawAmount,onChange:m("minWithdrawAmount")}),n.jsx("p",{className:"text-xs text-gray-500",children:"小程序「满 X 元可提现」展示的门槛,同时用于后端接口校验。"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(um,{className:"w-3 h-3 text-[#38bdac]"}),"提现手续费(%)"]}),n.jsx(ue,{type:"number",min:0,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.withdrawFee,onChange:m("withdrawFee")}),n.jsx("p",{className:"text-xs text-gray-500",children:"提现时扣除该比例手续费,例如 5 表示申请 100 元实际到账 95 元。"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:["自动提现开关",n.jsx(Fe,{variant:"outline",className:"border-[#38bdac]/40 text-[#38bdac] text-[10px]",children:"预留"})]}),n.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[n.jsx(xt,{checked:r.enableAutoWithdraw,onCheckedChange:x=>a(g=>({...g,enableAutoWithdraw:x}))}),n.jsx("span",{className:"text-sm text-gray-400",children:"开启后,可结合定时任务实现「收益自动打款到微信零钱」。"})]})]})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Ve,{children:n.jsxs(Ge,{className:"flex items-center gap-2 text-gray-200 text-sm",children:[n.jsx(om,{className:"w-4 h-4 text-[#38bdac]"}),"使用说明"]})}),n.jsxs(_e,{className:"space-y-2 text-xs text-gray-400 leading-relaxed",children:[n.jsxs("p",{children:["1. 以上配置会写入"," ",n.jsx("code",{className:"font-mono text-[11px] text-[#38bdac]",children:"system_config.referral_config"}),",小程序「推广中心」、Web 推广页以及支付回调都会读取同一份配置。"]}),n.jsx("p",{children:"2. 修改后新订单立即生效;旧订单的历史佣金不会自动重算,只影响之后产生的订单。"}),n.jsx("p",{children:"3. 如遇前端展示与实际结算不一致,优先以此处配置为准,再排查缓存和小程序版本。"})]})]})]})]})}const TC={name:"卡若",startDate:"2025年10月15日",bio:"连续创业者,私域运营专家,每天早上6-9点在Soul派对房分享真实商业故事",liveTime:"06:00-09:00",platform:"Soul派对房",description:"连续创业者,私域运营专家"},IC={sectionPrice:1,baseBookPrice:9.9,distributorShare:90,authorInfo:{...TC}},AC={matchEnabled:!0,referralEnabled:!0,searchEnabled:!0,aboutEnabled:!0};function MC(){const[r,a]=p.useState(IC),[l,i]=p.useState(["preface","epilogue","1.1","appendix-1","appendix-2","appendix-3"]),[c,d]=p.useState(""),[f,m]=p.useState(AC),[x,g]=p.useState(!1),[v,y]=p.useState(!0),[E,k]=p.useState(!1),[C,b]=p.useState(""),[j,N]=p.useState(""),[R,S]=p.useState(!1),[A,V]=p.useState(!1),Q=(H,P,K=!1)=>{b(H),N(P),S(K),k(!0)};p.useEffect(()=>{(async()=>{try{const P=await Xe("/api/admin/settings");if(!P||P.success===!1)return;if(Array.isArray(P.freeChapters)&&P.freeChapters.length&&i(P.freeChapters),P.featureConfig&&Object.keys(P.featureConfig).length&&m(K=>({...K,...P.featureConfig})),P.siteSettings&&typeof P.siteSettings=="object"){const K=P.siteSettings;a(re=>({...re,...typeof K.sectionPrice=="number"&&{sectionPrice:K.sectionPrice},...typeof K.baseBookPrice=="number"&&{baseBookPrice:K.baseBookPrice},...typeof K.distributorShare=="number"&&{distributorShare:K.distributorShare},...K.authorInfo&&typeof K.authorInfo=="object"&&{authorInfo:{...re.authorInfo,...K.authorInfo}}}))}}catch(P){console.error("Load settings error:",P)}finally{y(!1)}})()},[]);const G=async(H,P)=>{V(!0);try{const K=await It("/api/admin/settings",{featureConfig:H});if(!K||K.success===!1){P(),Q("保存失败",(K==null?void 0:K.error)??"未知错误",!0);return}Q("已保存","功能开关已更新,相关入口将随之显示或隐藏。")}catch(K){console.error("Save feature config error:",K),P(),Q("保存失败",K instanceof Error?K.message:String(K),!0)}finally{V(!1)}},U=(H,P)=>{const K=f,re={...K,[H]:P};m(re),G(re,()=>m(K))},ie=async()=>{g(!0);try{const H=await It("/api/admin/settings",{freeChapters:l,featureConfig:f,siteSettings:{sectionPrice:r.sectionPrice,baseBookPrice:r.baseBookPrice,distributorShare:r.distributorShare,authorInfo:r.authorInfo}});if(!H||H.success===!1){Q("保存失败",(H==null?void 0:H.error)??"未知错误",!0);return}Q("已保存","设置已保存成功。")}catch(H){console.error("Save settings error:",H),Q("保存失败",H instanceof Error?H.message:String(H),!0)}finally{g(!1)}},fe=()=>{c&&!l.includes(c)&&(i([...l,c]),d(""))},oe=H=>{i(l.filter(P=>P!==H))};return v?n.jsx("div",{className:"p-8 text-gray-500",children:"加载中..."}):n.jsxs("div",{className:"p-8 max-w-4xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"系统设置"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"配置全站基础参数与开关"})]}),n.jsxs(he,{onClick:ie,disabled:x,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),x?"保存中...":"保存设置"]})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(sm,{className:"w-5 h-5 text-[#38bdac]"}),"关于作者"]}),n.jsx(gt,{className:"text-gray-400",children:'配置作者信息,将在"关于作者"页面显示'})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{htmlFor:"author-name",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(sm,{className:"w-3 h-3"}),"主理人名称"]}),n.jsx(ue,{id:"author-name",className:"bg-[#0a1628] border-gray-700 text-white",value:r.authorInfo.name??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,name:H.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{htmlFor:"start-date",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(qc,{className:"w-3 h-3"}),"开播日期"]}),n.jsx(ue,{id:"start-date",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"例如: 2025年10月15日",value:r.authorInfo.startDate??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,startDate:H.target.value}}))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{htmlFor:"live-time",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(qc,{className:"w-3 h-3"}),"直播时间"]}),n.jsx(ue,{id:"live-time",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"例如: 06:00-09:00",value:r.authorInfo.liveTime??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,liveTime:H.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{htmlFor:"platform",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(e1,{className:"w-3 h-3"}),"直播平台"]}),n.jsx(ue,{id:"platform",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"例如: Soul派对房",value:r.authorInfo.platform??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,platform:H.target.value}}))})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{htmlFor:"description",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(_s,{className:"w-3 h-3"}),"简介描述"]}),n.jsx(ue,{id:"description",className:"bg-[#0a1628] border-gray-700 text-white",value:r.authorInfo.description??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,description:H.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"bio",className:"text-gray-300",children:"详细介绍"}),n.jsx(Ur,{id:"bio",className:"bg-[#0a1628] border-gray-700 text-white min-h-[100px]",placeholder:"输入作者详细介绍...",value:r.authorInfo.bio??"",onChange:H=>a(P=>({...P,authorInfo:{...P.authorInfo,bio:H.target.value}}))})]}),n.jsxs("div",{className:"mt-4 p-4 rounded-xl bg-[#0a1628] border border-[#38bdac]/30",children:[n.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"预览效果"}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-[#00CED1] to-[#20B2AA] flex items-center justify-center text-xl font-bold text-white",children:(r.authorInfo.name??"K").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"text-white font-semibold",children:r.authorInfo.name}),n.jsx("p",{className:"text-gray-400 text-xs",children:r.authorInfo.description}),n.jsxs("p",{className:"text-[#38bdac] text-xs mt-1",children:["每日 ",r.authorInfo.liveTime," · ",r.authorInfo.platform]})]})]})]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(lo,{className:"w-5 h-5 text-[#38bdac]"}),"价格设置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置书籍和章节的定价"})]}),n.jsx(_e,{className:"space-y-4",children:n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"单节价格 (元)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:r.sectionPrice,onChange:H=>a(P=>({...P,sectionPrice:Number.parseFloat(H.target.value)||1}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"整本价格 (元)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:r.baseBookPrice,onChange:H=>a(P=>({...P,baseBookPrice:Number.parseFloat(H.target.value)||9.9}))})]})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(am,{className:"w-5 h-5 text-[#38bdac]"}),"免费章节"]}),n.jsx(gt,{className:"text-gray-400",children:"设置哪些章节对所有用户免费开放"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-wrap gap-2",children:l.map(H=>n.jsxs("span",{className:"inline-flex items-center gap-1 bg-[#38bdac]/20 text-[#38bdac] border border-[#38bdac]/30 px-3 py-1 rounded-md text-sm",children:[H,n.jsx("button",{type:"button",onClick:()=>oe(H),className:"ml-1 hover:text-red-400",children:n.jsx(Wr,{className:"w-3 h-3"})})]},H))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white flex-1",placeholder:"输入章节ID,如 1.2、2.1、preface",value:c,onChange:H=>d(H.target.value),onKeyDown:H=>H.key==="Enter"&&fe()}),n.jsxs(he,{onClick:fe,className:"bg-[#38bdac] hover:bg-[#2da396]",children:[n.jsx(Es,{className:"w-4 h-4 mr-1"}),"添加"]})]}),n.jsx("p",{className:"text-xs text-gray-500",children:"常用ID: preface(序言), epilogue(尾声), appendix-1/2/3(附录), 1.1/1.2等(章节)"})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(io,{className:"w-5 h-5 text-[#38bdac]"}),"功能开关"]}),n.jsx(gt,{className:"text-gray-400",children:"控制各个功能模块的显示/隐藏"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Pn,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(ae,{htmlFor:"match-enabled",className:"text-white font-medium cursor-pointer",children:"找伙伴功能"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制小程序和Web端的找伙伴功能显示"})]}),n.jsx(xt,{id:"match-enabled",checked:f.matchEnabled,disabled:A,onCheckedChange:H=>U("matchEnabled",H)})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(am,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(ae,{htmlFor:"referral-enabled",className:"text-white font-medium cursor-pointer",children:"推广功能"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制推广中心的显示(我的页面入口)"})]}),n.jsx(xt,{id:"referral-enabled",checked:f.referralEnabled,disabled:A,onCheckedChange:H=>U("referralEnabled",H)})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(_s,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(ae,{htmlFor:"search-enabled",className:"text-white font-medium cursor-pointer",children:"搜索功能"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制首页搜索栏的显示"})]}),n.jsx(xt,{id:"search-enabled",checked:f.searchEnabled,disabled:A,onCheckedChange:H=>U("searchEnabled",H)})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(io,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(ae,{htmlFor:"about-enabled",className:"text-white font-medium cursor-pointer",children:"关于页面"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制关于页面的访问"})]}),n.jsx(xt,{id:"about-enabled",checked:f.aboutEnabled,disabled:A,onCheckedChange:H=>U("aboutEnabled",H)})]})]}),n.jsx("div",{className:"p-3 rounded-lg bg-blue-500/10 border border-blue-500/30",children:n.jsx("p",{className:"text-xs text-blue-300",children:"💡 关闭功能后,相关入口会自动隐藏。建议在功能开发完成后再开启。"})})]})]})]}),n.jsx(bn,{open:E,onOpenChange:k,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white",showCloseButton:!0,children:[n.jsxs(Sn,{children:[n.jsx(Cn,{className:R?"text-red-400":"text-[#38bdac]",children:C}),n.jsx(_b,{className:"text-gray-400 whitespace-pre-wrap pt-2",children:j})]}),n.jsx(Bn,{className:"mt-4",children:n.jsx(he,{onClick:()=>k(!1),className:R?"bg-gray-600 hover:bg-gray-500":"bg-[#38bdac] hover:bg-[#2da396]",children:"确定"})})]})})]})}const Wm={wechat:{enabled:!0,qrCode:"/images/wechat-pay.png",account:"卡若",websiteAppId:"",merchantId:"",groupQrCode:"/images/party-group-qr.png"},alipay:{enabled:!0,qrCode:"/images/alipay.png",account:"卡若",partnerId:"",securityKey:""},usdt:{enabled:!1,network:"TRC20",address:"",exchangeRate:7.2},paypal:{enabled:!1,email:"",exchangeRate:7.2}};function LC(){const[r,a]=p.useState(!1),[l,i]=p.useState(Wm),[c,d]=p.useState(""),f=async()=>{a(!0);try{const N=await Xe("/api/config");N!=null&&N.paymentMethods&&i({...Wm,...N.paymentMethods})}catch(N){console.error(N)}finally{a(!1)}};p.useEffect(()=>{f()},[]);const m=async()=>{a(!0);try{await It("/api/config",{paymentMethods:l}),alert("配置已保存!")}catch(N){console.error("保存失败:",N),alert("保存失败: "+(N instanceof Error?N.message:String(N)))}finally{a(!1)}},x=(N,R)=>{navigator.clipboard.writeText(N),d(R),setTimeout(()=>d(""),2e3)},g=(N,R)=>{i(S=>({...S,wechat:{...S.wechat,[N]:R}}))},v=(N,R)=>{i(S=>({...S,alipay:{...S.alipay,[N]:R}}))},y=(N,R)=>{i(S=>({...S,usdt:{...S.usdt,[N]:R}}))},E=(N,R)=>{i(S=>({...S,paypal:{...S.paypal,[N]:R}}))},k=l.wechat,C=l.alipay,b=l.usdt,j=l.paypal;return n.jsxs("div",{className:"p-8 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold mb-2 text-white",children:"支付配置"}),n.jsx("p",{className:"text-gray-400",children:"配置微信、支付宝、USDT、PayPal等支付参数"})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(he,{variant:"outline",onClick:f,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${r?"animate-spin":""}`}),"同步配置"]}),n.jsxs(he,{onClick:m,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),"保存配置"]})]})]}),n.jsx("div",{className:"mb-6 bg-[#07C160]/10 border border-[#07C160]/30 rounded-xl p-4",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(lp,{className:"w-5 h-5 text-[#07C160] flex-shrink-0 mt-0.5"}),n.jsxs("div",{className:"text-sm",children:[n.jsx("p",{className:"font-medium mb-2 text-[#07C160]",children:"如何获取微信群跳转链接?"}),n.jsxs("ol",{className:"text-[#07C160]/80 space-y-1 list-decimal list-inside",children:[n.jsx("li",{children:"打开微信,进入目标微信群"}),n.jsx("li",{children:'点击右上角"..." → "群二维码"'}),n.jsx("li",{children:'点击右上角"..." → "发送到电脑"'}),n.jsx("li",{children:"在电脑上保存二维码图片,上传到图床获取URL"}),n.jsx("li",{children:"或使用草料二维码等工具解析二维码获取链接"})]}),n.jsx("p",{className:"text-[#07C160]/60 mt-2",children:"提示:微信群二维码7天后失效,建议使用活码工具"})]})]})}),n.jsxs(Bu,{defaultValue:"wechat",className:"space-y-6",children:[n.jsxs(To,{className:"bg-[#0f2137] border border-gray-700/50 p-1 grid grid-cols-4 w-full",children:[n.jsxs(tn,{value:"wechat",className:"data-[state=active]:bg-[#07C160]/20 data-[state=active]:text-[#07C160] text-gray-400",children:[n.jsx(fm,{className:"w-4 h-4 mr-2"}),"微信"]}),n.jsxs(tn,{value:"alipay",className:"data-[state=active]:bg-[#1677FF]/20 data-[state=active]:text-[#1677FF] text-gray-400",children:[n.jsx(Zc,{className:"w-4 h-4 mr-2"}),"支付宝"]}),n.jsxs(tn,{value:"usdt",className:"data-[state=active]:bg-[#26A17B]/20 data-[state=active]:text-[#26A17B] text-gray-400",children:[n.jsx(rm,{className:"w-4 h-4 mr-2"}),"USDT"]}),n.jsxs(tn,{value:"paypal",className:"data-[state=active]:bg-[#003087]/20 data-[state=active]:text-[#169BD7] text-gray-400",children:[n.jsx(eu,{className:"w-4 h-4 mr-2"}),"PayPal"]})]}),n.jsx(nn,{value:"wechat",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ge,{className:"text-[#07C160] flex items-center gap-2",children:[n.jsx(fm,{className:"w-5 h-5"}),"微信支付配置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置微信支付参数和跳转链接"})]}),n.jsx(xt,{checked:!!k.enabled,onCheckedChange:N=>g("enabled",N)})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"网站AppID"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(k.websiteAppId??""),onChange:N=>g("websiteAppId",N.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"商户号"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(k.merchantId??""),onChange:N=>g("merchantId",N.target.value)})]})]}),n.jsxs("div",{className:"border-t border-gray-700/50 pt-4 space-y-4",children:[n.jsxs("h4",{className:"text-white font-medium flex items-center gap-2",children:[n.jsx(oo,{className:"w-4 h-4 text-[#38bdac]"}),"跳转链接配置(核心功能)"]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"微信收款码/支付链接"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",placeholder:"https://收款码图片URL 或 weixin://支付链接",value:String(k.qrCode??""),onChange:N=>g("qrCode",N.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"用户点击微信支付后显示的二维码图片URL"})]}),n.jsxs("div",{className:"space-y-2 bg-[#07C160]/5 p-4 rounded-xl border border-[#07C160]/20",children:[n.jsx(ae,{className:"text-[#07C160] font-medium",children:"微信群跳转链接(支付成功后跳转)"}),n.jsx(ue,{className:"bg-[#0a1628] border-[#07C160]/30 text-white placeholder:text-gray-500",placeholder:"https://weixin.qq.com/g/... 或微信群二维码图片URL",value:String(k.groupQrCode??""),onChange:N=>g("groupQrCode",N.target.value)}),n.jsx("p",{className:"text-xs text-[#07C160]/70",children:"用户支付成功后将自动跳转到此链接,进入指定微信群"})]})]})]})]})}),n.jsx(nn,{value:"alipay",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ge,{className:"text-[#1677FF] flex items-center gap-2",children:[n.jsx(Zc,{className:"w-5 h-5"}),"支付宝配置"]}),n.jsx(gt,{className:"text-gray-400",children:"已加载真实支付宝参数"})]}),n.jsx(xt,{checked:!!C.enabled,onCheckedChange:N=>v("enabled",N)})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"合作者身份 (PID)"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(C.partnerId??""),onChange:N=>v("partnerId",N.target.value)}),n.jsx(he,{size:"icon",variant:"outline",className:"border-gray-700 bg-transparent",onClick:()=>x(String(C.partnerId??""),"pid"),children:c==="pid"?n.jsx(No,{className:"w-4 h-4 text-green-500"}):n.jsx(ip,{className:"w-4 h-4 text-gray-400"})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"安全校验码 (Key)"}),n.jsx(ue,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(C.securityKey??""),onChange:N=>v("securityKey",N.target.value)})]})]}),n.jsxs("div",{className:"border-t border-gray-700/50 pt-4 space-y-4",children:[n.jsxs("h4",{className:"text-white font-medium flex items-center gap-2",children:[n.jsx(oo,{className:"w-4 h-4 text-[#38bdac]"}),"跳转链接配置"]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"支付宝收款码/跳转链接"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",placeholder:"https://qr.alipay.com/... 或收款码图片URL",value:String(C.qrCode??""),onChange:N=>v("qrCode",N.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"用户点击支付宝支付后显示的二维码"})]})]})]})]})}),n.jsx(nn,{value:"usdt",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ge,{className:"text-[#26A17B] flex items-center gap-2",children:[n.jsx(rm,{className:"w-5 h-5"}),"USDT配置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置加密货币收款地址"})]}),n.jsx(xt,{checked:!!b.enabled,onCheckedChange:N=>y("enabled",N)})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"网络类型"}),n.jsxs("select",{className:"w-full bg-[#0a1628] border border-gray-700 text-white rounded-md p-2",value:String(b.network??"TRC20"),onChange:N=>y("network",N.target.value),children:[n.jsx("option",{value:"TRC20",children:"TRC20 (波场)"}),n.jsx("option",{value:"ERC20",children:"ERC20 (以太坊)"}),n.jsx("option",{value:"BEP20",children:"BEP20 (币安链)"})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"收款地址"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",placeholder:"T... (TRC20地址)",value:String(b.address??""),onChange:N=>y("address",N.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"汇率 (1 USD = ? CNY)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:Number(b.exchangeRate)??7.2,onChange:N=>y("exchangeRate",Number.parseFloat(N.target.value)||7.2)})]})]})]})}),n.jsx(nn,{value:"paypal",className:"space-y-4",children:n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ge,{className:"text-[#169BD7] flex items-center gap-2",children:[n.jsx(eu,{className:"w-5 h-5"}),"PayPal配置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置PayPal收款账户"})]}),n.jsx(xt,{checked:!!j.enabled,onCheckedChange:N=>E("enabled",N)})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"PayPal邮箱"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"your@email.com",value:String(j.email??""),onChange:N=>E("email",N.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"汇率 (1 USD = ? CNY)"}),n.jsx(ue,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:Number(j.exchangeRate)??7.2,onChange:N=>E("exchangeRate",Number(N.target.value)||7.2)})]})]})]})})]})]})}const DC={siteName:"卡若日记",siteTitle:"一场SOUL的创业实验场",siteDescription:"来自Soul派对房的真实商业故事",logo:"/logo.png",favicon:"/favicon.ico",primaryColor:"#00CED1"},OC={home:{enabled:!0,label:"首页"},chapters:{enabled:!0,label:"目录"},match:{enabled:!0,label:"匹配"},my:{enabled:!0,label:"我的"}},FC={homeTitle:"一场SOUL的创业实验场",homeSubtitle:"来自Soul派对房的真实商业故事",chaptersTitle:"我要看",matchTitle:"语音匹配",myTitle:"我的",aboutTitle:"关于作者"};function zC(){const[r,a]=p.useState({siteConfig:{...DC},menuConfig:{...OC},pageConfig:{...FC}}),[l,i]=p.useState(!1);p.useEffect(()=>{Xe("/api/config").then(x=>{x!=null&&x.siteConfig&&a(g=>({...g,siteConfig:{...g.siteConfig,...x.siteConfig}})),x!=null&&x.menuConfig&&a(g=>({...g,menuConfig:{...g.menuConfig,...x.menuConfig}})),x!=null&&x.pageConfig&&a(g=>({...g,pageConfig:{...g.pageConfig,...x.pageConfig}}))}).catch(console.error)},[]);const c=()=>{i(!0),setTimeout(()=>i(!1),2e3),alert("配置已保存(当前为前端状态,后端可对接 /api/db/config 持久化)")},d=r.siteConfig,f=r.menuConfig,m=r.pageConfig;return n.jsxs("div",{className:"p-8 max-w-4xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"网站配置"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"配置网站名称、图标、菜单和页面标题"})]}),n.jsxs(he,{onClick:c,className:`${l?"bg-green-500":"bg-[#00CED1]"} hover:bg-[#20B2AA] text-white transition-colors`,children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),l?"已保存":"保存设置"]})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(eu,{className:"w-5 h-5 text-[#00CED1]"}),"网站基础信息"]}),n.jsx(gt,{className:"text-gray-400",children:"配置网站名称、标题和描述"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"site-name",className:"text-gray-300",children:"网站名称"}),n.jsx(ue,{id:"site-name",className:"bg-[#0a1628] border-gray-700 text-white",value:d.siteName??"",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,siteName:x.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"site-title",className:"text-gray-300",children:"网站标题"}),n.jsx(ue,{id:"site-title",className:"bg-[#0a1628] border-gray-700 text-white",value:d.siteTitle??"",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,siteTitle:x.target.value}}))})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"site-desc",className:"text-gray-300",children:"网站描述"}),n.jsx(ue,{id:"site-desc",className:"bg-[#0a1628] border-gray-700 text-white",value:d.siteDescription??"",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,siteDescription:x.target.value}}))})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"logo",className:"text-gray-300",children:"Logo地址"}),n.jsx(ue,{id:"logo",className:"bg-[#0a1628] border-gray-700 text-white",value:d.logo??"",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,logo:x.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{htmlFor:"favicon",className:"text-gray-300",children:"Favicon地址"}),n.jsx(ue,{id:"favicon",className:"bg-[#0a1628] border-gray-700 text-white",value:d.favicon??"",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,favicon:x.target.value}}))})]})]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(l1,{className:"w-5 h-5 text-[#00CED1]"}),"主题颜色"]}),n.jsx(gt,{className:"text-gray-400",children:"配置网站主题色"})]}),n.jsx(_e,{children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsxs("div",{className:"space-y-2 flex-1",children:[n.jsx(ae,{htmlFor:"primary-color",className:"text-gray-300",children:"主色调"}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(ue,{id:"primary-color",type:"color",className:"w-16 h-10 bg-[#0a1628] border-gray-700 cursor-pointer p-1",value:d.primaryColor??"#00CED1",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,primaryColor:x.target.value}}))}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white flex-1",value:d.primaryColor??"#00CED1",onChange:x=>a(g=>({...g,siteConfig:{...g.siteConfig,primaryColor:x.target.value}}))})]})]}),n.jsx("div",{className:"w-24 h-24 rounded-xl flex items-center justify-center text-white font-bold",style:{backgroundColor:d.primaryColor??"#00CED1"},children:"预览"})]})})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(n1,{className:"w-5 h-5 text-[#00CED1]"}),"底部菜单配置"]}),n.jsx(gt,{className:"text-gray-400",children:"控制底部导航栏菜单的显示和名称"})]}),n.jsx(_e,{className:"space-y-4",children:Object.entries(f).map(([x,g])=>n.jsxs("div",{className:"flex items-center justify-between p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[n.jsx(xt,{checked:(g==null?void 0:g.enabled)??!0,onCheckedChange:v=>a(y=>({...y,menuConfig:{...y.menuConfig,[x]:{...g,enabled:v}}}))}),n.jsx("span",{className:"text-gray-300 w-16 capitalize",children:x}),n.jsx(ue,{className:"bg-[#0f2137] border-gray-700 text-white max-w-[200px]",value:(g==null?void 0:g.label)??"",onChange:v=>a(y=>({...y,menuConfig:{...y.menuConfig,[x]:{...g,label:v.target.value}}}))})]}),n.jsx("span",{className:`text-sm ${g!=null&&g.enabled?"text-green-400":"text-gray-500"}`,children:g!=null&&g.enabled?"显示":"隐藏"})]},x))})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(up,{className:"w-5 h-5 text-[#00CED1]"}),"页面标题配置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置各个页面的标题和副标题"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"首页标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.homeTitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,homeTitle:x.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"首页副标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.homeSubtitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,homeSubtitle:x.target.value}}))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"目录页标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.chaptersTitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,chaptersTitle:x.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"匹配页标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.matchTitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,matchTitle:x.target.value}}))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"我的页标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.myTitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,myTitle:x.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"关于作者标题"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.aboutTitle??"",onChange:x=>a(g=>({...g,pageConfig:{...g.pageConfig,aboutTitle:x.target.value}}))})]})]})]})]})]})]})}function $C(){const[r,a]=p.useState(""),[l,i]=p.useState(""),[c,d]=p.useState(""),[f,m]=p.useState({}),x=async()=>{var k,C,b,j;try{const N=await Xe("/api/config"),R=(C=(k=N==null?void 0:N.liveQRCodes)==null?void 0:k[0])==null?void 0:C.urls;Array.isArray(R)&&a(R.join(` +`));const S=(j=(b=N==null?void 0:N.paymentMethods)==null?void 0:b.wechat)==null?void 0:j.groupQrCode;S&&i(S),m({paymentMethods:N==null?void 0:N.paymentMethods,liveQRCodes:N==null?void 0:N.liveQRCodes})}catch(N){console.error(N)}};p.useEffect(()=>{x()},[]);const g=(k,C)=>{navigator.clipboard.writeText(k),d(C),setTimeout(()=>d(""),2e3)},v=async()=>{try{const k=r.split(` +`).map(b=>b.trim()).filter(Boolean),C=[...f.liveQRCodes||[]];C[0]?C[0].urls=k:C.push({id:"live-1",name:"微信群活码",urls:k,clickCount:0}),await It("/api/config",{liveQRCodes:C}),alert("群活码配置已保存!"),await x()}catch(k){console.error(k),alert("保存失败: "+(k instanceof Error?k.message:String(k)))}},y=async()=>{var k;try{await It("/api/config",{paymentMethods:{...f.paymentMethods||{},wechat:{...((k=f.paymentMethods)==null?void 0:k.wechat)||{},groupQrCode:l}}}),alert("微信群链接已保存!用户支付成功后将自动跳转"),await x()}catch(C){console.error(C),alert("保存失败: "+(C instanceof Error?C.message:String(C)))}},E=()=>{l?window.open(l,"_blank"):alert("请先配置微信群链接")};return n.jsxs("div",{className:"p-8 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"mb-8",children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"微信群活码管理"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"配置微信群跳转链接,用户支付后自动跳转加群"})]}),n.jsx("div",{className:"mb-6 bg-[#07C160]/10 border border-[#07C160]/30 rounded-xl p-4",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(lp,{className:"w-5 h-5 text-[#07C160] flex-shrink-0 mt-0.5"}),n.jsxs("div",{className:"text-sm",children:[n.jsx("p",{className:"font-medium mb-2 text-[#07C160]",children:"微信群活码配置指南"}),n.jsxs("div",{className:"text-[#07C160]/80 space-y-2",children:[n.jsx("p",{className:"font-medium",children:"方法一:使用草料活码(推荐)"}),n.jsxs("ol",{className:"list-decimal list-inside space-y-1 pl-2",children:[n.jsx("li",{children:"访问草料二维码创建活码"}),n.jsx("li",{children:"上传微信群二维码图片,生成永久链接"}),n.jsx("li",{children:"复制生成的短链接填入下方配置"}),n.jsx("li",{children:"群满后可直接在草料后台更换新群码,链接不变"})]}),n.jsx("p",{className:"font-medium mt-3",children:"方法二:直接使用微信群链接"}),n.jsxs("ol",{className:"list-decimal list-inside space-y-1 pl-2",children:[n.jsx("li",{children:'微信打开目标群 → 右上角"..." → 群二维码'}),n.jsx("li",{children:"长按二维码 → 识别二维码 → 复制链接"})]}),n.jsx("p",{className:"text-[#07C160]/60 mt-2",children:"注意:微信原生群二维码7天后失效,建议使用草料活码"})]})]})]})}),n.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl md:col-span-2",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-[#07C160] flex items-center gap-2",children:[n.jsx(dm,{className:"w-5 h-5"}),"支付成功跳转链接(核心配置)"]}),n.jsx(gt,{className:"text-gray-400",children:"用户支付完成后自动跳转到此链接,进入指定微信群"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(cm,{className:"w-4 h-4"}),"微信群链接 / 活码链接"]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ue,{placeholder:"https://cli.im/xxxxx 或 https://weixin.qq.com/g/...",className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 flex-1",value:l,onChange:k=>i(k.target.value)}),n.jsx(he,{variant:"outline",size:"icon",className:"border-gray-700 bg-transparent hover:bg-gray-700/50",onClick:()=>g(l,"group"),children:c==="group"?n.jsx(No,{className:"w-4 h-4 text-green-500"}):n.jsx(ip,{className:"w-4 h-4 text-gray-400"})})]}),n.jsxs("p",{className:"text-xs text-gray-500 flex items-center gap-1",children:[n.jsx(oo,{className:"w-3 h-3"}),"支持格式:草料短链、微信群链接(https://weixin.qq.com/g/...)、企业微信链接等"]})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(he,{onClick:y,className:"flex-1 bg-[#07C160] hover:bg-[#06AD51] text-white",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"保存配置"]}),n.jsxs(he,{onClick:E,variant:"outline",className:"border-[#07C160] text-[#07C160] hover:bg-[#07C160]/10 bg-transparent",children:[n.jsx(oo,{className:"w-4 h-4 mr-2"}),"测试跳转"]})]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl md:col-span-2",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(dm,{className:"w-5 h-5 text-[#38bdac]"}),"多群轮换(高级配置)"]}),n.jsx(gt,{className:"text-gray-400",children:"配置多个群链接,系统自动轮换分配,避免单群满员"})]}),n.jsxs(_e,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ae,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(cm,{className:"w-4 h-4"}),"多个群链接(每行一个)"]}),n.jsx(Ur,{placeholder:"https://cli.im/group1\\nhttps://cli.im/group2",className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 min-h-[120px] font-mono text-sm",value:r,onChange:k=>a(k.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"每行填写一个群链接,系统将按顺序或随机分配"})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a1628] rounded-lg border border-gray-700/50",children:[n.jsx("span",{className:"text-sm text-gray-400",children:"已配置群数量"}),n.jsxs("span",{className:"font-bold text-[#38bdac]",children:[r.split(` +`).filter(Boolean).length," 个"]})]}),n.jsxs(he,{onClick:v,className:"w-full bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"保存多群配置"]})]})]})]}),n.jsxs("div",{className:"mt-6 bg-[#0f2137] rounded-xl p-4 border border-gray-700/50",children:[n.jsx("h4",{className:"text-white font-medium mb-3",children:"常见问题"}),n.jsxs("div",{className:"space-y-3 text-sm",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-[#38bdac]",children:"Q: 为什么推荐使用草料活码?"}),n.jsx("p",{className:"text-gray-400",children:"A: 草料活码是永久链接,群满后可直接在后台更换新群码,无需修改网站配置。微信原生群码7天失效。"})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[#38bdac]",children:"Q: 支付后没有跳转怎么办?"}),n.jsx("p",{className:"text-gray-400",children:"A: 1) 检查链接是否正确填写 2) 部分浏览器可能拦截弹窗,用户需手动允许 3) 建议使用https开头的链接"})]})]})]})]})}const Hm={matchTypes:[{id:"partner",label:"创业合伙",matchLabel:"创业伙伴",icon:"⭐",matchFromDB:!0,showJoinAfterMatch:!1,price:1,enabled:!0},{id:"investor",label:"资源对接",matchLabel:"资源对接",icon:"👥",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0},{id:"mentor",label:"导师顾问",matchLabel:"商业顾问",icon:"❤️",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0},{id:"team",label:"团队招募",matchLabel:"加入项目",icon:"🎮",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0}],freeMatchLimit:3,matchPrice:1,settings:{enableFreeMatches:!0,enablePaidMatches:!0,maxMatchesPerDay:10}},BC=["⭐","👥","❤️","🎮","💼","🚀","💡","🎯","🔥","✨"];function UC(){const[r,a]=p.useState(Hm),[l,i]=p.useState(!0),[c,d]=p.useState(!1),[f,m]=p.useState(!1),[x,g]=p.useState(null),[v,y]=p.useState({id:"",label:"",matchLabel:"",icon:"⭐",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0}),E=async()=>{i(!0);try{const S=await Xe("/api/db/config/full?key=match_config"),A=(S==null?void 0:S.data)??(S==null?void 0:S.config);A&&a({...Hm,...A})}catch(S){console.error("加载匹配配置失败:",S)}finally{i(!1)}};p.useEffect(()=>{E()},[]);const k=async()=>{d(!0);try{const S=await It("/api/db/config",{key:"match_config",value:r,description:"匹配功能配置"});S&&S.success!==!1?alert("配置保存成功!"):alert("保存失败: "+(S&&typeof S=="object"&&"error"in S?S.error:"未知错误"))}catch(S){console.error("保存配置失败:",S),alert("保存失败")}finally{d(!1)}},C=S=>{g(S),y({id:S.id,label:S.label,matchLabel:S.matchLabel,icon:S.icon,matchFromDB:S.matchFromDB,showJoinAfterMatch:S.showJoinAfterMatch,price:S.price,enabled:S.enabled}),m(!0)},b=()=>{g(null),y({id:"",label:"",matchLabel:"",icon:"⭐",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0}),m(!0)},j=()=>{if(!v.id||!v.label){alert("请填写类型ID和名称");return}const S=[...r.matchTypes];if(x){const A=S.findIndex(V=>V.id===x.id);A!==-1&&(S[A]={...v})}else{if(S.some(A=>A.id===v.id)){alert("类型ID已存在");return}S.push({...v})}a({...r,matchTypes:S}),m(!1)},N=S=>{confirm("确定要删除这个匹配类型吗?")&&a({...r,matchTypes:r.matchTypes.filter(A=>A.id!==S)})},R=S=>{a({...r,matchTypes:r.matchTypes.map(A=>A.id===S?{...A,enabled:!A.enabled}:A)})};return n.jsxs("div",{className:"p-8 max-w-6xl mx-auto space-y-6",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[n.jsx(io,{className:"w-6 h-6 text-[#38bdac]"}),"匹配功能配置"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"管理找伙伴功能的匹配类型和价格"})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(he,{variant:"outline",onClick:E,disabled:l,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(et,{className:`w-4 h-4 mr-2 ${l?"animate-spin":""}`}),"刷新"]}),n.jsxs(he,{onClick:k,disabled:c,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),c?"保存中...":"保存配置"]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsxs(Ve,{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(A1,{className:"w-5 h-5 text-yellow-400"}),"基础设置"]}),n.jsx(gt,{className:"text-gray-400",children:"配置免费匹配次数和付费规则"})]}),n.jsxs(_e,{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"每日免费匹配次数"}),n.jsx(ue,{type:"number",min:0,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.freeMatchLimit,onChange:S=>a({...r,freeMatchLimit:parseInt(S.target.value,10)||0})}),n.jsx("p",{className:"text-xs text-gray-500",children:"用户每天可免费匹配的次数"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"付费匹配价格(元)"}),n.jsx(ue,{type:"number",min:.01,step:.01,className:"bg-[#0a1628] border-gray-700 text-white",value:r.matchPrice,onChange:S=>a({...r,matchPrice:parseFloat(S.target.value)||1})}),n.jsx("p",{className:"text-xs text-gray-500",children:"免费次数用完后的单次匹配价格"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"每日最大匹配次数"}),n.jsx(ue,{type:"number",min:1,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.settings.maxMatchesPerDay,onChange:S=>a({...r,settings:{...r.settings,maxMatchesPerDay:parseInt(S.target.value,10)||10}})}),n.jsx("p",{className:"text-xs text-gray-500",children:"包含免费和付费的总次数"})]})]}),n.jsxs("div",{className:"flex gap-8 pt-4 border-t border-gray-700/50",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xt,{checked:r.settings.enableFreeMatches,onCheckedChange:S=>a({...r,settings:{...r.settings,enableFreeMatches:S}})}),n.jsx(ae,{className:"text-gray-300",children:"启用免费匹配"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xt,{checked:r.settings.enablePaidMatches,onCheckedChange:S=>a({...r,settings:{...r.settings,enablePaidMatches:S}})}),n.jsx(ae,{className:"text-gray-300",children:"启用付费匹配"})]})]})]})]}),n.jsxs(Re,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsxs(Ve,{className:"flex flex-row items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs(Ge,{className:"text-white flex items-center gap-2",children:[n.jsx(Pn,{className:"w-5 h-5 text-[#38bdac]"}),"匹配类型管理"]}),n.jsx(gt,{className:"text-gray-400",children:"配置不同的匹配类型及其价格"})]}),n.jsxs(he,{onClick:b,size:"sm",className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Es,{className:"w-4 h-4 mr-1"}),"添加类型"]})]}),n.jsx(_e,{children:n.jsxs(bo,{children:[n.jsx(So,{children:n.jsxs(Un,{className:"bg-[#0a1628] hover:bg-[#0a1628] border-gray-700",children:[n.jsx(tt,{className:"text-gray-400",children:"图标"}),n.jsx(tt,{className:"text-gray-400",children:"类型ID"}),n.jsx(tt,{className:"text-gray-400",children:"显示名称"}),n.jsx(tt,{className:"text-gray-400",children:"匹配标签"}),n.jsx(tt,{className:"text-gray-400",children:"价格"}),n.jsx(tt,{className:"text-gray-400",children:"数据库匹配"}),n.jsx(tt,{className:"text-gray-400",children:"状态"}),n.jsx(tt,{className:"text-right text-gray-400",children:"操作"})]})}),n.jsx(Co,{children:r.matchTypes.map(S=>n.jsxs(Un,{className:"hover:bg-[#0a1628] border-gray-700/50",children:[n.jsx(Ye,{children:n.jsx("span",{className:"text-2xl",children:S.icon})}),n.jsx(Ye,{className:"font-mono text-gray-300",children:S.id}),n.jsx(Ye,{className:"text-white font-medium",children:S.label}),n.jsx(Ye,{className:"text-gray-300",children:S.matchLabel}),n.jsx(Ye,{children:n.jsxs(Fe,{className:"bg-yellow-500/20 text-yellow-400 hover:bg-yellow-500/20 border-0",children:["¥",S.price]})}),n.jsx(Ye,{children:S.matchFromDB?n.jsx(Fe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"是"}):n.jsx(Fe,{variant:"outline",className:"text-gray-500 border-gray-600",children:"否"})}),n.jsx(Ye,{children:n.jsx(xt,{checked:S.enabled,onCheckedChange:()=>R(S.id)})}),n.jsx(Ye,{className:"text-right",children:n.jsxs("div",{className:"flex items-center justify-end gap-1",children:[n.jsx(he,{variant:"ghost",size:"sm",onClick:()=>C(S),className:"text-gray-400 hover:text-[#38bdac] hover:bg-[#38bdac]/10",children:n.jsx(Ts,{className:"w-4 h-4"})}),n.jsx(he,{variant:"ghost",size:"sm",onClick:()=>N(S.id),className:"text-red-400 hover:text-red-300 hover:bg-red-500/10",children:n.jsx(dp,{className:"w-4 h-4"})})]})})]},S.id))})]})})]}),n.jsx(bn,{open:f,onOpenChange:m,children:n.jsxs(fn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-lg",showCloseButton:!0,children:[n.jsx(Sn,{children:n.jsxs(Cn,{className:"text-white flex items-center gap-2",children:[x?n.jsx(Ts,{className:"w-5 h-5 text-[#38bdac]"}):n.jsx(Es,{className:"w-5 h-5 text-[#38bdac]"}),x?"编辑匹配类型":"添加匹配类型"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"类型ID(英文)"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: partner",value:v.id,onChange:S=>y({...v,id:S.target.value}),disabled:!!x})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"图标"}),n.jsx("div",{className:"flex gap-1 flex-wrap",children:BC.map(S=>n.jsx("button",{type:"button",className:`w-8 h-8 text-lg rounded ${v.icon===S?"bg-[#38bdac]/30 ring-1 ring-[#38bdac]":"bg-[#0a1628]"}`,onClick:()=>y({...v,icon:S}),children:S},S))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"显示名称"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: 创业合伙",value:v.label,onChange:S=>y({...v,label:S.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"匹配标签"}),n.jsx(ue,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: 创业伙伴",value:v.matchLabel,onChange:S=>y({...v,matchLabel:S.target.value})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ae,{className:"text-gray-300",children:"单次匹配价格(元)"}),n.jsx(ue,{type:"number",min:.01,step:.01,className:"bg-[#0a1628] border-gray-700 text-white",value:v.price,onChange:S=>y({...v,price:parseFloat(S.target.value)||1})})]}),n.jsxs("div",{className:"flex gap-6 pt-2",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xt,{checked:v.matchFromDB,onCheckedChange:S=>y({...v,matchFromDB:S})}),n.jsx(ae,{className:"text-gray-300 text-sm",children:"从数据库匹配"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xt,{checked:v.showJoinAfterMatch,onCheckedChange:S=>y({...v,showJoinAfterMatch:S})}),n.jsx(ae,{className:"text-gray-300 text-sm",children:"匹配后显示加入"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(xt,{checked:v.enabled,onCheckedChange:S=>y({...v,enabled:S})}),n.jsx(ae,{className:"text-gray-300 text-sm",children:"启用"})]})]})]}),n.jsxs(Bn,{children:[n.jsx(he,{variant:"outline",onClick:()=>m(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsxs(he,{onClick:j,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Vn,{className:"w-4 h-4 mr-2"}),"保存"]})]})]})})]})}function VC(){const r=Xr();return n.jsx("div",{className:"min-h-screen bg-[#0a1628] flex items-center justify-center p-8",children:n.jsxs("div",{className:"text-center max-w-md",children:[n.jsx("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-full bg-red-500/20 text-red-400 mb-6",children:n.jsx(vw,{className:"w-10 h-10"})}),n.jsx("h1",{className:"text-4xl font-bold text-white mb-2",children:"404"}),n.jsx("p",{className:"text-gray-400 mb-1",children:"页面不存在"}),n.jsx("p",{className:"text-sm text-gray-500 font-mono mb-8 break-all",children:r.pathname}),n.jsx(he,{asChild:!0,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:n.jsxs(rp,{to:"/",children:[n.jsx($w,{className:"w-4 h-4 mr-2"}),"返回首页"]})})]})})}function WC(){return n.jsxs(Hy,{children:[n.jsx(Nt,{path:"/login",element:n.jsx($N,{})}),n.jsxs(Nt,{path:"/",element:n.jsx(B1,{}),children:[n.jsx(Nt,{index:!0,element:n.jsx(Uy,{to:"/dashboard",replace:!0})}),n.jsx(Nt,{path:"dashboard",element:n.jsx(UN,{})}),n.jsx(Nt,{path:"orders",element:n.jsx(WN,{})}),n.jsx(Nt,{path:"users",element:n.jsx(Zb,{})}),n.jsx(Nt,{path:"distribution",element:n.jsx(e2,{})}),n.jsx(Nt,{path:"withdrawals",element:n.jsx(t2,{})}),n.jsx(Nt,{path:"content",element:n.jsx(oC,{})}),n.jsx(Nt,{path:"chapters",element:n.jsx(iC,{})}),n.jsx(Nt,{path:"referral-settings",element:n.jsx(_C,{})}),n.jsx(Nt,{path:"settings",element:n.jsx(MC,{})}),n.jsx(Nt,{path:"payment",element:n.jsx(LC,{})}),n.jsx(Nt,{path:"site",element:n.jsx(zC,{})}),n.jsx(Nt,{path:"qrcodes",element:n.jsx($C,{})}),n.jsx(Nt,{path:"match",element:n.jsx(UC,{})})]}),n.jsx(Nt,{path:"*",element:n.jsx(VC,{})})]})}Qv.createRoot(document.getElementById("root")).render(n.jsx(p.StrictMode,{children:n.jsx(Jy,{future:{v7_startTransition:!0,v7_relativeSplatPath:!0},children:n.jsx(WC,{})})})); diff --git a/soul-admin/dist/assets/index-DBQ1UORI.css b/soul-admin/dist/assets/index-DBQ1UORI.css new file mode 100644 index 0000000..737ae1d --- /dev/null +++ b/soul-admin/dist/assets/index-DBQ1UORI.css @@ -0,0 +1 @@ +/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-xl:24px;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-1\/4{top:25%}.top-4{top:calc(var(--spacing)*4)}.top-\[50\%\]{top:50%}.right-1\/4{right:25%}.right-4{right:calc(var(--spacing)*4)}.bottom-1\/4{bottom:25%}.left-1\/4{left:25%}.left-2{left:calc(var(--spacing)*2)}.left-3{left:calc(var(--spacing)*3)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-6{margin-left:calc(var(--spacing)*6)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-96{height:calc(var(--spacing)*96)}.h-\[70vh\]{height:70vh}.h-full{height:100%}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[200px\]{max-height:200px}.max-h-\[300px\]{max-height:300px}.min-h-\[60vh\]{min-height:60vh}.min-h-\[80px\]{min-height:80px}.min-h-\[100px\]{min-height:100px}.min-h-\[120px\]{min-height:120px}.min-h-\[200px\]{min-height:200px}.min-h-\[300px\]{min-height:300px}.min-h-\[400px\]{min-height:400px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-56{width:calc(var(--spacing)*56)}.w-64{width:calc(var(--spacing)*64)}.w-96{width:calc(var(--spacing)*96)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[100px\]{max-width:100px}.max-w-\[200px\]{max-width:200px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[8rem\]{min-width:8rem}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-none{translate:none}.scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}.touch-none{touch-action:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}:where(.divide-gray-700\/50>:not(:last-child)){border-color:#36415380}@supports (color:color-mix(in lab,red,red)){:where(.divide-gray-700\/50>:not(:last-child)){border-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}:where(.divide-white\/5>:not(:last-child)){border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){:where(.divide-white\/5>:not(:last-child)){border-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[\#07C160\]{border-color:#07c160}.border-\[\#07C160\]\/20{border-color:#07c16033}.border-\[\#07C160\]\/30{border-color:#07c1604d}.border-\[\#38bdac\]\/30{border-color:#38bdac4d}.border-\[\#38bdac\]\/40{border-color:#38bdac66}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.border-blue-500\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500)30%,transparent)}}.border-gray-600{border-color:var(--color-gray-600)}.border-gray-700{border-color:var(--color-gray-700)}.border-gray-700\/30{border-color:#3641534d}@supports (color:color-mix(in lab,red,red)){.border-gray-700\/30{border-color:color-mix(in oklab,var(--color-gray-700)30%,transparent)}}.border-gray-700\/50{border-color:#36415380}@supports (color:color-mix(in lab,red,red)){.border-gray-700\/50{border-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.border-green-500\/30{border-color:#00c7584d}@supports (color:color-mix(in lab,red,red)){.border-green-500\/30{border-color:color-mix(in oklab,var(--color-green-500)30%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-transparent{border-color:#0000}.border-white\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\/5{border-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.border-yellow-500\/30{border-color:#edb2004d}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/30{border-color:color-mix(in oklab,var(--color-yellow-500)30%,transparent)}}.bg-\[\#0a1628\]{background-color:#0a1628}.bg-\[\#0f2137\]{background-color:#0f2137}.bg-\[\#00CED1\]{background-color:#00ced1}.bg-\[\#07C160\]{background-color:#07c160}.bg-\[\#07C160\]\/5{background-color:#07c1600d}.bg-\[\#07C160\]\/10{background-color:#07c1601a}.bg-\[\#38bdac\]{background-color:#38bdac}.bg-\[\#38bdac\]\/5{background-color:#38bdac0d}.bg-\[\#38bdac\]\/10{background-color:#38bdac1a}.bg-\[\#38bdac\]\/20{background-color:#38bdac33}.bg-\[\#38bdac\]\/30{background-color:#38bdac4d}.bg-\[\#162840\]{background-color:#162840}.bg-black{background-color:var(--color-black)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/90{background-color:#000000e6}@supports (color:color-mix(in lab,red,red)){.bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)}}.bg-blue-500\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-gray-500\/20{background-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.bg-gray-500\/20{background-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-700\/50{background-color:#36415380}@supports (color:color-mix(in lab,red,red)){.bg-gray-700\/50{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/10{background-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.bg-white\/5{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-yellow-500\/20{background-color:#edb20033}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/20{background-color:color-mix(in oklab,var(--color-yellow-500)20%,transparent)}}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-\[\#00CED1\]{--tw-gradient-from:#00ced1;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[\#38bdac\]\/10{--tw-gradient-from:oklab(72.378% -.11483 -.0053193/.1);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-cyan-500\/20{--tw-gradient-from:#00b7d733}@supports (color:color-mix(in lab,red,red)){.from-cyan-500\/20{--tw-gradient-from:color-mix(in oklab,var(--color-cyan-500)20%,transparent)}}.from-cyan-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-green-500\/20{--tw-gradient-from:#00c75833}@supports (color:color-mix(in lab,red,red)){.from-green-500\/20{--tw-gradient-from:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.from-green-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-500\/20{--tw-gradient-from:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.from-purple-500\/20{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.from-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-yellow-500\/20{--tw-gradient-from:#edb20033}@supports (color:color-mix(in lab,red,red)){.from-yellow-500\/20{--tw-gradient-from:color-mix(in oklab,var(--color-yellow-500)20%,transparent)}}.from-yellow-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[\#0f2137\]{--tw-gradient-to:#0f2137;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[\#20B2AA\]{--tw-gradient-to:#20b2aa;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-cyan-500\/5{--tw-gradient-to:#00b7d70d}@supports (color:color-mix(in lab,red,red)){.to-cyan-500\/5{--tw-gradient-to:color-mix(in oklab,var(--color-cyan-500)5%,transparent)}}.to-cyan-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-green-500\/5{--tw-gradient-to:#00c7580d}@supports (color:color-mix(in lab,red,red)){.to-green-500\/5{--tw-gradient-to:color-mix(in oklab,var(--color-green-500)5%,transparent)}}.to-green-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-purple-500\/5{--tw-gradient-to:#ac4bff0d}@supports (color:color-mix(in lab,red,red)){.to-purple-500\/5{--tw-gradient-to:color-mix(in oklab,var(--color-purple-500)5%,transparent)}}.to-purple-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-yellow-500\/5{--tw-gradient-to:#edb2000d}@supports (color:color-mix(in lab,red,red)){.to-yellow-500\/5{--tw-gradient-to:color-mix(in oklab,var(--color-yellow-500)5%,transparent)}}.to-yellow-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-repeat{background-repeat:repeat}.mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.py-20{padding-block:calc(var(--spacing)*20)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-8{padding-left:calc(var(--spacing)*8)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#00CED1\]{color:#00ced1}.text-\[\#07C160\]{color:#07c160}.text-\[\#07C160\]\/60{color:#07c16099}.text-\[\#07C160\]\/70{color:#07c160b3}.text-\[\#07C160\]\/80{color:#07c160cc}.text-\[\#26A17B\]{color:#26a17b}.text-\[\#38bdac\]{color:#38bdac}.text-\[\#38bdac\]\/40{color:#38bdac66}.text-\[\#169BD7\]{color:#169bd7}.text-\[\#1677FF\]{color:#1677ff}.text-\[\#FFD700\]{color:gold}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-blue-300\/60{color:#90c5ff99}@supports (color:color-mix(in lab,red,red)){.text-blue-300\/60{color:color-mix(in oklab,var(--color-blue-300)60%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-cyan-400{color:var(--color-cyan-400)}.text-gray-200{color:var(--color-gray-200)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-orange-300{color:var(--color-orange-300)}.text-orange-300\/60{color:#ffb96d99}@supports (color:color-mix(in lab,red,red)){.text-orange-300\/60{color:color-mix(in oklab,var(--color-orange-300)60%,transparent)}}.text-orange-400{color:var(--color-orange-400)}.text-purple-400{color:var(--color-purple-400)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab,red,red)){.text-white\/40{color:color-mix(in oklab,var(--color-white)40%,transparent)}}.text-white\/60{color:#fff9}@supports (color:color-mix(in lab,red,red)){.text-white\/60{color:color-mix(in oklab,var(--color-white)60%,transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\/70{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white)80%,transparent)}}.text-yellow-400{color:var(--color-yellow-400)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-\[\#38bdac\]{--tw-ring-color:#38bdac}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter\!{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)!important}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media(hover:hover){.group-hover\:text-\[\#38bdac\]:is(:where(.group):hover *){color:#38bdac}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.placeholder\:text-gray-500::placeholder{color:var(--color-gray-500)}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media(hover:hover){.hover\:border-\[\#38bdac\]\/30:hover{border-color:#38bdac4d}.hover\:border-\[\#38bdac\]\/50:hover{border-color:#38bdac80}.hover\:bg-\[\#0a1628\]:hover{background-color:#0a1628}.hover\:bg-\[\#1a3050\]:hover{background-color:#1a3050}.hover\:bg-\[\#2da396\]:hover{background-color:#2da396}.hover\:bg-\[\#06AD51\]:hover{background-color:#06ad51}.hover\:bg-\[\#07C160\]\/10:hover{background-color:#07c1601a}.hover\:bg-\[\#20B2AA\]:hover{background-color:#20b2aa}.hover\:bg-\[\#38bdac\]\/10:hover{background-color:#38bdac1a}.hover\:bg-\[\#38bdac\]\/20:hover{background-color:#38bdac33}.hover\:bg-\[\#162840\]:hover{background-color:#162840}.hover\:bg-blue-400\/10:hover{background-color:#54a2ff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-400\/10:hover{background-color:color-mix(in oklab,var(--color-blue-400)10%,transparent)}}.hover\:bg-blue-500\/20:hover{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-500\/20:hover{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.hover\:bg-gray-500:hover{background-color:var(--color-gray-500)}.hover\:bg-gray-700\/50:hover{background-color:#36415380}@supports (color:color-mix(in lab,red,red)){.hover\:bg-gray-700\/50:hover{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.hover\:bg-gray-800:hover{background-color:var(--color-gray-800)}.hover\:bg-green-500\/20:hover{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.hover\:bg-green-500\/20:hover{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-orange-500\/20:hover{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-500\/20:hover{background-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.hover\:bg-purple-500\/20:hover{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-purple-500\/20:hover{background-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.hover\:bg-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/20:hover{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.hover\:bg-yellow-400\/10:hover{background-color:#fac8001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-yellow-400\/10:hover{background-color:color-mix(in oklab,var(--color-yellow-400)10%,transparent)}}.hover\:bg-yellow-500\/20:hover{background-color:#edb20033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-yellow-500\/20:hover{background-color:color-mix(in oklab,var(--color-yellow-500)20%,transparent)}}.hover\:text-\[\#38bdac\]:hover{color:#38bdac}.hover\:text-blue-400:hover{color:var(--color-blue-400)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-white:hover{color:var(--color-white)}.hover\:text-yellow-400:hover{color:var(--color-yellow-400)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:border-\[\#38bdac\]:focus{border-color:#38bdac}.focus\:bg-\[\#38bdac\]\/20:focus{background-color:#38bdac33}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-\[\#38bdac\]:focus{--tw-ring-color:#38bdac}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[\#38bdac\]:focus-visible{--tw-ring-color:#38bdac}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-\[\#0a1628\]:focus-visible{--tw-ring-offset-color:#0a1628}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=active\]\:bg-\[\#07C160\]\/20[data-state=active]{background-color:#07c16033}.data-\[state\=active\]\:bg-\[\#26A17B\]\/20[data-state=active]{background-color:#26a17b33}.data-\[state\=active\]\:bg-\[\#38bdac\]\/20[data-state=active]{background-color:#38bdac33}.data-\[state\=active\]\:bg-\[\#1677FF\]\/20[data-state=active]{background-color:#1677ff33}.data-\[state\=active\]\:bg-\[\#003087\]\/20[data-state=active]{background-color:#00308733}.data-\[state\=active\]\:text-\[\#07C160\][data-state=active]{color:#07c160}.data-\[state\=active\]\:text-\[\#26A17B\][data-state=active]{color:#26a17b}.data-\[state\=active\]\:text-\[\#38bdac\][data-state=active]{color:#38bdac}.data-\[state\=active\]\:text-\[\#169BD7\][data-state=active]{color:#169bd7}.data-\[state\=active\]\:text-\[\#1677FF\][data-state=active]{color:#1677ff}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=checked\]\:bg-\[\#38bdac\][data-state=checked]{background-color:#38bdac}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-gray-600[data-state=unchecked]{background-color:var(--color-gray-600)}@media(min-width:40rem){.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing)*0)}.\[\&\>span\]\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}}:root{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20% .02 240);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20% .02 240);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(65% .15 180);--primary-foreground:oklch(20% 0 0);--secondary:oklch(27% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27% 0 0);--muted-foreground:oklch(65% 0 0);--accent:oklch(27% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(55% .2 25);--destructive-foreground:oklch(98.5% 0 0);--border:oklch(35% 0 0);--input:oklch(35% 0 0);--ring:oklch(65% .15 180);--radius:.625rem}body{font-family:var(--font-sans);color:var(--foreground);background:#0a1628}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/soul-admin/dist/index.html b/soul-admin/dist/index.html new file mode 100644 index 0000000..d03c904 --- /dev/null +++ b/soul-admin/dist/index.html @@ -0,0 +1,244 @@ + + + + + + 管理后台 - Soul创业派对 + + + + +
+ + + diff --git a/部署到GitHub与宝塔.sh b/部署到GitHub与宝塔.sh new file mode 100755 index 0000000..08957ae --- /dev/null +++ b/部署到GitHub与宝塔.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# 1) 以本地为准推送到 GitHub yongpxu-soul +# 2) 打包 → SCP 上传 → SSH 解压并 pnpm install + build +# 3) 使用宝塔 API 重启 Node 项目(不用 pm2 命令) +# 在「一场soul的创业实验」目录下执行 + +set -e +cd "$(dirname "$0")" + +echo "===== 1. 推送到 GitHub(以本地为准)=====" +git push origin yongpxu-soul --force-with-lease + +echo "===== 2. 打包 =====" +tar --exclude='node_modules' --exclude='.next' --exclude='.git' -czf /tmp/soul_update.tar.gz . + +echo "===== 3. 上传到宝塔服务器 =====" +sshpass -p 'Zhiqun1984' scp /tmp/soul_update.tar.gz root@42.194.232.22:/tmp/ + +echo "===== 4. SSH:解压、安装、构建(不执行 pm2)=====" +sshpass -p 'Zhiqun1984' ssh root@42.194.232.22 " + cd /www/wwwroot/soul + rm -rf app components lib public styles *.json *.js *.ts *.mjs *.md .next + tar -xzf /tmp/soul_update.tar.gz + rm /tmp/soul_update.tar.gz + export PATH=/www/server/nodejs/v22.14.0/bin:\$PATH + pnpm install + pnpm run build +" + +echo "===== 5. 宝塔 API 重启 Node 项目 soul =====" +BT_HOST="42.194.232.22" +BT_PORT="9988" +BT_KEY="hsAWqFSi0GOCrunhmYdkxy92tBXfqYjd" +REQUEST_TIME=$(date +%s) +# request_token = md5( request_time + md5(api_key) ),兼容 macOS/Linux +md5hex() { printf '%s' "$1" | openssl md5 2>/dev/null | awk '{print $NF}' || true; } +MD5_KEY=$(md5hex "$BT_KEY") +SIGN_STR="${REQUEST_TIME}${MD5_KEY}" +REQUEST_TOKEN=$(md5hex "$SIGN_STR") + +RESP=$(curl -s -k -X POST "https://${BT_HOST}:${BT_PORT}/project/nodejs/restart_project" \ + -d "request_time=${REQUEST_TIME}" \ + -d "request_token=${REQUEST_TOKEN}" \ + -d "project_name=soul" 2>/dev/null || true) + +if echo "$RESP" | grep -q '"status":true\|"status": true'; then + echo "宝塔 API 重启成功: $RESP" +else + echo "宝塔 API 返回(若失败请到面板手动重启): $RESP" +fi + +echo "===== 部署完成 =====" diff --git a/部署到Kr宝塔.sh b/部署到Kr宝塔.sh new file mode 100755 index 0000000..16e88ee --- /dev/null +++ b/部署到Kr宝塔.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# 部署到 Kr宝塔 (43.139.27.93):打包 → SCP(端口22022) → SSH 解压构建 → 宝塔 API 重启 +# 不用 pm2 命令,用宝塔 API 操作。在「一场soul的创业实验」目录下执行。 + +set -e +cd "$(dirname "$0")" + +SSH_PORT="22022" +BT_HOST="43.139.27.93" +BT_PORT="9988" +BT_KEY="qcWubCdlfFjS2b2DMT1lzPFaDfmv1cBT" +PROJECT_PATH="/www/wwwroot/soul" +PROJECT_NAME="soul" + +echo "===== 1. 打包 =====" +tar --exclude='node_modules' --exclude='.next' --exclude='.git' -czf /tmp/soul_update.tar.gz . + +echo "===== 2. 上传到 Kr宝塔 (${BT_HOST}:${SSH_PORT}) =====" +sshpass -p 'Zhiqun1984' scp -P "$SSH_PORT" /tmp/soul_update.tar.gz root@${BT_HOST}:/tmp/ + +echo "===== 3. SSH:解压、安装、构建(不执行 pm2)=====" +sshpass -p 'Zhiqun1984' ssh -p "$SSH_PORT" root@${BT_HOST} " + mkdir -p ${PROJECT_PATH} + cd ${PROJECT_PATH} + rm -rf app components lib public styles *.json *.js *.ts *.mjs *.md .next + tar -xzf /tmp/soul_update.tar.gz + rm /tmp/soul_update.tar.gz + export PATH=/www/server/nodejs/v22.14.0/bin:\$PATH + [ -x \"\$(command -v pnpm)\" ] || npm i -g pnpm + pnpm install + pnpm run build +" + +echo "===== 4. 宝塔 API 重启 Node 项目 ${PROJECT_NAME} =====" +REQUEST_TIME=$(date +%s) +md5hex() { printf '%s' "$1" | openssl md5 2>/dev/null | awk '{print $NF}' || true; } +MD5_KEY=$(md5hex "$BT_KEY") +SIGN_STR="${REQUEST_TIME}${MD5_KEY}" +REQUEST_TOKEN=$(md5hex "$SIGN_STR") + +RESP=$(curl -s -k -X POST "https://${BT_HOST}:${BT_PORT}/project/nodejs/restart_project" \ + -d "request_time=${REQUEST_TIME}" \ + -d "request_token=${REQUEST_TOKEN}" \ + -d "project_name=${PROJECT_NAME}" 2>/dev/null || true) + +if echo "$RESP" | grep -q '"status":true\|"status": true'; then + echo "宝塔 API 重启成功: $RESP" +else + echo "宝塔 API 返回(若失败请到面板 网站→Node项目→${PROJECT_NAME}→重启): $RESP" +fi + +echo "===== 部署到 Kr宝塔 完成 ====="